@draftbit/core 43.4.4 → 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 (56) hide show
  1. package/lib/commonjs/components/CardInline.js.map +1 -1
  2. package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
  3. package/lib/commonjs/components/FAB.js +5 -19
  4. package/lib/commonjs/components/FAB.js.map +1 -1
  5. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  6. package/lib/commonjs/components/FormRow.js +5 -18
  7. package/lib/commonjs/components/FormRow.js.map +1 -1
  8. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  9. package/lib/commonjs/components/NumberInput.js +4 -13
  10. package/lib/commonjs/components/NumberInput.js.map +1 -1
  11. package/lib/commonjs/components/Picker/PickerComponent.android.js +6 -20
  12. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  13. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  14. package/lib/commonjs/components/RadioButton/RadioButton.js +9 -6
  15. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  16. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +18 -8
  17. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  18. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +14 -9
  19. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  20. package/lib/commonjs/components/ResizeMode.js +1 -2
  21. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  22. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  23. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  24. package/lib/commonjs/components/Touchable.js +3 -16
  25. package/lib/commonjs/components/Touchable.js.map +1 -1
  26. package/lib/commonjs/index.js.map +1 -1
  27. package/lib/commonjs/mappings/SafeAreaView.js.map +1 -1
  28. package/lib/commonjs/mappings/StarRating.js +2 -6
  29. package/lib/commonjs/mappings/StarRating.js.map +1 -1
  30. package/lib/commonjs/mappings/Surface.js.map +1 -1
  31. package/lib/commonjs/mappings/WebView.js.map +1 -1
  32. package/lib/commonjs/styles/overlay.js.map +1 -1
  33. package/lib/commonjs/utilities.js +7 -0
  34. package/lib/commonjs/utilities.js.map +1 -1
  35. package/lib/module/components/Header.js.map +1 -1
  36. package/lib/module/components/RadioButton/RadioButton.js +8 -6
  37. package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
  38. package/lib/module/components/RadioButton/RadioButtonGroup.js +17 -8
  39. package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
  40. package/lib/module/components/RadioButton/RadioButtonRow.js +15 -10
  41. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  42. package/lib/module/mappings/RowHeadlineImageCaption.js.map +1 -1
  43. package/lib/module/utilities.js +4 -0
  44. package/lib/module/utilities.js.map +1 -1
  45. package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +1 -1
  46. package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +1 -1
  47. package/lib/typescript/src/utilities.d.ts +1 -0
  48. package/package.json +2 -2
  49. package/src/components/RadioButton/RadioButton.js +9 -5
  50. package/src/components/RadioButton/RadioButton.tsx +12 -9
  51. package/src/components/RadioButton/RadioButtonGroup.js +14 -8
  52. package/src/components/RadioButton/RadioButtonGroup.tsx +21 -12
  53. package/src/components/RadioButton/RadioButtonRow.js +15 -9
  54. package/src/components/RadioButton/RadioButtonRow.tsx +19 -13
  55. package/src/utilities.js +11 -0
  56. package/src/utilities.ts +8 -0
@@ -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":"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","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":"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","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,6 +1,5 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
2
+ //# sourceMappingURL=ResizeMode.js.mapodule", {
4
3
  value: true
5
4
  });
6
5
  //# sourceMappingURL=ResizeMode.js.map
