@draftbit/core 43.2.4-aa029f.0 → 43.2.5-da45ce.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
  2. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +20 -4
  4. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  5. package/lib/commonjs/components/Divider.js +13 -3
  6. package/lib/commonjs/components/Divider.js.map +1 -1
  7. package/lib/commonjs/components/NumberInput.js +25 -17
  8. package/lib/commonjs/components/NumberInput.js.map +1 -1
  9. package/lib/commonjs/index.js +0 -14
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/mappings/FAB.js +1 -1
  12. package/lib/commonjs/mappings/FAB.js.map +1 -1
  13. package/lib/module/components/Accordion/AccordionItem.js +5 -22
  14. package/lib/module/components/Header.js.map +1 -1
  15. package/lib/module/components/NumberInput.js +27 -19
  16. package/lib/module/components/NumberInput.js.map +1 -1
  17. package/lib/module/index.js +0 -1
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/mappings/FAB.js +1 -1
  20. package/lib/module/mappings/FAB.js.map +1 -1
  21. package/lib/module/mappings/MapMarker.js.map +1 -1
  22. package/lib/typescript/src/components/NumberInput.d.ts +2 -1
  23. package/lib/typescript/src/index.d.ts +0 -1
  24. package/lib/typescript/src/mappings/FAB.d.ts +1 -1
  25. package/package.json +3 -5
  26. package/src/components/NumberInput.js +19 -14
  27. package/src/components/NumberInput.tsx +28 -19
  28. package/src/index.js +0 -1
  29. package/src/index.tsx +0 -1
  30. package/src/mappings/FAB.js +1 -1
  31. package/src/mappings/FAB.ts +1 -1
  32. package/lib/commonjs/components/TabView/TabView.js +0 -103
  33. package/lib/commonjs/components/TabView/TabView.js.map +0 -1
  34. package/lib/commonjs/components/TabView/TabViewItem.js +0 -27
  35. package/lib/commonjs/components/TabView/TabViewItem.js.map +0 -1
  36. package/lib/commonjs/components/TabView/index.js +0 -24
  37. package/lib/commonjs/components/TabView/index.js.map +0 -1
  38. package/lib/commonjs/mappings/TabView.js +0 -80
  39. package/lib/commonjs/mappings/TabView.js.map +0 -1
  40. package/lib/module/components/TabView/TabView.js +0 -88
  41. package/lib/module/components/TabView/TabView.js.map +0 -1
  42. package/lib/module/components/TabView/TabViewItem.js +0 -19
  43. package/lib/module/components/TabView/TabViewItem.js.map +0 -1
  44. package/lib/module/components/TabView/index.js +0 -3
  45. package/lib/module/components/TabView/index.js.map +0 -1
  46. package/lib/module/mappings/TabView.js +0 -71
  47. package/lib/module/mappings/TabView.js.map +0 -1
  48. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
  49. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
  50. package/lib/typescript/src/components/TabView/index.d.ts +0 -2
  51. package/lib/typescript/src/mappings/TabView.d.ts +0 -111
  52. package/src/components/TabView/TabView.js +0 -33
  53. package/src/components/TabView/TabView.tsx +0 -97
  54. package/src/components/TabView/TabViewItem.js +0 -5
  55. package/src/components/TabView/TabViewItem.tsx +0 -21
  56. package/src/components/TabView/index.js +0 -2
  57. package/src/components/TabView/index.ts +0 -2
  58. package/src/mappings/TabView.js +0 -73
  59. package/src/mappings/TabView.ts +0 -80
