@draftbit/core 43.4.8 → 43.4.9-f2446b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  2. package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
  3. package/lib/commonjs/components/AnimatedCircularProgress.js +11 -3
  4. package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
  5. package/lib/commonjs/components/AspectRatio.js +16 -3
  6. package/lib/commonjs/components/AspectRatio.js.map +1 -1
  7. package/lib/commonjs/components/Button.js +29 -11
  8. package/lib/commonjs/components/Button.js.map +1 -1
  9. package/lib/commonjs/components/Card.js.map +1 -1
  10. package/lib/commonjs/components/CardBlock.js +13 -5
  11. package/lib/commonjs/components/CardBlock.js.map +1 -1
  12. package/lib/commonjs/components/CardContainerShortImage.js +18 -5
  13. package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
  14. package/lib/commonjs/components/CardInline.js.map +1 -1
  15. package/lib/commonjs/components/Carousel.js +20 -5
  16. package/lib/commonjs/components/Carousel.js.map +1 -1
  17. package/lib/commonjs/components/Checkbox/context.js +1 -1
  18. package/lib/commonjs/components/Checkbox/context.js.map +1 -1
  19. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  20. package/lib/commonjs/components/CircleImage.js +17 -3
  21. package/lib/commonjs/components/CircleImage.js.map +1 -1
  22. package/lib/commonjs/components/CircularProgress.js.map +1 -1
  23. package/lib/commonjs/components/Config.js.map +1 -1
  24. package/lib/commonjs/components/Container.js +16 -5
  25. package/lib/commonjs/components/Container.js.map +1 -1
  26. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  27. package/lib/commonjs/components/DeprecatedButton.js +19 -4
  28. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  29. package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
  30. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  31. package/lib/commonjs/components/Divider.js +13 -3
  32. package/lib/commonjs/components/Divider.js.map +1 -1
  33. package/lib/commonjs/components/Elevation.js +14 -3
  34. package/lib/commonjs/components/Elevation.js.map +1 -1
  35. package/lib/commonjs/components/Header.js.map +1 -1
  36. package/lib/commonjs/components/HeaderLarge.js.map +1 -1
  37. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  38. package/lib/commonjs/components/Image.js +15 -4
  39. package/lib/commonjs/components/Image.js.map +1 -1
  40. package/lib/commonjs/components/Justification.js +2 -1
  41. package/lib/commonjs/components/NumberInput.js +15 -4
  42. package/lib/commonjs/components/NumberInput.js.map +1 -1
  43. package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -6
  44. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  45. package/lib/commonjs/components/Picker/PickerComponent.ios.js +30 -10
  46. package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
  47. package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -6
  48. package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
  49. package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
  50. package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
  51. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  52. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  53. package/lib/commonjs/components/RadioButton/RadioButton.js +15 -3
  54. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  55. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
  56. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  57. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -5
  58. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  59. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -6
  60. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  61. package/lib/commonjs/components/ResizeMode.js +2 -1
  62. package/lib/commonjs/components/Row.js.map +1 -1
  63. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  64. package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
  65. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  66. package/lib/commonjs/components/ScreenContainer.js +18 -5
  67. package/lib/commonjs/components/ScreenContainer.js.map +1 -1
  68. package/lib/commonjs/components/Slider.js +22 -5
  69. package/lib/commonjs/components/Slider.js.map +1 -1
  70. package/lib/commonjs/components/StarRating.js +23 -5
  71. package/lib/commonjs/components/StarRating.js.map +1 -1
  72. package/lib/commonjs/components/Surface.js +10 -3
  73. package/lib/commonjs/components/Surface.js.map +1 -1
  74. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  75. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  76. package/lib/commonjs/components/ToggleButton.js +17 -3
  77. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  78. package/lib/commonjs/components/Touchable.js +16 -3
  79. package/lib/commonjs/components/Touchable.js.map +1 -1
  80. package/lib/commonjs/components/Touchable.web.js.map +1 -1
  81. package/lib/commonjs/components/Typography.js.map +1 -1
  82. package/lib/commonjs/components/useAuthState.js.map +1 -1
  83. package/lib/commonjs/mappings/ActionSheetCancel.js.map +1 -1
  84. package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
  85. package/lib/commonjs/mappings/AudioPlayer.js.map +1 -1
  86. package/lib/commonjs/mappings/Button.js.map +1 -1
  87. package/lib/commonjs/mappings/CardContainer.js.map +1 -1
  88. package/lib/commonjs/mappings/DatePicker.js.map +1 -1
  89. package/lib/commonjs/mappings/ProgressBar.js.map +1 -1
  90. package/lib/commonjs/mappings/ProgressIndicator.js.map +1 -1
  91. package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
  92. package/lib/commonjs/mappings/Text.js.map +1 -1
  93. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  94. package/lib/module/components/DeprecatedCardWrapper.js +4 -5
  95. package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
  96. package/lib/module/components/NumberInput.js +2 -2
  97. package/lib/module/components/NumberInput.js.map +1 -1
  98. package/lib/module/mappings/ActivityIndicator.js.map +1 -1
  99. package/package.json +2 -2
  100. package/src/components/NumberInput.js +2 -2
  101. package/src/components/NumberInput.tsx +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["PickerComponent.web.tsx"],"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","flex","opacity","position","top","left","right","bottom","width","map","create","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAGA,MAAMA,MAAsC,GAAG,QAQzC;AAAA;;AAAA,MAR0C;AAC9CC,IAAAA,KAD8C;AAE9CC,IAAAA,OAF8C;AAG9CC,IAAAA,WAH8C;AAI9CC,IAAAA,aAJ8C;AAK9CC,IAAAA,QAAQ,GAAG,KALmC;AAM9CC,IAAAA,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAE,CAND;AAO9C,OAAGC;AAP2C,GAQ1C;AACJ,QAAM;AACJC,IAAAA,UAAU,EAAE;AACVC,MAAAA,YADU;AACI;AACdC,MAAAA,WAFU;AAEG;AACbC,MAAAA,cAHU;AAGM;AAChBC,MAAAA,gBAJU;AAIQ;AAClBC,MAAAA,iBALU;AAKS;AACnBC,MAAAA,eANU;AAMO;AACjBC,MAAAA,WAPU;AAOG;AACbC,MAAAA,eARU;AAQO;AACjBC,MAAAA,OATU;AASD;AACTC,MAAAA,UAVU;AAUE;AAC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AGLC,MAAAA,QAAQ,EAAE,UAHL;AAILC,MAAAA,GAAG,EAAE,CAJA;AAKLC,MAAAA,IAAI,EAAE,CALD;AAMLC,MAAAA,KAAK,EAAE,CANF;AAOLC,MAAAA,MAAM,EAAE,CAPH;AAQLC,MAAAA,KAAK,EAAE;AARF;AAJT,KAeG9C,OAAO,CAAC+C,GAAR,CAAab,CAAD,iBACX,oBAAC,cAAD,CAAc,IAAd;AAAmB,IAAA,KAAK,EAAEA,CAAC,CAACE,KAA5B;AAAmC,IAAA,KAAK,EAAEF,CAAC,CAACC,KAA5C;AAAmD,IAAA,GAAG,EAAED,CAAC,CAACC;AAA1D,IADD,CAfH,CADF,eAoBE,oBAAC,iBAAD;AAAM,IAAA,aAAa,EAAC;AAApB,kBACE,oBAAC,kBAAD,eACM7B,KADN;AAEE,IAAA,KAAK,EAAE0B,aAFT;AAGE,IAAA,WAAW,EAAE/B,WAHf,CAIE;AAJF;AAKE,IAAA,GAAG,EAAEoB,SALP,CAKkB;AALlB;AAME,IAAA,QAAQ,EAAElB,QANZ,CAOE;AAPF;AAQE,IAAA,KAAK,EAAE0B;AART,KADF,CApBF,CALF,CADF;AAyCD,CAjGD;;AAmGA,MAAMQ,MAAM,GAAGP,wBAAWkB,MAAX,CAAkB;AAC/BV,EAAAA,SAAS,EAAE;AACTW,IAAAA,SAAS,EAAE;AADF;AADoB,CAAlB,CAAf;;eAMe,wBAAUnD,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { extractStyles } from \"../../utilities\";\n\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nimport { PickerComponentProps } from \"./PickerTypes\";\n\nconst Picker: React.FC<PickerComponentProps> = ({\n style,\n options,\n placeholder,\n selectedValue,\n disabled = false,\n onValueChange: onValueChangeOverride = () => {},\n ...props\n}) => {\n const {\n viewStyles: {\n borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles\n },\n } = extractStyles(style);\n\n const textField = React.useRef<typeof TextField | undefined>(undefined);\n\n const onValueChange = (itemValue: string, itemIndex: number) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n\n const stylesWithoutMargin =\n style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n\n const selectedLabel =\n selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n\n return (\n <Touchable\n disabled={disabled}\n onPress={toggleFocus}\n style={[styles.container, viewStyles]}\n >\n <View>\n <NativePicker\n enabled={!disabled}\n selectedValue={selectedValue}\n onValueChange={onValueChange}\n style={{\n flex: 1,\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n }}\n >\n {options.map((o) => (\n <NativePicker.Item label={o.label} value={o.value} key={o.value} />\n ))}\n </NativePicker>\n <View pointerEvents=\"none\">\n <TextField\n {...props}\n value={selectedLabel}\n placeholder={placeholder}\n // @ts-ignore\n ref={textField} // cannot determine if ref is of correct type due to component being wrapped in a withTheme()\n disabled={disabled}\n // @ts-expect-error\n style={stylesWithoutMargin}\n />\n </View>\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\n\nexport default withTheme(Picker);\n"]}