@@ -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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Swiper.js"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","children","style","React","createElement","View","SwiperComponent","controlsProps","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AACA,MAAMA,MAAM,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAQ,GAAG,KAAb;AAAoBC,IAAAA,IAAI,GAAG,KAA3B;AAAkCC,IAAAA,OAAO,GAAG,CAA5C;AAA+CC,IAAAA,IAAI,GAAG,CAAtD;AAAyDC,IAAAA,SAAS,GAAG,EAArE;AAAyEC,IAAAA,SAAS,GAAG,EAArF;AAAyFC,IAAAA,cAAzF;AAAyGC,IAAAA,cAAzG;AAAyHC,IAAAA,aAAa,GAAG,IAAzI;AAA+IC,IAAAA,QAA/I;AAAyJC,IAAAA,cAAzJ;AAAyKC,IAAAA,QAAzK;AAAmLC,IAAAA;AAAnL,GAAD;AAAA,sBAAkMC,eAAMC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEH,IAAAA,KAAK,EAAEA;AAAT,GAA1B,eAC7MC,eAAMC,aAAN,CAAoBE,6BAApB,EAAqC;AAAEb,IAAAA,IAAI,EAAEA,IAAR;AAAcF,IAAAA,IAAI,EAAEA,IAApB;AAA0BC,IAAAA,OAAO,EAAEA,OAAnC;AAA4CF,IAAAA,QAAQ,EAAEA,QAAtD;AAAgEiB,IAAAA,aAAa,EAAE;AAC5Gb,MAAAA,SAD4G;AAE5GC,MAAAA,SAF4G;AAG5Ga,MAAAA,cAAc,EAAE;AAAEC,QAAAA,KAAK,EAAEb;AAAT,OAH4F;AAI5Gc,MAAAA,cAAc,EAAE;AAAED,QAAAA,KAAK,EAAEZ;AAAT,OAJ4F;AAK5GC,MAAAA,aAL4G;AAM5G,UAAIC,QAAQ,GACN;AAAEY,QAAAA,QAAQ,EAAE;AAAEC,UAAAA,UAAU,EAAE;AAAEC,YAAAA,eAAe,EAAEd;AAAnB;AAAd;AAAZ,OADM,GAEN,EAFN,CAN4G;AAS5G,UAAIC,cAAc,GACZ;AAAEc,QAAAA,cAAc,EAAE;AAAED,UAAAA,eAAe,EAAEb;AAAnB;AAAlB,OADY,GAEZ,EAFN;AAT4G;AAA/E,GAArC,EAYSC,QAZT,CAD6M,CAAlM;AAAA,CAAf;;eAceZ,M","sourcesContent":["import React from \"react\";\nimport { View } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\nconst Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = \"\", nextTitle = \"\", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, children, style, }) => (React.createElement(View, { style: style },\n React.createElement(SwiperComponent, { from: from, loop: loop, timeout: timeout, vertical: vertical, controlsProps: {\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n } }, children)));\nexport default Swiper;\n"]}
1
+ {"version":3,"sources":["Swiper.tsx"],"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAkBA,MAAMA,MAAM,GAAG;AAAA,MAAC;AACdC,IAAAA,QAAQ,GAAG,KADG;AAEdC,IAAAA,IAAI,GAAG,KAFO;AAGdC,IAAAA,OAAO,GAAG,CAHI;AAIdC,IAAAA,IAAI,GAAG,CAJO;AAKdC,IAAAA,SAAS,GAAG,EALE;AAMdC,IAAAA,SAAS,GAAG,EANE;AAOdC,IAAAA,cAPc;AAQdC,IAAAA,cARc;AASdC,IAAAA,aAAa,GAAG,IATF;AAUdC,IAAAA,QAVc;AAWdC,IAAAA,cAXc;AAYdC,IAAAA,QAZc;AAadC,IAAAA;AAbc,GAAD;AAAA,sBAeb,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,6BAAC,6BAAD;AACE,IAAA,IAAI,EAAET,IADR;AAEE,IAAA,IAAI,EAAEF,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEF,QAJZ;AAKE,IAAA,aAAa,EAAE;AACbI,MAAAA,SADa;AAEbC,MAAAA,SAFa;AAGbQ,MAAAA,cAAc,EAAE;AAAEC,QAAAA,KAAK,EAAER;AAAT,OAHH;AAIbS,MAAAA,cAAc,EAAE;AAAED,QAAAA,KAAK,EAAEP;AAAT,OAJH;AAKbC,MAAAA,aALa;AAMb,UAAIC,QAAQ,GACR;AAAEO,QAAAA,QAAQ,EAAE;AAAEC,UAAAA,UAAU,EAAE;AAAEC,YAAAA,eAAe,EAAET;AAAnB;AAAd;AAAZ,OADQ,GAER,EAFJ,CANa;AASb,UAAIC,cAAc,GACd;AAAES,QAAAA,cAAc,EAAE;AAAED,UAAAA,eAAe,EAAER;AAAnB;AAAlB,OADc,GAEd,EAFJ;AATa;AALjB,KAmBGC,QAnBH,CADF,CAfa;AAAA,CAAf;;eAwCeZ,M","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n children,\n style,\n}: SwiperProps) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\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":["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":["SafeAreaView.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","props","edges","group","GROUPS","basic","label","editable","required","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","defaultValue","mode"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,cADe;AAErBC,EAAAA,GAAG,EAAE,cAFgB;AAGrBC,EAAAA,WAAW,EAAE,qCAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAJL;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,KAAK,EAAEC,cAAOC,KADX;AAEHV,MAAAA,IAAI,EAAE,OAFH;AAGHW,MAAAA,KAAK,EAAE,OAHJ;AAIHT,MAAAA,WAAW,EAAE,6CAJV;AAKHU,MAAAA,QAAQ,EAAE,IALP;AAMHC,MAAAA,QAAQ,EAAE,KANP;AAOHC,MAAAA,QAAQ,EAAEC,kBAAWC,SAPlB;AAQHC,MAAAA,QAAQ,EAAEC,kBAAWC,MARlB;AASHC,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,QAAV,EAAoB,MAApB,EAA4B,KAA5B,CATN;AAUHC,MAAAA,YAAY,EAAE,CAAC,OAAD,EAAU,QAAV,EAAoB,MAApB,EAA4B,KAA5B;AAVX,KADJ;AAaHC,IAAAA,IAAI,EAAE;AACFd,MAAAA,KAAK,EAAEC,cAAOC,KADZ;AAEFV,MAAAA,IAAI,EAAE,MAFJ;AAGFW,MAAAA,KAAK,EAAE,MAHL;AAIFT,MAAAA,WAAW,EAAE,6BAJX;AAKFU,MAAAA,QAAQ,EAAE,IALR;AAMFC,MAAAA,QAAQ,EAAE,KANR;AAOFO,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ,CAPP;AAQFN,MAAAA,QAAQ,EAAEC,kBAAWC,SARnB;AASFC,MAAAA,QAAQ,EAAEC,kBAAWC,MATnB;AAUFE,MAAAA,YAAY,EAAE;AAVZ;AAbH;AALc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"SafeAreaView\",\n tag: \"SafeAreaView\",\n description: \"A basic View that handles safe area\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n edges: {\n group: GROUPS.basic,\n name: \"edges\",\n label: \"edges\",\n description: \"Provides edges to be used by safe area view\",\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"right\", \"bottom\", \"left\", \"top\"],\n defaultValue: [\"right\", \"bottom\", \"left\", \"top\"],\n },\n mode: {\n group: GROUPS.basic,\n name: \"mode\",\n label: \"mode\",\n description: \"Mode used by safe area view\",\n editable: true,\n required: false,\n options: [\"padding\", \"margin\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"padding\",\n },\n },\n};\n"]}
1
+ {"version":3,"sources":["SafeAreaView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","props","edges","group","GROUPS","basic","label","editable","required","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","defaultValue","mode"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,cADiB;AAEvBC,EAAAA,GAAG,EAAE,cAFkB;AAGvBC,EAAAA,WAAW,EAAE,qCAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAEC,cAAOC,KADT;AAELV,MAAAA,IAAI,EAAE,OAFD;AAGLW,MAAAA,KAAK,EAAE,OAHF;AAILT,MAAAA,WAAW,EAAE,6CAJR;AAKLU,MAAAA,QAAQ,EAAE,IALL;AAMLC,MAAAA,QAAQ,EAAE,KANL;AAOLC,MAAAA,QAAQ,EAAEC,kBAAWC,SAPhB;AAQLC,MAAAA,QAAQ,EAAEC,kBAAWC,MARhB;AASLC,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,QAAV,EAAoB,MAApB,EAA4B,KAA5B,CATJ;AAULC,MAAAA,YAAY,EAAE,CAAC,OAAD,EAAU,QAAV,EAAoB,MAApB,EAA4B,KAA5B;AAVT,KADF;AAaLC,IAAAA,IAAI,EAAE;AACJd,MAAAA,KAAK,EAAEC,cAAOC,KADV;AAEJV,MAAAA,IAAI,EAAE,MAFF;AAGJW,MAAAA,KAAK,EAAE,MAHH;AAIJT,MAAAA,WAAW,EAAE,6BAJT;AAKJU,MAAAA,QAAQ,EAAE,IALN;AAMJC,MAAAA,QAAQ,EAAE,KANN;AAOJO,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ,CAPL;AAQJN,MAAAA,QAAQ,EAAEC,kBAAWC,SARjB;AASJC,MAAAA,QAAQ,EAAEC,kBAAWC,MATjB;AAUJE,MAAAA,YAAY,EAAE;AAVV;AAbD;AALgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"SafeAreaView\",\n tag: \"SafeAreaView\",\n description: \"A basic View that handles safe area\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n edges: {\n group: GROUPS.basic,\n name: \"edges\",\n label: \"edges\",\n description: \"Provides edges to be used by safe area view\",\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"right\", \"bottom\", \"left\", \"top\"],\n defaultValue: [\"right\", \"bottom\", \"left\", \"top\"],\n },\n mode: {\n group: GROUPS.basic,\n name: \"mode\",\n label: \"mode\",\n description: \"Mode used by safe area view\",\n editable: true,\n required: false,\n options: [\"padding\", \"margin\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"padding\",\n },\n },\n};\n"]}
@@ -24,7 +24,9 @@ const SEED_DATA = {
24
24
  }),
25
25
  fieldName: (0, _types.createFieldNameProp)({
26
26
  defaultValue: "ratingValue",
27
+ // this is the name of the variable declared on the screen in Draftbit
27
28
  handlerPropName: "onPress",
29
+ // the change handler prop in this component
28
30
  valuePropName: "rating" // the value prop in this component
29
31
 
30
32
  }),
@@ -54,10 +56,4 @@ const SEED_DATA = {
54
56
  }
55
57
  };
56
58
  exports.SEED_DATA = SEED_DATA;
