@draftbit/core 43.2.4-aa029f.0 → 43.2.5-23e15b.2
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/Carousel.js +0 -3
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Divider.js +13 -3
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/NumberInput.js +25 -17
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/RadioButton/index.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js +3 -3
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/index.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/FAB.js +1 -1
- package/lib/commonjs/mappings/FAB.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/theming.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +5 -22
- package/lib/module/components/Carousel.js +0 -3
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/NumberInput.js +27 -19
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/ToggleButton.js +3 -3
- package/lib/module/components/ToggleButton.js.map +1 -1
- package/lib/module/index.js +0 -1
- 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/FAB.js +1 -1
- package/lib/module/mappings/FAB.js.map +1 -1
- package/lib/module/mappings/MapMarker.js.map +1 -1
- package/lib/typescript/src/components/NumberInput.d.ts +2 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/Carousel.d.ts +3 -1
- package/lib/typescript/src/mappings/FAB.d.ts +1 -1
- package/package.json +3 -5
- package/src/components/Carousel.js +0 -3
- package/src/components/Carousel.tsx +0 -3
- package/src/components/NumberInput.js +19 -14
- package/src/components/NumberInput.tsx +28 -19
- package/src/components/ToggleButton.js +5 -3
- package/src/components/ToggleButton.tsx +5 -3
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/src/mappings/Carousel.js +3 -1
- package/src/mappings/Carousel.ts +3 -1
- package/src/mappings/FAB.js +1 -1
- package/src/mappings/FAB.ts +1 -1
- package/lib/commonjs/components/TabView/TabView.js +0 -103
- package/lib/commonjs/components/TabView/TabView.js.map +0 -1
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -27
- package/lib/commonjs/components/TabView/TabViewItem.js.map +0 -1
- package/lib/commonjs/components/TabView/index.js +0 -24
- package/lib/commonjs/components/TabView/index.js.map +0 -1
- package/lib/commonjs/mappings/TabView.js +0 -80
- package/lib/commonjs/mappings/TabView.js.map +0 -1
- package/lib/module/components/TabView/TabView.js +0 -88
- package/lib/module/components/TabView/TabView.js.map +0 -1
- package/lib/module/components/TabView/TabViewItem.js +0 -19
- package/lib/module/components/TabView/TabViewItem.js.map +0 -1
- package/lib/module/components/TabView/index.js +0 -3
- package/lib/module/components/TabView/index.js.map +0 -1
- package/lib/module/mappings/TabView.js +0 -71
- package/lib/module/mappings/TabView.js.map +0 -1
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -33
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.ts +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -1,41 +1,49 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { TextInput
|
|
4
|
+
import { TextInput } from "react-native";
|
|
5
5
|
|
|
6
6
|
const NumberInput = _ref => {
|
|
7
7
|
let {
|
|
8
|
-
defaultValue,
|
|
9
8
|
onChangeText,
|
|
9
|
+
value,
|
|
10
|
+
defaultValue,
|
|
10
11
|
...props
|
|
11
12
|
} = _ref;
|
|
12
|
-
const [
|
|
13
|
+
const [isDecimal, setIsDecimal] = React.useState(value && !Number.isInteger(value));
|
|
13
14
|
React.useEffect(() => {
|
|
14
|
-
if (
|
|
15
|
-
|
|
15
|
+
if (value) {
|
|
16
|
+
setIsDecimal(value.toString().includes("."));
|
|
16
17
|
}
|
|
17
|
-
}, [
|
|
18
|
-
|
|
19
|
-
const handleChangeText = value => {
|
|
20
|
-
setInternalValue(value);
|
|
18
|
+
}, [value]);
|
|
21
19
|
|
|
20
|
+
const handleChangeText = newValue => {
|
|
22
21
|
if (onChangeText) {
|
|
23
|
-
|
|
22
|
+
const parsedNumber = parseFloat(newValue);
|
|
23
|
+
const number = isNaN(parsedNumber) ? 0 : parsedNumber;
|
|
24
|
+
setIsDecimal(newValue.includes("."));
|
|
25
|
+
onChangeText(number);
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
let strValue;
|
|
30
|
+
|
|
31
|
+
if (value != undefined) {
|
|
32
|
+
strValue = value.toString();
|
|
33
|
+
|
|
34
|
+
if (isDecimal && !strValue.includes(".")) {
|
|
35
|
+
strValue = `${strValue}.`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/React.createElement(TextInput, _extends({
|
|
40
|
+
keyboardType: "numeric"
|
|
30
41
|
}, props, {
|
|
31
|
-
value:
|
|
42
|
+
value: strValue,
|
|
43
|
+
defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString(),
|
|
44
|
+
onChangeText: handleChangeText
|
|
32
45
|
}));
|
|
33
46
|
};
|
|
34
47
|
|
|
35
|
-
const stringToInteger = str => {
|
|
36
|
-
const number = parseFloat(str);
|
|
37
|
-
return isNaN(number) ? 0 : number;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
48
|
export default NumberInput; // comment to try to fix sourcemap issue
|
|
41
49
|
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["NumberInput.tsx"],"names":["React","TextInput","
|
|
1
|
+
{"version":3,"sources":["NumberInput.tsx"],"names":["React","TextInput","NumberInput","onChangeText","value","defaultValue","props","isDecimal","setIsDecimal","useState","Number","isInteger","useEffect","toString","includes","handleChangeText","newValue","parsedNumber","parseFloat","number","isNaN","strValue","undefined"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,cAA1B;;AAQA,MAAMC,WAA4B,GAAG,QAK/B;AAAA,MALgC;AACpCC,IAAAA,YADoC;AAEpCC,IAAAA,KAFoC;AAGpCC,IAAAA,YAHoC;AAIpC,OAAGC;AAJiC,GAKhC;AACJ,QAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4BR,KAAK,CAACS,QAAN,CAChCL,KAAK,IAAI,CAACM,MAAM,CAACC,SAAP,CAAiBP,KAAjB,CADsB,CAAlC;AAGAJ,EAAAA,KAAK,CAACY,SAAN,CAAgB,MAAM;AACpB,QAAIR,KAAJ,EAAW;AACTI,MAAAA,YAAY,CAACJ,KAAK,CAACS,QAAN,GAAiBC,QAAjB,CAA0B,GAA1B,CAAD,CAAZ;AACD;AACF,GAJD,EAIG,CAACV,KAAD,CAJH;;AAMA,QAAMW,gBAAgB,GAAIC,QAAD,IAAsB;AAC7C,QAAIb,YAAJ,EAAkB;AAChB,YAAMc,YAAY,GAAGC,UAAU,CAACF,QAAD,CAA/B;AACA,YAAMG,MAAM,GAAGC,KAAK,CAACH,YAAD,CAAL,GAAsB,CAAtB,GAA0BA,YAAzC;AACAT,MAAAA,YAAY,CAACQ,QAAQ,CAACF,QAAT,CAAkB,GAAlB,CAAD,CAAZ;AACAX,MAAAA,YAAY,CAACgB,MAAD,CAAZ;AACD;AACF,GAPD;;AASA,MAAIE,QAAJ;;AACA,MAAIjB,KAAK,IAAIkB,SAAb,EAAwB;AACtBD,IAAAA,QAAQ,GAAGjB,KAAK,CAACS,QAAN,EAAX;;AACA,QAAIN,SAAS,IAAI,CAACc,QAAQ,CAACP,QAAT,CAAkB,GAAlB,CAAlB,EAA0C;AACxCO,MAAAA,QAAQ,GAAI,GAAEA,QAAS,GAAvB;AACD;AACF;;AAED,sBACE,oBAAC,SAAD;AACE,IAAA,YAAY,EAAC;AADf,KAEMf,KAFN;AAGE,IAAA,KAAK,EAAEe,QAHT;AAIE,IAAA,YAAY,EAAEhB,YAAF,aAAEA,YAAF,uBAAEA,YAAY,CAAEQ,QAAd,EAJhB;AAKE,IAAA,YAAY,EAAEE;AALhB,KADF;AASD,CAzCD;;AA2CA,eAAeb,WAAf,C,CAEA","sourcesContent":["import React from \"react\";\nimport { TextInput } from \"react-native\";\n\ninterface Props {\n value?: number;\n defaultValue?: number;\n onChangeText: (value?: number) => void;\n}\n\nconst NumberInput: React.FC<Props> = ({\n onChangeText,\n value,\n defaultValue,\n ...props\n}) => {\n const [isDecimal, setIsDecimal] = React.useState(\n value && !Number.isInteger(value)\n );\n React.useEffect(() => {\n if (value) {\n setIsDecimal(value.toString().includes(\".\"));\n }\n }, [value]);\n\n const handleChangeText = (newValue: string) => {\n if (onChangeText) {\n const parsedNumber = parseFloat(newValue);\n const number = isNaN(parsedNumber) ? 0 : parsedNumber;\n setIsDecimal(newValue.includes(\".\"));\n onChangeText(number);\n }\n };\n\n let strValue;\n if (value != undefined) {\n strValue = value.toString();\n if (isDecimal && !strValue.includes(\".\")) {\n strValue = `${strValue}.`;\n }\n }\n\n return (\n <TextInput\n keyboardType=\"numeric\"\n {...props}\n value={strValue}\n defaultValue={defaultValue?.toString()}\n onChangeText={handleChangeText}\n />\n );\n};\n\nexport default NumberInput;\n\n// comment to try to fix sourcemap issue\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,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,CAACD,aAAF,CAAhB;AACAb,IAAAA,OAAO,CAAC,CAACa,aAAF,CAAP;AACD,GAHD;;AAKA,sBACE,oBAAC,UAAD;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,EAAEa,WALX;AAME,IAAA,QAAQ,EAAEf,QANZ;AAOE,IAAA,KAAK,EAAE,CACLgB,MAAM,CAACC,aADF,EAEL;AACEZ,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEY,MAAAA,eAAe,EAAEP,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,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
|
@@ -27,7 +27,6 @@ export { default as Touchable } from "./components/Touchable";
|
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
|
|
29
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
|
32
31
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
33
32
|
/* Deprecated: Fix or Delete! */
|
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","
|
|
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":"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","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"]}
|
|
@@ -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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FAB.ts"],"names":["COMPONENT_TYPES","createIconProp","createColorProp","GROUPS","createBoolProp","createIconSizeProp","createActionProp","Triggers","SEED_DATA","name","tag","category","button","description","layout","triggers","OnPress","props","onPress","disabled","label","group","basic","loading","iconName","defaultValue","iconColor","bgColor","
|
|
1
|
+
{"version":3,"sources":["FAB.ts"],"names":["COMPONENT_TYPES","createIconProp","createColorProp","GROUPS","createBoolProp","createIconSizeProp","createActionProp","Triggers","SEED_DATA","name","tag","category","button","description","layout","triggers","OnPress","props","onPress","disabled","label","group","basic","loading","iconName","defaultValue","iconColor","bgColor","size"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,MAJF,EAKEC,cALF,EAMEC,kBANF,EAOEC,gBAPF,EAQEC,QARF,QASO,iBATP;AAWA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,GAAG,EAAE,KAFkB;AAGvBC,EAAAA,QAAQ,EAAEX,eAAe,CAACY,MAHH;AAIvBC,EAAAA,WAAW,EAAE,uBAJU;AAKvBC,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,QAAQ,EAAE,CAACR,QAAQ,CAACS,OAAV,CANa;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAEZ,gBAAgB,EADpB;AAELa,IAAAA,QAAQ,EAAEf,cAAc,CAAC;AACvBgB,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,KAAK,EAAElB,MAAM,CAACmB;AAFS,KAAD,CAFnB;AAMLC,IAAAA,OAAO,EAAEnB,cAAc,CAAC;AACtBgB,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,KAAK,EAAElB,MAAM,CAACmB;AAFQ,KAAD,CANlB;AAULE,IAAAA,QAAQ,EAAEvB,cAAc,CAAC;AACvBmB,MAAAA,KAAK,EAAE,MADgB;AAEvBK,MAAAA,YAAY,EAAE,IAFS;AAGvBJ,MAAAA,KAAK,EAAElB,MAAM,CAACmB;AAHS,KAAD,CAVnB;AAeLI,IAAAA,SAAS,EAAExB,eAAe,CAAC;AACzBkB,MAAAA,KAAK,EAAE,YADkB;AAEzBK,MAAAA,YAAY,EAAE,IAFW;AAGzBJ,MAAAA,KAAK,EAAElB,MAAM,CAACmB;AAHW,KAAD,CAfrB;AAoBLK,IAAAA,OAAO,EAAEzB,eAAe,CAAC;AACvBkB,MAAAA,KAAK,EAAE,kBADgB;AAEvBK,MAAAA,YAAY,EAAE,IAFS;AAGvBJ,MAAAA,KAAK,EAAElB,MAAM,CAACmB;AAHS,KAAD,CApBnB;AAyBLM,IAAAA,IAAI,EAAEvB,kBAAkB;AAzBnB;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createIconProp,\n createColorProp,\n GROUPS,\n createBoolProp,\n createIconSizeProp,\n createActionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"FAB\",\n tag: \"FAB\",\n category: COMPONENT_TYPES.button,\n description: \"A mini round icon FAB\",\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n disabled: createBoolProp({\n label: \"Disabled\",\n group: GROUPS.basic,\n }),\n loading: createBoolProp({\n label: \"Loading\",\n group: GROUPS.basic,\n }),\n iconName: createIconProp({\n label: \"Icon\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n iconColor: createColorProp({\n label: \"Icon color\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n bgColor: createColorProp({\n label: \"Background color\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n size: createIconSizeProp(),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MapMarker.
|
|
1
|
+
{"version":3,"sources":["MapMarker.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","SEED_DATA","name","tag","description","category","deprecated","layout","props","latitude","label","required","precision","min","max","longitude","title","defaultValue","flat","group","basic","pinColor"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,cALF,EAMEC,MANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,YADiB;AAEvBC,EAAAA,GAAG,EAAE,WAFkB;AAGvBC,EAAAA,WAAW,EAAE,kCAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,UAJH;AAKvBC,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAEX,gBAAgB,CAAC;AACzBY,MAAAA,KAAK,EAAE,UADkB;AAEzBN,MAAAA,WAAW,EAAE,6CAFY;AAGzBO,MAAAA,QAAQ,EAAE,IAHe;AAIzBC,MAAAA,SAAS,EAAE,CAJc;AAKzBC,MAAAA,GAAG,EAAE,CAAC,EALmB;AAMzBC,MAAAA,GAAG,EAAE;AANoB,KAAD,CADrB;AASLC,IAAAA,SAAS,EAAEjB,gBAAgB,CAAC;AAC1BY,MAAAA,KAAK,EAAE,WADmB;AAE1BN,MAAAA,WAAW,EAAE,8CAFa;AAG1BO,MAAAA,QAAQ,EAAE,IAHgB;AAI1BC,MAAAA,SAAS,EAAE,CAJe;AAK1BC,MAAAA,GAAG,EAAE,CAAC,GALoB;AAM1BC,MAAAA,GAAG,EAAE;AANqB,KAAD,CATtB;AAiBLE,IAAAA,KAAK,EAAEjB,cAAc,CAAC;AACpBW,MAAAA,KAAK,EAAE,OADa;AAEpBN,MAAAA,WAAW,EAAE,qCAFO;AAGpBa,MAAAA,YAAY,EAAE;AAHM,KAAD,CAjBhB;AAsBLb,IAAAA,WAAW,EAAEL,cAAc,CAAC;AAC1BW,MAAAA,KAAK,EAAE,aADmB;AAE1BN,MAAAA,WAAW,EAAE,qCAFa;AAG1Ba,MAAAA,YAAY,EAAE;AAHY,KAAD,CAtBtB;AA2BLC,IAAAA,IAAI,EAAEtB,cAAc,CAAC;AACnBc,MAAAA,KAAK,EAAE,MADY;AAEnBN,MAAAA,WAAW,EACT,+GAHiB;AAInBe,MAAAA,KAAK,EAAEnB,MAAM,CAACoB,KAJK;AAKnBH,MAAAA,YAAY,EAAE;AALK,KAAD,CA3Bf;AAkCLI,IAAAA,QAAQ,EAAExB,eAAe,CAAC;AACxBa,MAAAA,KAAK,EAAE,WADiB;AAExBN,MAAAA,WAAW,EAAE;AAFW,KAAD;AAlCpB;AANgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map Marker\",\n tag: \"MapMarker\",\n description: \"A marker to show inside map view\",\n category: COMPONENT_TYPES.deprecated,\n layout: {},\n props: {\n latitude: createNumberProp({\n label: \"Latitude\",\n description: \"The latitude in which the marker is located\",\n required: true,\n precision: 6,\n min: -90,\n max: 90,\n }),\n longitude: createNumberProp({\n label: \"Longitude\",\n description: \"The longitude in which the marker is located\",\n required: true,\n precision: 6,\n min: -180,\n max: 180,\n }),\n title: createTextProp({\n label: \"Title\",\n description: \"Title to show along with the marker\",\n defaultValue: null,\n }),\n description: createTextProp({\n label: \"Description\",\n description: \"Optional description for the marker\",\n defaultValue: null,\n }),\n flat: createBoolProp({\n label: \"Flat\",\n description:\n \"Sets whether this marker should be flat against the map (if true) or a billboard facing the camera (if false)\",\n group: GROUPS.basic,\n defaultValue: false,\n }),\n pinColor: createColorProp({\n label: \"Pin Color\",\n description: \"Sets the color of the marker\",\n }),\n },\n};\n"]}
|
|
@@ -27,7 +27,6 @@ export { default as Touchable } from "./components/Touchable";
|
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
29
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
32
31
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
33
32
|
export { default as Button } from "./components/DeprecatedButton";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.2.
|
|
3
|
+
"version": "43.2.5-23e15b.2+23e15b10",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^43.2.
|
|
44
|
+
"@draftbit/types": "^43.2.4",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.1.7",
|
|
@@ -53,8 +53,6 @@
|
|
|
53
53
|
"lodash.omit": "^4.5.0",
|
|
54
54
|
"lodash.tonumber": "^4.0.3",
|
|
55
55
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
56
|
-
"react-native-pager-view": "^5.4.9",
|
|
57
|
-
"react-native-tab-view": "^3.1.1",
|
|
58
56
|
"react-native-typography": "^1.4.1",
|
|
59
57
|
"react-native-web-swiper": "^2.2.1"
|
|
60
58
|
},
|
|
@@ -81,5 +79,5 @@
|
|
|
81
79
|
]
|
|
82
80
|
]
|
|
83
81
|
},
|
|
84
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "23e15b109921528f9dd4b462d7f8fe3e5372db8c"
|
|
85
83
|
}
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TextInput
|
|
3
|
-
const NumberInput = ({
|
|
4
|
-
const [
|
|
2
|
+
import { TextInput } from "react-native";
|
|
3
|
+
const NumberInput = ({ onChangeText, value, defaultValue, ...props }) => {
|
|
4
|
+
const [isDecimal, setIsDecimal] = React.useState(value && !Number.isInteger(value));
|
|
5
5
|
React.useEffect(() => {
|
|
6
|
-
if (
|
|
7
|
-
|
|
6
|
+
if (value) {
|
|
7
|
+
setIsDecimal(value.toString().includes("."));
|
|
8
8
|
}
|
|
9
|
-
}, [
|
|
10
|
-
const handleChangeText = (
|
|
11
|
-
setInternalValue(value);
|
|
9
|
+
}, [value]);
|
|
10
|
+
const handleChangeText = (newValue) => {
|
|
12
11
|
if (onChangeText) {
|
|
13
|
-
|
|
12
|
+
const parsedNumber = parseFloat(newValue);
|
|
13
|
+
const number = isNaN(parsedNumber) ? 0 : parsedNumber;
|
|
14
|
+
setIsDecimal(newValue.includes("."));
|
|
15
|
+
onChangeText(number);
|
|
14
16
|
}
|
|
15
17
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
let strValue;
|
|
19
|
+
if (value != undefined) {
|
|
20
|
+
strValue = value.toString();
|
|
21
|
+
if (isDecimal && !strValue.includes(".")) {
|
|
22
|
+
strValue = `${strValue}.`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (React.createElement(TextInput, { keyboardType: "numeric", ...props, value: strValue, defaultValue: defaultValue?.toString(), onChangeText: handleChangeText }));
|
|
21
26
|
};
|
|
22
27
|
export default NumberInput;
|
|
23
28
|
// comment to try to fix sourcemap issue
|
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TextInput
|
|
2
|
+
import { TextInput } from "react-native";
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
-
|
|
5
|
+
value?: number;
|
|
6
|
+
defaultValue?: number;
|
|
6
7
|
onChangeText: (value?: number) => void;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
const NumberInput: React.FC<Props> = ({
|
|
10
|
-
defaultValue,
|
|
11
11
|
onChangeText,
|
|
12
|
+
value,
|
|
13
|
+
defaultValue,
|
|
12
14
|
...props
|
|
13
15
|
}) => {
|
|
14
|
-
const [
|
|
15
|
-
|
|
16
|
+
const [isDecimal, setIsDecimal] = React.useState(
|
|
17
|
+
value && !Number.isInteger(value)
|
|
18
|
+
);
|
|
16
19
|
React.useEffect(() => {
|
|
17
|
-
if (
|
|
18
|
-
|
|
20
|
+
if (value) {
|
|
21
|
+
setIsDecimal(value.toString().includes("."));
|
|
19
22
|
}
|
|
20
|
-
}, [
|
|
23
|
+
}, [value]);
|
|
21
24
|
|
|
22
|
-
const handleChangeText = (
|
|
23
|
-
setInternalValue(value);
|
|
25
|
+
const handleChangeText = (newValue: string) => {
|
|
24
26
|
if (onChangeText) {
|
|
25
|
-
|
|
27
|
+
const parsedNumber = parseFloat(newValue);
|
|
28
|
+
const number = isNaN(parsedNumber) ? 0 : parsedNumber;
|
|
29
|
+
setIsDecimal(newValue.includes("."));
|
|
30
|
+
onChangeText(number);
|
|
26
31
|
}
|
|
27
32
|
};
|
|
28
33
|
|
|
34
|
+
let strValue;
|
|
35
|
+
if (value != undefined) {
|
|
36
|
+
strValue = value.toString();
|
|
37
|
+
if (isDecimal && !strValue.includes(".")) {
|
|
38
|
+
strValue = `${strValue}.`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
29
42
|
return (
|
|
30
|
-
<
|
|
43
|
+
<TextInput
|
|
31
44
|
keyboardType="numeric"
|
|
32
|
-
onChangeText={handleChangeText}
|
|
33
45
|
{...props}
|
|
34
|
-
value={
|
|
46
|
+
value={strValue}
|
|
47
|
+
defaultValue={defaultValue?.toString()}
|
|
48
|
+
onChangeText={handleChangeText}
|
|
35
49
|
/>
|
|
36
50
|
);
|
|
37
51
|
};
|
|
38
52
|
|
|
39
|
-
const stringToInteger = (str: string | undefined): number => {
|
|
40
|
-
const number = parseFloat(str as string);
|
|
41
|
-
return isNaN(number) ? 0 : number;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
53
|
export default NumberInput;
|
|
45
54
|
|
|
46
55
|
// comment to try to fix sourcemap issue
|
|
@@ -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
|
@@ -27,7 +27,6 @@ export { default as Touchable } from "./components/Touchable";
|
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
29
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
32
31
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
33
32
|
/* Deprecated: Fix or Delete! */
|
package/src/index.tsx
CHANGED
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({
|
package/src/mappings/FAB.js
CHANGED