@draftbit/core 43.4.7 → 43.4.9-f2446b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js +11 -3
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/AspectRatio.js +16 -3
- package/lib/commonjs/components/AspectRatio.js.map +1 -1
- package/lib/commonjs/components/Button.js +29 -11
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Card.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +13 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/CardContainerShortImage.js +18 -5
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/commonjs/components/CardInline.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +20 -5
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/CircularProgress.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/Container.js +16 -5
- package/lib/commonjs/components/Container.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Divider.js +13 -3
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/Elevation.js +14 -3
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/Image.js +15 -4
- package/lib/commonjs/components/Image.js.map +1 -1
- package/lib/commonjs/components/Justification.js +2 -1
- package/lib/commonjs/components/NumberInput.js +43 -12
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -6
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +30 -10
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -6
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +15 -3
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -6
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/ResizeMode.js +2 -1
- package/lib/commonjs/components/Row.js.map +1 -1
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.js +18 -5
- package/lib/commonjs/components/ScreenContainer.js.map +1 -1
- package/lib/commonjs/components/Slider.js +22 -5
- package/lib/commonjs/components/Slider.js.map +1 -1
- package/lib/commonjs/components/StarRating.js +23 -5
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Surface.js +10 -3
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js +17 -3
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/components/Touchable.js +16 -3
- package/lib/commonjs/components/Touchable.js.map +1 -1
- package/lib/commonjs/components/Touchable.web.js.map +1 -1
- package/lib/commonjs/components/Typography.js.map +1 -1
- package/lib/commonjs/components/useAuthState.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/AudioPlayer.js.map +1 -1
- package/lib/commonjs/mappings/Button.js.map +1 -1
- package/lib/commonjs/mappings/CardContainer.js.map +1 -1
- package/lib/commonjs/mappings/DatePicker.js.map +1 -1
- package/lib/commonjs/mappings/ProgressBar.js.map +1 -1
- package/lib/commonjs/mappings/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/module/components/DeprecatedCardWrapper.js +4 -5
- package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/module/components/NumberInput.js +31 -11
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/mappings/ActivityIndicator.js.map +1 -1
- package/package.json +2 -2
- package/src/components/NumberInput.js +24 -7
- package/src/components/NumberInput.tsx +51 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetCancel.
|
|
1
|
+
{"version":3,"sources":["ActionSheetCancel.js"],"names":["ActionSheetCancel","label","color","style","onPress","React","createElement","ActionSheetItem"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,iBAAiB,GAAG,QAAkD;AAAA,MAAjD;AAAEC,IAAAA,KAAK,GAAG,QAAV;AAAoBC,IAAAA,KAApB;AAA2BC,IAAAA,KAA3B;AAAkCC,IAAAA;AAAlC,GAAiD;AACxE,sBAAQC,eAAMC,aAAN,CAAoBC,wBAApB,EAAqC;AAAEN,IAAAA,KAAK,EAAEA,KAAT;AAAgBC,IAAAA,KAAK,EAAEA,KAAK,IAAI,SAAhC;AAA2CC,IAAAA,KAAK,EAAE,CAACA,KAAD,CAAlD;AAA2DC,IAAAA,OAAO,EAAEA;AAApE,GAArC,CAAR;AACH,CAFD;;eAGeJ,iB","sourcesContent":["import React from \"react\";\nimport ActionSheetItem from \"./ActionSheetItem\";\nconst ActionSheetCancel = ({ label = \"Cancel\", color, style, onPress, }) => {\n return (React.createElement(ActionSheetItem, { label: label, color: color || \"#FF453A\", style: [style], onPress: onPress }));\n};\nexport default ActionSheetCancel;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA","sourcesContent":["export { default as ActionSheet } from \"./ActionSheet\";\nexport { default as ActionSheetItem } from \"./ActionSheetItem\";\nexport { default as ActionSheetCancel } from \"./ActionSheetCancel\";\n"]}
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
20
|
const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
|
|
23
21
|
|
|
24
22
|
const AnimatedCircularProgress = _ref => {
|
|
@@ -69,7 +67,17 @@ const AnimatedCircularProgress = _ref => {
|
|
|
69
67
|
React.useEffect(() => {
|
|
70
68
|
animate();
|
|
71
69
|
}, [fill, animate]);
|
|
72
|
-
return /*#__PURE__*/React.createElement(AnimatedProgress,
|
|
70
|
+
return /*#__PURE__*/React.createElement(AnimatedProgress, { ...other,
|
|
71
|
+
style: other.style,
|
|
72
|
+
childrenContainerStyle: other.childrenContainerStyle,
|
|
73
|
+
fill: fillAnimation,
|
|
74
|
+
tintColor: animateColor()
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var _default = AnimatedCircularProgress;
|
|
79
|
+
exports.default = _default;
|
|
80
|
+
//# sourceMappingURL=AnimatedCircularProgress.js.map/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
73
81
|
style: other.style,
|
|
74
82
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
75
83
|
fill: fillAnimation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AnimatedCircularProgress.
|
|
1
|
+
{"version":3,"sources":["AnimatedCircularProgress.js"],"names":["AnimatedProgress","Animated","createAnimatedComponent","CircularProgress","AnimatedCircularProgress","duration","easing","Easing","out","ease","fill","prefill","useNativeDriver","tintColorSecondary","onAnimationComplete","tintColor","other","fillAnimation","React","useState","Value","animate","useCallback","toVal","dur","toValue","dura","eas","useNative","anim","timing","start","animateColor","tintAnimation","interpolate","inputRange","outputRange","useEffect","createElement","style","childrenContainerStyle"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,gBAAgB,GAAGC,sBAASC,uBAAT,CAAiCC,yBAAjC,CAAzB;;AACA,MAAMC,wBAAwB,GAAG,QAA8K;AAAA,MAA7K;AAAEC,IAAAA,QAAQ,GAAG,GAAb;AAAkBC,IAAAA,MAAM,GAAGC,oBAAOC,GAAP,CAAWD,oBAAOE,IAAlB,CAA3B;AAAoDC,IAAAA,IAApD;AAA0DC,IAAAA,OAAO,GAAG,CAApE;AAAuEC,IAAAA,eAAe,GAAG,KAAzF;AAAgGC,IAAAA,kBAAhG;AAAoHC,IAAAA,mBAApH;AAAyIC,IAAAA,SAAS,GAAG,OAArJ;AAA8J,OAAGC;AAAjK,GAA6K;AAC3M,QAAM,CAACC,aAAD,IAAkBC,KAAK,CAACC,QAAN,CAAe,IAAIlB,sBAASmB,KAAb,CAAmBT,OAAnB,CAAf,CAAxB;AACA,QAAMU,OAAO,GAAGH,KAAK,CAACI,WAAN,CAAkB,YAA2B;AAAA,QAA1BC,KAA0B,uEAAlB,CAAC,CAAiB;AAAA,QAAdC,GAAc;AAAA,QAATf,IAAS;AACzD,UAAMgB,OAAO,GAAGF,KAAK,IAAI,CAAT,GAAaA,KAAb,GAAqBb,IAArC;AACA,UAAMgB,IAAI,GAAGF,GAAG,IAAInB,QAApB;AACA,UAAMsB,GAAG,GAAGlB,IAAI,IAAIH,MAApB;AACA,UAAMsB,SAAS,GAAGhB,eAAlB;;AACA,UAAMiB,IAAI,GAAG5B,sBAAS6B,MAAT,CAAgBb,aAAhB,EAA+B;AACxCL,MAAAA,eAAe,EAAEgB,SADuB;AAExCH,MAAAA,OAFwC;AAGxCnB,MAAAA,MAAM,EAAEqB,GAHgC;AAIxCtB,MAAAA,QAAQ,EAAEqB;AAJ8B,KAA/B,CAAb;;AAMAG,IAAAA,IAAI,CAACE,KAAL,CAAWjB,mBAAX;AACA,WAAOe,IAAP;AACH,GAbe,EAab,CACCxB,QADD,EAECC,MAFD,EAGCI,IAHD,EAICE,eAJD,EAKCK,aALD,EAMCH,mBAND,CAba,CAAhB;;AAqBA,QAAMkB,YAAY,GAAG,MAAM;AACvB,QAAI,CAACnB,kBAAL,EAAyB;AACrB,aAAOE,SAAP;AACH;;AACD,UAAMkB,aAAa,GAAGhB,aAAa,CAACiB,WAAd,CAA0B;AAC5CC,MAAAA,UAAU,EAAE,CAAC,CAAD,EAAI,GAAJ,CADgC;AAE5CC,MAAAA,WAAW,EAAE,CAACrB,SAAD,EAAYF,kBAAZ;AAF+B,KAA1B,CAAtB;AAIA,WAAOoB,aAAP;AACH,GATD;;AAUAf,EAAAA,KAAK,CAACmB,SAAN,CAAgB,MAAM;AAClBhB,IAAAA,OAAO;AACV,GAFD,EAEG,CAACX,IAAD,EAAOW,OAAP,CAFH;AAGA,sBAAQH,KAAK,CAACoB,aAAN,CAAoBtC,gBAApB,EAAsC,EAAE,GAAGgB,KAAL;AAAYuB,IAAAA,KAAK,EAAEvB,KAAK,CAACuB,KAAzB;AAAgCC,IAAAA,sBAAsB,EAAExB,KAAK,CAACwB,sBAA9D;AAAsF9B,IAAAA,IAAI,EAAEO,aAA5F;AAA2GF,IAAAA,SAAS,EAAEiB,YAAY;AAAlI,GAAtC,CAAR;AACH,CArCD;;eAsCe5B,wB","sourcesContent":["import * as React from \"react\";\nimport { Animated, Easing, } from \"react-native\";\nimport CircularProgress from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\nconst AnimatedCircularProgress = ({ duration = 500, easing = Easing.out(Easing.ease), fill, prefill = 0, useNativeDriver = false, tintColorSecondary, onAnimationComplete, tintColor = \"black\", ...other }) => {\n const [fillAnimation] = React.useState(new Animated.Value(prefill));\n const animate = React.useCallback((toVal = -1, dur, ease) => {\n const toValue = toVal >= 0 ? toVal : fill;\n const dura = dur || duration;\n const eas = ease || easing;\n const useNative = useNativeDriver;\n const anim = Animated.timing(fillAnimation, {\n useNativeDriver: useNative,\n toValue,\n easing: eas,\n duration: dura,\n });\n anim.start(onAnimationComplete);\n return anim;\n }, [\n duration,\n easing,\n fill,\n useNativeDriver,\n fillAnimation,\n onAnimationComplete,\n ]);\n const animateColor = () => {\n if (!tintColorSecondary) {\n return tintColor;\n }\n const tintAnimation = fillAnimation.interpolate({\n inputRange: [0, 100],\n outputRange: [tintColor, tintColorSecondary],\n });\n return tintAnimation;\n };\n React.useEffect(() => {\n animate();\n }, [fill, animate]);\n return (React.createElement(AnimatedProgress, { ...other, style: other.style, childrenContainerStyle: other.childrenContainerStyle, fill: fillAnimation, tintColor: animateColor() }));\n};\nexport default AnimatedCircularProgress;\n"]}
|
|
@@ -11,8 +11,6 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
14
|
const AspectRatio = props => {
|
|
17
15
|
const [layout, setLayout] = _react.default.useState(null);
|
|
18
16
|
|
|
@@ -43,7 +41,22 @@ const AspectRatio = props => {
|
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View,
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, { ...props,
|
|
45
|
+
style: style,
|
|
46
|
+
onLayout: _ref => {
|
|
47
|
+
let {
|
|
48
|
+
nativeEvent: {
|
|
49
|
+
layout: l
|
|
50
|
+
}
|
|
51
|
+
} = _ref;
|
|
52
|
+
return setLayout(l);
|
|
53
|
+
}
|
|
54
|
+
}, props.children);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var _default = AspectRatio;
|
|
58
|
+
exports.default = _default;
|
|
59
|
+
//# sourceMappingURL=AspectRatio.js.mapateElement(_reactNative.View, _extends({}, props, {
|
|
47
60
|
style: style,
|
|
48
61
|
onLayout: _ref => {
|
|
49
62
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AspectRatio.
|
|
1
|
+
{"version":3,"sources":["AspectRatio.js"],"names":["AspectRatio","props","layout","setLayout","React","useState","aspectRatio","inputStyle","StyleSheet","flatten","style","width","height","push","createElement","View","onLayout","nativeEvent","l","children"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,WAAW,GAAIC,KAAD,IAAW;AAC3B,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsBC,eAAMC,QAAN,CAAe,IAAf,CAA5B;;AACA,QAAM;AAAEC,IAAAA,WAAW,GAAG,CAAhB;AAAmB,OAAGC;AAAtB,MAAqCC,wBAAWC,OAAX,CAAmBR,KAAK,CAACS,KAAzB,KAAmC,EAA9E;AACA,QAAMA,KAAK,GAAG,CAACH,UAAD,EAAa;AAAED,IAAAA;AAAF,GAAb,CAAd;;AACA,MAAIJ,MAAJ,EAAY;AACR,UAAM;AAAES,MAAAA,KAAK,GAAG,CAAV;AAAaC,MAAAA,MAAM,GAAG;AAAtB,QAA4BV,MAAlC;;AACA,QAAIS,KAAK,KAAK,CAAd,EAAiB;AACbD,MAAAA,KAAK,CAACG,IAAN,CAAW;AAAEF,QAAAA,KAAK,EAAEC,MAAM,IAAI,IAAIN,WAAR,CAAf;AAAqCM,QAAAA;AAArC,OAAX;AACH,KAFD,MAGK;AACDF,MAAAA,KAAK,CAACG,IAAN,CAAW;AAAEF,QAAAA,KAAF;AAASC,QAAAA,MAAM,EAAED,KAAK,IAAI,IAAIL,WAAR;AAAtB,OAAX;AACH;AACJ;;AACD,sBAAQF,eAAMU,aAAN,CAAoBC,iBAApB,EAA0B,EAAE,GAAGd,KAAL;AAAYS,IAAAA,KAAK,EAAEA,KAAnB;AAA0BM,IAAAA,QAAQ,EAAE;AAAA,UAAC;AAAEC,QAAAA,WAAW,EAAE;AAAEf,UAAAA,MAAM,EAAEgB;AAAV;AAAf,OAAD;AAAA,aAAoCf,SAAS,CAACe,CAAD,CAA7C;AAAA;AAApC,GAA1B,EAAkHjB,KAAK,CAACkB,QAAxH,CAAR;AACH,CAdD;;eAeenB,W","sourcesContent":["import React from \"react\";\nimport { View, StyleSheet, } from \"react-native\";\nconst AspectRatio = (props) => {\n const [layout, setLayout] = React.useState(null);\n const { aspectRatio = 1, ...inputStyle } = StyleSheet.flatten(props.style) || {};\n const style = [inputStyle, { aspectRatio }];\n if (layout) {\n const { width = 0, height = 0 } = layout;\n if (width === 0) {\n style.push({ width: height * (1 / aspectRatio), height });\n }\n else {\n style.push({ width, height: width * (1 / aspectRatio) });\n }\n }\n return (React.createElement(View, { ...props, style: style, onLayout: ({ nativeEvent: { layout: l } }) => setLayout(l) }, props.children));\n};\nexport default AspectRatio;\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 CONSTANTS = {
|
|
21
19
|
baseHeight: 42,
|
|
22
20
|
borderRadius: 4,
|
|
@@ -73,7 +71,7 @@ function Base(_ref) {
|
|
|
73
71
|
buttonStyles.justifyContent = "flex-end";
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
74
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
77
75
|
onPress: onPress,
|
|
78
76
|
disabled: disabled || loading,
|
|
79
77
|
style: _ref2 => {
|
|
@@ -83,8 +81,9 @@ function Base(_ref) {
|
|
|
83
81
|
return [styles.base, {
|
|
84
82
|
opacity: pressed || disabled ? 0.75 : 1
|
|
85
83
|
}, buttonStyles];
|
|
86
|
-
}
|
|
87
|
-
|
|
84
|
+
},
|
|
85
|
+
...props
|
|
86
|
+
}, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
88
87
|
size: "small",
|
|
89
88
|
color: color,
|
|
90
89
|
style: styles.loading
|
|
@@ -104,13 +103,14 @@ const Solid = _ref3 => {
|
|
|
104
103
|
theme,
|
|
105
104
|
...props
|
|
106
105
|
} = _ref3;
|
|
107
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
106
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
108
107
|
style: [{
|
|
109
108
|
color: "#FFF",
|
|
110
109
|
borderRadius: theme.roundness,
|
|
111
110
|
backgroundColor: theme.colors.primary
|
|
112
|
-
}, style]
|
|
113
|
-
|
|
111
|
+
}, style],
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const ButtonSolid = (0, _theming.withTheme)(Solid);
|
|
@@ -122,13 +122,14 @@ const Outline = _ref4 => {
|
|
|
122
122
|
theme,
|
|
123
123
|
...props
|
|
124
124
|
} = _ref4;
|
|
125
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
125
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
126
126
|
style: [styles.outline, {
|
|
127
127
|
borderRadius: theme.roundness,
|
|
128
128
|
borderColor: theme.colors.primary,
|
|
129
129
|
color: theme.colors.primary
|
|
130
|
-
}, style]
|
|
131
|
-
|
|
130
|
+
}, style],
|
|
131
|
+
...props
|
|
132
|
+
});
|
|
132
133
|
};
|
|
133
134
|
|
|
134
135
|
const ButtonOutline = (0, _theming.withTheme)(Outline);
|
|
@@ -177,4 +178,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
177
178
|
})
|
|
178
179
|
}
|
|
179
180
|
});
|
|
181
|
+
//# sourceMappingURL=Button.js.map loading: {
|
|
182
|
+
marginRight: 6
|
|
183
|
+
},
|
|
184
|
+
icon: { ..._reactNative.Platform.select({
|
|
185
|
+
web: {
|
|
186
|
+
marginTop: 1,
|
|
187
|
+
marginRight: 4,
|
|
188
|
+
alignSelf: "center"
|
|
189
|
+
},
|
|
190
|
+
default: {
|
|
191
|
+
marginBottom: 2,
|
|
192
|
+
marginRight: 4,
|
|
193
|
+
alignSelf: "center"
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
});
|
|
180
198
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Button.
|
|
1
|
+
{"version":3,"sources":["Button.js"],"names":["CONSTANTS","baseHeight","borderRadius","padding","icon","Base","Icon","title","onPress","loading","disabled","style","props","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","buttonStyles","StyleSheet","flatten","titleStyles","justifyContent","React","createElement","Pressable","pressed","styles","base","opacity","ActivityIndicator","size","name","Text","Solid","theme","roundness","backgroundColor","colors","primary","ButtonSolid","Outline","outline","borderColor","ButtonOutline","create","position","flexDirection","alignItems","minHeight","paddingHorizontal","Platform","select","web","cursor","userSelect","borderWidth","bare","undefined","marginRight","marginTop","alignSelf","default","marginBottom"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,SAAS,GAAG;AACdC,EAAAA,UAAU,EAAE,EADE;AAEdC,EAAAA,YAAY,EAAE,CAFA;AAGdC,EAAAA,OAAO,EAAE,CAHK;AAIdC,EAAAA,IAAI,EAAE;AAJQ,CAAlB;;AAMA,SAASC,IAAT,OAAkF;AAAA,MAApE;AAAEC,IAAAA,IAAF;AAAQF,IAAAA,IAAR;AAAcG,IAAAA,KAAd;AAAqBC,IAAAA,OAArB;AAA8BC,IAAAA,OAA9B;AAAuCC,IAAAA,QAAvC;AAAiDC,IAAAA,KAAjD;AAAwD,OAAGC;AAA3D,GAAoE;;AAC9E,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,UAAT;AAAqBC,IAAAA,UAArB;AAAiCC,IAAAA,QAAjC;AAA2CC,IAAAA,UAA3C;AAAuDC,IAAAA,aAAvD;AAAsEC,IAAAA,aAAtE;AAAqFC,IAAAA,SAArF;AAAgGC,IAAAA,kBAAhG;AAAoHC,IAAAA,mBAApH;AAAyIC,IAAAA,mBAAzI;AAA8J,OAAGC;AAAjK,MAAkLC,wBAAWC,OAAX,CAAmBf,KAAK,IAAI,EAA5B,CAAxL;;AACA,QAAMgB,WAAW,GAAG;AAChBd,IAAAA,KADgB;AAEhBC,IAAAA,UAFgB;AAGhBC,IAAAA,UAHgB;AAIhBC,IAAAA,QAJgB;AAKhBC,IAAAA,UALgB;AAMhBC,IAAAA,aANgB;AAOhBC,IAAAA,aAPgB;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AAU,EAAE,QAHV;AAIF1B,IAAAA,cAAc,EAAE,QAJd;AAKF2B,IAAAA,SAAS,EAAEvD,SAAS,CAACC,UALnB;AAMFuD,IAAAA,iBAAiB,EAAE,EANjB;AAOF1C,IAAAA,UAAU,EAAE,QAPV;AAQFC,IAAAA,UAAU,EAAE,KARV;AASF,OAAG0C,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDC,QAAAA,MAAM,EAAE,SADP;AAEDC,QAAAA,UAAU,EAAE;AAFX;AADU,KAAhB;AATD,GADuB;AAiB7Bb,EAAAA,OAAO,EAAE;AACLL,IAAAA,eAAe,EAAE,aADZ;AAELmB,IAAAA,WAAW,EAAE;AAFR,GAjBoB;AAqB7BC,EAAAA,IAAI,EAAE;AACFpB,IAAAA,eAAe,EAAE,aADf;AAEFxC,IAAAA,OAAO,EAAE,CAFP;AAGFoD,IAAAA,SAAS,EAAES;AAHT,GArBuB;AA0B7BvD,EAAAA,OAAO,EAAE;AACLwD,IAAAA,WAAW,EAAE;AADR,GA1BoB;AA6B7B7D,EAAAA,IAAI,EAAE,EACF,GAAGqD,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDO,QAAAA,SAAS,EAAE,CADV;AAEDD,QAAAA,WAAW,EAAE,CAFZ;AAGDE,QAAAA,SAAS,EAAE;AAHV,OADU;AAMfC,MAAAA,OAAO,EAAE;AACLC,QAAAA,YAAY,EAAE,CADT;AAELJ,QAAAA,WAAW,EAAE,CAFR;AAGLE,QAAAA,SAAS,EAAE;AAHN;AANM,KAAhB;AADD;AA7BuB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport { Text, Pressable, Platform, StyleSheet, ActivityIndicator, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst CONSTANTS = {\n baseHeight: 42,\n borderRadius: 4,\n padding: 8,\n icon: 24,\n};\nfunction Base({ Icon, icon, title, onPress, loading, disabled, style, ...props }) {\n const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});\n const titleStyles = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n if (textAlign === \"left\") {\n buttonStyles.justifyContent = \"flex-start\";\n }\n if (textAlign === \"right\") {\n buttonStyles.justifyContent = \"flex-end\";\n }\n return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {\n return [\n styles.base,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n },\n buttonStyles,\n ];\n }, ...props },\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: color, style: styles.loading })) : null,\n icon && !loading ? (React.createElement(Icon, { name: icon, color: color, style: styles.icon, size: CONSTANTS.icon })) : null,\n React.createElement(Text, { style: titleStyles }, title)));\n}\nconst Solid = ({ style, theme, ...props }) => {\n return (React.createElement(Base, { style: [\n {\n color: \"#FFF\",\n borderRadius: theme.roundness,\n backgroundColor: theme.colors.primary,\n },\n style,\n ], ...props }));\n};\nconst ButtonSolid = withTheme(Solid);\nexport { ButtonSolid };\nconst Outline = ({ style, theme, ...props }) => {\n return (React.createElement(Base, { style: [\n styles.outline,\n {\n borderRadius: theme.roundness,\n borderColor: theme.colors.primary,\n color: theme.colors.primary,\n },\n style,\n ], ...props }));\n};\nconst ButtonOutline = withTheme(Outline);\nexport { ButtonOutline };\nconst styles = StyleSheet.create({\n base: {\n position: \"relative\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: CONSTANTS.baseHeight,\n paddingHorizontal: 12,\n fontFamily: \"System\",\n fontWeight: \"700\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n outline: {\n backgroundColor: \"transparent\",\n borderWidth: 1,\n },\n bare: {\n backgroundColor: \"transparent\",\n padding: 0,\n minHeight: undefined,\n },\n loading: {\n marginRight: 6,\n },\n icon: {\n ...Platform.select({\n web: {\n marginTop: 1,\n marginRight: 4,\n alignSelf: \"center\",\n },\n default: {\n marginBottom: 2,\n marginRight: 4,\n alignSelf: \"center\",\n },\n }),\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Card.
|
|
1
|
+
{"version":3,"sources":["Card.js"],"names":["ICON_SIZE","Config","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","React","createElement","Surface","style","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","Pressable","disabled","pressed","opacity","name","size","color","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","onPressIcon","titleStyle","subtitleStyle","descriptionStyle","children","bgColor","styles","StyleSheet","flatten","innerPadding","Image","source","uri","resizeMode","View","Title","text","Subtitle","marginTop","Caption"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,SAAS,GAAGC,gBAAOC,YAAzB;AACA,MAAMC,mBAAmB,GAAGF,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAME,sBAAsB,GAAGH,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;AACA,MAAMG,cAAc,GAAGJ,gBAAOK,iBAA9B;AACO,MAAMC,kBAAkB,GAAG,wBAAU,QAAqC;AAAA,MAApC;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA;AAArB,GAAoC;AAC7E,sBAAQC,eAAMC,aAAN,CAAoBC,gBAApB,EAA6B;AAAEC,IAAAA,KAAK,EAAE;AACtCC,MAAAA,cAAc,EAAE,QADsB;AAEtCC,MAAAA,UAAU,EAAE,QAF0B;AAGtCC,MAAAA,SAAS,EAAEb,cAH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react-native\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport { Title, Subtitle, Caption } from \"./Typography\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_SIZE = Config.cardIconSize;\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst ICON_ELEVATION = Config.cardIconElevation;\nexport const TopRightCircleIcon = withTheme(({ Icon, icon, theme, onPress, }) => {\n return (React.createElement(Surface, { style: {\n justifyContent: \"center\",\n alignItems: \"center\",\n elevation: ICON_ELEVATION,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n } },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Icon, { name: icon, size: ICON_SIZE, color: theme.colors.surface }))));\n});\nconst Card = ({ Icon, image = Config.cardImageUrl, title, subtitle, description, textCentered, icon, aspectRatio = 1.5, elevation = 2, style, onPress, onPressIcon, titleStyle, subtitleStyle, descriptionStyle, theme, children, }) => {\n const { backgroundColor: bgColor, padding, ...styles } = StyleSheet.flatten(style || {});\n const backgroundColor = bgColor ? bgColor : theme.colors.surface;\n const innerPadding = padding ? padding : 12;\n return (React.createElement(Surface, { style: [{ elevation, backgroundColor }, styles] },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: { padding: innerPadding } },\n React.createElement(View, { style: { alignItems: textCentered ? \"center\" : \"flex-start\" } },\n title || (title && title !== \"\") ? (React.createElement(Title, { text: title, style: titleStyle })) : null,\n subtitle || (subtitle && subtitle !== \"\") ? (React.createElement(Subtitle, { text: subtitle, style: subtitleStyle })) : null,\n description || (description && description !== \"\") ? (React.createElement(View, { style: { marginTop: 4 } },\n React.createElement(Caption, { text: description, style: descriptionStyle }))) : null,\n children)),\n icon ? (React.createElement(TopRightCircleIcon, { Icon: Icon, icon: icon, onPress: onPressIcon })) : null)));\n};\nexport default withTheme(Card);\n"]}
|
|
@@ -21,8 +21,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const CardBlock = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
image = _Config.default.cardImageUrl,
|
|
@@ -62,11 +60,12 @@ const CardBlock = _ref => {
|
|
|
62
60
|
const rightDescriptionStyles = [typography.subtitle2, {
|
|
63
61
|
color: colors.light
|
|
64
62
|
}];
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
66
64
|
style: style,
|
|
67
65
|
onPress: onPress,
|
|
68
|
-
numColumns: numColumns
|
|
69
|
-
|
|
66
|
+
numColumns: numColumns,
|
|
67
|
+
...rest
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
70
69
|
style: {
|
|
71
70
|
backgroundColor: colors.background
|
|
72
71
|
}
|
|
@@ -118,5 +117,14 @@ const CardBlock = _ref => {
|
|
|
118
117
|
|
|
119
118
|
var _default = (0, _theming.withTheme)(CardBlock);
|
|
120
119
|
|
|
120
|
+
exports.default = _default;
|
|
121
|
+
//# sourceMappingURL=CardBlock.js.map }, leftDescription), rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
122
|
+
numberOfLines: 1,
|
|
123
|
+
style: rightDescriptionStyles
|
|
124
|
+
}, rightDescription) : null) : null));
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var _default = (0, _theming.withTheme)(CardBlock);
|
|
128
|
+
|
|
121
129
|
exports.default = _default;
|
|
122
130
|
//# sourceMappingURL=CardBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardBlock.
|
|
1
|
+
{"version":3,"sources":["CardBlock.js"],"names":["CardBlock","image","Config","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","React","createElement","Card","View","backgroundColor","background","Elevation","borderRadius","Image","source","uri","resizeMode","flexDirection","alignItems","justifyContent","marginTop","Text","numberOfLines","strong","body2","medium"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,SAAS,GAAG,QAAmN;AAAA,MAAlN;AAAEC,IAAAA,KAAK,GAAGC,gBAAOC,YAAjB;AAA+BC,IAAAA,KAA/B;AAAsCC,IAAAA,eAAtC;AAAuDC,IAAAA,gBAAvD;AAAyEC,IAAAA,aAAzE;AAAwFC,IAAAA,WAAW,GAAG,GAAtG;AAA2GC,IAAAA,SAAS,GAAG,CAAvH;AAA0HC,IAAAA,UAAU,GAAG,CAAvI;AAA0IC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA;AAArB,KAAjJ;AAAoLC,IAAAA,KAApL;AAA2LC,IAAAA,OAA3L;AAAoM,OAAGC;AAAvM,GAAkN;AACjO,MAAIC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AEb,MAAM,CAACmC;AAAhB,KAAnB;AAA3B,GAA1B,EAAqG1C,eAArG,CANe,EAOfC,gBAAgB,gBAAIqB,eAAMC,aAAN,CAAoBe,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoB7B,IAAAA,KAAK,EAAEQ;AAA3B,GAA1B,EAA+EjB,gBAA/E,CAAJ,GAAwG,IAPzG,CAAJ,GAOsH,IArBzI,CADI,CAAR;AAuBH,CA7CD;;eA8Ce,wBAAUN,SAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst CardBlock = ({ image = Config.cardImageUrl, title, leftDescription, rightDescription, titleCentered, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n let titleJustification;\n let titleStyle;\n if (titleCentered && !leftDescription && !rightDescription) {\n titleJustification = \"center\";\n }\n else {\n titleJustification = \"space-between\";\n }\n if (numColumns === 1) {\n titleStyle = typography.button;\n }\n else if (numColumns === 2) {\n titleStyle = typography.headline6;\n }\n else {\n titleStyle = typography.headline5;\n }\n const rightDescriptionStyles = [\n typography.subtitle2,\n { color: colors.light },\n ];\n return (React.createElement(Card, { style: style, onPress: onPress, numColumns: numColumns, ...rest },\n React.createElement(View, { style: { backgroundColor: colors.background } },\n React.createElement(Elevation, { style: { elevation, borderRadius: roundness } },\n React.createElement(Image, { style: {\n borderRadius: roundness,\n aspectRatio,\n }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" })),\n title ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: titleJustification,\n marginTop: numColumns === 3 ? 16 : 12,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [titleStyle, { color: colors.strong }] }, title),\n !leftDescription && rightDescription ? (React.createElement(Text, { style: rightDescriptionStyles }, rightDescription)) : null)) : null,\n leftDescription ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.body2, { color: colors.medium }] }, leftDescription),\n rightDescription ? (React.createElement(Text, { numberOfLines: 1, style: rightDescriptionStyles }, rightDescription)) : null)) : null)));\n};\nexport default withTheme(CardBlock);\n"]}
|
|
@@ -21,8 +21,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const CardContainerShortImage = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
image = _Config.default.squareImageUrl,
|
|
@@ -40,10 +38,11 @@ const CardContainerShortImage = _ref => {
|
|
|
40
38
|
onPress,
|
|
41
39
|
...rest
|
|
42
40
|
} = _ref;
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
44
42
|
style: style,
|
|
45
|
-
onPress: onPress
|
|
46
|
-
|
|
43
|
+
onPress: onPress,
|
|
44
|
+
...rest
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
47
46
|
style: {
|
|
48
47
|
elevation,
|
|
49
48
|
borderRadius: roundness
|
|
@@ -93,5 +92,19 @@ const CardContainerShortImage = _ref => {
|
|
|
93
92
|
|
|
94
93
|
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
95
94
|
|
|
95
|
+
exports.default = _default;
|
|
96
|
+
//# sourceMappingURL=CardContainerShortImage.js.mapteElement(_Image.default, {
|
|
97
|
+
style: {
|
|
98
|
+
aspectRatio
|
|
99
|
+
},
|
|
100
|
+
source: typeof image === "string" ? {
|
|
101
|
+
uri: image
|
|
102
|
+
} : image,
|
|
103
|
+
resizeMode: "cover"
|
|
104
|
+
}))));
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
108
|
+
|
|
96
109
|
exports.default = _default;
|
|
97
110
|
//# sourceMappingURL=CardContainerShortImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardContainerShortImage.
|
|
1
|
+
{"version":3,"sources":["CardContainerShortImage.js"],"names":["CardContainerShortImage","image","Config","squareImageUrl","title","subtitle","mode","aspectRatio","elevation","theme","colors","roundness","typography","style","onPress","rest","React","createElement","Card","Elevation","borderRadius","View","overflow","flexDirection","justifyContent","Image","source","uri","resizeMode","padding","backgroundColor","surface","flex","Text","numberOfLines","headline5","color","strong","body2","medium","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,uBAAuB,GAAG,QAA0K;AAAA,MAAzK;AAAEC,IAAAA,KAAK,GAAGC,gBAAOC,cAAjB;AAAiCC,IAAAA,KAAjC;AAAwCC,IAAAA,QAAxC;AAAkDC,IAAAA,IAAI,GAAG,MAAzD;AAAiEC,IAAAA,WAAW,GAAG,CAA/E;AAAkFC,IAAAA,SAAS,GAAG,CAA9F;AAAiGC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA;AAArB,KAAxG;AAA2IC,IAAAA,KAA3I;AAAkJC,IAAAA,OAAlJ;AAA2J,OAAGC;AAA9J,GAAyK;AACtM,sBAAQC,eAAMC,aAAN,CAAoBC,8BAApB,EAA0B;AAAEL,IAAAA,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,gBAAIW,eAAMC,aAAN,CAAoBgB,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrB,IAAAA,KAAK,EAAE,CACzDD,UAAU,CAAC0B,KAD8C,EAEzD;AAAEF,MAAAA,KAAK,EAAE1B,MAAM,CAAC6B,MAAhB;AAAwBC,MAAAA,SAAS,EAAE;AAAnC,KAFyD;AAA3B,GAA1B,EAGHnC,QAHG,CAAJ,GAGc,IAT1B,CAPJ,EAiBIC,IAAI,KAAK,OAAT,iBAAqBU,eAAMC,aAAN,CAAoBQ,cAApB,EAA2B;AAAEZ,IAAAA,KAAK,EAAE;AAAEN,MAAAA;AAAF,KAAT;AAA0BmB,IAAAA,MAAM,EAAE,OAAOzB,KAAP,KAAiB,QAAjB,GAA4B;AAAE0B,MAAAA,GAAG,EAAE1B;AAAP,KAA5B,GAA6CA,KAA/E;AAAsF2B,IAAAA,UAAU,EAAE;AAAlG,GAA3B,CAjBzB,CAJJ,CADI,CAAR;AAuBH,CAxBD;;eAyBe,wBAAU5B,uBAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst CardContainerShortImage = ({ image = Config.squareImageUrl, title, subtitle, mode = \"left\", aspectRatio = 1, elevation = 2, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n return (React.createElement(Card, { style: style, onPress: onPress, ...rest },\n React.createElement(Elevation, { style: {\n elevation,\n borderRadius: roundness,\n } },\n React.createElement(View, { style: {\n overflow: \"hidden\",\n flexDirection: \"row\",\n justifyContent: mode === \"right\" ? \"space-between\" : \"flex-start\",\n borderRadius: roundness,\n } },\n mode === \"left\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" })),\n React.createElement(View, { style: {\n padding: 16,\n backgroundColor: colors.surface,\n flex: 1,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.headline5, { color: colors.strong }] }, title),\n subtitle ? (React.createElement(Text, { numberOfLines: 1, style: [\n typography.body2,\n { color: colors.medium, marginTop: 4 },\n ] }, subtitle)) : null),\n mode === \"right\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }))))));\n};\nexport default withTheme(CardContainerShortImage);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardInline.
|
|
1
|
+
{"version":3,"sources":["CardInline.js"],"names":["CardInline","image","Config","cardImageUrl","title","subtitle","aspectRatio","elevation","style","titleStyle","subtitleStyle","onPress","alignItems","justifyContent","width","height","StyleSheet","flatten","imageStyles","React","createElement","Surface","Pressable","disabled","pressed","opacity","Image","source","uri","resizeMode","View","styles","overlay","Title","color","text","Subtitle","create","position","top","bottom","left","right","padding","backgroundColor"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAPA;AAQA,MAAMA,UAAU,GAAG,QAAoI;AAAA,MAAnI;AAAEC,IAAAA,KAAK,GAAGC,gBAAOC,YAAjB;AAA+BC,IAAAA,KAA/B;AAAsCC,IAAAA,QAAtC;AAAgDC,IAAAA,WAAW,GAAG,GAA9D;AAAmEC,IAAAA,SAAS,GAAG,CAA/E;AAAkFC,IAAAA,KAAlF;AAAyFC,IAAAA,UAAzF;AAAqGC,IAAAA,aAArG;AAAoHC,IAAAA;AAApH,GAAmI;;AACnJ,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA,cAAd;AAA8BC,IAAAA,KAA9B;AAAqCC,IAAAA;AAArC,MAAgDC,wBAAWC,OAAX,CAAmBT,KAAK,IAAI,EAA5B,CAAtD;;AACA,QAAMU,WAAW,GAAGJ,KAAK,IAAIC,MAAT,GAAkB;AAAED,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAlB,GAAsC;AAAET,IAAA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AAxC,CAAT;AAAiEyB,IAAAA,IAAI,EAAE9B;AAAvE,GAA9B,CAAJ,GAAwH,IAFpI,CARJ,CADI,CAAR;AAYH,CAfD;;AAgBA,MAAM0B,MAAM,GAAGf,wBAAWqB,MAAX,CAAkB;AAC7BL,EAAAA,OAAO,EAAE;AACLM,IAAAA,QAAQ,EAAE,UADL;AAELC,IAAAA,GAAG,EAAE,CAFA;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILC,IAAAA,IAAI,EAAE,CAJD;AAKLC,IAAAA,KAAK,EAAE,CALF;AAMLC,IAAAA,OAAO,EAAE,EANJ;AAOLC,IAAAA,eAAe,EAAE;AAPZ;AADoB,CAAlB,CAAf;;eAWe,wBAAU5C,UAAV,C","sourcesContent":["// @ts-nocheck\nimport React from \"react\";\nimport { Pressable, View, StyleSheet, } from \"react-native\";\nimport { Title, Subtitle } from \"./Typography\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport Config from \"./Config\";\nimport { withTheme } from \"../theming\";\nconst CardInline = ({ image = Config.cardImageUrl, title, subtitle, aspectRatio = 1.5, elevation = 2, style, titleStyle, subtitleStyle, onPress, }) => {\n const { alignItems, justifyContent, width, height } = StyleSheet.flatten(style || {});\n const imageStyles = width && height ? { width, height } : { aspectRatio };\n return (React.createElement(Surface, { style: [{ elevation }, style] },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Image, { style: imageStyles, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: [styles.overlay, { justifyContent, alignItems }] },\n title ? (React.createElement(Title, { style: [{ color: \"white\" }, titleStyle], text: title })) : null,\n subtitle ? (React.createElement(Subtitle, { style: [{ color: \"rgba(255, 255, 255, 0.7)\" }, subtitleStyle], text: subtitle })) : null))));\n};\nconst styles = StyleSheet.create({\n overlay: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n padding: 16,\n backgroundColor: \"rgba(0, 0, 0, 0.2)\",\n },\n});\nexport default withTheme(CardInline);\n"]}
|