1
+ {"version":3,"sources":["PickerComponent.web.js"],"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","StyleSheet","flatten","selectedLabel","find","o","value","label","createElement","Touchable","onPress","styles","container","View","NativePicker","enabled","flex","opacity","position","top","left","right","bottom","width","map","Item","key","pointerEvents","TextField","ref","create","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,MAAM,GAAG,QAAkI;AAAA;;AAAA,MAAjI;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA,aAA/B;AAA8CC,IAAAA,QAAQ,GAAG,KAAzD;AAAgEC,IAAAA,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAG,CAAhH;AAAkH,OAAGC;AAArH,GAAiI;AAC7I,QAAM;AAAEC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,YAAF;AAAgB;AACpCC,MAAAA,WADoB;AACP;AACbC,MAAAA,cAFoB;AAEJ;AAChBC,MAAAA,gBAHoB;AAGF;AAClBC,MAAAA,iBAJoB;AAID;AACnBC,MAAAA,eALoB;AAKH;AACjBC,MAAAA,WANoB;AAMP;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,CAAlB,CAAf;;eAKe,wBAAU9D,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { extractStyles } from \"../../utilities\";\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nconst Picker = ({ style, options, placeholder, selectedValue, disabled = false, onValueChange: onValueChangeOverride = () => { }, ...props }) => {\n const { viewStyles: { borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles }, } = extractStyles(style);\n const textField = React.useRef(undefined);\n const onValueChange = (itemValue, itemIndex) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n const stylesWithoutMargin = style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n const selectedLabel = selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n return (React.createElement(Touchable, { disabled: disabled, onPress: toggleFocus, style: [styles.container, viewStyles] },\n React.createElement(View, null,\n React.createElement(NativePicker, { enabled: !disabled, selectedValue: selectedValue, onValueChange: onValueChange, style: {\n flex: 1,\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n } }, options.map((o) => (React.createElement(NativePicker.Item, { label: o.label, value: o.value, key: o.value })))),\n React.createElement(View, { pointerEvents: \"none\" },\n React.createElement(TextField, { ...props, value: selectedLabel, placeholder: placeholder, \n // @ts-ignore\n ref: textField, disabled: disabled, \n // @ts-expect-error\n style: stylesWithoutMargin })))));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\nexport default withTheme(Picker);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalConsumer.tsx"],"names":["PortalConsumer","React","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;;;;;;AAAA;;;;;;;;AAQe,MAAMA,cAAN,SAA6BC,KAAK,CAACC,SAAnC,CAAoD;AAAA;AAAA;;AAAA;AAAA;;AAC1C,QAAjBC,iBAAiB,GAAG;AACxB,SAAKC,YAAL,GADwB,CAGxB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AAEA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACD;;AAEDC,EAAAA,kBAAkB,GAAG;AACnB,SAAKR,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACD;;AAEDG,EAAAA,oBAAoB,GAAG;AACrB,SAAKV,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACD;;AAIOH,EAAAA,YAAY,GAAG;AACrB,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACvB,YAAM,IAAIO,KAAJ,CACJ,+GACE,iGADF,GAEE,qEAHE,CAAN;AAKD;AACF;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,IAAP;AACD;;AApCgE","sourcesContent":["import * as React from \"react\";\nimport { PortalMethods } from \"./PortalHost\";\n\ntype Props = {\n manager: PortalMethods;\n children: React.ReactNode;\n};\n\nexport default class PortalConsumer extends React.Component<Props> {\n async componentDidMount() {\n this.checkManager();\n\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n\n this.key = this.props.manager.mount(this.props.children);\n }\n\n componentDidUpdate() {\n this.checkManager();\n\n this.props.manager.update(this.key, this.props.children);\n }\n\n componentWillUnmount() {\n this.checkManager();\n\n this.props.manager.unmount(this.key);\n }\n\n private key: any;\n\n private checkManager() {\n if (!this.props.manager) {\n throw new Error(\n \"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\"\n );\n }\n }\n\n render() {\n return null;\n }\n}\n"]}
1
+ {"version":3,"sources":["PortalConsumer.js"],"names":["PortalConsumer","React","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;;;;;;AAAA;;;;;;;;AACe,MAAMA,cAAN,SAA6BC,KAAK,CAACC,SAAnC,CAA6C;AAAA;AAAA;;AAAA;AAAA;;AACjC,QAAjBC,iBAAiB,GAAG;AACtB,SAAKC,YAAL,GADsB,CAEtB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AACA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACH;;AACDC,EAAAA,kBAAkB,GAAG;AACjB,SAAKR,YAAL;AACA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACH;;AACDG,EAAAA,oBAAoB,GAAG;AACnB,SAAKV,YAAL;AACA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACH;;AAEDH,EAAAA,YAAY,GAAG;AACX,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACrB,YAAM,IAAIO,KAAJ,CAAU,+GACZ,iGADY,GAEZ,qEAFE,CAAN;AAGH;AACJ;;AACDC,EAAAA,MAAM,GAAG;AACL,WAAO,IAAP;AACH;;AAzBuD","sourcesContent":["import * as React from \"react\";\nexport default class PortalConsumer extends React.Component {\n async componentDidMount() {\n this.checkManager();\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n this.key = this.props.manager.mount(this.props.children);\n }\n componentDidUpdate() {\n this.checkManager();\n this.props.manager.update(this.key, this.props.children);\n }\n componentWillUnmount() {\n this.checkManager();\n this.props.manager.unmount(this.key);\n }\n key;\n checkManager() {\n if (!this.props.manager) {\n throw new Error(\"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\");\n }\n }\n render() {\n return null;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalHost.tsx"],"names":["PortalContext","React","createContext","PortalHost","Component","manager","children","key","nextKey","mount","queue","push","type","update","op","index","findIndex","o","unmount","componentDidMount","length","action","pop","render","styles","container","props","setManager","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAiBO,MAAMA,aAAa,gBAAGC,KAAK,CAACC,aAAN,CAAmC,IAAnC,CAAtB;AAEP;AACA;AACA;AACA;AACA;AACA;AAC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AKG,KAAKC,KAAL,CAAWpB,QALd,CARF,eAeE,oBAAC,sBAAD;AAAe,MAAA,GAAG,EAAE,KAAKqB;AAAzB,MAfF,CADF;AAmBD;;AA3F4D;;;;gBAA1CxB,U,iBACE,a;;AA6FvB,MAAMqB,MAAM,GAAGI,wBAAWC,MAAX,CAAkB;AAC/BJ,EAAAA,SAAS,EAAE;AACTK,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport PortalManager from \"./PortalManager\";\n\ntype Props = {\n children: React.ReactNode;\n};\n\ntype Operation =\n | { type: \"mount\"; key: number; children: React.ReactNode }\n | { type: \"update\"; key: number; children: React.ReactNode }\n | { type: \"unmount\"; key: number };\n\nexport type PortalMethods = {\n mount: (children: React.ReactNode) => number;\n update: (key: number, children: React.ReactNode) => void;\n unmount: (key: number) => void;\n};\n\nexport const PortalContext = React.createContext<PortalMethods>(null as any);\n\n/**\n * Portal host renders all of its children `Portal` elements.\n * For example, you can wrap a screen in `Portal.Host` to render items above the screen.\n * If you're using the `Provider` component, it already includes `Portal.Host`.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Text } from 'react-native';\n * import { Portal } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal.Host>\n * <Text>Content of the app</Text>\n * </Portal.Host>\n * );\n * }\n * }\n * ```\n *\n * Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.\n */\nexport default class PortalHost extends React.Component<Props> {\n static displayName = \"Portal.Host\";\n\n componentDidMount() {\n const manager = this.manager;\n const queue = this.queue;\n\n while (queue.length && manager) {\n const action = queue.pop();\n if (action) {\n switch (action.type) {\n case \"mount\":\n manager.mount(action.key, action.children);\n break;\n case \"update\":\n manager.update(action.key, action.children);\n break;\n case \"unmount\":\n manager.unmount(action.key);\n break;\n }\n }\n }\n }\n\n private setManager = (manager: PortalManager | undefined | null) => {\n this.manager = manager;\n };\n\n private mount = (children: React.ReactNode) => {\n const key = this.nextKey++;\n\n if (this.manager) {\n this.manager.mount(key, children);\n } else {\n this.queue.push({ type: \"mount\", key, children });\n }\n\n return key;\n };\n\n private update = (key: number, children: React.ReactNode) => {\n if (this.manager) {\n this.manager.update(key, children);\n } else {\n const op = { type: \"mount\", key, children };\n const index = this.queue.findIndex(\n (o) => o.type === \"mount\" || (o.type === \"update\" && o.key === key)\n );\n\n if (index > -1) {\n // @ts-ignore\n this.queue[index] = op;\n } else {\n this.queue.push(op as Operation);\n }\n }\n };\n\n private unmount = (key: number) => {\n if (this.manager) {\n this.manager.unmount(key);\n } else {\n this.queue.push({ type: \"unmount\", key });\n }\n };\n\n private nextKey = 0;\n private queue: Operation[] = [];\n private manager: PortalManager | null | undefined;\n\n render() {\n return (\n <PortalContext.Provider\n value={{\n mount: this.mount,\n update: this.update,\n unmount: this.unmount,\n }}\n >\n {/* Need collapsable=false here to clip the elevations, otherwise they appear above Portal components */}\n <View\n style={styles.container}\n collapsable={false}\n pointerEvents=\"box-none\"\n >\n {this.props.children}\n </View>\n <PortalManager ref={this.setManager} />\n </PortalContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
1
+ {"version":3,"sources":["PortalHost.js"],"names":["PortalContext","React","createContext","PortalHost","Component","manager","children","key","nextKey","mount","queue","push","type","update","op","index","findIndex","o","unmount","componentDidMount","length","action","pop","render","createElement","Provider","value","View","style","styles","container","collapsable","pointerEvents","props","PortalManager","ref","setManager","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AACO,MAAMA,aAAa,gBAAGC,KAAK,CAACC,aAAN,CAAoB,IAApB,CAAtB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACe,MAAMC,U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EAAsG,KAAKC,KAAL,CAAW3B,QAAjH,CALI,eAMJL,KAAK,CAACuB,aAAN,CAAoBU,sBAApB,EAAmC;AAAEC,MAAAA,GAAG,EAAE,KAAKC;AAAZ,KAAnC,CANI,CAAR;AAOH;;AAtEmD;;;;gBAAnCjC,U,iBACI,a;;AAuEzB,MAAM0B,MAAM,GAAGQ,wBAAWC,MAAX,CAAkB;AAC7BR,EAAAA,SAAS,EAAE;AACPS,IAAAA,IAAI,EAAE;AADC;AADkB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport PortalManager from \"./PortalManager\";\nexport const PortalContext = React.createContext(null);\n/**\n * Portal host renders all of its children `Portal` elements.\n * For example, you can wrap a screen in `Portal.Host` to render items above the screen.\n * If you're using the `Provider` component, it already includes `Portal.Host`.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Text } from 'react-native';\n * import { Portal } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal.Host>\n * <Text>Content of the app</Text>\n * </Portal.Host>\n * );\n * }\n * }\n * ```\n *\n * Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.\n */\nexport default class PortalHost extends React.Component {\n static displayName = \"Portal.Host\";\n componentDidMount() {\n const manager = this.manager;\n const queue = this.queue;\n while (queue.length && manager) {\n const action = queue.pop();\n if (action) {\n switch (action.type) {\n case \"mount\":\n manager.mount(action.key, action.children);\n break;\n case \"update\":\n manager.update(action.key, action.children);\n break;\n case \"unmount\":\n manager.unmount(action.key);\n break;\n }\n }\n }\n }\n setManager = (manager) => {\n this.manager = manager;\n };\n mount = (children) => {\n const key = this.nextKey++;\n if (this.manager) {\n this.manager.mount(key, children);\n }\n else {\n this.queue.push({ type: \"mount\", key, children });\n }\n return key;\n };\n update = (key, children) => {\n if (this.manager) {\n this.manager.update(key, children);\n }\n else {\n const op = { type: \"mount\", key, children };\n const index = this.queue.findIndex((o) => o.type === \"mount\" || (o.type === \"update\" && o.key === key));\n if (index > -1) {\n // @ts-ignore\n this.queue[index] = op;\n }\n else {\n this.queue.push(op);\n }\n }\n };\n unmount = (key) => {\n if (this.manager) {\n this.manager.unmount(key);\n }\n else {\n this.queue.push({ type: \"unmount\", key });\n }\n };\n nextKey = 0;\n queue = [];\n manager;\n render() {\n return (React.createElement(PortalContext.Provider, { value: {\n mount: this.mount,\n update: this.update,\n unmount: this.unmount,\n } },\n React.createElement(View, { style: styles.container, collapsable: false, pointerEvents: \"box-none\" }, this.props.children),\n React.createElement(PortalManager, { ref: this.setManager })));\n }\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalManager.tsx"],"names":["PortalManager","React","PureComponent","portals","key","children","setState","state","map","item","filter","render","StyleSheet","absoluteFill"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AASA;AACA;AACA;AACe,MAAMA,aAAN,SAA4BC,KAAK,CAACC,aAAlC,CAA2D;AAAA;AAAA;;AAAA,mCACzD;AACbC,MAAAA,OAAO,EAAE;AADI,KADyD;;AAAA,mCAKhE,CAACC,GAAD,EAAcC,QAAd,KAA4C;AAClD,WAAKC,QAAL,CAAeC,KAAD,KAAY;AACxBJ,QAAAA,OAAO,EAAE,CAAC,GAAGI,KAAK,CAACJ,OAAV,EAAmB;AAAEC,UAAAA,GAAF;AAAOC,UAAAA;AAAP,SAAnB;AADe,OAAZ,CAAd;AAGD,KATuE;;AAAA,oCAW/D,CAACD,GAAD,EAAcC,QAAd,KACP,KAAKC,QAAL,CAAeC,KAAD,KAAY;AACxBJ,MAAAA,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcK,GAAd,CAAmBC,IAAD,IAAU;AACnC,YAAIA,IAAI,CAACL,GAAL,KAAaA,GAAjB,EAAsB;AACpB,iBAAO,EAAE,GAAGK,IAAL;AAAWJ,YAAAA;AAAX,WAAP;AACD;;AACD,eAAOI,IAAP;AACD,OALQ;AADe,KAAZ,CAAd,CAZsE;;AAAA,qCAqB7DL,GAAD,IACR,KAAKE,QAAL,CAAeC,KAAD,KAAY;AACxBJ,MAAAA,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcO,MAAd,CAAsBD,IAAD,IAAUA,IAAI,CAACL,GAAL,KAAaA,GAA5C;AADe,KAAZ,CAAd,CAtBsE;AAAA;;AA0BxEO,EAAAA,MAAM,GAAG;AACP,WAAO,KAAKJ,KAAL,CAAWJ,OAAX,CAAmBK,GAAnB,CAAuB;AAAA,UAAC;AAAEJ,QAAAA,GAAF;AAAOC,QAAAA;AAAP,OAAD;AAAA,0BAC5B,oBAAC,iBAAD;AACE,QAAA,GAAG,EAAED,GADP;AAEE,QAAA,WAAW,EACT;AAAM;AAHV;AAKE,QAAA,aAAa,EAAC,UALhB;AAME,QAAA,KAAK,EAAEQ,wBAAWC;AANpB,SAQGR,QARH,CAD4B;AAAA,KAAvB,CAAP;AAYD;;AAvCuE","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\n\ntype State = {\n portals: Array<{\n key: number;\n children: React.ReactNode;\n }>;\n};\n\n/**\n * Portal host is the component which actually renders all Portals.\n */\nexport default class PortalManager extends React.PureComponent<{}, State> {\n state: State = {\n portals: [],\n };\n\n mount = (key: number, children: React.ReactNode) => {\n this.setState((state) => ({\n portals: [...state.portals, { key, children }],\n }));\n };\n\n update = (key: number, children: React.ReactNode) =>\n this.setState((state) => ({\n portals: state.portals.map((item) => {\n if (item.key === key) {\n return { ...item, children };\n }\n return item;\n }),\n }));\n\n unmount = (key: number) =>\n this.setState((state) => ({\n portals: state.portals.filter((item) => item.key !== key),\n }));\n\n render() {\n return this.state.portals.map(({ key, children }) => (\n <View\n key={key}\n collapsable={\n false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */\n }\n pointerEvents=\"box-none\"\n style={StyleSheet.absoluteFill}\n >\n {children}\n </View>\n ));\n }\n}\n"]}
1
+ {"version":3,"sources":["PortalManager.js"],"names":["PortalManager","React","PureComponent","portals","key","children","setState","state","map","item","filter","render","createElement","View","collapsable","pointerEvents","style","StyleSheet","absoluteFill"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AACA;AACA;AACA;AACe,MAAMA,aAAN,SAA4BC,KAAK,CAACC,aAAlC,CAAgD;AAAA;AAAA;;AAAA,mCACnD;AACJC,MAAAA,OAAO,EAAE;AADL,KADmD;;AAAA,mCAInD,CAACC,GAAD,EAAMC,QAAN,KAAmB;AACvB,WAAKC,QAAL,CAAeC,KAAD,KAAY;AACtBJ,QAAAA,OAAO,EAAE,CAAC,GAAGI,KAAK,CAACJ,OAAV,EAAmB;AAAEC,UAAAA,GAAF;AAAOC,UAAAA;AAAP,SAAnB;AADa,OAAZ,CAAd;AAGH,KAR0D;;AAAA,oCASlD,CAACD,GAAD,EAAMC,QAAN,KAAmB,KAAKC,QAAL,CAAeC,KAAD,KAAY;AAClDJ,MAAAA,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcK,GAAd,CAAmBC,IAAD,IAAU;AACjC,YAAIA,IAAI,CAACL,GAAL,KAAaA,GAAjB,EAAsB;AAClB,iBAAO,EAAE,GAAGK,IAAL;AAAWJ,YAAAA;AAAX,WAAP;AACH;;AACD,eAAOI,IAAP;AACH,OALQ;AADyC,KAAZ,CAAd,CAT+B;;AAAA,qCAiBhDL,GAAD,IAAS,KAAKE,QAAL,CAAeC,KAAD,KAAY;AACzCJ,MAAAA,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcO,MAAd,CAAsBD,IAAD,IAAUA,IAAI,CAACL,GAAL,KAAaA,GAA5C;AADgC,KAAZ,CAAd,CAjBwC;AAAA;;AAoB3DO,EAAAA,MAAM,GAAG;AACL,WAAO,KAAKJ,KAAL,CAAWJ,OAAX,CAAmBK,GAAnB,CAAuB;AAAA,UAAC;AAAEJ,QAAAA,GAAF;AAAOC,QAAAA;AAAP,OAAD;AAAA,0BAAwBJ,KAAK,CAACW,aAAN,CAAoBC,iBAApB,EAA0B;AAAET,QAAAA,GAAG,EAAEA,GAAP;AAAYU,QAAAA,WAAW,EAAE;AAAM;AAA/B;AAAyIC,QAAAA,aAAa,EAAE,UAAxJ;AAAoKC,QAAAA,KAAK,EAAEC,wBAAWC;AAAtL,OAA1B,EAAgOb,QAAhO,CAAxB;AAAA,KAAvB,CAAP;AACH;;AAtB0D","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\n/**\n * Portal host is the component which actually renders all Portals.\n */\nexport default class PortalManager extends React.PureComponent {\n state = {\n portals: [],\n };\n mount = (key, children) => {\n this.setState((state) => ({\n portals: [...state.portals, { key, children }],\n }));\n };\n update = (key, children) => this.setState((state) => ({\n portals: state.portals.map((item) => {\n if (item.key === key) {\n return { ...item, children };\n }\n return item;\n }),\n }));\n unmount = (key) => this.setState((state) => ({\n portals: state.portals.filter((item) => item.key !== key),\n }));\n render() {\n return this.state.portals.map(({ key, children }) => (React.createElement(View, { key: key, collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */, pointerEvents: \"box-none\", style: StyleSheet.absoluteFill }, children)));\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressIndicator.tsx"],"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAqBA,MAAMA,iBAAkC,GAAG,QAerC;AAAA,MAf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iBC,KAAjB,CAAuBC;AApB5B;AAHhB,IADF;AA4BD,CA7CD;;eA+Ce,wBAAU3B,iBAAV,C","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<Props> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"]}
1
+ {"version":3,"sources":["ProgressIndicator.js"],"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","React","createElement","StepIndicator","stepCount","customStyles","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,iBAAiB,GAAG,QAA6X;AAAA,MAA5X;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA,WAAjB;AAA8BC,IAAAA,sBAAsB,GAAG,CAAvD;AAA0DC,IAAAA,sBAAsB,GAAG,SAAnF;AAA8FC,IAAAA,iBAA9F;AAAiHC,IAAAA,wBAAjH;AAA2IC,IAAAA,yBAA3I;AAAsKC,IAAAA,8BAAtK;AAAsMC,IAAAA,0BAA0B,GAAG,EAAnO;AAAuOC,IAAAA,uBAAuB,GAAG,eAAjQ;AAAkRC,IAAAA,yBAAyB,GAAG,SAA9S;AAAyTC,IAAAA,eAAe,GAAG,OAA3U;AAAoVC,IAAAA,aAAa,GAAG,SAApW;AAA+WC,IAAAA;AAA/W,GAA4X;AACnZ,QAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;AACA,sBAAQc,KAAK,CAACC,aAAN,CAAoBC,sBAApB,EAAmC;AAAEC,IAAAA,SAAS,EAAElB,aAAb;AAA4Bc,IAAAA,eAAe,EAAEA,eAA7C;AAA8DK,IAAAA,YAAY,EAAE;AAC/Gf,MAAAA,iBAD+G;AAE/GC,MAAAA,wBAAwB,EAAEA,wBAAwB,GAC5CA,wBAD4C,GAE5CD,iBAJyG;AAK/GgB,MAAAA,uBAAuB,EAAER,aALsF;AAM/GS,MAAAA,yBAAyB,EAAEV,eANoF;AAO/GW,MAAAA,sBAAsB,EAAEV,aAPuF;AAQ/GW,MAAAA,wBAAwB,EAAEZ,eARqF;AAS/Ga,MAAAA,0BAA0B,EAAEZ,aATmF;AAU/Ga,MAAAA,4BAA4B,EAAEd,eAViF;AAW/GT,MAAAA,sBAX+G;AAY/GC,MAAAA,sBAAsB,EAAEA,sBAAsB,IAAIG,yBAZ6D;AAa/GoB,MAAAA,iCAAiC,EAAEhB,yBAb4E;AAc/GiB,MAAAA,+BAA+B,EAAElB,uBAd8E;AAe/GH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAfuD;AAgB/GJ,MAAAA,8BAA8B,EAAEA,8BAA8B,IAAIG,yBAhB6C;AAiB/GF,MAAAA,0BAjB+G;AAkB/GoB,MAAAA,eAAe,EAAEf,KAAK,CAACgB,UAAN,CAAiBC,KAAjB,CAAuBC;AAlBuE;AAA5E,GAAnC,CAAR;AAoBH,CAtBD;;eAuBe,wBAAUhC,iBAAV,C","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nconst ProgressIndicator = ({ numberOfSteps, currentStep, currentStepStrokeWidth = 3, stepStrokeCurrentColor = \"primary\", stepIndicatorSize, currentStepIndicatorSize, stepIndicatorCurrentColor, stepIndicatorLabelCurrentColor, stepIndicatorLabelFontSize = 12, stepNumberFinishedColor = \"strongInverse\", stepNumberUnfinishedColor = \"primary\", unfinishedColor = \"light\", finishedColor = \"primary\", theme, }) => {\n const currentPosition = currentStep - 1;\n return (React.createElement(StepIndicator, { stepCount: numberOfSteps, currentPosition: currentPosition, customStyles: {\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n } }));\n};\nexport default withTheme(ProgressIndicator);\n"]}
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
 
24
- 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); }
25
-
26
24
  const RadioButton = _ref => {
27
25
  let {
28
26
  Icon,
@@ -51,7 +49,21 @@ const RadioButton = _ref => {
51
49
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
52
50
  };
53
51
 
54
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
52
+ return /*#__PURE__*/React.createElement(_IconButton.default, {
53
+ Icon: Icon,
54
+ icon: isSelected ? selectedIcon : unselectedIcon,
55
+ color: isSelected ? color : unselectedColor,
56
+ disabled: disabled,
57
+ onPress: handlePress,
58
+ size: size,
59
+ style: style,
60
+ ...rest
61
+ });
62
+ };
63
+
64
+ var _default = RadioButton;
65
+ exports.default = _default;
66
+ //# sourceMappingURL=RadioButton.js.maptends({
55
67
  Icon: Icon,
56
68
  icon: isSelected ? selectedIcon : unselectedIcon,
57
69
  color: isSelected ? color : unselectedColor,
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButton.tsx"],"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,WAAuC,GAAG,QAa1C;AAAA,MAb2C;AAC/CC,IAAAA,IAD+C;AAE/CC,IAAAA,QAAQ,GAAG,KAFoC;AAG/CC,IAAAA,KAH+C;AAI/CC,IAAAA,KAAK,GAAG,EAJuC;AAK/CC,IAAAA,QAL+C;AAM/CC,IAAAA,eAN+C;AAO/CC,IAAAA,OAP+C;AAQ/CC,IAAAA,IAAI,GAAGC,gBAAOC,eARiC;AAS/CC,IAAAA,YAAY,GAAG,oCATgC;AAU/CC,IAAAA,cAAc,GAAG,sCAV8B;AAW/CC,IAAAA,KAX+C;AAY/C,OAAGC;AAZ4C,GAa3C;AACJ,QAAM;AAAEV,IAAAA,KAAK,EAAEW,YAAT;AAAuBC,IAAAA;AAAvB,MAAyC,0CAA/C;AAEA,QAAMC,SAAS,GAAG,uCAAuBb,KAAvB,CAAlB;AACA,QAAMc,gBAAgB,GAAG,uCAAuBH,YAAvB,CAAzB;AACA,QAAMI,UAAU,GAAGd,QAAH,aAAGA,QAAH,cAAGA,QAAH,GAAea,gBAAgB,KAAKD,SAApD;;AAEA,QAAMG,WAAW,GAAG,MAAM;AACxBb,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGU,SAAH,CAAP;AACAD,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGC,SAAH,CAAb;AACD,GAHD;;AAKA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEkB,UAAU,GAAGR,YAAH,GAAkBC,cAFpC;AAGE,IAAA,KAAK,EAAEO,UAAU,GAAGhB,KAAH,GAAWG,eAH9B;AAIE,IAAA,QAAQ,EAAEJ,QAJZ;AAKE,IAAA,OAAO,EAAEkB,WALX;AAME,IAAA,IAAI,EAAEZ,IANR;AAOE,IAAA,KAAK,EAAEK;AAPT,KAQMC,IARN,EADF;AAYD,CArCD;;eAuCed,W","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } 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 | number;\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 = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\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"]}
1
+ {"version":3,"sources":["RadioButton.js"],"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress","React","createElement","IconButton","icon"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,WAAW,GAAG,QAAoP;AAAA,MAAnP;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,QAAQ,GAAG,KAAnB;AAA0BC,IAAAA,KAA1B;AAAiCC,IAAAA,KAAK,GAAG,EAAzC;AAA6CC,IAAAA,QAA7C;AAAuDC,IAAAA,eAAvD;AAAwEC,IAAAA,OAAxE;AAAiFC,IAAAA,IAAI,GAAGC,gBAAOC,eAA/F;AAAgHC,IAAAA,YAAY,GAAG,oCAA/H;AAAqKC,IAAAA,cAAc,GAAG,sCAAtL;AAA8NC,IAAAA,KAA9N;AAAqO,OAAGC;AAAxO,GAAmP;AACpQ,QAAM;AAAEV,IAAAA,KAAK,EAAEW,YAAT;AAAuBC,IAAAA;AAAvB,MAAyC,0CAA/C;AACA,QAAMC,SAAS,GAAG,uCAAuBb,KAAvB,CAAlB;AACA,QAAMc,gBAAgB,GAAG,uCAAuBH,YAAvB,CAAzB;AACA,QAAMI,UAAU,GAAGd,QAAH,aAAGA,QAAH,cAAGA,QAAH,GAAea,gBAAgB,KAAKD,SAApD;;AACA,QAAMG,WAAW,GAAG,MAAM;AACtBb,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGU,SAAH,CAAP;AACAD,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGC,SAAH,CAAb;AACH,GAHD;;AAIA,sBAAQI,KAAK,CAACC,aAAN,CAAoBC,mBAApB,EAAgC;AAAEtB,IAAAA,IAAI,EAAEA,IAAR;AAAcuB,IAAAA,IAAI,EAAEL,UAAU,GAAGR,YAAH,GAAkBC,cAAhD;AAAgET,IAAAA,KAAK,EAAEgB,UAAU,GAAGhB,KAAH,GAAWG,eAA5F;AAA6GJ,IAAAA,QAAQ,EAAEA,QAAvH;AAAiIK,IAAAA,OAAO,EAAEa,WAA1I;AAAuJZ,IAAAA,IAAI,EAAEA,IAA7J;AAAmKK,IAAAA,KAAK,EAAEA,KAA1K;AAAiL,OAAGC;AAApL,GAAhC,CAAR;AACH,CAVD;;eAWed,W","sourcesContent":["import * as React from \"react\";\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\nconst RadioButton = ({ Icon, disabled = false, color, value = \"\", selected, unselectedColor, onPress, size = Config.radioButtonSize, selectedIcon = \"MaterialIcons/radio-button-checked\", unselectedIcon = \"MaterialIcons/radio-button-unchecked\", style, ...rest }) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n return (React.createElement(IconButton, { Icon: Icon, icon: isSelected ? selectedIcon : unselectedIcon, color: isSelected ? color : unselectedColor, disabled: disabled, onPress: handlePress, size: size, style: style, ...rest }));\n};\nexport default RadioButton;\n"]}
@@ -17,8 +17,6 @@ var _RadioButtonGroup = _interopRequireDefault(require("./RadioButtonGroup"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- 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); }
21
-
22
20
  const RadioButtonFieldGroup = _ref => {
23
21
  let {
24
22
  label,
@@ -35,6 +33,17 @@ const RadioButtonFieldGroup = _ref => {
35
33
  fontSize: theme.typography.headline4.fontSize,
36
34
  color: theme.typography.headline4.color
37
35
  }, labelStyle]
36
+ }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, {
37
+ theme: theme,
38
+ ...rest
39
+ }, children));
40
+ };
41
+
42
+ var _default = (0, _theming.withTheme)(RadioButtonFieldGroup);
43
+
44
+ exports.default = _default;
45
+ //# sourceMappingURL=RadioButtonFieldGroup.js.mapography.headline4.color
46
+ }, labelStyle]
38
47
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
39
48
  theme: theme
40
49
  }, rest), children));
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonFieldGroup.tsx"],"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAQA,MAAMA,qBAAsC,GAAG,QAOzC;AAAA,MAP0C;AAC9CC,IAAAA,KAD8C;AAE9CC,IAAAA,QAF8C;AAG9CC,IAAAA,KAH8C;AAI9CC,IAAAA,UAJ8C;AAK9CC,IAAAA,KAL8C;AAM9C,OAAGC;AAN2C,GAO1C;AACJ,sBACE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAED;AAAb,kBACE,6BAAC,aAAD;AACE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,QAAQ,EAAEJ,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BF,QADvC;AAEEG,MAAAA,KAAK,EAAEP,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BC;AAFpC,KADK,EAKLN,UALK;AADT,KASGH,KATH,CADF,eAYE,6BAAC,yBAAD;AAAkB,IAAA,KAAK,EAAEE;AAAzB,KAAoCG,IAApC,GACGJ,QADH,CAZF,CADF;AAkBD,CA1BD;;eA4Be,wBAAUF,qBAAV,C","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<Props> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"]}
1
+ {"version":3,"sources":["RadioButtonFieldGroup.js"],"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","React","createElement","View","Text","fontSize","typography","headline4","color","RadioButtonGroup"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,qBAAqB,GAAG,QAA4D;AAAA,MAA3D;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA,KAAnB;AAA0BC,IAAAA,UAA1B;AAAsCC,IAAAA,KAAtC;AAA6C,OAAGC;AAAhD,GAA2D;AACtF,sBAAQC,eAAMC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEJ,IAAAA,KAAK,EAAEA;AAAT,GAA1B,eACJE,eAAMC,aAAN,CAAoBE,aAApB,EAA0B;AAAEL,IAAAA,KAAK,EAAE,CAC3B;AACIM,MAAAA,QAAQ,EAAER,KAAK,CAACS,UAAN,CAAiBC,SAAjB,CAA2BF,QADzC;AAEIG,MAAAA,KAAK,EAAEX,KAAK,CAACS,UAAN,CAAiBC,SAAjB,CAA2BC;AAFtC,KAD2B,EAK3BV,UAL2B;AAAT,GAA1B,EAMSH,KANT,CADI,eAQJM,eAAMC,aAAN,CAAoBO,yBAApB,EAAsC;AAAEZ,IAAAA,KAAK,EAAEA,KAAT;AAAgB,OAAGG;AAAnB,GAAtC,EAAiEJ,QAAjE,CARI,CAAR;AASH,CAVD;;eAWe,wBAAUF,qBAAV,C","sourcesContent":["import React from \"react\";\nimport { View } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup from \"./RadioButtonGroup\";\nconst RadioButtonFieldGroup = ({ label, children, theme, labelStyle, style, ...rest }) => {\n return (React.createElement(View, { style: style },\n React.createElement(Text, { style: [\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ] }, label),\n React.createElement(RadioButtonGroup, { theme: theme, ...rest }, children)));\n};\nexport default withTheme(RadioButtonFieldGroup);\n"]}
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
 
