@draftbit/core 43.4.4-03ab3e.0 → 43.4.5-8f3f2c.1

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 (51) hide show
  1. package/lib/commonjs/components/FAB.js +5 -19
  2. package/lib/commonjs/components/FAB.js.map +1 -1
  3. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  4. package/lib/commonjs/components/RadioButton/RadioButton.js +9 -6
  5. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  6. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +18 -8
  7. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  8. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +14 -9
  9. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  10. package/lib/commonjs/components/RadioButton/index.js.map +1 -1
  11. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  12. package/lib/commonjs/components/StarRating.js +5 -4
  13. package/lib/commonjs/components/StarRating.js.map +1 -1
  14. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  15. package/lib/commonjs/components/Touchable.js +3 -16
  16. package/lib/commonjs/components/Touchable.js.map +1 -1
  17. package/lib/commonjs/hooks.js.map +1 -1
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/mappings/Accordion.js.map +1 -1
  20. package/lib/commonjs/mappings/LinearGradient.js +2 -2
  21. package/lib/commonjs/mappings/LinearGradient.js.map +1 -1
  22. package/lib/commonjs/styles/overlay.js.map +1 -1
  23. package/lib/commonjs/utilities.js +7 -0
  24. package/lib/commonjs/utilities.js.map +1 -1
  25. package/lib/module/components/RadioButton/RadioButton.js +8 -6
  26. package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
  27. package/lib/module/components/RadioButton/RadioButtonGroup.js +17 -8
  28. package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
  29. package/lib/module/components/RadioButton/RadioButtonRow.js +15 -10
  30. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  31. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  32. package/lib/module/mappings/FAB.js.map +1 -1
  33. package/lib/module/mappings/LinearGradient.js +2 -2
  34. package/lib/module/mappings/LinearGradient.js.map +1 -1
  35. package/lib/module/mappings/RowHeadlineImageCaption.js.map +1 -1
  36. package/lib/module/utilities.js +4 -0
  37. package/lib/module/utilities.js.map +1 -1
  38. package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +1 -1
  39. package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +1 -1
  40. package/lib/typescript/src/utilities.d.ts +1 -0
  41. package/package.json +2 -2
  42. package/src/components/RadioButton/RadioButton.js +9 -5
  43. package/src/components/RadioButton/RadioButton.tsx +12 -9
  44. package/src/components/RadioButton/RadioButtonGroup.js +14 -8
  45. package/src/components/RadioButton/RadioButtonGroup.tsx +21 -12
  46. package/src/components/RadioButton/RadioButtonRow.js +15 -9
  47. package/src/components/RadioButton/RadioButtonRow.tsx +19 -13
  48. package/src/mappings/LinearGradient.js +2 -2
  49. package/src/mappings/LinearGradient.ts +2 -2
  50. package/src/utilities.js +11 -0
  51. package/src/utilities.ts +8 -0
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+
18
20
  const FAB = _ref => {
19
21
  let {
20
22
  onPress,
@@ -38,7 +40,7 @@ const FAB = _ref => {
38
40
  borderRadius: size / 2,
39
41
  overflow: "hidden"
40
42
  }, style]
41
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
43
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
42
44
  onPress: onPress,
43
45
  disabled: loading || disabled,
44
46
  android_ripple: {
@@ -56,9 +58,8 @@ const FAB = _ref => {
56
58
  borderRadius: size / 2,
57
59
  backgroundColor
58
60
  }];
59
- },
60
- ...props
61
- }, /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
61
+ }
62
+ }, props), /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
62
63
  style: size > 50 ? {
63
64
  marginTop: 2,
64
65
  marginLeft: 2
@@ -88,20 +89,5 @@ const styles = _reactNative.StyleSheet.create({
88
89
 
89
90
  var _default = (0, _theming.withTheme)(FAB);
90
91
 
91
- exports.default = _default;
92
- //# sourceMappingURL=FAB.js.map backgroundColor: "#5a45ff",
93
- justifyContent: "center",
94
- alignItems: "center",
95
- ..._reactNative.Platform.select({
96
- web: {
97
- cursor: "pointer",
98
- userSelect: "none"
99
- }
100
- })
101
- }
102
- });
103
-
104
- var _default = (0, _theming.withTheme)(FAB);
105
-
106
92
  exports.default = _default;
107
93
  //# sourceMappingURL=FAB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["FAB.js"],"names":["FAB","onPress","disabled","loading","iconName","style","theme","iconColor","bgColor","size","Icon","props","backgroundColor","colors","primary","color","React","createElement","View","width","height","borderRadius","overflow","Pressable","android_ripple","radius","pressed","styles","button","opacity","ActivityIndicator","marginTop","marginLeft","undefined","name","StyleSheet","create","justifyContent","alignItems","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,GAAG,GAAG,QAAiI;AAAA,MAAhI;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,QAAX;AAAqBC,IAAAA,OAArB;AAA8BC,IAAAA,QAAQ,GAAG,mBAAzC;AAA8DC,IAAAA,KAA9D;AAAqEC,IAAAA,KAArE;AAA4EC,IAAAA,SAA5E;AAAuFC,IAAAA,OAAvF;AAAgGC,IAAAA,IAAI,GAAG,EAAvG;AAA2GC,IAAAA,IAA3G;AAAiH,OAAGC;AAApH,GAAgI;AACzI,QAAMC,eAAe,GAAGJ,OAAO,IAAIF,KAAK,CAACO,MAAN,CAAaC,OAAhD;AACA,QAAMC,KAAK,GAAGR,SAAS,IAAI,MAA3B;AACA,sBAAQS,KAAK,CAACC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEb,IAAAA,KAAK,EAAE,CACnC;AACIc,MAAAA,KAAK,EAAEV,IADX;AAEIW,MAAAA,MAAM,EAAEX,IAFZ;AAGIY,MAAAA,YAAY,EAAEZ,IAAI,GAAG,CAHzB;AAIIa,MAAAA,QAAQ,EAAE;AAJd,KADmC,EAOnCjB,KAPmC;AAAT,GAA1B,eASJW,KAAK,CAACC,aAAN,CAAoBM,sBAApB,EAA+B;AAAEtB,IAAAA,OAAO,EAAEA,OAAX;AAAoBC,IAAAA,QAAQ,EAAEC,OAAO,IAAID,QAAzC;AAAmDsB,IAAAA,cAAc,EAAE;AAC1FT,MAAAA,KAAK,EAAE,MADmF;AAE1FU,MAAAA,MAAM,EAAEhB,IAAI,GAAG;AAF2E,KAAnE;AAGxBJ,IAAAA,KAAK,EAAE,SAAiB;AAAA,UAAhB;AAAEqB,QAAAA;AAAF,OA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AAlB,CAAf;;eAae,wBAAU3C,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, Pressable, ActivityIndicator, Platform, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ onPress, disabled, loading, iconName = \"MaterialIcons/add\", style, theme, iconColor, bgColor, size = 50, Icon, ...props }) => {\n const backgroundColor = bgColor || theme.colors.primary;\n const color = iconColor || \"#FFF\";\n return (React.createElement(View, { style: [\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: \"hidden\",\n },\n style,\n ] },\n React.createElement(Pressable, { onPress: onPress, disabled: loading || disabled, android_ripple: {\n color: \"#333\",\n radius: size / 4,\n }, style: ({ pressed }) => {\n return [\n styles.button,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor,\n },\n ];\n }, ...props },\n React.createElement(View, null, loading ? (React.createElement(ActivityIndicator, { style: size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined, size: size <= 50 ? \"small\" : \"large\", color: color })) : (React.createElement(Icon, { name: iconName, size: size, color: color }))))));\n};\nconst styles = StyleSheet.create({\n button: {\n backgroundColor: \"#5a45ff\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\nexport default withTheme(FAB);\n"]}