57
- //# sourceMappingURL=StarRating.js.mapactive Color",
58
- defaultValue: "divider"
59
- })
60
- }
61
- };
62
- exports.SEED_DATA = SEED_DATA;
63
59
  //# sourceMappingURL=StarRating.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["StarRating.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","props","starSize","label","defaultValue","min","max","step","fieldName","handlerPropName","valuePropName","maxStars","rating","group","GROUPS","data","isEditable","activeColor","inactiveColor"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,yBAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALW;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,QAAQ,EAAE,mCAAuB;AAC7BC,MAAAA,KAAK,EAAE,WADsB;AAE7BT,MAAAA,WAAW,EAAE,8BAFgB;AAG7BU,MAAAA,YAAY,EAAE,EAHe;AAI7BC,MAAAA,GAAG,EAAE,CAJwB;AAK7BC,MAAAA,GAAG,EAAE,EALwB;AAM7BC,MAAAA,IAAI,EAAE;AANuB,KAAvB,CADP;AASHC,IAAAA,SAAS,EAAE,gCAAoB;AAC3BJ,MAAAA,YAAY,EAAE,aADa;AAE3BK,MAAAA,eAAe,EAAE,SAFU;AAG3BC,MAAAA,aAAa,EAAE,QAHY,CAGF;;AAHE,KAApB,CATR;AAcHC,IAAAA,QAAQ,EAAE,mCAAuB;AAC7BR,MAAAA,KAAK,EAAE,WADsB;AAE7BT,MAAAA,WAAW,EAAE,yBAFgB;AAG7BU,MAAAA,YAAY,EAAE,CAHe;AAI7BC,MAAAA,GAAG,EAAE,CAJwB;AAK7BC,MAAAA,GAAG,EAAE,EALwB;AAM7BC,MAAAA,IAAI,EAAE;AANuB,KAAvB,CAdP;AAsBHK,IAAAA,MAAM,EAAE,mCAAuB;AAC3BC,MAAAA,KAAK,EAAEC,cAAOC,IADa;AAE3BZ,MAAAA,KAAK,EAAE;AAFoB,KAAvB,CAtBL;AA0BHa,IAAAA,UAAU,EAAE,iCAAqB;AAC7Bb,MAAAA,KAAK,EAAE;AADsB,KAArB,CA1BT;AA6BHc,IAAAA,WAAW,EAAE,4BAAgB;AACzBd,MAAAA,KAAK,EAAE,cADkB;AAEzBC,MAAAA,YAAY,EAAE;AAFW,KAAhB,CA7BV;AAiCHc,IAAAA,aAAa,EAAE,4BAAgB;AAC3Bf,MAAAA,KAAK,EAAE,gBADoB;AAE3BC,MAAAA,YAAY,EAAE;AAFa,KAAhB;AAjCZ;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createStaticNumberProp, createFieldNameProp, createStaticBoolProp, Triggers, createColorProp, GROUPS, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Star Rating\",\n tag: \"StarRating\",\n description: \"A star rating component\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n props: {\n starSize: createStaticNumberProp({\n label: \"Star size\",\n description: \"Size of each individual star\",\n defaultValue: 16,\n min: 8,\n max: 36,\n step: 1,\n }),\n fieldName: createFieldNameProp({\n defaultValue: \"ratingValue\",\n handlerPropName: \"onPress\",\n valuePropName: \"rating\", // the value prop in this component\n }),\n maxStars: createStaticNumberProp({\n label: \"Max stars\",\n description: \"The max number of stars\",\n defaultValue: 5,\n min: 0,\n max: 10,\n step: 1,\n }),\n rating: createStaticNumberProp({\n group: GROUPS.data,\n label: \"Rating\",\n }),\n isEditable: createStaticBoolProp({\n label: \"Editable\",\n }),\n activeColor: createColorProp({\n label: \"Active Color\",\n defaultValue: \"primary\",\n }),\n inactiveColor: createColorProp({\n label: \"Inactive Color\",\n defaultValue: \"divider\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["StarRating.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","props","starSize","label","defaultValue","min","max","step","fieldName","handlerPropName","valuePropName","maxStars","rating","group","GROUPS","data","isEditable","activeColor","inactiveColor"],"mappings":";;;;;;;AAAA;;AAUO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,aADiB;AAEvBC,EAAAA,GAAG,EAAE,YAFkB;AAGvBC,EAAAA,WAAW,EAAE,yBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALa;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,mCAAuB;AAC/BC,MAAAA,KAAK,EAAE,WADwB;AAE/BT,MAAAA,WAAW,EAAE,8BAFkB;AAG/BU,MAAAA,YAAY,EAAE,EAHiB;AAI/BC,MAAAA,GAAG,EAAE,CAJ0B;AAK/BC,MAAAA,GAAG,EAAE,EAL0B;AAM/BC,MAAAA,IAAI,EAAE;AANyB,KAAvB,CADL;AASLC,IAAAA,SAAS,EAAE,gCAAoB;AAC7BJ,MAAAA,YAAY,EAAE,aADe;AACA;AAC7BK,MAAAA,eAAe,EAAE,SAFY;AAED;AAC5BC,MAAAA,aAAa,EAAE,QAHc,CAGJ;;AAHI,KAApB,CATN;AAcLC,IAAAA,QAAQ,EAAE,mCAAuB;AAC/BR,MAAAA,KAAK,EAAE,WADwB;AAE/BT,MAAAA,WAAW,EAAE,yBAFkB;AAG/BU,MAAAA,YAAY,EAAE,CAHiB;AAI/BC,MAAAA,GAAG,EAAE,CAJ0B;AAK/BC,MAAAA,GAAG,EAAE,EAL0B;AAM/BC,MAAAA,IAAI,EAAE;AANyB,KAAvB,CAdL;AAsBLK,IAAAA,MAAM,EAAE,mCAAuB;AAC7BC,MAAAA,KAAK,EAAEC,cAAOC,IADe;AAE7BZ,MAAAA,KAAK,EAAE;AAFsB,KAAvB,CAtBH;AA0BLa,IAAAA,UAAU,EAAE,iCAAqB;AAC/Bb,MAAAA,KAAK,EAAE;AADwB,KAArB,CA1BP;AA6BLc,IAAAA,WAAW,EAAE,4BAAgB;AAC3Bd,MAAAA,KAAK,EAAE,cADoB;AAE3BC,MAAAA,YAAY,EAAE;AAFa,KAAhB,CA7BR;AAiCLc,IAAAA,aAAa,EAAE,4BAAgB;AAC7Bf,MAAAA,KAAK,EAAE,gBADsB;AAE7BC,MAAAA,YAAY,EAAE;AAFe,KAAhB;AAjCV;AANgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticNumberProp,\n createFieldNameProp,\n createStaticBoolProp,\n Triggers,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Star Rating\",\n tag: \"StarRating\",\n description: \"A star rating component\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n props: {\n starSize: createStaticNumberProp({\n label: \"Star size\",\n description: \"Size of each individual star\",\n defaultValue: 16,\n min: 8,\n max: 36,\n step: 1,\n }),\n fieldName: createFieldNameProp({\n defaultValue: \"ratingValue\", // this is the name of the variable declared on the screen in Draftbit\n handlerPropName: \"onPress\", // the change handler prop in this component\n valuePropName: \"rating\", // the value prop in this component\n }),\n maxStars: createStaticNumberProp({\n label: \"Max stars\",\n description: \"The max number of stars\",\n defaultValue: 5,\n min: 0,\n max: 10,\n step: 1,\n }),\n rating: createStaticNumberProp({\n group: GROUPS.data,\n label: \"Rating\",\n }),\n isEditable: createStaticBoolProp({\n label: \"Editable\",\n }),\n activeColor: createColorProp({\n label: \"Active Color\",\n defaultValue: \"primary\",\n }),\n inactiveColor: createColorProp({\n label: \"Inactive Color\",\n defaultValue: \"divider\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Surface.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","minHeight","props","elevation"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,SADe;AAErBC,EAAAA,GAAG,EAAE,SAFgB;AAGrBC,EAAAA,WAAW,EAAE,uBAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBA,EAAAA,MAAM,EAAE;AACJC,IAAAA,SAAS,EAAE;AADP,GALa;AAQrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,SAAS,EAAE,gCAAoB,CAApB;AADR;AARc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Surface\",\n tag: \"Surface\",\n description: \"An elevated container\",\n category: COMPONENT_TYPES.layout,\n layout: {\n minHeight: 40,\n },\n props: {\n elevation: createElevationType(0),\n },\n};\n"]}