20
- 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); }
21
-
22
20
  const {
23
21
  Provider
24
22
  } = _context.radioButtonGroupContext;
@@ -59,11 +57,12 @@ const RadioButtonGroup = _ref => {
59
57
  });
60
58
  }
61
59
 
62
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
60
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
63
61
  style: [{
64
62
  minHeight: 40
65
- }, style]
66
- }, rest), /*#__PURE__*/React.createElement(Provider, {
63
+ }, style],
64
+ ...rest
65
+ }, /*#__PURE__*/React.createElement(Provider, {
67
66
  value: {
68
67
  value: internalValue || "",
69
68
  onValueChange: handleValueChange,
@@ -74,6 +73,18 @@ const RadioButtonGroup = _ref => {
74
73
  }, children)));
75
74
  };
76
75
 
76
+ var _default = RadioButtonGroup;
77
+ exports.default = _default;
78
+ //# sourceMappingURL=RadioButtonGroup.js.map value: {
79
+ value: internalValue || "",
80
+ onValueChange: handleValueChange,
81
+ direction
82
+ }
83
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
84
+ style: _containerStyle
85
+ }, children)));
86
+ };
87
+
77
88
  var _default = RadioButtonGroup;
78
89
  exports.default = _default;
79
90
  //# sourceMappingURL=RadioButtonGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonGroup.tsx"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAWA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGC,mBAAUC,QADmC;AAEzDC,IAAAA,KAAK,GAAG,EAFiD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,YAAY,GAAG,EAJ0C;AAKzDC,IAAAA,KALyD;AAMzDC,IAAAA,QANyD;AAOzD,OAAGC;AAPsD,GAQrD;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAuB,EAAvB,CAA1C;AAEAD,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,UAAMC,SAAS,GAAG,uCAAuBX,KAAvB,CAAlB;AAEAO,IAAAA,gBAAgB,CAACI,SAAD,CAAhB;AACD,GAJD,EAIG,CAACX,KAAD,CAJH;AAMAQ,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,UAAME,gBAAgB,GAAG,uCAAuBV,YAAvB,CAAzB;AAEAK,IAAAA,gBAAgB,CAACK,gBAAD,CAAhB;AACD,GAJD,EAIG,CAACV,YAAD,CAJH;;AAMA,QAAMW,iBAAiB,GAAIC,QAAD,IAA+B;AACvD,UAAMC,YAAY,GAAG,uCAAuBD,QAAvB,CAArB;AAEAP,IAAAA,gBAAgB,CAACQ,YAAD,CAAhB;AACAd,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGc,YAAH,CAAb;AACD,GALD;;AAOA,QAAMC,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAEpB,SAAS,KAAKC,mBAAUoB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAIrB,SAAS,KAAKC,mBAAUC,QAA5B,EAAsC;AACpCiB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBlB,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADnB;AAELL,MAAAA,aAAa,EAAEY,iBAFV;AAGLhB,MAAAA;AAHK;AADT,kBAOE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEmB;AAAb,KAA+BZ,QAA/B,CAPF,CADF,CADF;AAaD,CAvDD;;eAyDeR,gB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getValueForRadioButton } 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<string>(\"\");\n\n React.useEffect(() => {\n const realValue = getValueForRadioButton(value);\n\n setInternalValue(realValue);\n }, [value]);\n\n React.useEffect(() => {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n\n setInternalValue(realDefaultValue);\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string | number) => {\n const realNewValue = getValueForRadioButton(newValue);\n\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\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.js"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","createElement","View","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AACA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AACA,MAAMC,gBAAgB,GAAG,QAAgH;AAAA,MAA/G;AAAEC,IAAAA,SAAS,GAAGC,mBAAUC,QAAxB;AAAkCC,IAAAA,KAAK,GAAG,EAA1C;AAA8CC,IAAAA,aAA9C;AAA6DC,IAAAA,YAAY,GAAG,EAA5E;AAAgFC,IAAAA,KAAhF;AAAuFC,IAAAA,QAAvF;AAAiG,OAAGC;AAApG,GAA+G;AACrI,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAe,EAAf,CAA1C;AACAD,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AAClB,UAAMC,SAAS,GAAG,uCAAuBX,KAAvB,CAAlB;AACAO,IAAAA,gBAAgB,CAACI,SAAD,CAAhB;AACH,GAHD,EAGG,CAACX,KAAD,CAHH;AAIAQ,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AAClB,UAAME,gBAAgB,GAAG,uCAAuBV,YAAvB,CAAzB;AACAK,IAAAA,gBAAgB,CAACK,gBAAD,CAAhB;AACH,GAHD,EAGG,CAACV,YAAD,CAHH;;AAIA,QAAMW,iBAAiB,GAAIC,QAAD,IAAc;AACpC,UAAMC,YAAY,GAAG,uCAAuBD,QAAvB,CAArB;AACAP,IAAAA,gBAAgB,CAACQ,YAAD,CAAhB;AACAd,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGc,YAAH,CAAb;AACH,GAJD;;AAKA,QAAMC,eAAe,GAAG,CACpB;AACIC,IAAAA,aAAa,EAAEpB,SAAS,KAAKC,mBAAUoB,UAAxB,GAAqC,KAArC,GAA6C;AADhE,GADoB,CAAxB;;AAKA,MAAIrB,SAAS,KAAKC,mBAAUC,QAA5B,EAAsC;AAClCiB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACjBC,MAAAA,UAAU,EAAE;AADK,KAArB;AAGH;;AACD,sBAAQZ,KAAK,CAACa,aAAN,CAAoBC,iBAApB,EAA0B;AAAEnB,IAAAA,KAAK,EAAE,CAAC;AAAEoB,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBpB,KAApB,CAAT;AAAqC,OAAGE;AAAxC,GAA1B,eACJG,KAAK,CAACa,aAAN,CAAoB3B,QAApB,EAA8B;AAAEM,IAAAA,KAAK,EAAE;AAC/BA,MAAAA,KAAK,EAAEM,aAAa,IAAI,EADO;AAE/BL,MAAAA,aAAa,EAAEY,iBAFgB;AAG/BhB,MAAAA;AAH+B;AAAT,GAA9B,eAKIW,KAAK,CAACa,aAAN,CAAoBC,iBAApB,EAA0B;AAAEnB,IAAAA,KAAK,EAAEa;AAAT,GAA1B,EAAsDZ,QAAtD,CALJ,CADI,CAAR;AAOH,CAhCD;;eAiCeR,gB","sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nconst { Provider } = radioButtonGroupContext;\nconst RadioButtonGroup = ({ direction = Direction.Vertical, value = \"\", onValueChange, defaultValue = \"\", style, children, ...rest }) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n React.useEffect(() => {\n const realValue = getValueForRadioButton(value);\n setInternalValue(realValue);\n }, [value]);\n React.useEffect(() => {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n setInternalValue(realDefaultValue);\n }, [defaultValue]);\n const handleValueChange = (newValue) => {\n const realNewValue = getValueForRadioButton(newValue);\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n const _containerStyle = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },\n React.createElement(Provider, { value: {\n value: internalValue || \"\",\n onValueChange: handleValueChange,\n direction,\n } },\n React.createElement(View, { style: _containerStyle }, children))));\n};\nexport default RadioButtonGroup;\n"]}