@@ -13,6 +13,8 @@ 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
+
16
18
  const getWidth = numColumns => {
17
19
  switch (numColumns) {
18
20
  case 1:
@@ -35,20 +37,6 @@ const Card = _ref => {
35
37
  ...rest
36
38
  } = _ref;
37
39
  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);
52
40
  return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
53
41
  disabled: !onPress,
54
42
  onPress: onPress,
@@ -1 +1 @@
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"]}
1
+ {"version":3,"sources":["DeprecatedCardWrapper.tsx"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;AACvC,UAAQA,UAAR;AACE,SAAK,CAAL;AACE,aAAO,KAAP;;AACF,SAAK,CAAL;AACE,aAAO,KAAP;;AACF;AACE,aAAO,MAAP;AANJ;AAQD,CATD;;AAWA,MAAMC,IAAqB,GAAG,QAMxB;AAAA,MANyB;AAC7BD,IAAAA,UAAU,GAAG,CADgB;AAE7BE,IAAAA,QAF6B;AAG7BC,IAAAA,OAH6B;AAI7BC,IAAAA,KAJ6B;AAK7B,OAAGC;AAL0B,GAMzB;AACJ,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBACE,6BAAC,kBAAD;AACE,IAAA,QAAQ,EAAE,CAACG,OADb;AAEE,IAAA,OAAO,EAAEA,OAFX;AAGE,IAAA,KAAK,EAAE,CAACC,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR;AAHT,KAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<Props> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"]}
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  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; }
29
29
 
30
- 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); }
31
-
32
30
  const FAB = _ref => {
33
31
  let {
34
32
  Icon,
@@ -130,7 +128,7 @@ const FAB = _ref => {
130
128
  style: [{
131
129
  elevation
132
130
  }, style]
133
- }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
131
+ }, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
134
132
  onPress: onPress,
135
133
  accessibilityState: {
136
134
  disabled
@@ -138,7 +136,7 @@ const FAB = _ref => {
138
136
  accessibilityRole: "button",
139
137
  disabled: disabled || loading,
140
138
  style: buttonStyles
141
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
139
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
142
140
  style: styles.content
143
141
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
144
142
  style: iconStyle
@@ -181,5 +179,23 @@ const styles = _reactNative.StyleSheet.create({
181
179
 
182
180
  var _default = (0, _theming.withTheme)(FAB);
183
181
 
182
+ exports.default = _default;
183
+ //# sourceMappingURL=DeprecatedFAB.js.map },
184
+ icon: {
185
+ alignItems: "center",
186
+ justifyContent: "center",
187
+ width: _Config.default.buttonIconSize
188
+ },
189
+ fixed: {
190
+ left: 0,
191
+ right: 0,
192
+ bottom: 0,
193
+ height: 64,
194
+ borderRadius: 0
195
+ }
196
+ });
197
+
198
+ var _default = (0, _theming.withTheme)(FAB);
199
+
184
200
  exports.default = _default;
185
201
  //# sourceMappingURL=DeprecatedFAB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DeprecatedFAB.tsx"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAuDA,MAAMA,GAAoB,GAAG,QAavB;AAAA,MAbwB;AAC5BC,IAAAA,IAD4B;AAE5BC,IAAAA,IAF4B;AAG5BC,IAAAA,QAAQ,GAAG,KAHiB;AAI5BC,IAAAA,IAAI,GAAG,OAJqB;AAK5BC,IAAAA,OAAO,GAAG,KALkB;AAM5BC,IAAA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0B,MAAX,CAAkB;AAC/BlB,EAAAA,MAAM,EAAE;AACNmB,IAAAA,WAAW,EAAE;AADP,GADuB;AAI/BjB,EAAAA,OAAO,EAAE;AACPkB,IAAAA,aAAa,EAAE,KADR;AAEPxB,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GAJsB;AAS/B/B,EAAAA,IAAI,EAAE;AACJ8B,IAAAA,UAAU,EAAE,QADR;AAEJC,IAAAA,cAAc,EAAE,QAFZ;AAGJS,IAAAA,KAAK,EAAEC,gBAAOC;AAHV,GATyB;AAc/Ba,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,KAAK,EAAE,CAFF;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILd,IAAAA,MAAM,EAAE,EAJH;AAKLf,IAAAA,YAAY,EAAE;AALT;AAdwB,CAAlB,CAAf;;eAuBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A floating action button represents the primary action in an application.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/fab-1.png\" />\n * <img src=\"screenshots/fab-2.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { FAB } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <FAB\n * style={styles.fab}\n * type=\"outline\"\n * icon=\"add\"\n * onPress={() => console.log('Pressed')}\n * />\n * );\n *\n * const styles = StyleSheet.create({\n * fab: {\n * position: 'absolute',\n * margin: 16,\n * right: 0,\n * bottom: 0,\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"extended\" | \"outline\" | \"fixed\" | \"standard\";\n loading?: boolean;\n icon?: string;\n color?: string;\n label?: string;\n onPress: () => void;\n elevation?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n color: colorOverride,\n label,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle: StyleProp<ViewStyle> = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n const buttonStyles: StyleProp<ViewStyle>[] = [styles.button, buttonStyle];\n\n const contentStyle: StyleProp<ViewStyle>[] = [styles.content];\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n };\n\n const iconStyle: StyleProp<ViewStyle>[] = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n\n textStyle.margin = 16;\n }\n\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n\n return (\n <Elevation style={[{ elevation }, style]}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={buttonStyles}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n {label ? (\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {label}\n </Text>\n ) : null}\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\n\nexport default withTheme(FAB);\n"]}
1
+ {"version":3,"sources":["DeprecatedFAB.js"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;AAAA,MAAtM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,KAAK,EAAEC,aAAxE;AAAuFC,IAAAA,KAAvF;AAA8FC,IAAAA,OAA9F;AAAuGC,IAAAA,SAAS,GAAG,CAAnH;AAAsHC,IAAAA,KAAtH;AAA6HC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAApI;AAAwL,OAAGC;AAA3L,GAAsM;AAC/M,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AACA,MAAInB,IAAI,KAAK,UAAT,IAAuBA,IAAI,KAAK,UAAhC,IAA8CA,IAAI,KAAK,OAA3D,EAAoE;AAChEc,IAAAA,eAAe,GAAGI,WAAlB;;AACA,QAAInB,QAAJ,EAAc;AACViB,MAAAA,SAAS,GAAG,oBAAMP,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;AACH,KAFD,MAGK;AACDP,MAAAA,SAAS,GAAGP,MAAM,CAACW,OAAnB;AACH;AACJ,GARD,MASK;AACDN,IAAAA,eAAe,GAAG,aAAlB;;AACA,QAAIf,QAAJ,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H1B,IAAAA,MAAM,EAAE,EAJL;AAKHf,IAAAA,YAAY,EAAE;AALX;AAdsB,CAAlB,CAAf;;eAsBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"]}
@@ -15,8 +15,6 @@ 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
-
20
18
  const Divider = _ref => {
21
19
  let {
22
20
  style,
@@ -26,7 +24,19 @@ const Divider = _ref => {
26
24
  },
27
25
  ...rest
28
26
  } = _ref;
29
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
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({
30
40
  style: [{
31
41
  backgroundColor: color || colors.divider,
32
42
  height: _reactNative.StyleSheet.hairlineWidth
@@ -1 +1 @@
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"]}
1
+ {"version":3,"sources":["Divider.js"],"names":["Divider","style","color","theme","colors","rest","React","createElement","View","backgroundColor","divider","height","StyleSheet","hairlineWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,OAAO,GAAG,QAAkD;AAAA,MAAjD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAAvB;AAAmC,OAAGC;AAAtC,GAAiD;AAC9D,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEP,IAAAA,KAAK,EAAE,CACnC;AACIQ,MAAAA,eAAe,EAAEP,KAAK,IAAIE,MAAM,CAACM,OADrC;AAEIC,MAAAA,MAAM,EAAEC,wBAAWC;AAFvB,KADmC,EAKnCZ,KALmC,CAAT;AAM3B,OAAGI;AANwB,GAA1B,CAAR;AAOH,CARD;;eASe,wBAAUL,OAAV,C","sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst Divider = ({ style, color, theme: { colors }, ...rest }) => {\n return (React.createElement(View, { style: [\n {\n backgroundColor: color || colors.divider,\n height: StyleSheet.hairlineWidth,\n },\n style,\n ], ...rest }));\n};\nexport default withTheme(Divider);\n"]}
@@ -15,40 +15,48 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
15
15
 
16
16
  const NumberInput = _ref => {
17
17
  let {
18
- defaultValue,
19
18
  onChangeText,
19
+ value,
20
+ defaultValue,
20
21
  ...props
21
22
  } = _ref;
22
23
 
23
- const [internalValue, setInternalValue] = _react.default.useState(defaultValue);
24
+ const [isDecimal, setIsDecimal] = _react.default.useState(value && !Number.isInteger(value));
24
25
 
25
26
  _react.default.useEffect(() => {
26
- if (defaultValue != null) {
27
- setInternalValue(defaultValue);
27
+ if (value) {
28
+ setIsDecimal(value.toString().includes("."));
28
29
  }
29
- }, [defaultValue]);
30
-
31
- const handleChangeText = value => {
32
- setInternalValue(value);
30
+ }, [value]);
33
31
 
32
+ const handleChangeText = newValue => {
34
33
  if (onChangeText) {
35
- onChangeText(stringToInteger(value));
34
+ const parsedNumber = parseFloat(newValue);
35
+ const number = isNaN(parsedNumber) ? 0 : parsedNumber;
36
+ setIsDecimal(newValue.includes("."));
37
+ onChangeText(number);
36
38
  }
37
39
  };
38
40
 
41
+ let strValue;
42
+
43
+ if (value != undefined) {
44
+ strValue = value.toString();
45
+
46
+ if (isDecimal && !strValue.includes(".")) {
47
+ strValue = `${strValue}.`;
48
+ }
49
+ }
50
+
39
51
  return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
40
- keyboardType: "numeric",
41
- onChangeText: handleChangeText
52
+ keyboardType: "numeric"
42
53
  }, props, {
43
- value: internalValue
54
+ value: strValue,
55
+ defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString(),
56
+ onChangeText: handleChangeText
44
57
  }));
45
58
  };
46
59
 
47
- const stringToInteger = str => {
48
- const number = parseFloat(str);
49
- return isNaN(number) ? 0 : number;
50
- };
51
-
52
60
  var _default = NumberInput; // comment to try to fix sourcemap issue
53
61
 
54
62
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["NumberInput.tsx"],"names":["NumberInput","defaultValue","onChangeText","props","internalValue","setInternalValue","React","useState","useEffect","handleChangeText","value","stringToInteger","str","number","parseFloat","isNaN"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAOA,MAAMA,WAA4B,GAAG,QAI/B;AAAA,MAJgC;AACpCC,IAAAA,YADoC;AAEpCC,IAAAA,YAFoC;AAGpC,OAAGC;AAHiC,GAIhC;;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,eAAMC,QAAN,CAAeN,YAAf,CAA1C;;AAEAK,iBAAME,SAAN,CAAgB,MAAM;AACpB,QAAIP,YAAY,IAAI,IAApB,EAA0B;AACxBI,MAAAA,gBAAgB,CAACJ,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMQ,gBAAgB,GAAIC,KAAD,IAAmB;AAC1CL,IAAAA,gBAAgB,CAACK,KAAD,CAAhB;;AACA,QAAIR,YAAJ,EAAkB;AAChBA,MAAAA,YAAY,CAACS,eAAe,CAACD,KAAD,CAAhB,CAAZ;AACD;AACF,GALD;;AAOA,sBACE,6BAAC,sBAAD;AACE,IAAA,YAAY,EAAC,SADf;AAEE,IAAA,YAAY,EAAED;AAFhB,KAGMN,KAHN;AAIE,IAAA,KAAK,EAAEC;AAJT,KADF;AAQD,CA5BD;;AA8BA,MAAMO,eAAe,GAAIC,GAAD,IAAqC;AAC3D,QAAMC,MAAM,GAAGC,UAAU,CAACF,GAAD,CAAzB;AACA,SAAOG,KAAK,CAACF,MAAD,CAAL,GAAgB,CAAhB,GAAoBA,MAA3B;AACD,CAHD;;eAKeb,W,EAEf","sourcesContent":["import React from \"react\";\nimport { TextInput as NativeNumberInput } from \"react-native\";\n\ninterface Props {\n defaultValue?: string;\n onChangeText: (value?: number) => void;\n}\n\nconst NumberInput: React.FC<Props> = ({\n defaultValue,\n onChangeText,\n ...props\n}) => {\n const [internalValue, setInternalValue] = React.useState(defaultValue);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handleChangeText = (value: string) => {\n setInternalValue(value);\n if (onChangeText) {\n onChangeText(stringToInteger(value));\n }\n };\n\n return (\n <NativeNumberInput\n keyboardType=\"numeric\"\n onChangeText={handleChangeText}\n {...props}\n value={internalValue}\n />\n );\n};\n\nconst stringToInteger = (str: string | undefined): number => {\n const number = parseFloat(str as string);\n return isNaN(number) ? 0 : number;\n};\n\nexport default NumberInput;\n\n// comment to try to fix sourcemap issue\n"]}
1
+ {"version":3,"sources":["NumberInput.tsx"],"names":["NumberInput","onChangeText","value","defaultValue","props","isDecimal","setIsDecimal","React","useState","Number","isInteger","useEffect","toString","includes","handleChangeText","newValue","parsedNumber","parseFloat","number","isNaN","strValue","undefined"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAQA,MAAMA,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,IAA4BC,eAAMC,QAAN,CAChCN,KAAK,IAAI,CAACO,MAAM,CAACC,SAAP,CAAiBR,KAAjB,CADsB,CAAlC;;AAGAK,iBAAMI,SAAN,CAAgB,MAAM;AACpB,QAAIT,KAAJ,EAAW;AACTI,MAAAA,YAAY,CAACJ,KAAK,CAACU,QAAN,GAAiBC,QAAjB,CAA0B,GAA1B,CAAD,CAAZ;AACD;AACF,GAJD,EAIG,CAACX,KAAD,CAJH;;AAMA,QAAMY,gBAAgB,GAAIC,QAAD,IAAsB;AAC7C,QAAId,YAAJ,EAAkB;AAChB,YAAMe,YAAY,GAAGC,UAAU,CAACF,QAAD,CAA/B;AACA,YAAMG,MAAM,GAAGC,KAAK,CAACH,YAAD,CAAL,GAAsB,CAAtB,GAA0BA,YAAzC;AACAV,MAAAA,YAAY,CAACS,QAAQ,CAACF,QAAT,CAAkB,GAAlB,CAAD,CAAZ;AACAZ,MAAAA,YAAY,CAACiB,MAAD,CAAZ;AACD;AACF,GAPD;;AASA,MAAIE,QAAJ;;AACA,MAAIlB,KAAK,IAAImB,SAAb,EAAwB;AACtBD,IAAAA,QAAQ,GAAGlB,KAAK,CAACU,QAAN,EAAX;;AACA,QAAIP,SAAS,IAAI,CAACe,QAAQ,CAACP,QAAT,CAAkB,GAAlB,CAAlB,EAA0C;AACxCO,MAAAA,QAAQ,GAAI,GAAEA,QAAS,GAAvB;AACD;AACF;;AAED,sBACE,6BAAC,sBAAD;AACE,IAAA,YAAY,EAAC;AADf,KAEMhB,KAFN;AAGE,IAAA,KAAK,EAAEgB,QAHT;AAIE,IAAA,YAAY,EAAEjB,YAAF,aAAEA,YAAF,uBAAEA,YAAY,CAAES,QAAd,EAJhB;AAKE,IAAA,YAAY,EAAEE;AALhB,KADF;AASD,CAzCD;;eA2Ced,W,EAEf","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"]}
@@ -357,18 +357,6 @@ Object.defineProperty(exports, "SwitchRow", {
357
357
  return _Switch.SwitchRow;
358
358
  }
359
359
  });
360
- Object.defineProperty(exports, "TabView", {
361
- enumerable: true,
362
- get: function () {
363
- return _TabView.TabView;
364
- }
365
- });
366
- Object.defineProperty(exports, "TabViewItem", {
367
- enumerable: true,
368
- get: function () {
369
- return _TabView.TabViewItem;
370
- }
371
- });
372
360
  Object.defineProperty(exports, "TextField", {
373
361
  enumerable: true,
374
362
  get: function () {
@@ -468,8 +456,6 @@ var _ActionSheet = require("./components/ActionSheet");
468
456
 
469
457
  var _Swiper = require("./components/Swiper");
470
458
 
471
- var _TabView = require("./components/TabView");
472
-
473
459
  var _Layout = require("./components/Layout");
474
460
 
475
461
  var _index = require("./components/RadioButton/index");
@@ -1 +1 @@
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;;AACA;;AAEA;;AASA;;AAQA;;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\";\nexport { TabView, TabViewItem } from \"./components/TabView\";\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":[],"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","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"]}
@@ -39,7 +39,7 @@ const SEED_DATA = {
39
39
  defaultValue: null,
40
40
  group: _types.GROUPS.basic
41
41
  }),
42
- iconSize: (0, _types.createIconSizeProp)()
42
+ size: (0, _types.createIconSizeProp)()
43
43
  }
44
44
  };
45
45
  exports.SEED_DATA = SEED_DATA;
@@ -1 +1 @@
1
- {"version":3,"sources":["FAB.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","button","description","layout","triggers","Triggers","OnPress","props","onPress","disabled","label","group","GROUPS","basic","loading","iconName","defaultValue","iconColor","bgColor","iconSize"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,GAAG,EAAE,KAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAHH;AAIvBC,EAAAA,WAAW,EAAE,uBAJU;AAKvBC,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CANa;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,QAAQ,EAAE,2BAAe;AACvBC,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,KAAK,EAAEC,cAAOC;AAFS,KAAf,CAFL;AAMLC,IAAAA,OAAO,EAAE,2BAAe;AACtBJ,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,KAAK,EAAEC,cAAOC;AAFQ,KAAf,CANJ;AAULE,IAAAA,QAAQ,EAAE,2BAAe;AACvBL,MAAAA,KAAK,EAAE,MADgB;AAEvBM,MAAAA,YAAY,EAAE,IAFS;AAGvBL,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAf,CAVL;AAeLI,IAAAA,SAAS,EAAE,4BAAgB;AACzBP,MAAAA,KAAK,EAAE,YADkB;AAEzBM,MAAAA,YAAY,EAAE,IAFW;AAGzBL,MAAAA,KAAK,EAAEC,cAAOC;AAHW,KAAhB,CAfN;AAoBLK,IAAAA,OAAO,EAAE,4BAAgB;AACvBR,MAAAA,KAAK,EAAE,kBADgB;AAEvBM,MAAAA,YAAY,EAAE,IAFS;AAGvBL,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAhB,CApBJ;AAyBLM,IAAAA,QAAQ,EAAE;AAzBL;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 iconSize: createIconSizeProp(),\n },\n};\n"]}
1
+ {"version":3,"sources":["FAB.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","button","description","layout","triggers","Triggers","OnPress","props","onPress","disabled","label","group","GROUPS","basic","loading","iconName","defaultValue","iconColor","bgColor","size"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,GAAG,EAAE,KAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAHH;AAIvBC,EAAAA,WAAW,EAAE,uBAJU;AAKvBC,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CANa;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,QAAQ,EAAE,2BAAe;AACvBC,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,KAAK,EAAEC,cAAOC;AAFS,KAAf,CAFL;AAMLC,IAAAA,OAAO,EAAE,2BAAe;AACtBJ,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,KAAK,EAAEC,cAAOC;AAFQ,KAAf,CANJ;AAULE,IAAAA,QAAQ,EAAE,2BAAe;AACvBL,MAAAA,KAAK,EAAE,MADgB;AAEvBM,MAAAA,YAAY,EAAE,IAFS;AAGvBL,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAf,CAVL;AAeLI,IAAAA,SAAS,EAAE,4BAAgB;AACzBP,MAAAA,KAAK,EAAE,YADkB;AAEzBM,MAAAA,YAAY,EAAE,IAFW;AAGzBL,MAAAA,KAAK,EAAEC,cAAOC;AAHW,KAAhB,CAfN;AAoBLK,IAAAA,OAAO,EAAE,4BAAgB;AACvBR,MAAAA,KAAK,EAAE,kBADgB;AAEvBM,MAAAA,YAAY,EAAE,IAFS;AAGvBL,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAhB,CApBJ;AAyBLM,IAAAA,IAAI,EAAE;AAzBD;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,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import * as React from "react";
2
4
  import { Pressable, StyleSheet, View } from "react-native";
3
5
  import Text from "../Text";
@@ -18,10 +20,9 @@ const AccordionItem = _ref => {
18
20
  textStyles,
19
21
  viewStyles
20
22
  } = extractStyles(style);
21
- return /*#__PURE__*/React.createElement(Pressable, {
22
- style: [styles.container, viewStyles],
23
- ...rest
24
- }, /*#__PURE__*/React.createElement(View, {
23
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
24
+ style: [styles.container, viewStyles]
25
+ }, rest), /*#__PURE__*/React.createElement(View, {
25
26
  style: styles.row
26
27
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
27
28
  name: icon,
@@ -54,22 +55,4 @@ const styles = StyleSheet.create({
54
55
  }
55
56
  });
56
57
  export default withTheme(AccordionItem);
57
- //# sourceMappingURL=AccordionItem.js.map container: {
58
- padding: 8
59
- },
60
- row: {
61
- flexDirection: "row",
62
- alignItems: "center",
63
- paddingLeft: 8
64
- },
65
- item: {
66
- marginVertical: 6,
67
- paddingLeft: 8
68
- },
69
- content: {
70
- flex: 1,
71
- justifyContent: "center"
72
- }
73
- });
74
- export default withTheme(AccordionItem);
75
58
  //# sourceMappingURL=AccordionItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Header.js"],"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","createElement","styles","container","topContainer","color","flex","numberOfLines","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","name","size","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,QAAwC,cAAxC;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AACA,MAAMC,MAAM,GAAG,QAAqI;AAAA,MAApI;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,cAAR;AAAwBC,IAAAA,UAAxB;AAAoCC,IAAAA,KAApC;AAA2CC,IAAAA,UAA3C;AAAuDC,IAAAA,gBAAvD;AAAyEC,IAAAA,IAAzE;AAA+EC,IAAAA,OAA/E;AAAwFC,IAA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AAR;AAAcoB,IAAAA,IAAI,EAAE5B,MAAM,CAAC6B,cAA3B;AAA2CX,IAAAA,KAAK,EAAEN,MAAM,CAACa;AAAzD,GAA1B,CARJ,CADQ,CARhB,CADI,eAmBJhC,KAAK,CAACqB,aAAN,CAAoBhB,OAApB,EAA6B;AAAEY,IAAAA,KAAK,EAAE;AAAEoB,MAAAA,SAAS,EAAEvB,gBAAgB,IAAI;AAAjC;AAAT,GAA7B,CAnBI,CAAR;AAoBH,CArBD;;AAsBA,MAAMQ,MAAM,GAAGnB,UAAU,CAACmC,MAAX,CAAkB;AAC7Bf,EAAAA,SAAS,EAAE;AACPK,IAAAA,SAAS,EAAE;AADJ,GADkB;AAI7BJ,EAAAA,YAAY,EAAE;AACVe,IAAAA,aAAa,EAAE,KADL;AAEVC,IAAAA,cAAc,EAAE,eAFN;AAGVC,IAAAA,UAAU,EAAE;AAHF,GAJe;AAS7BX,EAAAA,eAAe,EAAE;AACbS,IAAAA,aAAa,EAAE,KADF;AAEbC,IAAAA,cAAc,EAAE,QAFH;AAGbC,IAAAA,UAAU,EAAE;AAHC;AATY,CAAlB,CAAf;AAeA,eAAerC,SAAS,CAACI,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, Text, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\nconst Header = ({ Icon, titleTypeStyle, titleColor, title, buttonText, dividerTopMargin, icon, onPress, style, theme: { colors, typography }, }) => {\n return (React.createElement(View, { style: [styles.container, style] },\n React.createElement(View, { style: styles.topContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ], numberOfLines: 1 }, title),\n onPress && (React.createElement(Touchable, { style: { alignSelf: \"center\", marginLeft: 12 }, onPress: onPress },\n React.createElement(View, { style: styles.buttonContainer },\n React.createElement(Text, { style: [\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ], numberOfLines: 1 }, buttonText),\n React.createElement(Icon, { name: icon, size: Config.headerIconSize, color: colors.light }))))),\n React.createElement(Divider, { style: { marginTop: dividerTopMargin || 16 } })));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(Header);\n"]}
1
+ {"version":3,"sources":["Header.tsx"],"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","styles","container","topContainer","color","flex","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,IAFF,EAGEC,UAHF,QAOO,cAPP;AAQA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAiBA,MAAMC,MAAuB,GAAG,QAW1B;AAAA,MAX2B;AAC/BC,IAAAA,IAD+B;AAE/BC,IAAAA,cAF+B;AAG/BC,IAAAA,UAH+B;AAI/BC,IAAAA,KAJ+B;AAK/BC,IAAAA,UAL+B;AAM/BC,IAAAA,gBAN+B;AAO/BC,IAAAA,IAP+B;AAQ/BC,IAAAA,OAR+B;AAS/BC,IAAAA,KAT+B;AAU/BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAVwB,GAW3B;AACJ,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmBL,KAAnB;AAAb,kBACE,oBAA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E;AACfO,IAAAA,aAAa,EAAE,KADA;AAEfC,IAAAA,cAAc,EAAE,QAFD;AAGfC,IAAAA,UAAU,EAAE;AAHG;AATc,CAAlB,CAAf;AAgBA,eAAejC,SAAS,CAACI,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor: string;\n title: string;\n buttonText: string;\n dividerTopMargin?: number;\n icon: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst Header: React.FC<Props> = ({\n Icon,\n titleTypeStyle,\n titleColor,\n title,\n buttonText,\n dividerTopMargin,\n icon,\n onPress,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <View style={[styles.container, style]}>\n <View style={styles.topContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {onPress && (\n <Touchable\n style={{ alignSelf: \"center\", marginLeft: 12 }}\n onPress={onPress}\n >\n <View style={styles.buttonContainer}>\n <Text\n style={[\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ]}\n numberOfLines={1}\n >\n {buttonText}\n </Text>\n <Icon\n name={icon}\n size={Config.headerIconSize}\n color={colors.light}\n />\n </View>\n </Touchable>\n )}\n </View>\n <Divider style={{ marginTop: dividerTopMargin || 16 }} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\n\nexport default withTheme(Header);\n"]}
@@ -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 as NativeNumberInput } from "react-native";
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 [internalValue, setInternalValue] = React.useState(defaultValue);
13
+ const [isDecimal, setIsDecimal] = React.useState(value && !Number.isInteger(value));
13
14
  React.useEffect(() => {
14
- if (defaultValue != null) {
15
- setInternalValue(defaultValue);
15
+ if (value) {
16
+ setIsDecimal(value.toString().includes("."));
16
17
  }
17
- }, [defaultValue]);
18
-
19
- const handleChangeText = value => {
20
- setInternalValue(value);
18
+ }, [value]);
21
19
 
20
+ const handleChangeText = newValue => {
22
21
  if (onChangeText) {
23
- onChangeText(stringToInteger(value));
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
- return /*#__PURE__*/React.createElement(NativeNumberInput, _extends({
28
- keyboardType: "numeric",
29
- onChangeText: handleChangeText
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: internalValue
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","NativeNumberInput","NumberInput","defaultValue","onChangeText","props","internalValue","setInternalValue","useState","useEffect","handleChangeText","value","stringToInteger","str","number","parseFloat","isNaN"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAS,IAAIC,iBAAtB,QAA+C,cAA/C;;AAOA,MAAMC,WAA4B,GAAG,QAI/B;AAAA,MAJgC;AACpCC,IAAAA,YADoC;AAEpCC,IAAAA,YAFoC;AAGpC,OAAGC;AAHiC,GAIhC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCR,KAAK,CAACS,QAAN,CAAeL,YAAf,CAA1C;AAEAJ,EAAAA,KAAK,CAACU,SAAN,CAAgB,MAAM;AACpB,QAAIN,YAAY,IAAI,IAApB,EAA0B;AACxBI,MAAAA,gBAAgB,CAACJ,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMO,gBAAgB,GAAIC,KAAD,IAAmB;AAC1CJ,IAAAA,gBAAgB,CAACI,KAAD,CAAhB;;AACA,QAAIP,YAAJ,EAAkB;AAChBA,MAAAA,YAAY,CAACQ,eAAe,CAACD,KAAD,CAAhB,CAAZ;AACD;AACF,GALD;;AAOA,sBACE,oBAAC,iBAAD;AACE,IAAA,YAAY,EAAC,SADf;AAEE,IAAA,YAAY,EAAED;AAFhB,KAGML,KAHN;AAIE,IAAA,KAAK,EAAEC;AAJT,KADF;AAQD,CA5BD;;AA8BA,MAAMM,eAAe,GAAIC,GAAD,IAAqC;AAC3D,QAAMC,MAAM,GAAGC,UAAU,CAACF,GAAD,CAAzB;AACA,SAAOG,KAAK,CAACF,MAAD,CAAL,GAAgB,CAAhB,GAAoBA,MAA3B;AACD,CAHD;;AAKA,eAAeZ,WAAf,C,CAEA","sourcesContent":["import React from \"react\";\nimport { TextInput as NativeNumberInput } from \"react-native\";\n\ninterface Props {\n defaultValue?: string;\n onChangeText: (value?: number) => void;\n}\n\nconst NumberInput: React.FC<Props> = ({\n defaultValue,\n onChangeText,\n ...props\n}) => {\n const [internalValue, setInternalValue] = React.useState(defaultValue);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handleChangeText = (value: string) => {\n setInternalValue(value);\n if (onChangeText) {\n onChangeText(stringToInteger(value));\n }\n };\n\n return (\n <NativeNumberInput\n keyboardType=\"numeric\"\n onChangeText={handleChangeText}\n {...props}\n value={internalValue}\n />\n );\n};\n\nconst stringToInteger = (str: string | undefined): number => {\n const number = parseFloat(str as string);\n return isNaN(number) ? 0 : number;\n};\n\nexport default NumberInput;\n\n// comment to try to fix sourcemap issue\n"]}
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"]}
@@ -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! */
@@ -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","TabView","TabViewItem","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,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,QAAgC,mBAAhC;AACA,SAASR,OAAO,IAAIS,QAApB,QAAoC,uBAApC;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,WAAlC,QAAqD,uBAArD;AACA,SAASZ,OAAO,IAAIa,WAApB,QAAuC,0BAAvC;AACA,SAASb,OAAO,IAAIc,SAApB,QAAqC,wBAArC;AACA,SAASd,OAAO,IAAIe,OAApB,QAAmC,sBAAnC;AACA,SAASf,OAAO,IAAIgB,GAApB,QAA+B,kBAA/B;AACA,SAAShB,OAAO,IAAIiB,kBAApB,QAA8C,iCAA9C;AACA,SAASjB,OAAO,IAAIkB,UAApB,QAAsC,yBAAtC;AACA,SAASlB,OAAO,IAAImB,KAApB,QAAiC,oBAAjC;AACA,SAASnB,OAAO,IAAIoB,WAApB,QAAuC,0BAAvC;AACA,SAASpB,OAAO,IAAIqB,eAApB,QAA2C,8BAA3C;AACA,SAASrB,OAAO,IAAIsB,UAApB,QAAsC,yBAAtC;AACA,SAAStB,OAAO,IAAIuB,OAApB,QAAmC,sBAAnC;AACA,SAASvB,OAAO,IAAIwB,MAApB,EAA4BC,SAA5B,QAA6C,qBAA7C;AACA,SAASzB,OAAO,IAAI0B,SAApB,QA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AI+D,MAApB,QAAkC,qBAAlC;AACA,SAAS/D,OAAO,IAAIgE,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\";\nexport { TabView, TabViewItem } from \"./components/TabView\";\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","useAuthState"],"mappings":"AAAA,SAASA,UAAT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aAAzB,QAA8C,wBAA9C;AACA,SACEC,WADF,EAEEC,eAFF,EAGEC,iBAHF,QAIO,0BAJP;AAKA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,qBAAnC;AAEA,SACEC,MADF,EAEEC,MAFF,EAGEC,MAHF,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"]}
@@ -31,7 +31,7 @@ export const SEED_DATA = {
31
31
  defaultValue: null,
32
32
  group: GROUPS.basic
33
33
  }),
34
- iconSize: createIconSizeProp()
34
+ size: createIconSizeProp()
35
35
  }
36
36
  };
37
37
  //# sourceMappingURL=FAB.js.map
@@ -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","iconSize"],"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,QAAQ,EAAEvB,kBAAkB;AAzBvB;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 iconSize: createIconSizeProp(),\n },\n};\n"]}
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"]}