1
+ {"version":3,"sources":["FAB.tsx"],"names":["FAB","onPress","disabled","loading","iconName","style","theme","iconColor","bgColor","size","Icon","props","backgroundColor","colors","primary","color","width","height","borderRadius","overflow","radius","pressed","styles","button","opacity","marginTop","marginLeft","undefined","StyleSheet","create","justifyContent","alignItems","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;;;;;;;AAiBA,MAAMA,GAAoB,GAAG,QAYvB;AAAA,MAZwB;AAC5BC,IAAAA,OAD4B;AAE5BC,IAAAA,QAF4B;AAG5BC,IAAAA,OAH4B;AAI5BC,IAA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E,CAAb;AAAgBC,MAAAA,UAAU,EAAE;AAA5B,KAAZ,GAA8CC,SADvD;AAEE,IAAA,IAAI,EAAElB,IAAI,IAAI,EAAR,GAAa,OAAb,GAAuB,OAF/B;AAGE,IAAA,KAAK,EAAEM;AAHT,IADM,gBAON,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAEX,QAAZ;AAAsB,IAAA,IAAI,EAAEK,IAA5B;AAAkC,IAAA,KAAK,EAAEM;AAAzC,IARJ,CArBF,CAXF,CADF;AA+CD,CA/DD;;AAiEA,MAAMO,MAAM,GAAGM,wBAAWC,MAAX,CAAkB;AAC/BN,EAAAA,MAAM,EAAE;AACNX,IAAAA,eAAe,EAAE,SADX;AAENkB,IAAAA,cAAc,EAAE,QAFV;AAGNC,IAAAA,UAAU,EAAE,QAHN;AAIN,OAAGC,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,MAAM,EAAE,SADL;AAEHC,QAAAA,UAAU,EAAE;AAFT;AADY,KAAhB;AAJG;AADuB,CAAlB,CAAf;;eAce,wBAAUpC,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n Pressable,\n ActivityIndicator,\n StyleProp,\n ViewStyle,\n PressableProps,\n Platform,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n disabled?: boolean;\n loading?: boolean;\n size?: number;\n bgColor?: string;\n iconColor?: string;\n iconName?: string;\n onPress: () => void;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & PressableProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n onPress,\n disabled,\n loading,\n iconName = \"MaterialIcons/add\",\n style,\n theme,\n iconColor,\n bgColor,\n size = 50,\n Icon,\n ...props\n}) => {\n const backgroundColor = bgColor || theme.colors.primary;\n const color = iconColor || \"#FFF\";\n\n return (\n <View\n style={[\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: \"hidden\",\n },\n style,\n ]}\n >\n <Pressable\n onPress={onPress}\n disabled={loading || disabled}\n android_ripple={{\n color: \"#333\",\n radius: size / 4,\n }}\n style={({ pressed }) => {\n return [\n styles.button,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor,\n },\n ];\n }}\n {...props}\n >\n <View>\n {loading ? (\n <ActivityIndicator\n style={size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined}\n size={size <= 50 ? \"small\" : \"large\"}\n color={color}\n />\n ) : (\n <Icon name={iconName} size={size} color={color} />\n )}\n </View>\n </Pressable>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n backgroundColor: \"#5a45ff\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\n\nexport default withTheme(FAB);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["HeaderOverline.tsx"],"names":["HeaderOverline","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","overline","light","toUpperCase"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;;;;;;;AAYA,MAAMA,cAA+B,GAAG,QAQlC;AAAA,MARmC;AACvCC,IAAAA,IADuC;AAEvCC,IAAAA,KAFuC;AAGvCC,IAAAA,UAHuC;AAIvCC,IAAAA,IAJuC;AAKvCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CALqB;AAMvCC,IAAAA,KANuC;AAOvCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAPgC,GAQnC;AACJ,sBACE,oBAAC,eAAD;AACE,IAAA,IAAI,EAAER,IADR;AAEE,IAAA,cAAc,EAAEQ,UAAU,CAACC,QAF7B;AAGE,IAAA,UAAU,EAAEF,MAAM,CAACG,KAHrB;AAIE,IAAA,KAAK,EAAET,KAAK,IAAIA,KAAK,CAACU,WAAN,EAJlB;AAKE,IAAA,UAAU,EAAET,UALd;AAME,IAAA,IAAI,EAAEC,IANR;AAOE,IAAA,gBAAgB,EAAE,EAPpB;AAQE,IAAA,OAAO,EAAEC,OARX;AASE,IAAA,KAAK,EAAEC;AATT,IADF;AAaD,CAtBD;;eAwBe,wBAAUN,cAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderOverline: React.FC<Props> = ({\n Icon,\n title,\n buttonText,\n icon,\n onPress = () => {},\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Header\n Icon={Icon}\n titleTypeStyle={typography.overline}\n titleColor={colors.light}\n title={title && title.toUpperCase()}\n buttonText={buttonText}\n icon={icon}\n dividerTopMargin={12}\n onPress={onPress}\n style={style}\n />\n );\n};\n\nexport default withTheme(HeaderOverline);\n"]}
1
+ {"version":3,"sources":["HeaderOverline.js"],"names":["HeaderOverline","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","React","createElement","Header","titleTypeStyle","overline","titleColor","light","toUpperCase","dividerTopMargin"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,cAAc,GAAG,QAAmG;AAAA,MAAlG;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,KAAR;AAAeC,IAAAA,UAAf;AAA2BC,IAAAA,IAA3B;AAAiCC,IAAAA,OAAO,GAAG,MAAM,CAAG,CAApD;AAAsDC,IAAAA,KAAtD;AAA6DC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAApE,GAAkG;AACtH,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,eAApB,EAA4B;AAAEX,IAAAA,IAAI,EAAEA,IAAR;AAAcY,IAAAA,cAAc,EAAEJ,UAAU,CAACK,QAAzC;AAAmDC,IAAAA,UAAU,EAAEP,MAAM,CAACQ,KAAtE;AAA6Ed,IAAAA,KAAK,EAAEA,KAAK,IAAIA,KAAK,CAACe,WAAN,EAA7F;AAAkHd,IAAAA,UAAU,EAAEA,UAA9H;AAA0IC,IAAAA,IAAI,EAAEA,IAAhJ;AAAsJc,IAAAA,gBAAgB,EAAE,EAAxK;AAA4Kb,IAAAA,OAAO,EAAEA,OAArL;AAA8LC,IAAAA,KAAK,EAAEA;AAArM,GAA5B,CAAR;AACH,CAFD;;eAGe,wBAAUN,cAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Header from \"./Header\";\nconst HeaderOverline = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {\n return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.overline, titleColor: colors.light, title: title && title.toUpperCase(), buttonText: buttonText, icon: icon, dividerTopMargin: 12, onPress: onPress, style: style }));\n};\nexport default withTheme(HeaderOverline);\n"]}
@@ -11,6 +11,8 @@ var _Config = _interopRequireDefault(require("../Config"));
11
11
 
12
12
  var _IconButton = _interopRequireDefault(require("../IconButton"));
13
13
 