@@ -25,9 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
- 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); }
29
-
30
- let Direction;
28
+ var Direction;
31
29
  exports.Direction = Direction;
32
30
 
33
31
  (function (Direction) {
@@ -90,13 +88,14 @@ const RadioButtonRow = _ref => {
90
88
  textStyles,
91
89
  viewStyles
92
90
  } = (0, _utilities.extractStyles)(style);
93
- return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
91
+ return /*#__PURE__*/React.createElement(_Touchable.default, {
94
92
  onPress: handlePress,
95
93
  style: [styles.mainParent, {
96
94
  flexDirection: direction
97
95
  }, viewStyles],
98
- disabled: disabled
99
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
96
+ disabled: disabled,
97
+ ...rest
98
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
100
99
  style: [styles.label, {
101
100
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
102
101
  }, labelContainerStyle]
@@ -135,6 +134,24 @@ const styles = _reactNative.StyleSheet.create({
135
134
  }
136
135
  });
137
136
 
137
+ var _default = RadioButtonRow;
138
+ exports.default = _default;
139
+ //# sourceMappingURL=RadioButtonRow.js.mapgStart: 20,
140
+ minHeight: 50,
141
+ paddingEnd: 20,
142
+ flex: 1,
143
+ ..._reactNative.Platform.select({
144
+ web: {
145
+ cursor: "pointer",
146
+ userSelect: "none"
147
+ }
148
+ })
149
+ },
150
+ label: {
151
+ flex: 3
152
+ }
153
+ });
154
+
138
155
  var _default = RadioButtonRow;
