@draftbit/core 43.7.1-c7d91d.0 → 43.7.2-3ba37d.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.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js +3 -11
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +5 -22
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/hooks.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcL,KAAd,CAAnC;AACA,sBACE,oBAAC,sBAAD;AAAW,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBF,UAAnB;AAAlB,KAAsDF,IAAtD,gBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACE;AAApB,KACGV,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAE,EAFR;AAGE,IAAA,KAAK,EAAEG,SAAS,IAAIC,KAAK,CAACO,MAAN,CAAaC;AAHnC,IADG,GAMD,IAPN,eAQE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACJ,MAAM,CAACK,IAAR,EAAcL,MAAM,CAACM,OAArB;AAAb,kBACE,oBAAC,aAAD;AAAM,IAAA,UAAU,EAAE,KAAlB;AAAyB,IAAA,KAAK,EAAER;AAAhC,KACGL,KADH,CADF,CARF,CADF,CADF;AAkBD,CA5BD;;AA8BA,MAAMO,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,OAAO,EAAE;AADA,GADoB;AAI/BP,EAAAA,GAAG,EAAE;AACHQ,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE,QAFT;AAGHC,IAAAA,WAAW,EAAE;AAHV,GAJ0B;AAS/BP,EAAAA,IAAI,EAAE;AACJQ,IAAAA,cAAc,EAAE,CADZ;AAEJD,IAAAA,WAAW,EAAE;AAFT,GATyB;AAa/BN,EAAAA,OAAO,EAAE;AACPQ,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;;eAmBe,wBAAUzB,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\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});\n\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetCancel.
|
|
1
|
+
{"version":3,"sources":["ActionSheetCancel.tsx"],"names":["ActionSheetCancel","label","color","style","onPress"],"mappings":";;;;;;;AAAA;;AAEA;;;;AASA,MAAMA,iBAAkC,GAAG,QAKrC;AAAA,MALsC;AAC1CC,IAAAA,KAAK,GAAG,QADkC;AAE1CC,IAAAA,KAF0C;AAG1CC,IAAAA,KAH0C;AAI1CC,IAAAA;AAJ0C,GAKtC;AACJ,sBACE,6BAAC,wBAAD;AACE,IAAA,KAAK,EAAEH,KADT;AAEE,IAAA,KAAK,EAAEC,KAAK,IAAI,SAFlB;AAGE,IAAA,KAAK,EAAE,CAACC,KAAD,CAHT;AAIE,IAAA,OAAO,EAAEC;AAJX,IADF;AAQD,CAdD;;eAgBeJ,iB","sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<Props> = ({\n label = \"Cancel\",\n color,\n style,\n onPress,\n}) => {\n return (\n <ActionSheetItem\n label={label}\n color={color || \"#FF453A\"}\n style={[style]}\n onPress={onPress}\n />\n );\n};\n\nexport default ActionSheetCancel;\n"]}
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
|
|
21
23
|
|
|
22
24
|
const AnimatedCircularProgress = _ref => {
|
|
@@ -67,17 +69,7 @@ const AnimatedCircularProgress = _ref => {
|
|
|
67
69
|
React.useEffect(() => {
|
|
68
70
|
animate();
|
|
69
71
|
}, [fill, animate]);
|
|
70
|
-
return /*#__PURE__*/React.createElement(AnimatedProgress, {
|
|
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, {
|
|
72
|
+
return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
81
73
|
style: other.style,
|
|
82
74
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
83
75
|
fill: fillAnimation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AnimatedCircularProgress.
|
|
1
|
+
{"version":3,"sources":["AnimatedCircularProgress.tsx"],"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","style","childrenContainerStyle"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;;;;;;;;;AAGA,MAAMA,gBAAgB,GAAGC,sBAASC,uBAAT,CAAiCC,yBAAjC,CAAzB;;AAWA,MAAMC,wBAAyC,GAAG,QAU5C;AAAA,MAV6C;AACjDC,IAAAA,QAAQ,GAAG,GADsC;AAEjDC,IAAAA,MAAM,GAAGC,oBAAOC,GAAP,CAAWD,oBAAOE,IAAlB,CAFwC;AAGjDC,IAAAA,IAHiD;AAIjDC,IAAAA,OAAO,GAAG,CAJuC;AAKjDC,IAAAA,eAAe,GAAG,KAL+B;AAMjDC,IAAAA,kBANiD;AAOjDC,IAAAA,mBAPiD;AAQjDC,IAAAA,SAAS,GAAG,OARqC;AASjD,OAAGC;AAT8C,GAU7C;AACJ,QAAM,CAACC,aAAD,IAAkBC,KAAK,CAACC,QAAN,CACtB,IAAIlB,sBAASmB,KAAb,CAAmBT,OAAnB,CADsB,CAAxB;AAIA,QAAMU,OAAO,GAAGH,KAAK,CAACI,WAAN,CACd,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AK,CAACuB,sBAJV;AAQE,IAAA,IAAI,EAAEtB,aARR;AASE,IAAA,SAAS,EAAEe,YAAY;AATzB,KADF;AAaD,CA5ED;;eA8Ee5B,wB","sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n Easing,\n EasingFunction,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport CircularProgress, {\n Props as CircularProgressProps,\n} from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\n\ntype Props = {\n duration?: number;\n easing?: EasingFunction;\n prefill?: number;\n useNativeDriver?: boolean;\n tintColorSecondary?: string;\n onAnimationComplete?: Animated.EndCallback | undefined;\n} & CircularProgressProps;\n\nconst AnimatedCircularProgress: React.FC<Props> = ({\n duration = 500,\n easing = Easing.out(Easing.ease),\n fill,\n prefill = 0,\n useNativeDriver = false,\n tintColorSecondary,\n onAnimationComplete,\n tintColor = \"black\",\n ...other\n}) => {\n const [fillAnimation] = React.useState<Animated.Value>(\n new Animated.Value(prefill)\n );\n\n const animate = React.useCallback(\n (\n toVal: number = -1,\n dur?: number,\n ease?: EasingFunction\n ): Animated.CompositeAnimation => {\n const toValue = toVal >= 0 ? toVal : fill;\n const dura = dur || duration;\n const eas = ease || easing;\n const useNative = useNativeDriver;\n\n const anim = Animated.timing(fillAnimation, {\n useNativeDriver: useNative,\n toValue,\n easing: eas,\n duration: dura,\n });\n anim.start(onAnimationComplete);\n\n return anim;\n },\n [\n duration,\n easing,\n fill,\n useNativeDriver,\n fillAnimation,\n onAnimationComplete,\n ]\n );\n\n const animateColor = () => {\n if (!tintColorSecondary) {\n return tintColor;\n }\n\n const tintAnimation = fillAnimation.interpolate({\n inputRange: [0, 100],\n outputRange: [tintColor, tintColorSecondary],\n });\n\n return tintAnimation;\n };\n\n React.useEffect(() => {\n animate();\n }, [fill, animate]);\n\n return (\n <AnimatedProgress\n {...other}\n style={other.style as Animated.WithAnimatedValue<StyleProp<ViewStyle>>}\n childrenContainerStyle={\n other.childrenContainerStyle as Animated.WithAnimatedValue<\n StyleProp<ViewStyle>\n >\n }\n fill={fillAnimation}\n tintColor={animateColor()}\n />\n );\n};\n\nexport default AnimatedCircularProgress;\n"]}
|
|
@@ -25,8 +25,6 @@ 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
|
-
|
|
30
28
|
const Button = _ref => {
|
|
31
29
|
let {
|
|
32
30
|
Icon,
|
|
@@ -128,7 +126,7 @@ const Button = _ref => {
|
|
|
128
126
|
alignSelf: "stretch",
|
|
129
127
|
...margins
|
|
130
128
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
132
130
|
onPress: onPress,
|
|
133
131
|
accessibilityState: {
|
|
134
132
|
disabled
|
|
@@ -136,7 +134,7 @@ const Button = _ref => {
|
|
|
136
134
|
accessibilityRole: "button",
|
|
137
135
|
disabled: disabled || loading,
|
|
138
136
|
style: [styles.button, buttonStyle, innerStyles]
|
|
139
|
-
}
|
|
137
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
138
|
style: styles.content
|
|
141
139
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: iconStyle
|
|
@@ -171,5 +169,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
171
169
|
|
|
172
170
|
var _default = (0, _theming.withTheme)(Button);
|
|
173
171
|
|
|
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
|
+
|
|
174
189
|
exports.default = _default;
|
|
175
190
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedButton.
|
|
1
|
+
{"version":3,"sources":["DeprecatedButton.js"],"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","React","createElement","Elevation","alignSelf","Touchable","accessibilityState","accessibilityRole","button","View","content","name","size","ActivityIndicator","Text","numberOfLines","create","minWidth","borderStyle","flexDirection","alignItems","justifyCont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;AAA1C,GAAvC,CAAJ,GAAqG,IAHhH,eAIIc,KAAK,CAACC,aAAN,CAAoBY,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrD,IAAAA,KAAK,EAAE,CAACqB,SAAD,EAAYhB,UAAU,CAACyC,MAAvB;AAA3B,GAA1B,EAAuFjD,QAAvF,CAJJ,CADJ,CADI,CAAR;AAOH,CAxED;;AAyEA,MAAM6B,MAAM,GAAGT,wBAAWqC,MAAX,CAAkB;AAC7BR,EAAAA,MAAM,EAAE;AACJS,IAAAA,QAAQ,EAAE,EADN;AAEJC,IAAAA,WAAW,EAAE;AAFT,GADqB;AAK7BR,EAAAA,OAAO,EAAE;AACLS,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GALoB;AAU7BrE,EAAAA,IAAI,EAAE;AACFuC,IAAAA,KAAK,EAAEC,gBAAOC;AADZ;AAVuB,CAAlB,CAAf;;eAce,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, Text, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst Button = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, labelColor, color: colorOverride, children, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n const { margin, marginEnd, marginTop, marginLeft, marginRight, marginBottom, marginHorizontal, marginVertical, ...innerStyles } = StyleSheet.flatten(style || {});\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n return (React.createElement(Elevation, { style: { elevation, alignSelf: \"stretch\", ...margins } },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: [styles.button, buttonStyle, innerStyles] },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, children)))));\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});\nexport default withTheme(Button);\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 { Pressable, StyleSheet, View } from "react-native";
|
|
3
5
|
import Text from "../Text";
|
|
@@ -18,10 +20,9 @@ const AccordionItem = _ref => {
|
|
|
18
20
|
textStyles,
|
|
19
21
|
viewStyles
|
|
20
22
|
} = extractStyles(style);
|
|
21
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
22
|
-
style: [styles.container, viewStyles]
|
|
23
|
-
|
|
24
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
23
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
24
|
+
style: [styles.container, viewStyles]
|
|
25
|
+
}, rest), /*#__PURE__*/React.createElement(View, {
|
|
25
26
|
style: styles.row
|
|
26
27
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
27
28
|
name: icon,
|
|
@@ -54,22 +55,4 @@ const styles = StyleSheet.create({
|
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
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);
|
|
75
58
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["React","Pressable","StyleSheet","View","Text","extractStyles","withTheme","AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,SADF,EAEEC,UAFF,EAGEC,IAHF,QAMO,cANP;AAQA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,SAAT,QAA0B,eAA1B;;AAWA,MAAMC,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BX,aAAa,CAACM,KAAD,CAAhD;AACA,sBACE,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBF,UAAnB;AAAlB,KAAsDF,IAAtD,gBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACE;AAApB,KACGV,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAE,EAFR;AAGE,IAAA,KAAK,EAAEG,SAAS,IAAIC,KAAK,CAACO,MAAN,CAAaC;AAHnC,IADG,GAMD,IAPN,eAQE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACJ,MAAM,CAACK,IAAR,EAAcL,MAAM,CAACM,OAArB;AAAb,kBACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAE,KAAlB;AAAyB,IAAA,KAAK,EAAER;AAAhC,KACGL,KADH,CADF,CARF,CADF,CADF;AAkBD,CA5BD;;AA8BA,MAAMO,MAAM,GAAGf,UAAU,CAACsB,MAAX,CAAkB;AAC/BN,EAAAA,SAAS,EAAE;AACTO,IAAAA,OAAO,EAAE;AADA,GADoB;AAI/BN,EAAAA,GAAG,EAAE;AACHO,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE,QAFT;AAGHC,IAAAA,WAAW,EAAE;AAHV,GAJ0B;AAS/BN,EAAAA,IAAI,EAAE;AACJO,IAAAA,cAAc,EAAE,CADZ;AAEJD,IAAAA,WAAW,EAAE;AAFT,GATyB;AAa/BL,EAAAA,OAAO,EAAE;AACPO,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;AAmBA,eAAezB,SAAS,CAACC,aAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\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});\n\nexport default withTheme(AccordionItem);\n"]}
|
package/lib/module/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["hooks.
|
|
1
|
+
{"version":3,"sources":["hooks.js"],"names":["React","usePrevious","value","ref","useRef","useEffect","current"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAO,SAASC,WAAT,CAAqBC,KAArB,EAA4B;AAC/B;AACA;AACA,QAAMC,GAAG,GAAGH,KAAK,CAACI,MAAN,EAAZ,CAH+B,CAI/B;;AACAJ,EAAAA,KAAK,CAACK,SAAN,CAAgB,MAAM;AAClBF,IAAAA,GAAG,CAACG,OAAJ,GAAcJ,KAAd;AACH,GAFD,EAEG,CAACA,KAAD,CAFH,EAL+B,CAQ/B;;AACA,SAAOC,GAAG,CAACG,OAAX;AACH","sourcesContent":["import React from \"react\";\nexport function usePrevious(value) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.7.
|
|
3
|
+
"version": "43.7.2-3ba37d.0+3ba37d87",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^43.
|
|
44
|
+
"@draftbit/types": "^43.7.2-3ba37d.0+3ba37d87",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.1.7",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "3ba37d87413de6ca18bf358b5726750ce2076be4"
|
|
84
84
|
}
|