From 735a298050ee58d0696316cb21b11fcf0b8bf9d2 Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Thu, 7 Jun 2018 18:38:15 +0530 Subject: [PATCH 01/12] Added expanded props to accordion. --- src/basic/Accordion.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/basic/Accordion.js b/src/basic/Accordion.js index 54e63687c..ea3358f69 100644 --- a/src/basic/Accordion.js +++ b/src/basic/Accordion.js @@ -102,16 +102,16 @@ class AccordionItem extends React.Component { {this.props.renderHeader ? ( this.props.renderHeader(this.props.item.title) ) : ( - - )} + + )} {this.props.expanded ? ( @@ -119,11 +119,11 @@ class AccordionItem extends React.Component { {this.props.renderContent ? ( this.props.renderContent(this.props.item.content) ) : ( - - )} + + )} ) : null} @@ -140,6 +140,11 @@ export class Accordion extends React.Component { this.setState({ selected: index }); } } + + componentDidMount() { + this.setState({ selected: this.props.expanded }); + } + render() { const variables = this.context.theme ? this.context.theme["@@shoutem.theme/themeStyle"].variables From 6f3597a50c122ff674b8ae017dd4634394ed124d Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Tue, 19 Jun 2018 13:07:49 +0530 Subject: [PATCH 02/12] Added onDateChange callback support for datePicker android. --- src/basic/DatePicker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/basic/DatePicker.js b/src/basic/DatePicker.js index 4962f3ee6..e0971a1e1 100644 --- a/src/basic/DatePicker.js +++ b/src/basic/DatePicker.js @@ -52,7 +52,9 @@ export class DatePicker extends React.Component { }); const { action, year, month, day } = newDate; if (action === "dateSetAction") { - this.setState({ chosenDate: new Date(year, month, day) }); + let selectedDate = new Date(year, month, day); + this.setState({ chosenDate: selectedDate }); + this.props.onDateChange(selectedDate); } } catch ({ code, message }) { console.warn("Cannot open date picker", message); From d285e31b87a10ac20f6cfd947cb9d29ab7a08561 Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Tue, 19 Jun 2018 15:07:11 +0530 Subject: [PATCH 03/12] Reverted issue 1606. Fix for issue #2000 and #2005 based on issuecomment https://github.com/GeekyAnts/NativeBase/issues/2005#issuecomment-398262593 --- src/basic/Item.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/basic/Item.js b/src/basic/Item.js index ad45c4e2c..9198242ba 100644 --- a/src/basic/Item.js +++ b/src/basic/Item.js @@ -31,8 +31,6 @@ class Item extends Component { if (this.inputProps && this.inputProps.value) { this.setState({ isFocused: true }); this.floatUp(-16); - } else { - this.setState({ isFocused: false }); } if (this.inputProps && this.inputProps.getRef) this.inputProps.getRef(this._inputRef); @@ -52,8 +50,6 @@ class Item extends Component { if (this.inputProps && this.inputProps.value) { this.setState({ isFocused: true }); this.floatUp(-16); - } else { - this.setState({ isFocused: false }); } if (this.inputProps && this.inputProps.getRef) this.inputProps.getRef(this._inputRef); From bad08659844d4f074e03b338b971ce3296fb5c7e Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Tue, 19 Jun 2018 16:04:30 +0530 Subject: [PATCH 04/12] Changed background color to transparent for Card props `transparent`. Removed border. --- src/theme/components/Card.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/theme/components/Card.js b/src/theme/components/Card.js index 4b39ca7af..dce9e268d 100644 --- a/src/theme/components/Card.js +++ b/src/theme/components/Card.js @@ -7,7 +7,9 @@ export default (variables = variable) => { shadowOffset: null, shadowOpacity: null, shadowRadius: null, - elevation: null + elevation: null, + backgroundColor: "transparent", + borderWidth: 0 }, ".noShadow": { shadowColor: null, From 470494ca720e553095022b149e49f245cd323654 Mon Sep 17 00:00:00 2001 From: SupriyaKalghatgi <> Date: Tue, 19 Jun 2018 17:18:13 +0530 Subject: [PATCH 05/12] Replaced listItemPadding for cards with new variable cardItemPadding --- dist/src/theme/components/CardItem.js | 10 +++++----- dist/src/theme/components/CardItem.js.map | 2 +- dist/src/theme/variables/commonColor.js | 1 + dist/src/theme/variables/commonColor.js.map | 2 +- dist/src/theme/variables/material.js | 1 + dist/src/theme/variables/material.js.map | 2 +- dist/src/theme/variables/platform.js | 1 + dist/src/theme/variables/platform.js.map | 2 +- src/theme/components/CardItem.js | 10 +++++----- src/theme/variables/commonColor.js | 1 + src/theme/variables/material.js | 1 + src/theme/variables/platform.js | 1 + 12 files changed, 20 insertions(+), 14 deletions(-) diff --git a/dist/src/theme/components/CardItem.js b/dist/src/theme/components/CardItem.js index c3ddfbfcf..eecac5162 100644 --- a/dist/src/theme/components/CardItem.js +++ b/dist/src/theme/components/CardItem.js @@ -48,7 +48,7 @@ alignSelf:"center"}, "NativeBase.Button":{ ".transparent":_extends({}, transparentBtnCommon,{ -paddingRight:variables.listItemPadding+5})}, +paddingRight:variables.cardItemPadding+5})}, flex:1, @@ -78,7 +78,7 @@ marginRight:20}}, "NativeBase.Button":{ ".transparent":_extends({}, transparentBtnCommon,{ -paddingRight:variables.listItemPadding+5, +paddingRight:variables.cardItemPadding+5, alignSelf:"stretch"})}, @@ -140,7 +140,7 @@ fontWeight:platform==="ios"?"600":"500"}, borderBottomWidth:variables.borderWidth}, borderBottomWidth:null, -paddingVertical:variables.listItemPadding+5}, +paddingVertical:variables.cardItemPadding+5}, ".footer":{ "NativeBase.Text":{ @@ -185,8 +185,8 @@ borderBottomRightRadius:variables.cardBorderRadius}, flexDirection:"row", alignItems:"center", borderRadius:2, -padding:variables.listItemPadding+5, -paddingVertical:variables.listItemPadding, +padding:variables.cardItemPadding+5, +paddingVertical:variables.cardItemPadding, backgroundColor:variables.cardDefaultBg}; diff --git a/dist/src/theme/components/CardItem.js.map b/dist/src/theme/components/CardItem.js.map index db681fbff..d5074e90e 100644 --- a/dist/src/theme/components/CardItem.js.map +++ b/dist/src/theme/components/CardItem.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/CardItem.js"],"names":["variables","variable","platform","transparentBtnCommon","fontSize","DefaultFontSize","color","sTabBarActiveTextColor","iconFontSize","marginHorizontal","paddingVertical","paddingHorizontal","cardItemTheme","listNoteColor","fontWeight","marginRight","flex","marginLeft","alignItems","alignSelf","paddingRight","listItemPadding","flexDirection","padding","marginTop","cardBorderColor","brandPrimary","borderBottomWidth","borderWidth","borderTopWidth","width","StyleSheet","hairlineWidth","borderColor","borderTopLeftRadius","cardBorderRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderRadius","backgroundColor","cardDefaultBg"],"mappings":"yRAAA;AACA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,UAAWF,UAAUE,QAA3B;AACA,GAAMC,sBAAuB;AAC3B,kBAAmB;AACjBC,SAAUJ,UAAUK,eAAV,CAA4B,CADrB;AAEjBC,MAAON,UAAUO,sBAFA,CADQ;;AAK3B,kBAAmB;AACjBH,SAAUJ,UAAUQ,YAAV,CAAyB,EADlB;AAEjBF,MAAON,UAAUO,sBAFA;AAGjBE,iBAAkB,IAHD,CALQ;;AAU3B,oBAAqB;AACnBL,SAAUJ,UAAUQ,YAAV,CAAyB,EADhB;AAEnBF,MAAON,UAAUO,sBAFE,CAVM;;AAc3BG,gBAAiB,IAdU;AAe3BC,kBAAmB,IAfQ,CAA7B;;;AAkBA,GAAMC,eAAgB;AACpB,kBAAmB;AACjB,kBAAmB;AACjB,kBAAmB;AACjB,QAAS;AACPN,MAAON,UAAUa,aADV;AAEPC,WAAY,KAFL;AAGPC,YAAa,EAHN,CADQ,CADF;;;AAQjBC,KAAM,CARW;AASjBC,WAAY,EATK;AAUjBC,WAAY,IAVK,CADF;;AAajB,kBAAmB;AACjBd,SAAUJ,UAAUQ,YADH,CAbF;;AAgBjB,oBAAqB;AACnBJ,SAAUJ,UAAUQ,YADD,CAhBJ;;AAmBjB,kBAAmB;AACjBS,WAAY,EADK;AAEjBE,UAAW,QAFM,CAnBF;;AAuBjB,oBAAqB;AACnB;AACKhB,oBADL;AAEEiB,aAAcpB,UAAUqB,eAAV,CAA4B,CAF5C,EADmB,CAvBJ;;;AA6BjBL,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AD3B;AAEPG,wBAAyBtC,UAAUmC,gBAF5B,CA7JW;;AAiKpBb,cAAe,KAjKK;AAkKpBJ,WAAY,QAlKQ;AAmKpBqB,aAAc,CAnKM;AAoKpBhB,QAASvB,UAAUqB,eAAV,CAA4B,CApKjB;AAqKpBX,gBAAiBV,UAAUqB,eArKP;AAsKpBmB,gBAAiBxC,UAAUyC,aAtKP,CAAtB;;;AAyKA,MAAO7B,cAAP;AACD,C","file":"CardItem.js","sourcesContent":["import { StyleSheet } from \"react-native\";\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n const transparentBtnCommon = {\n \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 3,\n color: variables.sTabBarActiveTextColor\n },\n \"NativeBase.Icon\": {\n fontSize: variables.iconFontSize - 10,\n color: variables.sTabBarActiveTextColor,\n marginHorizontal: null\n },\n \"NativeBase.IconNB\": {\n fontSize: variables.iconFontSize - 10,\n color: variables.sTabBarActiveTextColor\n },\n paddingVertical: null,\n paddingHorizontal: null\n };\n\n const cardItemTheme = {\n \"NativeBase.Left\": {\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"400\",\n marginRight: 20\n }\n },\n flex: 1,\n marginLeft: 10,\n alignItems: null\n },\n \"NativeBase.Icon\": {\n fontSize: variables.iconFontSize\n },\n \"NativeBase.IconNB\": {\n fontSize: variables.iconFontSize\n },\n \"NativeBase.Text\": {\n marginLeft: 10,\n alignSelf: \"center\"\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon,\n paddingRight: variables.listItemPadding + 5\n }\n },\n flex: 1,\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n \".content\": {\n \"NativeBase.Text\": {\n color: platform === \"ios\" ? \"#555\" : \"#222\",\n fontSize: variables.DefaultFontSize - 2\n }\n },\n \".cardBody\": {\n padding: -5,\n \"NativeBase.Text\": {\n marginTop: 5\n }\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\",\n marginRight: 20\n }\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon,\n paddingRight: variables.listItemPadding + 5,\n alignSelf: \"stretch\"\n }\n },\n flex: 1,\n alignSelf: \"stretch\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Right\": {\n \"NativeBase.Badge\": {\n alignSelf: null\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon\n },\n alignSelf: null\n },\n \"NativeBase.Icon\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: variables.cardBorderColor\n },\n \"NativeBase.IconNB\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: variables.cardBorderColor\n },\n \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 1,\n alignSelf: null\n },\n \"NativeBase.Thumbnail\": {\n alignSelf: null\n },\n \"NativeBase.Image\": {\n alignSelf: null\n },\n \"NativeBase.Radio\": {\n alignSelf: null\n },\n \"NativeBase.Checkbox\": {\n alignSelf: null\n },\n \"NativeBase.Switch\": {\n alignSelf: null\n },\n flex: 0.8\n },\n \".header\": {\n \"NativeBase.Text\": {\n fontSize: 16,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.brandPrimary,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n borderBottomWidth: variables.borderWidth\n },\n borderBottomWidth: null,\n paddingVertical: variables.listItemPadding + 5\n },\n \".footer\": {\n \"NativeBase.Text\": {\n fontSize: 16,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.brandPrimary,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n borderTopWidth: variables.borderWidth\n },\n borderBottomWidth: null\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n }\n },\n \"NativeBase.Icon\": {\n width: variables.iconFontSize + 5,\n fontSize: variables.iconFontSize - 2\n },\n \"NativeBase.IconNB\": {\n width: variables.iconFontSize + 5,\n fontSize: variables.iconFontSize - 2\n },\n \".bordered\": {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderColor: variables.cardBorderColor\n },\n \".first\": {\n borderTopLeftRadius: variables.cardBorderRadius,\n borderTopRightRadius: variables.cardBorderRadius\n },\n \".last\": {\n borderBottomLeftRadius: variables.cardBorderRadius,\n borderBottomRightRadius: variables.cardBorderRadius\n },\n flexDirection: \"row\",\n alignItems: \"center\",\n borderRadius: 2,\n padding: variables.listItemPadding + 5,\n paddingVertical: variables.listItemPadding,\n backgroundColor: variables.cardDefaultBg\n };\n\n return cardItemTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/CardItem.js"],"names":["variables","variable","platform","transparentBtnCommon","fontSize","DefaultFontSize","color","sTabBarActiveTextColor","iconFontSize","marginHorizontal","paddingVertical","paddingHorizontal","cardItemTheme","listNoteColor","fontWeight","marginRight","flex","marginLeft","alignItems","alignSelf","paddingRight","cardItemPadding","flexDirection","padding","marginTop","cardBorderColor","brandPrimary","borderBottomWidth","borderWidth","borderTopWidth","width","StyleSheet","hairlineWidth","borderColor","borderTopLeftRadius","cardBorderRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderRadius","backgroundColor","cardDefaultBg"],"mappings":"yRAAA;AACA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,UAAWF,UAAUE,QAA3B;AACA,GAAMC,sBAAuB;AAC3B,kBAAmB;AACjBC,SAAUJ,UAAUK,eAAV,CAA4B,CADrB;AAEjBC,MAAON,UAAUO,sBAFA,CADQ;;AAK3B,kBAAmB;AACjBH,SAAUJ,UAAUQ,YAAV,CAAyB,EADlB;AAEjBF,MAAON,UAAUO,sBAFA;AAG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B,YADA;AAEjBZ,WAAYZ,WAAa,KAAb,CAAqB,KAArB,CAA6B,KAFxB,CADR;;AAKX2B,eAAgB7B,UAAU4B,WALf,CALJ;;AAYTD,kBAAmB,IAZV,CAzHS;;AAuIpB,kBAAmB;AACjB,QAAS;AACPrB,MAAON,UAAUa,aADV;AAEPC,WAAY,KAFL,CADQ,CAvIC;;;AA6IpB,kBAAmB;AACjBgB,MAAO9B,UAAUQ,YAAV,CAAyB,CADf;AAEjBJ,SAAUJ,UAAUQ,YAAV,CAAyB,CAFlB,CA7IC;;AAiJpB,oBAAqB;AACnBsB,MAAO9B,UAAUQ,YAAV,CAAyB,CADb;AAEnBJ,SAAUJ,UAAUQ,YAAV,CAAyB,CAFhB,CAjJD;;AAqJpB,YAAa;AACXmB,kBAAmBI,wBAAWC,aADnB;AAEXC,YAAajC,UAAUyB,eAFZ,CArJO;;AAyJpB,SAAU;AACRS,oBAAqBlC,UAAUmC,gBADvB;AAERC,qBAAsBpC,UAAUmC,gBAFxB,CAzJU;;AA6JpB,QAAS;AACPE,uBAAwBrC,UAAUmC,gBAD3B;AAEPG,wBAAyBtC,UAAUmC,gBAF5B,CA7JW;;AAiKpBb,cAAe,KAjKK;AAkKpBJ,WAAY,QAlKQ;AAmKpBqB,aAAc,CAnKM;AAoKpBhB,QAASvB,UAAUqB,eAAV,CAA4B,CApKjB;AAqKpBX,gBAAiBV,UAAUqB,eArKP;AAsKpBmB,gBAAiBxC,UAAUyC,aAtKP,CAAtB;;;AAyKA,MAAO7B,cAAP;AACD,C","file":"CardItem.js","sourcesContent":["import { StyleSheet } from \"react-native\";\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n const transparentBtnCommon = {\n \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 3,\n color: variables.sTabBarActiveTextColor\n },\n \"NativeBase.Icon\": {\n fontSize: variables.iconFontSize - 10,\n color: variables.sTabBarActiveTextColor,\n marginHorizontal: null\n },\n \"NativeBase.IconNB\": {\n fontSize: variables.iconFontSize - 10,\n color: variables.sTabBarActiveTextColor\n },\n paddingVertical: null,\n paddingHorizontal: null\n };\n\n const cardItemTheme = {\n \"NativeBase.Left\": {\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"400\",\n marginRight: 20\n }\n },\n flex: 1,\n marginLeft: 10,\n alignItems: null\n },\n \"NativeBase.Icon\": {\n fontSize: variables.iconFontSize\n },\n \"NativeBase.IconNB\": {\n fontSize: variables.iconFontSize\n },\n \"NativeBase.Text\": {\n marginLeft: 10,\n alignSelf: \"center\"\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon,\n paddingRight: variables.cardItemPadding + 5\n }\n },\n flex: 1,\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n \".content\": {\n \"NativeBase.Text\": {\n color: platform === \"ios\" ? \"#555\" : \"#222\",\n fontSize: variables.DefaultFontSize - 2\n }\n },\n \".cardBody\": {\n padding: -5,\n \"NativeBase.Text\": {\n marginTop: 5\n }\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\",\n marginRight: 20\n }\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon,\n paddingRight: variables.cardItemPadding + 5,\n alignSelf: \"stretch\"\n }\n },\n flex: 1,\n alignSelf: \"stretch\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Right\": {\n \"NativeBase.Badge\": {\n alignSelf: null\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n ...transparentBtnCommon\n },\n alignSelf: null\n },\n \"NativeBase.Icon\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: variables.cardBorderColor\n },\n \"NativeBase.IconNB\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: variables.cardBorderColor\n },\n \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 1,\n alignSelf: null\n },\n \"NativeBase.Thumbnail\": {\n alignSelf: null\n },\n \"NativeBase.Image\": {\n alignSelf: null\n },\n \"NativeBase.Radio\": {\n alignSelf: null\n },\n \"NativeBase.Checkbox\": {\n alignSelf: null\n },\n \"NativeBase.Switch\": {\n alignSelf: null\n },\n flex: 0.8\n },\n \".header\": {\n \"NativeBase.Text\": {\n fontSize: 16,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.brandPrimary,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n borderBottomWidth: variables.borderWidth\n },\n borderBottomWidth: null,\n paddingVertical: variables.cardItemPadding + 5\n },\n \".footer\": {\n \"NativeBase.Text\": {\n fontSize: 16,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.brandPrimary,\n fontWeight: platform === \"ios\" ? \"600\" : \"500\"\n },\n borderTopWidth: variables.borderWidth\n },\n borderBottomWidth: null\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n }\n },\n \"NativeBase.Icon\": {\n width: variables.iconFontSize + 5,\n fontSize: variables.iconFontSize - 2\n },\n \"NativeBase.IconNB\": {\n width: variables.iconFontSize + 5,\n fontSize: variables.iconFontSize - 2\n },\n \".bordered\": {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderColor: variables.cardBorderColor\n },\n \".first\": {\n borderTopLeftRadius: variables.cardBorderRadius,\n borderTopRightRadius: variables.cardBorderRadius\n },\n \".last\": {\n borderBottomLeftRadius: variables.cardBorderRadius,\n borderBottomRightRadius: variables.cardBorderRadius\n },\n flexDirection: \"row\",\n alignItems: \"center\",\n borderRadius: 2,\n padding: variables.cardItemPadding + 5,\n paddingVertical: variables.cardItemPadding,\n backgroundColor: variables.cardDefaultBg\n };\n\n return cardItemTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/variables/commonColor.js b/dist/src/theme/variables/commonColor.js index 379b1c743..d9abebd72 100644 --- a/dist/src/theme/variables/commonColor.js +++ b/dist/src/theme/variables/commonColor.js @@ -88,6 +88,7 @@ return this.iconFontSize*0.6; cardDefaultBg:"#fff", cardBorderColor:"#ccc", cardBorderRadius:2, +cardItemPadding:platform==="ios"?10:12, CheckboxRadius:platform==="ios"?13:0, diff --git a/dist/src/theme/variables/commonColor.js.map b/dist/src/theme/variables/commonColor.js.map index 847e0d626..b0ed80f35 100644 --- a/dist/src/theme/variables/commonColor.js.map +++ b/dist/src/theme/variables/commonColor.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/variables/commonColor.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","undefined","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","iosStatusbar","toolbarDefaultBorder","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","listItemSelected","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAcH,wBAAWC,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAWC,sBAASC,EAA1B;AACA,GAAMC,eAAgBC,SAAtB;AACA,GAAMC;AACJL,WAAa,KAAb,GAAuBN,eAAiB,GAAjB,EAAwBI,cAAgB,GAA/D,CADF,C;;AAGe;AACbK,2BADa;AAEbH,iBAFa;;;AAKbM,YAAa,SALA;AAMbC,UAAW,MANE;AAObC,aAAc,SAPD;AAQbC,kBAAmB,MARN;AASbC,qBAAsB,SATT;;;AAYbC,cAAe,IAZF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AAgB5I,WAAa,KAAb,CAAqB,MAArB,CAA8B,MA7OjC;;;AAgPb6I,iBAAkB7I,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAhP9B;AAiPb8I,YAAa,EAAIC,wBAAWC,yBAAX,CAAqC,CAArC,CAjPJ;AAkPbC,eAAgB,EAlPH;AAmPbC,kBAAmB,SAnPN;AAoPbC,gBAAiB,EApPJ;AAqPbrJ,uBArPa;AAsPbJ,yBAtPa;AAuPbW,mBAvPa;AAwPb+I,8BAA+B,EAxPlB;;;AA2PbC,MAAO;AACLC,SAAU;AACRC,SAAU,EADF;AAERC,UAAW,CAFH;AAGRC,WAAY,CAHJ;AAIRC,YAAa,EAJL,CADL;;AAOLC,UAAW;AACTJ,SAAU,CADD;AAETC,UAAW,EAFF;AAGTC,WAAY,EAHH;AAITC,YAAa,EAJJ,CAPN,CA3PM,C","file":"commonColor.js","sourcesContent":["import color from \"color\";\n\nimport { Platform, Dimensions, PixelRatio } from \"react-native\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = undefined;\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n //Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return platform === \"ios\" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n\n // CheckBox\n CheckboxRadius: platform === \"ios\" ? 13 : 0,\n CheckboxBorderWidth: platform === \"ios\" ? 1 : 2,\n CheckboxPaddingLeft: platform === \"ios\" ? 4 : 2,\n CheckboxPaddingBottom: platform === \"ios\" ? 0 : 5,\n CheckboxIconSize: platform === \"ios\" ? 21 : 16,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: platform === \"ios\" ? \"#737373\" : \"#bfc6ea\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: platform === \"ios\" ? \"#2874F0\" : \"#fff\",\n tabActiveBgColor: platform === \"ios\" ? \"#cde1f9\" : \"#3F51B5\",\n\n // Header\n toolbarBtnColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 30 : 50,\n toolbarBtnTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n iosStatusbar: \"dark-content\",\n toolbarDefaultBorder: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: platform === \"ios\" ? 20 : 24,\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: platform === \"ios\" ? 10 : 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n listItemSelected: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: platform === \"ios\" ? 25 : 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n segmentActiveBackgroundColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentActiveTextColor: platform === \"ios\" ? \"#fff\" : \"#3F51B5\",\n segmentBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentBorderColorMain: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n topTabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n topTabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n topTabBarBorderColor: platform === \"ios\" ? \"#a7a6ab\" : \"#fff\",\n topTabBarActiveBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 11 : 14,\n subtitleColor: platform === \"ios\" ? \"#000\" : \"#fff\",\n titleFontColor: platform === \"ios\" ? \"#000\" : \"#fff\",\n\n // Other\n borderRadiusBase: platform === \"ios\" ? 5 : 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/commonColor.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","undefined","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","cardItemPadding","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","iosStatusbar","toolbarDefaultBorder","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","listItemSelected","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,w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MA3NhD;;;AA8Nb2F,WAAY,SA9NC;AA+Nb2C,YAAa,EA/NA;;;AAkOblC,UAAW,MAlOE;AAmOb5E,iBAAkB,MAnOL;AAoOb+G,aAAc,EApOD;AAqOb,GAAIC,iBAAJ,EAAuB;AACrB,MAAO,MAAKpC,SAAZ;AACD,CAvOY;;;AA0ObqC,gBAAiBzI,WAAa,KAAb,CAAqB,QAArB,CAAgC,eA1OpC;AA2Ob0I,cAAe1I,WAAa,KAAb,CAAqB,EAArB,CAA0B,EA3O5B;AA4Ob2I,iBAAkB3I,WAAa,KAAb,CAAqB,EAArB,CAA0B,EA5O/B;AA6Ob4I,cAAe5I,WAAa,KAAb,CAAqB,MAArB,CAA8B,MA7OhC;AA8Ob6I,eAAgB7I,WAAa,KAAb,CAAqB,MAArB,CAA8B,MA9OjC;;;AAiPb8I,iBAAkB9I,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAjP9B;AAkPb+I,YAAa,EAAIC,wBAAWC,yBAAX,CAAqC,CAArC,CAlPJ;AAmPbC,eAAgB,EAnPH;AAoPbC,kBAAmB,SApPN;AAqPbC,gBAAiB,EArPJ;AAsPbtJ,uBAtPa;AAuPbJ,yBAvPa;AAwPbW,mBAxPa;AAyPbgJ,8BAA+B,EAzPlB;;;AA4PbC,MAAO;AACLC,SAAU;AACRC,SAAU,EADF;AAERC,UAAW,CAFH;AAGRC,WAAY,CAHJ;AAIRC,YAAa,EAJL,CADL;;AAOLC,UAAW;AACTJ,SAAU,CADD;AAETC,UAAW,EAFF;AAGTC,WAAY,EAHH;AAITC,YAAa,EAJJ,CAPN,CA5PM,C","file":"commonColor.js","sourcesContent":["import color from \"color\";\n\nimport { Platform, Dimensions, PixelRatio } from \"react-native\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = undefined;\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n //Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return platform === \"ios\" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n cardItemPadding: platform === \"ios\" ? 10 : 12,\n\n // CheckBox\n CheckboxRadius: platform === \"ios\" ? 13 : 0,\n CheckboxBorderWidth: platform === \"ios\" ? 1 : 2,\n CheckboxPaddingLeft: platform === \"ios\" ? 4 : 2,\n CheckboxPaddingBottom: platform === \"ios\" ? 0 : 5,\n CheckboxIconSize: platform === \"ios\" ? 21 : 16,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: platform === \"ios\" ? \"#737373\" : \"#bfc6ea\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: platform === \"ios\" ? \"#2874F0\" : \"#fff\",\n tabActiveBgColor: platform === \"ios\" ? \"#cde1f9\" : \"#3F51B5\",\n\n // Header\n toolbarBtnColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 30 : 50,\n toolbarBtnTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n iosStatusbar: \"dark-content\",\n toolbarDefaultBorder: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: platform === \"ios\" ? 20 : 24,\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: platform === \"ios\" ? 10 : 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n listItemSelected: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: platform === \"ios\" ? 25 : 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n segmentActiveBackgroundColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentActiveTextColor: platform === \"ios\" ? \"#fff\" : \"#3F51B5\",\n segmentBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentBorderColorMain: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n topTabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n topTabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n topTabBarBorderColor: platform === \"ios\" ? \"#a7a6ab\" : \"#fff\",\n topTabBarActiveBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 11 : 14,\n subtitleColor: platform === \"ios\" ? \"#000\" : \"#fff\",\n titleFontColor: platform === \"ios\" ? \"#000\" : \"#fff\",\n\n // Other\n borderRadiusBase: platform === \"ios\" ? 5 : 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/variables/material.js b/dist/src/theme/variables/material.js index 630974f73..06b1be8fd 100644 --- a/dist/src/theme/variables/material.js +++ b/dist/src/theme/variables/material.js @@ -88,6 +88,7 @@ return this.iconFontSize*0.6; cardDefaultBg:"#fff", cardBorderColor:"#ccc", cardBorderRadius:2, +cardItemPadding:platform==="ios"?10:12, CheckboxRadius:0, diff --git a/dist/src/theme/variables/material.js.map b/dist/src/theme/variables/material.js.map index cdf986710..1374404e6 100644 --- a/dist/src/theme/variables/material.js.map +++ b/dist/src/theme/variables/material.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/variables/material.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","listItemSelected","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAcH,wBAAWC,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAWC,sBAASC,EAA1B;AACA,GAAMC,eAAgB,UAAtB;AACA,GAAMC;AACJJ,WAAa,KAAb,GAAuBN,eAAiB,GAAjB,EAAwBI,cAAgB,GAA/D,CADF,C;;AAGe;AACbK,2BADa;AAEbH,iBAFa;;;AAKbK,YAAa,SALA;AAMbC,UAAW,MANE;AAObC,aAAc,SAPD;AAQbC,kBAAmB,MARN;AASbC,qBAAsB,SATT;;;AAYbC,cAAe,IA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deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = \"material\";\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n // Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: 0,\n\n // Button\n btnFontFamily: \"Roboto\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n\n // CheckBox\n CheckboxRadius: 0,\n CheckboxBorderWidth: 2,\n CheckboxPaddingLeft: 2,\n CheckboxPaddingBottom: 5,\n CheckboxIconSize: 16,\n CheckboxIconMarginTop: 1,\n CheckboxFontSize: 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: \"#bfc6ea\",\n tabBarTextSize: 11,\n activeTab: \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: \"#fff\",\n tabActiveBgColor: \"#3F51B5\",\n\n // Header\n toolbarBtnColor: \"#fff\",\n toolbarDefaultBg: \"#3F51B5\",\n toolbarHeight: 56,\n toolbarSearchIconSize: 23,\n toolbarInputColor: \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 40 : 50,\n toolbarBtnTextColor: \"#fff\",\n toolbarDefaultBorder: \"#3F51B5\",\n iosStatusbar: \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: 28,\n iconHeaderSize: 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: 24,\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n listItemSelected: \"#3F51B5\",\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: \"#3F51B5\",\n segmentActiveBackgroundColor: \"#fff\",\n segmentTextColor: \"#fff\",\n segmentActiveTextColor: \"#3F51B5\",\n segmentBorderColor: \"#fff\",\n segmentBorderColorMain: \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: \"#3F51B5\",\n topTabBarTextColor: \"#b3c7f9\",\n topTabBarActiveTextColor: \"#fff\",\n topTabBarBorderColor: \"#fff\",\n topTabBarActiveBorderColor: \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: \"Roboto\",\n titleFontSize: 19,\n subTitleFontSize: 14,\n subtitleColor: \"#FFF\",\n titleFontColor: \"#FFF\",\n\n // Other\n borderRadiusBase: 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/material.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","cardItemPadding","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","listItemSelected","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAcH,wBAAWC,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAWC,sBAASC,EAA1B;AACA,GAAMC,eAAgB,UAAtB;AACA,GAAMC;AACJJ,WAAa,KAAb,GAAuBN,eAAiB,GAAjB,EAAwBI,cAAgB,GAA/D,CADF,C;;AAGe;AACbK,2BADa;AAEbH,iBAFa;;;AAKbK,YAAa,SALA;AAMbC,UAAW,MANE;AAObC,aAAc,SAPD;AAQbC,kBAAmB,MARN;AASbC,qBAAsB,SATT;;;AAYbC,cAAe,IAZF;AAabC,mBAAoB,0BAbP;AAcbC,uBAAwB,qBAdX;AAebC,wBAAyB,IAfZ;;;AAkBbC,QAAS,SAlB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,EAAiB;AACf,MAAO,MAAKlG,YAAZ;AACD,CAxMY;;;AA2MbmG,uBAAwB,SA3MX;AA4MbC,6BAA8B,MA5MjB;AA6MbC,iBAAkB,MA7ML;AA8MbC,uBAAwB,SA9MX;AA+MbC,mBAAoB,MA/MP;AAgNbC,uBAAwB,SAhNX;;;AAmNbC,oBAAqB,SAnNR;AAoNbC,oBAAqB,SApNR;;;AAuNbC,aAAc,SAvND;AAwNbC,mBAAoB,SAxNP;AAyNbC,yBAA0B,MAzNb;AA0NbC,qBAAsB,MA1NT;AA2NbC,2BAA4B,MA3Nf;;;AA8Nb1C,WAAY,SA9NC;AA+Nb2C,YAAa,EA/NA;;;AAkOblC,UAAW,MAlOE;AAmOb5E,iBAAkB,MAnOL;AAoOb+G,aAAc,EApOD;AAqOb,GAAIC,iBAAJ,EAAuB;AACrB,MAAO,MAAKpC,SAAZ;AACD,CAvOY;;;AA0ObqC,gBAAiB,QA1OJ;AA2ObC,cAAe,EA3OF;AA4ObC,iBAAkB,EA5OL;AA6ObC,cAAe,MA7OF;AA8ObC,eAAgB,MA9OH;;;AAiPbC,iBAAkB,CAjPL;AAkPbC,YAAa,EAAIC,wBAAWC,yBAAX,CAAqC,CAArC,CAlPJ;AAmPbC,eAAgB,EAnPH;AAoPbC,kBAAmB,SApPN;AAqPbC,gBAAiB,EArPJ;AAsPbrJ,uBAtPa;AAuPbJ,yBAvPa;AAwPbU,mBAxPa;AAyPbgJ,8BAA+B,EAzPlB;;;AA4PbC,MAAO;AACLC,SAAU;AACRC,SAAU,EADF;AAERC,UAAW,CAFH;AAGRC,WAAY,CAHJ;AAIRC,YAAa,EAJL,CADL;;AAOLC,UAAW;AACTJ,SAAU,CADD;AAETC,UAAW,EAFF;AAGTC,WAAY,EAHH;AAITC,YAAa,EAJJ,CAPN,CA5PM,C","file":"material.js","sourcesContent":["import color from \"color\";\n\nimport { Platform, Dimensions, PixelRatio } from \"react-native\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = \"material\";\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n // Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: 0,\n\n // Button\n btnFontFamily: \"Roboto\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n cardItemPadding: platform === \"ios\" ? 10 : 12,\n\n // CheckBox\n CheckboxRadius: 0,\n CheckboxBorderWidth: 2,\n CheckboxPaddingLeft: 2,\n CheckboxPaddingBottom: 5,\n CheckboxIconSize: 16,\n CheckboxIconMarginTop: 1,\n CheckboxFontSize: 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: \"#bfc6ea\",\n tabBarTextSize: 11,\n activeTab: \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: \"#fff\",\n tabActiveBgColor: \"#3F51B5\",\n\n // Header\n toolbarBtnColor: \"#fff\",\n toolbarDefaultBg: \"#3F51B5\",\n toolbarHeight: 56,\n toolbarSearchIconSize: 23,\n toolbarInputColor: \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 40 : 50,\n toolbarBtnTextColor: \"#fff\",\n toolbarDefaultBorder: \"#3F51B5\",\n iosStatusbar: \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: 28,\n iconHeaderSize: 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: 24,\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n listItemSelected: \"#3F51B5\",\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: \"#3F51B5\",\n segmentActiveBackgroundColor: \"#fff\",\n segmentTextColor: \"#fff\",\n segmentActiveTextColor: \"#3F51B5\",\n segmentBorderColor: \"#fff\",\n segmentBorderColorMain: \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: \"#3F51B5\",\n topTabBarTextColor: \"#b3c7f9\",\n topTabBarActiveTextColor: \"#fff\",\n topTabBarBorderColor: \"#fff\",\n topTabBarActiveBorderColor: \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: \"Roboto\",\n titleFontSize: 19,\n subTitleFontSize: 14,\n subtitleColor: \"#FFF\",\n titleFontColor: \"#FFF\",\n\n // Other\n borderRadiusBase: 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/variables/platform.js b/dist/src/theme/variables/platform.js index c0dccc908..80c60495e 100644 --- a/dist/src/theme/variables/platform.js +++ b/dist/src/theme/variables/platform.js @@ -88,6 +88,7 @@ return this.iconFontSize*0.6; cardDefaultBg:"#fff", cardBorderColor:"#ccc", cardBorderRadius:2, +cardItemPadding:platform==="ios"?10:12, CheckboxRadius:platform==="ios"?13:0, diff --git a/dist/src/theme/variables/platform.js.map b/dist/src/theme/variables/platform.js.map index 621b9a6df..2ec1ac1ee 100644 --- a/dist/src/theme/variables/platform.js.map +++ b/dist/src/theme/variables/platform.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/variables/platform.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","undefined","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listItemSelected","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAcH,wBAAWC,GAAX,CAAe,QAAf,EAAyBG,KA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aAAc,EAnOD;AAoOb,GAAIC,iBAAJ,EAAuB;AACrB,MAAO,MAAKpC,SAAZ;AACD,CAtOY;;;AAyObqC,gBAAiBxI,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAzOpC;AA0ObyI,cAAezI,WAAa,KAAb,CAAqB,EAArB,CAA0B,EA1O5B;AA2Ob0I,iBAAkB1I,WAAa,KAAb,CAAqB,EAArB,CAA0B,EA3O/B;AA4Ob2I,cAAe3I,WAAa,KAAb,CAAqB,SAArB,CAAiC,MA5OnC;AA6Ob4I,eAAgB5I,WAAa,KAAb,CAAqB,MAArB,CAA8B,MA7OjC;;;AAgPb6I,iBAAkB7I,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAhP9B;AAiPb8I,YAAa,EAAIC,wBAAWC,yBAAX,CAAqC,CAArC,CAjPJ;AAkPbC,eAAgB,EAlPH;AAmPbC,kBAAmB,SAnPN;AAoPbC,gBAAiB,EApPJ;AAqPbrJ,uBArPa;AAsPbJ,yBAtPa;AAuPbW,mBAvPa;AAwPb+I,8BAA+B,EAxPlB;;;AA2PbC,MAAO;AACLC,SAAU;AACRC,SAAU,EADF;AAERC,UAAW,CAFH;AAGRC,WAAY,CAHJ;AAIRC,YAAa,EAJL,CADL;;AAOLC,UAAW;AACTJ,SAAU,CADD;AAETC,UAAW,EAFF;AAGTC,WAAY,EAHH;AAITC,YAAa,EAJJ,CAPN,CA3PM,C","file":"platform.js","sourcesContent":["import color from \"color\";\n\nimport { Platform, Dimensions, PixelRatio } from \"react-native\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = undefined;\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n // Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return platform === \"ios\" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n\n // CheckBox\n CheckboxRadius: platform === \"ios\" ? 13 : 0,\n CheckboxBorderWidth: platform === \"ios\" ? 1 : 2,\n CheckboxPaddingLeft: platform === \"ios\" ? 4 : 2,\n CheckboxPaddingBottom: platform === \"ios\" ? 0 : 5,\n CheckboxIconSize: platform === \"ios\" ? 21 : 16,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n tabActiveBgColor: platform === \"ios\" ? \"#cde1f9\" : \"#3F51B5\",\n\n // Header\n toolbarBtnColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 30 : 50,\n toolbarBtnTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBorder: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n iosStatusbar: platform === \"ios\" ? \"dark-content\" : \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: platform === \"ios\" ? 20 : 24,\n listItemSelected: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: platform === \"ios\" ? 10 : 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: platform === \"ios\" ? 25 : 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n segmentActiveBackgroundColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentActiveTextColor: platform === \"ios\" ? \"#fff\" : \"#3F51B5\",\n segmentBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentBorderColorMain: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n topTabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n topTabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n topTabBarBorderColor: platform === \"ios\" ? \"#a7a6ab\" : \"#fff\",\n topTabBarActiveBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 11 : 14,\n subtitleColor: platform === \"ios\" ? \"#8e8e93\" : \"#FFF\",\n titleFontColor: platform === \"ios\" ? \"#000\" : \"#FFF\",\n\n // Other\n borderRadiusBase: platform === \"ios\" ? 5 : 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/platform.js"],"names":["deviceHeight","Dimensions","get","height","deviceWidth","width","platform","Platform","OS","platformStyle","undefined","isIphoneX","headerStyle","iconStyle","contentStyle","expandedIconStyle","accordionBorderColor","androidRipple","androidRippleColor","androidRippleColorDark","btnUppercaseAndroidText","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","buttonPadding","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","cardBorderColor","cardBorderRadius","cardItemPadding","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","brandDark","brandLight","datePickerTextColor","datePickerBg","DefaultFontSize","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","footerPaddingBottom","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","searchBarInputHeight","toolbarBtnTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","darkenHeader","tabBgColor","iconFamily","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputHeightBase","inputColor","textColor","inputColorPlaceholder","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","lineHeight","listItemSelected","listBg","listBorderColor","listDividerBg","listBtnUnderlayColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultSpinnerColor","inverseSpinnerColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabBarBorderColor","topTabBarActiveBorderColor","tabFontSize","noteFontSize","defaultTextColor","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","PixelRatio","getPixelSizeForLayoutSize","contentPadding","dropdownLinkColor","inputLineHeight","inputGroupRoundedBorderRadius","Inset","portrait","topInset","leftInset","rightInset","bottomInset","landscape"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAeC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAcH,wBAAWC,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAWC,sBAASC,EAA1B;AACA,GAAMC,eAAgBC,SAAtB;AACA,GAAMC;AACJL,WAAa,KAAb,GAAuBN,eAAiB,GAAjB,EAAwBI,cAAgB,GAA/D,CADF,C;;AAGe;AACbK,2BADa;AAEbH,iBAFa;;;AAKbM,YAAa,SALA;AAMbC,UAAW,MANE;AAObC,aAAc,SAPD;AAQbC,kBAAmB,MARN;AASbC,qBAAsB,SATT;;;AAYbC,cAAe,IAZF;AAabC,mBAAoB,0BAbP;AAcbC,uBAAwB,qBAdX;AAebC,wBAAyB,IAfZ;;;AAkBbC,QAAS,SAlBI;AAmBbC,WAAY,MAnBC;AAoBbC,aAAcjB,WAAa,KAAb,CAAqB,CAArB,CAAyB,CApB1B;;;AAuBbkB,cAAelB,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAvBlC;AAwBbmB,cAAe,SAxBF;AAyBbC,cAAe,CAzBF;AA0Bb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,MAAKC,YAAZ;AACD,CA5BY;AA6Bb,GAAIC,gBAAJ,EAAsB;AACpB,MAAO,MAAKC,gBAAZ;AACD,CA/BY;AAgCb,GAAIC,UAAJ,EAAgB;AACd,MAAO,MAAKC,SAAZ;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AAERC,UAAW,CAFH;AAGRC,WAAY,CAHJ;AAIRC,YAAa,EAJL,CADL;;AAOLC,UAAW;AACTJ,SAAU,CADD;AAETC,UAAW,EAFF;AAGTC,WAAY,EAHH;AAITC,YAAa,EAJJ,CAPN,CA5PM,C","file":"platform.js","sourcesContent":["import color from \"color\";\n\nimport { Platform, Dimensions, PixelRatio } from \"react-native\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nconst deviceWidth = Dimensions.get(\"window\").width;\nconst platform = Platform.OS;\nconst platformStyle = undefined;\nconst isIphoneX =\n platform === \"ios\" && (deviceHeight === 812 || deviceWidth === 812);\n\nexport default {\n platformStyle,\n platform,\n\n //Accordion\n headerStyle: \"#edebed\",\n iconStyle: \"#000\",\n contentStyle: \"#f5f4f5\",\n expandedIconStyle: \"#000\",\n accordionBorderColor: \"#d3d3d3\",\n\n // Android\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n btnUppercaseAndroidText: true,\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n buttonPadding: 6,\n get btnPrimaryBg() {\n return this.brandPrimary;\n },\n get btnPrimaryColor() {\n return this.inverseTextColor;\n },\n get btnInfoBg() {\n return this.brandInfo;\n },\n get btnInfoColor() {\n return this.inverseTextColor;\n },\n get btnSuccessBg() {\n return this.brandSuccess;\n },\n get btnSuccessColor() {\n return this.inverseTextColor;\n },\n get btnDangerBg() {\n return this.brandDanger;\n },\n get btnDangerColor() {\n return this.inverseTextColor;\n },\n get btnWarningBg() {\n return this.brandWarning;\n },\n get btnWarningColor() {\n return this.inverseTextColor;\n },\n get btnTextSize() {\n return platform === \"ios\" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;\n },\n get btnTextSizeLarge() {\n return this.fontSizeBase * 1.5;\n },\n get btnTextSizeSmall() {\n return this.fontSizeBase * 0.8;\n },\n get borderRadiusLarge() {\n return this.fontSizeBase * 3.8;\n },\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n // Card\n cardDefaultBg: \"#fff\",\n cardBorderColor: \"#ccc\",\n cardBorderRadius: 2,\n cardItemPadding: platform === \"ios\" ? 10 : 12,\n\n // CheckBox\n CheckboxRadius: platform === \"ios\" ? 13 : 0,\n CheckboxBorderWidth: platform === \"ios\" ? 1 : 2,\n CheckboxPaddingLeft: platform === \"ios\" ? 4 : 2,\n CheckboxPaddingBottom: platform === \"ios\" ? 0 : 5,\n CheckboxIconSize: platform === \"ios\" ? 21 : 16,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Color\n brandPrimary: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandDark: \"#000\",\n brandLight: \"#f4f4f4\",\n\n //Date Picker\n datePickerTextColor: \"#000\",\n datePickerBg: \"transparent\",\n\n // Font\n DefaultFontSize: 16,\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n get fontSizeH1() {\n return this.fontSizeBase * 1.8;\n },\n get fontSizeH2() {\n return this.fontSizeBase * 1.6;\n },\n get fontSizeH3() {\n return this.fontSizeBase * 1.4;\n },\n\n // Footer\n footerHeight: 55,\n footerDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n footerPaddingBottom: 0,\n\n // FooterTab\n tabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n tabActiveBgColor: platform === \"ios\" ? \"#cde1f9\" : \"#3F51B5\",\n\n // Header\n toolbarBtnColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n searchBarInputHeight: platform === \"ios\" ? 30 : 50,\n toolbarBtnTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBorder: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n iosStatusbar: platform === \"ios\" ? \"dark-content\" : \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg)\n .darken(0.2)\n .hex();\n },\n get darkenHeader() {\n return color(this.tabBgColor)\n .darken(0.03)\n .hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n inputHeightBase: 50,\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n lineHeight: platform === \"ios\" ? 20 : 24,\n listItemSelected: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n\n // List\n listBg: \"transparent\",\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listBtnUnderlayColor: \"#DDD\",\n listItemPadding: platform === \"ios\" ? 10 : 12,\n listNoteColor: \"#808080\",\n listNoteSize: 13,\n\n // Progress Bar\n defaultProgressColor: \"#E4202D\",\n inverseProgressColor: \"#1A191B\",\n\n // Radio Button\n radioBtnSize: platform === \"ios\" ? 25 : 23,\n radioSelectedColorAndroid: \"#3F51B5\",\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n get radioColor() {\n return this.brandPrimary;\n },\n\n // Segment\n segmentBackgroundColor: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n segmentActiveBackgroundColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentActiveTextColor: platform === \"ios\" ? \"#fff\" : \"#3F51B5\",\n segmentBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n segmentBorderColorMain: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tab\n tabDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n topTabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n topTabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n topTabBarBorderColor: platform === \"ios\" ? \"#a7a6ab\" : \"#fff\",\n topTabBarActiveBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n get defaultTextColor() {\n return this.textColor;\n },\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 11 : 14,\n subtitleColor: platform === \"ios\" ? \"#8e8e93\" : \"#FFF\",\n titleFontColor: platform === \"ios\" ? \"#000\" : \"#FFF\",\n\n // Other\n borderRadiusBase: platform === \"ios\" ? 5 : 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n deviceWidth,\n deviceHeight,\n isIphoneX,\n inputGroupRoundedBorderRadius: 30,\n\n //iPhoneX SafeArea\n Inset: {\n portrait: {\n topInset: 24,\n leftInset: 0,\n rightInset: 0,\n bottomInset: 34\n },\n landscape: {\n topInset: 0,\n leftInset: 44,\n rightInset: 44,\n bottomInset: 21\n }\n }\n};\n"]} \ No newline at end of file diff --git a/src/theme/components/CardItem.js b/src/theme/components/CardItem.js index 190871f7c..3b613962f 100644 --- a/src/theme/components/CardItem.js +++ b/src/theme/components/CardItem.js @@ -48,7 +48,7 @@ export default (variables = variable) => { "NativeBase.Button": { ".transparent": { ...transparentBtnCommon, - paddingRight: variables.listItemPadding + 5 + paddingRight: variables.cardItemPadding + 5 } }, flex: 1, @@ -78,7 +78,7 @@ export default (variables = variable) => { "NativeBase.Button": { ".transparent": { ...transparentBtnCommon, - paddingRight: variables.listItemPadding + 5, + paddingRight: variables.cardItemPadding + 5, alignSelf: "stretch" } }, @@ -140,7 +140,7 @@ export default (variables = variable) => { borderBottomWidth: variables.borderWidth }, borderBottomWidth: null, - paddingVertical: variables.listItemPadding + 5 + paddingVertical: variables.cardItemPadding + 5 }, ".footer": { "NativeBase.Text": { @@ -185,8 +185,8 @@ export default (variables = variable) => { flexDirection: "row", alignItems: "center", borderRadius: 2, - padding: variables.listItemPadding + 5, - paddingVertical: variables.listItemPadding, + padding: variables.cardItemPadding + 5, + paddingVertical: variables.cardItemPadding, backgroundColor: variables.cardDefaultBg }; diff --git a/src/theme/variables/commonColor.js b/src/theme/variables/commonColor.js index ec7d1a33a..e7cf7b46f 100644 --- a/src/theme/variables/commonColor.js +++ b/src/theme/variables/commonColor.js @@ -88,6 +88,7 @@ export default { cardDefaultBg: "#fff", cardBorderColor: "#ccc", cardBorderRadius: 2, + cardItemPadding: platform === "ios" ? 10 : 12, // CheckBox CheckboxRadius: platform === "ios" ? 13 : 0, diff --git a/src/theme/variables/material.js b/src/theme/variables/material.js index cdb7553cf..09d03f47c 100644 --- a/src/theme/variables/material.js +++ b/src/theme/variables/material.js @@ -88,6 +88,7 @@ export default { cardDefaultBg: "#fff", cardBorderColor: "#ccc", cardBorderRadius: 2, + cardItemPadding: platform === "ios" ? 10 : 12, // CheckBox CheckboxRadius: 0, diff --git a/src/theme/variables/platform.js b/src/theme/variables/platform.js index d735e6fb0..e80173b9a 100644 --- a/src/theme/variables/platform.js +++ b/src/theme/variables/platform.js @@ -88,6 +88,7 @@ export default { cardDefaultBg: "#fff", cardBorderColor: "#ccc", cardBorderRadius: 2, + cardItemPadding: platform === "ios" ? 10 : 12, // CheckBox CheckboxRadius: platform === "ios" ? 13 : 0, From 13cc2a28827d9dca877121196cec8ea69fc8197f Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Tue, 19 Jun 2018 18:03:59 +0530 Subject: [PATCH 06/12] Added Statusbar color support for transparent header on android. Added translucent props to header. --- index.d.ts | 1 + src/basic/Header.js | 5 +++-- src/theme/components/Header.js | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 451f68a74..4c8f177e1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -105,6 +105,7 @@ declare module "native-base" { androidStatusBarColor?: string; iosBarStyle?: ReactNative.StatusBarStyle; hasSegment?: boolean; + translucent?: boolean; } interface Left { diff --git a/src/basic/Header.js b/src/basic/Header.js index 4cd09f355..74d8c8148 100644 --- a/src/basic/Header.js +++ b/src/basic/Header.js @@ -78,6 +78,7 @@ class Header extends Component { ? "light-content" : variables.iosStatusbar } + translucent={this.props.transparent ? true : this.props.translucent} /> {variable.isIphoneX ? ( ) : ( - (this._root = c)} {...this.props} /> - )} + (this._root = c)} {...this.props} /> + )} ); } diff --git a/src/theme/components/Header.js b/src/theme/components/Header.js index 1168befa7..053cac497 100644 --- a/src/theme/components/Header.js +++ b/src/theme/components/Header.js @@ -46,7 +46,9 @@ export default (variables = variable) => { shadowColor: null, shadowOffset: null, shadowRadius: null, - shadowOpacity: null + shadowOpacity: null, + paddingTop: platform === "android" ? StatusBar.currentHeight : undefined, + height: platform === "android" ? variables.toolbarHeight + StatusBar.currentHeight : undefined }, ".noShadow": { elevation: 0, From 0b4e5af82d5afc17bafb4b143d3694b5ebc3588c Mon Sep 17 00:00:00 2001 From: SupriyaKalghatgi <> Date: Wed, 20 Jun 2018 17:14:37 +0530 Subject: [PATCH 07/12] Picker: Fixed Header Left Button alignment --- dist/src/basic/Picker.ios.js | 55 +++++++------ dist/src/basic/Picker.ios.js.map | 2 +- src/basic/Picker.ios.js | 133 ++++++++++++++++--------------- 3 files changed, 100 insertions(+), 90 deletions(-) diff --git a/dist/src/basic/Picker.ios.js b/dist/src/basic/Picker.ios.js index 93a0fdaf3..9a0ed8df2 100644 --- a/dist/src/basic/Picker.ios.js +++ b/dist/src/basic/Picker.ios.js @@ -94,17 +94,19 @@ return children; { return _react2.default.cloneElement(this.props.iosIcon,{ -style:[{ +style:[ +{ fontSize:22, lineHeight:26},_extends({}, + this.props.iosIcon.props.style)]}); + }},{key:"renderButton",value:function renderButton() {var _this3=this; var onPress=function onPress(){ -if(_this3.props.enabled!==undefined&&!_this3.props.enabled) -return; +if(_this3.props.enabled!==undefined&&!_this3.props.enabled)return; _this3._setModalVisible(true); }; var text=this.state.currentLabel? @@ -124,16 +126,16 @@ style:this.props.style, dark:true, picker:true, transparent:true, -onPress:onPress,__source:{fileName:_jsxFileName,lineNumber:122}}, +onPress:onPress,__source:{fileName:_jsxFileName,lineNumber:124}}, this.state.currentLabel? -_react2.default.createElement(_Text.Text,{style:this.props.textStyle,note:this.props.note,__source:{fileName:_jsxFileName,lineNumber:130}}, +_react2.default.createElement(_Text.Text,{style:this.props.textStyle,note:this.props.note,__source:{fileName:_jsxFileName,lineNumber:132}}, this.state.currentLabel): _react2.default.createElement(_Text.Text,{ style:[this.props.textStyle,this.props.placeholderStyle], -note:this.props.note===false?false:true,__source:{fileName:_jsxFileName,lineNumber:134}}, +note:this.props.note===false?false:true,__source:{fileName:_jsxFileName,lineNumber:136}}, this.props.placeholder), @@ -147,39 +149,40 @@ this.props.iosIcon===undefined?null:this.renderIcon())); return this.props.renderHeader? this.props.renderHeader(function(){return _this4._setModalVisible(false);}): -_react2.default.createElement(_Header.Header,{style:this.props.headerStyle,__source:{fileName:_jsxFileName,lineNumber:150}}, -_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:151}}, +_react2.default.createElement(_Header.Header,{style:this.props.headerStyle,__source:{fileName:_jsxFileName,lineNumber:152}}, +_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:153}}, _react2.default.createElement(_Button.Button,{ style:_extends({ shadowOffset:null, shadowColor:null, shadowRadius:null, -shadowOpacity:null}, +shadowOpacity:null, +marginLeft:3}, this.props.headerBackButtonStyle), transparent:true, onPress:function onPress(){ _this4._setModalVisible(false); -},__source:{fileName:_jsxFileName,lineNumber:152}}, +},__source:{fileName:_jsxFileName,lineNumber:154}}, -_react2.default.createElement(_Text.Text,{style:this.props.headerBackButtonTextStyle,__source:{fileName:_jsxFileName,lineNumber:165}}, +_react2.default.createElement(_Text.Text,{style:this.props.headerBackButtonTextStyle,__source:{fileName:_jsxFileName,lineNumber:168}}, this.props.headerBackButtonText||"Back"))), -_react2.default.createElement(_Body.Body,{__source:{fileName:_jsxFileName,lineNumber:170}}, -_react2.default.createElement(_Title.Title,{style:this.props.headerTitleStyle,__source:{fileName:_jsxFileName,lineNumber:171}}, +_react2.default.createElement(_Body.Body,{__source:{fileName:_jsxFileName,lineNumber:173}}, +_react2.default.createElement(_Title.Title,{style:this.props.headerTitleStyle,__source:{fileName:_jsxFileName,lineNumber:174}}, this.props.iosHeader||"Select One")), -_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:175}})); +_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:178}})); }},{key:"render",value:function render() {var _this5=this; return( -_react2.default.createElement(_reactNative.View,{ref:function ref(c){return _this5._root=c;},__source:{fileName:_jsxFileName,lineNumber:182}}, +_react2.default.createElement(_reactNative.View,{ref:function ref(c){return _this5._root=c;},__source:{fileName:_jsxFileName,lineNumber:185}}, this.renderButton(), _react2.default.createElement(_reactNative.Modal,{ supportedOrientations:this.props.supportedOrientations||null, @@ -188,14 +191,15 @@ transparent:false, visible:this.state.modalVisible, onRequestClose:function onRequestClose(){ _this5._setModalVisible(false); -},__source:{fileName:_jsxFileName,lineNumber:184}}, +},__source:{fileName:_jsxFileName,lineNumber:187}}, -_react2.default.createElement(_Container.Container,{style:this.props.modalStyle,__source:{fileName:_jsxFileName,lineNumber:193}}, +_react2.default.createElement(_Container.Container,{style:this.props.modalStyle,__source:{fileName:_jsxFileName,lineNumber:196}}, this.renderHeader(), _react2.default.createElement(_reactNative.FlatList,{ data:this.state.dataSource, keyExtractor:function keyExtractor(item,index){return String(index);}, -renderItem:function renderItem(_ref){var item=_ref.item;return _react2.default.createElement(_ListItem.ListItem,{ +renderItem:function renderItem(_ref){var item=_ref.item;return( +_react2.default.createElement(_ListItem.ListItem,{ selected:item.props.value===_this5.props.selectedValue, button:true, style:_this5.props.itemStyle, @@ -203,18 +207,19 @@ onPress:function onPress(){ _this5._setModalVisible(false); _this5.props.onValueChange(item.props.value); _this5.setState({current:item.props.label}); -},__source:{fileName:_jsxFileName,lineNumber:198}}, +},__source:{fileName:_jsxFileName,lineNumber:202}}, -_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:208}}, -_react2.default.createElement(_Text.Text,{style:_this5.props.itemTextStyle,__source:{fileName:_jsxFileName,lineNumber:209}}, +_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:212}}, +_react2.default.createElement(_Text.Text,{style:_this5.props.itemTextStyle,__source:{fileName:_jsxFileName,lineNumber:213}}, item.props.label)), -_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:213}}, +_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:217}}, item.props.value===_this5.props.selectedValue? -_react2.default.createElement(_Radio.Radio,{selected:true,__source:{fileName:_jsxFileName,lineNumber:215}}): +_react2.default.createElement(_Radio.Radio,{selected:true,__source:{fileName:_jsxFileName,lineNumber:219}}): + +_react2.default.createElement(_Radio.Radio,{selected:false,__source:{fileName:_jsxFileName,lineNumber:221}}))));},__source:{fileName:_jsxFileName,lineNumber:198}}))))); -_react2.default.createElement(_Radio.Radio,{selected:false,__source:{fileName:_jsxFileName,lineNumber:217}})));},__source:{fileName:_jsxFileName,lineNumber:195}}))))); @@ -228,7 +233,7 @@ _react2.default.createElement(_Radio.Radio,{selected:false,__source:{fileName:_j PickerNB.Item=(0,_createReactClass2.default)({displayName:"Item", render:function render(){ -return _react2.default.createElement(_reactNative.Picker.Item,_extends({},this.props(),{__source:{fileName:_jsxFileName,lineNumber:231}})); +return _react2.default.createElement(_reactNative.Picker.Item,_extends({},this.props(),{__source:{fileName:_jsxFileName,lineNumber:236}})); }}); diff --git a/dist/src/basic/Picker.ios.js.map b/dist/src/basic/Picker.ios.js.map index 741b79f34..51084523f 100644 --- a/dist/src/basic/Picker.ios.js.map +++ b/dist/src/basic/Picker.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/Picker.ios.js"],"names":["PickerNB","props","state","modalVisible","currentLabel","getLabel","dataSource","getChildren","children","nextProps","nextLabel","currentDS","nextDS","setState","picker","pickerItem","visible","defaultProps","style","getInitialStyle","itemStyle","item","_","find","child","value","selectedValue","get","Array","isArray","concat","React","cloneElement","iosIcon","fontSize","lineHeight","onPress","enabled","undefined","_setModalVisible","text","placeholder","renderButton","selectedItem","getSelectedItem","textStyle","note","placeholderStyle","renderIcon","renderHeader","headerStyle","shadowOffset","shadowColor","shadowRadius","shadowOpacity","headerBackButtonStyle","headerBackButtonTextStyle","headerBackButtonText","headerTitleStyle","iosHeader","_root","c","supportedOrientations","modalStyle","index","String","onValueChange","current","label","itemTextStyle","Component","Item","render","propTypes","ViewPropTypes","PropTypes","func","StyledPickerNB","mapPropsToStyleNames"],"mappings":"61BAAA,4B;AACA,qC;AACA,oD;AACA;AACA,8B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mD;;AAEA,mE;;AAEMA,Q;AACJ,kBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,aAAc,KADH;AAEXC,aAAc,MAAKC,QAAL,CAAcJ,KAAd,CAFH;AAGXK,WAAY,MAAKC,WAAL,CAAiBN,MAAMO,QAAvB,CAHD,CAAb,CAFiB;;AAOlB,C;;AAEyBC,S,CAAW;AACnC,GAAML,cAAe,KAAKF,KAAL,CAAWE,YAAhC;AACA,GAAMM,WAAY,KAAKL,QAAL,CAAcI,SAAd,CAAlB;AACA,GAAME,WAAY,KAAKT,KAAL,CAAWI,UAA7B;AACA,GAAMM,QAAS,KAAKL,WAAL,CAAiBE,UAAUD,QAA3B,CAAf;;AAEA,GAAIJ,eAAiBM,SAArB,CAAgC;AAC9B,KAAKG,QAAL,CAAc;AACZT,aAAcM,SADF,CAAd;;AAGD;AACD,GAAIC,YAAcC,MAAlB,CAA0B;AACxB,KAAKC,QAAL,CAAc;AACZP,WAAYM,MADA,CAAd;;AAGD;AACF,C;;AAEiB;AAChB,MAAO;AACLE,OAAQ,EADH;;;AAILC,WAAY,EAJP,CAAP;;AAMD,C;AACgBC,O,CAAS;AACxB,KAAKH,QAAL,CAAc,CAAEV,aAAca,OAAhB,CAAd;AACD,C;;AAEkB;AACjB,GAAMC,cAAe;AACnBC,MAAO,KAAKC,eAAL,GA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AACA,OAAKtC,KAAL,CAAWiE,aAAX,CAAyB7C,KAAKpB,KAAL,CAAWwB,KAApC;AACA,OAAKZ,QAAL,CAAc,CAAEsD,QAAS9C,KAAKpB,KAAL,CAAWmE,KAAtB,CAAd;AACD,CARuB;;AAUxB,8BAAC,UAAD;AACE,8BAAC,UAAD,EAAM,MAAO,OAAKnE,KAAL,CAAWoE,aAAxB;AACGhD,KAAKpB,KAAL,CAAWmE,KADd,CADF,CAVwB;;;AAexB,8BAAC,YAAD;AACG/C,KAAKpB,KAAL,CAAWwB,KAAX,GAAqB,OAAKxB,KAAL,CAAWyB,aAAhC;AACC,8BAAC,YAAD,EAAO,aAAP,kDADD;;AAGG,8BAAC,YAAD,EAAO,SAAU,KAAjB,kDAJN,CAfwB,CAAd,EAHd,kDAFF,CATF,CAFF,CADF;;;;;;;;;AA6CD,C,sBA3MoB4C,gB;;;AA8MvBtE,SAASuE,IAAT,CAAgB,+BAAiB;AAC/BC,MAD+B,kBACtB;AACP,MAAO,+BAAC,mBAAD,CAAQ,IAAR,aAAiB,KAAKvE,KAAL,EAAjB,oDAAP;AACD,CAH8B,CAAjB,CAAhB;;;AAMAD,SAASyE,SAAT;AACKC,0BADL;AAEEhC,aAAciC,oBAAUC,IAF1B;;;AAKA,GAAMC,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;AAGrBC,8BAHqB;AAIrB9E,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlB6E,c","file":"Picker.ios.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport createReactClass from \"create-react-class\";\nimport { Picker, Modal, View, ViewPropTypes, FlatList } from \"react-native\";\nimport _ from \"lodash\";\nimport { Text } from \"./Text\";\nimport { List } from \"./List\";\nimport { IconNB as Icon } from \"./IconNB\";\nimport { Radio } from \"./Radio\";\nimport { Container } from \"./Container\";\nimport { ListItem } from \"./ListItem\";\nimport { Button } from \"./Button\";\nimport { Header } from \"./Header\";\nimport { Title } from \"./Title\";\nimport { Left } from \"./Left\";\nimport { Right } from \"./Right\";\nimport { Body } from \"./Body\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport computeProps from \"../utils/computeProps\";\n\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\n\nclass PickerNB extends Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n currentLabel: this.getLabel(props),\n dataSource: this.getChildren(props.children)\n };\n }\n\n componentWillReceiveProps(nextProps) {\n const currentLabel = this.state.currentLabel;\n const nextLabel = this.getLabel(nextProps);\n const currentDS = this.state.dataSource;\n const nextDS = this.getChildren(nextProps.children);\n\n if (currentLabel !== nextLabel) {\n this.setState({\n currentLabel: nextLabel\n });\n }\n if (currentDS !== nextDS) {\n this.setState({\n dataSource: nextDS\n });\n }\n }\n\n getInitialStyle() {\n return {\n picker: {\n // alignItems: 'flex-end'\n },\n pickerItem: {}\n };\n }\n _setModalVisible(visible) {\n this.setState({ modalVisible: visible });\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().picker,\n itemStyle: this.getInitialStyle().pickerItem\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n getLabel(props) {\n let children = this.getChildren(props.children);\n const item = _.find(\n children,\n child => child.props.value === props.selectedValue\n );\n return _.get(item, \"props.label\");\n }\n\n getSelectedItem() {\n return _.find(\n this.props.children,\n child => child.props.value === this.props.selectedValue\n );\n }\n\n getChildren(children) {\n if (children && !Array.isArray(children)) {\n return [].concat(children)\n }\n return children;\n }\n\n renderIcon() {\n return React.cloneElement(this.props.iosIcon, {\n style: [{\n fontSize: 22,\n lineHeight: 26\n }, { ...this.props.iosIcon.props.style }]\n });\n }\n\n renderButton() {\n const onPress = () => {\n if (this.props.enabled !== undefined && !this.props.enabled)\n return;\n this._setModalVisible(true);\n };\n const text = this.state.currentLabel\n ? this.state.currentLabel\n : this.props.placeholder;\n if (this.props.renderButton) {\n return this.props.renderButton({\n onPress,\n text,\n picker: this,\n selectedItem: this.getSelectedItem()\n });\n }\n return (\n \n {this.state.currentLabel ? (\n \n {this.state.currentLabel}\n \n ) : (\n \n {this.props.placeholder}\n \n )}\n {this.props.iosIcon === undefined ? null : this.renderIcon()}\n \n );\n }\n\n renderHeader() {\n return this.props.renderHeader ? (\n this.props.renderHeader(() => this._setModalVisible(false))\n ) : (\n
\n \n {\n this._setModalVisible(false);\n }}\n >\n \n {this.props.headerBackButtonText || \"Back\"}\n \n \n \n \n \n {this.props.iosHeader || \"Select One\"}\n \n \n \n
\n );\n }\n\n render() {\n return (\n (this._root = c)}>\n {this.renderButton()}\n {\n this._setModalVisible(false);\n }}\n >\n \n {this.renderHeader()}\n String(index)}\n renderItem={({ item }) => {\n this._setModalVisible(false);\n this.props.onValueChange(item.props.value);\n this.setState({ current: item.props.label });\n }}\n >\n \n \n {item.props.label}\n \n \n \n {item.props.value === this.props.selectedValue ? (\n \n ) : (\n \n )}\n \n }\n />\n \n \n \n );\n }\n}\n\nPickerNB.Item = createReactClass({\n render() {\n return ;\n }\n});\n\nPickerNB.propTypes = {\n ...ViewPropTypes,\n renderButton: PropTypes.func\n};\n\nconst StyledPickerNB = connectStyle(\n \"NativeBase.PickerNB\",\n {},\n mapPropsToStyleNames\n)(PickerNB);\n\nexport { StyledPickerNB as PickerNB };\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Picker.ios.js"],"names":["PickerNB","props","state","modalVisible","currentLabel","getLabel","dataSource","getChildren","children","nextProps","nextLabel","currentDS","nextDS","setState","picker","pickerItem","visible","defaultProps","style","getInitialStyle","itemStyle","item","_","find","child","value","selectedValue","get","Array","isArray","concat","React","cloneElement","iosIcon","fontSize","lineHeight","onPress","enabled","undefined","_setModalVisible","text","placeholder","renderButton","selectedItem","getSelectedItem","textStyle","note","placeholderStyle","renderIcon","renderHeader","headerStyle","shadowOffset","shadowColor","shadowRadius","shadowOpacity","marginLeft","headerBackButtonStyle","headerBackButtonTextStyle","headerBackButtonText","headerTitleStyle","iosHeader","_root","c","supportedOrientations","modalStyle","index","String","onValueChange","current","label","itemTextStyle","Component","Item","render","propTypes","ViewPropTypes","PropTypes","func","StyledPickerNB","mapPropsToStyleNames"],"mappings":"61BAAA,4B;AACA,qC;AACA,oD;AACA;AACA,8B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mD;;AAEA,mE;;AAEMA,Q;AACJ,kBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,aAAc,KADH;AAEXC,aAAc,MAAKC,QAAL,CAAcJ,KAAd,CAFH;AAGXK,WAAY,MAAKC,WAAL,CAAiBN,MAAMO,QAAvB,CAHD,CAAb,CAFiB;;AAOlB,C;;AAEyBC,S,CAAW;AACnC,GAAML,cAAe,KAAKF,KAAL,CAAWE,YAAhC;AACA,GAAMM,WAAY,KAAKL,QAAL,CAAcI,SAAd,CAAlB;AACA,GAAME,WAAY,KAAKT,KAAL,CAAWI,UAA7B;AACA,GAAMM,QAAS,KAAKL,WAAL,CAAiBE,UAAUD,QAA3B,CAAf;;AAEA,GAAIJ,eAAiBM,SAArB,CAAgC;AAC9B,KAAKG,QAAL,CAAc;AACZT,aAAcM,SADF,CAAd;;AAGD;AACD,GAAIC,YAAcC,MAAlB,CAA0B;AACxB,KAAKC,QAAL,CAAc;AACZP,WAAYM,MADA,CAAd;;AAGD;AACF,C;;AAEiB;AAChB,MAAO;AACLE,OAAQ,EADH;;;AAILC,WAAY,EAJP,CAAP;;AAMD,C;AACgBC,O,CAAS;AACxB,KAAKH,QAAL,CAAc,CAAEV,aAAca,OAAhB,CAAd;AACD,C;;AAEkB;AACjB,GAAMC,cAAe;AACnBC,MAAO,KAAKC,eAAL,GAAuBL,MADX;AAEnBM,UAAW,KAAKD,eAAL,GAAuBJ,UAFf,CAArB;;;AAKA,MAAO,2BAAa,KAAKd,KAAlB,CAAyBgB,YAAzB,CAAP;AACD,C;;AAEQhB,K,CAAO;AACd,GAAIO,UAAW,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CAAd;AACD,CARH;;AAUE,8BAAC,UAAD;AACE,8BAAC,UAAD,EAAM,MAAO,OAAKpE,KAAL,CAAWqE,aAAxB;AACGjD,KAAKpB,KAAL,CAAWoE,KADd,CADF,CAVF;;;AAeE,8BAAC,YAAD;AACGhD,KAAKpB,KAAL,CAAWwB,KAAX,GAAqB,OAAKxB,KAAL,CAAWyB,aAAhC;AACC,8BAAC,YAAD,EAAO,aAAP,kDADD;;AAGC,8BAAC,YAAD,EAAO,SAAU,KAAjB,kDAJJ,CAfF,CADU,GAHd,kDAFF,CATF,CAFF,CADF;;;;;;;;;;AA+CD,C,sBAhNoB6C,gB;;;AAmNvBvE,SAASwE,IAAT,CAAgB,+BAAiB;AAC/BC,MAD+B,kBACtB;AACP,MAAO,+BAAC,mBAAD,CAAQ,IAAR,aAAiB,KAAKxE,KAAL,EAAjB,oDAAP;AACD,CAH8B,CAAjB,CAAhB;;;AAMAD,SAAS0E,SAAT;AACKC,0BADL;AAEEjC,aAAckC,oBAAUC,IAF1B;;;AAKA,GAAMC,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;AAGrBC,8BAHqB;AAIrB/E,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlB8E,c","file":"Picker.ios.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport createReactClass from \"create-react-class\";\nimport { Picker, Modal, View, ViewPropTypes, FlatList } from \"react-native\";\nimport _ from \"lodash\";\nimport { Text } from \"./Text\";\nimport { List } from \"./List\";\nimport { IconNB as Icon } from \"./IconNB\";\nimport { Radio } from \"./Radio\";\nimport { Container } from \"./Container\";\nimport { ListItem } from \"./ListItem\";\nimport { Button } from \"./Button\";\nimport { Header } from \"./Header\";\nimport { Title } from \"./Title\";\nimport { Left } from \"./Left\";\nimport { Right } from \"./Right\";\nimport { Body } from \"./Body\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport computeProps from \"../utils/computeProps\";\n\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\n\nclass PickerNB extends Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n currentLabel: this.getLabel(props),\n dataSource: this.getChildren(props.children)\n };\n }\n\n componentWillReceiveProps(nextProps) {\n const currentLabel = this.state.currentLabel;\n const nextLabel = this.getLabel(nextProps);\n const currentDS = this.state.dataSource;\n const nextDS = this.getChildren(nextProps.children);\n\n if (currentLabel !== nextLabel) {\n this.setState({\n currentLabel: nextLabel\n });\n }\n if (currentDS !== nextDS) {\n this.setState({\n dataSource: nextDS\n });\n }\n }\n\n getInitialStyle() {\n return {\n picker: {\n // alignItems: 'flex-end'\n },\n pickerItem: {}\n };\n }\n _setModalVisible(visible) {\n this.setState({ modalVisible: visible });\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().picker,\n itemStyle: this.getInitialStyle().pickerItem\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n getLabel(props) {\n let children = this.getChildren(props.children);\n const item = _.find(\n children,\n child => child.props.value === props.selectedValue\n );\n return _.get(item, \"props.label\");\n }\n\n getSelectedItem() {\n return _.find(\n this.props.children,\n child => child.props.value === this.props.selectedValue\n );\n }\n\n getChildren(children) {\n if (children && !Array.isArray(children)) {\n return [].concat(children);\n }\n return children;\n }\n\n renderIcon() {\n return React.cloneElement(this.props.iosIcon, {\n style: [\n {\n fontSize: 22,\n lineHeight: 26\n },\n { ...this.props.iosIcon.props.style }\n ]\n });\n }\n\n renderButton() {\n const onPress = () => {\n if (this.props.enabled !== undefined && !this.props.enabled) return;\n this._setModalVisible(true);\n };\n const text = this.state.currentLabel\n ? this.state.currentLabel\n : this.props.placeholder;\n if (this.props.renderButton) {\n return this.props.renderButton({\n onPress,\n text,\n picker: this,\n selectedItem: this.getSelectedItem()\n });\n }\n return (\n \n {this.state.currentLabel ? (\n \n {this.state.currentLabel}\n \n ) : (\n \n {this.props.placeholder}\n \n )}\n {this.props.iosIcon === undefined ? null : this.renderIcon()}\n \n );\n }\n\n renderHeader() {\n return this.props.renderHeader ? (\n this.props.renderHeader(() => this._setModalVisible(false))\n ) : (\n
\n \n {\n this._setModalVisible(false);\n }}\n >\n \n {this.props.headerBackButtonText || \"Back\"}\n \n \n \n \n \n {this.props.iosHeader || \"Select One\"}\n \n \n \n
\n );\n }\n\n render() {\n return (\n (this._root = c)}>\n {this.renderButton()}\n {\n this._setModalVisible(false);\n }}\n >\n \n {this.renderHeader()}\n String(index)}\n renderItem={({ item }) => (\n {\n this._setModalVisible(false);\n this.props.onValueChange(item.props.value);\n this.setState({ current: item.props.label });\n }}\n >\n \n \n {item.props.label}\n \n \n \n {item.props.value === this.props.selectedValue ? (\n \n ) : (\n \n )}\n \n \n )}\n />\n \n \n \n );\n }\n}\n\nPickerNB.Item = createReactClass({\n render() {\n return ;\n }\n});\n\nPickerNB.propTypes = {\n ...ViewPropTypes,\n renderButton: PropTypes.func\n};\n\nconst StyledPickerNB = connectStyle(\n \"NativeBase.PickerNB\",\n {},\n mapPropsToStyleNames\n)(PickerNB);\n\nexport { StyledPickerNB as PickerNB };\n"]} \ No newline at end of file diff --git a/src/basic/Picker.ios.js b/src/basic/Picker.ios.js index 2b1e83a4a..f666d439c 100644 --- a/src/basic/Picker.ios.js +++ b/src/basic/Picker.ios.js @@ -87,24 +87,26 @@ class PickerNB extends Component { getChildren(children) { if (children && !Array.isArray(children)) { - return [].concat(children) + return [].concat(children); } return children; } renderIcon() { return React.cloneElement(this.props.iosIcon, { - style: [{ - fontSize: 22, - lineHeight: 26 - }, { ...this.props.iosIcon.props.style }] + style: [ + { + fontSize: 22, + lineHeight: 26 + }, + { ...this.props.iosIcon.props.style } + ] }); } renderButton() { const onPress = () => { - if (this.props.enabled !== undefined && !this.props.enabled) - return; + if (this.props.enabled !== undefined && !this.props.enabled) return; this._setModalVisible(true); }; const text = this.state.currentLabel @@ -131,13 +133,13 @@ class PickerNB extends Component { {this.state.currentLabel} ) : ( - - {this.props.placeholder} - - )} + + {this.props.placeholder} + + )} {this.props.iosIcon === undefined ? null : this.renderIcon()} ); @@ -147,34 +149,35 @@ class PickerNB extends Component { return this.props.renderHeader ? ( this.props.renderHeader(() => this._setModalVisible(false)) ) : ( -
- - - - - - {this.props.iosHeader || "Select One"} - - - -
- ); +
+ + + + + + {this.props.iosHeader || "Select One"} + + + +
+ ); } render() { @@ -195,33 +198,35 @@ class PickerNB extends Component { String(index)} - renderItem={({ item }) => { - this._setModalVisible(false); - this.props.onValueChange(item.props.value); - this.setState({ current: item.props.label }); - }} - > - - - {item.props.label} - - - - {item.props.value === this.props.selectedValue ? ( - - ) : ( + renderItem={({ item }) => ( + { + this._setModalVisible(false); + this.props.onValueChange(item.props.value); + this.setState({ current: item.props.label }); + }} + > + + + {item.props.label} + + + + {item.props.value === this.props.selectedValue ? ( + + ) : ( )} - - } + + + )} /> -
+
); } } From 05d75c41127601e86a424be16c48ce4646578ca6 Mon Sep 17 00:00:00 2001 From: akhil-geekyants Date: Thu, 21 Jun 2018 12:03:22 +0530 Subject: [PATCH 08/12] Added expanded parameter to renderHeader callback method. --- src/basic/Accordion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/Accordion.js b/src/basic/Accordion.js index 5fcbdef96..dea29c9eb 100644 --- a/src/basic/Accordion.js +++ b/src/basic/Accordion.js @@ -100,7 +100,7 @@ class AccordionItem extends React.Component { > {this.props.renderHeader ? ( - this.props.renderHeader(this.props.item.title) + this.props.renderHeader(this.props.item.title, this.props.expanded) ) : ( Date: Thu, 21 Jun 2018 13:40:41 +0530 Subject: [PATCH 09/12] ActionSheet: Fixed as per design guidelines --- dist/src/basic/Actionsheet.js | 46 +++++++++++++------- dist/src/basic/Actionsheet.js.map | 2 +- src/basic/Actionsheet.js | 72 ++++++++++++++++++------------- 3 files changed, 74 insertions(+), 46 deletions(-) diff --git a/dist/src/basic/Actionsheet.js b/dist/src/basic/Actionsheet.js index afb06b723..062ed07ac 100644 --- a/dist/src/basic/Actionsheet.js +++ b/dist/src/basic/Actionsheet.js @@ -9,6 +9,7 @@ var _reactNative=require("react-native"); + var _nativeBaseShoutemTheme=require("native-base-shoutem-theme"); var _Text=require("./Text"); var _Button=require("./Button"); @@ -70,7 +71,7 @@ visible:this.state.modalVisible, onRequestClose:function onRequestClose(){ _this2.state.callback(_this2.state.cancelButtonIndex); _this2.setState({modalVisible:false}); -},__source:{fileName:_jsxFileName,lineNumber:66}}, +},__source:{fileName:_jsxFileName,lineNumber:67}}, _react2.default.createElement(_reactNative.TouchableOpacity,{ activeOpacity:1, @@ -81,22 +82,28 @@ _this2.setState({modalVisible:false}); style:{ backgroundColor:"rgba(0,0,0,0.4)", flex:1, -justifyContent:"flex-end"},__source:{fileName:_jsxFileName,lineNumber:75}}, +justifyContent:"flex-end"},__source:{fileName:_jsxFileName,lineNumber:76}}, _react2.default.createElement(_reactNative.TouchableOpacity,{ activeOpacity:1, style:{ backgroundColor:"#fff", +minHeight:56, height:this.state.length*80, -maxHeight:"100%", +maxHeight:_reactNative.Dimensions.get("window").height/2, padding:15, -elevation:4},__source:{fileName:_jsxFileName,lineNumber:87}}, +elevation:4},__source:{fileName:_jsxFileName,lineNumber:88}}, -this.state.title?_react2.default.createElement(_Text.Text,{style:{color:"#757575"},__source:{fileName:_jsxFileName,lineNumber:97}},this.state.title):null, +this.state.title? +_react2.default.createElement(_Text.Text,{style:{color:"#757575"},__source:{fileName:_jsxFileName,lineNumber:100}},this.state.title): +null, _react2.default.createElement(_reactNative.FlatList,{ -style:{marginHorizontal:-15,marginTop:this.state.title?15:0}, +style:{ +marginHorizontal:-15, +marginTop:this.state.title?15:0}, + data:this.state.items, keyExtractor:function keyExtractor(item,index){return String(index);}, renderItem:function renderItem(_ref){var index=_ref.index,item=_ref.item; @@ -106,8 +113,9 @@ onPress:function onPress(){ _this2.state.callback(parseInt(index)); _this2.setState({modalVisible:false}); }, -style:{borderColor:"transparent"},__source:{fileName:_jsxFileName,lineNumber:104}}, -_react2.default.createElement(_Text.Text,{__source:{fileName:_jsxFileName,lineNumber:110}},item)): +style:{borderColor:"transparent",marginLeft:14},__source:{fileName:_jsxFileName,lineNumber:111}}, + +_react2.default.createElement(_Text.Text,{__source:{fileName:_jsxFileName,lineNumber:118}},item)): _react2.default.createElement(_ListItem.ListItem,{ @@ -115,24 +123,30 @@ onPress:function onPress(){ _this2.state.callback(parseInt(index)); _this2.setState({modalVisible:false}); }, -style:{borderColor:"transparent"}, -icon:true,__source:{fileName:_jsxFileName,lineNumber:113}}, +style:{ +borderColor:"transparent", +marginLeft:14, +height:50}, + +icon:true,__source:{fileName:_jsxFileName,lineNumber:121}}, -_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:121}}, +_react2.default.createElement(_Left.Left,{__source:{fileName:_jsxFileName,lineNumber:133}}, _react2.default.createElement(_Icon.Icon,{ name:item.icon, style:{ -color:item.iconColor?item.iconColor:undefined},__source:{fileName:_jsxFileName,lineNumber:122}})), +color:item.iconColor?item.iconColor:undefined},__source:{fileName:_jsxFileName,lineNumber:134}})), + +_react2.default.createElement(_Body.Body,{ +style:{borderColor:"transparent",paddingLeft:7},__source:{fileName:_jsxFileName,lineNumber:141}}, -_react2.default.createElement(_Body.Body,{style:{borderColor:"transparent"},__source:{fileName:_jsxFileName,lineNumber:129}}, -_react2.default.createElement(_Text.Text,{__source:{fileName:_jsxFileName,lineNumber:130}},item.text)), +_react2.default.createElement(_Text.Text,{__source:{fileName:_jsxFileName,lineNumber:144}},item.text)), -_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:132}})); +_react2.default.createElement(_Right.Right,{__source:{fileName:_jsxFileName,lineNumber:146}})); -},__source:{fileName:_jsxFileName,lineNumber:98}}))))); +},__source:{fileName:_jsxFileName,lineNumber:102}}))))); diff --git a/dist/src/basic/Actionsheet.js.map b/dist/src/basic/Actionsheet.js.map index 07a01d25d..18e6a889e 100644 --- a/dist/src/basic/Actionsheet.js.map +++ b/dist/src/basic/Actionsheet.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/Actionsheet.js"],"names":["ActionSheetContainer","props","state","modalVisible","items","config","callback","Platform","OS","options","filtered","map","item","text","ActionSheetIOS","showActionSheetWithOptions","setState","title","message","destructiveButtonIndex","cancelButtonIndex","autoHide","duration","console","warn","backgroundColor","flex","justifyContent","height","length","maxHeight","padding","elevation","color","marginHorizontal","marginTop","index","String","parseInt","borderColor","icon","iconColor","undefined","actionsheetInstance","_root","showActionSheet","Component","propTypes","ViewPropTypes","style","PropTypes","oneOfType","object","number","array","StyledActionSheetContainer","mapPropsToStyleNames"],"mappings":"02BAAA,4B;AACA,qC;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mE;;AAEMA,oB;AACJ,8BAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,aAAc,KADH;AAEXC,MAAO,EAFI,CAAb,CAFiB;;AAMlB,C;;;;;AAKeC,M,CAAQC,Q,CAAU;AAChC,GAAIC,sBAASC,EAAT,GAAgB,KAApB,CAA2B;AACzB,GAAI,MAAOH,QAAOI,OAAP,CAAe,CAAf,CAAP,EAA4B,QAAhC,CAA0C;AACxC,GAAIA,SAAUJ,OAAOI,OAArB;AACA,GAAIC,UAAWD,QAAQE,GAAR,CAAY,cAAQ;AACjC,MAAOC,MAAKC,IAAZ;AACD,CAFc,CAAf;AAGAR,OAAOI,OAAP,CAAiBC,QAAjB;AACAI,4BAAeC,0BAAf,CAA0CV,MAA1C,CAAkDC,QAAlD;AACD,CAPD,IAOO;AACLQ,4BAAeC,0BAAf,CAA0CV,MAA1C,CAAkDC,QAAlD;AACD;AACF,CAXD,IAWO;AACL,KAAKU,QAAL,CAAc;AACZZ,MAAOC,OAAOI,OADF;AAEZQ,MAAOZ,OAAOY,KAFF;AAGZC,QAASb,OAAOa,OAHJ;AAIZC,uBAAwBd,OAAOc,sBAJnB;AAKZC,kBAAmBf,OAAOe,iBALd;AAMZjB,aAAc,IANF;AAO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AAUC,SAAV,CAAoB;AACzBD,oBAAUE,MADe;AAEzBF,oBAAUG,MAFe;AAGzBH,oBAAUI,KAHe,CAApB,CAFT;;;;AASA,GAAMC,4BAA6B;AACjC,iCADiC;AAEjC,EAFiC;AAGjCC,8BAHiC;AAIjCxD,oBAJiC,CAAnC,C;;AAMuCA,oB,CAA9BuD,0B","file":"Actionsheet.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport {\n View,\n Modal,\n Platform,\n ActionSheetIOS,\n TouchableOpacity,\n ViewPropTypes,\n FlatList\n} from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport { Text } from \"./Text\";\nimport { Button } from \"./Button\";\nimport { ViewNB } from \"./View\";\nimport { Icon } from \"./Icon\";\nimport { Left } from \"./Left\";\nimport { Right } from \"./Right\";\nimport { Body } from \"./Body\";\nimport { ListItem } from \"./ListItem\";\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\n\nclass ActionSheetContainer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n items: [],\n };\n }\n static actionsheetInstance;\n static show(config, callback) {\n this.actionsheetInstance._root.showActionSheet(config, callback);\n }\n showActionSheet(config, callback) {\n if (Platform.OS === \"ios\") {\n if (typeof config.options[0] == \"object\") {\n let options = config.options;\n let filtered = options.map(item => {\n return item.text;\n });\n config.options = filtered;\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n } else {\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n }\n } else {\n this.setState({\n items: config.options,\n title: config.title,\n message: config.message,\n destructiveButtonIndex: config.destructiveButtonIndex,\n cancelButtonIndex: config.cancelButtonIndex,\n modalVisible: true,\n callback: callback,\n });\n }\n }\n componentDidMount() {\n if (!this.props.autoHide && this.props.duration) {\n console.warn(`It's not recommended to set autoHide false with duration`);\n }\n }\n render() {\n return (\n {\n this.state.callback(this.state.cancelButtonIndex);\n this.setState({ modalVisible: false });\n }}\n >\n {\n this.state.callback(this.state.cancelButtonIndex);\n this.setState({ modalVisible: false });\n }}\n style={{\n backgroundColor: \"rgba(0,0,0,0.4)\",\n flex: 1,\n justifyContent: \"flex-end\"\n }}\n >\n \n {this.state.title ? {this.state.title} : null}\n String(index)}\n renderItem={({ index, item }) => {\n return typeof this.state.items[0] === \"string\" ? (\n {\n this.state.callback(parseInt(index));\n this.setState({ modalVisible: false });\n }}\n style={{ borderColor: \"transparent\" }}>\n {item}\n \n ) : (\n {\n this.state.callback(parseInt(index));\n this.setState({ modalVisible: false });\n }}\n style={{ borderColor: \"transparent\" }}\n icon\n >\n \n \n \n \n {item.text}\n \n \n \n )\n }}\n />\n \n \n \n );\n }\n}\n\nActionSheetContainer.propTypes = {\n ...ViewPropTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ])\n};\n\nconst StyledActionSheetContainer = connectStyle(\n \"NativeBase.ActionSheetContainer\",\n {},\n mapPropsToStyleNames\n)(ActionSheetContainer);\n\nexport { StyledActionSheetContainer as ActionSheetContainer };"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Actionsheet.js"],"names":["ActionSheetContainer","props","state","modalVisible","items","config","callback","Platform","OS","options","filtered","map","item","text","ActionSheetIOS","showActionSheetWithOptions","setState","title","message","destructiveButtonIndex","cancelButtonIndex","autoHide","duration","console","warn","backgroundColor","flex","justifyContent","minHeight","height","length","maxHeight","Dimensions","get","padding","elevation","color","marginHorizontal","marginTop","index","String","parseInt","borderColor","marginLeft","icon","iconColor","undefined","paddingLeft","actionsheetInstance","_root","showActionSheet","Component","propTypes","ViewPropTypes","style","PropTypes","oneOfType","object","number","array","StyledActionSheetContainer","mapPropsToStyleNames"],"mappings":"02BAAA,4B;AACA,qC;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mE;;AAEMA,oB;AACJ,8BAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa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B,IAAP,CAPF,CADK;;;AAWL,8BAAC,kBAAD;AACE,QAAS,kBAAM;AACb,OAAKV,KAAL,CAAWI,QAAX,CAAoBmC,SAASF,KAAT,CAApB;AACA,OAAKvB,QAAL,CAAc,CAAEb,aAAc,KAAhB,CAAd;AACD,CAJH;AAKE,MAAO;AACLuC,YAAa,aADR;AAELC,WAAY,EAFP;AAGLd,OAAQ,EAHH,CALT;;AAUE,SAVF;;AAYE,8BAAC,UAAD;AACE,8BAAC,UAAD;AACE,KAAMjB,KAAKgC,IADb;AAEE,MAAO;AACLR,MAAOxB,KAAKiC,SAAL,CAAiBjC,KAAKiC,SAAtB,CAAkCC,SADpC,CAFT,kDADF,CAZF;;;;AAoBE,8BAAC,UAAD;AACE,MAAO,CAAEJ,YAAa,aAAf,CAA8BK,YAAa,CAA3C,CADT;;AAGE,8BAAC,UAAD,mDAAOnC,KAAKC,IAAZ,CAHF,CApBF;;AAyBE,8BAAC,YAAD,mDAzBF,CAXF;;;AAuCD,CA/CH,kDAdF,CAZF,CATF,CADF;;;;;;AAyFD,C,oCA1HWR,M,CAAQC,Q,CAAU,CAC5B,KAAK0C,mBAAL,CAAyBC,KAAzB,CAA+BC,eAA/B,CAA+C7C,MAA/C,CAAuDC,QAAvD,EACD,C,kCAXgC6C,gB;;;AAsInCnD,qBAAqBoD,SAArB;AACKC,0BADL;AAEEC,MAAOC,oBAAUC,SAAV,CAAoB;AACzBD,oBAAUE,MADe;AAEzBF,oBAAUG,MAFe;AAGzBH,oBAAUI,KAHe,CAApB,CAFT;;;;AASA,GAAMC,4BAA6B;AACjC,iCADiC;AAEjC,EAFiC;AAGjCC,8BAHiC;AAIjC7D,oBAJiC,CAAnC,C;;AAMuCA,oB,CAA9B4D,0B","file":"Actionsheet.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport {\n View,\n Modal,\n Platform,\n ActionSheetIOS,\n TouchableOpacity,\n ViewPropTypes,\n FlatList,\n Dimensions\n} from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport { Text } from \"./Text\";\nimport { Button } from \"./Button\";\nimport { ViewNB } from \"./View\";\nimport { Icon } from \"./Icon\";\nimport { Left } from \"./Left\";\nimport { Right } from \"./Right\";\nimport { Body } from \"./Body\";\nimport { ListItem } from \"./ListItem\";\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\n\nclass ActionSheetContainer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n items: []\n };\n }\n static actionsheetInstance;\n static show(config, callback) {\n this.actionsheetInstance._root.showActionSheet(config, callback);\n }\n showActionSheet(config, callback) {\n if (Platform.OS === \"ios\") {\n if (typeof config.options[0] == \"object\") {\n let options = config.options;\n let filtered = options.map(item => {\n return item.text;\n });\n config.options = filtered;\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n } else {\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n }\n } else {\n this.setState({\n items: config.options,\n title: config.title,\n message: config.message,\n destructiveButtonIndex: config.destructiveButtonIndex,\n cancelButtonIndex: config.cancelButtonIndex,\n modalVisible: true,\n callback: callback\n });\n }\n }\n componentDidMount() {\n if (!this.props.autoHide && this.props.duration) {\n console.warn(`It's not recommended to set autoHide false with duration`);\n }\n }\n render() {\n return (\n {\n this.state.callback(this.state.cancelButtonIndex);\n this.setState({ modalVisible: false });\n }}\n >\n {\n this.state.callback(this.state.cancelButtonIndex);\n this.setState({ modalVisible: false });\n }}\n style={{\n backgroundColor: \"rgba(0,0,0,0.4)\",\n flex: 1,\n justifyContent: \"flex-end\"\n }}\n >\n \n {this.state.title ? (\n {this.state.title}\n ) : null}\n String(index)}\n renderItem={({ index, item }) => {\n return typeof this.state.items[0] === \"string\" ? (\n {\n this.state.callback(parseInt(index));\n this.setState({ modalVisible: false });\n }}\n style={{ borderColor: \"transparent\", marginLeft: 14 }}\n >\n {item}\n \n ) : (\n {\n this.state.callback(parseInt(index));\n this.setState({ modalVisible: false });\n }}\n style={{\n borderColor: \"transparent\",\n marginLeft: 14,\n height: 50\n }}\n icon\n >\n \n \n \n \n {item.text}\n \n \n \n );\n }}\n />\n \n \n \n );\n }\n}\n\nActionSheetContainer.propTypes = {\n ...ViewPropTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ])\n};\n\nconst StyledActionSheetContainer = connectStyle(\n \"NativeBase.ActionSheetContainer\",\n {},\n mapPropsToStyleNames\n)(ActionSheetContainer);\n\nexport { StyledActionSheetContainer as ActionSheetContainer };\n"]} \ No newline at end of file diff --git a/src/basic/Actionsheet.js b/src/basic/Actionsheet.js index 718240c2e..bcfacb5e2 100644 --- a/src/basic/Actionsheet.js +++ b/src/basic/Actionsheet.js @@ -7,7 +7,8 @@ import { ActionSheetIOS, TouchableOpacity, ViewPropTypes, - FlatList + FlatList, + Dimensions } from "react-native"; import { connectStyle } from "native-base-shoutem-theme"; import { Text } from "./Text"; @@ -25,7 +26,7 @@ class ActionSheetContainer extends Component { super(props); this.state = { modalVisible: false, - items: [], + items: [] }; } static actionsheetInstance; @@ -52,7 +53,7 @@ class ActionSheetContainer extends Component { destructiveButtonIndex: config.destructiveButtonIndex, cancelButtonIndex: config.cancelButtonIndex, modalVisible: true, - callback: callback, + callback: callback }); } } @@ -88,15 +89,21 @@ class ActionSheetContainer extends Component { activeOpacity={1} style={{ backgroundColor: "#fff", + minHeight: 56, height: this.state.length * 80, - maxHeight: "100%", + maxHeight: Dimensions.get("window").height / 2, padding: 15, elevation: 4 }} > - {this.state.title ? {this.state.title} : null} + {this.state.title ? ( + {this.state.title} + ) : null} String(index)} renderItem={({ index, item }) => { @@ -106,32 +113,39 @@ class ActionSheetContainer extends Component { this.state.callback(parseInt(index)); this.setState({ modalVisible: false }); }} - style={{ borderColor: "transparent" }}> + style={{ borderColor: "transparent", marginLeft: 14 }} + > {item} ) : ( - { - this.state.callback(parseInt(index)); - this.setState({ modalVisible: false }); - }} - style={{ borderColor: "transparent" }} - icon + { + this.state.callback(parseInt(index)); + this.setState({ modalVisible: false }); + }} + style={{ + borderColor: "transparent", + marginLeft: 14, + height: 50 + }} + icon + > + + + + - - - - - {item.text} - - - - ) + {item.text} + + + + ); }} /> @@ -156,4 +170,4 @@ const StyledActionSheetContainer = connectStyle( mapPropsToStyleNames )(ActionSheetContainer); -export { StyledActionSheetContainer as ActionSheetContainer }; \ No newline at end of file +export { StyledActionSheetContainer as ActionSheetContainer }; From 2138e2b51902d1e924c476090d1c96353e9c1be8 Mon Sep 17 00:00:00 2001 From: SupriyaKalghatgi <> Date: Thu, 21 Jun 2018 17:25:34 +0530 Subject: [PATCH 10/12] Input: Added style for Item with picker --- dist/src/theme/components/Item.js | 3 +++ dist/src/theme/components/Item.js.map | 2 +- src/theme/components/Item.js | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/src/theme/components/Item.js b/dist/src/theme/components/Item.js index 799b184b4..fd48c2caf 100644 --- a/dist/src/theme/components/Item.js +++ b/dist/src/theme/components/Item.js @@ -219,6 +219,9 @@ color:"#384850"}, color:"#384850"}}, +".picker":{ +marginLeft:0}, + borderWidth:variables.borderWidth*2, borderTopWidth:0, diff --git a/dist/src/theme/components/Item.js.map b/dist/src/theme/components/Item.js.map index a1c26b0a4..a69da9ad3 100644 --- a/dist/src/theme/components/Item.js.map +++ b/dist/src/theme/components/Item.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Item.js"],"names":["variables","variable","itemTheme","height","top","paddingTop","paddingBottom","minHeight","inputHeightBase","Platform","OS","position","left","right","flex","width","fontSize","inputFontSize","alignSelf","marginTop","deviceWidth","lineHeight","inputLineHeight","undefined","flexDirection","paddingRight","paddingLeft","color","inputColorPlaceholder","inputColor","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","backgroundColor","alignItems","marginLeft"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAA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+B,uBArBb,CAjKI;;;AAyLhB,SAAU;AACR,kBAAmB;AACjBJ,MAAO3B,UAAUgC,qBADA,CADX;;AAIR,oBAAqB;AACnBL,MAAO3B,UAAUgC,qBADE,CAJb;;AAOR,WAAY;AACVM,aAAc,EADJ;AAEVR,YAAa9B,UAAUgC,qBAFb,CAPJ;;AAWR,WAAY;AACVF,YAAa9B,UAAUgC,qBADb,CAXJ;;AAcR,aAAc;AACZC,YAAajC,UAAUiC,WAAV,CAAwB,CADzB;AAEZC,eAAgB,CAFJ;AAGZC,iBAAkB,CAHN;AAIZC,gBAAiB,CAJL;AAKZN,YAAa9B,UAAUgC,qBALX,CAdN;;AAqBRF,YAAa9B,UAAUgC,qBArBf,CAzLM;;AAgNhB,YAAa;AACX,kBAAmB;AACjBL,MAAO,SADU,CADR;;AAIX,oBAAqB;AACnBA,MAAO,SADY,CAJV,CAhNG;;;;AAyNhBM,YAAajC,UAAUiC,WAAV,CAAwB,CAzNrB;AA0NhBC,eAAgB,CA1NA;AA2NhBC,iBAAkB,CA3NF;AA4NhBC,gBAAiB,CA5ND;AA6NhBN,YAAa9B,UAAUqC,gBA7NP;AA8NhBE,gBAAiB,aA9ND;AA+NhBf,cAAe,KA/NC;AAgOhBgB,WAAY,QAhOI;AAiOhBC,WAAY,CAjOI,CAAlB;;;AAoOA,MAAOvC,UAAP;AACD,C","file":"Item.js","sourcesContent":["import { Platform } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const itemTheme = {\n \".floatingLabel\": {\n \"NativeBase.Input\": {\n height: 50,\n top: 8,\n paddingTop: 3,\n paddingBottom: 7,\n \".multiline\": {\n minHeight: variables.inputHeightBase,\n paddingTop: Platform.OS === \"ios\" ? 10 : 3,\n paddingBottom: Platform.OS === \"ios\" ? 14 : 10\n }\n },\n \"NativeBase.Label\": {\n top: 8\n },\n \"NativeBase.Icon\": {\n top: 6,\n paddingTop: 8\n },\n \"NativeBase.IconNB\": {\n top: 6,\n paddingTop: 8\n }\n },\n \".fixedLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n flex: 1,\n height: null,\n width: null,\n fontSize: variables.inputFontSize\n },\n \"NativeBase.Input\": {\n flex: 2,\n fontSize: variables.inputFontSize\n }\n },\n \".stackedLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n paddingTop: 5,\n alignSelf: \"flex-start\",\n fontSize: variables.inputFontSize - 2\n },\n \"NativeBase.Icon\": {\n marginTop: 36\n },\n \"NativeBase.Input\": {\n alignSelf: Platform.OS === \"ios\" ? \"stretch\" : \"flex-start\",\n flex: 1,\n width: Platform.OS === \"ios\" ? null : variables.deviceWidth - 25,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight - 6,\n \".secureTextEntry\": {\n fontSize: variables.inputFontSize - 4\n },\n \".multiline\": {\n paddingTop: Platform.OS === \"ios\" ? 9 : undefined,\n paddingBottom: Platform.OS === \"ios\" ? 9 : undefined,\n }\n },\n flexDirection: null,\n minHeight: variables.inputHeightBase + 15\n },\n \".inlineLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n paddingRight: 20,\n height: null,\n width: null,\n fontSize: variables.inputFontSize\n },\n \"NativeBase.Input\": {\n paddingLeft: 5,\n fontSize: variables.inputFontSize\n },\n flexDirection: \"row\"\n },\n \"NativeBase.Label\": {\n fontSize: variables.inputFontSize,\n color: variables.inputColorPlaceholder,\n paddingRight: 5\n },\n \"NativeBase.Icon\": {\n fontSize: 24,\n paddingRight: 8\n },\n \"NativeBase.IconNB\": {\n fontSize: 24,\n paddingRight: 8\n },\n \"NativeBase.Input\": {\n \".multiline\": {\n height: null\n },\n height: variables.inputHeightBase,\n color: variables.inputColor,\n flex: 1,\n top: Platform.OS === \"ios\" ? 1.5 : undefined,\n fontSize: variables.inputFontSize\n },\n \".underline\": {\n \"NativeBase.Input\": {\n paddingLeft: 15\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor\n },\n \".regular\": {\n \"NativeBase.Input\": {\n paddingLeft: 8\n },\n \"NativeBase.Icon\": {\n paddingLeft: 10\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderColor: variables.inputBorderColor\n },\n \".rounded\": {\n \"NativeBase.Input\": {\n paddingLeft: 8\n },\n \"NativeBase.Icon\": {\n paddingLeft: 10\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderRadius: 30,\n borderColor: variables.inputBorderColor\n },\n\n \".success\": {\n \"NativeBase.Icon\": {\n color: variables.inputSuccessBorderColor\n },\n \"NativeBase.IconNB\": {\n color: variables.inputSuccessBorderColor\n },\n \".rounded\": {\n borderRadius: 30,\n borderColor: variables.inputSuccessBorderColor\n },\n \".regular\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".underline\": {\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputSuccessBorderColor\n },\n borderColor: variables.inputSuccessBorderColor\n },\n\n \".error\": {\n \"NativeBase.Icon\": {\n color: variables.inputErrorBorderColor\n },\n \"NativeBase.IconNB\": {\n color: variables.inputErrorBorderColor\n },\n \".rounded\": {\n borderRadius: 30,\n borderColor: variables.inputErrorBorderColor\n },\n \".regular\": {\n borderColor: variables.inputErrorBorderColor\n },\n \".underline\": {\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputErrorBorderColor\n },\n borderColor: variables.inputErrorBorderColor\n },\n \".disabled\": {\n \"NativeBase.Icon\": {\n color: \"#384850\"\n },\n \"NativeBase.IconNB\": {\n color: \"#384850\"\n }\n },\n\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor,\n backgroundColor: \"transparent\",\n flexDirection: \"row\",\n alignItems: \"center\",\n marginLeft: 2\n };\n\n return itemTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Item.js"],"names":["variables","variable","itemTheme","height","top","paddingTop","paddingBottom","minHeight","inputHeightBase","Platform","OS","position","left","right","flex","width","fontSize","inputFontSize","alignSelf","marginTop","deviceWidth","lineHeight","inputLineHeight","undefined","flexDirection","paddingRight","paddingLeft","color","inputColorPlaceholder","inputColor","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","marginLeft","backgroundColor","alignItems"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,WAAY;AAChB,iBAAkB;AAChB,mBAAoB;AAClBC,OAAQ,EADU;AAElBC,IAAK,CAFa;AAGlBC,WAAY,CAHM;AAIlBC,cAAe,CAJG;AAKlB,aAAc;AACZC,UAAWP,UAAUQ,eADT;AAEZH,WAAYI,sBAASC,EAAT,GAAgB,KAAhB,CAAwB,EAAxB,CAA6B,CAF7B;AAGZJ,cAAeG,sBAASC,EAAT,GAAgB,KAAhB,CAAwB,EAAxB,CAA6B,EAHhC,CALI,CADJ;;;AAYhB,mBAAoB;AAClBN,IAAK,CADa,CAZJ;;AAehB,kBAAmB;AACjBA,IAAK,CADY;AAEjBC,WAAY,CAFK,CAfH;;AAmBhB,oBAAqB;AACnBD,IAAK,CADc;AAEnBC,WAAY,CAFO,CAnBL,CADF;;;AAyBhB,cAAe;AACb,mBAAoB;AAClBM,SAA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AAW;AACTY,WAAY,CADH,CAxNK;;;AA4NhBN,YAAajC,UAAUiC,WAAV,CAAwB,CA5NrB;AA6NhBC,eAAgB,CA7NA;AA8NhBC,iBAAkB,CA9NF;AA+NhBC,gBAAiB,CA/ND;AAgOhBN,YAAa9B,UAAUqC,gBAhOP;AAiOhBG,gBAAiB,aAjOD;AAkOhBhB,cAAe,KAlOC;AAmOhBiB,WAAY,QAnOI;AAoOhBF,WAAY,CApOI,CAAlB;;;AAuOA,MAAOrC,UAAP;AACD,C","file":"Item.js","sourcesContent":["import { Platform } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const itemTheme = {\n \".floatingLabel\": {\n \"NativeBase.Input\": {\n height: 50,\n top: 8,\n paddingTop: 3,\n paddingBottom: 7,\n \".multiline\": {\n minHeight: variables.inputHeightBase,\n paddingTop: Platform.OS === \"ios\" ? 10 : 3,\n paddingBottom: Platform.OS === \"ios\" ? 14 : 10\n }\n },\n \"NativeBase.Label\": {\n top: 8\n },\n \"NativeBase.Icon\": {\n top: 6,\n paddingTop: 8\n },\n \"NativeBase.IconNB\": {\n top: 6,\n paddingTop: 8\n }\n },\n \".fixedLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n flex: 1,\n height: null,\n width: null,\n fontSize: variables.inputFontSize\n },\n \"NativeBase.Input\": {\n flex: 2,\n fontSize: variables.inputFontSize\n }\n },\n \".stackedLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n paddingTop: 5,\n alignSelf: \"flex-start\",\n fontSize: variables.inputFontSize - 2\n },\n \"NativeBase.Icon\": {\n marginTop: 36\n },\n \"NativeBase.Input\": {\n alignSelf: Platform.OS === \"ios\" ? \"stretch\" : \"flex-start\",\n flex: 1,\n width: Platform.OS === \"ios\" ? null : variables.deviceWidth - 25,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight - 6,\n \".secureTextEntry\": {\n fontSize: variables.inputFontSize - 4\n },\n \".multiline\": {\n paddingTop: Platform.OS === \"ios\" ? 9 : undefined,\n paddingBottom: Platform.OS === \"ios\" ? 9 : undefined\n }\n },\n flexDirection: null,\n minHeight: variables.inputHeightBase + 15\n },\n \".inlineLabel\": {\n \"NativeBase.Label\": {\n position: null,\n top: null,\n left: null,\n right: null,\n paddingRight: 20,\n height: null,\n width: null,\n fontSize: variables.inputFontSize\n },\n \"NativeBase.Input\": {\n paddingLeft: 5,\n fontSize: variables.inputFontSize\n },\n flexDirection: \"row\"\n },\n \"NativeBase.Label\": {\n fontSize: variables.inputFontSize,\n color: variables.inputColorPlaceholder,\n paddingRight: 5\n },\n \"NativeBase.Icon\": {\n fontSize: 24,\n paddingRight: 8\n },\n \"NativeBase.IconNB\": {\n fontSize: 24,\n paddingRight: 8\n },\n \"NativeBase.Input\": {\n \".multiline\": {\n height: null\n },\n height: variables.inputHeightBase,\n color: variables.inputColor,\n flex: 1,\n top: Platform.OS === \"ios\" ? 1.5 : undefined,\n fontSize: variables.inputFontSize\n },\n \".underline\": {\n \"NativeBase.Input\": {\n paddingLeft: 15\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor\n },\n \".regular\": {\n \"NativeBase.Input\": {\n paddingLeft: 8\n },\n \"NativeBase.Icon\": {\n paddingLeft: 10\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderColor: variables.inputBorderColor\n },\n \".rounded\": {\n \"NativeBase.Input\": {\n paddingLeft: 8\n },\n \"NativeBase.Icon\": {\n paddingLeft: 10\n },\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n borderWidth: variables.borderWidth * 2,\n borderRadius: 30,\n borderColor: variables.inputBorderColor\n },\n\n \".success\": {\n \"NativeBase.Icon\": {\n color: variables.inputSuccessBorderColor\n },\n \"NativeBase.IconNB\": {\n color: variables.inputSuccessBorderColor\n },\n \".rounded\": {\n borderRadius: 30,\n borderColor: variables.inputSuccessBorderColor\n },\n \".regular\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".underline\": {\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputSuccessBorderColor\n },\n borderColor: variables.inputSuccessBorderColor\n },\n\n \".error\": {\n \"NativeBase.Icon\": {\n color: variables.inputErrorBorderColor\n },\n \"NativeBase.IconNB\": {\n color: variables.inputErrorBorderColor\n },\n \".rounded\": {\n borderRadius: 30,\n borderColor: variables.inputErrorBorderColor\n },\n \".regular\": {\n borderColor: variables.inputErrorBorderColor\n },\n \".underline\": {\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputErrorBorderColor\n },\n borderColor: variables.inputErrorBorderColor\n },\n \".disabled\": {\n \"NativeBase.Icon\": {\n color: \"#384850\"\n },\n \"NativeBase.IconNB\": {\n color: \"#384850\"\n }\n },\n \".picker\": {\n marginLeft: 0\n },\n\n borderWidth: variables.borderWidth * 2,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor,\n backgroundColor: \"transparent\",\n flexDirection: \"row\",\n alignItems: \"center\",\n marginLeft: 2\n };\n\n return itemTheme;\n};\n"]} \ No newline at end of file diff --git a/src/theme/components/Item.js b/src/theme/components/Item.js index 313b12053..1e54e0406 100644 --- a/src/theme/components/Item.js +++ b/src/theme/components/Item.js @@ -68,7 +68,7 @@ export default (variables = variable) => { }, ".multiline": { paddingTop: Platform.OS === "ios" ? 9 : undefined, - paddingBottom: Platform.OS === "ios" ? 9 : undefined, + paddingBottom: Platform.OS === "ios" ? 9 : undefined } }, flexDirection: null, @@ -219,6 +219,9 @@ export default (variables = variable) => { color: "#384850" } }, + ".picker": { + marginLeft: 0 + }, borderWidth: variables.borderWidth * 2, borderTopWidth: 0, From e7569a7bac31bab0b6f6c64e726354ada3476f10 Mon Sep 17 00:00:00 2001 From: Supriya Kalghatgi Date: Fri, 22 Jun 2018 12:51:32 +0530 Subject: [PATCH 11/12] fixed for iPhoneX --- src/theme/components/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/components/Header.js b/src/theme/components/Header.js index 053cac497..4352485b5 100644 --- a/src/theme/components/Header.js +++ b/src/theme/components/Header.js @@ -48,7 +48,7 @@ export default (variables = variable) => { shadowRadius: null, shadowOpacity: null, paddingTop: platform === "android" ? StatusBar.currentHeight : undefined, - height: platform === "android" ? variables.toolbarHeight + StatusBar.currentHeight : undefined + height: platform === "android" ? variables.toolbarHeight + StatusBar.currentHeight : variables.toolbarHeight }, ".noShadow": { elevation: 0, From 0235297cb4d305c77bed13a63d0ad4425dca9740 Mon Sep 17 00:00:00 2001 From: SupriyaKalghatgi <> Date: Fri, 22 Jun 2018 14:00:03 +0530 Subject: [PATCH 12/12] Transpiled --- dist/src/basic/Accordion.js | 11 ++++++--- dist/src/basic/Accordion.js.map | 2 +- dist/src/basic/DatePicker.js | 20 +++++++++-------- dist/src/basic/DatePicker.js.map | 2 +- dist/src/basic/Header.js | 7 +++--- dist/src/basic/Header.js.map | 2 +- dist/src/basic/Item.js | 30 +++++++++++-------------- dist/src/basic/Item.js.map | 2 +- dist/src/theme/components/Card.js | 4 +++- dist/src/theme/components/Card.js.map | 2 +- dist/src/theme/components/Header.js | 4 +++- dist/src/theme/components/Header.js.map | 2 +- 12 files changed, 48 insertions(+), 40 deletions(-) diff --git a/dist/src/basic/Accordion.js b/dist/src/basic/Accordion.js index c27eab800..c42cb0179 100644 --- a/dist/src/basic/Accordion.js +++ b/dist/src/basic/Accordion.js @@ -100,7 +100,7 @@ onPress:function onPress(){return _this5.props.setSelected(_this5.props.index);} _react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:101}}, this.props.renderHeader? -this.props.renderHeader(this.props.item.title): +this.props.renderHeader(this.props.item.title,this.props.expanded): _react2.default.createElement(DefaultHeader,{ title:this.props.item.title, @@ -139,7 +139,12 @@ this.setState({selected:undefined}); }else{ this.setState({selected:index}); } +}},{key:"componentDidMount",value:function componentDidMount() + +{ +this.setState({selected:this.props.expanded}); }},{key:"render",value:function render() + {var _this7=this; var variables=this.context.theme? this.context.theme["@@shoutem.theme/themeStyle"].variables: @@ -170,10 +175,10 @@ renderContent:_this7.props.renderContent, icon:_this7.props.icon, iconStyle:_this7.props.iconStyle, expandedIcon:_this7.props.expandedIcon, -expandedIconStyle:_this7.props.expandedIconStyle,__source:{fileName:_jsxFileName,lineNumber:160}}));}}, +expandedIconStyle:_this7.props.expandedIconStyle,__source:{fileName:_jsxFileName,lineNumber:165}}));}}, -this.props,{__source:{fileName:_jsxFileName,lineNumber:148}}))); +this.props,{__source:{fileName:_jsxFileName,lineNumber:153}}))); }}]);return Accordion;}(_react2.default.Component); diff --git a/dist/src/basic/Accordion.js.map b/dist/src/basic/Accordion.js.map index 8f65becb0..c0a62c353 100644 --- a/dist/src/basic/Accordion.js.map +++ b/dist/src/basic/Accordion.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/Accordion.js"],"names":["DefaultHeader","variables","context","theme","variable","styles","defaultHeader","props","headerStyle","backgroundColor","title","fontSize","expanded","expandedIcon","expandedIconStyle","color","icon","iconStyle","React","Component","DefaultContent","padding","contentStyle","content","AccordionSubItem","state","fadeAnim","Animated","Value","timing","toValue","duration","start","style","opacity","children","AccordionItem","setSelected","index","renderHeader","item","renderContent","Accordion","selected","undefined","setState","dataArray","borderColor","accordionBorderColor","borderWidth","String","bind","StyleSheet","create","flexDirection","justifyContent","alignItems"],"mappings":"61BAAA,4B;AACA;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Kf,KAAL,CAAWkB,QAAX,GAAwBL,KAHpC;AAIE,MAAOA,KAJT;AAKE,YAAa,OAAKD,WAAL,CAAiBc,IAAjB,CAAsB,MAAtB,CALf;AAME,YAAa,OAAK5C,KAAL,CAAWC,WAN1B;AAOE,aAAc,OAAKD,KAAL,CAAWe,YAP3B;AAQE,aAAc,OAAKf,KAAL,CAAWgC,YAR3B;AASE,cAAe,OAAKhC,KAAL,CAAWkC,aAT5B;AAUE,KAAM,OAAKlC,KAAL,CAAWS,IAVnB;AAWE,UAAW,OAAKT,KAAL,CAAWU,SAXxB;AAYE,aAAc,OAAKV,KAAL,CAAWM,YAZ3B;AAaE,kBAAmB,OAAKN,KAAL,CAAWO,iBAbhC,kDADU,GAXd;;;AA4BM,KAAKP,KA5BX,oDADF;;;AAgCD,C,uBA7C4BW,gBAAMC,S;;;AAgDrC,GAAMd,QAAS+C,wBAAWC,MAAX,CAAkB;AAC/B/C,cAAe;AACbgD,cAAe,KADF;AAEbjC,QAAS,EAFI;AAGbkC,eAAgB,eAHH;AAIbC,WAAY,QAJC,CADgB,CAAlB,CAAf","file":"Accordion.js","sourcesContent":["import React, { Component } from \"react\";\nimport {\n Animated,\n TouchableWithoutFeedback,\n FlatList,\n StyleSheet,\n View\n} from \"react-native\";\nimport { Text } from \"./Text\";\nimport { Icon } from \"./Icon\";\nimport variable from \"../theme/variables/platform\";\n\nclass DefaultHeader extends React.Component {\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n {this.props.title}\n \n \n );\n }\n}\n\nclass DefaultContent extends React.Component {\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n {this.props.content}\n \n );\n }\n}\n\nclass AccordionSubItem extends React.Component {\n state = {\n fadeAnim: new Animated.Value(0.3)\n };\n componentDidMount() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 500\n }).start();\n }\n render() {\n let { fadeAnim } = this.state;\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nclass AccordionItem extends React.Component {\n render() {\n return (\n \n this.props.setSelected(this.props.index)}\n >\n \n {this.props.renderHeader ? (\n this.props.renderHeader(this.props.item.title)\n ) : (\n \n )}\n \n \n {this.props.expanded ? (\n \n {this.props.renderContent ? (\n this.props.renderContent(this.props.item.content)\n ) : (\n \n )}\n \n ) : null}\n \n );\n }\n}\n\nexport class Accordion extends React.Component {\n state = { selected: undefined };\n setSelected(index) {\n if (this.state.selected === index) {\n this.setState({ selected: undefined });\n } else {\n this.setState({ selected: index });\n }\n }\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n String(index)}\n renderItem={({ item, index }) => (\n \n )}\n {...this.props}\n />\n );\n }\n}\n\nconst styles = StyleSheet.create({\n defaultHeader: {\n flexDirection: \"row\",\n padding: 10,\n justifyContent: \"space-between\",\n alignItems: \"center\"\n }\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Accordion.js"],"names":["DefaultHeader","variables","context","theme","variable","styles","defaultHeader","props","headerStyle","backgroundColor","title","fontSize","expanded","expandedIcon","expandedIconStyle","color","icon","iconStyle","React","Component","DefaultContent","padding","contentStyle","content","AccordionSubItem","state","fadeAnim","Animated","Value","timing","toValue","duration","start","style","opacity","children","AccordionItem","setSelected","index","renderHeader","item","renderContent","Accordion","selected","undefined","setState","dataArray","borderColor","accordionBorderColor","borderWidth","String","bind","StyleSheet","create","flexDirection","justifyContent","alignItems"],"mappings":"61BAAA,4B;AACA;;;;;;;AAOA;AACA;AACA,qD;;AAEMA,a;AACK;AACP,GAAMC,WAAY,KAAKC,OAAL,CAAaC,KAAb;AACd,KAAKD,OAAL,CAAaC,KAAb,CAAmB,4BAAnB,EAAiDF,SADnC;AAEdG,kBAFJ;AAGA;AACE,8BAAC,iBAAD;AACE,MAAO;AACLC,OAAOC,aADF;AAEL,KAAKC,KAAL,CA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f;AAME,YAAa,OAAK5C,KAAL,CAAWC,WAN1B;AAOE,aAAc,OAAKD,KAAL,CAAWe,YAP3B;AAQE,aAAc,OAAKf,KAAL,CAAWgC,YAR3B;AASE,cAAe,OAAKhC,KAAL,CAAWkC,aAT5B;AAUE,KAAM,OAAKlC,KAAL,CAAWS,IAVnB;AAWE,UAAW,OAAKT,KAAL,CAAWU,SAXxB;AAYE,aAAc,OAAKV,KAAL,CAAWM,YAZ3B;AAaE,kBAAmB,OAAKN,KAAL,CAAWO,iBAbhC,kDADU,GAXd;;;AA4BM,KAAKP,KA5BX,oDADF;;;AAgCD,C,uBAlD4BW,gBAAMC,S;;;AAqDrC,GAAMd,QAAS+C,wBAAWC,MAAX,CAAkB;AAC/B/C,cAAe;AACbgD,cAAe,KADF;AAEbjC,QAAS,EAFI;AAGbkC,eAAgB,eAHH;AAIbC,WAAY,QAJC,CADgB,CAAlB,CAAf","file":"Accordion.js","sourcesContent":["import React, { Component } from \"react\";\nimport {\n Animated,\n TouchableWithoutFeedback,\n FlatList,\n StyleSheet,\n View\n} from \"react-native\";\nimport { Text } from \"./Text\";\nimport { Icon } from \"./Icon\";\nimport variable from \"../theme/variables/platform\";\n\nclass DefaultHeader extends React.Component {\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n {this.props.title}\n \n \n );\n }\n}\n\nclass DefaultContent extends React.Component {\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n {this.props.content}\n \n );\n }\n}\n\nclass AccordionSubItem extends React.Component {\n state = {\n fadeAnim: new Animated.Value(0.3)\n };\n componentDidMount() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 500\n }).start();\n }\n render() {\n let { fadeAnim } = this.state;\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nclass AccordionItem extends React.Component {\n render() {\n return (\n \n this.props.setSelected(this.props.index)}\n >\n \n {this.props.renderHeader ? (\n this.props.renderHeader(this.props.item.title, this.props.expanded)\n ) : (\n \n )}\n \n \n {this.props.expanded ? (\n \n {this.props.renderContent ? (\n this.props.renderContent(this.props.item.content)\n ) : (\n \n )}\n \n ) : null}\n \n );\n }\n}\n\nexport class Accordion extends React.Component {\n state = { selected: undefined };\n setSelected(index) {\n if (this.state.selected === index) {\n this.setState({ selected: undefined });\n } else {\n this.setState({ selected: index });\n }\n }\n\n componentDidMount() {\n this.setState({ selected: this.props.expanded });\n }\n\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n String(index)}\n renderItem={({ item, index }) => (\n \n )}\n {...this.props}\n />\n );\n }\n}\n\nconst styles = StyleSheet.create({\n defaultHeader: {\n flexDirection: \"row\",\n padding: 10,\n justifyContent: \"space-between\",\n alignItems: \"center\"\n }\n});\n"]} \ No newline at end of file diff --git a/dist/src/basic/DatePicker.js b/dist/src/basic/DatePicker.js index 992e87651..fc7421700 100644 --- a/dist/src/basic/DatePicker.js +++ b/dist/src/basic/DatePicker.js @@ -38,7 +38,7 @@ this.openAndroidDatePicker(); }else{ this.setState({modalVisible:true}); } -}},{key:"openAndroidDatePicker",value:function openAndroidDatePicker(){var newDate,action,year,month,day,code,message;return regeneratorRuntime.async(function openAndroidDatePicker$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return regeneratorRuntime.awrap( +}},{key:"openAndroidDatePicker",value:function openAndroidDatePicker(){var newDate,action,year,month,day,selectedDate,code,message;return regeneratorRuntime.async(function openAndroidDatePicker$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return regeneratorRuntime.awrap( @@ -52,7 +52,9 @@ mode:this.props.androidMode}));case 3:newDate=_context.sent; action=newDate.action,year=newDate.year,month=newDate.month,day=newDate.day; if(action==="dateSetAction"){ -this.setState({chosenDate:new Date(year,month,day)}); +selectedDate=new Date(year,month,day); +this.setState({chosenDate:selectedDate}); +this.props.onDateChange(selectedDate); }_context.next=13;break;case 8:_context.prev=8;_context.t0=_context["catch"](0); code=_context.t0.code;message=_context.t0.message; console.warn("Cannot open date picker",message);case 13:case"end":return _context.stop();}}},null,this,[[0,8]]);}},{key:"render",value:function render() @@ -64,13 +66,13 @@ var variables=this.context.theme? this.context.theme["@@shoutem.theme/themeStyle"].variables: _platform2.default; return( -_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:67}}, -_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:68}}, +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:69}}, +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:70}}, _react2.default.createElement(_nativeBase.Text,{ onPress:this.showDatePicker.bind(this), style:[ {padding:10,color:variables.datePickerTextColor}, -this.state.chosenDate?this.props.textStyle:this.props.placeHolderTextStyle],__source:{fileName:_jsxFileName,lineNumber:69}}, +this.state.chosenDate?this.props.textStyle:this.props.placeHolderTextStyle],__source:{fileName:_jsxFileName,lineNumber:71}}, this.state.chosenDate? @@ -83,16 +85,16 @@ this.props.placeHolderText? this.props.placeHolderText: "Select Date"), -_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:86}}, +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:88}}, _react2.default.createElement(_reactNative.Modal,{ animationType:this.props.animationType, transparent:this.props.modalTransparent, visible:this.state.modalVisible, -onRequestClose:function onRequestClose(){},__source:{fileName:_jsxFileName,lineNumber:87}}, +onRequestClose:function onRequestClose(){},__source:{fileName:_jsxFileName,lineNumber:89}}, _react2.default.createElement(_nativeBase.Text,{ onPress:function onPress(){return _this2.setState({modalVisible:false});}, -style:{backgroundColor:variables.datePickerBg,flex:1},__source:{fileName:_jsxFileName,lineNumber:93}}), +style:{backgroundColor:variables.datePickerBg,flex:1},__source:{fileName:_jsxFileName,lineNumber:95}}), _react2.default.createElement(_reactNative.DatePickerIOS,{ date: @@ -105,7 +107,7 @@ minimumDate:this.props.minimumDate, maximumDate:this.props.maximumDate, mode:"date", locale:this.props.locale, -timeZoneOffsetInMinutes:this.props.timeZoneOffsetInMinutes,__source:{fileName:_jsxFileName,lineNumber:97}})))))); +timeZoneOffsetInMinutes:this.props.timeZoneOffsetInMinutes,__source:{fileName:_jsxFileName,lineNumber:99}})))))); diff --git a/dist/src/basic/DatePicker.js.map b/dist/src/basic/DatePicker.js.map index ebacf4b76..eb56773ec 100644 --- a/dist/src/basic/DatePicker.js.map +++ b/dist/src/basic/DatePicker.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/DatePicker.js"],"names":["DatePicker","props","componentDidMount","setState","defaultDate","Date","state","modalVisible","chosenDate","undefined","date","onDateChange","Platform","OS","openAndroidDatePicker","DatePickerAndroid","open","minDate","minimumDate","maxDate","maximumDate","mode","androidMode","newDate","action","year","month","day","code","message","console","warn","variables","context","theme","variable","showDatePicker","bind","padding","color","datePickerTextColor","textStyle","placeHolderTextStyle","getDate","getMonth","getFullYear","placeHolderText","animationType","modalTransparent","backgroundColor","datePickerBg","flex","setDate","locale","timeZoneOffsetInMinutes","React","Component"],"mappings":"+nBAAA,4B;AACA;;;;;;;AAOA;AACA,qD;;AAEaA,U,SAAAA,U;AACX,oBAAYC,KAAZ,CAAmB;AACXA,KADW;;;;;;;;AASnBC,iBATmB,CASC,UAAM;AACxB,MAAKC,QAAL,CAAc;AACZC,YAAa,MAAKH,KAAL,CAAWG,WAAX,CAAyB,MAAKH,KAAL,CAAWG,WAApC,CAAkD,GAAIC,KAAJ,EADnD,CAAd;;AAGD,CAbkB,CAEjB,MAAKC,KAAL,CAAa,CACXC,aAAc,KADH,CAEXH,YAAa,GAAIC,KAAJ,EAFF,CAGXG,WAAYC,SAHD,CAAb,CAFiB,aAOlB,C;;AAQOC,I,CAAM;AACZ,KAAKP,QAAL,CAAc,CAAEK,WAAY,GAAIH,KAAJ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lBF,CADF,CADF;;;;;;;AAiDD,C,wBAvG6BC,gBAAMC,S","file":"DatePicker.js","sourcesContent":["import React from \"react\";\nimport {\n Modal,\n View,\n Platform,\n DatePickerIOS,\n DatePickerAndroid\n} from \"react-native\";\nimport { Text } from \"native-base\";\nimport variable from \"../theme/variables/platform\";\n\nexport class DatePicker extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n defaultDate: new Date(),\n chosenDate: undefined\n };\n }\n\n componentDidMount = () => {\n this.setState({\n defaultDate: this.props.defaultDate ? this.props.defaultDate : new Date()\n });\n };\n\n setDate(date) {\n this.setState({ chosenDate: new Date(date) });\n if (this.props.onDateChange) {\n this.props.onDateChange(date);\n }\n }\n\n showDatePicker() {\n if (Platform.OS === \"android\") {\n this.openAndroidDatePicker();\n } else {\n this.setState({ modalVisible: true });\n }\n }\n\n async openAndroidDatePicker() {\n try {\n const newDate = await DatePickerAndroid.open({\n date: this.state.chosenDate\n ? this.state.chosenDate\n : this.state.defaultDate,\n minDate: this.props.minimumDate,\n maxDate: this.props.maximumDate,\n mode: this.props.androidMode\n });\n const { action, year, month, day } = newDate;\n if (action === \"dateSetAction\") {\n this.setState({ chosenDate: new Date(year, month, day) });\n }\n } catch ({ code, message }) {\n console.warn(\"Cannot open date picker\", message);\n }\n }\n\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n \n \n {this.state.chosenDate\n ? this.state.chosenDate.getDate() +\n \"/\" +\n (this.state.chosenDate.getMonth() + 1) +\n \"/\" +\n +this.state.chosenDate.getFullYear()\n : this.props.placeHolderText\n ? this.props.placeHolderText\n : \"Select Date\"}\n \n \n {}}\n >\n this.setState({ modalVisible: false })}\n style={{ backgroundColor: variables.datePickerBg, flex: 1 }}\n />\n \n \n \n \n \n );\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/DatePicker.js"],"names":["DatePicker","props","componentDidMount","setState","defaultDate","Date","state","modalVisible","chosenDate","undefined","date","onDateChange","Platform","OS","openAndroidDatePicker","DatePickerAndroid","open","minDate","minimumDate","maxDate","maximumDate","mode","androidMode","newDate","action","year","month","day","selectedDate","code","message","console","warn","variables","context","theme","variable","showDatePicker","bind","padding","color","datePickerTextColor","textStyle","placeHolderTextStyle","getDate","getMonth","getFullYear","placeHolderText","animationType","modalTransparent","backgroundColor","datePickerBg","flex","setDate","locale","timeZoneOffsetInMinutes","React","Component"],"mappings":"+nBAAA,4B;AACA;;;;;;;AAOA;AACA,qD;;AAEaA,U,SAAAA,U;AACX,oBAAYC,KAAZ,CAAmB;AACXA,KADW;;;;;;;;AASnBC,iBATmB,CASC,UAAM;AACxB,MAAKC,QAAL,CAAc;AACZC,YAAa,MAAKH,KAAL,CAAWG,WAAX,CAAyB,MAAKH,KAAL,CAAWG,WAApC,CAAkD,GAAIC,KAAJ,EADnD,CAAd;;AAGD,CAbkB,CAEjB,MAAKC,KAAL,CAAa,CACXC,aAAc,KADH,CAEXH,YAAa,GAAIC,KAAJ,EAFF,CAGXG,WAAYC,SAHD,CAAb,CAFiB,aAOlB,C;;AAQOC,I,CAAM;AACZ,KAAKP,QAAL,CAAc,CAAEK,WAAY,GAAIH,KAAJ,CAASK,IAAT,CAAd,CAAd;AACA,GAAI,KAAKT,KAAL,CAAWU,YAAf,CAA6B;AAC3B,KAAKV,KAAL,CAAWU,YAAX,CAAwBD,IAAxB;AACD;AACF,C;;AAEgB;AACf,GAAIE,sBAASC,EAAT,GAAgB,SAApB,CAA+B;AAC7B,KAAKC,qBAAL;AACD,CAFD,IAEO;AACL,KAAKX,QAAL,CAAc,CAAEI,aAAc,IAAhB,CAAd;AACD;AACF,C;;;;AAIyBQ,+BAAkBC,IAAlB,CAAuB;AAC3CN,KAAM,KAAKJ,KAAL,CAAWE,UAAX;AACF,KAAKF,KAAL,CAAWE,UADT;AAEF,KAAKF,KAAL,CAAWF,WAH4B;AAI3Ca,QAAS,KAAKhB,KAAL,CAAWiB,W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AK7C,KAAL,CAAW8C,eAAX;AACE,KAAK9C,KAAL,CAAW8C,eADb;AAEE,aAfV,CADF;;AAkBE,8BAAC,iBAAD;AACE,8BAAC,kBAAD;AACE,cAAe,KAAK9C,KAAL,CAAW+C,aAD5B;AAEE,YAAa,KAAK/C,KAAL,CAAWgD,gBAF1B;AAGE,QAAS,KAAK3C,KAAL,CAAWC,YAHtB;AAIE,eAAgB,yBAAM,CAAE,CAJ1B;;AAME,8BAAC,gBAAD;AACE,QAAS,yBAAM,QAAKJ,QAAL,CAAc,CAAEI,aAAc,KAAhB,CAAd,CAAN,EADX;AAEE,MAAO,CAAE2C,gBAAiBjB,UAAUkB,YAA7B,CAA2CC,KAAM,CAAjD,CAFT,iDANF;;AAUE,8BAAC,0BAAD;AACE;AACE,KAAK9C,KAAL,CAAWE,UAAX;AACI,KAAKF,KAAL,CAAWE,UADf;AAEI,KAAKF,KAAL,CAAWF,WAJnB;;AAME,aAAc,KAAKiD,OAAL,CAAaf,IAAb,CAAkB,IAAlB,CANhB;AAOE,YAAa,KAAKrC,KAAL,CAAWiB,WAP1B;AAQE,YAAa,KAAKjB,KAAL,CAAWmB,WAR1B;AASE,KAAK,MATP;AAUE,OAAQ,KAAKnB,KAAL,CAAWqD,MAVrB;AAWE,wBAAyB,KAAKrD,KAAL,CAAWsD,uBAXtC,iDAVF,CADF,CAlBF,CADF,CADF;;;;;;;AAiDD,C,wBAzG6BC,gBAAMC,S","file":"DatePicker.js","sourcesContent":["import React from \"react\";\nimport {\n Modal,\n View,\n Platform,\n DatePickerIOS,\n DatePickerAndroid\n} from \"react-native\";\nimport { Text } from \"native-base\";\nimport variable from \"../theme/variables/platform\";\n\nexport class DatePicker extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n defaultDate: new Date(),\n chosenDate: undefined\n };\n }\n\n componentDidMount = () => {\n this.setState({\n defaultDate: this.props.defaultDate ? this.props.defaultDate : new Date()\n });\n };\n\n setDate(date) {\n this.setState({ chosenDate: new Date(date) });\n if (this.props.onDateChange) {\n this.props.onDateChange(date);\n }\n }\n\n showDatePicker() {\n if (Platform.OS === \"android\") {\n this.openAndroidDatePicker();\n } else {\n this.setState({ modalVisible: true });\n }\n }\n\n async openAndroidDatePicker() {\n try {\n const newDate = await DatePickerAndroid.open({\n date: this.state.chosenDate\n ? this.state.chosenDate\n : this.state.defaultDate,\n minDate: this.props.minimumDate,\n maxDate: this.props.maximumDate,\n mode: this.props.androidMode\n });\n const { action, year, month, day } = newDate;\n if (action === \"dateSetAction\") {\n let selectedDate = new Date(year, month, day);\n this.setState({ chosenDate: selectedDate });\n this.props.onDateChange(selectedDate);\n }\n } catch ({ code, message }) {\n console.warn(\"Cannot open date picker\", message);\n }\n }\n\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n \n \n \n {this.state.chosenDate\n ? this.state.chosenDate.getDate() +\n \"/\" +\n (this.state.chosenDate.getMonth() + 1) +\n \"/\" +\n +this.state.chosenDate.getFullYear()\n : this.props.placeHolderText\n ? this.props.placeHolderText\n : \"Select Date\"}\n \n \n {}}\n >\n this.setState({ modalVisible: false })}\n style={{ backgroundColor: variables.datePickerBg, flex: 1 }}\n />\n \n \n \n \n \n );\n }\n}\n"]} \ No newline at end of file diff --git a/dist/src/basic/Header.js b/dist/src/basic/Header.js index 134da7ff2..22e93ebc3 100644 --- a/dist/src/basic/Header.js +++ b/dist/src/basic/Header.js @@ -76,8 +76,9 @@ this.props.iosBarStyle? this.props.iosBarStyle: platformStyle==="material"? "light-content": -variables.iosStatusbar,__source:{fileName:_jsxFileName,lineNumber:68}}), +variables.iosStatusbar, +translucent:this.props.transparent?true:this.props.translucent,__source:{fileName:_jsxFileName,lineNumber:68}}), _platform2.default.isIphoneX? _react2.default.createElement(_reactNative.View,_extends({ @@ -92,13 +93,13 @@ variables.Inset), paddingTop:this.calculatePadder( this.state.orientation, -variables.Inset)}],__source:{fileName:_jsxFileName,lineNumber:83}})): +variables.Inset)}],__source:{fileName:_jsxFileName,lineNumber:84}})): -_react2.default.createElement(_reactNative.View,_extends({ref:function ref(c){return _this2._root=c;}},this.props,{__source:{fileName:_jsxFileName,lineNumber:101}})))); +_react2.default.createElement(_reactNative.View,_extends({ref:function ref(c){return _this2._root=c;}},this.props,{__source:{fileName:_jsxFileName,lineNumber:102}})))); diff --git a/dist/src/basic/Header.js.map b/dist/src/basic/Header.js.map index 105394185..d9e64ff0f 100644 --- a/dist/src/basic/Header.js.map +++ b/dist/src/basic/Header.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/Header.js"],"names":["Header","props","state","orientation","val","maxComp","Math","max","variable","deviceWidth","deviceHeight","width","setState","mode","inSet","inset","undefined","Inset","InsetValues","portrait","landscape","oldHeight","style","height","topInset","topPadder","StyleSheet","flatten","padding","paddingTop","variables","context","theme","platformStyle","layoutChange","e","nativeEvent","layout","androidStatusBarColor","statusBarColor","iosBarStyle","iosStatusbar","isIphoneX","_root","c","calculateHeight","calculatePadder","Component","contextTypes","PropTypes","object","propTypes","ViewPropTypes","oneOfType","number","array","searchBar","bool","rounded","StyledHeader","mapPropsToStyleNames"],"mappings":"u1BAAA,4B;AACA,qC;AACA;AACA;AACA,mE;AACA,qD;AACA,8B;AACMA,M;;;;AAIJ,gBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,YAAa,UADF,CAAb,CAFiB;;AAKlB,C;AACYC,G,CAAK;AAChB,GAAIC,SAAUC,KAAKC,GAAL,CAASC,mBAASC,WAAlB,CAA+BD,mBAASE,YAAxC,CAAd;AACA,GAAIN,IAAIO,KAAJ,EAAaN,OAAjB,CAA0B,KAAKO,QAAL,CAAc,CAAET,YAAa,WAAf,CAAd,EAA1B;AACK;AACH,KAAKS,QAAL,CAAc,CAAET,YAAa,UAAf,CAAd;AACD;AACF,C;AACeU,I,CAAMC,K,CAAO;AAC3B,GAAIC,OAAQ,IAAZ;AACA,GAA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M,KAHe,CAApB,CAFT;;AAOEC,UAAWP,oBAAUQ,IAPvB;AAQEC,QAAST,oBAAUQ,IARrB;;;AAWA,GAAME,cAAe;AACnB,mBADmB;AAEnB,EAFmB;AAGnBC,8BAHmB;AAInB5D,MAJmB,CAArB,C;AAKyBA,M,CAAhB2D,Y","file":"Header.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { View, StatusBar, ViewPropTypes, StyleSheet } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\nimport variable from \"../theme/variables/platform\";\nimport _ from \"lodash\";\nclass Header extends Component {\n static contextTypes = {\n theme: PropTypes.object\n };\n constructor(props) {\n super(props);\n this.state = {\n orientation: \"portrait\"\n };\n }\n layoutChange(val) {\n let maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);\n if (val.width >= maxComp) this.setState({ orientation: \"landscape\" });\n else {\n this.setState({ orientation: \"portrait\" });\n }\n }\n calculateHeight(mode, inSet) {\n let inset = null;\n if (inSet != undefined) {\n inset = inSet;\n } else {\n inset = variable.Inset;\n }\n const InsetValues = mode === \"portrait\" ? inset.portrait : inset.landscape;\n let oldHeight = null;\n if (this.props.style.height != undefined) {\n oldHeight = this.props.style.height;\n } else if (this.props.style[1].height) {\n oldHeight = this.props.style[1].height;\n } else {\n oldHeight = this.props.style[0].height;\n }\n let height = oldHeight + InsetValues.topInset;\n return height;\n }\n calculatePadder(mode, inSet) {\n let inset = null;\n if (inSet != undefined) {\n inset = inSet;\n } else {\n inset = variable.Inset;\n }\n const InsetValues = mode === \"portrait\" ? inset.portrait : inset.landscape;\n let topPadder = null;\n let style = StyleSheet.flatten(this.props.style);\n if (style.padding !== undefined && style.paddingTop !== undefined) {\n topPadder = (style.paddingTop ? style.paddingTop : style.padding) + InsetValues.topInset;\n } else {\n topPadder = InsetValues.topInset;\n }\n return topPadder;\n }\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n const platformStyle = variables.platformStyle;\n return (\n this.layoutChange(e.nativeEvent.layout)}>\n \n {variable.isIphoneX ? (\n (this._root = c)}\n {...this.props}\n style={[\n this.props.style,\n {\n height: this.calculateHeight(\n this.state.orientation,\n variables.Inset\n ),\n paddingTop: this.calculatePadder(\n this.state.orientation,\n variables.Inset\n )\n }\n ]}\n />\n ) : (\n (this._root = c)} {...this.props} />\n )}\n \n );\n }\n}\n\nHeader.propTypes = {\n ...ViewPropTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ]),\n searchBar: PropTypes.bool,\n rounded: PropTypes.bool\n};\n\nconst StyledHeader = connectStyle(\n \"NativeBase.Header\",\n {},\n mapPropsToStyleNames\n)(Header);\nexport { StyledHeader as Header };"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Header.js"],"names":["Header","props","state","orientation","val","maxComp","Math","max","variable","deviceWidth","deviceHeight","width","setState","mode","inSet","inset","undefined","Inset","InsetValues","portrait","landscape","oldHeight","style","height","topInset","topPadder","StyleSheet","flatten","padding","paddingTop","variables","context","theme","platformStyle","layoutChange","e","nativeEvent","layout","androidStatusBarColor","statusBarColor","iosBarStyle","iosStatusbar","transparent","translucent","isIphoneX","_root","c","calculateHeight","calculatePadder","Component","contextTypes","PropTypes","object","propTypes","ViewPropTypes","oneOfType","number","array","searchBar","bool","rounded","StyledHeader","mapPropsToStyleNames"],"mappings":"u1BAAA,4B;AACA,qC;AACA;AACA;AACA,mE;AACA,qD;AACA,8B;AACMA,M;;;;AAIJ,gBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,YAAa,UADF,CAAb,CAFiB;;AAKlB,C;AACYC,G,CAAK;AAChB,GAAIC,SAAUC,KAAKC,GAAL,CAASC,mBAASC,WAAlB,CAA+BD,mBAASE,YAAxC,CAAd;AACA,GAAIN,IAAIO,KAAJ,EAAaN,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,CAAaC,CAAnB,EAAX,EAAsC,KAAK7C,KAA3C,oDAnCN,CADF;;;;AAwCD,C,oBAlGkBgD,gB,EAAfjD,M,CACGkD,Y,CAAe,CACpBlB,MAAOmB,oBAAUC,MADG,C;;;AAoGxBpD,OAAOqD,SAAP;AACKC,0BADL;AAEEhC,MAAO6B,oBAAUI,SAAV,CAAoB;AACzBJ,oBAAUC,MADe;AAEzBD,oBAAUK,MAFe;AAGzBL,oBAAUM,KAHe,CAApB,CAFT;;AAOEC,UAAWP,oBAAUQ,IAPvB;AAQEC,QAAST,oBAAUQ,IARrB;;;AAWA,GAAME,cAAe;AACnB,mBADmB;AAEnB,EAFmB;AAGnBC,8BAHmB;AAInB9D,MAJmB,CAArB,C;AAKyBA,M,CAAhB6D,Y","file":"Header.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { View, StatusBar, ViewPropTypes, StyleSheet } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\nimport variable from \"../theme/variables/platform\";\nimport _ from \"lodash\";\nclass Header extends Component {\n static contextTypes = {\n theme: PropTypes.object\n };\n constructor(props) {\n super(props);\n this.state = {\n orientation: \"portrait\"\n };\n }\n layoutChange(val) {\n let maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);\n if (val.width >= maxComp) this.setState({ orientation: \"landscape\" });\n else {\n this.setState({ orientation: \"portrait\" });\n }\n }\n calculateHeight(mode, inSet) {\n let inset = null;\n if (inSet != undefined) {\n inset = inSet;\n } else {\n inset = variable.Inset;\n }\n const InsetValues = mode === \"portrait\" ? inset.portrait : inset.landscape;\n let oldHeight = null;\n if (this.props.style.height != undefined) {\n oldHeight = this.props.style.height;\n } else if (this.props.style[1].height) {\n oldHeight = this.props.style[1].height;\n } else {\n oldHeight = this.props.style[0].height;\n }\n let height = oldHeight + InsetValues.topInset;\n return height;\n }\n calculatePadder(mode, inSet) {\n let inset = null;\n if (inSet != undefined) {\n inset = inSet;\n } else {\n inset = variable.Inset;\n }\n const InsetValues = mode === \"portrait\" ? inset.portrait : inset.landscape;\n let topPadder = null;\n let style = StyleSheet.flatten(this.props.style);\n if (style.padding !== undefined && style.paddingTop !== undefined) {\n topPadder = (style.paddingTop ? style.paddingTop : style.padding) + InsetValues.topInset;\n } else {\n topPadder = InsetValues.topInset;\n }\n return topPadder;\n }\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n const platformStyle = variables.platformStyle;\n return (\n this.layoutChange(e.nativeEvent.layout)}>\n \n {variable.isIphoneX ? (\n (this._root = c)}\n {...this.props}\n style={[\n this.props.style,\n {\n height: this.calculateHeight(\n this.state.orientation,\n variables.Inset\n ),\n paddingTop: this.calculatePadder(\n this.state.orientation,\n variables.Inset\n )\n }\n ]}\n />\n ) : (\n (this._root = c)} {...this.props} />\n )}\n \n );\n }\n}\n\nHeader.propTypes = {\n ...ViewPropTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ]),\n searchBar: PropTypes.bool,\n rounded: PropTypes.bool\n};\n\nconst StyledHeader = connectStyle(\n \"NativeBase.Header\",\n {},\n mapPropsToStyleNames\n)(Header);\nexport { StyledHeader as Header };"]} \ No newline at end of file diff --git a/dist/src/basic/Item.js b/dist/src/basic/Item.js index 627bc139d..e13e45b5c 100644 --- a/dist/src/basic/Item.js +++ b/dist/src/basic/Item.js @@ -31,8 +31,6 @@ if(this.props.floatingLabel){ if(this.inputProps&&this.inputProps.value){ this.setState({isFocused:true}); this.floatUp(-16); -}else{ -this.setState({isFocused:false}); } if(this.inputProps&&this.inputProps.getRef) this.inputProps.getRef(this._inputRef); @@ -52,8 +50,6 @@ if(this.props.floatingLabel){ if(this.inputProps&&this.inputProps.value){ this.setState({isFocused:true}); this.floatUp(-16); -}else{ -this.setState({isFocused:false}); } if(this.inputProps&&this.inputProps.getRef) this.inputProps.getRef(this._inputRef); @@ -151,7 +147,7 @@ for(var i=0;i {\n if (item.type.displayName === \"Styled(Input)\") {\n inputProps = item.props;\n this.inputProps = item.props;\n return item;\n }\n });\n if (this.props.floatingLabel) {\n if (this.inputProps && this.inputProps.value) {\n this.setState({ isFocused: true });\n this.floatUp(-16);\n } else {\n this.setState({ isFocused: false });\n }\n if (this.inputProps && this.inputProps.getRef)\n this.inputProps.getRef(this._inputRef);\n }\n }\n\n floatBack() {\n Animated.timing(this.state.topAnim, {\n toValue: 18,\n duration: 150\n }).start();\n Animated.timing(this.state.opacAnim, {\n toValue: 1,\n duration: 150\n }).start();\n }\n\n floatUp(e) {\n Animated.timing(this.state.topAnim, {\n toValue: e || -22,\n duration: 150\n }).start();\n Animated.timing(this.state.opacAnim, {\n toValue: 0.7,\n duration: 150\n }).start();\n }\n\n renderLabel(label, labelProps) {\n const newLabel = [];\n let labelStyle = StyleSheet.flatten(\n { fontSize: 15, lineHeight: 30 },\n labelProps.style\n );\n if (this.props.floatingLabel) {\n if (this.state.isFocused) {\n newLabel.push(\n React.createElement(Label, {\n ...labelProps,\n key: \"newFLabel\",\n float: true,\n style: labelStyle\n })\n );\n this.floatUp(-16);\n } else {\n newLabel.push(label);\n this.floatBack();\n }\n } else {\n newLabel.push(\n React.createElement(Label, {\n ...labelProps,\n key: \"newLabel\"\n })\n );\n }\n return newLabel;\n }\n\n renderChildren() {\n const newChildren = [];\n const childrenArray = React.Children.toArray(this.props.children);\n\n let label = [];\n let labelProps = {};\n label = _.remove(childrenArray, item => {\n if (item.type === Label) {\n labelProps = item.props;\n return item;\n }\n });\n\n let input = [];\n let inputProps = {};\n input = _.remove(childrenArray, item => {\n if (item.type === Input) {\n inputProps = item.props;\n this.inputProps = item.props;\n return item;\n }\n });\n\n let icon = [];\n let iconProps = {};\n icon = _.remove(childrenArray, item => {\n if (item.type === Icon) {\n iconProps = item.props;\n return item;\n }\n });\n if (this.props.floatingLabel && icon.length) {\n let isIcon = false;\n for (let i = 0; i < this.props.children.length; i++) {\n if (this.props.children[i].props.name && this.props.children[i].type.displayName !== \"Styled(Input)\") {\n isIcon = true;\n newChildren.push(\n \n );\n }\n if (this.props.children[i].props.children) {\n newChildren.push(\n \n \n \n );\n newChildren.push(\n (this._inputRef = c)}\n key=\"l2\"\n {...inputProps}\n onFocus={() => {\n this.setState({ isFocused: true });\n inputProps.onFocus && inputProps.onFocus();\n }}\n onBlur={() => {\n inputProps.value\n ? this.setState({\n isFocused: true\n })\n : !this.state.text.length &&\n this.setState({ isFocused: false });\n inputProps.onBlur && inputProps.onBlur();\n }}\n onChangeText={text => {\n this.setState({ text });\n inputProps.onChangeText && inputProps.onChangeText(text);\n }}\n />\n );\n }\n }\n } else if (this.props.floatingLabel) {\n newChildren.push(\n \n \n \n );\n newChildren.push(\n (this._inputRef = c)}\n value={this.state.text}\n key=\"l2\"\n {...inputProps}\n onFocus={() => {\n this.setState({ isFocused: true });\n inputProps.onFocus && inputProps.onFocus();\n }}\n onBlur={() => {\n inputProps.value\n ? this.setState({\n isFocused: true\n })\n : !this.state.text.length && this.setState({ isFocused: false });\n inputProps.onBlur && inputProps.onBlur();\n }}\n onChangeText={text => {\n this.setState({ text });\n inputProps.onChangeText && inputProps.onChangeText(text);\n }}\n />\n );\n } else if (this.props.stackedLabel && icon.length) {\n newChildren.push(\n \n \n \n \n \n );\n } else {\n return this.props.children;\n }\n return newChildren;\n }\n getInitialStyle() {\n return {\n roundedInputGroup: {\n borderWidth: this.props.rounded ? variables.borderWidth * 2 : undefined,\n borderRadius: this.props.rounded\n ? variables.inputGroupRoundedBorderRadius\n : undefined\n }\n };\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().roundedInputGroup\n };\n\n return computeProps(this.props, defaultProps);\n }\n render() {\n return (\n (this._root = c)}\n {...this.prepareRootProps()}\n activeOpacity={1}\n >\n {this.renderChildren()}\n \n );\n }\n}\n\nconst childrenType = function (props, propName, component) {\n let error;\n const prop = props[propName];\n if (!props.children.length) {\n error = new Error(\n `${component} should have both Label and Input components`\n );\n } else if (\n props.children[0].type.displayName !== \"Styled(Label)\" ||\n props.children[1].type.displayName !== \"Styled(Input)\"\n ) {\n error = new Error(\n `${component} should have Label and Input components only`\n );\n }\n return error;\n};\n\nItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ]),\n inlineLabel: PropTypes.bool,\n floatingLabel: PropTypes.bool,\n stackedLabel: PropTypes.bool,\n fixedLabel: PropTypes.bool,\n success: PropTypes.bool,\n error: PropTypes.bool\n};\n\nconst StyledItem = connectStyle(\"NativeBase.Item\", {}, mapPropsToStyleNames)(\n Item\n);\n\nexport { StyledItem as Item };\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Item.js"],"names":["Item","props","state","text","topAnim","Animated","Value","opacAnim","floatingLabel","inputProps","value","setState","isFocused","floatUp","getRef","_inputRef","nextProps","childrenArray","React","Children","toArray","children","_","remove","item","type","displayName","timing","toValue","duration","start","e","label","labelProps","newLabel","labelStyle","StyleSheet","flatten","fontSize","lineHeight","style","push","createElement","Label","key","float","floatBack","newChildren","input","Input","icon","iconProps","Icon","length","isIcon","i","name","position","left","last","right","top","opacity","paddingTop","Platform","OS","undefined","paddingBottom","renderLabel","c","onFocus","onBlur","onChangeText","stackedLabel","flexDirection","flex","width","variables","deviceWidth","roundedInputGroup","borderWidth","rounded","borderRadius","inputGroupRoundedBorderRadius","defaultProps","getInitialStyle","_root","prepareRootProps","renderChildren","Component","childrenType","propName","component","error","prop","Error","propTypes","TouchableOpacity","PropTypes","oneOfType","object","number","array","inlineLabel","bool","fixedLabel","success","StyledItem","mapPropsToStyleNames"],"mappings":"m1BAAA,4B;AACA,qC;AACA;;;;;;;AAOA;AACA;AACA;;AAEA;AACA,qD;AACA,mD;AACA,mE;AACA,8B;;AAEMA,I;AACJ,cAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AAC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AAb,CAAgC,EAAhC,CAAoCC,8BAApC;AACjB5G,IADiB,CAAnB,C;;;AAIuBA,I,CAAd2G,U","file":"Item.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport {\n TouchableOpacity,\n Animated,\n Platform,\n View,\n StyleSheet\n} from \"react-native\";\nimport { Input } from \"./Input\";\nimport { Label } from \"./Label\";\nimport { Icon } from \"./Icon\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport variables from \"../theme/variables/platform\";\nimport computeProps from \"../utils/computeProps\";\nimport mapPropsToStyleNames from \"../utils/mapPropsToStyleNames\";\nimport _ from \"lodash\";\n\nclass Item extends Component {\n constructor(props) {\n super(props);\n this.state = {\n text: \"\",\n topAnim: new Animated.Value(18),\n opacAnim: new Animated.Value(1)\n };\n }\n componentDidMount() {\n if (this.props.floatingLabel) {\n if (this.inputProps && this.inputProps.value) {\n this.setState({ isFocused: true });\n this.floatUp(-16);\n }\n if (this.inputProps && this.inputProps.getRef)\n this.inputProps.getRef(this._inputRef);\n }\n }\n componentWillReceiveProps(nextProps) {\n const childrenArray = React.Children.toArray(nextProps.children);\n let inputProps = {};\n _.remove(childrenArray, item => {\n if (item.type.displayName === \"Styled(Input)\") {\n inputProps = item.props;\n this.inputProps = item.props;\n return item;\n }\n });\n if (this.props.floatingLabel) {\n if (this.inputProps && this.inputProps.value) {\n this.setState({ isFocused: true });\n this.floatUp(-16);\n }\n if (this.inputProps && this.inputProps.getRef)\n this.inputProps.getRef(this._inputRef);\n }\n }\n\n floatBack() {\n Animated.timing(this.state.topAnim, {\n toValue: 18,\n duration: 150\n }).start();\n Animated.timing(this.state.opacAnim, {\n toValue: 1,\n duration: 150\n }).start();\n }\n\n floatUp(e) {\n Animated.timing(this.state.topAnim, {\n toValue: e || -22,\n duration: 150\n }).start();\n Animated.timing(this.state.opacAnim, {\n toValue: 0.7,\n duration: 150\n }).start();\n }\n\n renderLabel(label, labelProps) {\n const newLabel = [];\n let labelStyle = StyleSheet.flatten(\n { fontSize: 15, lineHeight: 30 },\n labelProps.style\n );\n if (this.props.floatingLabel) {\n if (this.state.isFocused) {\n newLabel.push(\n React.createElement(Label, {\n ...labelProps,\n key: \"newFLabel\",\n float: true,\n style: labelStyle\n })\n );\n this.floatUp(-16);\n } else {\n newLabel.push(label);\n this.floatBack();\n }\n } else {\n newLabel.push(\n React.createElement(Label, {\n ...labelProps,\n key: \"newLabel\"\n })\n );\n }\n return newLabel;\n }\n\n renderChildren() {\n const newChildren = [];\n const childrenArray = React.Children.toArray(this.props.children);\n\n let label = [];\n let labelProps = {};\n label = _.remove(childrenArray, item => {\n if (item.type === Label) {\n labelProps = item.props;\n return item;\n }\n });\n\n let input = [];\n let inputProps = {};\n input = _.remove(childrenArray, item => {\n if (item.type === Input) {\n inputProps = item.props;\n this.inputProps = item.props;\n return item;\n }\n });\n\n let icon = [];\n let iconProps = {};\n icon = _.remove(childrenArray, item => {\n if (item.type === Icon) {\n iconProps = item.props;\n return item;\n }\n });\n if (this.props.floatingLabel && icon.length) {\n let isIcon = false;\n for (let i = 0; i < this.props.children.length; i++) {\n if (this.props.children[i].props.name && this.props.children[i].type.displayName !== \"Styled(Input)\") {\n isIcon = true;\n newChildren.push(\n \n );\n }\n if (this.props.children[i].props.children) {\n newChildren.push(\n \n \n \n );\n newChildren.push(\n (this._inputRef = c)}\n key=\"l2\"\n {...inputProps}\n onFocus={() => {\n this.setState({ isFocused: true });\n inputProps.onFocus && inputProps.onFocus();\n }}\n onBlur={() => {\n inputProps.value\n ? this.setState({\n isFocused: true\n })\n : !this.state.text.length &&\n this.setState({ isFocused: false });\n inputProps.onBlur && inputProps.onBlur();\n }}\n onChangeText={text => {\n this.setState({ text });\n inputProps.onChangeText && inputProps.onChangeText(text);\n }}\n />\n );\n }\n }\n } else if (this.props.floatingLabel) {\n newChildren.push(\n \n \n \n );\n newChildren.push(\n (this._inputRef = c)}\n value={this.state.text}\n key=\"l2\"\n {...inputProps}\n onFocus={() => {\n this.setState({ isFocused: true });\n inputProps.onFocus && inputProps.onFocus();\n }}\n onBlur={() => {\n inputProps.value\n ? this.setState({\n isFocused: true\n })\n : !this.state.text.length && this.setState({ isFocused: false });\n inputProps.onBlur && inputProps.onBlur();\n }}\n onChangeText={text => {\n this.setState({ text });\n inputProps.onChangeText && inputProps.onChangeText(text);\n }}\n />\n );\n } else if (this.props.stackedLabel && icon.length) {\n newChildren.push(\n \n \n \n \n \n );\n } else {\n return this.props.children;\n }\n return newChildren;\n }\n getInitialStyle() {\n return {\n roundedInputGroup: {\n borderWidth: this.props.rounded ? variables.borderWidth * 2 : undefined,\n borderRadius: this.props.rounded\n ? variables.inputGroupRoundedBorderRadius\n : undefined\n }\n };\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().roundedInputGroup\n };\n\n return computeProps(this.props, defaultProps);\n }\n render() {\n return (\n (this._root = c)}\n {...this.prepareRootProps()}\n activeOpacity={1}\n >\n {this.renderChildren()}\n \n );\n }\n}\n\nconst childrenType = function (props, propName, component) {\n let error;\n const prop = props[propName];\n if (!props.children.length) {\n error = new Error(\n `${component} should have both Label and Input components`\n );\n } else if (\n props.children[0].type.displayName !== \"Styled(Label)\" ||\n props.children[1].type.displayName !== \"Styled(Input)\"\n ) {\n error = new Error(\n `${component} should have Label and Input components only`\n );\n }\n return error;\n};\n\nItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.number,\n PropTypes.array\n ]),\n inlineLabel: PropTypes.bool,\n floatingLabel: PropTypes.bool,\n stackedLabel: PropTypes.bool,\n fixedLabel: PropTypes.bool,\n success: PropTypes.bool,\n error: PropTypes.bool\n};\n\nconst StyledItem = connectStyle(\"NativeBase.Item\", {}, mapPropsToStyleNames)(\n Item\n);\n\nexport { StyledItem as Item };\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Card.js b/dist/src/theme/components/Card.js index 694632ff3..e7e465560 100644 --- a/dist/src/theme/components/Card.js +++ b/dist/src/theme/components/Card.js @@ -7,7 +7,9 @@ shadowColor:null, shadowOffset:null, shadowOpacity:null, shadowRadius:null, -elevation:null}, +elevation:null, +backgroundColor:"transparent", +borderWidth:0}, ".noShadow":{ shadowColor:null, diff --git a/dist/src/theme/components/Card.js.map b/dist/src/theme/components/Card.js.map index b6dd5f515..70f0d36c4 100644 --- a/dist/src/theme/components/Card.js.map +++ b/dist/src/theme/components/Card.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Card.js"],"names":["variables","variable","cardTheme","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","marginVertical","marginHorizontal","flex","borderWidth","borderRadius","cardBorderRadius","borderColor","cardBorderColor","flexWrap","backgroundColor","cardDefaultBg","width","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,WAAY;AAChB,eAAgB;AACdC,YAAa,IADC;AAEdC,aAAc,IAFA;AAGdC,cAAe,IAHD;AAIdC,aAAc,IAJA;AAKdC,UAAW,IALG,CADA;;AAQhB,YAAa;AACXJ,YAAa,IADF;AAEXC,aAAc,IAFH;AAGXC,cAAe,IAHJ;AAIXE,UAAW,IAJA,CARG;;AAchBC,eAAgB,CAdA;AAehBC,iBAAkB,CAfF;AAgBhBC,KAAM,CAhBU;AAiBhBC,YAAaX,UAAUW,WAjBP;AAkBhBC,aAAcZ,UAAUa,gBAlBR;AAmBhBC,YAAad,UAAUe,eAnBP;AAoBhBC,SAAU,QApBM;AAqBhBC,gBAAiBjB,UAAUkB,aArBX;AAsBhBf,YAAa,MAtBG;AAuBhBC,aAAc,CAAEe,MAAO,CAAT,CAAYC,OAAQ,CAApB,CAvBE;AAwBhBf,cAAe,GAxBC;AAyBhBC,aAAc,GAzBE;AA0BhBC,UAAW,CA1BK,CAAlB;;;AA6BA,MAAOL,UAAP;AACD,C","file":"Card.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const cardTheme = {\n \".transparent\": {\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n shadowRadius: null,\n elevation: null\n },\n \".noShadow\": {\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n elevation: null\n },\n marginVertical: 5,\n marginHorizontal: 2,\n flex: 1,\n borderWidth: variables.borderWidth,\n borderRadius: variables.cardBorderRadius,\n borderColor: variables.cardBorderColor,\n flexWrap: \"nowrap\",\n backgroundColor: variables.cardDefaultBg,\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 1.5,\n elevation: 3\n };\n\n return cardTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Card.js"],"names":["variables","variable","cardTheme","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","backgroundColor","borderWidth","marginVertical","marginHorizontal","flex","borderRadius","cardBorderRadius","borderColor","cardBorderColor","flexWrap","cardDefaultBg","width","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,WAAY;AAChB,eAAgB;AACdC,YAAa,IADC;AAEdC,aAAc,IAFA;AAGdC,cAAe,IAHD;AAIdC,aAAc,IAJA;AAKdC,UAAW,IALG;AAMdC,gBAAiB,aANH;AAOdC,YAAa,CAPC,CADA;;AAUhB,YAAa;AACXN,YAAa,IADF;AAEXC,aAAc,IAFH;AAGXC,cAAe,IAHJ;AAIXE,UAAW,IAJA,CAVG;;AAgBhBG,eAAgB,CAhBA;AAiBhBC,iBAAkB,CAjBF;AAkBhBC,KAAM,CAlBU;AAmBhBH,YAAaT,UAAUS,WAnBP;AAoBhBI,aAAcb,UAAUc,gBApBR;AAqBhBC,YAAaf,UAAUgB,eArBP;AAsBhBC,SAAU,QAtBM;AAuBhBT,gBAAiBR,UAAUkB,aAvBX;AAwBhBf,YAAa,MAxBG;AAyBhBC,aAAc,CAAEe,MAAO,CAAT,CAAYC,OAAQ,CAApB,CAzBE;AA0BhBf,cAAe,GA1BC;AA2BhBC,aAAc,GA3BE;AA4BhBC,UAAW,CA5BK,CAAlB;;;AA+BA,MAAOL,UAAP;AACD,C","file":"Card.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const cardTheme = {\n \".transparent\": {\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n shadowRadius: null,\n elevation: null,\n backgroundColor: \"transparent\",\n borderWidth: 0\n },\n \".noShadow\": {\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n elevation: null\n },\n marginVertical: 5,\n marginHorizontal: 2,\n flex: 1,\n borderWidth: variables.borderWidth,\n borderRadius: variables.cardBorderRadius,\n borderColor: variables.cardBorderColor,\n flexWrap: \"nowrap\",\n backgroundColor: variables.cardDefaultBg,\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 1.5,\n elevation: 3\n };\n\n return cardTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Header.js b/dist/src/theme/components/Header.js index bc0120135..fa13fef59 100644 --- a/dist/src/theme/components/Header.js +++ b/dist/src/theme/components/Header.js @@ -46,7 +46,9 @@ elevation:0, shadowColor:null, shadowOffset:null, shadowRadius:null, -shadowOpacity:null}, +shadowOpacity:null, +paddingTop:platform==="android"?_reactNative.StatusBar.currentHeight:undefined, +height:platform==="android"?variables.toolbarHeight+_reactNative.StatusBar.currentHeight:variables.toolbarHeight}, ".noShadow":{ elevation:0, diff --git a/dist/src/theme/components/Header.js.map b/dist/src/theme/components/Header.js.map index 9569cc509..c7e51bd99 100644 --- a/dist/src/theme/components/Header.js.map +++ b/dist/src/theme/components/Header.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Header.js"],"names":["variables","variable","platformStyle","platform","headerTheme","height","alignSelf","alignItems","justifyContent","paddingBottom","fontSize","titleFontSize","fontFamily","titleFontfamily","textAlign","fontWeight","subTitleFontSize","color","subtitleColor","backgroundColor","borderBottomColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","borderBottomWidth","flex","marginRight","paddingLeft","paddingRight","width","undefined","toolbarBtnTextColor","toolbarBtnColor","paddingHorizontal","buttonPadding","dropdownLinkColor","toolbarSearchIconSize","marginTop","lineHeight","searchBarInputHeight","searchBarHeight","borderColor","toolbarInputColor","borderRadius","marginLeft","iconHeaderSize","paddingTop","top","borderWidth","inverseTextColor","flexDirection","toolbarDefaultBg","PixelRatio","getPixelSizeForLayoutSize","toolbarDefaultBorder","toolbarHeight","StatusBar","left","right"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,eAAgBF,UAAUE,aAAhC;AACA,GAAMC,UAAWH,UAAUG,QAA3B;;AAEA,GAAMC,aAAc;AAClB,QAAS;AACPC,OAAQ,GADD;AAEP,kBAAmB;AACjBC,UAAW,YADM,CAFZ;;AAKP,kBAAmB;AACjBA,UAAW,UADM;AAEjBC,WAAY,YAFK;AAGjBC,eAAgB,QAHC;AAIjBC,cAAe,EAJE,CALZ;;AAWP,mBAAoB;AAClBH,UAAW,YADO,CAXb,CADS;;;AAgBlB,eAAgB;AACd,kBAAmB;AACjB,mBAAoB;AAClBI,SAAUV,UAAUW,aAAV,CAA0B,CADlB;AAElBC,WAAYZ,UAAUa,eAFJ;AAGlBC,UAAW,QAHO;AAIlBC,WAAY,KAJM;AAKlBN,cAAe,CALG,CADH;;AAQjB,sBAAuB;AACrBC,SAAUV,UAAUgB,gBADC;AAErBJ,WAAYZ,UAAUa,eAFD;AAGrBI,MAAOjB,UAAUkB,aAHI;AAIrBJ,UAAW,QAJU,CARN,CADL,CAhBE;;;;AAiClB,eAAgB;AACdK,gBAAiB,aADH;AAEdC,kBAAmB,aAFL;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,c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L,UAAUyD,aAtXE;AAuXlBpC,UAAW,CAvXO;AAwXlBC,YAAapB,gBAAkB,UAAlB,CAA+B,MAA/B,CAAwC8B,SAxXnC;AAyXlBT;AACErB,gBAAkB,UAAlB,CAA+B,CAAE6B,MAAO,CAAT,CAAY1B,OAAQ,CAApB,CAA/B,CAAyD2B,SA1XzC;AA2XlBP,cAAevB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqC8B,SA3XlC;AA4XlBR,aAActB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqC8B,SA5XjC;AA6XlBiB,IAAK,CA7Xa;AA8XlBU,KAAM,CA9XY;AA+XlBC,MAAO,CA/XW,CAApB;;;AAkYA,MAAOxD,YAAP;AACD,C","file":"Header.js","sourcesContent":["import { PixelRatio, StatusBar } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const headerTheme = {\n \".span\": {\n height: 128,\n \"NativeBase.Left\": {\n alignSelf: \"flex-start\"\n },\n \"NativeBase.Body\": {\n alignSelf: \"flex-end\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n paddingBottom: 26\n },\n \"NativeBase.Right\": {\n alignSelf: \"flex-start\"\n }\n },\n \".hasSubtitle\": {\n \"NativeBase.Body\": {\n \"NativeBase.Title\": {\n fontSize: variables.titleFontSize - 2,\n fontFamily: variables.titleFontfamily,\n textAlign: \"center\",\n fontWeight: \"500\",\n paddingBottom: 3\n },\n \"NativeBase.Subtitle\": {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: \"center\"\n }\n }\n },\n \".transparent\": {\n backgroundColor: \"transparent\",\n borderBottomColor: \"transparent\",\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \".noShadow\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \".hasTabs\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n borderBottomWidth: null\n },\n \".hasSegment\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n borderBottomWidth: null,\n \"NativeBase.Left\": {\n flex: 0.3\n },\n \"NativeBase.Right\": {\n flex: 0.3\n },\n \"NativeBase.Body\": {\n flex: 1,\n \"NativeBase.Segment\": {\n marginRight: 0,\n alignSelf: \"center\",\n \"NativeBase.Button\": {\n paddingLeft: 0,\n paddingRight: 0\n }\n }\n }\n },\n \".noLeft\": {\n \"NativeBase.Left\": {\n width: platform === \"ios\" ? undefined : 0,\n flex: platform === \"ios\" ? 1 : 0\n },\n \"NativeBase.Body\": {\n \"NativeBase.Title\": {\n paddingLeft: platform === \"ios\" ? undefined : 10\n },\n \"NativeBase.Subtitle\": {\n paddingLeft: platform === \"ios\" ? undefined : 10\n }\n }\n },\n \"NativeBase.Button\": {\n justifyContent: \"center\",\n alignSelf: \"center\",\n alignItems: \"center\",\n \".transparent\": {\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontWeight: \"600\"\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n paddingHorizontal: variables.buttonPadding\n },\n paddingHorizontal: 15\n },\n \".searchBar\": {\n \"NativeBase.Item\": {\n \"NativeBase.Icon\": {\n backgroundColor: \"transparent\",\n color: variables.dropdownLinkColor,\n fontSize: variables.toolbarSearchIconSize,\n alignItems: \"center\",\n marginTop: 2,\n paddingRight: 10,\n paddingLeft: 10\n },\n \"NativeBase.IconNB\": {\n backgroundColor: \"transparent\",\n color: null,\n alignSelf: \"center\"\n },\n \"NativeBase.Input\": {\n alignSelf: \"center\",\n lineHeight: null,\n height: variables.searchBarInputHeight\n },\n alignSelf: \"center\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n flex: 1,\n height: variables.searchBarHeight,\n borderColor: \"transparent\",\n backgroundColor: variables.toolbarInputColor\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n \"NativeBase.Text\": {\n fontWeight: \"500\"\n },\n paddingHorizontal: null,\n paddingLeft: platform === \"ios\" ? 10 : null\n },\n paddingHorizontal: platform === \"ios\" ? undefined : null,\n width: platform === \"ios\" ? undefined : 0,\n height: platform === \"ios\" ? undefined : 0\n }\n },\n \".rounded\": {\n \"NativeBase.Item\": {\n borderRadius:\n platform === \"ios\" && platformStyle !== \"material\" ? 25 : 3\n }\n },\n \"NativeBase.Left\": {\n \"NativeBase.Button\": {\n \".hasText\": {\n marginLeft: -10,\n height: 30,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 5,\n marginLeft: 2\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 0,\n marginLeft: 7,\n lineHeight: 19.5\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 5,\n marginLeft: 2\n }\n },\n \".transparent\": {\n marginLeft:\n platform === \"ios\" && platformStyle !== \"material\" ? -3 : 0,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize + 1\n : variables.iconHeaderSize,\n marginTop: 0,\n marginRight: 2,\n marginLeft: 1,\n paddingTop: 1\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize + 1\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginRight: 2,\n marginLeft: 1,\n paddingTop: 1\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 0,\n top: platform === \"ios\" ? 1 : -1.5,\n paddingLeft:\n platform === \"ios\" && platformStyle !== \"material\" ? 2 : 5,\n paddingRight:\n platform === \"ios\" && platformStyle !== \"material\"\n ? undefined\n : 10\n },\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n alignSelf: null,\n paddingRight: variables.buttonPadding,\n paddingLeft: platform === \"ios\" && platformStyle !== \"material\" ? 4 : 8\n },\n flex: platform === \"ios\" && platformStyle !== \"material\" ? 1 : 0.4,\n alignSelf: \"center\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Body\": {\n flex: 1,\n alignItems:\n platform === \"ios\" && platformStyle !== \"material\"\n ? \"center\"\n : \"flex-start\",\n alignSelf: \"center\",\n \"NativeBase.Segment\": {\n borderWidth: 0,\n alignSelf: \"flex-end\",\n marginRight: platform === \"ios\" ? -40 : -55\n },\n \"NativeBase.Button\": {\n alignSelf: \"center\",\n \".transparent\": {\n backgroundColor: \"transparent\"\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.Text\": {\n color: variables.inverseTextColor,\n backgroundColor: \"transparent\"\n }\n }\n },\n \"NativeBase.Right\": {\n \"NativeBase.Button\": {\n \".hasText\": {\n height: 30,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize - 2,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 5\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 14,\n lineHeight: 19.5\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize - 2,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 5\n }\n },\n \".transparent\": {\n marginRight: platform === \"ios\" ? -9 : -5,\n paddingLeft: 15,\n paddingRight: 12,\n paddingHorizontal: 15,\n borderRadius: 50,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize - 9\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginLeft: 2,\n marginRight: 0\n // paddingTop: 0\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize - 9\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginLeft: 2,\n marginRight: 0\n // paddingTop: 0\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 14,\n top: platform === \"ios\" ? 1 : -1.5,\n paddingRight:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? 0\n : undefined\n },\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n alignSelf: null,\n paddingHorizontal: variables.buttonPadding\n },\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-end\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\"\n },\n backgroundColor: variables.toolbarDefaultBg,\n flexDirection: \"row\",\n // paddingHorizontal: 10,\n paddingLeft:\n platform === \"ios\" && variables.platformStyle !== \"material\" ? 6 : 10,\n paddingRight: 10,\n justifyContent: \"center\",\n paddingTop: platform === \"ios\" ? 18 : 0,\n borderBottomWidth:\n platform === \"ios\" ? 1 / PixelRatio.getPixelSizeForLayoutSize(1) : 0,\n borderBottomColor: variables.toolbarDefaultBorder,\n height:\n variables.platform === \"ios\" && variables.platformStyle === \"material\"\n ? variables.toolbarHeight + StatusBar.height\n : variables.toolbarHeight,\n elevation: 3,\n shadowColor: platformStyle === \"material\" ? \"#000\" : undefined,\n shadowOffset:\n platformStyle === \"material\" ? { width: 0, height: 2 } : undefined,\n shadowOpacity: platformStyle === \"material\" ? 0.2 : undefined,\n shadowRadius: platformStyle === \"material\" ? 1.2 : undefined,\n top: 0,\n left: 0,\n right: 0\n };\n\n return headerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Header.js"],"names":["variables","variable","platformStyle","platform","headerTheme","height","alignSelf","alignItems","justifyContent","paddingBottom","fontSize","titleFontSize","fontFamily","titleFontfamily","textAlign","fontWeight","subTitleFontSize","color","subtitleColor","backgroundColor","borderBottomColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","paddingTop","StatusBar","currentHeight","undefined","toolbarHeight","borderBottomWidth","flex","marginRight","paddingLeft","paddingRight","width","toolbarBtnTextColor","toolbarBtnColor","paddingHorizontal","buttonPadding","dropdownLinkColor","toolbarSearchIconSize","marginTop","lineHeight","searchBarInputHeight","searchBarHeight","borderColor","toolbarInputColor","borderRadius","marginLeft","iconHeaderSize","top","borderWidth","inverseTextColor","flexDirection","toolbarDefaultBg","PixelRatio","getPixelSizeForLayoutSize","toolbarDefaultBorder","left","right"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB,2DAAbC,kBAAa;AACvC,GAAMC,eAAgBF,UAAUE,aAAhC;AACA,GAAMC,UAAWH,UAAUG,QAA3B;;AAEA,GAAMC,aAAc;AAClB,QAAS;AACPC,OAAQ,GADD;AAEP,kBAAmB;AACjBC,UAAW,YADM,CAFZ;;AAKP,kBAAmB;AACjBA,UAAW,UADM;AAEjBC,WAAY,YAFK;AAGjBC,eAAgB,QAHC;AAIjBC,cAAe,EAJE,CALZ;;AAWP,mBAAoB;AAClBH,UAAW,YADO,CAXb,CADS;;;AAgBlB,e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A/EO;AAgFlBC,WAAY,UAhFM;AAiFlBgD,cAAe,KAjFG;AAkFlB/C,eAAgB,UAlFE,CAtRF;;AA0WlBW,gBAAiBnB,UAAUwD,gBA1WT;AA2WlBD,cAAe,KA3WG;;AA6WlBrB;AACE/B,WAAa,KAAb,EAAsBH,UAAUE,aAAV,GAA4B,UAAlD,CAA+D,CAA/D,CAAmE,EA9WnD;AA+WlBiC,aAAc,EA/WI;AAgXlB3B,eAAgB,QAhXE;AAiXlBkB,WAAYvB,WAAa,KAAb,CAAqB,EAArB,CAA0B,CAjXpB;AAkXlB4B;AACE5B,WAAa,KAAb,CAAqB,EAAIsD,wBAAWC,yBAAX,CAAqC,CAArC,CAAzB,CAAmE,CAnXnD;AAoXlBtC,kBAAmBpB,UAAU2D,oBApXX;AAqXlBtD;AACEL,UAAUG,QAAV,GAAuB,KAAvB,EAAgCH,UAAUE,aAAV,GAA4B,UAA5D;AACIF,UAAU8B,aAAV,CAA0BH,uBAAUtB,MADxC;AAEIL,UAAU8B,aAxXE;AAyXlBT,UAAW,CAzXO;AA0XlBC,YAAapB,gBAAkB,UAAlB,CAA+B,MAA/B,CAAwC2B,SA1XnC;AA2XlBN;AACErB,gBAAkB,UAAlB,CAA+B,CAAEkC,MAAO,CAAT,CAAY/B,OAAQ,CAApB,CAA/B,CAAyDwB,SA5XzC;AA6XlBJ,cAAevB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqC2B,SA7XlC;AA8XlBL,aAActB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqC2B,SA9XjC;AA+XlBuB,IAAK,CA/Xa;AAgYlBQ,KAAM,CAhYY;AAiYlBC,MAAO,CAjYW,CAApB;;;AAoYA,MAAOzD,YAAP;AACD,C","file":"Header.js","sourcesContent":["import { PixelRatio, StatusBar } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const headerTheme = {\n \".span\": {\n height: 128,\n \"NativeBase.Left\": {\n alignSelf: \"flex-start\"\n },\n \"NativeBase.Body\": {\n alignSelf: \"flex-end\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n paddingBottom: 26\n },\n \"NativeBase.Right\": {\n alignSelf: \"flex-start\"\n }\n },\n \".hasSubtitle\": {\n \"NativeBase.Body\": {\n \"NativeBase.Title\": {\n fontSize: variables.titleFontSize - 2,\n fontFamily: variables.titleFontfamily,\n textAlign: \"center\",\n fontWeight: \"500\",\n paddingBottom: 3\n },\n \"NativeBase.Subtitle\": {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: \"center\"\n }\n }\n },\n \".transparent\": {\n backgroundColor: \"transparent\",\n borderBottomColor: \"transparent\",\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n paddingTop: platform === \"android\" ? StatusBar.currentHeight : undefined,\n height: platform === \"android\" ? variables.toolbarHeight + StatusBar.currentHeight : variables.toolbarHeight\n },\n \".noShadow\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \".hasTabs\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n borderBottomWidth: null\n },\n \".hasSegment\": {\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n borderBottomWidth: null,\n \"NativeBase.Left\": {\n flex: 0.3\n },\n \"NativeBase.Right\": {\n flex: 0.3\n },\n \"NativeBase.Body\": {\n flex: 1,\n \"NativeBase.Segment\": {\n marginRight: 0,\n alignSelf: \"center\",\n \"NativeBase.Button\": {\n paddingLeft: 0,\n paddingRight: 0\n }\n }\n }\n },\n \".noLeft\": {\n \"NativeBase.Left\": {\n width: platform === \"ios\" ? undefined : 0,\n flex: platform === \"ios\" ? 1 : 0\n },\n \"NativeBase.Body\": {\n \"NativeBase.Title\": {\n paddingLeft: platform === \"ios\" ? undefined : 10\n },\n \"NativeBase.Subtitle\": {\n paddingLeft: platform === \"ios\" ? undefined : 10\n }\n }\n },\n \"NativeBase.Button\": {\n justifyContent: \"center\",\n alignSelf: \"center\",\n alignItems: \"center\",\n \".transparent\": {\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontWeight: \"600\"\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n paddingHorizontal: variables.buttonPadding\n },\n paddingHorizontal: 15\n },\n \".searchBar\": {\n \"NativeBase.Item\": {\n \"NativeBase.Icon\": {\n backgroundColor: \"transparent\",\n color: variables.dropdownLinkColor,\n fontSize: variables.toolbarSearchIconSize,\n alignItems: \"center\",\n marginTop: 2,\n paddingRight: 10,\n paddingLeft: 10\n },\n \"NativeBase.IconNB\": {\n backgroundColor: \"transparent\",\n color: null,\n alignSelf: \"center\"\n },\n \"NativeBase.Input\": {\n alignSelf: \"center\",\n lineHeight: null,\n height: variables.searchBarInputHeight\n },\n alignSelf: \"center\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n flex: 1,\n height: variables.searchBarHeight,\n borderColor: \"transparent\",\n backgroundColor: variables.toolbarInputColor\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n \"NativeBase.Text\": {\n fontWeight: \"500\"\n },\n paddingHorizontal: null,\n paddingLeft: platform === \"ios\" ? 10 : null\n },\n paddingHorizontal: platform === \"ios\" ? undefined : null,\n width: platform === \"ios\" ? undefined : 0,\n height: platform === \"ios\" ? undefined : 0\n }\n },\n \".rounded\": {\n \"NativeBase.Item\": {\n borderRadius:\n platform === \"ios\" && platformStyle !== \"material\" ? 25 : 3\n }\n },\n \"NativeBase.Left\": {\n \"NativeBase.Button\": {\n \".hasText\": {\n marginLeft: -10,\n height: 30,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 5,\n marginLeft: 2\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 0,\n marginLeft: 7,\n lineHeight: 19.5\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 5,\n marginLeft: 2\n }\n },\n \".transparent\": {\n marginLeft:\n platform === \"ios\" && platformStyle !== \"material\" ? -3 : 0,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize + 1\n : variables.iconHeaderSize,\n marginTop: 0,\n marginRight: 2,\n marginLeft: 1,\n paddingTop: 1\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize + 1\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginRight: 2,\n marginLeft: 1,\n paddingTop: 1\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 0,\n top: platform === \"ios\" ? 1 : -1.5,\n paddingLeft:\n platform === \"ios\" && platformStyle !== \"material\" ? 2 : 5,\n paddingRight:\n platform === \"ios\" && platformStyle !== \"material\"\n ? undefined\n : 10\n },\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n alignSelf: null,\n paddingRight: variables.buttonPadding,\n paddingLeft: platform === \"ios\" && platformStyle !== \"material\" ? 4 : 8\n },\n flex: platform === \"ios\" && platformStyle !== \"material\" ? 1 : 0.4,\n alignSelf: \"center\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Body\": {\n flex: 1,\n alignItems:\n platform === \"ios\" && platformStyle !== \"material\"\n ? \"center\"\n : \"flex-start\",\n alignSelf: \"center\",\n \"NativeBase.Segment\": {\n borderWidth: 0,\n alignSelf: \"flex-end\",\n marginRight: platform === \"ios\" ? -40 : -55\n },\n \"NativeBase.Button\": {\n alignSelf: \"center\",\n \".transparent\": {\n backgroundColor: \"transparent\"\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.Text\": {\n color: variables.inverseTextColor,\n backgroundColor: \"transparent\"\n }\n }\n },\n \"NativeBase.Right\": {\n \"NativeBase.Button\": {\n \".hasText\": {\n height: 30,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize - 2,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 5\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 14,\n lineHeight: 19.5\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize - 2,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 5\n }\n },\n \".transparent\": {\n marginRight: platform === \"ios\" ? -9 : -5,\n paddingLeft: 15,\n paddingRight: 12,\n paddingHorizontal: 15,\n borderRadius: 50,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize - 9\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginLeft: 2,\n marginRight: 0\n // paddingTop: 0\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? variables.iconHeaderSize - 9\n : variables.iconHeaderSize - 2,\n marginTop: 0,\n marginLeft: 2,\n marginRight: 0\n // paddingTop: 0\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnTextColor,\n fontSize: platform === \"ios\" ? 17 : 14,\n top: platform === \"ios\" ? 1 : -1.5,\n paddingRight:\n platform === \"ios\" && variables.platformStyle !== \"material\"\n ? 0\n : undefined\n },\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor\n },\n alignSelf: null,\n paddingHorizontal: variables.buttonPadding\n },\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-end\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\"\n },\n backgroundColor: variables.toolbarDefaultBg,\n flexDirection: \"row\",\n // paddingHorizontal: 10,\n paddingLeft:\n platform === \"ios\" && variables.platformStyle !== \"material\" ? 6 : 10,\n paddingRight: 10,\n justifyContent: \"center\",\n paddingTop: platform === \"ios\" ? 18 : 0,\n borderBottomWidth:\n platform === \"ios\" ? 1 / PixelRatio.getPixelSizeForLayoutSize(1) : 0,\n borderBottomColor: variables.toolbarDefaultBorder,\n height:\n variables.platform === \"ios\" && variables.platformStyle === \"material\"\n ? variables.toolbarHeight + StatusBar.height\n : variables.toolbarHeight,\n elevation: 3,\n shadowColor: platformStyle === \"material\" ? \"#000\" : undefined,\n shadowOffset:\n platformStyle === \"material\" ? { width: 0, height: 2 } : undefined,\n shadowOpacity: platformStyle === \"material\" ? 0.2 : undefined,\n shadowRadius: platformStyle === \"material\" ? 1.2 : undefined,\n top: 0,\n left: 0,\n right: 0\n };\n\n return headerTheme;\n};\n"]} \ No newline at end of file