139
156
  exports.default = _default;
140
157
  //# sourceMappingURL=RadioButtonRow.js.map
@@ -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","realValue","realContextValue","isSelected","handlePress","textStyles","viewStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;;;IAEYA,S;;;WAAAA,S;AAAAA,EAAAA,S;AAAAA,EAAAA,S;GAAAA,S,yBAAAA,S;;AAiBZ,MAAMC,uBAAuB,GAAG,CAC9BC,eAD8B,EAE9BC,SAF8B,KAG3B;AACH,MAAID,eAAe,KAAKE,mBAAeC,UAAvC,EAAmD;AACjD,WAAOF,SAAS,KAAKH,SAAS,CAACM,GAAxB,GAA8B,YAA9B,GAA6C,UAApD;AACD,GAFD,MAEO,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAA5B,EAAwC;AAC7C,WAAO,YAAP;AACD,GAFM,MAEA;AACL,WAAO,UAAP;AACD;AACF,CAXD;;AAaA,MAAMC,WAAW,GAAG,CAClBC,KADkB,EAElBC,UAFkB,EAGlBC,SAHkB,KAIf;AACH,MAAI,OAAOF,KAAP,KAAiB,QAArB,EAA+B;AAC7B,wBAAO,oBAAC,aAAD;AAAM,MAAA,KAAK,EAAE,CAACC,UAAD,EAAaC,SAAb;AAAb,OAAuCF,KAAvC,CAAP;AACD,GAFD,MAEO;AACL,wBAAO,0CAAGA,KAAH,CAAP;AACD;AACF,CAVD;;AAYA,MAAMG,cAAwD,GAAG,QAe3D;AAAA,MAf4D;AAChEC,IAAAA,IADgE;AAEhEC,IAAAA,KAFgE;AAGhEL,IAAAA,KAAK,GAAG,EAHwD;AAIhEM,IAAAA,KAJgE;AAKhEC,IAAAA,eALgE;AAMhEC,IAAAA,OANgE;AAOhEC,IAAAA,mBAPgE;AAQhER,IAAAA,UARgE;AAShES,IAAAA,gBATgE;AAUhEhB,IAAAA,SAAS,GAAGH,SAAS,CAACM,GAV0C;AAWhEc,IAAAA,QAXgE;AAYh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B,CAACC,eAAD,EAAkBC,SAAlB;AAF9B;AADT,kBAME,oBAAC,oBAAD;AACE,IAAA,IAAI,EAAEU,IADR;AAEE,IAAA,QAAQ,EAAEe,UAFZ;AAGE,IAAA,KAAK,EAAEF,SAHT;AAIE,IAAA,KAAK,EAAEX,KAJT;AAKE,IAAA,eAAe,EAAEC,eALnB;AAME,IAAA,KAAK,EAAEG;AANT,IANF,CAjBF,CADF;AAmCD,CApED;;AAsEA,MAAMa,MAAM,GAAGK,wBAAWC,MAAX,CAAkB;AAC/BL,EAAAA,UAAU,EAAE;AACVE,IAAAA,UAAU,EAAE,QADF;AAEVI,IAAAA,cAAc,EAAE,cAFN;AAGVC,IAAAA,YAAY,EAAE,EAHJ;AAIVC,IAAAA,SAAS,EAAE,EAJD;AAKVC,IAAAA,UAAU,EAAE,EALF;AAMVN,IAAAA,IAAI,EAAE,CANI;AAOV,OAAGO,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,MAAM,EAAE,SADL;AAEHC,QAAAA,UAAU,EAAE;AAFT;AADY,KAAhB;AAPO,GADmB;AAe/BjC,EAAAA,KAAK,EAAE;AACLsB,IAAAA,IAAI,EAAE;AADD;AAfwB,CAAlB,CAAf;;eAoBexB,c","sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getValueForRadioButton } 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 | number; // 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 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 realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\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}\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
+ {"version":3,"sources":["RadioButtonRow.js"],"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","React","createElement","Text","style","Fragment","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress","textStyles","viewStyles","Touchable","styles","mainParent","flexDirection","View","alignItems","flex","RadioButton","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;AACO,IAAIA,SAAJ;;;AACP,CAAC,UAAUA,SAAV,EAAqB;AAClBA,EAAAA,SAAS,CAAC,KAAD,CAAT,GAAmB,KAAnB;AACAA,EAAAA,SAAS,CAAC,YAAD,CAAT,GAA0B,aAA1B;AACH,CAHD,EAGGA,SAAS,yBAAKA,SAAS,GAAG,EAAjB,CAHZ;;AAIA,MAAMC,uBAAuB,GAAG,CAACC,eAAD,EAAkBC,SAAlB,KAAgC;AAC5D,MAAID,eAAe,KAAKE,mBAAeC,UAAvC,EAAmD;AAC/C,WAAOF,SAAS,KAAKH,SAAS,CAACM,GAAxB,GAA8B,YAA9B,GAA6C,UAApD;AACH,GAFD,MAGK,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAA5B,EAAwC;AACzC,WAAO,YAAP;AACH,GAFI,MAGA;AACD,WAAO,U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AAjC,CAJJ,CARI,CAAR;AAaH,CAvBD;;AAwBA,MAAMa,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC7BP,EAAAA,UAAU,EAAE;AACRG,IAAAA,UAAU,EAAE,QADJ;AAERK,IAAAA,cAAc,EAAE,cAFR;AAGRC,IAAAA,YAAY,EAAE,EAHN;AAIRC,IAAAA,SAAS,EAAE,EAJH;AAKRC,IAAAA,UAAU,EAAE,EALJ;AAMRP,IAAAA,IAAI,EAAE,CANE;AAOR,OAAGQ,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDC,QAAAA,MAAM,EAAE,SADP;AAEDC,QAAAA,UAAU,EAAE;AAFX;AADU,KAAhB;AAPK,GADiB;AAe7BnC,EAAAA,KAAK,EAAE;AACHuB,IAAAA,IAAI,EAAE;AADH;AAfsB,CAAlB,CAAf;;eAmBezB,c","sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, Platform, } from \"react-native\";\nimport RadioButton from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getValueForRadioButton } from \"../../utilities\";\nexport var Direction;\n(function (Direction) {\n Direction[\"Row\"] = \"row\";\n Direction[\"RowReverse\"] = \"row-reverse\";\n})(Direction || (Direction = {}));\nconst getRadioButtonAlignment = (parentDirection, direction) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n }\n else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n }\n else {\n return \"flex-end\";\n }\n};\nconst renderLabel = (value, labelStyle, textStyle) => {\n if (typeof value === \"string\") {\n return React.createElement(Text, { style: [labelStyle, textStyle] }, value);\n }\n else {\n return React.createElement(React.Fragment, null, value);\n }\n};\nconst RadioButtonRow = ({ Icon, label, value = \"\", color, unselectedColor, onPress, labelContainerStyle, labelStyle, radioButtonStyle, direction = Direction.Row, selected, disabled, style, ...rest }) => {\n const { value: contextValue, onValueChange, direction: parentDirection, } = useRadioButtonGroupContext();\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Touchable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },\n React.createElement(View, { style: [\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ] }, renderLabel(label, labelStyle, textStyles)),\n React.createElement(View, { style: {\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n } },\n React.createElement(RadioButton, { Icon: Icon, selected: isSelected, value: realValue, color: color, unselectedColor: unselectedColor, style: radioButtonStyle }))));\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});\nexport default RadioButtonRow;\n"]}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
- //# sourceMappingURL=ResizeMode.js.mapodule", {
2
+
3
+ Object.defineProperty(exports, "__esModule", {
3
4
  value: true
4
5
  });