14
+ var _utilities = require("../../utilities");
15
+
14
16
  var _context = require("./context");
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -29,7 +31,7 @@ const RadioButton = _ref => {
29
31
  value,
30
32
  selected,
31
33
  unselectedColor,
32
- onPress = () => {},
34
+ onPress,
33
35
  size = _Config.default.radioButtonSize,
34
36
  selectedIcon = "MaterialIcons/radio-button-checked",
35
37
  unselectedIcon = "MaterialIcons/radio-button-unchecked",
@@ -40,16 +42,17 @@ const RadioButton = _ref => {
40
42
  value: contextValue,
41
43
  onValueChange
42
44
  } = (0, _context.useRadioButtonGroupContext)();
45
+ const realValue = (0, _utilities.getRealValue)(value);
46
+ const realContextValue = (0, _utilities.getRealValue)(contextValue);
47
+ const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue && realValue && realContextValue === realValue;
43
48
 
44
49
  const handlePress = () => {
45
- onPress && onPress();
46
-
47
- if (onValueChange && value) {
48
- onValueChange(value);
50
+ if (realValue) {
51
+ onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
52
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
49
53
  }
50
54
  };
51
55
 
52
- const isSelected = selected || contextValue != null && contextValue === value;
53
56
  return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
54
57
  Icon: Icon,
55
58
  icon: isSelected ? selectedIcon : unselectedIcon,
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButton.tsx"],"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","handlePress","isSelected"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,WAAuC,GAAG,QAa1C;AAAA,MAb2C;AAC/CC,IAAAA,IAD+C;AAE/CC,IAAAA,QAAQ,GAAG,KAFoC;AAG/CC,IAAAA,KAH+C;AAI/CC,IAAAA,KAJ+C;AAK/CC,IAAAA,QAL+C;AAM/CC,IAAAA,eAN+C;AAO/CC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAP6B;AAQ/CC,IAAAA,IAAI,GAAGC,gBAAOC,eARiC;AAS/CC,IAAAA,YAAY,GAAG,oCATgC;AAU/CC,IAAAA,cAAc,GAAG,sCAV8B;AAW/CC,IAAAA,KAX+C;AAY/C,OAAGC;AAZ4C,GAa3C;AACJ,QAAM;AAAEV,IAAAA,KAAK,EAAEW,YAAT;AAAuBC,IAAAA;AAAvB,MAAyC,0CAA/C;;AAEA,QAAMC,WAAW,GAAG,MAAM;AACxBV,IAAAA,OAAO,IAAIA,OAAO,EAAlB;;AAEA,QAAIS,aAAa,IAAIZ,KAArB,EAA4B;AAC1BY,MAAAA,aAAa,CAACZ,KAAD,CAAb;AACD;AACF,GAND;;AAQA,QAAMc,UAAU,GACdb,QAAQ,IAAKU,YAAY,IAAI,IAAhB,IAAwBA,YAAY,KAAKX,KADxD;AAGA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEH,IADR;AAEE,IAAA,IAAI,EAAEiB,UAAU,GAAGP,YAAH,GAAkBC,cAFpC;AAGE,IAAA,KAAK,EAAEM,UAAU,GAAGf,KAAH,GAAWG,eAH9B;AAIE,IAAA,QAAQ,EAAEJ,QAJZ;AAKE,IAAA,OAAO,EAAEe,WALX;AAME,IAAA,IAAI,EAAET,IANR;AAOE,IAAA,KAAK,EAAEK;AAPT,KAQMC,IARN,EADF;AAYD,CAvCD;;eAyCed,W","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { useRadioButtonGroupContext } from \"./context\";\n\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nexport type RadioButtonProps = {\n selected?: boolean;\n disabled?: boolean;\n color?: string;\n value?: string;\n unselectedColor?: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n size?: number;\n selectedIcon?: string;\n unselectedIcon?: string;\n} & IconSlot;\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n Icon,\n disabled = false,\n color,\n value,\n selected,\n unselectedColor,\n onPress = () => {},\n size = Config.radioButtonSize,\n selectedIcon = \"MaterialIcons/radio-button-checked\",\n unselectedIcon = \"MaterialIcons/radio-button-unchecked\",\n style,\n ...rest\n}) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n\n const handlePress = () => {\n onPress && onPress();\n\n if (onValueChange && value) {\n onValueChange(value);\n }\n };\n\n const isSelected =\n selected || (contextValue != null && contextValue === value);\n\n return (\n <IconButton\n Icon={Icon}\n icon={isSelected ? selectedIcon : unselectedIcon}\n color={isSelected ? color : unselectedColor}\n disabled={disabled}\n onPress={handlePress}\n size={size}\n style={style}\n {...rest}\n />\n );\n};\n\nexport default RadioButton;\n"]}
1
+ {"version":3,"sources":["RadioButton.tsx"],"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,WAAuC,GAAG,QAa1C;AAAA,MAb2C;AAC/CC,IAAAA,IAD+C;AAE/CC,IAAAA,QAAQ,GAAG,KAFoC;AAG/CC,IAAAA,KAH+C;AAI/CC,IAAAA,KAJ+C;AAK/CC,IAAAA,QAL+C;AAM/CC,IAAAA,eAN+C;AAO/CC,IAAAA,OAP+C;AAQ/CC,IAAAA,IAAI,GAAGC,gBAAOC,eARiC;AAS/CC,IAAAA,YAAY,GAAG,oCATgC;AAU/CC,IAAAA,cAAc,GAAG,sCAV8B;AAW/CC,IAAAA,KAX+C;AAY/C,OAAGC;AAZ4C,GAa3C;AACJ,QAAM;AAAEV,IAAAA,KAAK,EAAEW,YAAT;AAAuBC,IAAAA;AAAvB,MAAyC,0CAA/C;AAEA,QAAMC,SAAS,GAAG,6BAAab,KAAb,CAAlB;AACA,QAAMc,gBAAgB,GAAG,6BAAaH,YAAb,CAAzB;AACA,QAAMI,UAAU,GACdd,QADc,aACdA,QADc,cACdA,QADc,GAEba,gBAAgB,IAAID,SAApB,IAAiCC,gBAAgB,KAAKD,SAFzD;;AAIA,QAAMG,WAAW,GAAG,MAAM;AACxB,QAAIH,SAAJ,EAAe;AACbV,MAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGU,SAAH,CAAP;AACAD,MAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGC,SAAH,CAAb;AACD;AACF,GALD;;AAOA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEkB,UAAU,GAAGR,YAAH,GAAkBC,cAFpC;AAGE,IAAA,KAAK,EAAEO,UAAU,GAAGhB,KAAH,GAAWG,eAH9B;AAIE,IAAA,QAAQ,EAAEJ,QAJZ;AAKE,IAAA,OAAO,EAAEkB,WALX;AAME,IAAA,IAAI,EAAEZ,IANR;AAOE,IAAA,KAAK,EAAEK;AAPT,KAQMC,IARN,EADF;AAYD,CAzCD;;eA2Ced,W","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getRealValue } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\n\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nexport type RadioButtonProps = {\n selected?: boolean;\n disabled?: boolean;\n color?: string;\n value?: string;\n unselectedColor?: string;\n onPress?: (value: string) => void;\n style?: StyleProp<ViewStyle>;\n size?: number;\n selectedIcon?: string;\n unselectedIcon?: string;\n} & IconSlot;\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n Icon,\n disabled = false,\n color,\n value,\n selected,\n unselectedColor,\n onPress,\n size = Config.radioButtonSize,\n selectedIcon = \"MaterialIcons/radio-button-checked\",\n unselectedIcon = \"MaterialIcons/radio-button-unchecked\",\n style,\n ...rest\n}) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n\n const realValue = getRealValue(value);\n const realContextValue = getRealValue(contextValue);\n const isSelected =\n selected ??\n (realContextValue && realValue && realContextValue === realValue);\n\n const handlePress = () => {\n if (realValue) {\n onPress?.(realValue);\n onValueChange?.(realValue);\n }\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={isSelected ? selectedIcon : unselectedIcon}\n color={isSelected ? color : unselectedColor}\n disabled={disabled}\n onPress={handlePress}\n size={size}\n style={style}\n {...rest}\n />\n );\n};\n\nexport default RadioButton;\n"]}
@@ -9,6 +9,8 @@ var React = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
+ var _utilities = require("../../utilities");
13
+
12
14
  var _context = require("./context");
13
15
 