1
+ {"version":3,"sources":["Surface.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","minHeight","props","elevation"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,SADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,uBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBA,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GALe;AAQvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,gCAAoB,CAApB;AADN;AARgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType } from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Surface\",\n tag: \"Surface\",\n description: \"An elevated container\",\n category: COMPONENT_TYPES.layout,\n layout: {\n minHeight: 40,\n },\n props: {\n elevation: createElevationType(0),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["WebView.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","media","layout","flex","props","source","defaultValue"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,UADe;AAErBC,EAAAA,GAAG,EAAE,SAFgB;AAGrBC,EAAAA,WAAW,EAAE,kCAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAJL;AAKrBC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,IAAI,EAAE;AAAR,GALa;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAE,6BAAiB;AACrBC,MAAAA,YAAY,EAAE;AADO,KAAjB;AADL;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createSourceProp } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["WebView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","media","layout","flex","props","source","defaultValue"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,kCAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAJH;AAKvBC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,IAAI,EAAE;AAAR,GALe;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BAAiB;AACvBC,MAAAA,YAAY,EAAE;AADS,KAAjB;AADH;AANgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createSourceProp } from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["overlay.tsx"],"names":["isAnimatedValue","it","Animated","Value","overlay","elevation","surfaceColor","DarkTheme","colors","surface","inputRange","interpolate","outputRange","map","e","calculateColor","overlayTransparency","elevationOverlayTransparency","mix","hex"],"mappings":";;;;;;;AACA;;AACA;;AACA;;;;AAHA;AAKA,MAAMA,eAAe,GACnBC,EADsB,IAEGA,EAAE,YAAYC,sBAASC,KAFlD;;AAIe,SAASC,OAAT,CACbC,SADa,EAG+C;AAAA,MAD5DC,YAC4D,uEADrCC,mBAAUC,MAAV,CAAiBC,OACoB;;AAC5D,MAAIT,eAAe,CAACK,SAAD,CAAnB,EAAgC;AAC9B,UAAMK,UAAU,GAAG,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,EAAhB,CAAnB,CAD8B,CAG9B;;AACA,WAAOL,SAAS,CAACM,WAAV,CAAsB;AAC3BD,MAAAA,UAD2B;AAE3BE,MAAAA,WAAW,EAAEF,UAAU,CAACG,GAAX,CAAgBC,CAAD,IAAO;AACjC,eAAOC,cAAc,CAACT,YAAD,EAAeQ,CAAf,CAArB;AACD,OAFY;AAFc,KAAtB,CAAP;AAMD,GAX2D,CAa5D;;;AACA,SAAOC,cAAc,CAACT,YAAD,EAAeD,SAAf,CAArB;AACD;;AAED,SAASU,cAAT,CAAwBT,YAAxB,EAAqE;AAAA,MAAvBD,SAAuB,uEAAH,CAAG;AACnE,MAAIW,mBAAJ;;AACA,MAAIX,SAAS,IAAI,CAAb,IAAkBA,SAAS,IAAI,EAAnC,EAAuC;AACrCW,IAAAA,mBAAmB,GAAGC,4BAA4B,CAACZ,SAAD,CAAlD;AACD,GAFD,MAEO,IAAIA,SAAS,GAAG,EAAhB,EAAoB;AACzBW,IAAAA,mBAAmB,GAAGC,4BAA4B,CAAC,EAAD,CAAlD;AACD,GAFM,MAEA;AACLD,IAAAA,mBAAmB,GAAGC,4BAA4B,CAAC,CAAD,CAAlD;AACD;;AACD,SAAO,oBAAMX,YAAN,EACJY,GADI,CACA,oBAAM,OAAN,CADA,EACgBF,mBAAmB,GAAG,IADtC,EAEJG,GAFI,EAAP;AAGD;;AAED,MAAMF,4BAAoD,GAAG;AAC3D,KAAG,CADwD;AAE3D,KAAG,CAFwD;AAG3D,KAAG,CAHwD;AAI3D,KAAG,CAJwD;AAK3D,KAAG,EALwD;AAM3D,KAAG,EANwD;AAO3D,KAAG,IAPwD;AAQ3D,KAAG,EARwD;AAS3D,KAAG,IATwD;AAU3D,MAAI,EAVuD;AAW3D,MAAI,IAXuD;AAY3D,MAAI,EAZuD;AAa3D,MAAI,KAbuD;AAc3D,MAAI,IAduD;AAe3D,MAAI,KAfuD;AAgB3D,MAAI,EAhBuD;AAiB3D,MAAI,KAjBuD;AAkB3D,MAAI,KAlBuD;AAmB3D,MAAI,KAnBuD;AAoB3D,MAAI,KApBuD;AAqB3D,MAAI,IArBuD;AAsB3D,MAAI,KAtBuD;AAuB3D,MAAI,KAvBuD;AAwB3D,MAAI;AAxBuD,CAA7D","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/styles/overlay.tsx */\nimport color from \"color\";\nimport { Animated } from \"react-native\";\nimport DarkTheme from \"./DarkTheme\";\n\nconst isAnimatedValue = (\n it: number | Animated.AnimatedInterpolation\n): it is Animated.Value => it instanceof Animated.Value;\n\nexport default function overlay<T extends Animated.Value | number>(\n elevation: T,\n surfaceColor: string = DarkTheme.colors.surface\n): T extends number ? string : Animated.AnimatedInterpolation {\n if (isAnimatedValue(elevation)) {\n const inputRange = [0, 1, 2, 3, 8, 24];\n\n // @ts-expect-error: TS doesn't seem to refine the type correctly\n return elevation.interpolate({\n inputRange,\n outputRange: inputRange.map((e) => {\n return calculateColor(surfaceColor, e);\n }),\n });\n }\n\n // @ts-expect-error: TS doesn't seem to refine the type correctly\n return calculateColor(surfaceColor, elevation);\n}\n\nfunction calculateColor(surfaceColor: string, elevation: number = 1) {\n let overlayTransparency: number;\n if (elevation >= 1 && elevation <= 24) {\n overlayTransparency = elevationOverlayTransparency[elevation];\n } else if (elevation > 24) {\n overlayTransparency = elevationOverlayTransparency[24];\n } else {\n overlayTransparency = elevationOverlayTransparency[1];\n }\n return color(surfaceColor)\n .mix(color(\"white\"), overlayTransparency * 0.01)\n .hex();\n}\n\nconst elevationOverlayTransparency: Record<string, number> = {\n 1: 5,\n 2: 7,\n 3: 8,\n 4: 9,\n 5: 10,\n 6: 11,\n 7: 11.5,\n 8: 12,\n 9: 12.5,\n 10: 13,\n 11: 13.5,\n 12: 14,\n 13: 14.25,\n 14: 14.5,\n 15: 14.75,\n 16: 15,\n 17: 15.12,\n 18: 15.24,\n 19: 15.36,\n 20: 15.48,\n 21: 15.6,\n 22: 15.72,\n 23: 15.84,\n 24: 16,\n};\n"]}
1
+ {"version":3,"sources":["overlay.js"],"names":["isAnimatedValue","it","Animated","Value","overlay","elevation","surfaceColor","DarkTheme","colors","surface","inputRange","interpolate","outputRange","map","e","calculateColor","overlayTransparency","elevationOverlayTransparency","mix","hex"],"mappings":";;;;;;;AACA;;AACA;;AACA;;;;AAHA;AAIA,MAAMA,eAAe,GAAIC,EAAD,IAAQA,EAAE,YAAYC,sBAASC,KAAvD;;AACe,SAASC,OAAT,CAAiBC,SAAjB,EAAqE;AAAA,MAAzCC,YAAyC,uEAA1BC,mBAAUC,MAAV,CAAiBC,OAAS;;AAChF,MAAIT,eAAe,CAACK,SAAD,CAAnB,EAAgC;AAC5B,UAAMK,UAAU,GAAG,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,EAAhB,CAAnB,CAD4B,CAE5B;;AACA,WAAOL,SAAS,CAACM,WAAV,CAAsB;AACzBD,MAAAA,UADyB;AAEzBE,MAAAA,WAAW,EAAEF,UAAU,CAACG,GAAX,CAAgBC,CAAD,IAAO;AAC/B,eAAOC,cAAc,CAACT,YAAD,EAAeQ,CAAf,CAArB;AACH,OAFY;AAFY,KAAtB,CAAP;AAMH,GAV+E,CAWhF;;;AACA,SAAOC,cAAc,CAACT,YAAD,EAAeD,SAAf,CAArB;AACH;;AACD,SAASU,cAAT,CAAwBT,YAAxB,EAAqD;AAAA,MAAfD,SAAe,uEAAH,CAAG;AACjD,MAAIW,mBAAJ;;AACA,MAAIX,SAAS,IAAI,CAAb,IAAkBA,SAAS,IAAI,EAAnC,EAAuC;AACnCW,IAAAA,mBAAmB,GAAGC,4BAA4B,CAACZ,SAAD,CAAlD;AACH,GAFD,MAGK,IAAIA,SAAS,GAAG,EAAhB,EAAoB;AACrBW,IAAAA,mBAAmB,GAAGC,4BAA4B,CAAC,EAAD,CAAlD;AACH,GAFI,MAGA;AACDD,IAAAA,mBAAmB,GAAGC,4BAA4B,CAAC,CAAD,CAAlD;AACH;;AACD,SAAO,oBAAMX,YAAN,EACFY,GADE,CACE,oBAAM,OAAN,CADF,EACkBF,mBAAmB,GAAG,IADxC,EAEFG,GAFE,EAAP;AAGH;;AACD,MAAMF,4BAA4B,GAAG;AACjC,KAAG,CAD8B;AAEjC,KAAG,CAF8B;AAGjC,KAAG,CAH8B;AAIjC,KAAG,CAJ8B;AAKjC,KAAG,EAL8B;AAMjC,KAAG,EAN8B;AAOjC,KAAG,IAP8B;AAQjC,KAAG,EAR8B;AASjC,KAAG,IAT8B;AAUjC,MAAI,EAV6B;AAWjC,MAAI,IAX6B;AAYjC,MAAI,EAZ6B;AAajC,MAAI,KAb6B;AAcjC,MAAI,IAd6B;AAejC,MAAI,KAf6B;AAgBjC,MAAI,EAhB6B;AAiBjC,MAAI,KAjB6B;AAkBjC,MAAI,KAlB6B;AAmBjC,MAAI,KAnB6B;AAoBjC,MAAI,KApB6B;AAqBjC,MAAI,IArB6B;AAsBjC,MAAI,KAtB6B;AAuBjC,MAAI,KAvB6B;AAwBjC,MAAI;AAxB6B,CAArC","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/styles/overlay.tsx */\nimport color from \"color\";\nimport { Animated } from \"react-native\";\nimport DarkTheme from \"./DarkTheme\";\nconst isAnimatedValue = (it) => it instanceof Animated.Value;\nexport default function overlay(elevation, surfaceColor = DarkTheme.colors.surface) {\n if (isAnimatedValue(elevation)) {\n const inputRange = [0, 1, 2, 3, 8, 24];\n // @ts-expect-error: TS doesn't seem to refine the type correctly\n return elevation.interpolate({\n inputRange,\n outputRange: inputRange.map((e) => {\n return calculateColor(surfaceColor, e);\n }),\n });\n }\n // @ts-expect-error: TS doesn't seem to refine the type correctly\n return calculateColor(surfaceColor, elevation);\n}\nfunction calculateColor(surfaceColor, elevation = 1) {\n let overlayTransparency;\n if (elevation >= 1 && elevation <= 24) {\n overlayTransparency = elevationOverlayTransparency[elevation];\n }\n else if (elevation > 24) {\n overlayTransparency = elevationOverlayTransparency[24];\n }\n else {\n overlayTransparency = elevationOverlayTransparency[1];\n }\n return color(surfaceColor)\n .mix(color(\"white\"), overlayTransparency * 0.01)\n .hex();\n}\nconst elevationOverlayTransparency = {\n 1: 5,\n 2: 7,\n 3: 8,\n 4: 9,\n 5: 10,\n 6: 11,\n 7: 11.5,\n 8: 12,\n 9: 12.5,\n 10: 13,\n 11: 13.5,\n 12: 14,\n 13: 14.25,\n 14: 14.5,\n 15: 14.75,\n 16: 15,\n 17: 15.12,\n 18: 15.24,\n 19: 15.36,\n 20: 15.48,\n 21: 15.6,\n 22: 15.72,\n 23: 15.84,\n 24: 16,\n};\n"]}
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.applyStyles = applyStyles;
7
7
  exports.extractStyles = extractStyles;