5
6
  //# sourceMappingURL=ResizeMode.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Row.tsx"],"names":["Row","titleTypeStyle","titleColor","subtitleTypeStyle","subtitleColor","title","subtitle","multilineSubtitle","image","right","style","styles","container","padding","leftContainer","uri","marginRight","width","Config","rowMultiLineImageSize","rowSingleLineImageSize","height","textContainer","color","marginTop","undefined","StyleSheet","create","flexDirection","flex","justifyContent","alignItems"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;;;;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ADT;AAQE,IAAA,aAAa,EAAEjB,iBAAiB,GAAGkB,SAAH,GAAe;AARjD,KAUGnB,QAVH,CADO,GAaL,IAzBN,CAfF,CADF,EA4CGG,KAAK,IAAIA,KAAK,EA5CjB,CADF;AAgDD,CA5DD;;AA8DA,MAAME,MAAM,GAAGe,wBAAWC,MAAX,CAAkB;AAC/Bb,EAAAA,aAAa,EAAE;AACbc,IAAAA,aAAa,EAAE,KADF;AAEbC,IAAAA,IAAI,EAAE;AAFO,GADgB;AAK/BjB,EAAAA,SAAS,EAAE;AACTgB,IAAAA,aAAa,EAAE,KADN;AAETE,IAAAA,cAAc,EAAE,eAFP;AAGTC,IAAAA,UAAU,EAAE;AAHH,GALoB;AAU/BT,EAAAA,aAAa,EAAE;AACbO,IAAAA,IAAI,EAAE,CADO;AAEbC,IAAAA,cAAc,EAAE;AAFH;AAVgB,CAAlB,CAAf;;eAgBe,wBAAU9B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n Image,\n ImageSourcePropType,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor?: string;\n subtitleTypeStyle?: StyleProp<TextStyle>;\n subtitleColor?: string;\n title?: string;\n subtitle?: string;\n multilineSubtitle?: boolean;\n image?: string | ImageSourcePropType;\n right?: () => React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst Row: React.FC<Props> = ({\n titleTypeStyle,\n titleColor,\n subtitleTypeStyle,\n subtitleColor,\n title,\n subtitle,\n multilineSubtitle,\n image,\n right,\n style,\n}) => {\n return (\n <View style={[styles.container, { padding: 16 }, style]}>\n <View style={styles.leftContainer}>\n {image && (\n <Image\n source={typeof image === \"string\" ? { uri: image } : image}\n style={{\n marginRight: 12,\n width: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n height: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n }}\n />\n )}\n <View style={styles.textContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n style={[\n subtitleTypeStyle,\n {\n color: subtitleColor,\n marginTop: 4,\n },\n ]}\n numberOfLines={multilineSubtitle ? undefined : 1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n </View>\n {right && right()}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n leftContainer: {\n flexDirection: \"row\",\n flex: 1,\n },\n container: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textContainer: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(Row);\n"]}