14
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -25,27 +27,35 @@ const RadioButtonGroup = _ref => {
25
27
  let {
26
28
  direction = _context.Direction.Vertical,
27
29
  value,
28
- onValueChange = () => {},
30
+ onValueChange,
29
31
  defaultValue,
30
32
  style,
31
33
  children,
32
34
  ...rest
33
35
  } = _ref;
34
- const [internalValue, setInternalValue] = React.useState(value || defaultValue);
36
+ const [internalValue, setInternalValue] = React.useState();
35
37
  React.useEffect(() => {
36
- if (value != null) {
37
- setInternalValue(value);
38
+ const realValue = (0, _utilities.getRealValue)(value);
39
+
40
+ if (realValue) {
41
+ setInternalValue(realValue);
38
42
  }
39
43
  }, [value]);
40
44
  React.useEffect(() => {
41
- if (defaultValue != null) {
42
- setInternalValue(defaultValue);
45
+ const realDefaultValue = (0, _utilities.getRealValue)(defaultValue);
46
+
47
+ if (realDefaultValue) {
48
+ setInternalValue(realDefaultValue);
43
49
  }
44
50
  }, [defaultValue]);
45
51
 
46
52
  const handleValueChange = newValue => {
47
- setInternalValue(newValue);
48
- onValueChange(newValue);
53
+ const realNewValue = (0, _utilities.getRealValue)(newValue);
54
+
55
+ if (realNewValue) {
56
+ setInternalValue(newValue);
57
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(newValue);
58
+ }
49
59
  };
50
60
 
51
61
  const _containerStyle = [{
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonGroup.tsx"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","handleValueChange","newValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;;;AAWA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGC,mBAAUC,QADmC;AAEzDC,IAAAA,KAFyD;AAGzDC,IAAAA,aAAa,GAAG,MAAM,CAAE,CAHiC;AAIzDC,IAAAA,YAJyD;AAKzDC,IAAAA,KALyD;AAMzDC,IAAAA,QANyD;AAOzD,OAAGC;AAPsD,GAQrD;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCT,KAAK,IAAIE,YAD+B,CAA1C;AAIAM,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIV,KAAK,IAAI,IAAb,EAAmB;AACjBO,MAAAA,gBAAgB,CAACP,KAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,KAAD,CAJH;AAMAQ,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIR,YAAY,IAAI,IAApB,EAA0B;AACxBK,MAAAA,gBAAgB,CAACL,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMS,iBAAiB,GAAIC,QAAD,IAAsB;AAC9CL,IAAAA,gBAAgB,CAACK,QAAD,CAAhB;AACAX,IAAAA,aAAa,CAACW,QAAD,CAAb;AACD,GAHD;;AAKA,QAAMC,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAEjB,SAAS,KAAKC,mBAAUiB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAIlB,SAAS,KAAKC,mBAAUC,QAA5B,EAAsC;AACpCc,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBf,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADnB;AAELL,MAAAA,aAAa,EAAEU,iBAFV;AAGLd,MAAAA;AAHK;AADT,kBAOE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEgB;AAAb,KAA+BT,QAA/B,CAPF,CADF,CADF;AAaD,CAvDD;;eAyDeR,gB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value?: string;\n onValueChange?: (value: string) => void;\n defaultValue?: string;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value,\n onValueChange = () => {},\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<string | undefined>(\n value || defaultValue\n );\n\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string) => {\n setInternalValue(newValue);\n onValueChange(newValue);\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue || \"\",\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"]}
1
+ {"version":3,"sources":["RadioButtonGroup.tsx"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAWA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGC,mBAAUC,QADmC;AAEzDC,IAAAA,KAFyD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,YAJyD;AAKzDC,IAAAA,KALyD;AAMzDC,IAAAA,QANyD;AAOzD,OAAGC;AAPsD,GAQrD;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,EAA1C;AAIAD,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,UAAMC,SAAS,GAAG,6BAAaX,KAAb,CAAlB;;AAEA,QAAIW,SAAJ,EAAe;AACbJ,MAAAA,gBAAgB,CAACI,SAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACX,KAAD,CANH;AAQAQ,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,UAAME,gBAAgB,GAAG,6BAAaV,YAAb,CAAzB;;AAEA,QAAIU,gBAAJ,EAAsB;AACpBL,MAAAA,gBAAgB,CAACK,gBAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACV,YAAD,CANH;;AAQA,QAAMW,iBAAiB,GAAIC,QAAD,IAAmB;AAC3C,UAAMC,YAAY,GAAG,6BAAaD,QAAb,CAArB;;AAEA,QAAIC,YAAJ,EAAkB;AAChBR,MAAAA,gBAAgB,CAACO,QAAD,CAAhB;AACAb,MAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGa,QAAH,CAAb;AACD;AACF,GAPD;;AASA,QAAME,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAEpB,SAAS,KAAKC,mBAAUoB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAIrB,SAAS,KAAKC,mBAAUC,QAA5B,EAAsC;AACpCiB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBlB,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADnB;AAELL,MAAAA,aAAa,EAAEY,iBAFV;AAGLhB,MAAAA;AAHK;AADT,kBAOE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEmB;AAAb,KAA+BZ,QAA/B,CAPF,CADF,CADF;AAaD,CA/DD;;eAiEeR,gB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getRealValue } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value?: string;\n onValueChange?: (value: string) => void;\n defaultValue?: string | number;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value,\n onValueChange,\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<\n string | undefined\n >();\n\n React.useEffect(() => {\n const realValue = getRealValue(value);\n\n if (realValue) {\n setInternalValue(realValue);\n }\n }, [value]);\n\n React.useEffect(() => {\n const realDefaultValue = getRealValue(defaultValue);\n\n if (realDefaultValue) {\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: any) => {\n const realNewValue = getRealValue(newValue);\n\n if (realNewValue) {\n setInternalValue(newValue);\n onValueChange?.(newValue);\n }\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue || \"\",\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"]}
@@ -45,13 +45,13 @@ const getRadioButtonAlignment = (parentDirection, direction) => {
45
45
  }
46
46
  };
47
47
 
48
- const renderLabel = (value, labelStyle, textStyle) => {
49
- if (typeof value === "string") {
48
+ const renderLabel = (label, labelStyle, textStyle) => {
49
+ if (typeof label === "string") {
50
50
  return /*#__PURE__*/React.createElement(_Text.default, {
51
51
  style: [labelStyle, textStyle]
52
- }, value);
52
+ }, label);
53
53
  } else {
54
- return /*#__PURE__*/React.createElement(React.Fragment, null, value);
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, label);
55
55
  }
56
56
  };
57
57
 
@@ -62,7 +62,7 @@ const RadioButtonRow = _ref => {
62
62
  value,
63
63
  color,
64
64
  unselectedColor,
65
- onPress = () => {},
65
+ onPress,
66
66
  labelContainerStyle,
67
67
  labelStyle,
68
68
  radioButtonStyle,
@@ -77,10 +77,15 @@ const RadioButtonRow = _ref => {
77
77
  onValueChange,
78
78
  direction: parentDirection
79
79
  } = (0, _context.useRadioButtonGroupContext)();
80
+ const realValue = (0, _utilities.getRealValue)(value);
81
+ const realContextValue = (0, _utilities.getRealValue)(contextValue);
82
+ const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue && realValue && realContextValue === realValue;
80
83
 
81
84
  const handlePress = () => {
82
- onPress(value);
83
- onValueChange && onValueChange(value);
85
+ if (realValue) {
86
+ onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
87
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
88
+ }
84
89
  };
85
90
 
86
91
  const {
@@ -104,10 +109,10 @@ const RadioButtonRow = _ref => {
104
109
  }
105
110
  }, /*#__PURE__*/React.createElement(_RadioButton.default, {
106
111
  Icon: Icon,
107
- selected: selected || contextValue != null && contextValue === value,
112
+ selected: isSelected ? true : false,
113
+ value: realValue,
108
114
  color: color,
109
115
  unselectedColor: unselectedColor,
110
- onPress: handlePress,
111
116
  style: radioButtonStyle
112
117
  })));
113
118
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonRow.tsx"],"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","handlePress","textStyles","viewStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;;;IAEYA,S;;;WAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;GAAAA,S,yBAAAA,S;;AAiBZ,MAAMC,uBAAuB,GAAG,CAC9BC,eAD8B,EAE9BC,SAF8B,KAG3B;AACH,MAAID,eAAe,KAAKE,mBAAeC,UAAvC,EAAmD;A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AAAA,GAAG,EAAE;AACHC,QAAAA,MAAM,EAAE,SADL;AAEHC,QAAAA,UAAU,EAAE;AAFT;AADY,KAAhB;AAPO,GADmB;AAe/B9B,EAAAA,KAAK,EAAE;AACLmB,IAAAA,IAAI,EAAE;AADD;AAfwB,CAAlB,CAAf;;eAoBerB,c","sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles } from \"../../utilities\";\n\nexport enum Direction {\n Row = \"row\",\n RowReverse = \"row-reverse\",\n}\n\nexport interface RadioButtonRowProps extends Omit<RadioButtonProps, \"onPress\"> {\n label: string | React.ReactNode;\n value: string; // A string that this radio button row represents when selected\n color?: string;\n unselectedColor?: string;\n labelContainerStyle: StyleProp<ViewStyle>;\n radioButtonStyle?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n onPress?: (value: string) => void;\n direction?: Direction;\n}\n\nconst getRadioButtonAlignment = (\n parentDirection: GroupDirection | undefined,\n direction: Direction\n) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n } else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n } else {\n return \"flex-end\";\n }\n};\n\nconst renderLabel = (\n value: string | React.ReactNode,\n labelStyle: StyleProp<TextStyle>,\n textStyle: StyleProp<TextStyle>\n) => {\n if (typeof value === \"string\") {\n return <Text style={[labelStyle, textStyle]}>{value}</Text>;\n } else {\n return <>{value}</>;\n }\n};\n\nconst RadioButtonRow: React.FC<RadioButtonRowProps & IconSlot> = ({\n Icon,\n label,\n value,\n color,\n unselectedColor,\n onPress = () => {},\n labelContainerStyle,\n labelStyle,\n radioButtonStyle,\n direction = Direction.Row,\n selected,\n disabled,\n style,\n ...rest\n}) => {\n const {\n value: contextValue,\n onValueChange,\n direction: parentDirection,\n } = useRadioButtonGroupContext();\n\n const handlePress = () => {\n onPress(value);\n onValueChange && onValueChange(value);\n };\n\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Touchable\n onPress={handlePress}\n style={[styles.mainParent, { flexDirection: direction }, viewStyles]}\n disabled={disabled}\n {...rest}\n >\n <View\n style={[\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ]}\n >\n {renderLabel(label, labelStyle, textStyles)}\n </View>\n <View\n style={{\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n }}\n >\n <RadioButton\n Icon={Icon}\n selected={\n selected || (contextValue != null && contextValue === value)\n }\n color={color}\n unselectedColor={unselectedColor}\n onPress={handlePress}\n style={radioButtonStyle}\n />\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n flex: 1,\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n label: {\n flex: 3,\n },\n});\n\nexport default RadioButtonRow;\n"]}
1
+ {"version":3,"sources":["RadioButtonRow.tsx"],"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","label","labelStyle","textStyle","RadioButtonRow","Icon","value","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress","textStyles","viewStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AACA;;AACA;;AAGA;;AACA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K,EAAEF,SAHT;AAIE,IAAA,KAAK,EAAEX,KAJT;AAKE,IAAA,eAAe,EAAEC,eALnB;AAME,IAAA,KAAK,EAAEG;AANT,IANF,CAjBF,CADF;AAmCD,CAxED;;AA0EA,MAAMa,MAAM,GAAGK,wBAAWC,MAAX,CAAkB;AAC/BL,EAAAA,UAAU,EAAE;AACVE,IAAAA,UAAU,EAAE,QADF;AAEVI,IAAAA,cAAc,EAAE,cAFN;AAGVC,IAAAA,YAAY,EAAE,EAHJ;AAIVC,IAAAA,SAAS,EAAE,EAJD;AAKVC,IAAAA,UAAU,EAAE,EALF;AAMVN,IAAAA,IAAI,EAAE,CANI;AAOV,OAAGO,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,MAAM,EAAE,SADL;AAEHC,QAAAA,UAAU,EAAE;AAFT;AADY,KAAhB;AAPO,GADmB;AAe/BtC,EAAAA,KAAK,EAAE;AACL2B,IAAAA,IAAI,EAAE;AADD;AAfwB,CAAlB,CAAf;;eAoBexB,c","sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getRealValue } from \"../../utilities\";\n\nexport enum Direction {\n Row = \"row\",\n RowReverse = \"row-reverse\",\n}\n\nexport interface RadioButtonRowProps extends Omit<RadioButtonProps, \"onPress\"> {\n label: string | React.ReactNode;\n value: string; // A string (or number that will be parsed String(number)) that this radio button row represents when selected\n color?: string;\n unselectedColor?: string;\n labelContainerStyle: StyleProp<ViewStyle>;\n radioButtonStyle?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n onPress?: (value: string) => void;\n direction?: Direction;\n}\n\nconst getRadioButtonAlignment = (\n parentDirection: GroupDirection | undefined,\n direction: Direction\n) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n } else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n } else {\n return \"flex-end\";\n }\n};\n\nconst renderLabel = (\n label: string | React.ReactNode,\n labelStyle: StyleProp<TextStyle>,\n textStyle: StyleProp<TextStyle>\n) => {\n if (typeof label === \"string\") {\n return <Text style={[labelStyle, textStyle]}>{label}</Text>;\n } else {\n return <>{label}</>;\n }\n};\n\nconst RadioButtonRow: React.FC<RadioButtonRowProps & IconSlot> = ({\n Icon,\n label,\n value,\n color,\n unselectedColor,\n onPress,\n labelContainerStyle,\n labelStyle,\n radioButtonStyle,\n direction = Direction.Row,\n selected,\n disabled,\n style,\n ...rest\n}) => {\n const {\n value: contextValue,\n onValueChange,\n direction: parentDirection,\n } = useRadioButtonGroupContext();\n\n const realValue = getRealValue(value);\n const realContextValue = getRealValue(contextValue);\n const isSelected =\n selected ??\n (realContextValue && realValue && realContextValue === realValue);\n\n const handlePress = () => {\n if (realValue) {\n onPress?.(realValue);\n onValueChange?.(realValue);\n }\n };\n\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Touchable\n onPress={handlePress}\n style={[styles.mainParent, { flexDirection: direction }, viewStyles]}\n disabled={disabled}\n {...rest}\n >\n <View\n style={[\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ]}\n >\n {renderLabel(label, labelStyle, textStyles)}\n </View>\n <View\n style={{\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n }}\n >\n <RadioButton\n Icon={Icon}\n selected={isSelected ? true : false}\n value={realValue}\n color={color}\n unselectedColor={unselectedColor}\n style={radioButtonStyle}\n />\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n flex: 1,\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n label: {\n flex: 3,\n },\n});\n\nexport default RadioButtonRow;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA","sourcesContent":["export { default as RadioButton } from \"./RadioButton\";\nexport { default as RadioButtonGroup } from \"./RadioButtonGroup\";\nexport { default as RadioButtonRow } from \"./RadioButtonRow\";\nexport { default as RadioButtonFieldGroup } from \"./RadioButtonFieldGroup\";\n"]}
1
+ {"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA","sourcesContent":["export { default as RadioButton } from \"./RadioButton\";\nexport { default as RadioButtonGroup } from \"./RadioButtonGroup\";\nexport { default as RadioButtonRow } from \"./RadioButtonRow\";\nexport { default as RadioButtonFieldGroup } from \"./RadioButtonFieldGroup\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RowHeadlineImageIcon.tsx"],"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","headline6","strong","body2","medium","Config","rowMultiLineIconSize","rowSingleLineIconSize","light","marginLeft","alignSelf","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAaA,MAAMA,oBAAqC,GAAG,QASxC;AAAA,MATyC;AAC7CC,IAAAA,IAD6C;AAE7CC,IAAAA,IAF6C;AAG7CC,IAAAA,KAH6C;AAI7CC,IAAAA,KAJ6C;AAK7CC,IAAAA,QAL6C;AAM7CC,IAAAA,iBAAiB,GAAG,KANyB;AAO7CC,IAAAA,KAP6C;AAQ7CC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AARsC,GASzC;AACJ,sBACE,oBAAC,YAAD;AACE,IAAA,cAAc,EAAEA,UAAU,CAACC,SAD7B;AAEE,IAAA,UAAU,EAAEF,MAAM,CAACG,MAFrB;AAGE,IAAA,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;AAIE,IAAA,aAAa,EAAEJ,MAAM,CAACK,MAJxB;AAKE,IAAA,KAAK,EAAEX,KALT;AAME,IAAA,QAAQ,EAAEE,QANZ;AAOE,IAAA,iBAAiB,EAAEC,iBAPrB;AAQE,IAAA,KAAK,EAAEF,KART;AASE,IAAA,KAAK,EAAE,mBACL,oBAAC,IAAD;AACE,MAAA,IAAI,EAAEF,IADR;AAEE,MAAA,IAAI,EACFI,iBAAiB,GACbS,gBAAOC,oBADM,GAEbD,gBAAOE,qBALf;AAOE,MAAA,KAAK,EAAER,MAAM,CAACS,KAPhB;AAQE,MAAA,KAAK,EAAE;AACLC,QAAAA,UAAU,EAAE,EADP;AAELC,QAAAA,SAAS,EAAEd,iBAAiB,GAAG,YAAH,GAAkB,QAFzC;AAGLe,QAAAA,SAAS,EAAEf,iBAAiB,GAAG,CAAH,GAAO;AAH9B;AART,MAVJ;AAyBE,IAAA,KAAK,EAAEC;AAzBT,IADF;AA6BD,CAvCD;;eAyCe,wBAAUP,oBAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n image: string | ImageSourcePropType;\n subtitle?: string;\n multilineSubtitle?: boolean;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowHeadlineImageIcon: React.FC<Props> = ({\n Icon,\n icon,\n title,\n image,\n subtitle,\n multilineSubtitle = false,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n multilineSubtitle={multilineSubtitle}\n image={image}\n right={() => (\n <Icon\n name={icon}\n size={\n multilineSubtitle\n ? Config.rowMultiLineIconSize\n : Config.rowSingleLineIconSize\n }\n color={colors.light}\n style={{\n marginLeft: 16,\n alignSelf: multilineSubtitle ? \"flex-start\" : \"center\",\n marginTop: multilineSubtitle ? 4 : 0,\n }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageIcon);\n"]}
1
+ {"version":3,"sources":["RowHeadlineImageIcon.js"],"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","React","createElement","Row","titleTypeStyle","headline6","titleColor","strong","subtitleTypeStyle","body2","subtitleColor","medium","right","name","size","Config","rowMultiLineIconSize","rowSingleLineIconSize","color","light","marginLeft","alignSelf","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,oBAAoB,GAAG,QAA8G;AAAA,MAA7G;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA,KAArB;AAA4BC,IAAAA,QAA5B;AAAsCC,IAAAA,iBAAiB,GAAG,KAA1D;AAAiEC,IAAAA,KAAjE;AAAwEC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAA/E,GAA6G;AACvI,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,YAApB,EAAyB;AAAEC,IAAAA,cAAc,EAAEJ,UAAU,CAACK,SAA7B;AAAwCC,IAAAA,UAAU,EAAEP,MAAM,CAACQ,MAA3D;AAAmEC,IAAAA,iBAAiB,EAAER,UAAU,CAACS,KAAjG;AAAwGC,IAAAA,aAAa,EAAEX,MAAM,CAACY,MAA9H;AAAsIlB,IAAAA,KAAK,EAAEA,KAA7I;AAAoJE,IAAAA,QAAQ,EAAEA,QAA9J;AAAwKC,IAAAA,iBAAiB,EAAEA,iBAA3L;AAA8MF,IAAAA,KAAK,EAAEA,KAArN;AAA4NkB,IAAAA,KAAK,EAAE,mBAAOX,KAAK,CAACC,aAAN,CAAoBX,IAApB,EAA0B;AAAEsB,MAAAA,IAAI,EAAErB,IAAR;AAAcsB,MAAAA,IAAI,EAAElB,iBAAiB,GAC5TmB,gBAAOC,oBADqT,GAE5TD,gBAAOE,qBAFgR;AAEzPC,MAAAA,KAAK,EAAEnB,MAAM,CAACoB,KAF2O;AAEpOtB,MAAAA,KAAK,EAAE;AAC5DuB,QAAAA,UAAU,EAAE,EADgD;AAE5DC,QAAAA,SAAS,EAAEzB,iBAAiB,GAAG,YAAH,GAAkB,QAFc;AAG5D0B,QAAAA,SAAS,EAAE1B,iBAAiB,GAAG,CAAH,GAAO;AAHyB;AAF6N,KAA1B,CAA1O;AAMlBC,IAAAA,KAAK,EAAEA;AANW,GAAzB,CAAR;AAOH,CARD;;eASe,wBAAUP,oBAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nconst RowHeadlineImageIcon = ({ Icon, icon, title, image, subtitle, multilineSubtitle = false, style, theme: { colors, typography }, }) => {\n return (React.createElement(Row, { titleTypeStyle: typography.headline6, titleColor: colors.strong, subtitleTypeStyle: typography.body2, subtitleColor: colors.medium, title: title, subtitle: subtitle, multilineSubtitle: multilineSubtitle, image: image, right: () => (React.createElement(Icon, { name: icon, size: multilineSubtitle\n ? Config.rowMultiLineIconSize\n : Config.rowSingleLineIconSize, color: colors.light, style: {\n marginLeft: 16,\n alignSelf: multilineSubtitle ? \"flex-start\" : \"center\",\n marginTop: multilineSubtitle ? 4 : 0,\n } })), style: style }));\n};\nexport default withTheme(RowHeadlineImageIcon);\n"]}
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+
18
20
  const StarRating = _ref => {
19
21
  let {
20
22
  Icon,
@@ -45,10 +47,9 @@ const StarRating = _ref => {
45
47
  !!onPress && onPress(r);
46
48
  }, [onPress]);
47
49
  const ratingRounded = Math.round(localRating * 2) / 2;
48
- return /*#__PURE__*/React.createElement(_reactNative.View, {
49
- style: [styles.container, style],
50
- ...rest
51
- }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
50
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
51
+ style: [styles.container, style]
52
+ }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
52
53
  key: i,
53
54
  style: {
54
55
  display: "flex"
@@ -1 +1 @@
1
- {"version":3,"sources":["StarRating.js"],"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","createElement","View","styles","container","Array","map","_","i","key","display","name","size","color","touchContainer","Pressable","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,UAAU,GAAG,QAA8I;AAAA,MAA7I;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,QAAQ,GAAG,EAAnB;AAAuBC,IAAAA,QAAQ,GAAG,CAAlC;AAAqCC,IAAAA,MAAM,GAAG,CAA9C;AAAiDC,IAAAA,YAAjD;AAA+DC,IAAAA,UAAU,GAAG,KAA5E;AAAmFC,IAAAA,WAAnF;AAAgGC,IAAAA,aAAhG;AAA+GC,IAAAA,KAA/G;AAAsHC,IAAAA,OAAtH;AAA+H,OAAGC;AAAlI,GAA6I;AAC7J,QAAM,CAACC,WAAD,EAAcC,cAAd,IAAgCC,KAAK,CAACC,QAAN,CAAeX,MAAM,IAAIC,YAAV,IAA0B,CAAzC,CAAtC;AACAS,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AAClB,QAAIZ,MAAM,IAAI,IAAd,EAAoB;AAChBS,MAAAA,cAAc,CAACT,MAAD,CAAd;AACH;AACJ,GAJD,EAIG,CAACA,MAAD,CAJH;AAKAU,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AAClB,QAAIX,YAAY,IAAI,IAApB,EAA0B;AACtBQ,MAAAA,cAAc,CAACR,YAAD,CAAd;AACH;AACJ,GAJD,EAIG,CAACA,YAAD,CAJH;AAKA,QAAMY,aAAa,GAAGH,KAAK,CAACI,WAAN,CAAmBC,CAAD,IAAO;AAC3CN,IAAAA,cAAc,CAACM,CAAD,CAAd;AACA,KAAC,CAACT,OAAF,IAAaA,OAAO,CAACS,CAAD,CAApB;AACH,GAHqB,EAGnB,CAACT,OAAD,CAHmB,CAAtB;AAIA,QAAMU,aAAa,GAAGC,IAAI,CAACC,KAAL,CAAWV,WAAW,GAAG,CAAzB,IAA8B,CAApD;AACA,sBAAQE,KAAK,CAACS,aAAN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AC7Bd,EAAAA,SAAS,EAAE;AACPe,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,UAAU,EAAE;AAFL,GADkB;AAK7BN,EAAAA,cAAc,EAAE;AACZJ,IAAAA,OAAO,EAAE,MADG;AAEZS,IAAAA,aAAa,EAAE,KAFH;AAGZE,IAAAA,QAAQ,EAAE,UAHE;AAIZC,IAAAA,GAAG,EAAE,CAJO;AAKZC,IAAAA,KAAK,EAAE,CALK;AAMZC,IAAAA,IAAI,EAAE,CANM;AAOZC,IAAAA,MAAM,EAAE,CAPI;AAQZC,IAAAA,MAAM,EAAE;AARI,GALa;AAe7BV,EAAAA,SAAS,EAAE;AACPW,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,MAAM,EAAE,MAFD;AAGPC,IAAAA,KAAK,EAAE;AAHA;AAfkB,CAAlB,CAAf;;eAqBe,wBAAUnD,UAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, Pressable, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst StarRating = ({ Icon, starSize = 16, maxStars = 5, rating = 0, defaultValue, isEditable = false, activeColor, inactiveColor, style, onPress, ...rest }) => {\n const [localRating, setLocalRating] = React.useState(rating || defaultValue || 0);\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n const ratingHandler = React.useCallback((r) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n }, [onPress]);\n const ratingRounded = Math.round(localRating * 2) / 2;\n return (React.createElement(View, { style: [styles.container, style], ...rest }, [...Array(maxStars)].map((_, i) => (React.createElement(View, { key: i, style: { display: \"flex\" } },\n React.createElement(Icon, { name: ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\", size: starSize, color: ratingRounded > i ? activeColor : inactiveColor }),\n isEditable && (React.createElement(View, { style: styles.touchContainer },\n React.createElement(Pressable, { style: styles.pressable, onPress: () => ratingHandler(i + 0.5) }),\n React.createElement(Pressable, { style: styles.pressable, onPress: () => ratingHandler(i + 1) }))))))));\n};\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\nexport default withTheme(StarRating);\n"]}
1
+ {"version":3,"sources":["StarRating.tsx"],"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;;;;;;;AAiBA,MAAMA,UAA2B,GAAG,QAY9B;AAAA,MAZ+B;AACnCC,IAAAA,IADmC;AAEnCC,IAAAA,QAAQ,GAAG,EAFwB;AAGnCC,IAAAA,QAAQ,GAAG,CAHwB;AAInCC,IAAAA,MAAM,GAAG,CAJ0B;AAKnCC,IAAAA,YALmC;AAMnCC,IAAAA,UAAU,GAAG,KANsB;AAOnCC,IAAAA,WAPmC;AAQnCC,IAAAA,aARmC;AASnCC,IAAAA,KATmC;AAUnCC,IAAAA,OAVmC;AAWnC,OAAGC;AAXgC,GAY/B;AACJ,QAAM,CAACC,WAAD,EAAcC,cAAd,IAAgCC,KAAK,CAACC,QAAN,CACpCX,MAAM,IAAIC,YAAV,IAA0B,CADU,CAAtC;AAIAS,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIZ,MAAM,IAAI,IAAd,EAAoB;AAClBS,MAAAA,cAAc,CAACT,MAAD,CAAd;AACD;AACF,GAJD,EAIG,CAACA,MA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ACE,IAAA,KAAK,EAAEL,MAAM,CAACQ,SADhB;AAEE,IAAA,OAAO,EAAE,MAAMd,aAAa,CAACW,CAAC,GAAG,CAAL;AAF9B,IALF,CAXJ,CADD,CADH,CADF;AA6BD,CApED;;AAsEA,MAAML,MAAM,GAAGS,wBAAWC,MAAX,CAAkB;AAC/BT,EAAAA,SAAS,EAAE;AACTU,IAAAA,aAAa,EAAE,KADN;AAETC,IAAAA,UAAU,EAAE;AAFH,GADoB;AAK/BL,EAAAA,cAAc,EAAE;AACdD,IAAAA,OAAO,EAAE,MADK;AAEdK,IAAAA,aAAa,EAAE,KAFD;AAGdE,IAAAA,QAAQ,EAAE,UAHI;AAIdC,IAAAA,GAAG,EAAE,CAJS;AAKdC,IAAAA,KAAK,EAAE,CALO;AAMdC,IAAAA,IAAI,EAAE,CANQ;AAOdC,IAAAA,MAAM,EAAE,CAPM;AAQdC,IAAAA,MAAM,EAAE;AARM,GALe;AAe/BV,EAAAA,SAAS,EAAE;AACTW,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,MAAM,EAAE,MAFC;AAGTC,IAAAA,KAAK,EAAE;AAHE;AAfoB,CAAlB,CAAf;;eAsBe,wBAAU5C,UAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<Props> = ({\n Icon,\n starSize = 16,\n maxStars = 5,\n rating = 0,\n defaultValue,\n isEditable = false,\n activeColor,\n inactiveColor,\n style,\n onPress,\n ...rest\n}) => {\n const [localRating, setLocalRating] = React.useState<number>(\n rating || defaultValue || 0\n );\n\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n\n const ratingHandler = React.useCallback(\n (r) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n },\n [onPress]\n );\n\n const ratingRounded = Math.round(localRating * 2) / 2;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {[...Array(maxStars)].map((_, i) => (\n <View key={i} style={{ display: \"flex\" }}>\n <Icon\n name={\n ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\"\n }\n size={starSize}\n color={ratingRounded > i ? activeColor : inactiveColor}\n />\n {isEditable && (\n <View style={styles.touchContainer}>\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 0.5)}\n />\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 1)}\n />\n </View>\n )}\n </View>\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\n\nexport default withTheme(StarRating);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["SwiperItem.tsx"],"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,MAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AADC;AADsB,CAAlB,CAAf;;AAWA,MAAMC,UAAU,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAD;AAAA,sBACjB,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACP,MAAM,CAACG,OAAR,EAAiBI,KAAjB;AAAb,KAAuCD,QAAvC,CADiB;AAAA,CAAnB;;eAIeD,U","sourcesContent":["import React from \"react\";\nimport { View, StyleSheet, StyleProp, ViewStyle } from \"react-native\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\n\nexport interface SwiperProps {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst SwiperItem = ({ children, style }: SwiperProps) => (\n <View style={[styles.wrapper, style]}>{children}</View>\n);\n\nexport default SwiperItem;\n"]}
1
+ {"version":3,"sources":["SwiperItem.js"],"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style","React","createElement","View"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC7BC,EAAAA,OAAO,EAAE;AACLC,IAAAA,IAAI,EAAE;AADD;AADoB,CAAlB,CAAf;;AAKA,MAAMC,UAAU,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAD;AAAA,sBAA0BC,eAAMC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEH,IAAAA,KAAK,EAAE,CAACP,MAAM,CAACG,OAAR,EAAiBI,KAAjB;AAAT,GAA1B,EAA8DD,QAA9D,CAA1B;AAAA,CAAnB;;eACeD,U","sourcesContent":["import React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\nconst SwiperItem = ({ children, style }) => (React.createElement(View, { style: [styles.wrapper, style] }, children));\nexport default SwiperItem;\n"]}
@@ -11,6 +11,8 @@ var _reactNative = require("react-native");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
+ 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); }
15
+
14
16
  function Touchable(_ref) {
15
17
  let {
16
18
  children,
@@ -19,22 +21,7 @@ function Touchable(_ref) {
19
21
  style,
20
22
  ...props
21
23
  } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
23
- onPress: onPress,
24
- disabled: disabled,
25
- hitSlop: 8,
26
- style: _ref2 => {
27
- let {
28
- pressed
29
- } = _ref2;
30
- return [{
31
- opacity: pressed || disabled ? 0.75 : 1
32
- }, style];
33
- },
34
- ...props
35
- }, children);
36
- }
37
- //# sourceMappingURL=Touchable.js.mapElement(_reactNative.Pressable, _extends({
24
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
38
25
  onPress: onPress,
