@draftbit/core 43.2.5-da45ce.0 → 43.2.5-e5eabd.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +0 -3
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Divider.js +3 -13
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/KeyboardAwareScrollView.js +26 -0
- package/lib/commonjs/components/KeyboardAwareScrollView.js.map +1 -0
- package/lib/commonjs/components/ToggleButton.js +3 -3
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/AvatarEdit.js.map +1 -1
- package/lib/commonjs/mappings/CardInline.js.map +1 -1
- package/lib/commonjs/mappings/Carousel.js +3 -1
- package/lib/commonjs/mappings/Carousel.js.map +1 -1
- package/lib/commonjs/mappings/CustomCode.js.map +1 -1
- package/lib/commonjs/mappings/FlatList.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js +48 -0
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -0
- package/lib/commonjs/mappings/RadioButton.js.map +1 -1
- package/lib/commonjs/mappings/SwiperItem.js.map +1 -1
- package/lib/module/components/CardInline.js.map +1 -1
- package/lib/module/components/Carousel.js +0 -3
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/KeyboardAwareScrollView.js +13 -0
- package/lib/module/components/KeyboardAwareScrollView.js.map +1 -0
- package/lib/module/components/ToggleButton.js +3 -3
- package/lib/module/components/ToggleButton.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/Carousel.js +3 -1
- package/lib/module/mappings/Carousel.js.map +1 -1
- package/lib/module/mappings/KeyboardAwareScrollView.js +39 -0
- package/lib/module/mappings/KeyboardAwareScrollView.js.map +1 -0
- package/lib/typescript/src/components/KeyboardAwareScrollView.d.ts +13 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/Carousel.d.ts +3 -1
- package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts +82 -0
- package/package.json +3 -2
- package/src/components/Carousel.js +0 -3
- package/src/components/Carousel.tsx +0 -3
- package/src/components/KeyboardAwareScrollView.js +4 -0
- package/src/components/KeyboardAwareScrollView.tsx +19 -0
- package/src/components/ToggleButton.js +5 -3
- package/src/components/ToggleButton.tsx +5 -3
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Carousel.js +3 -1
- package/src/mappings/Carousel.ts +3 -1
- package/src/mappings/KeyboardAwareScrollView.js +38 -0
- package/src/mappings/KeyboardAwareScrollView.ts +48 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default as AccordionGroup } from \"./AccordionGroup\";\nexport { default as AccordionItem } from \"./AccordionItem\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.tsx"],"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","StyleSheet","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;;;;;;;;;AAEA,MAAMA,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;AAAE9C,QAAAA,KAAK,EAAEkC,UAAT;AAAqBjB,QAAAA,MAAM,EAAEkB;AAA7B,OAAD;AAJT,MADF;AAQD,GATD,CADH,GAWG,IAxBN,EAyBGV,KAAK,CAACE,QAAN,CAAelB,GAAf,CAAmBW,QAAnB,EAA8B4B,KAAD,IAAgB;AAAA;;AAC5C,UAAMC,CAAC,GAAG,CAAAD,KAAK,SAAL,IAAAA,KAAK,WAAL,4BAAAA,KAAK,CAAEE,KAAP,8DAAc5B,KAAd,KAAuB,EAAjC;AACA,wBACE,oBAAC,iBAAD;AAAM,MAAA,KAAK,EAAE;AAAEtB,QAAAA,KAAK,EAAEkC;AAAT;AAAb,oBACGT,KAAK,CAAC0B,YAAN,CAAmBH,KAAnB,EAA0B;AACzB1B,MAAAA,KAAK,EAAE,EAAE,GAAG2B,CAAL;AAAQjD,QAAAA,KAAK,EAAEkC;AAAf;AADkB,KAA1B,CADH,CADF;AAOD,GATA,CAzBH,CADF,eAqCE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAEb,QAAd;AAAwB,IAAA,KAAK,EAAElB,KAA/B;AAAsC,IAAA,MAAM,EAAE0B;AAA9C,IArCF,CADF;AAyCD;;AAED,MAAMxB,MAAM,GAAG2B,wBAAWoB,MAAX,CAAkB;AAC/BhB,EAAAA,SAAS,EAAE;
|
|
1
|
+
{"version":3,"sources":["Carousel.tsx"],"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","StyleSheet","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG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HF;AAIN4C,IAAAA,YAAY,EAAE,EAJR;AAKN7C,IAAAA,eAAe,EAAE;AALX;AAbuB,CAAlB,CAAf;;eAsBe,wBAAUE,QAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: Props) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\n"]}
|
|
@@ -13,8 +13,6 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
16
|
const getWidth = numColumns => {
|
|
19
17
|
switch (numColumns) {
|
|
20
18
|
case 1:
|
|
@@ -37,6 +35,20 @@ const Card = _ref => {
|
|
|
37
35
|
...rest
|
|
38
36
|
} = _ref;
|
|
39
37
|
const width = getWidth(numColumns);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
+
disabled: !onPress,
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
style: [style, {
|
|
42
|
+
width
|
|
43
|
+
}],
|
|
44
|
+
...rest
|
|
45
|
+
}, children);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
+
|
|
50
|
+
exports.default = _default;
|
|
51
|
+
//# sourceMappingURL=DeprecatedCardWrapper.js.map);
|
|
40
52
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
41
53
|
disabled: !onPress,
|
|
42
54
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedCardWrapper.
|
|
1
|
+
{"version":3,"sources":["DeprecatedCardWrapper.js"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","React","createElement","Touchable","disabled"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AACA,MAAMA,QAAQ,GAAIC,UAAD,IAAgB;AAC7B,UAAQA,UAAR;AACI,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ;AACI,aAAO,MAAP;AANR;AAQH,CATD;;AAUA,MAAMC,IAAI,GAAG,QAA2D;AAAA,MAA1D;AAAED,IAAAA,UAAU,GAAG,CAAf;AAAkBE,IAAAA,QAAlB;AAA4BC,IAAAA,OAA5B;AAAqCC,IAAAA,KAArC;AAA4C,OAAGC;AAA/C,GAA0D;AACpE,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBAAQO,eAAMC,aAAN,CAAoBC,kBAApB,EAA+B;AAAEC,IAAAA,QAAQ,EAAE,CAACP,OAAb;AAAsBA,IAAAA,OAAO,EAAEA,OAA/B;AAAwCC,IAAAA,KAAK,EAAE,CAACA,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR,CAA/C;AAAmE,OAAGD;AAAtE,GAA/B,EAA6GH,QAA7G,CAAR;AACH,CAHD;;eAIe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nconst getWidth = (numColumns) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\nconst Card = ({ numColumns = 3, children, onPress, style, ...rest }) => {\n const width = getWidth(numColumns);\n return (React.createElement(Touchable, { disabled: !onPress, onPress: onPress, style: [style, { width }], ...rest }, children));\n};\nexport default withTheme(Card);\n"]}
|
|
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
18
20
|
const Divider = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
style,
|
|
@@ -24,19 +26,7 @@ const Divider = _ref => {
|
|
|
24
26
|
},
|
|
25
27
|
...rest
|
|
26
28
|
} = _ref;
|
|
27
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
-
style: [{
|
|
29
|
-
backgroundColor: color || colors.divider,
|
|
30
|
-
height: _reactNative.StyleSheet.hairlineWidth
|
|
31
|
-
}, style],
|
|
32
|
-
...rest
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var _default = (0, _theming.withTheme)(Divider);
|
|
37
|
-
|
|
38
|
-
exports.default = _default;
|
|
39
|
-
//# sourceMappingURL=Divider.js.map /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
40
30
|
style: [{
|
|
41
31
|
backgroundColor: color || colors.divider,
|
|
42
32
|
height: _reactNative.StyleSheet.hairlineWidth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Divider.
|
|
1
|
+
{"version":3,"sources":["Divider.tsx"],"names":["Divider","style","color","theme","colors","rest","backgroundColor","divider","height","StyleSheet","hairlineWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AASA,MAAMA,OAAwB,GAAG,QAK3B;AAAA,MAL4B;AAChCC,IAAAA,KADgC;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAHyB;AAIhC,OAAGC;AAJ6B,GAK5B;AACJ,sBACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACL;AACEC,MAAAA,eAAe,EAAEJ,KAAK,IAAIE,MAAM,CAACG,OADnC;AAEEC,MAAAA,MAAM,EAAEC,wBAAWC;AAFrB,KADK,EAKLT,KALK;AADT,KAQMI,IARN,EADF;AAYD,CAlBD;;eAoBe,wBAAUL,OAAV,C","sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n color?: string;\n theme: typeof theme;\n};\n\nconst Divider: React.FC<Props> = ({\n style,\n color,\n theme: { colors },\n ...rest\n}) => {\n return (\n <View\n style={[\n {\n backgroundColor: color || colors.divider,\n height: StyleSheet.hairlineWidth,\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nexport default withTheme(Divider);\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNativeKeyboardAwareScrollView = require("react-native-keyboard-aware-scroll-view");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
const KeyboardAware = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView, props, children);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var _default = KeyboardAware;
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
//# sourceMappingURL=KeyboardAwareScrollView.js.mapew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.tsx"],"names":["KeyboardAware","children","props"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAaA,MAAMA,aAAa,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAD;AAAA,sBACpB,oBAAC,2DAAD,EAA6BA,KAA7B,EAAqCD,QAArC,CADoB;AAAA,CAAtB;;eAIeD,a","sourcesContent":["import * as React from \"react\";\nimport { KeyboardAwareScrollView } from \"react-native-keyboard-aware-scroll-view\";\n\ntype Props = {\n children: React.ReactNode;\n viewIsInsideTabBar: boolean;\n enableAutomaticScroll?: boolean;\n extraHeight?: number;\n extraScrollHeight?: number;\n enableResetScrollToCoords?: boolean;\n keyboardOpeningTime?: number;\n enableOnAndroid?: boolean;\n};\n\nconst KeyboardAware = ({ children, ...props }: Props) => (\n <KeyboardAwareScrollView {...props}>{children}</KeyboardAwareScrollView>\n);\n\nexport default KeyboardAware;\n"]}
|
|
@@ -54,8 +54,8 @@ const ToggleButton = _ref => {
|
|
|
54
54
|
}, [defaultValue]);
|
|
55
55
|
|
|
56
56
|
const handlePress = () => {
|
|
57
|
-
setInternalValue(!
|
|
58
|
-
onPress(!
|
|
57
|
+
setInternalValue(!internalValue);
|
|
58
|
+
onPress(!internalValue);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
@@ -68,7 +68,7 @@ const ToggleButton = _ref => {
|
|
|
68
68
|
style: [styles.mainContainer, {
|
|
69
69
|
width,
|
|
70
70
|
height,
|
|
71
|
-
backgroundColor:
|
|
71
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
72
72
|
borderColor: colors[borderColor]
|
|
73
73
|
}, style]
|
|
74
74
|
}, rest));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ToggleButton.tsx"],"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAc,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIlB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAgB,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIhB,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMiB,WAAW,GAAG,MAAM;AACxBJ,IAAAA,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"sources":["ToggleButton.tsx"],"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAc,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIlB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAgB,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIhB,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMiB,WAAW,GAAG,MAAM;AACxBJ,IAAAA,gBAAgB,CAAC,CAACD,aAAF,CAAhB;AACAb,IAAAA,OAAO,CAAC,CAACa,aAAF,CAAP;AACD,GAHD;;AAKA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,IAAI,EAAEQ,QAHR;AAIE,IAAA,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;AAKE,IAAA,OAAO,EAAEc,WALX;AAME,IAAA,QAAQ,EAAEhB,QANZ;AAOE,IAAA,KAAK,EAAE,CACLiB,MAAM,CAACC,aADF,EAEL;AACEb,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEa,MAAAA,eAAe,EAAER,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;AAMEE,MAAAA,WAAW,EAAEK,MAAM,CAACL,WAAD;AANrB,KAFK,EAULM,KAVK;AAPT,KAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMO,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,aAAa,EAAE;AACbI,IAAAA,WAAW,EAAE;AADA;AADgB,CAAlB,CAAf;;eAMe,wBAAU5B,YAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -201,6 +201,12 @@ Object.defineProperty(exports, "Image", {
|
|
|
201
201
|
return _Image.default;
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "KeyboardAwareScrollView", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _KeyboardAwareScrollView.default;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
204
210
|
Object.defineProperty(exports, "Link", {
|
|
205
211
|
enumerable: true,
|
|
206
212
|
get: function () {
|
|
@@ -494,6 +500,8 @@ var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
|
494
500
|
|
|
495
501
|
var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
496
502
|
|
|
503
|
+
var _KeyboardAwareScrollView = _interopRequireDefault(require("./components/KeyboardAwareScrollView"));
|
|
504
|
+
|
|
497
505
|
var _useAuthState = require("./components/useAuthState");
|
|
498
506
|
|
|
499
507
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AASA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { default as KeyboardAwareScrollView } from \"./components/KeyboardAwareScrollView\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AvatarEdit.
|
|
1
|
+
{"version":3,"sources":["AvatarEdit.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","layout","width","height","props","size","group","GROUPS","basic","label","editable","required","formType","FORM_TYPES","number","propType","PROP_TYPES","NUMBER","min","max","precision","step","defaultValue","image","data","ASSET"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,8CAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAJL;AAKrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,KAAK,EAAE,EADH;AAEJC,IAAAA,MAAM,EAAE;AAFJ,GALa;AASrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,IAAI,EAAE;AACFC,MAAAA,KAAK,EAAEC,cAAOC,KADZ;AAEFC,MAAAA,KAAK,EAAE,MAFL;AAGFZ,MAAAA,WAAW,EAAE,gCAHX;AAIFa,MAAAA,QAAQ,EAAE,IAJR;AAKFC,MAAAA,QAAQ,EAAE,KALR;AAMFC,MAAAA,QAAQ,EAAEC,kBAAWC,MANnB;AAOFC,MAAAA,QAAQ,EAAEC,kBAAWC,MAPnB;AAQFC,MAAAA,GAAG,EAAE,CARH;AASFC,MAAAA,GAAG,EAAE,GATH;AAUFC,MAAAA,SAAS,EAAE,CAVT;AAWFC,MAAAA,IAAI,EAAE,CAXJ;AAYFC,MAAAA,YAAY,EAAE;AAZZ,KADH;AAeHC,IAAAA,KAAK,EAAE;AACHjB,MAAAA,KAAK,EAAEC,cAAOiB,IADX;AAEHf,MAAAA,KAAK,EAAE,OAFJ;AAGHZ,MAAAA,WAAW,EAAE,mBAHV;AAIHa,MAAAA,QAAQ,EAAE,IAJP;AAKHC,MAAAA,QAAQ,EAAE,IALP;AAMHC,MAAAA,QAAQ,EAAEC,kBAAWU,KANlB;AAOHR,MAAAA,QAAQ,EAAEC,kBAAWS,KAPlB;AAQHH,MAAAA,YAAY,EAAE;AARX;AAfJ;AATc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Avatar Edit\",\n tag: \"AvatarEdit\",\n description: \"An avatar with an edit icon in the top right\",\n category: COMPONENT_TYPES.deprecated,\n layout: {\n width: 64,\n height: 64,\n },\n props: {\n size: {\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Size of avatar / width, height\",\n editable: true,\n required: false,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n min: 0,\n max: 300,\n precision: 0,\n step: 1,\n defaultValue: 80,\n },\n image: {\n group: GROUPS.data,\n label: \"Image\",\n description: \"Name of the image\",\n editable: true,\n required: true,\n formType: FORM_TYPES.image,\n propType: PROP_TYPES.ASSET,\n defaultValue: \"brightness-5\",\n },\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardInline.
|
|
1
|
+
{"version":3,"sources":["CardInline.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","card","layout","props","image","group","GROUPS","data","label","formType","FORM_TYPES","propType","PROP_TYPES","ASSET","defaultValue","editable","required","title","string","STRING","subtitle","aspectRatio","basic","NUMBER","elevation"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,mHAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,IAJL;AAKrBC,EAAAA,MAAM,EAAE,EALa;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,KAAK,EAAEC,cAAOC,IADX;AAEHC,MAAAA,KAAK,EAAE,OAFJ;AAGHV,MAAAA,WAAW,EAAE,OAHV;AAIHW,MAAAA,QAAQ,EAAEC,kBAAWN,KAJlB;AAKHO,MAAAA,QAAQ,EAAEC,kBAAWC,KALlB;AAMHC,MAAAA,YAAY,EAAE,IANX;AAOHC,MAAAA,QAAQ,EAAE,IAPP;AAQHC,MAAAA,QAAQ,EAAE;AARP,KADJ;AAWHC,IAAAA,KAAK,EAAE;AACHZ,MAAAA,KAAK,EAAEC,cAAOC,IADX;AAEHC,MAAAA,KAAK,EAAE,OAFJ;AAGHV,MAAAA,WAAW,EAAE,iBAHV;AAIHW,MAAAA,QAAQ,EAAEC,kBAAWQ,MAJlB;AAKHP,MAAAA,QAAQ,EAAEC,kBAAWO,MALlB;AAMHL,MAAAA,YAAY,EAAE,4BANX;AAOHC,MAAAA,QAAQ,EAAE,IAPP;AAQHC,MAAAA,QAAQ,EAAE;AARP,KAXJ;AAqBHI,IAAAA,QAAQ,EAAE;AACNf,MAAAA,KAAK,EAAEC,cAAOC,IADR;AAENC,MAAAA,KAAK,EAAE,UAFD;AAGNV,MAAAA,WAAW,EAAE,eAHP;AAINW,MAAAA,QAAQ,EAAEC,kBAAWQ,MAJf;AAKNP,MAAAA,QAAQ,EAAEC,kBAAWO,MALf;AAMNL,MAAAA,YAAY,EAAE,WANR;AAONC,MAAAA,QAAQ,EAAE,IAPJ;AAQNC,MAAAA,QAAQ,EAAE;AARJ,KArBP;AA+BHK,IAAAA,WAAW,EAAE;AACThB,MAAAA,KAAK,EAAEC,cAAOgB,KADL;AAETd,MAAAA,KAAK,EAAE,cAFE;AAGTV,MAAAA,WAAW,EAAE,2BAHJ;AAITW,MAAAA,QAAQ,EAAEC,kBAAWW,WAJZ;AAKTV,MAAAA,QAAQ,EAAEC,kBAAWW,MALZ;AAMTT,MAAAA,YAAY,EAAE,GANL;AAOTC,MAAAA,QAAQ,EAAE,IAPD;AAQTC,MAAAA,QAAQ,EAAE;AARD,KA/BV;AAyCHQ,IAAAA,SAAS,EAAE,gCAAoB,CAApB;AAzCR;AANc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Inline Card\",\n tag: \"CardInline\",\n description: \"An elevated card with image and a title and description overlayed, that takes up the full width of its container.\",\n category: COMPONENT_TYPES.card,\n layout: {},\n props: {\n image: {\n group: GROUPS.data,\n label: \"Image\",\n description: \"Image\",\n formType: FORM_TYPES.image,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n subtitle: {\n group: GROUPS.data,\n label: \"Subtitle\",\n description: \"Subtitle text\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"San Diego\",\n editable: true,\n required: false,\n },\n aspectRatio: {\n group: GROUPS.basic,\n label: \"Aspect ratio\",\n description: \"Aspect ratio of the image\",\n formType: FORM_TYPES.aspectRatio,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 1.5,\n editable: true,\n required: false,\n },\n elevation: createElevationType(2),\n },\n};\n"]}
|
|
@@ -12,7 +12,9 @@ const SEED_DATA = [{
|
|
|
12
12
|
tag: "Carousel",
|
|
13
13
|
category: _types.COMPONENT_TYPES.media,
|
|
14
14
|
description: "A horizontal scrolling carousel of images",
|
|
15
|
-
layout: {
|
|
15
|
+
layout: {
|
|
16
|
+
height: 250
|
|
17
|
+
},
|
|
16
18
|
props: {
|
|
17
19
|
resizeMode: (0, _types.createResizeModeProp)(),
|
|
18
20
|
dotColor: (0, _types.createColorProp)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","media","description","layout","props","resizeMode","dotColor","label"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,UADR;AAEEC,EAAAA,GAAG,EAAE,UAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAH5B;AAIEC,EAAAA,WAAW,EAAE,2CAJf;AAKEC,EAAAA,MAAM,EAAE,
|
|
1
|
+
{"version":3,"sources":["Carousel.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","media","description","layout","height","props","resizeMode","dotColor","label"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,UADR;AAEEC,EAAAA,GAAG,EAAE,UAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAH5B;AAIEC,EAAAA,WAAW,EAAE,2CAJf;AAKEC,EAAAA,MAAM,EAAE;AACNC,IAAAA,MAAM,EAAE;AADF,GALV;AAQEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE,kCADP;AAELC,IAAAA,QAAQ,EAAE,4BAAgB;AACxBC,MAAAA,KAAK,EAAE;AADiB,KAAhB;AAFL;AART,CADuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createResizeModeProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Carousel\",\n tag: \"Carousel\",\n category: COMPONENT_TYPES.media,\n description: \"A horizontal scrolling carousel of images\",\n layout: {\n height: 250,\n },\n props: {\n resizeMode: createResizeModeProp(),\n dotColor: createColorProp({\n label: \"Dot color\",\n }),\n },\n },\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CustomCode.
|
|
1
|
+
{"version":3,"sources":["CustomCode.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","data","props"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,8CAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,IAJL;AAKrBC,EAAAA,KAAK,EAAE;AALc,CAAlB","sourcesContent":["import { COMPONENT_TYPES } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Custom Code\",\n tag: \"CustomCode\",\n description: \"A component that allows usage of custom code\",\n category: COMPONENT_TYPES.data,\n props: {},\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FlatList.
|
|
1
|
+
{"version":3,"sources":["FlatList.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","data","layout","flex","props","horizontal","label","numColumns","editable"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,MADe;AAErBC,EAAAA,GAAG,EAAE,UAFgB;AAGrBC,EAAAA,WAAW,EAAE,wBAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,IAJL;AAKrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,IAAI,EAAE;AADF,GALa;AAQrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,UAAU,EAAE,iCAAqB;AAC7BC,MAAAA,KAAK,EAAE,YADsB;AAE7BR,MAAAA,WAAW,EAAE;AAFgB,KAArB,CADT;AAKHS,IAAAA,UAAU,EAAE,iCAAqB;AAC7BC,MAAAA,QAAQ,EAAE;AADmB,KAArB;AALT;AARc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"List\",\n tag: \"FlatList\",\n description: \"A basic List component\",\n category: COMPONENT_TYPES.data,\n layout: {\n flex: 1,\n },\n props: {\n horizontal: createStaticBoolProp({\n label: \"Horizontal\",\n description: \"Render list horizontally\",\n }),\n numColumns: createNumColumnsType({\n editable: true,\n }),\n },\n};\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
const SEED_DATA = {
|
|
11
|
+
name: "Keyboard Aware Scroll View",
|
|
12
|
+
tag: "KeyboardAwareScrollView",
|
|
13
|
+
description: "View that moves pushes the content when virtual keyboard is open.",
|
|
14
|
+
category: _types.COMPONENT_TYPES.layout,
|
|
15
|
+
layout: {},
|
|
16
|
+
props: {
|
|
17
|
+
viewIsInsideTabBar: (0, _types.createStaticBoolProp)({
|
|
18
|
+
label: "View Is Inside TabBar",
|
|
19
|
+
description: "Adds an extra offset that represents the TabBarIOS height."
|
|
20
|
+
}),
|
|
21
|
+
enableAutomaticScroll: (0, _types.createStaticBoolProp)({
|
|
22
|
+
label: "Enable Automatic Scroll",
|
|
23
|
+
description: "When focus in TextInput will scroll the position, default is enabled"
|
|
24
|
+
}),
|
|
25
|
+
extraHeight: (0, _types.createStaticNumberProp)({
|
|
26
|
+
label: "Extra Height",
|
|
27
|
+
description: "Adds an extra offset when focusing the TextInputs"
|
|
28
|
+
}),
|
|
29
|
+
extraScrollHeight: (0, _types.createStaticNumberProp)({
|
|
30
|
+
label: "Extra Scroll Height",
|
|
31
|
+
description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard"
|
|
32
|
+
}),
|
|
33
|
+
enableResetScrollToCoords: (0, _types.createStaticBoolProp)({
|
|
34
|
+
label: "Enable Reset Scroll To Coordinates",
|
|
35
|
+
description: "Lets the user enable or disable automatic resetScrollToCoords"
|
|
36
|
+
}),
|
|
37
|
+
keyboardOpeningTime: (0, _types.createStaticNumberProp)({
|
|
38
|
+
label: "Keyboard Opening Time",
|
|
39
|
+
description: "Sets the delay time before scrolling to new position, default is 250"
|
|
40
|
+
}),
|
|
41
|
+
enableOnAndroid: (0, _types.createStaticBoolProp)({
|
|
42
|
+
label: "Enable On Android",
|
|
43
|
+
description: "Enable Android Support"
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.SEED_DATA = SEED_DATA;
|
|
48
|
+
//# sourceMappingURL=KeyboardAwareScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,iCAAqB;AACvCC,MAAAA,KAAK,EAAE,uBADgC;AAEvCN,MAAAA,WAAW,EAAE;AAF0B,KAArB,CADf;AAKLO,IAAAA,qBAAqB,EAAE,iCAAqB;AAC1CD,MAAAA,KAAK,EAAE,yBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAArB,CALlB;AAULQ,IAAAA,WAAW,EAAE,mCAAuB;AAClCF,MAAAA,KAAK,EAAE,cAD2B;AAElCN,MAAAA,WAAW,EAAE;AAFqB,KAAvB,CAVR;AAcLS,IAAAA,iBAAiB,EAAE,mCAAuB;AACxCH,MAAAA,KAAK,EAAE,qBADiC;AAExCN,MAAAA,WAAW,EACT;AAHsC,KAAvB,CAdd;AAmBLU,IAAAA,yBAAyB,EAAE,iCAAqB;AAC9CJ,MAAAA,KAAK,EAAE,oCADuC;AAE9CN,MAAAA,WAAW,EACT;AAH4C,KAArB,CAnBtB;AAwBLW,IAAAA,mBAAmB,EAAE,mCAAuB;AAC1CL,MAAAA,KAAK,EAAE,uBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAAvB,CAxBhB;AA6BLY,IAAAA,eAAe,EAAE,iCAAqB;AACpCN,MAAAA,KAAK,EAAE,mBAD6B;AAEpCN,MAAAA,WAAW,EAAE;AAFuB,KAArB;AA7BZ;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButton.
|
|
1
|
+
{"version":3,"sources":["RadioButton.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","props","value","label","description","defaultValue","required","color","group","GROUPS","basic","unselectedColor","disabled","size","min","max","step","precision","selectedIcon","unselectedIcon"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,cADe;AAErBC,EAAAA,GAAG,EAAE,aAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHL;AAIrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CAJW;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,2BAAe;AAClBC,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,2BAFK;AAGlBC,MAAAA,YAAY,EAAE,IAHI;AAIlBC,MAAAA,QAAQ,EAAE;AAJQ,KAAf,CADJ;AAOHC,IAAAA,KAAK,EAAE,4BAAgB;AACnBC,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBN,MAAAA,WAAW,EAAE,sBAFM;AAGnBC,MAAAA,YAAY,EAAE;AAHK,KAAhB,CAPJ;AAYHM,IAAAA,eAAe,EAAE,4BAAgB;AAC7BH,MAAAA,KAAK,EAAEC,cAAOC,KADe;AAE7BP,MAAAA,KAAK,EAAE,kBAFsB;AAG7BC,MAAAA,WAAW,EAAE,iCAHgB;AAI7BC,MAAAA,YAAY,EAAE;AAJe,KAAhB,CAZd;AAkBHO,IAAAA,QAAQ,EAAE,2BAAe;AACrBT,MAAAA,KAAK,EAAE,UADc;AAErBC,MAAAA,WAAW,EAAE;AAFQ,KAAf,CAlBP;AAsBHS,IAAAA,IAAI,EAAE,6BAAiB;AACnBL,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBP,MAAAA,KAAK,EAAE,MAFY;AAGnBC,MAAAA,WAAW,EAAE,kCAHM;AAInBC,MAAAA,YAAY,EAAE,EAJK;AAKnBS,MAAAA,GAAG,EAAE,EALc;AAMnBC,MAAAA,GAAG,EAAE,GANc;AAOnBC,MAAAA,IAAI,EAAE,CAPa;AAQnBC,MAAAA,SAAS,EAAE;AARQ,KAAjB,CAtBH;AAgCHC,IAAAA,YAAY,EAAE,2BAAe;AACzBf,MAAAA,KAAK,EAAE,eADkB;AAEzBC,MAAAA,WAAW,EAAE,gDAFY;AAGzBC,MAAAA,YAAY,EAAE;AAHW,KAAf,CAhCX;AAqCHc,IAAAA,cAAc,EAAE,2BAAe;AAC3BhB,MAAAA,KAAK,EAAE,iBADoB;AAE3BC,MAAAA,WAAW,EAAE,kDAFc;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAAf;AArCb;AALc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createIconProp, createTextProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button\",\n tag: \"RadioButton\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress],\n props: {\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether radio button is disabled\",\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Specifies the size of the button\",\n defaultValue: 24,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n selectedIcon: createIconProp({\n label: \"Selected Icon\",\n description: \"Icon to show when the radio button is selected\",\n defaultValue: \"MaterialIcons/radio-button-checked\",\n }),\n unselectedIcon: createIconProp({\n label: \"Unselected Icon\",\n description: \"Icon to show when the radio button is unselected\",\n defaultValue: \"MaterialIcons/radio-button-unchecked\",\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SwiperItem.
|
|
1
|
+
{"version":3,"sources":["SwiperItem.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","props"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,aAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBC,EAAAA,KAAK,EAAE;AALc,CAAlB","sourcesContent":["import { COMPONENT_TYPES } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Swiper Item\",\n tag: \"SwiperItem\",\n description: \"Swiper item\",\n category: COMPONENT_TYPES.button,\n props: {},\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardInline.
|
|
1
|
+
{"version":3,"sources":["CardInline.js"],"names":["React","Pressable","View","StyleSheet","Title","Subtitle","Image","Surface","Config","withTheme","CardInline","image","cardImageUrl","title","subtitle","aspectRatio","elevation","style","titleStyle","subtitleStyle","onPress","alignItems","justifyContent","width","height","flatten","imageStyles","createElement","disabled","pressed","opacity","source","uri","resizeMode","styles","overlay","color","text","create","position","top","bottom","left","right","padding","backgroundColor"],"mappings":"AAAA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,EAAoBC,IAApB,EAA0BC,UAA1B,QAA6C,cAA7C;AACA,SAASC,KAAT,EAAgBC,QAAhB,QAAgC,cAAhC;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AACA,MAAMC,UAAU,GAAG,QAAoI;AAAA,MAAnI;AAAEC,IAAAA,KAAK,GAAGH,MAAM,CAACI,YAAjB;AAA+BC,IAAAA,KAA/B;AAAsCC,IAAAA,QAAtC;AAAgDC,IAAAA,WAAW,GAAG,GAA9D;AAAmEC,IAAAA,SAAS,GAAG,CAA/E;AAAkFC,IAAAA,KAAlF;AAAyFC,IAAAA,UAAzF;AAAqGC,IAAAA,aAArG;AAAoHC,IAAAA;AAApH,GAAmI;AACnJ,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA,cAAd;AAA8BC,IAAAA,KAA9B;AAAqCC,IAAAA;AAArC,MAAgDrB,UAAU,CAACsB,OAAX,CAAmBR,KAAK,IAAI,EAA5B,CAAtD;AACA,QAAMS,WAAW,GAAGH,KAAK,IAAIC,MAAT,GAAkB;AAAED,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAlB,GAAsC;AAAET,IAAAA;AAAF,GAA1D;AACA,sBAAQf,KAAK,CAAC2B,aAAN,CAAoBpB,OAApB,EAA6B;AAAEU,IAAAA,KAAK,EAAE,CAAC;AAAED,MAAAA;AAAF,KAAD,EAAgBC,KAAhB;AAAT,GAA7B,eACJjB,KAAK,CAAC2B,aAAN,CAAoB1B,SAApB,EAA+B;AAAE2B,IAAAA,QAAQ,EAAE,CAACR,OAAb;AAAsBA,IAAAA,OAAO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AA,GAAG,EAAE,CAFA;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILC,IAAAA,IAAI,EAAE,CAJD;AAKLC,IAAAA,KAAK,EAAE,CALF;AAMLC,IAAAA,OAAO,EAAE,EANJ;AAOLC,IAAAA,eAAe,EAAE;AAPZ;AADoB,CAAlB,CAAf;AAWA,eAAepC,SAAS,CAACC,UAAD,CAAxB","sourcesContent":["// @ts-nocheck\nimport React from \"react\";\nimport { Pressable, View, StyleSheet, } from \"react-native\";\nimport { Title, Subtitle } from \"./Typography\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport Config from \"./Config\";\nimport { withTheme } from \"../theming\";\nconst CardInline = ({ image = Config.cardImageUrl, title, subtitle, aspectRatio = 1.5, elevation = 2, style, titleStyle, subtitleStyle, onPress, }) => {\n const { alignItems, justifyContent, width, height } = StyleSheet.flatten(style || {});\n const imageStyles = width && height ? { width, height } : { aspectRatio };\n return (React.createElement(Surface, { style: [{ elevation }, style] },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Image, { style: imageStyles, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: [styles.overlay, { justifyContent, alignItems }] },\n title ? (React.createElement(Title, { style: [{ color: \"white\" }, titleStyle], text: title })) : null,\n subtitle ? (React.createElement(Subtitle, { style: [{ color: \"rgba(255, 255, 255, 0.7)\" }, subtitleStyle], text: subtitle })) : null))));\n};\nconst styles = StyleSheet.create({\n overlay: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n padding: 16,\n backgroundColor: \"rgba(0, 0, 0, 0.2)\",\n },\n});\nexport default withTheme(CardInline);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.tsx"],"names":["React","withTheme","ScrollView","View","StyleSheet","Dimensions","Image","screenWidth","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","useState","Children","count","itemsLength","slides","isArray","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,SACEC,UADF,EAEEC,IAFF,EAGEC,UAHF,EAIEC,UAJF,QAOO,cAPP;AAQA,OAAOC,KAAP,MAAkB,SAAlB;AAEA,MAAMC,WAAW,GAAGF,UAAU,CAACG,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AASA,SAASC,KAAT,OAQG;AAAA,MARY;AACbC,IAAAA,KADa;AAEbC,IAAAA,KAFa;AAGbC,IAAAA;AAHa,GAQZ;AACD,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KACGC,KAAK,CAACC,IAAN,CAAW;AAAEJ,IAAAA;AAAF,GAAX,EAAuBK,GAAvB,CAA2B,CAACC,CAAD,EAAIC,CAAJ,KAAU;AACpC,UAAMC,OAAO,GAAGT,KAAK,KAAKQ,CAA1B;AACA,UAAME,OAAO,GAAGD,OAAO,GAAG,CAAH,GAAO,GAA9B;AACA,UAAME,IAAI,GAAGF,OAAO,GAAG,EAAH,GAAQ,CAA5B;AACA,wBACE,oBAAC,IAAD;AACE,MAAA,GAAG,EAAED,CADP;AAEE,MAAA,KAAK,EAAE,CACLN,MAAM,CAACU,MADF,EAEL;AAAEC,QAAAA,eAAe,EAAEd,KAAnB;AAA0BW,QAAAA,OAA1B;AAAmCb,QAAAA,KAAK,EAAEc,IAA1C;AAAgDG,QAAAA,MAAM,EAAEH;AAAxD,OAFK;AAFT,MADF;AASD,GAbA,CADH,CADF;AAk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,UAAU,CAACuD,MAAX,CAAkB;AAC/BhB,EAAAA,SAAS,EAAE;
|
|
1
|
+
{"version":3,"sources":["Carousel.tsx"],"names":["React","withTheme","ScrollView","View","StyleSheet","Dimensions","Image","screenWidth","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","useState","Children","count","itemsLength","slides","isArray","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,SACEC,UADF,EAEEC,IAFF,EAGEC,UAHF,EAIEC,UAJF,QAOO,cAPP;AAQA,OAAOC,KAAP,MAAkB,SAAlB;AAEA,MAAMC,WAAW,GAAGF,UAAU,CAACG,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AASA,SAASC,KAAT,OAQG;AAAA,MARY;AACbC,IAAAA,KADa;AAEbC,IAAAA,KAFa;AAGbC,IAAAA;AAHa,GAQZ;AACD,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KACGC,KAAK,CAACC,IAAN,CAAW;AAAEJ,IAAAA;AAAF,GAAX,EAAuBK,GAAvB,CAA2B,CAACC,CAAD,EAAIC,CAAJ,KAAU;AACpC,UAAMC,OAAO,GAAGT,KAAK,KAAKQ,CAA1B;AACA,UAAME,OAAO,GAAGD,OAAO,GAAG,CAAH,GAAO,GAA9B;AACA,UAAME,IAAI,GAAGF,OAAO,GAAG,EAAH,GAAQ,CAA5B;AACA,wBACE,oBAAC,IAAD;AACE,MAAA,GAAG,EAAED,CADP;AAEE,MAAA,KAAK,EAAE,CACLN,MAAM,CAACU,MADF,EAEL;AAAEC,QAAAA,eAAe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,KAAD;AAAO,IAAA,KAAK,EAAEX,QAAd;AAAwB,IAAA,KAAK,EAAElB,KAA/B;AAAsC,IAAA,MAAM,EAAEyB;AAA9C,IArCF,CADF;AAyCD;;AAED,MAAMvB,MAAM,GAAGV,UAAU,CAACuD,MAAX,CAAkB;AAC/BhB,EAAAA,SAAS,EAAE;AACTlB,IAAAA,eAAe,EAAE;AADR,GADoB;AAI/BV,EAAAA,KAAK,EAAE;AACL6C,IAAAA,QAAQ,EAAE,UADL;AAELC,IAAAA,MAAM,EAAE,EAFH;AAGLC,IAAAA,IAAI,EAAE,CAHD;AAILC,IAAAA,KAAK,EAAE,CAJF;AAKLC,IAAAA,aAAa,EAAE,KALV;AAMLC,IAAAA,cAAc,EAAE,QANX;AAOLC,IAAAA,UAAU,EAAE;AAPP,GAJwB;AAa/B1C,EAAAA,MAAM,EAAE;AACN2C,IAAAA,gBAAgB,EAAE,CADZ;AAEN1D,IAAAA,KAAK,EAAE,EAFD;AAGNiB,IAAAA,MAAM,EAAE,EAHF;AAIN0C,IAAAA,YAAY,EAAE,EAJR;AAKN3C,IAAAA,eAAe,EAAE;AALX;AAbuB,CAAlB,CAAf;AAsBA,eAAexB,SAAS,CAAC0B,QAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: Props) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
3
|
+
|
|
4
|
+
const KeyboardAware = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
...props
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React.createElement(KeyboardAwareScrollView, props, children);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default KeyboardAware;
|
|
13
|
+
//# sourceMappingURL=KeyboardAwareScrollView.js.mapew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.tsx"],"names":["React","KeyboardAwareScrollView","KeyboardAware","children","props"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,uBAAT,QAAwC,yCAAxC;;AAaA,MAAMC,aAAa,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAD;AAAA,sBACpB,oBAAC,uBAAD,EAA6BA,KAA7B,EAAqCD,QAArC,CADoB;AAAA,CAAtB;;AAIA,eAAeD,aAAf","sourcesContent":["import * as React from \"react\";\nimport { KeyboardAwareScrollView } from \"react-native-keyboard-aware-scroll-view\";\n\ntype Props = {\n children: React.ReactNode;\n viewIsInsideTabBar: boolean;\n enableAutomaticScroll?: boolean;\n extraHeight?: number;\n extraScrollHeight?: number;\n enableResetScrollToCoords?: boolean;\n keyboardOpeningTime?: number;\n enableOnAndroid?: boolean;\n};\n\nconst KeyboardAware = ({ children, ...props }: Props) => (\n <KeyboardAwareScrollView {...props}>{children}</KeyboardAwareScrollView>\n);\n\nexport default KeyboardAware;\n"]}
|
|
@@ -38,8 +38,8 @@ const ToggleButton = _ref => {
|
|
|
38
38
|
}, [defaultValue]);
|
|
39
39
|
|
|
40
40
|
const handlePress = () => {
|
|
41
|
-
setInternalValue(!
|
|
42
|
-
onPress(!
|
|
41
|
+
setInternalValue(!internalValue);
|
|
42
|
+
onPress(!internalValue);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
@@ -52,7 +52,7 @@ const ToggleButton = _ref => {
|
|
|
52
52
|
style: [styles.mainContainer, {
|
|
53
53
|
width,
|
|
54
54
|
height,
|
|
55
|
-
backgroundColor:
|
|
55
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
56
56
|
borderColor: colors[borderColor]
|
|
57
57
|
}, style]
|
|
58
58
|
}, rest));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ToggleButton.tsx"],"names":["React","withTheme","StyleSheet","IconButton","ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","create","borderWidth"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAEA,SAAoBC,UAApB,QAAiD,cAAjD;AACA,OAAOC,UAAP,MAAuB,cAAvB;;AAoBA,MAAMC,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCtB,KAAK,CAACuB,QAAN,CACxChB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAT,EAAAA,KAAK,CAACwB,SAAN,CAAgB,MAAM;AACpB,QAAIjB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAP,EAAAA,KAAK,CAACwB,SAAN,CAAgB,MAAM;AACpB,QAAIf,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMgB,WAAW,GAAG,MAAM;AACxBH,IAAAA,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"sources":["ToggleButton.tsx"],"names":["React","withTheme","StyleSheet","IconButton","ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","create","borderWidth"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAEA,SAAoBC,UAApB,QAAiD,cAAjD;AACA,OAAOC,UAAP,MAAuB,cAAvB;;AAoBA,MAAMC,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAA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mBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMM,MAAM,GAAGxB,UAAU,CAAC2B,MAAX,CAAkB;AAC/BF,EAAAA,aAAa,EAAE;AACbG,IAAAA,WAAW,EAAE;AADA;AADgB,CAAlB,CAAf;AAMA,eAAe7B,SAAS,CAACG,YAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"]}
|
package/lib/module/index.js
CHANGED
|
@@ -48,5 +48,6 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
|
|
|
48
48
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
49
49
|
export { default as Slider } from "./components/Slider";
|
|
50
50
|
export { default as Stepper } from "./components/Stepper";
|
|
51
|
+
export { default as KeyboardAwareScrollView } from "./components/KeyboardAwareScrollView";
|
|
51
52
|
export { useAuthState } from "./components/useAuthState";
|
|
52
53
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","ActionSheet","ActionSheetItem","ActionSheetCancel","Swiper","SwiperItem","Center","Circle","Square","Row","Stack","Spacer","RadioButton","RadioButtonGroup","RadioButtonRow","RadioButtonFieldGroup","Button","CardBlock","CardContainer","CardContainerRating","CardInline","DatePicker","HeaderLarge","HeaderMedium","HeaderOverline","Picker","ProgressBar","ProgressCircle","RowBodyIcon","RowHeadlineImageCaption","RowHeadlineImageIcon","Slider","Stepper","useAuthState"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,WAAzC;AACA,SAASC,OAAO,IAAIC,QAApB,QAAoC,YAApC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,uBAAxC;AAEA,SAASC,IAAT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HF,EAIEC,GAJF,EAKEC,KALF,EAMEC,MANF,QAOO,qBAPP;AASA,SACEC,WADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,qBAJF,QAKO,gCALP;AAOA;;AACA,SAAS7C,OAAO,IAAI8C,MAApB,QAAkC,+BAAlC;AACA,SAAS9C,OAAO,IAAI+C,SAApB,QAAqC,wBAArC;AACA,SAAS/C,OAAO,IAAIgD,aAApB,QAAyC,4BAAzC;AACA,SAAShD,OAAO,IAAIiD,mBAApB,QAA+C,kCAA/C;AACA,SAASjD,OAAO,IAAIkD,UAApB,QAAsC,yBAAtC;AACA,SAASlD,OAAO,IAAImD,UAApB,QAAsC,oCAAtC;AACA,SAASnD,OAAO,IAAIoD,WAApB,QAAuC,0BAAvC;AACA,SAASpD,OAAO,IAAIqD,YAApB,QAAwC,2BAAxC;AACA,SAASrD,OAAO,IAAIsD,cAApB,QAA0C,6BAA1C;AACA,SAAStD,OAAO,IAAIuD,MAApB,QAAkC,4BAAlC;AACA,SAASvD,OAAO,IAAIwD,WAApB,QAAuC,0BAAvC;AACA,SAASxD,OAAO,IAAIyD,cAApB,QAA0C,6BAA1C;AACA,SAASzD,OAAO,IAAI0D,WAApB,QAAuC,0BAAvC;AACA,SAAS1D,OAAO,IAAI2D,uBAApB,QAAmD,sCAAnD;AACA,SAAS3D,OAAO,IAAI4D,oBAApB,QAAgD,mCAAhD;AACA,SAAS5D,OAAO,IAAI6D,MAApB,QAAkC,qBAAlC;AACA,SAAS7D,OAAO,IAAI8D,OAApB,QAAmC,sBAAnC;AACA,SAASC,YAAT,QAA6B,2BAA7B","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","ActionSheet","ActionSheetItem","ActionSheetCancel","Swiper","SwiperItem","Center","Circle","Square","Row","Stack","Spacer","RadioButton","RadioButtonGroup","RadioButtonRow","RadioButtonFieldGroup","Button","CardBlock","CardContainer","CardContainerRating","CardInline","DatePicker","HeaderLarge","HeaderMedium","HeaderOverline","Picker","ProgressBar","ProgressCircle","RowBodyIcon","RowHeadlineImageCaption","RowHeadlineImageIcon","Slider","Stepper","KeyboardAwareScrollView","useAuthState"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,WAAzC;AACA,SAASC,OAAO,IAAIC,QAApB,QAAoC,YAApC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,uBAAxC;AAEA,SAASC,IAAT,QAAqB,mBAArB;AACA,SAASC,WAAT,EAAsBC,aAAtB,QAA2C,qBAA3C;AACA,SAASL,OAAO,IAAIM,MAApB,QAAkC,0BAAlC;AACA,SAASN,OAAO,IAAIO,UAApB,QAAsC,yBAAtC;AACA,SAASP,OAAO,IAAIQ,IAApB,QAAg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C,OAAO,IAAI+C,SAApB,QAAqC,wBAArC;AACA,SAAS/C,OAAO,IAAIgD,aAApB,QAAyC,4BAAzC;AACA,SAAShD,OAAO,IAAIiD,mBAApB,QAA+C,kCAA/C;AACA,SAASjD,OAAO,IAAIkD,UAApB,QAAsC,yBAAtC;AACA,SAASlD,OAAO,IAAImD,UAApB,QAAsC,oCAAtC;AACA,SAASnD,OAAO,IAAIoD,WAApB,QAAuC,0BAAvC;AACA,SAASpD,OAAO,IAAIqD,YAApB,QAAwC,2BAAxC;AACA,SAASrD,OAAO,IAAIsD,cAApB,QAA0C,6BAA1C;AACA,SAAStD,OAAO,IAAIuD,MAApB,QAAkC,4BAAlC;AACA,SAASvD,OAAO,IAAIwD,WAApB,QAAuC,0BAAvC;AACA,SAASxD,OAAO,IAAIyD,cAApB,QAA0C,6BAA1C;AACA,SAASzD,OAAO,IAAI0D,WAApB,QAAuC,0BAAvC;AACA,SAAS1D,OAAO,IAAI2D,uBAApB,QAAmD,sCAAnD;AACA,SAAS3D,OAAO,IAAI4D,oBAApB,QAAgD,mCAAhD;AACA,SAAS5D,OAAO,IAAI6D,MAApB,QAAkC,qBAAlC;AACA,SAAS7D,OAAO,IAAI8D,OAApB,QAAmC,sBAAnC;AACA,SAAS9D,OAAO,IAAI+D,uBAApB,QAAmD,sCAAnD;AACA,SAASC,YAAT,QAA6B,2BAA7B","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { default as KeyboardAwareScrollView } from \"./components/KeyboardAwareScrollView\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
|
|
@@ -4,7 +4,9 @@ export const SEED_DATA = [{
|
|
|
4
4
|
tag: "Carousel",
|
|
5
5
|
category: COMPONENT_TYPES.media,
|
|
6
6
|
description: "A horizontal scrolling carousel of images",
|
|
7
|
-
layout: {
|
|
7
|
+
layout: {
|
|
8
|
+
height: 250
|
|
9
|
+
},
|
|
8
10
|
props: {
|
|
9
11
|
resizeMode: createResizeModeProp(),
|
|
10
12
|
dotColor: createColorProp({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.ts"],"names":["COMPONENT_TYPES","createResizeModeProp","createColorProp","SEED_DATA","name","tag","category","media","description","layout","props","resizeMode","dotColor","label"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,eAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,UADR;AAEEC,EAAAA,GAAG,EAAE,UAFP;AAGEC,EAAAA,QAAQ,EAAEN,eAAe,CAACO,KAH5B;AAIEC,EAAAA,WAAW,EAAE,2CAJf;AAKEC,EAAAA,MAAM,EAAE,
|
|
1
|
+
{"version":3,"sources":["Carousel.ts"],"names":["COMPONENT_TYPES","createResizeModeProp","createColorProp","SEED_DATA","name","tag","category","media","description","layout","height","props","resizeMode","dotColor","label"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,eAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,UADR;AAEEC,EAAAA,GAAG,EAAE,UAFP;AAGEC,EAAAA,QAAQ,EAAEN,eAAe,CAACO,KAH5B;AAIEC,EAAAA,WAAW,EAAE,2CAJf;AAKEC,EAAAA,MAAM,EAAE;AACNC,IAAAA,MAAM,EAAE;AADF,GALV;AAQEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAEX,oBAAoB,EAD3B;AAELY,IAAAA,QAAQ,EAAEX,eAAe,CAAC;AACxBY,MAAAA,KAAK,EAAE;AADiB,KAAD;AAFpB;AART,CADuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createResizeModeProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Carousel\",\n tag: \"Carousel\",\n category: COMPONENT_TYPES.media,\n description: \"A horizontal scrolling carousel of images\",\n layout: {\n height: 250,\n },\n props: {\n resizeMode: createResizeModeProp(),\n dotColor: createColorProp({\n label: \"Dot color\",\n }),\n },\n },\n];\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Keyboard Aware Scroll View",
|
|
4
|
+
tag: "KeyboardAwareScrollView",
|
|
5
|
+
description: "View that moves pushes the content when virtual keyboard is open.",
|
|
6
|
+
category: COMPONENT_TYPES.layout,
|
|
7
|
+
layout: {},
|
|
8
|
+
props: {
|
|
9
|
+
viewIsInsideTabBar: createStaticBoolProp({
|
|
10
|
+
label: "View Is Inside TabBar",
|
|
11
|
+
description: "Adds an extra offset that represents the TabBarIOS height."
|
|
12
|
+
}),
|
|
13
|
+
enableAutomaticScroll: createStaticBoolProp({
|
|
14
|
+
label: "Enable Automatic Scroll",
|
|
15
|
+
description: "When focus in TextInput will scroll the position, default is enabled"
|
|
16
|
+
}),
|
|
17
|
+
extraHeight: createStaticNumberProp({
|
|
18
|
+
label: "Extra Height",
|
|
19
|
+
description: "Adds an extra offset when focusing the TextInputs"
|
|
20
|
+
}),
|
|
21
|
+
extraScrollHeight: createStaticNumberProp({
|
|
22
|
+
label: "Extra Scroll Height",
|
|
23
|
+
description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard"
|
|
24
|
+
}),
|
|
25
|
+
enableResetScrollToCoords: createStaticBoolProp({
|
|
26
|
+
label: "Enable Reset Scroll To Coordinates",
|
|
27
|
+
description: "Lets the user enable or disable automatic resetScrollToCoords"
|
|
28
|
+
}),
|
|
29
|
+
keyboardOpeningTime: createStaticNumberProp({
|
|
30
|
+
label: "Keyboard Opening Time",
|
|
31
|
+
description: "Sets the delay time before scrolling to new position, default is 250"
|
|
32
|
+
}),
|
|
33
|
+
enableOnAndroid: createStaticBoolProp({
|
|
34
|
+
label: "Enable On Android",
|
|
35
|
+
description: "Enable Android Support"
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=KeyboardAwareScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,sBAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACvCU,MAAAA,KAAK,EAAE,uBADgC;AAEvCL,MAAAA,WAAW,EAAE;AAF0B,KAAD,CADnC;AAKLM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AAC1CU,MAAAA,KAAK,EAAE,yBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CALtC;AAULO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAClCS,MAAAA,KAAK,EAAE,cAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAV9B;AAcLQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,qBADiC;AAExCL,MAAAA,WAAW,EACT;AAHsC,KAAD,CAdpC;AAmBLS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC9CU,MAAAA,KAAK,EAAE,oCADuC;AAE9CL,MAAAA,WAAW,EACT;AAH4C,KAAD,CAnB1C;AAwBLU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AAC1CS,MAAAA,KAAK,EAAE,uBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CAxBtC;AA6BLW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AACpCU,MAAAA,KAAK,EAAE,mBAD6B;AAEpCL,MAAAA,WAAW,EAAE;AAFuB,KAAD;AA7BhC;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n },\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
viewIsInsideTabBar: boolean;
|
|
5
|
+
enableAutomaticScroll?: boolean;
|
|
6
|
+
extraHeight?: number;
|
|
7
|
+
extraScrollHeight?: number;
|
|
8
|
+
enableResetScrollToCoords?: boolean;
|
|
9
|
+
keyboardOpeningTime?: number;
|
|
10
|
+
enableOnAndroid?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const KeyboardAware: ({ children, ...props }: Props) => JSX.Element;
|
|
13
|
+
export default KeyboardAware;
|
|
@@ -46,4 +46,5 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
|
|
|
46
46
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
47
47
|
export { default as Slider } from "./components/Slider";
|
|
48
48
|
export { default as Stepper } from "./components/Stepper";
|
|
49
|
+
export { default as KeyboardAwareScrollView } from "./components/KeyboardAwareScrollView";
|
|
49
50
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: string;
|
|
6
|
+
layout: {};
|
|
7
|
+
props: {
|
|
8
|
+
viewIsInsideTabBar: {
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
formType: string;
|
|
12
|
+
propType: string;
|
|
13
|
+
defaultValue: boolean;
|
|
14
|
+
editable: boolean;
|
|
15
|
+
required: boolean;
|
|
16
|
+
group: string;
|
|
17
|
+
};
|
|
18
|
+
enableAutomaticScroll: {
|
|
19
|
+
label: string;
|
|
20
|
+
description: string;
|
|
21
|
+
formType: string;
|
|
22
|
+
propType: string;
|
|
23
|
+
defaultValue: boolean;
|
|
24
|
+
editable: boolean;
|
|
25
|
+
required: boolean;
|
|
26
|
+
group: string;
|
|
27
|
+
};
|
|
28
|
+
extraHeight: {
|
|
29
|
+
label: string;
|
|
30
|
+
description: string;
|
|
31
|
+
formType: string;
|
|
32
|
+
propType: string;
|
|
33
|
+
group: string;
|
|
34
|
+
defaultValue: null;
|
|
35
|
+
editable: boolean;
|
|
36
|
+
required: boolean;
|
|
37
|
+
step: number;
|
|
38
|
+
};
|
|
39
|
+
extraScrollHeight: {
|
|
40
|
+
label: string;
|
|
41
|
+
description: string;
|
|
42
|
+
formType: string;
|
|
43
|
+
propType: string;
|
|
44
|
+
group: string;
|
|
45
|
+
defaultValue: null;
|
|
46
|
+
editable: boolean;
|
|
47
|
+
required: boolean;
|
|
48
|
+
step: number;
|
|
49
|
+
};
|
|
50
|
+
enableResetScrollToCoords: {
|
|
51
|
+
label: string;
|
|
52
|
+
description: string;
|
|
53
|
+
formType: string;
|
|
54
|
+
propType: string;
|
|
55
|
+
defaultValue: boolean;
|
|
56
|
+
editable: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
group: string;
|
|
59
|
+
};
|
|
60
|
+
keyboardOpeningTime: {
|
|
61
|
+
label: string;
|
|
62
|
+
description: string;
|
|
63
|
+
formType: string;
|
|
64
|
+
propType: string;
|
|
65
|
+
group: string;
|
|
66
|
+
defaultValue: null;
|
|
67
|
+
editable: boolean;
|
|
68
|
+
required: boolean;
|
|
69
|
+
step: number;
|
|
70
|
+
};
|
|
71
|
+
enableOnAndroid: {
|
|
72
|
+
label: string;
|
|
73
|
+
description: string;
|
|
74
|
+
formType: string;
|
|
75
|
+
propType: string;
|
|
76
|
+
defaultValue: boolean;
|
|
77
|
+
editable: boolean;
|
|
78
|
+
required: boolean;
|
|
79
|
+
group: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.2.5-
|
|
3
|
+
"version": "43.2.5-e5eabd.3+e5eabd36",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"lodash.isnumber": "^3.0.3",
|
|
53
53
|
"lodash.omit": "^4.5.0",
|
|
54
54
|
"lodash.tonumber": "^4.0.3",
|
|
55
|
+
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
55
56
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
56
57
|
"react-native-typography": "^1.4.1",
|
|
57
58
|
"react-native-web-swiper": "^2.2.1"
|
|
@@ -79,5 +80,5 @@
|
|
|
79
80
|
]
|
|
80
81
|
]
|
|
81
82
|
},
|
|
82
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e5eabd36b53365dc628bb87f5e4d9eaa131285a3"
|
|
83
84
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
viewIsInsideTabBar: boolean;
|
|
7
|
+
enableAutomaticScroll?: boolean;
|
|
8
|
+
extraHeight?: number;
|
|
9
|
+
extraScrollHeight?: number;
|
|
10
|
+
enableResetScrollToCoords?: boolean;
|
|
11
|
+
keyboardOpeningTime?: number;
|
|
12
|
+
enableOnAndroid?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const KeyboardAware = ({ children, ...props }: Props) => (
|
|
16
|
+
<KeyboardAwareScrollView {...props}>{children}</KeyboardAwareScrollView>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default KeyboardAware;
|
|
@@ -15,15 +15,17 @@ const ToggleButton = ({ Icon, icon, toggled = false, onPress = () => { }, defaul
|
|
|
15
15
|
}
|
|
16
16
|
}, [defaultValue]);
|
|
17
17
|
const handlePress = () => {
|
|
18
|
-
setInternalValue(!
|
|
19
|
-
onPress(!
|
|
18
|
+
setInternalValue(!internalValue);
|
|
19
|
+
onPress(!internalValue);
|
|
20
20
|
};
|
|
21
21
|
return (React.createElement(IconButton, { Icon: Icon, icon: icon, size: iconSize, color: internalValue ? colors[color] : colors[colorSecondary], onPress: handlePress, disabled: disabled, style: [
|
|
22
22
|
styles.mainContainer,
|
|
23
23
|
{
|
|
24
24
|
width,
|
|
25
25
|
height,
|
|
26
|
-
backgroundColor:
|
|
26
|
+
backgroundColor: internalValue
|
|
27
|
+
? colors[colorSecondary]
|
|
28
|
+
: colors[color],
|
|
27
29
|
borderColor: colors[borderColor],
|
|
28
30
|
},
|
|
29
31
|
style,
|
|
@@ -56,8 +56,8 @@ const ToggleButton: React.FC<Props> = ({
|
|
|
56
56
|
}, [defaultValue]);
|
|
57
57
|
|
|
58
58
|
const handlePress = () => {
|
|
59
|
-
setInternalValue(!
|
|
60
|
-
onPress(!
|
|
59
|
+
setInternalValue(!internalValue);
|
|
60
|
+
onPress(!internalValue);
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return (
|
|
@@ -73,7 +73,9 @@ const ToggleButton: React.FC<Props> = ({
|
|
|
73
73
|
{
|
|
74
74
|
width,
|
|
75
75
|
height,
|
|
76
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: internalValue
|
|
77
|
+
? colors[colorSecondary]
|
|
78
|
+
: colors[color],
|
|
77
79
|
borderColor: colors[borderColor],
|
|
78
80
|
},
|
|
79
81
|
style,
|
package/src/index.js
CHANGED
|
@@ -47,4 +47,5 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
|
|
|
47
47
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
48
48
|
export { default as Slider } from "./components/Slider";
|
|
49
49
|
export { default as Stepper } from "./components/Stepper";
|
|
50
|
+
export { default as KeyboardAwareScrollView } from "./components/KeyboardAwareScrollView";
|
|
50
51
|
export { useAuthState } from "./components/useAuthState";
|
package/src/index.tsx
CHANGED
|
@@ -67,4 +67,5 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
|
|
|
67
67
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
68
68
|
export { default as Slider } from "./components/Slider";
|
|
69
69
|
export { default as Stepper } from "./components/Stepper";
|
|
70
|
+
export { default as KeyboardAwareScrollView } from "./components/KeyboardAwareScrollView";
|
|
70
71
|
export { useAuthState } from "./components/useAuthState";
|
package/src/mappings/Carousel.js
CHANGED
|
@@ -5,7 +5,9 @@ export const SEED_DATA = [
|
|
|
5
5
|
tag: "Carousel",
|
|
6
6
|
category: COMPONENT_TYPES.media,
|
|
7
7
|
description: "A horizontal scrolling carousel of images",
|
|
8
|
-
layout: {
|
|
8
|
+
layout: {
|
|
9
|
+
height: 250,
|
|
10
|
+
},
|
|
9
11
|
props: {
|
|
10
12
|
resizeMode: createResizeModeProp(),
|
|
11
13
|
dotColor: createColorProp({
|
package/src/mappings/Carousel.ts
CHANGED
|
@@ -10,7 +10,9 @@ export const SEED_DATA = [
|
|
|
10
10
|
tag: "Carousel",
|
|
11
11
|
category: COMPONENT_TYPES.media,
|
|
12
12
|
description: "A horizontal scrolling carousel of images",
|
|
13
|
-
layout: {
|
|
13
|
+
layout: {
|
|
14
|
+
height: 250,
|
|
15
|
+
},
|
|
14
16
|
props: {
|
|
15
17
|
resizeMode: createResizeModeProp(),
|
|
16
18
|
dotColor: createColorProp({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Keyboard Aware Scroll View",
|
|
4
|
+
tag: "KeyboardAwareScrollView",
|
|
5
|
+
description: "View that moves pushes the content when virtual keyboard is open.",
|
|
6
|
+
category: COMPONENT_TYPES.layout,
|
|
7
|
+
layout: {},
|
|
8
|
+
props: {
|
|
9
|
+
viewIsInsideTabBar: createStaticBoolProp({
|
|
10
|
+
label: "View Is Inside TabBar",
|
|
11
|
+
description: "Adds an extra offset that represents the TabBarIOS height.",
|
|
12
|
+
}),
|
|
13
|
+
enableAutomaticScroll: createStaticBoolProp({
|
|
14
|
+
label: "Enable Automatic Scroll",
|
|
15
|
+
description: "When focus in TextInput will scroll the position, default is enabled",
|
|
16
|
+
}),
|
|
17
|
+
extraHeight: createStaticNumberProp({
|
|
18
|
+
label: "Extra Height",
|
|
19
|
+
description: "Adds an extra offset when focusing the TextInputs",
|
|
20
|
+
}),
|
|
21
|
+
extraScrollHeight: createStaticNumberProp({
|
|
22
|
+
label: "Extra Scroll Height",
|
|
23
|
+
description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard",
|
|
24
|
+
}),
|
|
25
|
+
enableResetScrollToCoords: createStaticBoolProp({
|
|
26
|
+
label: "Enable Reset Scroll To Coordinates",
|
|
27
|
+
description: "Lets the user enable or disable automatic resetScrollToCoords",
|
|
28
|
+
}),
|
|
29
|
+
keyboardOpeningTime: createStaticNumberProp({
|
|
30
|
+
label: "Keyboard Opening Time",
|
|
31
|
+
description: "Sets the delay time before scrolling to new position, default is 250",
|
|
32
|
+
}),
|
|
33
|
+
enableOnAndroid: createStaticBoolProp({
|
|
34
|
+
label: "Enable On Android",
|
|
35
|
+
description: "Enable Android Support",
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createStaticBoolProp,
|
|
4
|
+
createStaticNumberProp,
|
|
5
|
+
} from "@draftbit/types";
|
|
6
|
+
|
|
7
|
+
export const SEED_DATA = {
|
|
8
|
+
name: "Keyboard Aware Scroll View",
|
|
9
|
+
tag: "KeyboardAwareScrollView",
|
|
10
|
+
description:
|
|
11
|
+
"View that moves pushes the content when virtual keyboard is open.",
|
|
12
|
+
category: COMPONENT_TYPES.layout,
|
|
13
|
+
layout: {},
|
|
14
|
+
props: {
|
|
15
|
+
viewIsInsideTabBar: createStaticBoolProp({
|
|
16
|
+
label: "View Is Inside TabBar",
|
|
17
|
+
description: "Adds an extra offset that represents the TabBarIOS height.",
|
|
18
|
+
}),
|
|
19
|
+
enableAutomaticScroll: createStaticBoolProp({
|
|
20
|
+
label: "Enable Automatic Scroll",
|
|
21
|
+
description:
|
|
22
|
+
"When focus in TextInput will scroll the position, default is enabled",
|
|
23
|
+
}),
|
|
24
|
+
extraHeight: createStaticNumberProp({
|
|
25
|
+
label: "Extra Height",
|
|
26
|
+
description: "Adds an extra offset when focusing the TextInputs",
|
|
27
|
+
}),
|
|
28
|
+
extraScrollHeight: createStaticNumberProp({
|
|
29
|
+
label: "Extra Scroll Height",
|
|
30
|
+
description:
|
|
31
|
+
"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard",
|
|
32
|
+
}),
|
|
33
|
+
enableResetScrollToCoords: createStaticBoolProp({
|
|
34
|
+
label: "Enable Reset Scroll To Coordinates",
|
|
35
|
+
description:
|
|
36
|
+
"Lets the user enable or disable automatic resetScrollToCoords",
|
|
37
|
+
}),
|
|
38
|
+
keyboardOpeningTime: createStaticNumberProp({
|
|
39
|
+
label: "Keyboard Opening Time",
|
|
40
|
+
description:
|
|
41
|
+
"Sets the delay time before scrolling to new position, default is 250",
|
|
42
|
+
}),
|
|
43
|
+
enableOnAndroid: createStaticBoolProp({
|
|
44
|
+
label: "Enable On Android",
|
|
45
|
+
description: "Enable Android Support",
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
};
|