@draftbit/core 43.7.1-c7d91d.0 → 43.7.2-0fdea1.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.
@@ -21,6 +21,8 @@ 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
+
24
26
  const AccordionItem = _ref => {
25
27
  let {
26
28
  Icon,
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
35
37
  textStyles,
36
38
  viewStyles
37
39
  } = (0, _utilities.extractStyles)(style);
38
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
39
- style: [styles.container, viewStyles],
40
- ...rest
41
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
40
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
41
+ style: [styles.container, viewStyles]
42
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
42
43
  style: styles.row
43
44
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
44
45
  name: icon,
@@ -73,22 +74,5 @@ const styles = _reactNative.StyleSheet.create({
73
74
 
74
75
  var _default = (0, _theming.withTheme)(AccordionItem);
75
76
 
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
-
93
77
  exports.default = _default;
94
78
  //# sourceMappingURL=AccordionItem.js.map
@@ -1 +1 @@
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","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,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,MAA6B,8BAAcL,KAAd,CAAnC;AACA,sBAAQM,KAAK,CAACC,aAAN,CAAoBC,sBAApB,EAA+B;AAAER,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACC,SAAR,EAAmBL,UAAnB,CAAT;AAAyC,OAAGF;AAA5C,GAA/B,eACJG,KAAK,CAACC,aAAN,CAAoBI,iBAApB,EAA0B;AAAEX,IAAAA,KAAK,EAAES,MAAM,CAACG;AAAhB,GAA1B,EACId,IAAI,gBAAIQ,KAAK,CAACC,aAAN,CAAoBV,IAApB,EAA0B;AAAEgB,IAAAA,IAAI,EAAEf,IAAR;AAAcgB,IAAAA,IAAI,EAAE,EAApB;AAAwBC,IAAAA,KAAK,EAAEd,SAAS,IAAIC,KAAK,CAACc,MAAN,CAAaC;AAAzD,GAA1B,CAAJ,GAAqG,IAD7G,eAEIX,KAAK,CAACC,aAAN,CAAoBI,iBAApB,EAA0B;AAAEX,IAAAA,KAAK,EAAE,CAACS,MAAM,CAACS,IAAR,EAAcT,MAAM,CAACU,OAArB;AAAT,GAA1B,eACIb,KAAK,CAACC,aAAN,CAAoBa,aAApB,EAA0B;AAAEC,IAAAA,UAAU,EAAE,KAAd;AAAqBrB,IAAAA,KAAK,EAAEI;AAA5B,GAA1B,EAAoEL,KAApE,CADJ,CAFJ,CADI,CAAR;AAKH,CAPD;;AAQA,MAAMU,MAAM,GAAGa,wBAAWC,MAAX,CAAkB;AAC7Bb,EAAAA,SAAS,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
+ {"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.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
+ {"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, { ...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, {
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.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;AAC3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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"]}
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,YAIkC;AAAA,QAHhCC,KAGgC,uEAHhB,CAAC,CAGe;AAAA,QAFhCC,GAEgC;AAAA,QADhCf,IACgC;AAChC,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;;AAEA,UAAMiB,IAAI,GAAG5B,sBAAS6B,MAAT,CAAgBb,aAAhB,EAA+B;AAC1CL,MAAAA,eAAe,EAAEgB,SADyB;AAE1CH,MAAAA,OAF0C;AAG1CnB,MAAAA,MAAM,EAAEqB,GAHkC;AAI1CtB,MAAAA,QAAQ,EAAEqB;AAJgC,KAA/B,CAAb;;AAMAG,IAAAA,IAAI,CAACE,KAAL,CAAWjB,mBAAX;AAEA,WAAOe,IAAP;AACD,GApBa,EAqBd,CACExB,QADF,EAEEC,MAFF,EAGEI,IAHF,EAIEE,eAJF,EAKEK,aALF,EAMEH,mBANF,CArBc,CAAhB;;AA+BA,QAAMkB,YAAY,GAAG,MAAM;AACzB,QAAI,CAACnB,kBAAL,EAAyB;AACvB,aAAOE,SAAP;AACD;;AAED,UAAMkB,aAAa,GAAGhB,aAAa,CAACiB,WAAd,CAA0B;AAC9CC,MAAAA,UAAU,EAAE,CAAC,CAAD,EAAI,GAAJ,CADkC;AAE9CC,MAAAA,WAAW,EAAE,CAACrB,SAAD,EAAYF,kBAAZ;AAFiC,KAA1B,CAAtB;AAKA,WAAOoB,aAAP;AACD,GAXD;;AAaAf,EAAAA,KAAK,CAACmB,SAAN,CAAgB,MAAM;AACpBhB,IAAAA,OAAO;AACR,GAFD,EAEG,CAACX,IAAD,EAAOW,OAAP,CAFH;AAIA,sBACE,oBAAC,gBAAD,eACML,KADN;AAEE,IAAA,KAAK,EAAEA,KAAK,CAACsB,KAFf;AAGE,IAAA,sBAAsB,EACpBtB,KAAK,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, _extends({}, rest, {
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
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
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.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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IADF,CADD,GAQG,IATN,EAUGhB,OAAO,gBACN,oBAAC,8BAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,KAAK,EAAEgB,SAFT;AAGE,IAAA,KAAK,EAAEgB;AAHT,IADM,GAMJ,IAhBN,eAiBE,oBAAC,iBAAD;AAAM,IAAA,aAAa,EAAE,CAArB;AAAwB,IAAA,KAAK,EAAE,CAACJ,SAAD,EAAYhB,UAAU,CAACmC,MAAvB;AAA/B,KACG3C,QADH,CAjBF,CARF,CADF,CADF;AAkCD,CAhID;;AAkIA,MAAM6B,MAAM,GAAGT,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
+ {"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","just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EyB;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"]}
@@ -110,6 +110,18 @@ const SEED_DATA = {
110
110
  label: "Loading BG Color",
111
111
  description: "Color of the background to show while the map is loading"
112
112
  }),
113
+ showUserLocation: (0, _types.createBoolProp)({
114
+ label: "Show User Location",
115
+ description: "Whether to request and show the user's location on the map",
116
+ required: false,
117
+ defaultValue: null
118
+ }),
119
+ moveMapToUser: (0, _types.createBoolProp)({
120
+ label: "Move Map to User",
121
+ description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
122
+ required: false,
123
+ defaultValue: null
124
+ }),
113
125
  apiKey: (0, _types.createTextProp)({
114
126
  defaultValue: process.env.GOOGLE_MAPS_API_KEY,
115
127
  editable: false
@@ -1 +1 @@
1
- {"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","flex","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,WAAW,EAAE,YAJU;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KALH;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE;AADA,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAEC,kBAAWC,SADb;AAERC,MAAAA,QAAQ,EAAEC,kBAAWC,MAFb;AAGRC,MAAAA,QAAQ,EAAE,IAHF;AAIRC,MAAAA,KAAK,EAAEC,cAAOC,KAJN;AAKRC,MAAAA,KAAK,EAAE,UALC;AAMRlB,MAAAA,WAAW,EAAE,mBANL;AAORmB,MAAAA,QAAQ,EAAE,KAPF;AAQRC,MAAAA,YAAY,EAAE,IARN;AASRC,MAAAA,OAAO,EAAE,CAAC,QAAD;AATD,KADL;AAYLC,I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AY,EAAE;AANe,KAAf,CAtFX;AA8FLe,IAAAA,qBAAqB,EAAE,4BAAgB;AACrCjB,MAAAA,KAAK,EAAE,yBAD8B;AAErClB,MAAAA,WAAW,EAAE;AAFwB,KAAhB,CA9FlB;AAkGLoC,IAAAA,sBAAsB,EAAE,4BAAgB;AACtClB,MAAAA,KAAK,EAAE,kBAD+B;AAEtClB,MAAAA,WAAW,EAAE;AAFyB,KAAhB,CAlGnB;AAsGLqC,IAAAA,MAAM,EAAE,2BAAe;AACrBjB,MAAAA,YAAY,EAAEkB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB1B,MAAAA,QAAQ,EAAE;AAFW,KAAf;AAtGH;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","flex","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","showUserLocation","moveMapToUser","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA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B;AAI5BmB,MAAAA,QAAQ,EAAE,KAJkB;AAK5BC,MAAAA,YAAY,EAAE;AALc,KAAf,CA5GV;AAmHLmB,IAAAA,MAAM,EAAE,2BAAe;AACrBnB,MAAAA,YAAY,EAAEoB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB5B,MAAAA,QAAQ,EAAE;AAFW,KAAf;AAnHH;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n showUserLocation: createBoolProp({\n label: \"Show User Location\",\n description: \"Whether to request and show the user's location on the map\",\n required: false,\n defaultValue: null,\n }),\n moveMapToUser: createBoolProp({\n label: \"Move Map to User\",\n description:\n \"Whether to set the map region to the user's location. Overrides latitude and longitude.\",\n required: false,\n defaultValue: null,\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Switch.ts"],"names":["SEED_DATA_TRIGGERS","Triggers","OnValueChange","SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","props","disabled","label","description","fieldName","handlerPropName","valuePropName","defaultValue","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","marginLeft","marginRight","required","direction","group","GROUPS","data"],"mappings":";;;;;;;AAAA;;AAUA,MAAMA,kBAAkB,GAAG,CAACC,gBAASC,aAAV,CAA3B;AACO,MAAMC,SAAS,GAAG,CACvB;AAC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,EAAE;AAJM,KAAf,CADF;AAOLQ,IAAAA,SAAS,EAAE,oCAPN;AAQLd,IAAAA,QAAQ,EAAE,2BAAe;AACvBC,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,WAAW,EAAE,wCAFU;AAGvBa,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAf,CARL;AAaLd,IAAAA,SAAS,EAAE,gCAAoB;AAC7BC,MAAAA,eAAe,EAAE,eADY;AAE7BC,MAAAA,aAAa,EAAE,OAFc;AAG7BC,MAAAA,YAAY,EAAE;AAHe,KAApB,CAbN;AAkBLC,IAAAA,gBAAgB,EAAE,4BAAgB;AAChCN,MAAAA,KAAK,EAAE;AADyB,KAAhB,CAlBb;AAqBLO,IAAAA,kBAAkB,EAAE,4BAAgB;AAClCP,MAAAA,KAAK,EAAE;AAD2B,KAAhB,CArBf;AAwBLQ,IAAAA,gBAAgB,EAAE,4BAAgB;AAChCR,MAAAA,KAAK,EAAE;AADyB,KAAhB,CAxBb;AA2BLS,IAAAA,kBAAkB,EAAE,4BAAgB;AAClCT,MAAAA,KAAK,EAAE;AAD2B,KAAhB;AA3Bf;AATT,CA/BuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n GROUPS,\n createBoolProp,\n createColorProp,\n createFieldNameProp,\n createTextProp,\n createRowDirectionProp,\n Triggers,\n} from \"@draftbit/types\";\nconst SEED_DATA_TRIGGERS = [Triggers.OnValueChange];\nexport const SEED_DATA = [\n {\n name: \"Switch\",\n tag: \"Switch\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: SEED_DATA_TRIGGERS,\n props: {\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n {\n name: \"Switch Row\",\n tag: \"SwitchRow\",\n category: COMPONENT_TYPES.input,\n layout: {\n marginLeft: 0,\n marginRight: 0,\n },\n triggers: SEED_DATA_TRIGGERS,\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the checkbox\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createRowDirectionProp(),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n group: GROUPS.data,\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n];\n"]}
1
+ {"version":3,"sources":["Switch.js"],"names":["SEED_DATA_TRIGGERS","Triggers","OnValueChange","SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","props","disabled","label","description","fieldName","handlerPropName","valuePropName","defaultValue","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","marginLeft","marginRight","required","direction","group","GROUPS","data"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,kBAAkB,GAAG,CAACC,gBAASC,aAAV,CAA3B;AACO,MAAMC,SAAS,GAAG,CACrB;AACIC,EAAAA,IAAI,EAAE,QADV;AAEIC,EAAAA,GAAG,EAAE,QAFT;AAGIC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAH9B;AAIIC,EAAAA,MAAM,EAAE,EAJZ;AAKIC,EAAAA,QAAQ,EAAEV,kBALd;AAMIW,EAAAA,KAAK,EAAE;AACHC,IAAAA,QAAQ,EAAE,2BAA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SAAS,EAAE,gCAAoB;AAC3BC,MAAAA,eAAe,EAAE,eADU;AAE3BC,MAAAA,aAAa,EAAE,OAFY;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAApB,CAbR;AAkBHC,IAAAA,gBAAgB,EAAE,4BAAgB;AAC9BN,MAAAA,KAAK,EAAE;AADuB,KAAhB,CAlBf;AAqBHO,IAAAA,kBAAkB,EAAE,4BAAgB;AAChCP,MAAAA,KAAK,EAAE;AADyB,KAAhB,CArBjB;AAwBHQ,IAAAA,gBAAgB,EAAE,4BAAgB;AAC9BR,MAAAA,KAAK,EAAE;AADuB,KAAhB,CAxBf;AA2BHS,IAAAA,kBAAkB,EAAE,4BAAgB;AAChCT,MAAAA,KAAK,EAAE;AADyB,KAAhB;AA3BjB;AATX,CA/BqB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, GROUPS, createBoolProp, createColorProp, createFieldNameProp, createTextProp, createRowDirectionProp, Triggers, } from \"@draftbit/types\";\nconst SEED_DATA_TRIGGERS = [Triggers.OnValueChange];\nexport const SEED_DATA = [\n {\n name: \"Switch\",\n tag: \"Switch\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: SEED_DATA_TRIGGERS,\n props: {\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n {\n name: \"Switch Row\",\n tag: \"SwitchRow\",\n category: COMPONENT_TYPES.input,\n layout: {\n marginLeft: 0,\n marginRight: 0,\n },\n triggers: SEED_DATA_TRIGGERS,\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the checkbox\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createRowDirectionProp(),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n group: GROUPS.data,\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n];\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
- ...rest
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.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;AAAEU,IAAAA,KAAK,EAAE,CAACO,MAAM,CAACC,SAAR,EAAmBH,UAAnB,CAAT;AAAyC,OAAGF;AAA5C,GAA/B,eACJd,KAAK,CAACiB,aAAN,CAAoBd,IAApB,EAA0B;AAAEQ,IAAAA,KAAK,EAAEO,MAAM,CAACE;AAAhB,GAA1B,EACIX,IAAI,gBAAIT,KAAK,CAACiB,aAAN,CAAoBT,IAApB,EAA0B;AAAEa,IAAAA,IAAI,EAAEZ,IAAR;AAAca,IAAAA,IAAI,EAAE,EAApB;AAAwBC,IAAAA,KAAK,EAAEX,SAAS,IAAIC,KAAK,CAACW,MAAN,CAAaC;AAAzD,GAA1B,CAAJ,GAAqG,IAD7G,eAEIzB,KAAK,CAACiB,aAAN,CAAoBd,IAApB,EAA0B;AAAEQ,IAAAA,KAAK,EAAE,CAACO,MAAM,CAACQ,IAAR,EAAcR,MAAM,CAACS,OAArB;AAAT,GAA1B,eACI3B,KAAK,CAACiB,aAAN,CAAoBb,IAApB,EAA0B;AAAEwB,IAAAA,UAAU,EAAE,KAAd;AAAqBjB,IAAAA,KAAK,EAAEI;AAA5B,GAA1B,EAAoEL,KAApE,CADJ,CAFJ,CADI,CAAR;AAKH,CAPD;;AAQA,MAAMQ,MAAM,GAAGhB,UAAU,CAAC2B,MAAX,CAAkB;AAC7BV,EAAAA,SAAS,EAAE;AACPW,IAAAA,OAAO,EAAE;AADF,GADkB;AAI7BV,EAAAA,GAAG,EAAE;AACDW,IAAAA,aAAa,EAAE,KADd;AAEDC,IAAAA,UAAU,EAAE,QAFX;AAGDC,IAAAA,WAAW,EAAE;AAHZ,GAJwB;AAS7BP,EAAAA,IAAI,EAAE;AACFQ,IAAAA,cAAc,EAAE,CADd;AAEFD,IAAAA,WAAW,EAAE;AAFX,GATuB;AAa7BN,EAAAA,OAAO,EAAE;AACLQ,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,cAAc,EAAE;AAFX;AAboB,CAAlB,CAAf;AAkBA,eAAe9B,SAAS,CAACC,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"]}
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"]}
@@ -102,6 +102,18 @@ export const SEED_DATA = {
102
102
  label: "Loading BG Color",
103
103
  description: "Color of the background to show while the map is loading"
104
104
  }),
105
+ showUserLocation: createBoolProp({
106
+ label: "Show User Location",
107
+ description: "Whether to request and show the user's location on the map",
108
+ required: false,
109
+ defaultValue: null
110
+ }),
111
+ moveMapToUser: createBoolProp({
112
+ label: "Move Map to User",
113
+ description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
114
+ required: false,
115
+ defaultValue: null
116
+ }),
105
117
  apiKey: createTextProp({
106
118
  defaultValue: process.env.GOOGLE_MAPS_API_KEY,
107
119
  editable: false
@@ -1 +1 @@
1
- {"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","flex","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,cALF,EAMEC,MANF,EAOEC,UAPF,EAQEC,UARF,QASO,iBATP;AAWA,OAAO,MAAMC,SAAS,GAAG;AAC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["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","flex","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","showUserLocation","moveMapToUser","apiKey","process","env","GOOGLE_MAPS_API_KEY"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,cALF,EAMEC,MANF,EAOEC,UAPF,EAQEC,UARF,QASO,iBATP;AAWA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,WAAW,EAAE,YAJU;AAKvBC,EAAAA,QAAQ,EAAEb,eAAe,CAACc,KALH;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE;AADA,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ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AAY,EAAEoB,OAAO,CAACC,GAAR,CAAYC,mBADL;AAErB3B,MAAAA,QAAQ,EAAE;AAFW,KAAD;AAnHjB;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n flex: 1,\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n min: 0,\n max: 22,\n group: GROUPS.basic,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Pan Enabled\",\n description: \"Whether panning the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading BG Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n showUserLocation: createBoolProp({\n label: \"Show User Location\",\n description: \"Whether to request and show the user's location on the map\",\n required: false,\n defaultValue: null,\n }),\n moveMapToUser: createBoolProp({\n label: \"Move Map to User\",\n description:\n \"Whether to set the map region to the user's location. Overrides latitude and longitude.\",\n required: false,\n defaultValue: null,\n }),\n apiKey: createTextProp({\n defaultValue: process.env.GOOGLE_MAPS_API_KEY,\n editable: false,\n }),\n },\n};\n"]}
@@ -132,6 +132,26 @@ export declare const SEED_DATA: {
132
132
  formType: string;
133
133
  propType: string;
134
134
  };
135
+ showUserLocation: {
136
+ label: string;
137
+ description: string;
138
+ formType: string;
139
+ propType: string;
140
+ defaultValue: boolean;
141
+ editable: boolean;
142
+ required: boolean;
143
+ group: string;
144
+ };
145
+ moveMapToUser: {
146
+ label: string;
147
+ description: string;
148
+ formType: string;
149
+ propType: string;
150
+ defaultValue: boolean;
151
+ editable: boolean;
152
+ required: boolean;
153
+ group: string;
154
+ };
135
155
  apiKey: any;
136
156
  };
137
157
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.7.1-c7d91d.0+c7d91dbf",
3
+ "version": "43.7.2-0fdea1.0+0fdea1a1",
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.6.0",
44
+ "@draftbit/types": "^43.7.2-0fdea1.0+0fdea1a1",
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": "c7d91dbf17f237abe51487607e970bac15a62c6e"
83
+ "gitHead": "0fdea1a1eaa51242a75bf791722187c0040040b1"
84
84
  }
@@ -109,6 +109,18 @@ export const SEED_DATA = {
109
109
  label: "Loading BG Color",
110
110
  description: "Color of the background to show while the map is loading",
111
111
  }),
112
+ showUserLocation: createBoolProp({
113
+ label: "Show User Location",
114
+ description: "Whether to request and show the user's location on the map",
115
+ required: false,
116
+ defaultValue: null,
117
+ }),
118
+ moveMapToUser: createBoolProp({
119
+ label: "Move Map to User",
120
+ description: "Whether to set the map region to the user's location. Overrides latitude and longitude.",
121
+ required: false,
122
+ defaultValue: null,
123
+ }),
112
124
  apiKey: createTextProp({
113
125
  defaultValue: process.env.GOOGLE_MAPS_API_KEY,
114
126
  editable: false,
@@ -120,6 +120,19 @@ export const SEED_DATA = {
120
120
  label: "Loading BG Color",
121
121
  description: "Color of the background to show while the map is loading",
122
122
  }),
123
+ showUserLocation: createBoolProp({
124
+ label: "Show User Location",
125
+ description: "Whether to request and show the user's location on the map",
126
+ required: false,
127
+ defaultValue: null,
128
+ }),
129
+ moveMapToUser: createBoolProp({
130
+ label: "Move Map to User",
131
+ description:
132
+ "Whether to set the map region to the user's location. Overrides latitude and longitude.",
133
+ required: false,
134
+ defaultValue: null,
135
+ }),
123
136
  apiKey: createTextProp({
124
137
  defaultValue: process.env.GOOGLE_MAPS_API_KEY,
125
138
  editable: false,