1
+ {"version":3,"sources":["Row.js"],"names":["Row","titleTypeStyle","titleColor","subtitleTypeStyle","subtitleColor","title","subtitle","multilineSubtitle","image","right","style","React","createElement","View","styles","container","padding","leftContainer","Image","source","uri","marginRight","width","Config","rowMultiLineImageSize","rowSingleLineImageSize","height","textContainer","Text","color","numberOfLines","marginTop","undefined","StyleSheet","create","flexDirection","flex","justifyContent","alignItems"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAgI;AAAA,MAA/H;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,UAAlB;AAA8BC,IAAAA,iBAA9B;AAAiDC,IAAAA,aAAjD;AAAgEC,IAAAA,KAAhE;AAAuEC,IAAAA,QAAvE;AAAiFC,IAAAA,iBAAjF;AAAoGC,IAAAA,KAApG;AAA2GC,IAAAA,KAA3G;AAAkHC,IAAAA;AAAlH,GAA+H;AACxI,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEH,IAAAA,KAAK,EAAE,CAACI,MAAM,CAACC,SAAR,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AAK,IAAIA,KAAK,EAzBV,CAAR;AA0BH,CA3BD;;AA4BA,MAAMK,MAAM,GAAGmB,wBAAWC,MAAX,CAAkB;AAC7BjB,EAAAA,aAAa,EAAE;AACXkB,IAAAA,aAAa,EAAE,KADJ;AAEXC,IAAAA,IAAI,EAAE;AAFK,GADc;AAK7BrB,EAAAA,SAAS,EAAE;AACPoB,IAAAA,aAAa,EAAE,KADR;AAEPE,IAAAA,cAAc,EAAE,eAFT;AAGPC,IAAAA,UAAU,EAAE;AAHL,GALkB;AAU7BX,EAAAA,aAAa,EAAE;AACXS,IAAAA,IAAI,EAAE,CADK;AAEXC,IAAAA,cAAc,EAAE;AAFL;AAVc,CAAlB,CAAf;;eAee,wBAAUrC,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, Text, Image, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {\n return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },\n React.createElement(View, { style: styles.leftContainer },\n image && (React.createElement(Image, { source: typeof image === \"string\" ? { uri: image } : image, style: {\n marginRight: 12,\n width: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n height: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n } })),\n React.createElement(View, { style: styles.textContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n },\n ], numberOfLines: 1 }, title),\n subtitle ? (React.createElement(Text, { style: [\n subtitleTypeStyle,\n {\n color: subtitleColor,\n marginTop: 4,\n },\n ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),\n right && right()));\n};\nconst styles = StyleSheet.create({\n leftContainer: {\n flexDirection: \"row\",\n flex: 1,\n },\n container: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textContainer: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(Row);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RowBodyIcon.tsx"],"names":["RowBodyIcon","Icon","title","subtitle","icon","style","theme","colors","typography","body1","medium","subtitle2","light","Config","rowSingleLineIconSize","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAWA,MAAMA,WAA4B,GAAG,QAO/B;AAAA,MAPgC;AACpCC,IAAAA,IADoC;AAEpCC,IAAAA,KAFoC;AAGpCC,IAAAA,QAHoC;AAIpCC,IAAAA,IAJoC;AAKpCC,IAAAA,KALoC;AAMpCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAN6B,GAOhC;AACJ,sBACE,oBAAC,YAAD;AACE,IAAA,cAAc,EAAEA,UAAU,CAACC,KAD7B;AAEE,IAAA,UAAU,EAAEF,MAAM,CAACG,MAFrB;AAGE,IAAA,iBAAiB,EAAEF,UAAU,CAACG,SAHhC;AAIE,IAAA,aAAa,EAAEJ,MAAM,CAACK,KAJxB;AAKE,IAAA,KAAK,EAAEV,KALT;AAME,IAAA,QAAQ,EAAEC,QANZ;AAOE,IAAA,KAAK,EAAE,mBACL,oBAAC,IAAD;AACE,MAAA,IAAI,EAAEC,IADR;AAEE,MAAA,IAAI,EAAES,gBAAOC,qBAFf;AAGE,MAAA,KAAK,EAAEP,MAAM,CAACK,KAHhB;AAIE,MAAA,KAAK,EAAE;AAAEG,QAAAA,UAAU,EAAE;AAAd;AAJT,MARJ;AAeE,IAAA,KAAK,EAAEV;AAfT,IADF;AAmBD,CA3BD;;eA6Be,wBAAUL,WAAV,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 { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowBodyIcon: React.FC<Props> = ({\n Icon,\n title,\n subtitle,\n icon,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.body1}\n titleColor={colors.medium}\n subtitleTypeStyle={typography.subtitle2}\n subtitleColor={colors.light}\n title={title}\n subtitle={subtitle}\n right={() => (\n <Icon\n name={icon}\n size={Config.rowSingleLineIconSize}\n color={colors.light}\n style={{ marginLeft: 16 }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowBodyIcon);\n"]}
1
+ {"version":3,"sources":["RowBodyIcon.js"],"names":["RowBodyIcon","Icon","title","subtitle","icon","style","theme","colors","typography","React","createElement","Row","titleTypeStyle","body1","titleColor","medium","subtitleTypeStyle","subtitle2","subtitleColor","light","right","name","size","Config","rowSingleLineIconSize","color","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,WAAW,GAAG,QAA4E;AAAA,MAA3E;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,KAAR;AAAeC,IAAAA,QAAf;AAAyBC,IAAAA,IAAzB;AAA+BC,IAAAA,KAA/B;AAAsCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAA7C,GAA2E;AAC5F,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,YAApB,EAAyB;AAAEC,IAAAA,cAAc,EAAEJ,UAAU,CAACK,KAA7B;AAAoCC,IAAAA,UAAU,EAAEP,MAAM,CAACQ,MAAvD;AAA+DC,IAAAA,iBAAiB,EAAER,UAAU,CAACS,SAA7F;AAAwGC,IAAAA,aAAa,EAAEX,MAAM,CAACY,KAA9H;AAAqIjB,IAAAA,KAAK,EAAEA,KAA5I;AAAmJC,IAAAA,QAAQ,EAAEA,QAA7J;AAAuKiB,IAAAA,KAAK,EAAE,mBAAOX,KAAK,CAACC,aAAN,CAAoBT,IAApB,EAA0B;AAAEoB,MAAAA,IAAI,EAAEjB,IAAR;AAAckB,MAAAA,IAAI,EAAEC,gBAAOC,qBAA3B;AAAkDC,MAAAA,KAAK,EAAElB,MAAM,CAACY,KAAhE;AAAuEd,MAAAA,KAAK,EAAE;AAAEqB,QAAAA,UAAU,EAAE;AAAd;AAA9E,KAA1B,CAArL;AAAqTrB,IAAAA,KAAK,EAAEA;AAA5T,GAAzB,CAAR;AACH,CAFD;;eAGe,wBAAUL,WAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nconst RowBodyIcon = ({ Icon, title, subtitle, icon, style, theme: { colors, typography }, }) => {\n return (React.createElement(Row, { titleTypeStyle: typography.body1, titleColor: colors.medium, subtitleTypeStyle: typography.subtitle2, subtitleColor: colors.light, title: title, subtitle: subtitle, right: () => (React.createElement(Icon, { name: icon, size: Config.rowSingleLineIconSize, color: colors.light, style: { marginLeft: 16 } })), style: style }));\n};\nexport default withTheme(RowBodyIcon);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RowHeadlineImageCaption.tsx"],"names":["RowHeadlineImageCaption","title","subtitle","caption","image","style","theme","colors","typography","headline6","strong","body2","medium","color","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAYA,MAAMA,uBAAwC,GAAG,QAO3C;AAAA,MAP4C;AAChDC,IAAAA,KADgD;AAEhDC,IAAAA,QAFgD;AAGhDC,IAAAA,OAHgD;AAIhDC,IAAAA,KAJgD;AAKhDC,IAAAA,KALgD;AAMhDC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AANyC,GAO5C;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,EAAEC,QANZ;AAOE,IAAA,KAAK,EAAEE,KAPT;AAQE,IAAA,KAAK,EAAE,mBACL,oBAAC,iBAAD;AACE,MAAA,KAAK,EAAE,EACL,GAAGI,UAAU,CAACL,OADT;AAELU,QAAAA,KAAK,EAAEN,MAAM,CAACG,MAFT;AAGLI,QAAAA,UAAU,EAAE;AAHP;AADT,OAOGX,OAPH,CATJ;AAmBE,IAAA,KAAK,EAAEE;AAnBT,IADF;AAuBD,CA/BD;;eAiCe,wBAAUL,uBAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Text, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n caption?: string;\n image: string | ImageSourcePropType;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst RowHeadlineImageCaption: React.FC<Props> = ({\n title,\n subtitle,\n caption,\n image,\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 image={image}\n right={() => (\n <Text\n style={{\n ...typography.caption,\n color: colors.strong,\n marginLeft: 16,\n }}\n >\n {caption}\n </Text>\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageCaption);\n"]}
1
+ {"version":3,"sources":["RowHeadlineImageCaption.js"],"names":["RowHeadlineImageCaption","title","subtitle","caption","image","style","theme","colors","typography","React","createElement","Row","titleTypeStyle","headline6","titleColor","strong","subtitleTypeStyle","body2","subtitleColor","medium","right","Text","color","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,uBAAuB,GAAG,QAAgF;AAAA,MAA/E;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA,OAAnB;AAA4BC,IAAAA,KAA5B;AAAmCC,IAAAA,KAAnC;AAA0CC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAAjD,GAA+E;AAC5G,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;AAAoJC,IAAAA,QAAQ,EAAEA,QAA9J;AAAwKE,IAAAA,KAAK,EAAEA,KAA/K;AAAsLgB,IAAAA,KAAK,EAAE,mBAAOX,KAAK,CAACC,aAAN,CAAoBW,iBAApB,EAA0B;AAAEhB,MAAAA,KAAK,EAAE,EAC5P,GAAGG,UAAU,CAACL,OAD8O;AAE5PmB,QAAAA,KAAK,EAAEf,MAAM,CAACQ,MAF8O;AAG5PQ,QAAAA,UAAU,EAAE;AAHgP;AAAT,KAA1B,EAIxNpB,OAJwN,CAApM;AAITE,IAAAA,KAAK,EAAEA;AAJE,GAAzB,CAAR;AAKH,CAND;;eAOe,wBAAUL,uBAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Text } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nconst RowHeadlineImageCaption = ({ title, subtitle, caption, image, 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, image: image, right: () => (React.createElement(Text, { style: {\n ...typography.caption,\n color: colors.strong,\n marginLeft: 16,\n } }, caption)), style: style }));\n};\nexport default withTheme(RowHeadlineImageCaption);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RowHeadlineImageIcon.tsx"],"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","headline6","strong","body2","medium","Config","rowMultiLineIconSize","rowSingleLineIconSize","light","marginLeft","alignSelf","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAaA,MAAMA,oBAAqC,GAAG,QASxC;AAAA,MATyC;AAC7CC,IAAAA,IAD6C;AAE7CC,IAAAA,IAF6C;AAG7CC,IAAAA,KAH6C;AAI7CC,IAAAA,KAJ6C;AAK7CC,IAAAA,QAL6C;AAM7CC,IAAAA,iBAAiB,GAAG,KANyB;AAO7CC,IAAAA,KAP6C;AAQ7CC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AARsC,GASzC;AACJ,sBACE,oBAAC,YAAD;AACE,IAAA,cAAc,EAAEA,UAAU,CAACC,SAD7B;AAEE,IAAA,UAAU,EAAEF,MAAM,CAACG,MAFrB;AAGE,IAAA,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;AAIE,IAAA,aAAa,EAAEJ,MAAM,CAACK,MAJxB;AAKE,IAAA,KAAK,EAAEX,KALT;AAME,IAAA,QAAQ,EAAEE,QANZ;AAOE,IAAA,iBAAiB,EAAEC,iBAPrB;AAQE,IAAA,KAAK,EAAEF,KART;AASE,IAAA,KAAK,EAAE,mBACL,oBAAC,IAAD;AACE,MAAA,IAAI,EAAEF,IADR;AAEE,MAAA,IAAI,EACFI,iBAAiB,GACbS,gBAAOC,oBADM,GAEbD,gBAAOE,qBALf;AAOE,MAAA,KAAK,EAAER,MAAM,CAACS,KAPhB;AAQE,MAAA,KAAK,EAAE;AACLC,QAAAA,UAAU,EAAE,EADP;AAELC,QAAAA,SAAS,EAAEd,iBAAiB,GAAG,YAAH,GAAkB,QAFzC;AAGLe,QAAAA,SAAS,EAAEf,iBAAiB,GAAG,CAAH,GAAO;AAH9B;AART,MAVJ;AAyBE,IAAA,KAAK,EAAEC;AAzBT,IADF;AA6BD,CAvCD;;eAyCe,wBAAUP,oBAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n image: string | ImageSourcePropType;\n subtitle?: string;\n multilineSubtitle?: boolean;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowHeadlineImageIcon: React.FC<Props> = ({\n Icon,\n icon,\n title,\n image,\n subtitle,\n multilineSubtitle = false,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n multilineSubtitle={multilineSubtitle}\n image={image}\n right={() => (\n <Icon\n name={icon}\n size={\n multilineSubtitle\n ? Config.rowMultiLineIconSize\n : Config.rowSingleLineIconSize\n }\n color={colors.light}\n style={{\n marginLeft: 16,\n alignSelf: multilineSubtitle ? \"flex-start\" : \"center\",\n marginTop: multilineSubtitle ? 4 : 0,\n }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageIcon);\n"]}
1
+ {"version":3,"sources":["RowHeadlineImageIcon.js"],"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","React","createElement","Row","titleTypeStyle","headline6","titleColor","strong","subtitleTypeStyle","body2","subtitleColor","medium","right","name","size","Config","rowMultiLineIconSize","rowSingleLineIconSize","color","light","marginLeft","alignSelf","marginTop"],"mappings":";;;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AzB,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"]}