8
+ exports.getRealValue = getRealValue;
8
9
 
9
10
  var _reactNative = require("react-native");
10
11
 
12
+ var _lodash = require("lodash");
13
+
11
14
  function extractStyles(style) {
12
15
  const {
13
16
  color,
@@ -71,4 +74,8 @@ function applyStyles(baseStyles, stylesToApply) {
71
74
 
72
75
  return flattenedStyles;
73
76
  }
77
+
78
+ function getRealValue(value) {
79
+ if ((0, _lodash.isString)(value)) return value;else if ((0, _lodash.isNumber)(value)) return String(value);else if (!value) return undefined;else throw new Error(`Invalid value: ${value}`);
80
+ }
74
81
  //# sourceMappingURL=utilities.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["utilities.ts"],"names":["extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","StyleSheet","flatten","textStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries"],"mappings":";;;;;;;;AAAA;;AAEO,SAASA,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,MAaFC,wBAAWC,OAAX,CAAmBd,KAAK,IAAI,EAA5B,CAbJ;;AAeA,QAAMe,UAAqB,GAAG;AAC5Bd,IAAAA,KAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,UAH4B;AAI5BC,IAAAA,QAJ4B;AAK5BC,IAAAA,UAL4B;AAM5BC,IAAAA,aAN4B;AAO5BC,IAAAA,aAP4B;AAQ5BC,IAAAA,SAR4B;AAS5BC,IAAAA,kBAT4B;AAU5BC,IAAAA,mBAV4B;AAW5BC,IAAAA;AAX4B,GAA9B;AAcA,SAAO;AAAEC,IAAAA,UAAF;AAAcG,IAAAA;AAAd,GAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CACLC,UADK,EAELC,aAFK,EAGL;AACA,MAAI,CAACA,aAAL,EAAoB;AAClB;AACD;;AAED,QAAMC,eAAe,GAAGN,wBAAWC,OAAX,CAAmBG,UAAnB,CAAxB;;AAEA,OAAK,MAAM,CAACG,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,aAAf,CAA3B,EAA0D;AACxD,QAAIG,KAAK,IAAI,IAAb,EAAmB;AACjBF,MAAAA,eAAe,CAACC,GAAD,CAAf,GAAuBC,KAAvB;AACD;AACF;;AAED,SAAOF,eAAP;AACD","sourcesContent":["import { StyleSheet, StyleProp, TextStyle } from \"react-native\";\n\nexport function extractStyles(style: StyleProp<any>) {\n const {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n ...viewStyles\n } = StyleSheet.flatten(style || {});\n\n const textStyles: TextStyle = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n\n return { viewStyles, textStyles };\n}\n\n/**\n * Merges a style object on top of another style object. In React Native,\n * keys with undefined values in a style object will still override styles\n * that appear earlier in a sequence. This avoids that problem.\n *\n * This lets us avoid the `...(something ? { something } : {})` pattern.\n * There doesn't seem to be a better way to do this. These all seem to not\n * work (i.e. they all result in `{ color: undefined }`:\n * `const mergedStyles = [{ color: \"red\" }, { color: undefined }]`\n * `const mergedStyles = StyleSheet.compose({ color: \"red\" }, { color: undefined })`\n * `const mergedStyles = StyleSheet.flatten([{ color: \"red\" }, { color: undefined }])`\n */\nexport function applyStyles(\n baseStyles: Array<StyleProp<any>>,\n stylesToApply: StyleProp<any> | undefined\n) {\n if (!stylesToApply) {\n return;\n }\n\n const flattenedStyles = StyleSheet.flatten(baseStyles);\n\n for (const [key, value] of Object.entries(stylesToApply)) {\n if (value != null) {\n flattenedStyles[key] = value;\n }\n }\n\n return flattenedStyles;\n}\n"]}
1
+ {"version":3,"sources":["utilities.ts"],"names":["extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","StyleSheet","flatten","textStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries","getRealValue","String","undefined","Error"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEO,SAASA,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,MAaFC,wBAAWC,OAAX,CAAmBd,KAAK,IAAI,EAA5B,CAbJ;;AAeA,QAAMe,UAAqB,GAAG;AAC5Bd,IAAAA,KAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,UAH4B;AAI5BC,IAAAA,QAJ4B;AAK5BC,IAAAA,UAL4B;AAM5BC,IAAAA,aAN4B;AAO5BC,IAAAA,aAP4B;AAQ5BC,IAAAA,SAR4B;AAS5BC,IAAAA,kBAT4B;AAU5BC,IAAAA,mBAV4B;AAW5BC,IAAAA;AAX4B,GAA9B;AAcA,SAAO;AAAEC,IAAAA,UAAF;AAAcG,IAAAA;AAAd,GAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CACLC,UADK,EAELC,aAFK,EAGL;AACA,MAAI,CAACA,aAAL,EAAoB;AAClB;AACD;;AAED,QAAMC,eAAe,GAAGN,wBAAWC,OAAX,CAAmBG,UAAnB,CAAxB;;AAEA,OAAK,MAAM,CAACG,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,aAAf,CAA3B,EAA0D;AACxD,QAAIG,KAAK,IAAI,IAAb,EAAmB;AACjBF,MAAAA,eAAe,CAACC,GAAD,CAAf,GAAuBC,KAAvB;AACD;AACF;;AAED,SAAOF,eAAP;AACD;;AAEM,SAASK,YAAT,CAAsBH,KAAtB,EAA0D;AAC/D,MAAI,sBAASA,KAAT,CAAJ,EAAqB,OAAOA,KAAP,CAArB,KACK,IAAI,sBAASA,KAAT,CAAJ,EAAqB,OAAOI,MAAM,CAACJ,KAAD,CAAb,CAArB,KACA,IAAI,CAACA,KAAL,EAAY,OAAOK,SAAP,CAAZ,KACA,MAAM,IAAIC,KAAJ,CAAW,kBAAiBN,KAAM,EAAlC,CAAN;AACN","sourcesContent":["import { StyleSheet, StyleProp, TextStyle } from \"react-native\";\nimport { isString, isNumber } from \"lodash\";\n\nexport function extractStyles(style: StyleProp<any>) {\n const {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n ...viewStyles\n } = StyleSheet.flatten(style || {});\n\n const textStyles: TextStyle = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n\n return { viewStyles, textStyles };\n}\n\n/**\n * Merges a style object on top of another style object. In React Native,\n * keys with undefined values in a style object will still override styles\n * that appear earlier in a sequence. This avoids that problem.\n *\n * This lets us avoid the `...(something ? { something } : {})` pattern.\n * There doesn't seem to be a better way to do this. These all seem to not\n * work (i.e. they all result in `{ color: undefined }`:\n * `const mergedStyles = [{ color: \"red\" }, { color: undefined }]`\n * `const mergedStyles = StyleSheet.compose({ color: \"red\" }, { color: undefined })`\n * `const mergedStyles = StyleSheet.flatten([{ color: \"red\" }, { color: undefined }])`\n */\nexport function applyStyles(\n baseStyles: Array<StyleProp<any>>,\n stylesToApply: StyleProp<any> | undefined\n) {\n if (!stylesToApply) {\n return;\n }\n\n const flattenedStyles = StyleSheet.flatten(baseStyles);\n\n for (const [key, value] of Object.entries(stylesToApply)) {\n if (value != null) {\n flattenedStyles[key] = value;\n }\n }\n\n return flattenedStyles;\n}\n\nexport function getRealValue(value: string | number | undefined) {\n if (isString(value)) return value;\n else if (isNumber(value)) return String(value);\n else if (!value) return undefined;\n else throw new Error(`Invalid value: ${value}`);\n}\n"]}
@@ -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,IAAAA,KAAxF;AAA+FC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAAtG,GAAoI;AAChJ,sBAAQpB,KAAK,CAACqB,aAAN,CAAoBpB,IAApB,EAA0B;AAAEgB,IAAAA,KAAK,EAAE,CAACK,MAAM,CAACC,SAAR,EAAmBN,KAAnB;AAAT,GAA1B,eACJjB,KAAK,CAACqB,aAAN,CAAoBpB,IAApB,EAA0B;AAAEgB,IAAAA,KAAK,EAAEK,MAAM,CAACE;AAAhB,GAA1B,eACIxB,KAAK,CAACqB,aAAN,CAAoBnB,IAApB,EAA0B;AAAEe,IAAAA,KAAK,EAAE,CAC3BP,cAD2B,EAE3B;AACIe,MAAAA,KAAK,EAAEd,UADX;AAEIe,MAAAA,IAAI,EAAE;AAFV,KAF2B,CAAT;AAMnBC,IAAAA,aAAa,EAAE;AANI,GAA1B,EAM2Bf,KAN3B,CADJ,EAQII,OAAO,iBAAKhB,KAAK,CAACqB,aAAN,CAAoBf,SAApB,EAA+B;AAAEW,IAAAA,KAAK,EAAE;AAAEW,MAAAA,SAAS,EAAE,QAAb;AAAuBC,MAAAA,UAAU,EAAE;AAAnC,KAAT;AAAkDb,IAAAA,OAAO,EAAEA;AAA3D,GAA/B,eACRhB,KAAK,CAACqB,aAAN,CAAoBpB,IAApB,EAA0B;AAAEgB,IAAAA,KAAK,EAAEK,MAAM,CAACQ;AAAhB,GAA1B,eACI9B,KAAK,CAACqB,aAAN,CAAoBnB,IAApB,EAA0B;AAAEe,IAAAA,KAAK,EAAE,CAC3BG,UAAU,CAACW,SADgB,EAE3B;AACIN,MAAAA,KAAK,EAAEN,MAAM,CAACa,KADlB;AAEIC,MAAAA,WAAW,EAAE;AAFjB,KAF2B,CAAT;AAMnBN,IAAAA,aAAa,EAAE;AANI,GAA1B,EAM2Bd,UAN3B,CADJ,eAQIb,KAAK,CAACqB,aAAN,CAAoBZ,IAApB,EAA0B;AAAEyB,IAAAA,IAAI,EAAEnB,IAAR;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,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEI,MAAM,CAACE;AAApB,kBACE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CACLb,cADK,EAEL;AACEc,MAAAA,KAAK,EAAEb,UADT;AAEEc,MAAAA,IAAI,EAAE;AAFR,KAFK,CADT;AAQE,IAAA,aAAa,EAAE;AARjB,KAUGb,KAVH,CADF,EAaGI,OAAO,iBACN,oBAAC,SAAD;AACE,IAAA,KAAK,EAAE;AAAEU,MAAAA,SAAS,EAAE,QAAb;AAAuBC,MAAAA,UAAU,EAAE;AAAnC,KADT;AAEE,IAAA,OAAO,EAAEX;AAFX,kBAIE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEK,MAAM,CAACO;AAApB,kBACE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CACLR,UAAU,CAACS,SADN,EAEL;AACEL,MAAAA,KAAK,EAAEL,MAAM,CAACW,KADhB;AAEEC,MAAAA,WAAW,EAAE;AAFf,KAFK,CADT;AAQE,IAAA,aAAa,EAAE;AARjB,KAUGlB,UAVH,CADF,eAaE,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEE,IADR;AAEE,IAAA,IAAI,EAAER,MAAM,CAACyB,cAFf;AAGE,IAAA,KAAK,EAAEb,MAAM,CAACW;AAHhB,IAbF,CAJF,CAdJ,CADF,eAyCE,oBAAC,OAAD;AAAS,IAAA,KAAK,EAAE;AAAEG,MAAAA,SAAS,EAAEnB,gBAAgB,IAAI;AAAjC;AAAhB,IAzCF,CADF;AA6CD,CAzDD;;AA2DA,MAAMO,MAAM,GAAGlB,UAAU,CAAC+B,MAAX,CAAkB;AAC/BZ,EAAAA,SAAS,EAAE;AACTI,IAAAA,SAAS,EAAE;AADF,GADoB;AAI/BH,EAAAA,YAAY,EAAE;AACZY,IAAAA,aAAa,EAAE,KADH;AAEZC,IAAAA,cAAc,EAAE,eAFJ;AAGZC,IAAAA,UAAU,EAAE;AAHA,GAJiB;AAS/BT,EAAAA,eAAe,EAAE;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"]}
@@ -3,6 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import * as React from "react";
4
4
  import Config from "../Config";
5
5
  import IconButton from "../IconButton";
6
+ import { getRealValue } from "../../utilities";
6
7
  import { useRadioButtonGroupContext } from "./context";
7
8
 
8
9
  const RadioButton = _ref => {
@@ -13,7 +14,7 @@ const RadioButton = _ref => {
13
14
  value,
14
15
  selected,
15
16
  unselectedColor,
16
- onPress = () => {},
17
+ onPress,
17
18
  size = Config.radioButtonSize,
18
19
  selectedIcon = "MaterialIcons/radio-button-checked",
19
20
  unselectedIcon = "MaterialIcons/radio-button-unchecked",
@@ -24,16 +25,17 @@ const RadioButton = _ref => {
24
25
  value: contextValue,
25
26
  onValueChange
26
27
  } = useRadioButtonGroupContext();
28
+ const realValue = getRealValue(value);
29
+ const realContextValue = getRealValue(contextValue);
30
+ const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue && realValue && realContextValue === realValue;
27
31
 
28
32
  const handlePress = () => {
29
- onPress && onPress();
30
-
31
- if (onValueChange && value) {
32
- onValueChange(value);
33
+ if (realValue) {
34
+ onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
35
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
33
36
  }
34
37
  };
35
38
 
36
- const isSelected = selected || contextValue != null && contextValue === value;
37
39
  return /*#__PURE__*/React.createElement(IconButton, _extends({
38
40
  Icon: Icon,
39
41
  icon: isSelected ? selectedIcon : unselectedIcon,
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButton.tsx"],"names":["React","Config","IconButton","useRadioButtonGroupContext","RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","handlePress","isSelected"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAGA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,0BAAT,QAA2C,WAA3C;;AAiBA,MAAMC,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,GAAGX,MAAM,CAACY,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;AAAET,IAAAA,KAAK,EAAEU,YAAT;AAAuBC,IAAAA;AAAvB,MAAyChB,0BAA0B,EAAzE;;AAEA,QAAMiB,WAAW,GAAG,MAAM;AACxBT,IAAAA,OAAO,IAAIA,OAAO,EAAlB;;AAEA,QAAIQ,aAAa,IAAIX,KAArB,EAA4B;AAC1BW,MAAAA,aAAa,CAACX,KAAD,CAAb;AACD;AACF,GAND;;AAQA,QAAMa,UAAU,GACdZ,QAAQ,IAAKS,YAAY,IAAI,IAAhB,IAAwBA,YAAY,KAAKV,KADxD;AAGA,sBACE,oBAAC,UAAD;AACE,IAAA,IAAI,EAAEH,IADR;AAEE,IAAA,IAAI,EAAEgB,UAAU,GAAGP,YAAH,GAAkBC,cAFpC;AAGE,IAAA,KAAK,EAAEM,UAAU,GAAGd,KAAH,GAAWG,eAH9B;AAIE,IAAA,QAAQ,EAAEJ,QAJZ;AAKE,IAAA,OAAO,EAAEc,WALX;AAME,IAAA,IAAI,EAAER,IANR;AAOE,IAAA,KAAK,EAAEI;AAPT,KAQMC,IARN,EADF;AAYD,CAvCD;;AAyCA,eAAeb,WAAf","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":["React","Config","IconButton","getRealValue","useRadioButtonGroupContext","RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAGA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,0BAAT,QAA2C,WAA3C;;AAiBA,MAAMC,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,GAAGZ,MAAM,CAACa,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;AAAET,IAAAA,KAAK,EAAEU,YAAT;AAAuBC,IAAAA;AAAvB,MAAyChB,0BAA0B,EAAzE;AAEA,QAAMiB,SAAS,GAAGlB,YAAY,CAACM,KAAD,CAA9B;AACA,QAAMa,gBAAgB,GAAGnB,YAAY,CAACgB,YAAD,CAArC;AACA,QAAMI,UAAU,GACdb,QADc,aACdA,QADc,cACdA,QADc,GAEbY,gBAAgB,IAAID,SAApB,IAAiCC,gBAAgB,KAAKD,SAFzD;;AAIA,QAAMG,WAAW,GAAG,MAAM;AACxB,QAAIH,SAAJ,EAAe;AACbT,MAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGS,SAAH,CAAP;AACAD,MAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGC,SAAH,CAAb;AACD;AACF,GALD;;AAOA,sBACE,oBAAC,UAAD;AACE,IAAA,IAAI,EAAEf,IADR;AAEE,IAAA,IAAI,EAAEiB,UAAU,GAAGR,YAAH,GAAkBC,cAFpC;AAGE,IAAA,KAAK,EAAEO,UAAU,GAAGf,KAAH,GAAWG,eAH9B;AAIE,IAAA,QAAQ,EAAEJ,QAJZ;AAKE,IAAA,OAAO,EAAEiB,WALX;AAME,IAAA,IAAI,EAAEX,IANR;AAOE,IAAA,KAAK,EAAEI;AAPT,KAQMC,IARN,EADF;AAYD,CAzCD;;AA2CA,eAAeb,WAAf","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"]}
@@ -2,6 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
2
2
 
3
3
  import * as React from "react";
4
4
  import { View } from "react-native";
5
+ import { getRealValue } from "../../utilities";
5
6
  import { radioButtonGroupContext, Direction } from "./context";
6
7
  const {
7
8
  Provider
@@ -11,27 +12,35 @@ const RadioButtonGroup = _ref => {
11
12
  let {
12
13
  direction = Direction.Vertical,
13
14
  value,
14
- onValueChange = () => {},
15
+ onValueChange,
15
16
  defaultValue,
16
17
  style,
17
18
  children,
18
19
  ...rest
19
20
  } = _ref;
20
- const [internalValue, setInternalValue] = React.useState(value || defaultValue);
21
+ const [internalValue, setInternalValue] = React.useState();
21
22
  React.useEffect(() => {
22
- if (value != null) {
23
- setInternalValue(value);
23
+ const realValue = getRealValue(value);
24
+
25
+ if (realValue) {
26
+ setInternalValue(realValue);
24
27
  }
25
28
  }, [value]);
26
29
  React.useEffect(() => {
27
- if (defaultValue != null) {
28
- setInternalValue(defaultValue);
30
+ const realDefaultValue = getRealValue(defaultValue);
31
+
32
+ if (realDefaultValue) {
33
+ setInternalValue(realDefaultValue);
29
34
  }
30
35
  }, [defaultValue]);
31
36
 
32
37
  const handleValueChange = newValue => {
33
- setInternalValue(newValue);
34
- onValueChange(newValue);
38
+ const realNewValue = getRealValue(newValue);
39
+
40
+ if (realNewValue) {
41
+ setInternalValue(newValue);
42
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(newValue);
43
+ }
35
44
  };
36
45
 
37
46
  const _containerStyle = [{
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonGroup.tsx"],"names":["React","View","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","handleValueChange","newValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAA2C,cAA3C;AAEA,SAASC,uBAAT,EAAkCC,SAAlC,QAAmD,WAAnD;AAWA,MAAM;AAAEC,EAAAA;AAAF,IAAeF,uBAArB;;AAEA,MAAMG,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGH,SAAS,CAACI,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,IAAoCf,KAAK,CAACgB,QAAN,CACxCR,KAAK,IAAIE,YAD+B,CAA1C;AAIAV,EAAAA,KAAK,CAACiB,SAAN,CAAgB,MAAM;AACpB,QAAIT,KAAK,IAAI,IAAb,EAAmB;AACjBO,MAAAA,gBAAgB,CAACP,KAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,KAAD,CAJH;AAMAR,EAAAA,KAAK,CAACiB,SAAN,CAAgB,MAAM;AACpB,QAAIP,YAAY,IAAI,IAApB,EAA0B;AACxBK,MAAAA,gBAAgB,CAACL,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMQ,iBAAiB,GAAIC,QAAD,IAAsB;AAC9CJ,IAAAA,gBAAgB,CAACI,QAAD,CAAhB;AACAV,IAAAA,aAAa,CAACU,QAAD,CAAb;AACD,GAHD;;AAKA,QAAMC,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAEf,SAAS,KAAKH,SAAS,CAACmB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAIhB,SAAS,KAAKH,SAAS,CAACI,QAA5B,EAAsC;AACpCa,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBd,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADnB;AAELL,MAAAA,aAAa,EAAES,iBAFV;AAGLZ,MAAAA;AAHK;AADT,kBAOE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEc;AAAb,KAA+BR,QAA/B,CAPF,CADF,CADF;AAaD,CAvDD;;AAyDA,eAAeP,gBAAf","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":["React","View","getRealValue","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAA2C,cAA3C;AAEA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,uBAAT,EAAkCC,SAAlC,QAAmD,WAAnD;AAWA,MAAM;AAAEC,EAAAA;AAAF,IAAeF,uBAArB;;AAEA,MAAMG,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGH,SAAS,CAACI,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,IAAoChB,KAAK,CAACiB,QAAN,EAA1C;AAIAjB,EAAAA,KAAK,CAACkB,SAAN,CAAgB,MAAM;AACpB,UAAMC,SAAS,GAAGjB,YAAY,CAACO,KAAD,CAA9B;;AAEA,QAAIU,SAAJ,EAAe;AACbH,MAAAA,gBAAgB,CAACG,SAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACV,KAAD,CANH;AAQAT,EAAAA,KAAK,CAACkB,SAAN,CAAgB,MAAM;AACpB,UAAME,gBAAgB,GAAGlB,YAAY,CAACS,YAAD,CAArC;;AAEA,QAAIS,gBAAJ,EAAsB;AACpBJ,MAAAA,gBAAgB,CAACI,gBAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACT,YAAD,CANH;;AAQA,QAAMU,iBAAiB,GAAIC,QAAD,IAAmB;AAC3C,UAAMC,YAAY,GAAGrB,YAAY,CAACoB,QAAD,CAAjC;;AAEA,QAAIC,YAAJ,EAAkB;AAChBP,MAAAA,gBAAgB,CAACM,QAAD,CAAhB;AACAZ,MAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGY,QAAH,CAAb;AACD;AACF,GAPD;;AASA,QAAME,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAElB,SAAS,KAAKH,SAAS,CAACsB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAInB,SAAS,KAAKH,SAAS,CAACI,QAA5B,EAAsC;AACpCgB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBjB,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADnB;AAELL,MAAAA,aAAa,EAAEW,iBAFV;AAGLd,MAAAA;AAHK;AADT,kBAOE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEiB;AAAb,KAA+BX,QAA/B,CAPF,CADF,CADF;AAaD,CA/DD;;AAiEA,eAAeP,gBAAf","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"]}