39
26
  disabled: disabled,
40
27
  hitSlop: 8,
@@ -1 +1 @@
1
- {"version":3,"sources":["Touchable.js"],"names":["Touchable","children","disabled","onPress","style","props","React","createElement","Pressable","hitSlop","pressed","opacity"],"mappings":";;;;;;;AAAA;;AACA;;;;AACe,SAASA,SAAT,OAAqE;AAAA,MAAlD;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,QAAZ;AAAsBC,IAAAA,OAAtB;AAA+BC,IAAAA,KAA/B;AAAsC,OAAGC;AAAzC,GAAkD;AAChF,sBAAQC,eAAMC,aAAN,CAAoBC,sBAApB,EAA+B;AAAEL,IAAAA,OAAO,EAAEA,OAAX;AAAoBD,IAAAA,QAAQ,EAAEA,QAA9B;AAAwCO,IAAAA,OAAO,EAAE,CAAjD;AAAoDL,IAAAA,KAAK,EAAE,SAAiB;AAAA,UAAhB;AAAEM,QAAAA;AAAF,OAAgB;AAC3G,aAAO,CACH;AACIC,QAAAA,OAAO,EAAED,OAAO,IAAIR,QAAX,GAAsB,IAAtB,GAA6B;AAD1C,OADG,EAIHE,KAJG,CAAP;AAMH,KAPkC;AAOhC,OAAGC;AAP6B,GAA/B,EAOWJ,QAPX,CAAR;AAQH","sourcesContent":["import React from \"react\";\nimport { Pressable } from \"react-native\";\nexport default function Touchable({ children, disabled, onPress, style, ...props }) {\n return (React.createElement(Pressable, { onPress: onPress, disabled: disabled, hitSlop: 8, style: ({ pressed }) => {\n return [\n {\n opacity: pressed || disabled ? 0.75 : 1,\n },\n style,\n ];\n }, ...props }, children));\n}\n"]}
1
+ {"version":3,"sources":["Touchable.tsx"],"names":["Touchable","children","disabled","onPress","style","props","pressed","opacity"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AASe,SAASA,SAAT,OAML;AAAA,MANwB;AAChCC,IAAAA,QADgC;AAEhCC,IAAAA,QAFgC;AAGhCC,IAAAA,OAHgC;AAIhCC,IAAAA,KAJgC;AAKhC,OAAGC;AAL6B,GAMxB;AACR,sBACE,6BAAC,sBAAD;AACE,IAAA,OAAO,EAAEF,OADX;AAEE,IAAA,QAAQ,EAAED,QAFZ;AAGE,IAAA,OAAO,EAAE,CAHX;AAIE,IAAA,KAAK,EAAE,SAAiB;AAAA,UAAhB;AAAEI,QAAAA;AAAF,OAAgB;AACtB,aAAO,CACL;AACEC,QAAAA,OAAO,EAAED,OAAO,IAAIJ,QAAX,GAAsB,IAAtB,GAA6B;AADxC,OADK,EAILE,KAJK,CAAP;AAMD;AAXH,KAYMC,KAZN,GAcGJ,QAdH,CADF;AAkBD","sourcesContent":["import React from \"react\";\nimport { Pressable, ViewStyle, PressableProps } from \"react-native\";\n\ntype Props = {\n disabled?: boolean;\n children: React.ReactNode;\n style?: ViewStyle;\n onPress?: () => void;\n} & PressableProps;\n\nexport default function Touchable({\n children,\n disabled,\n onPress,\n style,\n ...props\n}: Props) {\n return (\n <Pressable\n onPress={onPress}\n disabled={disabled}\n hitSlop={8}\n style={({ pressed }) => {\n return [\n {\n opacity: pressed || disabled ? 0.75 : 1,\n },\n style,\n ];\n }}\n {...props}\n >\n {children}\n </Pressable>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks.js"],"names":["usePrevious","value","ref","React","useRef","useEffect","current"],"mappings":";;;;;;;AAAA;;;;AACO,SAASA,WAAT,CAAqBC,KAArB,EAA4B;AAC/B;AACA;AACA,QAAMC,GAAG,GAAGC,eAAMC,MAAN,EAAZ,CAH+B,CAI/B;;;AACAD,iBAAME,SAAN,CAAgB,MAAM;AAClBH,IAAAA,GAAG,CAACI,OAAJ,GAAcL,KAAd;AACH,GAFD,EAEG,CAACA,KAAD,CAFH,EAL+B,CAQ/B;;;AACA,SAAOC,GAAG,CAACI,OAAX;AACH","sourcesContent":["import React from \"react\";\nexport function usePrevious(value) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
1
+ {"version":3,"sources":["hooks.ts"],"names":["usePrevious","value","ref","React","useRef","useEffect","current"],"mappings":";;;;;;;AAAA;;;;AAEO,SAASA,WAAT,CAAqBC,KAArB,EAAiC;AACtC;AACA;AACA,QAAMC,GAAG,GAAGC,eAAMC,MAAN,EAAZ,CAHsC,CAKtC;;;AACAD,iBAAME,SAAN,CAAgB,MAAM;AACpBH,IAAAA,GAAG,CAACI,OAAJ,GAAcL,KAAd;AACD,GAFD,EAEG,CAACA,KAAD,CAFH,EANsC,CAUtC;;;AACA,SAAOC,GAAG,CAACI,OAAX;AACD","sourcesContent":["import React from \"react\";\n\nexport function usePrevious(value: any) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
@@ -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;;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"]}
1
+ {"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;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\";\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 { ActionSheet, ActionSheetItem, ActionSheetCancel, } from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\nexport { Center, Circle, Square, Row, Stack, Spacer, } from \"./components/Layout\";\nexport { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from \"./components/RadioButton/index\";\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 +1 @@
1
- {"version":3,"sources":["Accordion.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","container","layout","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,WADe;AAErBC,EAAAA,GAAG,EAAE,gBAFgB;AAGrBC,EAAAA,WAAW,EAAE,+CAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAJL;AAKrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,UAAU,EAAE,CADR;AAEJC,IAAAA,YAAY,EAAE,CAFV;AAGJC,IAAAA,aAAa,EAAE,CAHX;AAIJC,IAAAA,WAAW,EAAE,CAJT;AAKJC,IAAAA,QAAQ,EAAE;AALN,GALa;AAYrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,SAAS,EAAE,4BAAgB;AACvBC,MAAAA,KAAK,EAAE;AADgB,KAAhB,CADR;AAIHC,IAAAA,WAAW,EAAE,4BAAgB;AACzBD,MAAAA,KAAK,EAAE;AADkB,KAAhB,CAJV;AAOHE,IAAAA,UAAU,EAAE,4BAAgB;AACxBF,MAAAA,KAAK,EAAE;AADiB,KAAhB,CAPT;AAUHG,IAAAA,QAAQ,EAAE,6BAAiB;AACvBH,MAAAA,KAAK,EAAE,WADgB;AAEvBI,MAAAA,YAAY,EAAE;AAFS,KAAjB,CAVP;AAcHJ,IAAAA,KAAK,EAAE,2BAAe;AAClBA,MAAAA,KAAK,EAAE;AADW,KAAf,CAdJ;AAiBHK,IAAAA,QAAQ,EAAE,iCAAqB;AAC3BL,MAAAA,KAAK,EAAE,UADoB;AAE3BZ,MAAAA,WAAW,EAAE;AAFc,KAArB,CAjBP;AAqBHkB,IAAAA,IAAI,EAAE;AArBH;AAZc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createNumberProp, createIconProp, createTextProp, createStaticBoolProp, createColorProp, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Accordion\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n layout: {\n paddingTop: 8,\n paddingRight: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n fontSize: 16,\n },\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
1
+ {"version":3,"sources":["Accordion.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","container","layout","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAJH;AAKvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,UAAU,EAAE,CADN;AAENC,IAAAA,YAAY,EAAE,CAFR;AAGNC,IAAAA,aAAa,EAAE,CAHT;AAINC,IAAAA,WAAW,EAAE,CAJP;AAKNC,IAAAA,QAAQ,EAAE;AALJ,GALe;AAYvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBC,MAAAA,KAAK,EAAE;AADkB,KAAhB,CADN;AAILC,IAAAA,WAAW,EAAE,4BAAgB;AAC3BD,MAAAA,KAAK,EAAE;AADoB,KAAhB,CAJR;AAOLE,IAAAA,UAAU,EAAE,4BAAgB;AAC1BF,MAAAA,KAAK,EAAE;AADmB,KAAhB,CAPP;AAULG,IAAAA,QAAQ,EAAE,6BAAiB;AACzBH,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAjB,CAVL;AAcLJ,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAdF;AAiBLK,IAAAA,QAAQ,EAAE,iCAAqB;AAC7BL,MAAAA,KAAK,EAAE,UADsB;AAE7BZ,MAAAA,WAAW,EAAE;AAFgB,KAArB,CAjBL;AAqBLkB,IAAAA,IAAI,EAAE;AArBD;AAZgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n layout: {\n paddingTop: 8,\n paddingRight: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n fontSize: 16,\n },\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
@@ -78,11 +78,11 @@ const SEED_DATA = {
78
78
  }),
79
79
  color2: (0, _types.createColorProp)({
80
80
  label: "Color 2",
81
- defaultValue: "rgba(251, 252, 253, 1)"
81
+ defaultValue: "secondary"
82
82
  }),
83
83
  color1: (0, _types.createColorProp)({
84
84
  label: "Color 1",
85
- defaultValue: "rgba(90, 69, 255, 1)"
85
+ defaultValue: "primary"
86
86
  })
87
87
  }
88
88
  };