@draftbit/core 43.7.1-bb1c39.0 → 43.7.1-c7d91d.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/Accordion/AccordionItem.js +21 -5
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.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/DeprecatedButton.js +4 -19
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +22 -5
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/package.json +2 -2
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
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 AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,5 +73,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;
|
|
77
|
+
//# sourceMappingURL=AccordionItem.js.map flexDirection: "row",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
paddingLeft: 8
|
|
80
|
+
},
|
|
81
|
+
item: {
|
|
82
|
+
marginVertical: 6,
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
content: {
|
|
86
|
+
flex: 1,
|
|
87
|
+
justifyContent: "center"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
92
|
+
|
|
77
93
|
exports.default = _default;
|
|
78
94
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.js"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","React","createElement","Pressable","styles","container","View","row","name","size","color","colors","primary","item","content","Text","selectable","StyleSheet","create","padding","flexDirection","alignItems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AS,EAAE;AACPc,IAAAA,OAAO,EAAE;AADF,GADkB;AAI7BZ,EAAAA,GAAG,EAAE;AACDa,IAAAA,aAAa,EAAE,KADd;AAEDC,IAAAA,UAAU,EAAE,QAFX;AAGDC,IAAAA,WAAW,EAAE;AAHZ,GAJwB;AAS7BT,EAAAA,IAAI,EAAE;AACFU,IAAAA,cAAc,EAAE,CADd;AAEFD,IAAAA,WAAW,EAAE;AAFX,GATuB;AAa7BR,EAAAA,OAAO,EAAE;AACLU,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,cAAc,EAAE;AAFX;AAboB,CAAlB,CAAf;;eAkBe,wBAAUlC,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Pressable, StyleSheet, View, } from \"react-native\";\nimport Text from \"../Text\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nconst AccordionItem = ({ Icon, icon, label, style, iconColor, theme, ...rest }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Pressable, { style: [styles.container, viewStyles], ...rest },\n React.createElement(View, { style: styles.row },\n icon ? (React.createElement(Icon, { name: icon, size: 24, color: iconColor || theme.colors.primary })) : null,\n React.createElement(View, { style: [styles.item, styles.content] },\n React.createElement(Text, { selectable: false, style: textStyles }, label)))));\n};\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -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"]}
|
|
@@ -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;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AAa,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"]}
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
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); }
|
|
29
|
+
|
|
28
30
|
const Button = _ref => {
|
|
29
31
|
let {
|
|
30
32
|
Icon,
|
|
@@ -126,7 +128,7 @@ const Button = _ref => {
|
|
|
126
128
|
alignSelf: "stretch",
|
|
127
129
|
...margins
|
|
128
130
|
}
|
|
129
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
130
132
|
onPress: onPress,
|
|
131
133
|
accessibilityState: {
|
|
132
134
|
disabled
|
|
@@ -134,7 +136,7 @@ const Button = _ref => {
|
|
|
134
136
|
accessibilityRole: "button",
|
|
135
137
|
disabled: disabled || loading,
|
|
136
138
|
style: [styles.button, buttonStyle, innerStyles]
|
|
137
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
138
140
|
style: styles.content
|
|
139
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: iconStyle
|
|
@@ -169,22 +171,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
169
171
|
|
|
170
172
|
var _default = (0, _theming.withTheme)(Button);
|
|
171
173
|
|
|
172
|
-
exports.default = _default;
|
|
173
|
-
//# sourceMappingURL=DeprecatedButton.js.map
|
|
174
|
-
minWidth: 64,
|
|
175
|
-
borderStyle: "solid"
|
|
176
|
-
},
|
|
177
|
-
content: {
|
|
178
|
-
flexDirection: "row",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
justifyContent: "center"
|
|
181
|
-
},
|
|
182
|
-
icon: {
|
|
183
|
-
width: _Config.default.buttonIconSize
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
188
|
-
|
|
189
174
|
exports.default = _default;
|
|
190
175
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedButton.
|
|
1
|
+
{"version":3,"sources":["DeprecatedButton.tsx"],"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","alignSelf","button","content","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAqDA,MAAMA,MAAuB,GAAG,QAc1B;AAAA,MAd2B;AAC/BC,IAAAA,IAD+B;AAE/BC,IAAAA,IAF+B;AAG/BC,IAAAA,QAAQ,GAAG,KAHoB;AAI/BC,IAAAA,IAAI,GAAG,OAJwB;AAK/BC,IAAAA,OAAO,GAAG,KALqB;AAM/BC,IAAAA,UAN+B;AAO/BC,IAAAA,KAAK,EAAEC,aAPwB;AAQ/BC,IAAAA,QAR+B;AAS/BC,IAAAA,OAT+B;AAU/BC,IAAAA,SAAS,GAAG,CAVmB;AAW/BC,IAAAA,KAX+B;AAY/BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAZwB;AAa/B,OAAGC;AAb4B,GAc3B;AACJ,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AAEA,MAAIpB,IAAI,KAAK,OAAb,EAAsB;AACpBe,IAAAA,eAAe,GAAGI,WAAlB;;AAEA,QAAIpB,QAAJ,EAAc;AACZkB,MAAAA,SAAS,GAAG,oBAAMP,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;AACD,KAFD,MAEO;AACLP,MAAAA,SAAS,GAAGf,UAAU,IAAIQ,MAAM,CAACW,OAAjC;AACD;AACF,GARD,MAQO;AACLN,IAAAA,eAAe,GAAG,aAAlB;;AAEA,QAAIhB,QAAJ,EAAc;AACZkB,MAAAA,SAAS,GAAG,oBAAME,WAAN,EAAmBG,KAAnB,CAAyBX,eAAzB,EAA0C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AGT,wBAAWyB,MAAX,CAAkB;AAC/BF,EAAAA,MAAM,EAAE;AACNG,IAAAA,QAAQ,EAAE,EADJ;AAENC,IAAAA,WAAW,EAAE;AAFP,GADuB;AAK/BH,EAAAA,OAAO,EAAE;AACPI,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GALsB;AAU/BzD,EAAAA,IAAI,EAAE;AACJuC,IAAAA,KAAK,EAAEC,gBAAOC;AADV;AAVyB,CAAlB,CAAf;;eAee,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n Text,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A button is component that the user can press to trigger an action.\n *\n * <div class=\"screenshots\">\n * <figure>\n * <img src=\"screenshots/button-1.png\" />\n * <figcaption>Text button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-2.png\" />\n * <figcaption>Outlined button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-3.png\" />\n * <figcaption>Contained button</figcaption>\n * </figure>\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Button } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <Button icon=\"add-a-photo\" type=\"solid\" onPress={() => console.log('Pressed')}>\n * Press me\n * </Button>\n * );\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"outline\" | \"text\";\n loading?: boolean;\n icon?: string;\n labelColor?: string;\n color?: string;\n children?: React.ReactNode;\n onPress: () => void;\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst Button: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n labelColor,\n color: colorOverride,\n children,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n\n const {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n ...innerStyles\n } = StyleSheet.flatten(style || {});\n\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n\n return (\n <Elevation style={{ elevation, alignSelf: \"stretch\", ...margins }}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={[styles.button, buttonStyle, innerStyles]}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {children}\n </Text>\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\n\nexport default withTheme(Button);\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
5
3
|
import Text from "../Text";
|
|
@@ -20,9 +18,10 @@ const AccordionItem = _ref => {
|
|
|
20
18
|
textStyles,
|
|
21
19
|
viewStyles
|
|
22
20
|
} = extractStyles(style);
|
|
23
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
24
|
-
style: [styles.container, viewStyles]
|
|
25
|
-
|
|
21
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
22
|
+
style: [styles.container, viewStyles],
|
|
23
|
+
...rest
|
|
24
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
26
25
|
style: styles.row
|
|
27
26
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
28
27
|
name: icon,
|
|
@@ -55,4 +54,22 @@ const styles = StyleSheet.create({
|
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
export default withTheme(AccordionItem);
|
|
57
|
+
//# sourceMappingURL=AccordionItem.js.map container: {
|
|
58
|
+
padding: 8
|
|
59
|
+
},
|
|
60
|
+
row: {
|
|
61
|
+
flexDirection: "row",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
paddingLeft: 8
|
|
64
|
+
},
|
|
65
|
+
item: {
|
|
66
|
+
marginVertical: 6,
|
|
67
|
+
paddingLeft: 8
|
|
68
|
+
},
|
|
69
|
+
content: {
|
|
70
|
+
flex: 1,
|
|
71
|
+
justifyContent: "center"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export default withTheme(AccordionItem);
|
|
58
75
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.js"],"names":["React","Pressable","StyleSheet","View","Text","extractStyles","withTheme","AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","createElement","styles","container","row","name","size","color","colors","primary","item","content","selectable","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,EAAoBC,UAApB,EAAgCC,IAAhC,QAA6C,cAA7C;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,SAAT,QAA0B,eAA1B;;AACA,MAAMC,aAAa,GAAG,QAA6D;AAAA,MAA5D;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA,KAArB;AAA4BC,IAAAA,SAA5B;AAAuCC,IAAAA,KAAvC;AAA8C,OAAGC;AAAjD,GAA4D;AAC/E,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BX,aAAa,CAACM,KAAD,CAAhD;AACA,sBAAQX,KAAK,CAACiB,aAAN,CAAoBhB,SAApB,EAA+B;AA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AACC,aAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Pressable, StyleSheet, View, } from \"react-native\";\nimport Text from \"../Text\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nconst AccordionItem = ({ Icon, icon, label, style, iconColor, theme, ...rest }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Pressable, { style: [styles.container, viewStyles], ...rest },\n React.createElement(View, { style: styles.row },\n icon ? (React.createElement(Icon, { name: icon, size: 24, color: iconColor || theme.colors.primary })) : null,\n React.createElement(View, { style: [styles.item, styles.content] },\n React.createElement(Text, { selectable: false, style: textStyles }, label)))));\n};\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(AccordionItem);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.7.1-
|
|
3
|
+
"version": "43.7.1-c7d91d.0+c7d91dbf",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "c7d91dbf17f237abe51487607e970bac15a62c6e"
|
|
84
84
|
}
|