@draftbit/core 43.4.9-f2446b.0 → 43.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js +3 -11
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/AspectRatio.js +3 -16
- package/lib/commonjs/components/AspectRatio.js.map +1 -1
- package/lib/commonjs/components/Button.js +11 -29
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Card.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +5 -13
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/CardContainerShortImage.js +5 -18
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/commonjs/components/CardInline.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +5 -20
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +3 -17
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/CircularProgress.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/Container.js +5 -16
- package/lib/commonjs/components/Container.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -19
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Divider.js +3 -13
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/Elevation.js +3 -14
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/Image.js +4 -15
- package/lib/commonjs/components/Image.js.map +1 -1
- package/lib/commonjs/components/Justification.js +1 -2
- package/lib/commonjs/components/NumberInput.js +2 -13
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +6 -20
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +10 -30
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.web.js +6 -20
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +3 -15
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +2 -11
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +5 -16
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +6 -23
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/ResizeMode.js +1 -2
- package/lib/commonjs/components/Row.js.map +1 -1
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.js +5 -18
- package/lib/commonjs/components/ScreenContainer.js.map +1 -1
- package/lib/commonjs/components/Slider.js +5 -22
- package/lib/commonjs/components/Slider.js.map +1 -1
- package/lib/commonjs/components/StarRating.js +5 -23
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Surface.js +3 -10
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js +3 -17
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/components/Touchable.js +3 -16
- package/lib/commonjs/components/Touchable.js.map +1 -1
- package/lib/commonjs/components/Touchable.web.js.map +1 -1
- package/lib/commonjs/components/Typography.js.map +1 -1
- package/lib/commonjs/components/useAuthState.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/AudioPlayer.js.map +1 -1
- package/lib/commonjs/mappings/Button.js.map +1 -1
- package/lib/commonjs/mappings/CardContainer.js.map +1 -1
- package/lib/commonjs/mappings/DatePicker.js.map +1 -1
- package/lib/commonjs/mappings/ProgressBar.js.map +1 -1
- package/lib/commonjs/mappings/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/module/components/DeprecatedCardWrapper.js +5 -4
- package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/module/components/RadioButton/index.js.map +1 -1
- package/lib/module/components/Switch.js +21 -10
- package/lib/module/components/Switch.js.map +1 -1
- package/lib/module/mappings/ActivityIndicator.js.map +1 -1
- package/lib/module/mappings/HeaderMedium.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalConsumer.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalHost.
|
|
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":"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","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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalManager.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ProgressIndicator.
|
|
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,MAfsC;AAC1CC,IAAAA,aAD0C;AAE1CC,IAAAA,WAF0C;AAG1CC,IAAAA,sBAAsB,GAAG,CAHiB;AAI1CC,IAAAA,sBAAsB,GAAG,SAJiB;AAK1CC,IAAAA,iBAL0C;AAM1CC,IAAAA,wBAN0C;AAO1CC,IAAAA,yBAP0C;AAQ1CC,IAAAA,8BAR0C;AAS1CC,IAAAA,0BAA0B,GAAG,EATa;AAU1CC,IAAAA,uBAAuB,GAAG,eAVgB;AAW1CC,IAAAA,yBAAyB,GAAG,SAXc;AAY1CC,IAAAA,eAAe,GAAG,OAZwB;AAa1CC,IAAAA,aAAa,GAAG,SAb0B;AAc1CC,IAAAA;AAd0C,GAetC;AACJ,QAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;AACA,sBACE,oBAAC,sBAAD;AACE,IAAA,SAAS,EAAED,aADb;AAEE,IAAA,eAAe,EAAEc,eAFnB;AAGE,IAAA,YAAY,EAAE;AACZV,MAAAA,iBADY;AAEZC,MAAAA,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;AAKZW,MAAAA,uBAAuB,EAAEH,aALb;AAMZI,MAAAA,yBAAyB,EAAEL,eANf;AAOZM,MAAAA,sBAAsB,EAAEL,aAPZ;AAQZM,MAAAA,wBAAwB,EAAEP,eARd;AASZQ,MAAAA,0BAA0B,EAAEP,aAThB;AAUZQ,MAAAA,4BAA4B,EAAET,eAVlB;AAWZT,MAAAA,sBAXY;AAYZC,MAAAA,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;AAcZe,MAAAA,iCAAiC,EAAEX,yBAdvB;AAeZY,MAAAA,+BAA+B,EAAEb,uBAfrB;AAgBZH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;AAiBZJ,MAAAA,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;AAmBZF,MAAAA,0BAnBY;AAoBZe,MAAAA,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,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"]}
|
|
@@ -21,6 +21,8 @@ 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
|
+
|
|
24
26
|
const RadioButton = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
Icon,
|
|
@@ -49,21 +51,7 @@ const RadioButton = _ref => {
|
|
|
49
51
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
50
52
|
};
|
|
51
53
|
|
|
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({
|
|
54
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
67
55
|
Icon: Icon,
|
|
68
56
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
69
57
|
color: isSelected ? color : unselectedColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButton.
|
|
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"]}
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
const RadioButtonFieldGroup = _ref => {
|
|
21
23
|
let {
|
|
22
24
|
label,
|
|
@@ -33,17 +35,6 @@ const RadioButtonFieldGroup = _ref => {
|
|
|
33
35
|
fontSize: theme.typography.headline4.fontSize,
|
|
34
36
|
color: theme.typography.headline4.color
|
|
35
37
|
}, 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]
|
|
47
38
|
}, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
|
|
48
39
|
theme: theme
|
|
49
40
|
}, rest), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonFieldGroup.
|
|
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"]}
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
const {
|
|
21
23
|
Provider
|
|
22
24
|
} = _context.radioButtonGroupContext;
|
|
@@ -57,12 +59,11 @@ const RadioButtonGroup = _ref => {
|
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
62
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
61
63
|
style: [{
|
|
62
64
|
minHeight: 40
|
|
63
|
-
}, style]
|
|
64
|
-
|
|
65
|
-
}, /*#__PURE__*/React.createElement(Provider, {
|
|
65
|
+
}, style]
|
|
66
|
+
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
66
67
|
value: {
|
|
67
68
|
value: internalValue || "",
|
|
68
69
|
onValueChange: handleValueChange,
|
|
@@ -73,18 +74,6 @@ const RadioButtonGroup = _ref => {
|
|
|
73
74
|
}, children)));
|
|
74
75
|
};
|
|
75
76
|
|
|
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
|
-
|
|
88
77
|
var _default = RadioButtonGroup;
|
|
89
78
|
exports.default = _default;
|
|
90
79
|
//# sourceMappingURL=RadioButtonGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonGroup.
|
|
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"]}
|
|
@@ -25,7 +25,9 @@ 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
|
-
var
|
|
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;
|
|
29
31
|
exports.Direction = Direction;
|
|
30
32
|
|
|
31
33
|
(function (Direction) {
|
|
@@ -88,14 +90,13 @@ const RadioButtonRow = _ref => {
|
|
|
88
90
|
textStyles,
|
|
89
91
|
viewStyles
|
|
90
92
|
} = (0, _utilities.extractStyles)(style);
|
|
91
|
-
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
93
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
|
|
92
94
|
onPress: handlePress,
|
|
93
95
|
style: [styles.mainParent, {
|
|
94
96
|
flexDirection: direction
|
|
95
97
|
}, viewStyles],
|
|
96
|
-
disabled: disabled
|
|
97
|
-
|
|
98
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
98
|
+
disabled: disabled
|
|
99
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
99
100
|
style: [styles.label, {
|
|
100
101
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
101
102
|
}, labelContainerStyle]
|
|
@@ -134,24 +135,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
134
135
|
}
|
|
135
136
|
});
|
|
136
137
|
|
|
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
|
-
|
|
155
138
|
var _default = RadioButtonRow;
|
|
156
139
|
exports.default = _default;
|
|
157
140
|
//# sourceMappingURL=RadioButtonRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonRow.
|
|
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":"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","sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, 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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Row.
|
|
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;;;;;;;;AAiBA,MAAMA,GAAoB,GAAG,QAWvB;AAAA,MAXwB;AAC5BC,IAAAA,cAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,iBAH4B;AAI5BC,IAAAA,aAJ4B;AAK5BC,IAAAA,KAL4B;AAM5BC,IAAAA,QAN4B;AAO5BC,IAAAA,iBAP4B;AAQ5BC,IAAAA,KAR4B;AAS5BC,IAAAA,KAT4B;AAU5BC,IAAAA;AAV4B,GAWxB;AACJ,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAAnB,EAAoCH,KAApC;AAAb,kBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACG;AAApB,KACGN,KAAK,iBACJ,oBAAC,kBAAD;AACE,IAAA,MAAM,EAAE,OAAOA,KAAP,KAAiB,QAAjB,GAA4B;AAAEO,MAAAA,GAAG,EAAEP;AAAP,KAA5B,GAA6CA,KADvD;AAEE,IAAA,KAAK,EAAE;AACLQ,MAAAA,WAAW,EAAE,EADR;AAELC,MAAAA,KAAK,EAAEX,QAAQ,GACXY,gBAAOC,qBADI,GAEXD,gBAAOE,sBAJN;AAKLC,MAAAA,MAAM,EAAEf,QAAQ,GACZY,gBAAOC,qBADK,GAEZD,gBAAOE;AAPN;AAFT,IAFJ,eAeE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAET,MAAM,CAACW;AAApB,kBACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACLrB,cADK,EAEL;AACEsB,MAAAA,KAAK,EAAErB;AADT,KAFK,CADT;AAOE,IAAA,aAAa,EAAE;AAPjB,KASGG,KATH,CADF,EAYGC,QAAQ,gBACP,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACLH,iBADK,EAEL;AACEoB,MAAAA,KAAK,EAAEnB,aADT;AAEEoB,MAAAA,SAAS,EAAE;AAFb,KAFK,CADT;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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RowBodyIcon.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RowHeadlineImageCaption.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RowHeadlineImageIcon.
|
|
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"]}
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
function ScrollView(_ref) {
|
|
21
23
|
let {
|
|
22
24
|
children,
|
|
@@ -51,13 +53,12 @@ function ScreenContainer(_ref2) {
|
|
|
51
53
|
edges.push("bottom");
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
56
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
|
|
55
57
|
edges: edges,
|
|
56
58
|
style: [styles.container, {
|
|
57
59
|
backgroundColor
|
|
58
|
-
}]
|
|
59
|
-
|
|
60
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
60
|
+
}]
|
|
61
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
61
62
|
style: [styles.container, {
|
|
62
63
|
backgroundColor
|
|
63
64
|
}, style]
|
|
@@ -74,19 +75,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
75
|
|
|
75
76
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
76
77
|
|
|
77
|
-
exports.default = _default;
|
|
78
|
-
//# sourceMappingURL=ScreenContainer.js.mapscrollable ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
79
|
-
style: style
|
|
80
|
-
}, children) : children));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const styles = _reactNative.StyleSheet.create({
|
|
84
|
-
container: {
|
|
85
|
-
flex: 1
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
90
|
-
|
|
91
78
|
exports.default = _default;
|
|
92
79
|
//# sourceMappingURL=ScreenContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ScreenContainer.
|
|
1
|
+
{"version":3,"sources":["ScreenContainer.tsx"],"names":["ScrollView","children","style","flexGrow","ScreenContainer","hasSafeArea","scrollable","hasBottomSafeArea","hasTopSafeArea","theme","rest","backgroundColor","colors","background","edges","push","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;AAEA;;;;;;;;AAGA,SAASA,UAAT,OAMG;AAAA,MANiB;AAClBC,IAAAA,QADkB;AAElBC,IAAAA;AAFkB,GAMjB;AACD,sBACE,oBAAC,uBAAD;AACE,IAAA,qBAAqB,EAAE,CACrB;AACEC,MAAAA,QAAQ,EAAE;AADZ,KADqB,EAIrBD,KAJqB;AADzB,KAQGD,QARH,CADF;AAYD;;AAYD,SAASG,eAAT,QASU;AAAA,MATe;AACvBC,IAAAA,WAAW,GAAG,KADS;AAEvBC,IAAAA,UAAU,GAAG,KAFU;AAGvBC,IAAAA,iBAHuB;AAIvBC,IAAAA,cAJuB;AAKvBC,IAAAA,KALuB;AAMvBP,IAAAA,KANuB;AAOvBD,IAAAA,QAPuB;AAQvB,OAAGS;AARoB,GASf;AACR,QAAMC,eAAe,GAAGF,KAAK,CAACG,MAAN,CAAaC,UAArC;AAEA,QAAMC,KAAa,GAAG,CAAC,MAAD,EAAS,OAAT,CAAtB;;AACA,MAAIT,WAAW,IAAIG,cAAnB,EAAmC;AACjCM,IAAAA,KAAK,CAACC,IAAN,CAAW,KAAX;AACD;;AAED,MAAIV,WAAW,IAAIE,iBAAnB,EAAsC;AACpCO,IAAAA,KAAK,CAACC,IAAN,CAAW,QAAX;AACD;;AAED,sBACE,oBAAC,wCAAD;AACE,IAAA,KAAK,EAAED,KADT;AAEE,IAAA,KAAK,EAAE,CACLE,MAAM,CAACC,SADF,EAEL;AACEN,MAAAA;AADF,KAFK;AAFT,KAQMD,IARN,gBAUE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmB;AAAEN,MAAAA;AAAF,KAAnB,EAAwCT,KAAxC;AAAb,KACGI,UAAU,gBACT,oBAAC,UAAD;AAAY,IAAA,KAAK,EAAEJ;AAAnB,KAA2BD,QAA3B,CADS,GAGTA,QAJJ,CAVF,CADF;AAoBD;;AAED,MAAMe,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AACTG,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf;;eAMe,wBAAUhB,eAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n StyleSheet,\n ScrollView as NativeScrollView,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport type { Edge } from \"react-native-safe-area-context\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nfunction ScrollView({\n children,\n style,\n}: {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}) {\n return (\n <NativeScrollView\n contentContainerStyle={[\n {\n flexGrow: 1,\n },\n style,\n ]}\n >\n {children}\n </NativeScrollView>\n );\n}\n\ntype Props = {\n hasSafeArea: boolean;\n scrollable: boolean;\n hasBottomSafeArea?: boolean;\n hasTopSafeArea?: boolean;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n children?: React.ReactNode;\n};\n\nfunction ScreenContainer({\n hasSafeArea = false,\n scrollable = false,\n hasBottomSafeArea,\n hasTopSafeArea,\n theme,\n style,\n children,\n ...rest\n}: Props) {\n const backgroundColor = theme.colors.background;\n\n const edges: Edge[] = [\"left\", \"right\"];\n if (hasSafeArea || hasTopSafeArea) {\n edges.push(\"top\");\n }\n\n if (hasSafeArea || hasBottomSafeArea) {\n edges.push(\"bottom\");\n }\n\n return (\n <SafeAreaView\n edges={edges}\n style={[\n styles.container,\n {\n backgroundColor,\n },\n ]}\n {...rest}\n >\n <View style={[styles.container, { backgroundColor }, style]}>\n {scrollable ? (\n <ScrollView style={style}>{children}</ScrollView>\n ) : (\n children\n )}\n </View>\n </SafeAreaView>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\nexport default withTheme(ScreenContainer);\n"]}
|