diff --git a/addEjectScript.js b/addEjectScript.js index 47539f79c..0dec5eca0 100644 --- a/addEjectScript.js +++ b/addEjectScript.js @@ -1,10 +1,13 @@ -const printMessage = require('print-message'); +const printMessage = require("print-message"); -printMessage([ - 'NativeBase 2.0 has been succesfully installed!', - 'Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.', - 'Head over to the docs for detailed information on how to make changes to the theme.', -], { - color: 'yellow', - borderColor: 'green', -}); \ No newline at end of file +printMessage( + [ + "NativeBase 2.0 has been succesfully installed!", + "Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.", + "Head over to the docs for detailed information on how to make changes to the theme." + ], + { + color: "yellow", + borderColor: "green" + } +); diff --git a/backward.js b/backward.js index bb1d2de8d..2b621e413 100644 --- a/backward.js +++ b/backward.js @@ -1 +1 @@ -module.exports = require('./dist/src/backward'); +module.exports = require("./dist/src/backward"); diff --git a/dist/__tests__/backward/Button.android.js b/dist/__tests__/backward/Button.android.js index 27400dbee..ec9d336f0 100644 --- a/dist/__tests__/backward/Button.android.js +++ b/dist/__tests__/backward/Button.android.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/backward/Button.android.js';require('react-native'); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _react=require('react');var _react2=_interopRequireDefault(_react); @@ -16,7 +16,7 @@ return Platform; it('renders regular button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Button.Button,null,'Test')). +_react2.default.createElement(_Button.Button,{__source:{fileName:_jsxFileName,lineNumber:19}},'Test')). toJSON(); diff --git a/dist/__tests__/backward/Button.android.js.map b/dist/__tests__/backward/Button.android.js.map index e6588e5b8..65c624022 100644 --- a/dist/__tests__/backward/Button.android.js.map +++ b/dist/__tests__/backward/Button.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/backward/Button.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,sD;;AAEA,4B;AACA,2D;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,yDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.android.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/backward/Widgets/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/backward/Button.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"wDAAA;AACA,sD;;AAEA,4B;AACA,2D;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,qGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.android.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/backward/Widgets/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/backward/Button.ios.js b/dist/__tests__/backward/Button.ios.js index 9bf547c58..8542568b8 100644 --- a/dist/__tests__/backward/Button.ios.js +++ b/dist/__tests__/backward/Button.ios.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/backward/Button.ios.js';require('react-native'); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _react=require('react');var _react2=_interopRequireDefault(_react); @@ -16,7 +16,7 @@ return Platform; it('renders regular button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Button.Button,null,'Test')). +_react2.default.createElement(_Button.Button,{__source:{fileName:_jsxFileName,lineNumber:19}},'Test')). toJSON(); diff --git a/dist/__tests__/backward/Button.ios.js.map b/dist/__tests__/backward/Button.ios.js.map index 747398627..0f33caad7 100644 --- a/dist/__tests__/backward/Button.ios.js.map +++ b/dist/__tests__/backward/Button.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/backward/Button.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,sD;;AAEA,4B;AACA,2D;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,yDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.ios.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/backward/Widgets/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/backward/Button.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"oDAAA;AACA,sD;;AAEA,4B;AACA,2D;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,qGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.ios.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/backward/Widgets/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/backward/Header.android.js b/dist/__tests__/backward/Header.android.js index 70e56ecb7..7af1e4de5 100644 --- a/dist/__tests__/backward/Header.android.js +++ b/dist/__tests__/backward/Header.android.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/backward/Header.android.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Header=require('./../../src/backward/Widgets/Header'); @@ -18,22 +18,22 @@ jest.mock('ScrollView',function(){return'ScrollView';}); it('renders correctly',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null)). +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:21}})). toJSON(); expect(tree).toMatchSnapshot(); }); it('renders header with buttons',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:28}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:29}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:30}})), -_react2.default.createElement(_Title.Title,null,'Header'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:33}},'Header'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:35}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:36}})))). toJSON(); @@ -42,9 +42,9 @@ expect(tree).toMatchSnapshot(); it('renders header with a null button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:45}}, null, -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:47}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -52,16 +52,16 @@ expect(tree).toMatchSnapshot(); it('renders header with buttons and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:55}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:56}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:57}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:60}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:61}},'Subtitle'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:63}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:64}})))). toJSON(); @@ -70,12 +70,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:73}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:74}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:75}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:78}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -83,13 +83,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:86}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:87}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:88}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:91}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:92}},'Subtitle'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -97,12 +97,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and iconRight',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:100}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:101}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:102}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:105}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -110,13 +110,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button, iconRight and a subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:113}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:114}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:115}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'SubTitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:118}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:119}},'SubTitle'))). toJSON(); expect(tree).toMatchSnapshot(); diff --git a/dist/__tests__/backward/Header.android.js.map b/dist/__tests__/backward/Header.android.js.map index 16975fc0c..849420a7d 100644 --- a/dist/__tests__/backward/Header.android.js.map +++ b/dist/__tests__/backward/Header.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/backward/Header.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,KAAKC,IAAL,CAAU,YAAV,CAAwB,iBAAM,YAAN,EAAxB;;AAEAK,GAAG,mBAAH,CAAwB,UAAM;AAC1B,GAAMC,MAAO,4BAASC,MAAT;AACT,kDADS;AAEXC,MAFW,EAAb;AAGAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CALD;;AAOAL,GAAG,6BAAH,CAAkC,UAAM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,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/backward/Widgets/Header';\nimport { Button } from './../../src/backward/Widgets/Button';\nimport { Icon } from './../../src/backward/Widgets/Icon';\nimport { Title } from './../../src/backward/Widgets/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/backward/Header.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"wDAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,KAAKC,IAAL,CAAU,YAAV,CAAwB,iBAAM,YAAN,EAAxB;;AAEAK,GAAG,mBAAH,CAAwB,UAAM;AAC1B,GAAMC,MAAO,4BAASC,MAAT;AACT,8FADS;AAEXC,MAFW,EAAb;AAGAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CALD;;AAOAL,GAAG,6BAAH,CAAkC,UAAM;AACpC,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,iDADJ,CADJ;;;AAKI,qGALJ;;AAOI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,UAAX,iDADJ,CAPJ,CADS;;;AAYXC,MAZW,EAAb;AAaAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAfD;;AAiBAL,GAAG,mCAAH,CAAwC,UAAM;A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,CADJ;;;AAKI,sGALJ;AAMI,8GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/backward/Widgets/Header';\nimport { Button } from './../../src/backward/Widgets/Button';\nimport { Icon } from './../../src/backward/Widgets/Icon';\nimport { Title } from './../../src/backward/Widgets/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file diff --git a/dist/__tests__/backward/Header.ios.js b/dist/__tests__/backward/Header.ios.js index c207a2e8e..dda4789dc 100644 --- a/dist/__tests__/backward/Header.ios.js +++ b/dist/__tests__/backward/Header.ios.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/backward/Header.ios.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Header=require('./../../src/backward/Widgets/Header'); @@ -18,22 +18,22 @@ jest.mock('ScrollView',function(){return'ScrollView';}); it('renders correctly',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null)). +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:21}})). toJSON(); expect(tree).toMatchSnapshot(); }); it('renders header with buttons',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:28}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:29}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:30}})), -_react2.default.createElement(_Title.Title,null,'Header'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:33}},'Header'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:35}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:36}})))). toJSON(); @@ -42,9 +42,9 @@ expect(tree).toMatchSnapshot(); it('renders header with a null button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:45}}, null, -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:47}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -52,16 +52,16 @@ expect(tree).toMatchSnapshot(); it('renders header with buttons and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:55}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:56}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:57}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:60}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:61}},'Subtitle'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:63}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:64}})))). toJSON(); @@ -70,12 +70,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:73}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:74}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:75}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:78}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -83,13 +83,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:86}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:87}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:88}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:91}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:92}},'Subtitle'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -97,12 +97,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and iconRight',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:100}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:101}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:102}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:105}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -110,13 +110,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button, iconRight and a subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:113}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:114}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:115}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'SubTitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:118}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:119}},'SubTitle'))). toJSON(); expect(tree).toMatchSnapshot(); diff --git a/dist/__tests__/backward/Header.ios.js.map b/dist/__tests__/backward/Header.ios.js.map index 6d732e871..7db909102 100644 --- a/dist/__tests__/backward/Header.ios.js.map +++ b/dist/__tests__/backward/Header.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/backward/Header.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,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AACzD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD;;AAcAL,GAAG,mDAAH,CAAwD,UAAM;AAC1D,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/backward/Widgets/Header';\nimport { Button } from './../../src/backward/Widgets/Button';\nimport { Icon } from './../../src/backward/Widgets/Icon';\nimport { Title } from './../../src/backward/Widgets/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/backward/Header.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"oDAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,KAAKC,IAAL,CAAU,YAAV,CAAwB,iBAAM,YAAN,EAAxB;;AAEAK,GAAG,mBAAH,CAAwB,UAAM;AAC1B,GAAMC,MAAO,4BAASC,MAAT;AACT,8FADS;AAEXC,MAFW,EAAb;AAGAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CALD;;AAOAL,GAAG,6BAAH,CAAkC,U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,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ;AAMI,8GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/backward/Widgets/Header';\nimport { Button } from './../../src/backward/Widgets/Button';\nimport { Icon } from './../../src/backward/Widgets/Icon';\nimport { Title } from './../../src/backward/Widgets/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Badge.android.js b/dist/__tests__/basic/Badge.android.js index 25c208564..88339ff48 100644 --- a/dist/__tests__/basic/Badge.android.js +++ b/dist/__tests__/basic/Badge.android.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Badge.android.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Badge=require('./../../src/basic/Badge');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} @@ -15,7 +15,7 @@ return Platform; it('renders regular badge',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Badge.Badge,null,'2')). +_react2.default.createElement(_Badge.Badge,{__source:{fileName:_jsxFileName,lineNumber:18}},'2')). toJSON(); diff --git a/dist/__tests__/basic/Badge.android.js.map b/dist/__tests__/basic/Badge.android.js.map index dc63b736a..066351689 100644 --- a/dist/__tests__/basic/Badge.android.js.map +++ b/dist/__tests__/basic/Badge.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Badge.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA,8C;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,uBAAH,CAA4B,UAAM;AAC/B,GAAMC,MAAO,4BAASC,MAAT;AACT,oDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Badge.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Badge } from './../../src/basic/Badge';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular badge', () => {\n const tree = renderer.create(\n \n 2\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Badge.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"oDAAA;AACA,4B;AACA,sD;AACA,8C;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,uBAAH,CAA4B,UAAM;AAC/B,GAAMC,MAAO,4BAASC,MAAT;AACT,gGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Badge.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Badge } from './../../src/basic/Badge';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular badge', () => {\n const tree = renderer.create(\n \n 2\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Badge.ios.js b/dist/__tests__/basic/Badge.ios.js index 2ac889525..09a2e2c0f 100644 --- a/dist/__tests__/basic/Badge.ios.js +++ b/dist/__tests__/basic/Badge.ios.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Badge.ios.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Badge=require('./../../src/basic/Badge');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} @@ -15,7 +15,7 @@ return Platform; it('renders regular badge',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Badge.Badge,null,'2')). +_react2.default.createElement(_Badge.Badge,{__source:{fileName:_jsxFileName,lineNumber:18}},'2')). toJSON(); diff --git a/dist/__tests__/basic/Badge.ios.js.map b/dist/__tests__/basic/Badge.ios.js.map index 132a33cef..b1431467d 100644 --- a/dist/__tests__/basic/Badge.ios.js.map +++ b/dist/__tests__/basic/Badge.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Badge.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA,8C;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,uBAAH,CAA4B,UAAM;AAC/B,GAAMC,MAAO,4BAASC,MAAT;AACT,oDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Badge.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Badge } from './../../src/basic/Badge';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular badge', () => {\n const tree = renderer.create(\n \n 2\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Badge.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"gDAAA;AACA,4B;AACA,sD;AACA,8C;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,uBAAH,CAA4B,UAAM;AAC/B,GAAMC,MAAO,4BAASC,MAAT;AACT,gGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Badge.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Badge } from './../../src/basic/Badge';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular badge', () => {\n const tree = renderer.create(\n \n 2\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Button.android.js b/dist/__tests__/basic/Button.android.js index 62289ba2b..7a5e63be2 100644 --- a/dist/__tests__/basic/Button.android.js +++ b/dist/__tests__/basic/Button.android.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Button.android.js';require('react-native'); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _react=require('react');var _react2=_interopRequireDefault(_react); @@ -16,7 +16,7 @@ return Platform; it('renders regular button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Button.Button,null,'Test')). +_react2.default.createElement(_Button.Button,{__source:{fileName:_jsxFileName,lineNumber:19}},'Test')). toJSON(); diff --git a/dist/__tests__/basic/Button.android.js.map b/dist/__tests__/basic/Button.android.js.map index 6157bc5a4..fbfa75558 100644 --- a/dist/__tests__/basic/Button.android.js.map +++ b/dist/__tests__/basic/Button.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Button.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,sD;;AAEA,4B;AACA,gD;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,yDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.android.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/basic/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Button.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"qDAAA;AACA,sD;;AAEA,4B;AACA,gD;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,qGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.android.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/basic/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Button.ios.js b/dist/__tests__/basic/Button.ios.js index f05ef7552..c31851ead 100644 --- a/dist/__tests__/basic/Button.ios.js +++ b/dist/__tests__/basic/Button.ios.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Button.ios.js';require('react-native'); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _react=require('react');var _react2=_interopRequireDefault(_react); @@ -16,7 +16,7 @@ return Platform; it('renders regular button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Button.Button,null,'Test')). +_react2.default.createElement(_Button.Button,{__source:{fileName:_jsxFileName,lineNumber:19}},'Test')). toJSON(); diff --git a/dist/__tests__/basic/Button.ios.js.map b/dist/__tests__/basic/Button.ios.js.map index 4f3dc13c8..f372be939 100644 --- a/dist/__tests__/basic/Button.ios.js.map +++ b/dist/__tests__/basic/Button.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Button.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,sD;;AAEA,4B;AACA,gD;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,yDADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.ios.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/basic/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Button.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"iDAAA;AACA,sD;;AAEA,4B;AACA,gD;;;;;AAKAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;;;AAOAI,GAAG,wBAAH,CAA6B,UAAM;AAChC,GAAMC,MAAO,4BAASC,MAAT;AACT,qGADS;;;AAIXC,MAJW,EAAb;AAKCC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAPD","file":"Button.ios.js","sourcesContent":["import 'react-native';\nimport renderer from 'react-test-renderer';\n\nimport React from 'react';\nimport { Button } from './../../src/basic/Button';\n// import Icon from '../../../Components/Widgets/Icon';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\n\n\nit('renders regular button', () => {\n const tree = renderer.create(\n \n ).toJSON();\n expect(tree).toMatchSnapshot();\n});"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Header.android.js b/dist/__tests__/basic/Header.android.js index 91940440b..95ed73e13 100644 --- a/dist/__tests__/basic/Header.android.js +++ b/dist/__tests__/basic/Header.android.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Header.android.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Header=require('./../../src/basic/Header'); @@ -18,22 +18,22 @@ jest.mock('ScrollView',function(){return'ScrollView';}); it('renders correctly',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null)). +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:21}})). toJSON(); expect(tree).toMatchSnapshot(); }); it('renders header with buttons',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:28}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:29}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:30}})), -_react2.default.createElement(_Title.Title,null,'Header'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:33}},'Header'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:35}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:36}})))). toJSON(); @@ -42,9 +42,9 @@ expect(tree).toMatchSnapshot(); it('renders header with a null button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:45}}, null, -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:47}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -52,16 +52,16 @@ expect(tree).toMatchSnapshot(); it('renders header with buttons and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:55}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:56}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:57}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:60}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:61}},'Subtitle'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:63}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:64}})))). toJSON(); @@ -70,12 +70,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:73}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:74}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:75}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:78}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -83,13 +83,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:86}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:87}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:88}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:91}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:92}},'Subtitle'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -97,12 +97,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and iconRight',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:100}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:101}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:102}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:105}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -110,13 +110,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button, iconRight and a subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:113}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:114}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:115}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'SubTitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:118}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:119}},'SubTitle'))). toJSON(); expect(tree).toMatchSnapshot(); diff --git a/dist/__tests__/basic/Header.android.js.map b/dist/__tests__/basic/Header.android.js.map index 3a5f13701..7d6579aac 100644 --- a/dist/__tests__/basic/Header.android.js.map +++ b/dist/__tests__/basic/Header.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Header.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,KAAKC,IAAL,CAAU,YAAV,CAAwB,iBAAM,YAAN,EAAxB;;AAEAK,GAAG,mBAAH,CAAwB,UAAM;AAC1B,GAAMC,MAAO,4BAASC,MAAT;AACT,kDADS;AAEXC,MAFW,EAAb;AAGAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CALD;;AAOAL,GAAG,6BAAH,CAAkC,UAAM;AACpC,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;;AAOI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,UAAX,EADJ,CAPJ,CADS;;;AAYXC,MAZW,EAAb;AAaAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAfD;;AAiBAL,GAAG,mCAAH,CAAwC,UAAM;AAC1C,GAAMC,MAAO,4BAASC,MAAT;AACT;AACK,IADL;AAEI,yDAFJ,CADS;;AAKXC,MALW,EAAb;AAMAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CARD;;AAUAL,GAAG,0CAAH,CAA+C,UAAM;AACjD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ;;AAQI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,UAAX,EADJ,CARJ,CADS;;;AAaXC,MAbW,EAAb;AAcAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAhBD;;AAkBAL,GAAG,qCAAH,CAA0C,UAAM;AAC5C,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,kDAAH,CAAuD,UAAM;AACzD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD;;AAcAL,GAAG,mDAAH,CAAwD,UAAM;AAC1D,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/basic/Header';\nimport { Button } from './../../src/basic/Button';\nimport { Icon } from './../../src/basic/Icon';\nimport { Title } from './../../src/basic/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Header.android.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"qDAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,SAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,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,gBAAR;AACI,0CAAM,KAAK,gBAAX,iDADJ,CADJ;;;AAKI,qGALJ;AAMI,6GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD;;AAcAL,GAAG,mDAAH,CAAwD,UAAM;AAC1D,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ;AAMI,8GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.android.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/basic/Header';\nimport { Button } from './../../src/basic/Button';\nimport { Icon } from './../../src/basic/Icon';\nimport { Title } from './../../src/basic/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'android';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file diff --git a/dist/__tests__/basic/Header.ios.js b/dist/__tests__/basic/Header.ios.js index 2d3e25b54..0974f714a 100644 --- a/dist/__tests__/basic/Header.ios.js +++ b/dist/__tests__/basic/Header.ios.js @@ -1,4 +1,4 @@ -require('react-native'); +var _jsxFileName='__tests__/basic/Header.ios.js';require('react-native'); var _react=require('react');var _react2=_interopRequireDefault(_react); var _reactTestRenderer=require('react-test-renderer');var _reactTestRenderer2=_interopRequireDefault(_reactTestRenderer); var _Header=require('./../../src/basic/Header'); @@ -18,22 +18,22 @@ jest.mock('ScrollView',function(){return'ScrollView';}); it('renders correctly',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null)). +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:21}})). toJSON(); expect(tree).toMatchSnapshot(); }); it('renders header with buttons',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:28}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:29}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:30}})), -_react2.default.createElement(_Title.Title,null,'Header'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:33}},'Header'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:35}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:36}})))). toJSON(); @@ -42,9 +42,9 @@ expect(tree).toMatchSnapshot(); it('renders header with a null button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:45}}, null, -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:47}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -52,16 +52,16 @@ expect(tree).toMatchSnapshot(); it('renders header with buttons and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:55}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:56}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:57}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'), +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:60}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:61}},'Subtitle'), -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-menu'})))). +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:63}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-menu',__source:{fileName:_jsxFileName,lineNumber:64}})))). toJSON(); @@ -70,12 +70,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:73}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:74}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:75}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:78}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -83,13 +83,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,null, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{__source:{fileName:_jsxFileName,lineNumber:86}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:87}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:88}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'Subtitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:91}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:92}},'Subtitle'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -97,12 +97,12 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button and iconRight',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:100}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:101}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:102}})), -_react2.default.createElement(_Title.Title,null,'Header'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:105}},'Header'))). toJSON(); expect(tree).toMatchSnapshot(); @@ -110,13 +110,13 @@ expect(tree).toMatchSnapshot(); it('renders header with just one button, iconRight and a subtitle',function(){ var tree=_reactTestRenderer2.default.create( -_react2.default.createElement(_Header.Header,{iconRight:true}, -_react2.default.createElement(_Button.Button,{transparent:true}, -_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back'})), +_react2.default.createElement(_Header.Header,{iconRight:true,__source:{fileName:_jsxFileName,lineNumber:113}}, +_react2.default.createElement(_Button.Button,{transparent:true,__source:{fileName:_jsxFileName,lineNumber:114}}, +_react2.default.createElement(_Icon.Icon,{name:'ios-arrow-back',__source:{fileName:_jsxFileName,lineNumber:115}})), -_react2.default.createElement(_Title.Title,null,'Header'), -_react2.default.createElement(_Subtitle2.default,null,'SubTitle'))). +_react2.default.createElement(_Title.Title,{__source:{fileName:_jsxFileName,lineNumber:118}},'Header'), +_react2.default.createElement(_Subtitle2.default,{__source:{fileName:_jsxFileName,lineNumber:119}},'SubTitle'))). toJSON(); expect(tree).toMatchSnapshot(); diff --git a/dist/__tests__/basic/Header.ios.js.map b/dist/__tests__/basic/Header.ios.js.map index c4680de50..67fe7c733 100644 --- a/dist/__tests__/basic/Header.ios.js.map +++ b/dist/__tests__/basic/Header.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../__tests__/basic/Header.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapshot"],"mappings":"AAAA;AACA,4B;AACA,sD;AACA;AACA;AACA;AACA;AACA,+D;;;;AAIAA,KAAKC,IAAL,CAAU,UAAV,CAAsB,UAAM;AACxB,GAAMC,UAAWC,QAAQC,aAAR,CAAsB,UAAtB,CAAjB;AACAF,SAASG,EAAT,CAAc,KAAd;AACA,MAAOH,SAAP;AACH,CAJD;AAKAF,KAAKC,IAAL,CAAU,YAAV,CAAwB,iBAAM,YAAN,EAAxB;;AAEAK,GAAG,mBAAH,CAAwB,UAAM;AAC1B,GAAMC,MAAO,4BAASC,MAAT;AACT,kDADS;AAEXC,MAFW,EAAb;AAGAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CALD;;AAOAL,GAAG,6BAAH,CAAkC,UAAM;AACpC,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;;AAOI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,UAAX,EADJ,CAPJ,CADS;;;AAYXC,MAZW,EAAb;AAaAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAfD;;AAiBAL,GAAG,mCAAH,CAAwC,UAAM;AAC1C,GAAMC,MAAO,4BAASC,MAAT;AACT;AACK,IADL;AAEI,yDAFJ,CADS;;AAKXC,MALW,EAAb;AAMAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CARD;;AAUAL,GAAG,0CAAH,CAA+C,UAAM;AACjD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ;;AAQI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,UAAX,EADJ,CARJ,CADS;;;AAaXC,MAbW,EAAb;AAcAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAhBD;;AAkBAL,GAAG,qCAAH,CAA0C,UAAM;AAC5C,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,kDAAH,CAAuD,UAAM;AACzD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD;;AAcAL,GAAG,mDAAH,CAAwD,UAAM;AAC1D,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,EADJ,CADJ;;;AAKI,yDALJ;AAMI,iEANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/basic/Header';\nimport { Button } from './../../src/basic/Button';\nimport { Icon } from './../../src/basic/Icon';\nimport { Title } from './../../src/basic/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file +{"version":3,"sources":["../../../__tests__/basic/Header.ios.js"],"names":["jest","mock","Platform","require","requireActual","OS","it","tree","create","toJSON","expect","toMatchSnapsh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AT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,iDADJ,CADJ;;;AAKI,qGALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,kDAAH,CAAuD,UAAM;AACzD,GAAMC,MAAO,4BAASC,MAAT;AACT;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,iDADJ,CADJ;;;AAKI,qGALJ;AAMI,6GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD;;AAcAL,GAAG,mDAAH,CAAwD,UAAM;AAC1D,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ,CADS;;AAQXC,MARW,EAAb;AASAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAXD;;AAaAL,GAAG,+DAAH,CAAoE,UAAM;AACtE,GAAMC,MAAO,4BAASC,MAAT;AACT,8CAAQ,cAAR;AACI,8CAAQ,gBAAR;AACI,0CAAM,KAAK,gBAAX,kDADJ,CADJ;;;AAKI,sGALJ;AAMI,8GANJ,CADS;;AASXC,MATW,EAAb;AAUAC,OAAOH,IAAP,EAAaI,eAAb;AACH,CAZD","file":"Header.ios.js","sourcesContent":["import 'react-native';\nimport React from 'react';\nimport renderer from 'react-test-renderer';\nimport { Header } from './../../src/basic/Header';\nimport { Button } from './../../src/basic/Button';\nimport { Icon } from './../../src/basic/Icon';\nimport { Title } from './../../src/basic/Title';\nimport Subtitle from './../../src/backward/Widgets/Subtitle';\n\n// Note: test renderer must be required after react-native.\n\njest.mock('Platform', () => {\n const Platform = require.requireActual('Platform');\n Platform.OS = 'ios';\n return Platform;\n});\njest.mock('ScrollView', () => 'ScrollView');\n\nit('renders correctly', () => {\n const tree = renderer.create(\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons', () => {\n const tree = renderer.create(\n
\n \n\n Header\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with a null button', () => {\n const tree = renderer.create(\n
\n {null}\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with buttons and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n\n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n Subtitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button and iconRight', () => {\n const tree = renderer.create(\n
\n \n\n Header\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\nit('renders header with just one button, iconRight and a subtitle', () => {\n const tree = renderer.create(\n
\n \n\n Header\n SubTitle\n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n\n// jest-react-native doesn't work yet with that and mocking didn't work either.\n/*\nit('renders header with searchbar', () => {\n const tree = renderer.create(\n
\n \n \n \n \n \n \n
\n ).toJSON();\n expect(tree).toMatchSnapshot();\n});\n*/"]} \ No newline at end of file diff --git a/dist/addEjectScript.js b/dist/addEjectScript.js index 5ea3ad48f..22afca901 100644 --- a/dist/addEjectScript.js +++ b/dist/addEjectScript.js @@ -1,10 +1,12 @@ -var printMessage=require('print-message'); +var printMessage=require("print-message"); + +printMessage( +[ +"NativeBase 2.0 has been succesfully installed!", +"Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.", +"Head over to the docs for detailed information on how to make changes to the theme."], -printMessage([ -'NativeBase 2.0 has been succesfully installed!', -'Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.', -'Head over to the docs for detailed information on how to make changes to the theme.'], { -color:'yellow', -borderColor:'green'}); +color:"yellow", +borderColor:"green"}); //# sourceMappingURL=addEjectScript.js.map \ No newline at end of file diff --git a/dist/addEjectScript.js.map b/dist/addEjectScript.js.map index 6dbce5030..8195da134 100644 --- a/dist/addEjectScript.js.map +++ b/dist/addEjectScript.js.map @@ -1 +1 @@ -{"version":3,"sources":["../addEjectScript.js"],"names":["printMessage","require","color","borderColor"],"mappings":"AAAA,GAAMA,cAAeC,QAAQ,eAAR,CAArB;;AAEAD,aAAa;AACX,gDADW;AAEX,4FAFW;AAGX,qFAHW,CAAb;AAIG;AACDE,MAAO,QADN;AAEDC,YAAa,OAFZ,CAJH","file":"addEjectScript.js","sourcesContent":["const printMessage = require('print-message');\n\nprintMessage([\n 'NativeBase 2.0 has been succesfully installed!',\n 'Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.',\n 'Head over to the docs for detailed information on how to make changes to the theme.',\n], {\n color: 'yellow',\n borderColor: 'green',\n});"]} \ No newline at end of file +{"version":3,"sources":["../addEjectScript.js"],"names":["printMessage","require","color","borderColor"],"mappings":"AAAA,GAAMA,cAAeC,QAAQ,eAAR,CAArB;;AAEAD;AACE;AACE,gDADF;AAEE,4FAFF;AAGE,qFAHF,CADF;;AAME;AACEE,MAAO,QADT;AAEEC,YAAa,OAFf,CANF","file":"addEjectScript.js","sourcesContent":["const printMessage = require(\"print-message\");\n\nprintMessage(\n [\n \"NativeBase 2.0 has been succesfully installed!\",\n \"Run `node node_modules/native-base/ejectTheme.js` to copy over theme config and variables.\",\n \"Head over to the docs for detailed information on how to make changes to the theme.\"\n ],\n {\n color: \"yellow\",\n borderColor: \"green\"\n }\n);\n"]} \ No newline at end of file diff --git a/dist/backward.js b/dist/backward.js index 088fd09f0..d251389fa 100644 --- a/dist/backward.js +++ b/dist/backward.js @@ -1,2 +1,2 @@ -module.exports=require('./dist/src/backward'); +module.exports=require("./dist/src/backward"); //# sourceMappingURL=backward.js.map \ No newline at end of file diff --git a/dist/backward.js.map b/dist/backward.js.map index 30743c1a7..a9e5d3ee2 100644 --- a/dist/backward.js.map +++ b/dist/backward.js.map @@ -1 +1 @@ -{"version":3,"sources":["../backward.js"],"names":["module","exports","require"],"mappings":"AAAAA,OAAOC,OAAP,CAAiBC,QAAQ,qBAAR,CAAjB","file":"backward.js","sourcesContent":["module.exports = require('./dist/src/backward');\n"]} \ No newline at end of file +{"version":3,"sources":["../backward.js"],"names":["module","exports","require"],"mappings":"AAAAA,OAAOC,OAAP,CAAiBC,QAAQ,qBAAR,CAAjB","file":"backward.js","sourcesContent":["module.exports = require(\"./dist/src/backward\");\n"]} \ No newline at end of file diff --git a/dist/ejectTheme.js b/dist/ejectTheme.js index ccecb5b3c..b8b7712c4 100644 --- a/dist/ejectTheme.js +++ b/dist/ejectTheme.js @@ -1,35 +1,41 @@ -var fs=require('fs-extra'); -var path=require('path'); - -var printMessage=require('print-message'); +var fs=require("fs-extra"); +var path=require("path"); +var printMessage=require("print-message"); try{ -fs.copySync(path.join(__dirname,'src','theme'),path.join(process.cwd(),'native-base-theme')); -printMessage([ -'NativeBase theme has been copied at '+path.join(process.cwd(),'native-base-theme'), -'Here\'s how to theme your app', -'', -'import getTheme from \'./native-base-theme/components\';', -'export default class ThemeExample extends Component {', -'render() {', -' return (', -' ', -' ', -' ', -' ...', -' ', -' ', -' ', -' );', -'}', -'', -'Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization'], +fs.copySync( +path.join(__dirname,"src","theme"), +path.join(process.cwd(),"native-base-theme")); + +printMessage( +[ +"NativeBase theme has been copied at "+ +path.join(process.cwd(),"native-base-theme"), +"Here's how to theme your app", +"", +"import getTheme from './native-base-theme/components';", +"export default class ThemeExample extends Component {", +"render() {", +" return (", +" ", +" ", +" ", +" ...", +" ", +" ", +" ", +" );", +"}", +"", +"Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization"], + { -color:'yellow', -borderColor:'green'}); +color:"yellow", +borderColor:"green"}); + }catch(err){ -console.log('Error: '+err); +console.log("Error: "+err); } //# sourceMappingURL=ejectTheme.js.map \ No newline at end of file diff --git a/dist/ejectTheme.js.map b/dist/ejectTheme.js.map index fc3b13672..233600ec4 100644 --- a/dist/ejectTheme.js.map +++ b/dist/ejectTheme.js.map @@ -1 +1 @@ -{"version":3,"sources":["../ejectTheme.js"],"names":["fs","require","path","printMessage","copySync","join","__dirname","process","cwd","color","borderColor","err","console","log"],"mappings":"AAAA,GAAIA,IAAKC,QAAQ,UAAR,CAAT;AACA,GAAIC,MAAOD,QAAQ,MAAR,CAAX;;AAEA,GAAIE,cAAeF,QAAQ,eAAR,CAAnB;;;AAGA,GAAI;AACFD,GAAGI,QAAH,CAAYF,KAAKG,IAAL,CAAUC,SAAV,CAAqB,KAArB,CAA4B,OAA5B,CAAZ,CAAkDJ,KAAKG,IAAL,CAAUE,QAAQC,GAAR,EAAV,CAAyB,mBAAzB,CAAlD;AACAL,aAAa;AACX,uCAAyCD,KAAKG,IAAL,CAAUE,QAAQC,GAAR,EAAV,CAAyB,mBAAzB,CAD9B;AAEX,+BAFW;AAGX,EAHW;AAIX,0DAJW;AAKX,uDALW;AAMX,YANW;AAOX,YAPW;AAQX,yCARW;AASX,mBATW;AAUX,mBAVW;AAWX,eAXW;AAYX,oBAZW;AAaX,oBAbW;AAcX,sBAdW;AAeX,MAfW;AAgBX,GAhBW;AAiBX,EAjBW;AAkBX,sHAlBW,CAAb;AAmBG;AACDC,MAAO,QADN;AAEDC,YAAa,OAFZ,CAnBH;;AAuBD,CAAC,MAAMC,GAAN,CAAW;AACXC,QAAQC,GAAR,CAAY,UAAYF,GAAxB;AACD","file":"ejectTheme.js","sourcesContent":["var fs = require('fs-extra');\nvar path = require('path');\n\nvar printMessage = require('print-message');\n\n\ntry {\n fs.copySync(path.join(__dirname, 'src', 'theme'), path.join(process.cwd(), 'native-base-theme'));\n printMessage([\n 'NativeBase theme has been copied at ' + path.join(process.cwd(), 'native-base-theme'),\n 'Here\\'s how to theme your app',\n '',\n 'import getTheme from \\'./native-base-theme/components\\';',\n 'export default class ThemeExample extends Component {',\n 'render() {',\n ' return (',\n ' ',\n ' ',\n ' ',\n ' ...',\n ' ',\n ' ',\n ' ',\n ' );',\n '}',\n '',\n 'Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization',\n ], {\n color: 'yellow',\n borderColor: 'green',\n });\n} catch(err) {\n console.log('Error: ' + err);\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../ejectTheme.js"],"names":["fs","require","path","printMessage","copySync","join","__dirname","process","cwd","color","borderColor","err","console","log"],"mappings":"AAAA,GAAIA,IAAKC,QAAQ,UAAR,CAAT;AACA,GAAIC,MAAOD,QAAQ,MAAR,CAAX;;AAEA,GAAIE,cAAeF,QAAQ,eAAR,CAAnB;;AAEA,GAAI;AACFD,GAAGI,QAAH;AACEF,KAAKG,IAAL,CAAUC,SAAV,CAAqB,KAArB,CAA4B,OAA5B,CADF;AAEEJ,KAAKG,IAAL,CAAUE,QAAQC,GAAR,EAAV,CAAyB,mBAAzB,CAFF;;AAIAL;AACE;AACE;AACED,KAAKG,IAAL,CAAUE,QAAQC,GAAR,EAAV,CAAyB,mBAAzB,CAFJ;AAGE,8BAHF;AAIE,EAJF;AAKE,wDALF;AAME,uDANF;AAOE,YAPF;AAQE,YARF;AASE,yCATF;AAUE,mBAVF;AAWE,mBAXF;AAYE,eAZF;AAaE,oBAbF;AAcE,oBAdF;AAeE,sBAfF;AAgBE,MAhBF;AAiBE,GAjBF;AAkBE,EAlBF;AAmBE,sHAnBF,CADF;;AAsBE;AACEC,MAAO,QADT;AAEEC,YAAa,OAFf,CAtBF;;;AA2BD,CAAC,MAAOC,GAAP,CAAY;AACZC,QAAQC,GAAR,CAAY,UAAYF,GAAxB;AACD","file":"ejectTheme.js","sourcesContent":["var fs = require(\"fs-extra\");\nvar path = require(\"path\");\n\nvar printMessage = require(\"print-message\");\n\ntry {\n fs.copySync(\n path.join(__dirname, \"src\", \"theme\"),\n path.join(process.cwd(), \"native-base-theme\")\n );\n printMessage(\n [\n \"NativeBase theme has been copied at \" +\n path.join(process.cwd(), \"native-base-theme\"),\n \"Here's how to theme your app\",\n \"\",\n \"import getTheme from './native-base-theme/components';\",\n \"export default class ThemeExample extends Component {\",\n \"render() {\",\n \" return (\",\n \" \",\n \" \",\n \" \",\n \" ...\",\n \" \",\n \" \",\n \" \",\n \" );\",\n \"}\",\n \"\",\n \"Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization\"\n ],\n {\n color: \"yellow\",\n borderColor: \"green\"\n }\n );\n} catch (err) {\n console.log(\"Error: \" + err);\n}\n"]} \ No newline at end of file diff --git a/dist/src/Utils/computeProps.js b/dist/src/Utils/computeProps.js index 98c36368a..a9db0c44c 100644 --- a/dist/src/Utils/computeProps.js +++ b/dist/src/Utils/computeProps.js @@ -1,6 +1,6 @@ -'use_strict'; -var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash); -var _ReactNativePropRegistry=require('react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry');var _ReactNativePropRegistry2=_interopRequireDefault(_ReactNativePropRegistry);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +"use_strict"; +var _lodash=require("lodash");var _lodash2=_interopRequireDefault(_lodash); +var _ReactNativePropRegistry=require("react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry");var _ReactNativePropRegistry2=_interopRequireDefault(_ReactNativePropRegistry);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} module.exports=function(incomingProps,defaultProps){ @@ -16,20 +16,22 @@ delete incomingProps.style; if(incomingProps){ _lodash2.default.assign(computedProps,defaultProps,incomingProps); -}else{computedProps=defaultProps;} +}else{ +computedProps=defaultProps; +} if(incomingPropsStyle){ var computedPropsStyle={}; computedProps.style={}; if(Array.isArray(incomingPropsStyle)){ _lodash2.default.forEach(incomingPropsStyle,function(style){ -if(typeof style==='number'){ +if(typeof style==="number"){ _lodash2.default.merge(computedPropsStyle,_ReactNativePropRegistry2.default.getByID(style)); }else{ _lodash2.default.merge(computedPropsStyle,style); } }); -}else if(typeof incomingPropsStyle==='number'){ +}else if(typeof incomingPropsStyle==="number"){ computedPropsStyle=_ReactNativePropRegistry2.default.getByID(incomingPropsStyle); }else{ computedPropsStyle=incomingPropsStyle; diff --git a/dist/src/Utils/computeProps.js.map b/dist/src/Utils/computeProps.js.map index 3277c9688..365c02b7d 100644 --- a/dist/src/Utils/computeProps.js.map +++ b/dist/src/Utils/computeProps.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/Utils/computeProps.js"],"names":["module","exports","incomingProps","defaultProps","computedProps","clone","children","incomingPropsStyle","style","assign","computedPropsStyle","Array","isArray","forEach","merge","getByID"],"mappings":"AAAA;AACA,8B;AACA,qH;;;AAGAA,OAAOC,OAAP,CAAiB,SAAUC,aAAV,CAAyBC,YAAzB,CAAuC;;AAEtD,GAAIC,eAAgB,EAApB;;AAEAF,cAAgB,iBAAEG,KAAF,CAAQH,aAAR,CAAhB;AACA,MAAOA,eAAcI,QAArB;;AAEA,GAAMC,oBAAqBL,cAAcM,KAAzC;AACA,MAAON,eAAcM,KAArB;;;AAGA,GAAIN,aAAJ,CAAmB;AACjB,iBAAEO,MAAF,CAASL,aAAT,CAAwBD,YAAxB,CAAsCD,aAAtC;AACD,CAFD,IAEO,CAAEE,cAAgBD,YAAhB,CAA+B;;AAExC,GAAII,kBAAJ,CAAwB;AACtB,GAAIG,oBAAqB,EAAzB;AACAN,cAAcI,KAAd,CAAsB,EAAtB;AACA,GAAIG,MAAMC,OAAN,CAAcL,kBAAd,CAAJ,CAAuC;AACrC,iBAAEM,OAAF,CAAUN,kBAAV,CAA8B,SAACC,KAAD,CAAW;AACvC,GAAI,MAAOA,MAAP,GAAiB,QAArB,CAA+B;AAC7B,iBAAEM,KAAF,CAAQJ,kBAAR,CAA4B,kCAAwBK,OAAxB,CAAgCP,KAAhC,CAA5B;AACD,CAFD,IAEO;AACL,iBAAEM,KAAF,CAAQJ,kBAAR,CAA4BF,KAA5B;AACD;AACF,CAND;AAOD,CARD,IAQO,IAAI,MAAOD,mBAAP,GAA8B,QAAlC,CAA4C;AACjDG,mBAAqB,kCAAwBK,OAAxB,CAAgCR,kBAAhC,CAArB;AACD,CAFM,IAEA;AACLG,mBAAqBH,kBAArB;AACD;;AAED,iBAAEO,KAAF,CAAQV,cAAcI,KAAtB,CAA6BL,aAAaK,KAA1C,CAAiDE,kBAAjD;AACD;;AAED,MAAON,cAAP;AACD,CApCD","file":"computeProps.js","sourcesContent":["'use_strict';\nimport _ from 'lodash';\nimport ReactNativePropRegistry from 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry';\n// For compatibility with RN 0.25\n// import ReactNativePropRegistry from \"react-native/Libraries/ReactNative/ReactNativePropRegistry\";\nmodule.exports = function (incomingProps, defaultProps) {\n // External props has a higher precedence\n let computedProps = {};\n\n incomingProps = _.clone(incomingProps);\n delete incomingProps.children;\n\n const incomingPropsStyle = incomingProps.style;\n delete incomingProps.style;\n\n // console.log(defaultProps, incomingProps);\n if (incomingProps) {\n _.assign(computedProps, defaultProps, incomingProps);\n } else { computedProps = defaultProps; }\n // Pass the merged Style Object instead\n if (incomingPropsStyle) {\n let computedPropsStyle = {};\n computedProps.style = {};\n if (Array.isArray(incomingPropsStyle)) {\n _.forEach(incomingPropsStyle, (style) => {\n if (typeof style === 'number') {\n _.merge(computedPropsStyle, ReactNativePropRegistry.getByID(style));\n } else {\n _.merge(computedPropsStyle, style);\n }\n });\n } else if (typeof incomingPropsStyle === 'number') {\n computedPropsStyle = ReactNativePropRegistry.getByID(incomingPropsStyle);\n } else {\n computedPropsStyle = incomingPropsStyle;\n }\n\n _.merge(computedProps.style, defaultProps.style, computedPropsStyle);\n }\n // console.log(\"computedProps \", computedProps);\n return computedProps;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/Utils/computeProps.js"],"names":["module","exports","incomingProps","defaultProps","computedProps","clone","children","incomingPropsStyle","style","assign","computedPropsStyle","Array","isArray","forEach","merge","getByID"],"mappings":"AAAA;AACA,8B;AACA,qH;;;AAGAA,OAAOC,OAAP,CAAiB,SAASC,aAAT,CAAwBC,YAAxB,CAAsC;;AAErD,GAAIC,eAAgB,EAApB;;AAEAF,cAAgB,iBAAEG,KAAF,CAAQH,aAAR,CAAhB;AACA,MAAOA,eAAcI,QAArB;;AAEA,GAAMC,oBAAqBL,cAAcM,KAAzC;AACA,MAAON,eAAcM,KAArB;;;AAGA,GAAIN,aAAJ,CAAmB;AACjB,iBAAEO,MAAF,CAASL,aAAT,CAAwBD,YAAxB,CAAsCD,aAAtC;AACD,CAFD,IAEO;AACLE,cAAgBD,YAAhB;AACD;;AAED,GAAII,kBAAJ,CAAwB;AACtB,GAAIG,oBAAqB,EAAzB;AACAN,cAAcI,KAAd,CAAsB,EAAtB;AACA,GAAIG,MAAMC,OAAN,CAAcL,kBAAd,CAAJ,CAAuC;AACrC,iBAAEM,OAAF,CAAUN,kBAAV,CAA8B,eAAS;AACrC,GAAI,MAAOC,MAAP,GAAiB,QAArB,CAA+B;AAC7B,iBAAEM,KAAF,CAAQJ,kBAAR,CAA4B,kCAAwBK,OAAxB,CAAgCP,KAAhC,CAA5B;AACD,CAFD,IAEO;AACL,iBAAEM,KAAF,CAAQJ,kBAAR,CAA4BF,KAA5B;AACD;AACF,CAND;AAOD,CARD,IAQO,IAAI,MAAOD,mBAAP,GAA8B,QAAlC,CAA4C;AACjDG,mBAAqB,kCAAwBK,OAAxB,CAAgCR,kBAAhC,CAArB;AACD,CAFM,IAEA;AACLG,mBAAqBH,kBAArB;AACD;;AAED,iBAAEO,KAAF,CAAQV,cAAcI,KAAtB,CAA6BL,aAAaK,KAA1C,CAAiDE,kBAAjD;AACD;;AAED,MAAON,cAAP;AACD,CAtCD","file":"computeProps.js","sourcesContent":["\"use_strict\";\nimport _ from \"lodash\";\nimport ReactNativePropRegistry from \"react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry\";\n// For compatibility with RN 0.25\n// import ReactNativePropRegistry from \"react-native/Libraries/ReactNative/ReactNativePropRegistry\";\nmodule.exports = function(incomingProps, defaultProps) {\n // External props has a higher precedence\n let computedProps = {};\n\n incomingProps = _.clone(incomingProps);\n delete incomingProps.children;\n\n const incomingPropsStyle = incomingProps.style;\n delete incomingProps.style;\n\n // console.log(defaultProps, incomingProps);\n if (incomingProps) {\n _.assign(computedProps, defaultProps, incomingProps);\n } else {\n computedProps = defaultProps;\n }\n // Pass the merged Style Object instead\n if (incomingPropsStyle) {\n let computedPropsStyle = {};\n computedProps.style = {};\n if (Array.isArray(incomingPropsStyle)) {\n _.forEach(incomingPropsStyle, style => {\n if (typeof style === \"number\") {\n _.merge(computedPropsStyle, ReactNativePropRegistry.getByID(style));\n } else {\n _.merge(computedPropsStyle, style);\n }\n });\n } else if (typeof incomingPropsStyle === \"number\") {\n computedPropsStyle = ReactNativePropRegistry.getByID(incomingPropsStyle);\n } else {\n computedPropsStyle = incomingPropsStyle;\n }\n\n _.merge(computedProps.style, defaultProps.style, computedPropsStyle);\n }\n // console.log(\"computedProps \", computedProps);\n return computedProps;\n};\n"]} \ No newline at end of file diff --git a/dist/src/Utils/mapPropsToStyleNames.js b/dist/src/Utils/mapPropsToStyleNames.js index 133c7ae28..6bf88cd08 100644 --- a/dist/src/Utils/mapPropsToStyleNames.js +++ b/dist/src/Utils/mapPropsToStyleNames.js @@ -1,11 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _lodash=require("lodash");var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= mapPropsToStyleNames=function mapPropsToStyleNames(styleNames,props){ var keys=_lodash2.default.keys(props); var values=_lodash2.default.values(props); _lodash2.default.forEach(keys,function(key,index){ -if(values[index]){styleNames.push(key);} +if(values[index]){ +styleNames.push(key); +} }); return styleNames; diff --git a/dist/src/Utils/mapPropsToStyleNames.js.map b/dist/src/Utils/mapPropsToStyleNames.js.map index b371722d5..063194bc1 100644 --- a/dist/src/Utils/mapPropsToStyleNames.js.map +++ b/dist/src/Utils/mapPropsToStyleNames.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/Utils/mapPropsToStyleNames.js"],"names":["mapPropsToStyleNames","styleNames","props","keys","values","forEach","key","index","push"],"mappings":"yDAAA,8B;;AAEeA,qBAAuB,8BAACC,UAAD,CAAaC,KAAb,CAAuB;AAC3D,GAAMC,MAAO,iBAAEA,IAAF,CAAOD,KAAP,CAAb;AACA,GAAME,QAAS,iBAAEA,MAAF,CAASF,KAAT,CAAf;;AAEA,iBAAEG,OAAF,CAAUF,IAAV,CAAgB,SAACG,GAAD,CAAMC,KAAN,CAAgB;AAC9B,GAAIH,OAAOG,KAAP,CAAJ,CAAmB,CAAEN,WAAWO,IAAX,CAAgBF,GAAhB,EAAuB;AAC7C,CAFD;;AAIA,MAAOL,WAAP;AACD,C","file":"mapPropsToStyleNames.js","sourcesContent":["import _ from 'lodash';\n\nexport default mapPropsToStyleNames = (styleNames, props) => {\n const keys = _.keys(props);\n const values = _.values(props);\n\n _.forEach(keys, (key, index) => {\n if (values[index]) { styleNames.push(key); }\n });\n\n return styleNames;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/Utils/mapPropsToStyleNames.js"],"names":["mapPropsToStyleNames","styleNames","props","keys","values","forEach","key","index","push"],"mappings":"yDAAA,8B;;AAEgBA,qBAAuB,8BAACC,UAAD,CAAaC,KAAb,CAAuB;AAC5D,GAAMC,MAAO,iBAAEA,IAAF,CAAOD,KAAP,CAAb;AACA,GAAME,QAAS,iBAAEA,MAAF,CAASF,KAAT,CAAf;;AAEA,iBAAEG,OAAF,CAAUF,IAAV,CAAgB,SAACG,GAAD,CAAMC,KAAN,CAAgB;AAC9B,GAAIH,OAAOG,KAAP,CAAJ,CAAmB;AACjBN,WAAWO,IAAX,CAAgBF,GAAhB;AACD;AACF,CAJD;;AAMA,MAAOL,WAAP;AACD,C","file":"mapPropsToStyleNames.js","sourcesContent":["import _ from \"lodash\";\n\nexport default (mapPropsToStyleNames = (styleNames, props) => {\n const keys = _.keys(props);\n const values = _.values(props);\n\n _.forEach(keys, (key, index) => {\n if (values[index]) {\n styleNames.push(key);\n }\n });\n\n return styleNames;\n});\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Button.js b/dist/src/backward/Widgets/Button.js index 0b400d348..f4eaf8424 100644 --- a/dist/src/backward/Widgets/Button.js +++ b/dist/src/backward/Widgets/Button.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Button=undefined;var _extends=Object.assign||function(target){for(var i=1;i {\n if (child.type === Icon) { iconComponentPresent = true; }\n });\n return iconComponentPresent;\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().borderedBtn,\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n renderChildren() {\n if (typeof this.props.children === 'string') {\n return {(Platform.OS === 'ios' || !this.props.capitalize) ? this.props.children : this.props.children.toUpperCase()};\n } else if (this.props.children.type === Icon) {\n return React.cloneElement(this.props.children);\n } else if (Array.isArray(this.props.children)) {\n const newChildren = [];\n\n const childrenArray = React.Children.toArray(this.props.children);\n\n let iconElement = [];\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type === Icon) {\n return true;\n }\n return null;\n });\n\n if (this.props.iconRight) {\n if (childrenArray[0].type === undefined) {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0] : childrenArray[0].toUpperCase()});\n } else {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0].props.children : childrenArray[0].props.children.toUpperCase()});\n }\n\n newChildren.push(React.cloneElement(iconElement[0]));\n } else if (this.props.iconLeft || iconElement.length > 0) {\n newChildren.push(React.cloneElement(iconElement[0]));\n\n if (childrenArray[0].type === undefined) {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0] : childrenArray[0].toUpperCase()});\n } else {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0].props.children : childrenArray[0].props.children.toUpperCase()});\n }\n } else {\n return {this.props.children};\n }\n\n return newChildren;\n }\n return React.cloneElement(this.props.children);\n }\n\n render() {\n return (\n { this._root = c; }}\n {...this.prepareRootProps()} activeOpacity={0.5}\n >\n {this.renderChildren()}\n \n );\n }\n}\n\n\nButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n textStyle: React.PropTypes.object,\n block: React.PropTypes.bool,\n primary: React.PropTypes.bool,\n transparent: React.PropTypes.bool,\n success: React.PropTypes.bool,\n danger: React.PropTypes.bool,\n warning: React.PropTypes.bool,\n info: React.PropTypes.bool,\n bordered: React.PropTypes.bool,\n disabled: React.PropTypes.bool,\n rounded: React.PropTypes.bool,\n large: React.PropTypes.bool,\n small: React.PropTypes.bool,\n inputButton: React.PropTypes.bool,\n tabButton: React.PropTypes.bool,\n};\n\n\nconst StyledButton = connectStyle('NativeBase.Button', {}, mapPropsToStyleNames)(Button);\nexport {\n StyledButton as Button,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Button.js"],"names":["Button","borderedBtn","borderWidth","props","bordered","undefined","borderRadius","rounded","borderRadiusLarge","iconComponentPresent","Children","forEach","children","child","type","defaultProps","style","getInitialStyle","textStyle","OS","capitalize","toUpperCase","cloneElement","Array","isArray","newChildren","childrenArray","toArray","iconElement","remove","item","iconRight","push","iconLeft","length","c","_root","prepareRootProps","renderChildren","propTypes","PropTypes","object","block","bool","primary","transparent","success","danger","warning","info","disabled","large","small","inputButton","tabButton","StyledButton"],"mappings":";;;AAGA,4B;AACA;AACA;AACA,8B;AACA,wD;AACA;AACA,sE;AACA,sD;AACA,4B;;;AAGM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C,SAAU,gBAAMoC,SAAN,CAAgBG,IAX5B;AAYEO,SAAU,gBAAMV,SAAN,CAAgBG,IAZ5B;AAaEpC,QAAS,gBAAMiC,SAAN,CAAgBG,IAb3B;AAcEQ,MAAO,gBAAMX,SAAN,CAAgBG,IAdzB;AAeES,MAAO,gBAAMZ,SAAN,CAAgBG,IAfzB;AAgBEU,YAAa,gBAAMb,SAAN,CAAgBG,IAhB/B;AAiBEW,UAAW,gBAAMd,SAAN,CAAgBG,IAjB7B;;;;AAqBA,GAAMY,cAAe,yCAAa,mBAAb,CAAkC,EAAlC,iCAA4DvD,MAA5D,CAArB,C;;AAEkBA,M,CAAhBuD,Y","file":"Button.js","sourcesContent":["/* @flow */\n\n\nimport React, { Component } from 'react';\nimport { TouchableOpacity, Platform } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport _ from 'lodash';\nimport variables from '../../theme/variables/platform';\nimport { Icon } from './Icon';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport computeProps from '../../Utils/computeProps';\nimport { Text } from './Text';\n\n\nclass Button extends Component {\n\n\n getInitialStyle() {\n return {\n borderedBtn: {\n borderWidth: (this.props.bordered) ? 1 : undefined,\n borderRadius: (this.props.rounded && this.props.bordered) ? variables.borderRadiusLarge : 2,\n },\n };\n }\n\n iconPresent() {\n let iconComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child.type === Icon) { iconComponentPresent = true; }\n });\n return iconComponentPresent;\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().borderedBtn,\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n renderChildren() {\n if (typeof this.props.children === 'string') {\n return {(Platform.OS === 'ios' || !this.props.capitalize) ? this.props.children : this.props.children.toUpperCase()};\n } else if (this.props.children.type === Icon) {\n return React.cloneElement(this.props.children);\n } else if (Array.isArray(this.props.children)) {\n const newChildren = [];\n\n const childrenArray = React.Children.toArray(this.props.children);\n\n let iconElement = [];\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type === Icon) {\n return true;\n }\n return null;\n });\n\n if (this.props.iconRight) {\n if (childrenArray[0].type === undefined) {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0] : childrenArray[0].toUpperCase()});\n } else {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0].props.children : childrenArray[0].props.children.toUpperCase()});\n }\n\n newChildren.push(React.cloneElement(iconElement[0]));\n } else if (this.props.iconLeft || iconElement.length > 0) {\n newChildren.push(React.cloneElement(iconElement[0]));\n\n if (childrenArray[0].type === undefined) {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0] : childrenArray[0].toUpperCase()});\n } else {\n newChildren.push({(Platform.OS === 'ios' || !this.props.capitalize) ? childrenArray[0].props.children : childrenArray[0].props.children.toUpperCase()});\n }\n } else {\n return {this.props.children};\n }\n\n return newChildren;\n }\n return React.cloneElement(this.props.children);\n }\n\n render() {\n return (\n { this._root = c; }}\n {...this.prepareRootProps()} activeOpacity={0.5}\n >\n {this.renderChildren()}\n \n );\n }\n}\n\n\nButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n textStyle: React.PropTypes.object,\n block: React.PropTypes.bool,\n primary: React.PropTypes.bool,\n transparent: React.PropTypes.bool,\n success: React.PropTypes.bool,\n danger: React.PropTypes.bool,\n warning: React.PropTypes.bool,\n info: React.PropTypes.bool,\n bordered: React.PropTypes.bool,\n disabled: React.PropTypes.bool,\n rounded: React.PropTypes.bool,\n large: React.PropTypes.bool,\n small: React.PropTypes.bool,\n inputButton: React.PropTypes.bool,\n tabButton: React.PropTypes.bool,\n};\n\n\nconst StyledButton = connectStyle('NativeBase.Button', {}, mapPropsToStyleNames)(Button);\nexport {\n StyledButton as Button,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Card.js b/dist/src/backward/Widgets/Card.js index d232b424f..7c6a51da9 100644 --- a/dist/src/backward/Widgets/Card.js +++ b/dist/src/backward/Widgets/Card.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Card=undefined;var _extends=Object.assign||function(target){for(var i=1;i child);\n\n return childrenArray;\n }\n\n render() {\n if (this.props.dataArray && this.props.renderRow) {\n const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nCard.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object,\n};\n\nconst StyledCard = connectStyle('NativeBase.Card', {}, mapPropsToStyleNames)(Card);\n\nexport {\n StyledCard as Card,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Card.js"],"names":["Card","childrenArray","Children","map","props","children","child","dataArray","renderRow","ds","DataSource","rowHasChanged","r1","r2","dataSource","cloneWithRows","_root","c","renderChildren","propTypes","style","PropTypes","object","StyledCard"],"mappings":";;AAEA,4B;AACA;AACA;AACA,sE;AACA,iE;;AAEMA,I;;;AAGa;AACf,GAAMC,eAAgB,gBAAMC,QAAN,CAAeC,GAAf,CAAmB,KAAKC,KAAL,CAAWC,QAA9B,CAAwC,sBAASC,MAAT,EAAxC,CAAtB;;AAEA,MAAOL,cAAP;AACD,C;;AAEQ;AACP,GAAI,KAAKG,KAAL,CAAWG,SAAX,EAAwB,KAAKH,KAAL,CAAWI,SAAvC,CAAkD;AAChD,GAAMC,IAAK,GAAI,uBAASC,UAAb,CAAwB,CAAEC,cAAe,uBAACC,EAAD,CAAKC,EAAL,QAAYD,MAAOC,EAAnB,EAAjB,CAAxB,CAAX;AACA,GAAMC,YAAaL,GAAGM,aAAH,CAAiB,KAAKX,KAAL,CAAWG,SAA5B,CAAnB;AACA;AACE;AACM,KAAKH,KADX;AAEE,wBAFF;AAGE,WAAYU,UAHd;AAIE,UAAW,KAAKV,KAAL,CAAWI,SAJxB,kDADF;;;AAQD;AACD;AACE,0DAAM,IAAK,sBAAK,QAAKQ,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKb,KAAzC;AACG,KAAKc,cAAL,EADH,CADF;;;AAKD,C;;;;AAIHlB,KAAKmB,SAAL;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEf,UAAW,gBAAMc,SAAN,CAAgBC,MAH7B;AAIEd,UAAW,gBAAMa,SAAN,CAAgBC,MAJ7B;;;AAOA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC,iCAA0DvB,IAA1D,CAAnB,C;;;AAGgBA,I,CAAduB,U","file":"Card.js","sourcesContent":["/* @flow */\n\nimport React from 'react';\nimport { View, ListView, ViewPropTypes } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\n\nclass Card extends NativeBaseComponent {\n\n\n renderChildren() {\n const childrenArray = React.Children.map(this.props.children, child => child);\n\n return childrenArray;\n }\n\n render() {\n if (this.props.dataArray && this.props.renderRow) {\n const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nCard.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object,\n};\n\nconst StyledCard = connectStyle('NativeBase.Card', {}, mapPropsToStyleNames)(Card);\n\nexport {\n StyledCard as Card,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/CardItem.js b/dist/src/backward/Widgets/CardItem.js index b867211f9..9000758a9 100644 --- a/dist/src/backward/Widgets/CardItem.js +++ b/dist/src/backward/Widgets/CardItem.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.CardItem1=undefined;var _extends=Object.assign||function(target){for(var i=1;i { this._scrollview = c; this._root = c; }}\n {...this.props}\n >\n {this.props.children}\n \n );\n }\n}\n\nContent.propTypes = {\n style: React.PropTypes.object,\n padder: React.PropTypes.bool,\n disableKBDismissScroll: React.PropTypes.bool,\n};\n\nconst StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content);\n\nexport {\n StyledContent as Content,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Content.js"],"names":["Content","props","contentContainerStyle","disableKBDismissScroll","x","y","c","_scrollview","_root","children","propTypes","style","PropTypes","object","padder","bool","StyledContent"],"mappings":"o2BAAA,4B;AACA;AACA;AACA,sE;AACA,iE;;AAEMA,O;AACK;AACP;AACE;AACE,iCAAkC,KADpC;AAEE,sBAAuB,KAAKC,KAAL,CAAWC,qBAFpC;AAGE,oBAAsB,KAAKD,KAAL,CAAWE,sBAAZ,CAAsC,IAAtC,CAA6C,CAAEC,EAAG,CAAL,CAAQC,EAAG,CAAX,CAHpE;AAIE,IAAK,aAACC,CAAD,CAAO,CAAE,OAAKC,WAAL,CAAmBD,CAAnB,CAAsB,OAAKE,KAAL,CAAaF,CAAb,CAAiB,CAJvD;AAKM,KAAKL,KALX;;AAOG,KAAKA,KAAL,CAAWQ,QAPd,CADF;;;AAWD,C;;;AAGHT,QAAQU,SAAR,CAAoB;AAClBC,MAAO,gBAAMC,SAAN,CAAgBC,MADL;AAElBC,OAAQ,gBAAMF,SAAN,CAAgBG,IAFN;AAGlBZ,uBAAwB,gBAAMS,SAAN,CAAgBG,IAHtB,CAApB;;;AAMA,GAAMC,eAAgB,yCAAa,oBAAb,CAAmC,EAAnC,iCAA6DhB,OAA7D,CAAtB,C;;;AAGmBA,O,CAAjBgB,a","file":"Content.js","sourcesContent":["import React, { Component } from 'react';\nimport { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\n\nclass Content extends NativeBaseComponent {\n render() {\n return (\n { this._scrollview = c; this._root = c; }}\n {...this.props}\n >\n {this.props.children}\n \n );\n }\n}\n\nContent.propTypes = {\n style: React.PropTypes.object,\n padder: React.PropTypes.bool,\n disableKBDismissScroll: React.PropTypes.bool,\n};\n\nconst StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content);\n\nexport {\n StyledContent as Content,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/FooterTab.js b/dist/src/backward/Widgets/FooterTab.js index 40f522dbb..f228fdd58 100644 --- a/dist/src/backward/Widgets/FooterTab.js +++ b/dist/src/backward/Widgets/FooterTab.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.FooterTab=undefined;var _extends=Object.assign||function(target){for(var i=1;i {\n const children = _.clone(child.props.children);\n if (typeof children === 'string') {\n newChildren.push(React.cloneElement(child, {\n active: (this.props.active) ? true : false,\n vertical: true,\n capitalize: false,\n transparent: true,\n key: i }));\n } else {\n let iconElement = [];\n iconElement = _.remove(children, (item) => {\n if (item.type.displayName === Icon) {\n return true;\n }\n });\n console.log(iconElement);\n let badgeElement = [];\n badgeElement = _.remove(children, (item) => {\n if (item.type.displayName === Badge) {\n return true;\n }\n });\n if (iconElement.length > 0) {\n if (badgeElement.length > 0) {\n newChildren.push(\n \n \n \n \n {badgeElement[0].props.children}\n \n \n \n\n {children}\n \n );\n } else {\n newChildren.push(\n React.cloneElement(child)\n );\n }\n } else {\n newChildren.push(\n React.cloneElement(child)\n );\n }\n }\n }); }\n return newChildren;\n }\n\n render() {\n return (\n this._root = c} {...this.props} >\n {this.renderFooter()}\n \n );\n }\n}\n\nFooterTab.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledFooterTab = connectStyle('NativeBase.FooterTab', {}, mapPropsToStyleNames)(FooterTab);\n\nexport {\n StyledFooterTab as FooterTab,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/FooterTab.js"],"names":["FooterTab","childrenArray","Children","toArray","props","children","newChildren","map","child","i","clone","push","cloneElement","active","vertical","capitalize","transparent","key","iconElement","remove","item","type","displayName","console","log","badgeElement","length","style","onPress","OS","alignSelf","zIndex","textStyle","name","_root","c","renderFooter","propTypes","PropTypes","object","StyledFooterTab"],"mappings":";;;AAGA,4B;AACA;AACA;;AAEA,8B;AACA;AACA;AACA;AACA;AACA,sE;AACA,iE;AACA,4B;;AAEMA,S;;;AAGW;AACb,GAAMC,eAAgB,gBAAMC,QAAN,CAAeC,OAAf,CAAuB,KAAKC,KAAL,CAAWC,QAAlC,CAAtB;AACA,GAAMC,aAAc,EAApB;;AAEA,CAAEL,cAAcM,GAAd,CAAkB,SAACC,KAAD,CAAQC,CAAR,CAAc;AAChC,GAAMJ,UAAW,iBAAEK,KAAF,CAAQF,MAAMJ,KAAN,CAAYC,QAApB,CAAjB;AACA,GAAI,MAAOA,SAAP,GAAoB,QAAxB,CAAkC;AAChCC,YAAYK,IAAZ,CAAiB,gBAAMC,YAAN,CAAmBJ,KAAnB,CAA0B;AACzCK,OAAS,OAAKT,KAAL,CAAWS,MAAZ,CAAsB,IAAtB,CAA6B,KADI;AAEzCC,SAAU,IAF+B;AAGzCC,WAAY,KAH6B;AAIzCC,YAAa,IAJ4B;AAKzCC,IAAKR,CALoC,CAA1B,CAAjB;AAMD,CAPD,IAOO;AACL,GAAIS,aAAc,EAAlB;AACAA,YAAc,iBAAEC,MAAF,CAASd,QAAT,CAAmB,SAACe,IAAD,CAAU;AACzC,GAAIA,KAAKC,IAAL,CAAUC,WAAV,aAAJ,CAAoC;AAClC,MAAO,KAAP;AACD;AACF,CAJa,CAAd;AAKAC,QAAQC,GAAR,CAAYN,WAAZ;AACA,GAAIO,cAAe,EAAnB;AACAA,a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F,CAzDC,EAyDG;AACL,MAAOF,YAAP;AACD,C;;AAEQ;AACP;AACE,0DAAM,IAAK,sBAAK,QAAK4B,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAK/B,KAAzC;AACG,KAAKgC,YAAL,EADH,CADF;;;AAKD,C;;;AAGHpC,UAAUqC,SAAV;;AAEEV,MAAO,gBAAMW,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,iBAAkB,yCAAa,sBAAb,CAAqC,EAArC,iCAA+DxC,SAA/D,CAAxB,C;;;AAGqBA,S,CAAnBwC,e","file":"FooterTab.js","sourcesContent":["/* @flow */\n\n\nimport React from 'react';\nimport { Platform, View, ViewPropTypes } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\n\nimport _ from 'lodash';\nimport { Icon } from './Icon';\nimport { Button } from '../../basic/Button';\nimport { Badge } from '../../basic/Badge';\nimport { IconNB } from '../../basic/IconNB';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport { Text } from './Text';\n\nclass FooterTab extends NativeBaseComponent {\n\n\n renderFooter() {\n const childrenArray = React.Children.toArray(this.props.children);\n const newChildren = [];\n\n { childrenArray.map((child, i) => {\n const children = _.clone(child.props.children);\n if (typeof children === 'string') {\n newChildren.push(React.cloneElement(child, {\n active: (this.props.active) ? true : false,\n vertical: true,\n capitalize: false,\n transparent: true,\n key: i }));\n } else {\n let iconElement = [];\n iconElement = _.remove(children, (item) => {\n if (item.type.displayName === Icon) {\n return true;\n }\n });\n console.log(iconElement);\n let badgeElement = [];\n badgeElement = _.remove(children, (item) => {\n if (item.type.displayName === Badge) {\n return true;\n }\n });\n if (iconElement.length > 0) {\n if (badgeElement.length > 0) {\n newChildren.push(\n \n \n \n \n {badgeElement[0].props.children}\n \n \n \n\n {children}\n \n );\n } else {\n newChildren.push(\n React.cloneElement(child)\n );\n }\n } else {\n newChildren.push(\n React.cloneElement(child)\n );\n }\n }\n }); }\n return newChildren;\n }\n\n render() {\n return (\n this._root = c} {...this.props} >\n {this.renderFooter()}\n \n );\n }\n}\n\nFooterTab.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledFooterTab = connectStyle('NativeBase.FooterTab', {}, mapPropsToStyleNames)(FooterTab);\n\nexport {\n StyledFooterTab as FooterTab,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Gravatar.js b/dist/src/backward/Widgets/Gravatar.js index 32bc820cc..d0a7ed383 100644 --- a/dist/src/backward/Widgets/Gravatar.js +++ b/dist/src/backward/Widgets/Gravatar.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Gravatar=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...props} source={{ uri }} />\n );\n }\n}\n\nGravatar.propTypes = {\n ...Image.propTypes,\n email: React.PropTypes.string.isRequired,\n style: React.PropTypes.object,\n size: React.PropTypes.number,\n circular: React.PropTypes.bool,\n square: React.PropTypes.bool,\n};\n\nconst StyledGravatar = connectStyle('NativeBase.Gravatar', {}, mapPropsToStyleNames)(Gravatar);\nexport {\n StyledGravatar as Gravatar,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Gravatar.js"],"names":["GRAVATAR_URI","Gravatar","gravatar","borderRadius","props","size","width","height","resizeMode","contain","undefined","gravatarStyle","circular","square","defaultProps","style","merge","getInitialStyle","prepareRootProps","uri","email","_root","c","propTypes","PropTypes","string","isRequired","object","number","bool","StyledGravatar"],"mappings":";;AAEA,4B;AACA;AACA;AACA,8B;AACA,sC;AACA,sE;AACA,iE;AACA,sD;;AAEA,GAAMA,cAAe,kCAArB,C;;AAEMC,Q;;;AAGc;AAChB,MAAO;AACLC,SAAU;AACRC,aAAc,KAAKC,KAAL,CAAWC,IAAX,CAAkB,KAAKD,KAAL,CAAWC,IAAX,CAAkB,CAApC,CAAwC,EAD9C;AAERC,MAAO,KAAKF,KAAL,CAAW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,CAAgBC,MAAhB,CAAuBC,UAFhC;AAGEX,MAAO,gBAAMS,SAAN,CAAgBG,MAHzB;AAIEtB,KAAM,gBAAMmB,SAAN,CAAgBI,MAJxB;AAKEhB,SAAU,gBAAMY,SAAN,CAAgBK,IAL5B;AAMEhB,OAAQ,gBAAMW,SAAN,CAAgBK,IAN1B;;;AASA,GAAMC,gBAAiB,yCAAa,qBAAb,CAAoC,EAApC,iCAA8D7B,QAA9D,CAAvB,C;;AAEoBA,Q,CAAlB6B,c","file":"Gravatar.js","sourcesContent":["/* @flow */\n\nimport React from 'react';\nimport { Image } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport _ from 'lodash';\nimport md5 from 'blueimp-md5';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport computeProps from '../../Utils/computeProps';\n\nconst GRAVATAR_URI = 'https://www.gravatar.com/avatar/';\n\nclass Gravatar extends NativeBaseComponent {\n\n\n getInitialStyle() {\n return {\n gravatar: {\n borderRadius: this.props.size ? this.props.size / 2 : 15,\n width: this.props.size ? this.props.size : 30,\n height: this.props.size ? this.props.size : 30,\n resizeMode: this.props.contain ? 'contain' : undefined,\n },\n };\n }\n\n prepareRootProps() {\n const gravatarStyle = {};\n if (this.props.circular) {\n gravatarStyle.width = this.props.size;\n gravatarStyle.height = this.props.size;\n gravatarStyle.borderRadius = this.props.size / 2;\n } else if (this.props.square) {\n gravatarStyle.width = this.props.size;\n gravatarStyle.height = this.props.size;\n gravatarStyle.borderRadius = 0;\n }\n\n const defaultProps = {\n style: _.merge(this.getInitialStyle().gravatar, gravatarStyle),\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n render() {\n const props = this.prepareRootProps();\n\n const uri = `${GRAVATAR_URI + md5(this.props.email)}?s=${props.style.height}`;\n return (\n this._root = c} {...props} source={{ uri }} />\n );\n }\n}\n\nGravatar.propTypes = {\n ...Image.propTypes,\n email: React.PropTypes.string.isRequired,\n style: React.PropTypes.object,\n size: React.PropTypes.number,\n circular: React.PropTypes.bool,\n square: React.PropTypes.bool,\n};\n\nconst StyledGravatar = connectStyle('NativeBase.Gravatar', {}, mapPropsToStyleNames)(Gravatar);\nexport {\n StyledGravatar as Gravatar,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Header.js b/dist/src/backward/Widgets/Header.js index 7f993a465..e59e81e5b 100644 --- a/dist/src/backward/Widgets/Header.js +++ b/dist/src/backward/Widgets/Header.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Header=undefined;var _extends=Object.assign||function(target){for(var i=1;i=1){ if(_reactNative.Platform.OS==='ios'){ -newChildren.push(_react2.default.createElement(_reactNative.View,{key:'title',style:{position:'absolute',left:0,right:0,top:13,bottom:0,alignSelf:'center',justifyContent:'center'}}, +newChildren.push(_react2.default.createElement(_reactNative.View,{key:'title',style:{position:'absolute',left:0,right:0,top:13,bottom:0,alignSelf:'center',justifyContent:'center'},__source:{fileName:_jsxFileName,lineNumber:86}}, [title[0],subtitle[0]])); -newChildren.push(_react2.default.createElement(_reactNative.View,{key:'btn1',style:{alignItems:'center',justifyContent:'flex-start',flexDirection:'row',marginLeft:-14}}, +newChildren.push(_react2.default.createElement(_reactNative.View,{key:'btn1',style:{alignItems:'center',justifyContent:'flex-start',flexDirection:'row',marginLeft:-14},__source:{fileName:_jsxFileName,lineNumber:89}}, _react2.default.cloneElement(buttons[0]))); -newChildren.push(_react2.default.createElement(_reactNative.View,{key:'title2',style:{flex:3,alignSelf:'stretch'}})); +newChildren.push(_react2.default.createElement(_reactNative.View,{key:'title2',style:{flex:3,alignSelf:'stretch'},__source:{fileName:_jsxFileName,lineNumber:92}})); if(buttons.length>1){ for(var i=1;i1){ for(var _i2=1;_i2 {\n if (item.type === Button) {\n return true;\n }\n });\n\n let title = [];\n title = _.remove(childrenArray, (item) => {\n if (item.type === Title) {\n return true;\n }\n });\n\n let subtitle = [];\n subtitle = _.remove(childrenArray, (item) => {\n if (item.type === Subtitle) {\n return true;\n }\n });\n\n let input = [];\n input = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(InputGroup)') {\n return true;\n }\n });\n\n if (buttons.length === 1 && this.props.iconRight) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n newChildren.push();\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n } else {\n newChildren.push(\n {[title[0]]}\n );\n newChildren.push(\n {React.cloneElement(buttons[0], { header: true })}\n );\n }\n } else if (this.props.searchBar) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n React.cloneElement(input[0], { toolbar: true, key: 'inp' }));\n newChildren.push(\n React.cloneElement(buttons[0]));\n } else {\n newChildren.push(React.cloneElement(input[0], { atoolbar: true }));\n }\n } else if (buttons.length >= 1) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n newChildren.push();\n if (buttons.length > 1) {\n for (let i = 1; i < buttons.length; i++) {\n newChildren.push(\n {React.cloneElement(buttons[i])}\n );\n }\n }\n } else {\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n newChildren.push(\n {[title[0]]}\n );\n for (let i = 1; i < buttons.length; i++) {\n newChildren.push(\n {React.cloneElement(buttons[i])}\n );\n }\n }\n } else if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n\n if (childrenArray.length > 1) {\n for (let i = 1; i < childrenArray.length; i++) {\n newChildren.push(\n {React.cloneElement(childrenArray[i], {})}\n );\n }\n }\n } else {\n newChildren.push(\n {[title[0]]}\n );\n for (let i = 1; i < childrenArray.length; i++) {\n newChildren.push(\n {React.cloneElement(childrenArray[i], {})}\n );\n }\n }\n return newChildren;\n }\n }\n\n render() {\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n}\n\nHeader.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledHeader = connectStyle('NativeBase.Header', {}, mapPropsToStyleNames)(Header);\nexport {\n StyledHeader as Header,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Header.js"],"names":["Header","Array","isArray","props","children","newChildren","childrenArray","Children","toArray","buttons","remove","item","type","title","subtitle","input","displayName","length","iconRight","OS","push","position","left","right","top","bottom","alignSelf","justifyContent","flex","alignItems","flexDirection","marginRight","cloneElement","marginLeft","header","searchBar","toolbar","key","atoolbar","i","_root","c","renderChildren","propTypes","style","PropTypes","object","StyledHeader"],"mappings":";;AAEA,4B;AACA;AACA;AACA,8B;AACA,sE;AACA,iE;AACA;AACA;AACA,oC;;AAEMA,M;;;;;;;;;;AAUa;AACf,GAAI,CAACC,MAAMC,OAAN,CAAc,KAAKC,KAAL,CAAWC,QAAzB,CAAL,CAAyC;AACvC,MAAO,MAAKD,KAAL,CAAWC,QAAlB;AACD,CAFD,IAEO,IAAIH,MAAMC,OAAN,CAAc,KAAKC,KAAL,CAAWC,QAAzB,CAAJ,CAAwC;AAC7C,GAAMC,aAAc,EAApB;AACA,GAAMC,eAAgB,gBAAMC,QAAN,CAAeC,OAAf,CAAuB,KAAKL,KAAL,CAAWC,QAAlC,CAAtB;;AAEA,GAAIK,SAAU,EAAd;AACAA,QAAU,iBAAEC,MAAF,CAASJ,aAAT,CAAwB,SAACK,IAAD,CAAU;AAC1C,GAAIA,KAAKC,IAAL,iBAAJ,CAA0B;AACxB,MAAO,KAAP;AACD;AACF,CAJS,CAAV;;AAMA,GAAIC,OAAQ,EAAZ;AACAA,MAAQ,iBAAEH,MAAF,CAASJ,aAAT,CAAwB,SAACK,IAAD,CAAU;AACxC,GAAIA,KAAKC,IAAL,eAAJ,CAAyB;AACvB,MAAO,KAAP;AACD;AACF,CAJO,CAAR;;AAMA,GAAIE,UAAW,EAAf;AACAA,SAAW,iBAAEJ,MAAF,CAASJ,aAAT,CAAwB,SAACK,IAAD,CAAU;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,IAAI,CAAf,CAAN,CAA0B,MAAO,CAAEV,WAAY,QAAd,CAAwBF,eAAgB,YAAxC,CAAsDG,cAAe,KAArE,CAA4EC,YAAa,CAAC,CAA1F,CAAjC;AACd,gBAAMC,YAAN,CAAmB1B,cAAciC,GAAd,CAAnB,CAAqC,EAArC,CADc,CAAjB;;AAGD;AACF;AACD,MAAOlC,YAAP;AACD;AACF,C;;AAEQ;AACP;AACE,0DAAM,IAAK,sBAAK,QAAKmC,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKtC,KAAzC;AACG,KAAKuC,cAAL,EADH,CADF;;;AAKD,C;;;AAGH1C,OAAO2C,SAAP;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,cAAe,yCAAa,mBAAb,CAAkC,EAAlC,iCAA4D/C,MAA5D,CAArB,C;;AAEkBA,M,CAAhB+C,Y","file":"Header.js","sourcesContent":["/* @flow */\n\nimport React from 'react';\nimport { Platform, View, ViewPropTypes } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport _ from 'lodash';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport { Button } from './Button';\nimport { Title } from './Title';\nimport { Subtitle } from './Subtitle';\n\nclass Header extends NativeBaseComponent {\n\n propTypes: {\n searchBar : React.PropTypes.bool,\n rounded : React.PropTypes.bool,\n style : React.PropTypes.object,\n iconRight: React.PropTypes.bool\n }\n\n\n renderChildren() {\n if (!Array.isArray(this.props.children)) {\n return this.props.children;\n } else if (Array.isArray(this.props.children)) {\n const newChildren = [];\n const childrenArray = React.Children.toArray(this.props.children);\n\n let buttons = [];\n buttons = _.remove(childrenArray, (item) => {\n if (item.type === Button) {\n return true;\n }\n });\n\n let title = [];\n title = _.remove(childrenArray, (item) => {\n if (item.type === Title) {\n return true;\n }\n });\n\n let subtitle = [];\n subtitle = _.remove(childrenArray, (item) => {\n if (item.type === Subtitle) {\n return true;\n }\n });\n\n let input = [];\n input = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(InputGroup)') {\n return true;\n }\n });\n\n if (buttons.length === 1 && this.props.iconRight) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n newChildren.push();\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n } else {\n newChildren.push(\n {[title[0]]}\n );\n newChildren.push(\n {React.cloneElement(buttons[0], { header: true })}\n );\n }\n } else if (this.props.searchBar) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n React.cloneElement(input[0], { toolbar: true, key: 'inp' }));\n newChildren.push(\n React.cloneElement(buttons[0]));\n } else {\n newChildren.push(React.cloneElement(input[0], { atoolbar: true }));\n }\n } else if (buttons.length >= 1) {\n if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n newChildren.push();\n if (buttons.length > 1) {\n for (let i = 1; i < buttons.length; i++) {\n newChildren.push(\n {React.cloneElement(buttons[i])}\n );\n }\n }\n } else {\n newChildren.push(\n {React.cloneElement(buttons[0])}\n );\n newChildren.push(\n {[title[0]]}\n );\n for (let i = 1; i < buttons.length; i++) {\n newChildren.push(\n {React.cloneElement(buttons[i])}\n );\n }\n }\n } else if (Platform.OS === 'ios') {\n newChildren.push(\n {[title[0], subtitle[0]]}\n );\n\n if (childrenArray.length > 1) {\n for (let i = 1; i < childrenArray.length; i++) {\n newChildren.push(\n {React.cloneElement(childrenArray[i], {})}\n );\n }\n }\n } else {\n newChildren.push(\n {[title[0]]}\n );\n for (let i = 1; i < childrenArray.length; i++) {\n newChildren.push(\n {React.cloneElement(childrenArray[i], {})}\n );\n }\n }\n return newChildren;\n }\n }\n\n render() {\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n}\n\nHeader.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledHeader = connectStyle('NativeBase.Header', {}, mapPropsToStyleNames)(Header);\nexport {\n StyledHeader as Header,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Icon.js b/dist/src/backward/Widgets/Icon.js index 8d53e3d9a..5cec82945 100644 --- a/dist/src/backward/Widgets/Icon.js +++ b/dist/src/backward/Widgets/Icon.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Icon=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nIcon.propTypes = {\n ...Ionicons.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledIcon = connectStyle('NativeBase.Icon', {}, mapPropsToStyleNames)(Icon);\n\nexport {\n StyledIcon as Icon,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Icon.js"],"names":["Icon","context","theme","variables","iconFamily","_root","c","props","propTypes","style","PropTypes","object","StyledIcon"],"mappings":"81BAAA,4B;;AAEA;;AAEA,4D;AACA,wD;AACA,kE;AACA,gE;AACA,sE;AACA,4D;AACA,wD;;AAEA,sE;;AAEMA,I;;;AAGiB;AACnB,GAAI,KAAKC,OAAL,CAAaC,KAAjB,CAAwB;AACtB,OAAQ,KAAKD,OAAL,CAAaC,KAAb,CAAmB,4BAAnB,EAAiDC,SAAjD,CAA2DC,UAAnE;AACE,IAAK,UAAL;AACE,KAAKJ,IAAL;AACA;AACF,IAAK,QAAL;AACE,KAAKA,IAAL;AACA;AACF,IAAK,aAAL;AACE,KAAKA,IAAL;AACA;AACF,IAAK,YAAL;AACE,KAAKA,IAAL;AACA;AACF,IAAK,eAAL;AACE,KAAKA,IAAL;AACA;AACF,IAAK,UAAL;AACE,KAAKA,IAAL;AACA;AACF,IAAK,QAAL;AACE,KAAKA,IAAL;AACA;AACF;AACE,KAAKA,IAAL,oBAvBJ;;AAyBD,CA1BD,IA0BO;AACL,KAAKA,IAAL;AACD;AACF,C;;AAEQ;AACP;AACE,mCAAM,IAAN,WAAW,IAAK,sBAAK,QAAKK,KAAL,CAAaC,CAAlB,EAAhB,EAAyC,KAAKC,KAA9C,mDADF;;AAGD,C;;;AAGHP,KAAKQ,SAAL;AACK,mBAASA,SADd;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC,iCAA0DZ,IAA1D,CAAnB,C;;;AAGgBA,I,CAAdY,U","file":"Icon.js","sourcesContent":["import React, { Component } from 'react';\n\nimport { connectStyle } from 'native-base-shoutem-theme';\n\nimport Ionicons from 'react-native-vector-icons/Ionicons';\nimport Entypo from 'react-native-vector-icons/Entypo';\nimport FontAwesome from 'react-native-vector-icons/FontAwesome';\nimport Foundation from 'react-native-vector-icons/Foundation';\nimport MaterialIcons from 'react-native-vector-icons/MaterialIcons';\nimport Octicons from 'react-native-vector-icons/Octicons';\nimport Zocial from 'react-native-vector-icons/Zocial';\n\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\n\nclass Icon extends Component {\n\n\n componentWillMount() {\n if (this.context.theme) {\n switch (this.context.theme['@@shoutem.theme/themeStyle'].variables.iconFamily) {\n case 'Ionicons':\n this.Icon = Ionicons;\n break;\n case 'Entypo':\n this.Icon = Entypo;\n break;\n case 'FontAwesome':\n this.Icon = FontAwesome;\n break;\n case 'Foundation':\n this.Icon = Foundation;\n break;\n case 'MaterialIcons':\n this.Icon = MaterialIcons;\n break;\n case 'Octicons':\n this.Icon = Octicons;\n break;\n case 'Zocial':\n this.Icon = Zocial;\n break;\n default:\n this.Icon = Ionicons;\n }\n } else {\n this.Icon = Ionicons;\n }\n }\n\n render() {\n return (\n this._root = c} {...this.props} />\n );\n }\n}\n\nIcon.propTypes = {\n ...Ionicons.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledIcon = connectStyle('NativeBase.Icon', {}, mapPropsToStyleNames)(Icon);\n\nexport {\n StyledIcon as Icon,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/InputGroup.js b/dist/src/backward/Widgets/InputGroup.js index e5aa25339..c21beabec 100644 --- a/dist/src/backward/Widgets/InputGroup.js +++ b/dist/src/backward/Widgets/InputGroup.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.InputGroup=undefined;var _extends=Object.assign||function(target){for(var i=1;i child);\n\n return childrenArray;\n }\n\n render() {\n if (this.props.dataArray && this.props.renderRow) {\n const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nconst StyledList = connectStyle('NativeBase.List', {}, mapPropsToStyleNames)(List);\n\nexport {\n StyledList as List,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/List.js"],"names":["List","childrenArray","Children","map","props","children","child","dataArray","renderRow","ds","DataSource","rowHasChanged","r1","r2","dataSource","cloneWithRows","_root","c","renderChildren","StyledList"],"mappings":"81BAAA,4B;AACA;;AAEA;AACA,sE;AACA,iE;;AAEMA,I;;;AAGa;AACf,GAAMC,eAAgB,gBAAMC,QAAN,CAAeC,GAAf,CAAmB,KAAKC,KAAL,CAAWC,QAA9B,CAAwC,sBAASC,MAAT,EAAxC,CAAtB;;AAEA,MAAOL,cAAP;AACD,C;;AAEQ;AACP,GAAI,KAAKG,KAAL,CAAWG,SAAX,EAAwB,KAAKH,KAAL,CAAWI,SAAvC,CAAkD;AAChD,GAAMC,IAAK,GAAI,uBAASC,UAAb,CAAwB,CAAEC,cAAe,uBAACC,EAAD,CAAKC,EAAL,QAAYD,MAAOC,EAAnB,EAAjB,CAAxB,CAAX;AACA,GAAMC,YAAaL,GAAGM,aAAH,CAAiB,KAAKX,KAAL,CAAWG,SAA5B,CAAnB;AACA;AACE;AACM,KAAKH,KADX;AAEE,wBAFF;AAGE,WAAYU,UAHd;AAIE,UAAW,KAAKV,KAAL,CAAWI,SAJxB,kDADF;;;AAQD;AACD;AACE,0DAAM,IAAK,sBAAK,QAAKQ,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKb,KAAzC;AACG,KAAKc,cAAL,EADH,CADF;;;AAKD,C;;;;AAIH,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC,iCAA0DnB,IAA1D,CAAnB,C;;;AAGgBA,I,CAAdmB,U","file":"List.js","sourcesContent":["import React from 'react';\nimport { ListView, View } from 'react-native';\n\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\n\nclass List extends NativeBaseComponent {\n\n\n renderChildren() {\n const childrenArray = React.Children.map(this.props.children, child => child);\n\n return childrenArray;\n }\n\n render() {\n if (this.props.dataArray && this.props.renderRow) {\n const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n this._root = c} {...this.props} >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nconst StyledList = connectStyle('NativeBase.List', {}, mapPropsToStyleNames)(List);\n\nexport {\n StyledList as List,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/ListItem.js b/dist/src/backward/Widgets/ListItem.js index c693571f9..6680dad0a 100644 --- a/dist/src/backward/Widgets/ListItem.js +++ b/dist/src/backward/Widgets/ListItem.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ListItem=undefined;var _extends=Object.assign||function(target){for(var i=1;i {\n if (child && child.type.displayName === 'Styled(Thumbnail)') { thumbnailComponentPresent = true; }\n });\n\n return thumbnailComponentPresent;\n }\n\n gravatarPresent() {\n let gravatarComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Gravatar)') { gravatarComponentPresent = true; }\n });\n\n return gravatarComponentPresent;\n }\n\n checkBoxPresent() {\n let checkBoxComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(CheckBox)') { checkBoxComponentPresent = true; }\n });\n\n return checkBoxComponentPresent;\n }\n\n radioPresent() {\n let radioComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Radio)') { radioComponentPresent = true; }\n });\n\n return radioComponentPresent;\n }\n\n iconPresent() {\n let iconComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Icon)') { iconComponentPresent = true; }\n });\n return iconComponentPresent;\n }\n\n pickerPresent() {\n let pickerComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(PickerNB)') { pickerComponentPresent = true; }\n });\n return pickerComponentPresent;\n }\n\n badgePresent() {\n let badgeComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Badge)') { badgeComponentPresent = true; }\n });\n\n return badgeComponentPresent;\n }\n\n inputPresent() {\n let inputComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(InputGroup)') { inputComponentPresent = true; }\n });\n return inputComponentPresent;\n }\n\n buttonPresent() {\n let buttonComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Button)') { buttonComponentPresent = true; }\n });\n\n return buttonComponentPresent;\n }\n\n getChildProps(child) {\n let defaultProps = {};\n\n if (child && child.type.displayName === 'Image' && !Array.isArray(this.props.children)) {\n defaultProps = {\n resizeMode: 'stretch',\n style: this.getInitialStyle().fullImage,\n };\n } else if (child && child.type.displayName === 'Styled(Button)') {\n defaultProps = {\n small: true,\n style: this.getInitialStyle().itemButton,\n };\n } else if (child && child.type.displayName === 'Styled(InputGroup)') {\n defaultProps = {\n style: {\n borderColor: (this.props.children.props.success) ?\n this.getTheme().inputSuccessBorderColor :\n (this.props.children.props.error) ?\n this.getTheme().inputErrorBorderColor :\n this.getTheme().listBorderColor,\n },\n foregroundColor: this.getContextForegroundColor(),\n };\n } else if (child && child.type.displayName === 'Styled(Text)') {\n if (this.props.itemDivider) {\n defaultProps = {\n style: this.getInitialStyle().dividerItemText,\n };\n } else if (child.props.note && (this.thumbnailPresent() || this.gravatarPresent())) {\n defaultProps = {\n style: this.getInitialStyle().itemSubNote,\n };\n } else if (child.props.note) {\n defaultProps = {\n style: this.getInitialStyle().itemNote,\n };\n } else {\n defaultProps = {\n style: this.getInitialStyle().itemText,\n };\n }\n } else if (child && child.type.displayName === 'Styled(Icon)') {\n defaultProps = {\n style: this.getInitialStyle().itemIcon,\n };\n } else if (child && child.type.displayName === 'Styled(Picker)') {\n defaultProps = {\n style: {\n flex: 0.45,\n alignSelf: 'flex-end',\n paddingVertical: 5,\n height: 30,\n },\n textStyle: {\n color: '#7a7a7a',\n },\n };\n } else if (child && child.type.displayName === 'Styled(Thumbnail)') {\n defaultProps = {\n style: this.getInitialStyle().thumbnail,\n };\n } else if (child && child.type.displayName === 'Styled(Gravatar)') {\n defaultProps = {\n style: this.getInitialStyle().gravatar,\n };\n } else {\n defaultProps = {\n foregroundColor: this.getContextForegroundColor(),\n };\n }\n return computeProps(child.props, defaultProps);\n }\n\n notePresent() {\n let notePresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Text)' && child.props.note) { notePresent = true; }\n });\n return notePresent;\n }\n\n insetPresent() {\n let insetPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(InputGroup)' && child.props.inset) { insetPresent = true; }\n });\n\n return insetPresent;\n }\n\n\n inlinePresent() {\n let inlineComponentPresent = false;\n if (this.inputPresent()) {\n if (this.props.children.props.children.props &&\n this.props.children.props.children.props.inlineLabel) {\n inlineComponentPresent = true;\n } else { inlineComponentPresent = false; }\n }\n return inlineComponentPresent;\n }\n\n stackedPresent() {\n let stackedComponentPresent = false;\n if (this.inputPresent()) {\n if (this.props.children.props.children.props &&\n this.props.children.props.children.props.stackedLabel) {\n stackedComponentPresent = true;\n } else { stackedComponentPresent = false; }\n }\n\n return stackedComponentPresent;\n }\n\n\n squareThumbs() {\n let squareThumbs = false;\n if (this.thumbnailPresent() || this.gravatarPresent()) {\n React.Children.forEach(this.props.children, (child) => {\n if (child.props.square) { squareThumbs = true; }\n });\n }\n\n return squareThumbs;\n }\n\n renderChildren() {\n this.iconPresent();\n\n const newChildren = [];\n if (!Array.isArray(this.props.children) &&\n !this.inlinePresent() && !this.stackedPresent() && !this.insetPresent()) {\n newChildren.push(\n \n {React.cloneElement(this.props.children, this.getChildProps(this.props.children))}\n \n );\n } else {\n const childrenArray = React.Children.toArray(this.props.children);\n let iconElement = [];\n\n if (this.props.iconLeft && !this.props.iconRight && !this.pickerPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n \n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.props.iconLeft && this.pickerPresent()) {\n const pickerElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(PickerNB)') {\n return true;\n }\n });\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(pickerElement[0], { ...this.getChildProps(pickerElement[0]), key: 'listItem1', style: { flex: 1, alignSelf: 'flex-end' } }));\n } else if (this.props.iconRight && !this.props.iconLeft) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem1' }));\n } else if (this.badgePresent()) {\n const badgeElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Badge)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(badgeElement[0], { ...this.getChildProps(badgeElement[0]), key: 'listItem1' }));\n } else if (this.props.iconLeft && this.props.iconRight) {\n iconElement = _.filter(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.slice(0, 2).map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(iconElement[1], { ...this.getChildProps(iconElement[1]), key: 'listItem1' }));\n } else if (this.thumbnailPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Thumbnail)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.gravatarPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Gravatar)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.checkBoxPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(CheckBox)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));\n newChildren.push(\n {childrenArray.map(child => React.cloneElement(child, this.getChildProps(child)))}\n );\n } else if (this.radioPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Radio)') {\n return true;\n }\n });\n newChildren.push(\n {childrenArray.map(child => React.cloneElement(child, this.getChildProps(child)))}\n );\n newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));\n } else if (this.inputPresent() && !this.inlinePresent() &&\n !this.stackedPresent() && !this.insetPresent()) {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.inlinePresent()) {\n newChildren.push(\n \n {this.props.children.props.children.props.label}\n );\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i, style: { borderWidth: 0 } }))}\n );\n } else if (this.stackedPresent()) {\n newChildren.push(\n {this.props.children.props.children.props.label}\n\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i, style: { flex: 1, marginTop: 5 } }))}\n );\n } else if (this.insetPresent()) {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n } else {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n }\n }\n\n return newChildren;\n }\n\n render() {\n return (\n this._root = c}\n {...this.props} activeOpacity={(this.props.button) ? 0.2 : 1}\n >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nListItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n header: React.PropTypes.bool,\n iconRight: React.PropTypes.bool,\n iconLeft: React.PropTypes.bool,\n button: React.PropTypes.bool,\n itemDivider: React.PropTypes.bool,\n};\n\nconst StyledListItem = connectStyle('NativeBase.ListItem1', {}, mapPropsToStyleNames)(ListItem);\n\nexport {\n StyledListItem as ListItem,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/ListItem.js"],"names":["ListItem","listItem","listItemDivider","itemText","dividerItemText","itemIcon","itemNote","itemSubNote","thumbnail","Gravatar","fullImage","itemButton","right","flex","paddingLeft","right2","flexDirection","alignItems","justifyContent","right3","alignSelf","thumbnailComponentPresent","Children","forEach","props","children","child","type","displayName","gravatarComponentPresent","checkBoxComponentPresent","radioComponentPresent","iconComponentPresent","pickerComponentPresent","badgeComponentPresent","inputComponentPresent","buttonComponentPresent","defaultProps","Array","isArray","resizeMode","style","getInitialStyle","small","borderColor","success","getTheme","inputSuccessBorderColor","error","inputErrorBorderColor","listBorderColor","foregroundColor","getContextForegroundColor","itemDivider","note","thumbnailPresent","gravatarPresent","paddingVertical","height","textStyle","color","gravatar","notePresent","insetPresent","inset","inlineComponentPresent","inputPresent","inlineLabel","stackedComponentPresent","stackedLabel","squareThumbs","square","iconPresent","newChildren","inlinePresent","stackedPresent","push","cloneElement","getChildProps","childrenArray","toArray","iconElement","iconLeft","iconRight","pickerPresent","remove","item","key","map","i","pickerElement","badgePresent","badgeElement","filter","slice","checkBoxPresent","radioPresent","marginLeft","inputColorPlaceholder","label","borderWidth","textAlign","fontSize","marginTop","padding","_root","c","button","renderChildren","propTypes","PropTypes","object","header","bool","StyledListItem"],"mappings":";;AAEA,4B;AACA;AACA;AACA;AACA,8B;AACA,sE;AACA,iE;AACA,sD;AACA,4B;;AAEMA,Q;;;AAGc;AAChB,MAAO;AACLC,SAAU,EADL;;AAGLC,gBAAiB,EAHZ;;AAKLC,SAAU,EALL;;AAOLC,gBAAiB,EAPZ;;AASLC,SAAU,EATL;;AAWLC,SAAU,EAXL;;AAaLC,YAAa,EAbR;;AAeLC,UAAW,EAfN;;AAiBLC,SAAU,EAjBL;;AAmBLC,UAAW,EAnBN;;AAqBLC,WAAY,EArBP,CAAP;;;AAwBD,C;;AAEe;AACd,MAAO;AACLC,MAAO;AACLC,KAAM,CADD;AAELC,YAAa,EAFR,CADF;;;AAMLC,OAAQ;AACNF,KAAM,CADA;AAENG,cAAe,KAFT;AA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AAb,CAAqC,EAArC,iCAA+DlH,QAA/D,CAAvB,C;;;AAGoBA,Q,CAAlBkH,c","file":"ListItem.js","sourcesContent":["/* @flow */\n\nimport React from 'react';\nimport { TouchableOpacity, View } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport { IconNB as Icon } from '../../basic/IconNB';\nimport _ from 'lodash';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport computeProps from '../../Utils/computeProps';\nimport { Text } from './Text';\n\nclass ListItem extends NativeBaseComponent {\n\n\n getInitialStyle() {\n return {\n listItem: {\n },\n listItemDivider: {\n },\n itemText: {\n },\n dividerItemText: {\n },\n itemIcon: {\n },\n itemNote: {\n },\n itemSubNote: {\n },\n thumbnail: {\n },\n Gravatar: {\n },\n fullImage: {\n },\n itemButton: {},\n\n };\n }\n\n getRightStyle() {\n return {\n right: {\n flex: 1,\n paddingLeft: 10,\n\n },\n right2: {\n flex: 1,\n flexDirection: 'row',\n paddingLeft: 10,\n alignItems: 'center',\n justifyContent: 'space-between',\n\n },\n right3: {\n flex: 1,\n flexDirection: 'column',\n paddingLeft: 10,\n alignSelf: 'flex-start',\n\n },\n };\n }\n\n thumbnailPresent() {\n let thumbnailComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Thumbnail)') { thumbnailComponentPresent = true; }\n });\n\n return thumbnailComponentPresent;\n }\n\n gravatarPresent() {\n let gravatarComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Gravatar)') { gravatarComponentPresent = true; }\n });\n\n return gravatarComponentPresent;\n }\n\n checkBoxPresent() {\n let checkBoxComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(CheckBox)') { checkBoxComponentPresent = true; }\n });\n\n return checkBoxComponentPresent;\n }\n\n radioPresent() {\n let radioComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Radio)') { radioComponentPresent = true; }\n });\n\n return radioComponentPresent;\n }\n\n iconPresent() {\n let iconComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Icon)') { iconComponentPresent = true; }\n });\n return iconComponentPresent;\n }\n\n pickerPresent() {\n let pickerComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(PickerNB)') { pickerComponentPresent = true; }\n });\n return pickerComponentPresent;\n }\n\n badgePresent() {\n let badgeComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Badge)') { badgeComponentPresent = true; }\n });\n\n return badgeComponentPresent;\n }\n\n inputPresent() {\n let inputComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(InputGroup)') { inputComponentPresent = true; }\n });\n return inputComponentPresent;\n }\n\n buttonPresent() {\n let buttonComponentPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Button)') { buttonComponentPresent = true; }\n });\n\n return buttonComponentPresent;\n }\n\n getChildProps(child) {\n let defaultProps = {};\n\n if (child && child.type.displayName === 'Image' && !Array.isArray(this.props.children)) {\n defaultProps = {\n resizeMode: 'stretch',\n style: this.getInitialStyle().fullImage,\n };\n } else if (child && child.type.displayName === 'Styled(Button)') {\n defaultProps = {\n small: true,\n style: this.getInitialStyle().itemButton,\n };\n } else if (child && child.type.displayName === 'Styled(InputGroup)') {\n defaultProps = {\n style: {\n borderColor: (this.props.children.props.success) ?\n this.getTheme().inputSuccessBorderColor :\n (this.props.children.props.error) ?\n this.getTheme().inputErrorBorderColor :\n this.getTheme().listBorderColor,\n },\n foregroundColor: this.getContextForegroundColor(),\n };\n } else if (child && child.type.displayName === 'Styled(Text)') {\n if (this.props.itemDivider) {\n defaultProps = {\n style: this.getInitialStyle().dividerItemText,\n };\n } else if (child.props.note && (this.thumbnailPresent() || this.gravatarPresent())) {\n defaultProps = {\n style: this.getInitialStyle().itemSubNote,\n };\n } else if (child.props.note) {\n defaultProps = {\n style: this.getInitialStyle().itemNote,\n };\n } else {\n defaultProps = {\n style: this.getInitialStyle().itemText,\n };\n }\n } else if (child && child.type.displayName === 'Styled(Icon)') {\n defaultProps = {\n style: this.getInitialStyle().itemIcon,\n };\n } else if (child && child.type.displayName === 'Styled(Picker)') {\n defaultProps = {\n style: {\n flex: 0.45,\n alignSelf: 'flex-end',\n paddingVertical: 5,\n height: 30,\n },\n textStyle: {\n color: '#7a7a7a',\n },\n };\n } else if (child && child.type.displayName === 'Styled(Thumbnail)') {\n defaultProps = {\n style: this.getInitialStyle().thumbnail,\n };\n } else if (child && child.type.displayName === 'Styled(Gravatar)') {\n defaultProps = {\n style: this.getInitialStyle().gravatar,\n };\n } else {\n defaultProps = {\n foregroundColor: this.getContextForegroundColor(),\n };\n }\n return computeProps(child.props, defaultProps);\n }\n\n notePresent() {\n let notePresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(Text)' && child.props.note) { notePresent = true; }\n });\n return notePresent;\n }\n\n insetPresent() {\n let insetPresent = false;\n React.Children.forEach(this.props.children, (child) => {\n if (child && child.type.displayName === 'Styled(InputGroup)' && child.props.inset) { insetPresent = true; }\n });\n\n return insetPresent;\n }\n\n\n inlinePresent() {\n let inlineComponentPresent = false;\n if (this.inputPresent()) {\n if (this.props.children.props.children.props &&\n this.props.children.props.children.props.inlineLabel) {\n inlineComponentPresent = true;\n } else { inlineComponentPresent = false; }\n }\n return inlineComponentPresent;\n }\n\n stackedPresent() {\n let stackedComponentPresent = false;\n if (this.inputPresent()) {\n if (this.props.children.props.children.props &&\n this.props.children.props.children.props.stackedLabel) {\n stackedComponentPresent = true;\n } else { stackedComponentPresent = false; }\n }\n\n return stackedComponentPresent;\n }\n\n\n squareThumbs() {\n let squareThumbs = false;\n if (this.thumbnailPresent() || this.gravatarPresent()) {\n React.Children.forEach(this.props.children, (child) => {\n if (child.props.square) { squareThumbs = true; }\n });\n }\n\n return squareThumbs;\n }\n\n renderChildren() {\n this.iconPresent();\n\n const newChildren = [];\n if (!Array.isArray(this.props.children) &&\n !this.inlinePresent() && !this.stackedPresent() && !this.insetPresent()) {\n newChildren.push(\n \n {React.cloneElement(this.props.children, this.getChildProps(this.props.children))}\n \n );\n } else {\n const childrenArray = React.Children.toArray(this.props.children);\n let iconElement = [];\n\n if (this.props.iconLeft && !this.props.iconRight && !this.pickerPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n \n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.props.iconLeft && this.pickerPresent()) {\n const pickerElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(PickerNB)') {\n return true;\n }\n });\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(pickerElement[0], { ...this.getChildProps(pickerElement[0]), key: 'listItem1', style: { flex: 1, alignSelf: 'flex-end' } }));\n } else if (this.props.iconRight && !this.props.iconLeft) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem1' }));\n } else if (this.badgePresent()) {\n const badgeElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Badge)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(badgeElement[0], { ...this.getChildProps(badgeElement[0]), key: 'listItem1' }));\n } else if (this.props.iconLeft && this.props.iconRight) {\n iconElement = _.filter(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Icon)') {\n return true;\n }\n });\n\n newChildren.push(\n {childrenArray.slice(0, 2).map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(React.cloneElement(iconElement[1], { ...this.getChildProps(iconElement[1]), key: 'listItem1' }));\n } else if (this.thumbnailPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Thumbnail)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.gravatarPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Gravatar)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], { ...this.getChildProps(iconElement[0]), key: 'listItem0' }));\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.checkBoxPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(CheckBox)') {\n return true;\n }\n });\n newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));\n newChildren.push(\n {childrenArray.map(child => React.cloneElement(child, this.getChildProps(child)))}\n );\n } else if (this.radioPresent()) {\n iconElement = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Radio)') {\n return true;\n }\n });\n newChildren.push(\n {childrenArray.map(child => React.cloneElement(child, this.getChildProps(child)))}\n );\n newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));\n } else if (this.inputPresent() && !this.inlinePresent() &&\n !this.stackedPresent() && !this.insetPresent()) {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child, { ...this.getChildProps(child), key: i }))}\n );\n } else if (this.inlinePresent()) {\n newChildren.push(\n \n {this.props.children.props.children.props.label}\n );\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i, style: { borderWidth: 0 } }))}\n );\n } else if (this.stackedPresent()) {\n newChildren.push(\n {this.props.children.props.children.props.label}\n\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i, style: { flex: 1, marginTop: 5 } }))}\n );\n } else if (this.insetPresent()) {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n } else {\n newChildren.push(\n {childrenArray.map((child, i) =>\n React.cloneElement(child,\n { ...this.getChildProps(child), key: i }))}\n );\n }\n }\n\n return newChildren;\n }\n\n render() {\n return (\n this._root = c}\n {...this.props} activeOpacity={(this.props.button) ? 0.2 : 1}\n >\n {this.renderChildren()}\n \n );\n }\n\n}\n\nListItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n header: React.PropTypes.bool,\n iconRight: React.PropTypes.bool,\n iconLeft: React.PropTypes.bool,\n button: React.PropTypes.bool,\n itemDivider: React.PropTypes.bool,\n};\n\nconst StyledListItem = connectStyle('NativeBase.ListItem1', {}, mapPropsToStyleNames)(ListItem);\n\nexport {\n StyledListItem as ListItem,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Subtitle.js b/dist/src/backward/Widgets/Subtitle.js index d0a67a235..2902c3e5d 100644 --- a/dist/src/backward/Widgets/Subtitle.js +++ b/dist/src/backward/Widgets/Subtitle.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Subtitle=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nSubtitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSubtitle = connectStyle('NativeBase.Subtitle', {}, mapPropsToStyleNames)(Subtitle);\nexport {\n StyledSubtitle as Subtitle,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Subtitle.js"],"names":["Subtitle","_root","c","props","propTypes","style","PropTypes","object","StyledSubtitle"],"mappings":";;;AAGA,4B;AACA;AACA;AACA,sE;;AAEMA,Q;AACK;AACP;AACE,0DAAM,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKC,KAAzC,mDADF;;AAGD,C;;;AAGHH,SAASI,SAAT;AACK,kBAAKA,SADV;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,gBAAiB,yCAAa,qBAAb,CAAoC,EAApC,iCAA8DR,QAA9D,CAAvB,C;;AAEoBA,Q,CAAlBQ,c","file":"Subtitle.js","sourcesContent":["/* @flow */\n\n\nimport React, { Component } from 'react';\nimport { Text } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\n\nclass Subtitle extends Component {\n render() {\n return (\n this._root = c} {...this.props} />\n );\n }\n}\n\nSubtitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSubtitle = connectStyle('NativeBase.Subtitle', {}, mapPropsToStyleNames)(Subtitle);\nexport {\n StyledSubtitle as Subtitle,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Text.js b/dist/src/backward/Widgets/Text.js index 8864b5c9a..dd73e8f21 100644 --- a/dist/src/backward/Widgets/Text.js +++ b/dist/src/backward/Widgets/Text.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Text=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>{this.props.children}\n );\n }\n\n}\n\nText.propTypes = {\n ...TextRN.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledText = connectStyle('NativeBase.Text', {}, mapPropsToStyleNames)(Text);\n\nexport {\n StyledText as Text,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Text.js"],"names":["Text","_root","c","props","children","propTypes","style","PropTypes","object","StyledText"],"mappings":";;;AAGA,4B;AACA;AACA;AACA,sE;AACA,iE;;;AAGMA,I;;AAEK;AACP;AACE,0DAAQ,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAb,EAAsC,KAAKC,KAA3C,mDAAmD,KAAKA,KAAL,CAAWC,QAA9D,CADF;;AAGD,C;;;;AAIHJ,KAAKK,SAAL;AACK,kBAAOA,SADZ;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC,iCAA0DT,IAA1D,CAAnB,C;;;AAGgBA,I,CAAdS,U","file":"Text.js","sourcesContent":["/* @flow */\n\n\nimport React from 'react';\nimport { Text as TextRN } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\n\n\nclass Text extends NativeBaseComponent {\n\n render() {\n return (\n this._root = c} {...this.props}>{this.props.children}\n );\n }\n\n}\n\nText.propTypes = {\n ...TextRN.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledText = connectStyle('NativeBase.Text', {}, mapPropsToStyleNames)(Text);\n\nexport {\n StyledText as Text,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/Title.js b/dist/src/backward/Widgets/Title.js index f58176c8d..51e6871e5 100644 --- a/dist/src/backward/Widgets/Title.js +++ b/dist/src/backward/Widgets/Title.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Title=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.prepareRootProps()} numberOfLines={1}>{this.props.children}\n );\n }\n}\n\nTitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTitle = connectStyle('NativeBase.Title', {}, mapPropsToStyleNames)(Title);\nexport {\n StyledTitle as Title,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/Title.js"],"names":["Title","type","fontFamily","getTheme","btnFontFamily","fontWeight","OS","undefined","alignSelf","defaultProps","style","props","justifyContent","_root","c","prepareRootProps","children","propTypes","PropTypes","object","StyledTitle"],"mappings":"g2BAAA,4B;AACA;AACA;AACA,sE;AACA,iE;AACA;AACA,sD;;;AAGMA,K;;;AAGe;AACjB,GAAMC,MAAO;AACXC,WAAY,KAAKC,QAAL,GAAgBC,aADjB;AAEXC,WAAa,sBAASC,EAAT,GAAgB,KAAjB,CAA0B,KAA1B,CAAkCC,SAFnC;AAGXC,UAAY,sBAASF,EAAT,GAAgB,KAAjB,CAA0B,QAA1B,CAAqC,YAHrC,CAAb;;;AAMA,GAAMG,cAAe;AACnBC,MAAOT,IADY,CAArB;;;AAIA,MAAO,2BAAa,KAAKU,KAAlB,CAAyBF,YAAzB,CAAP;AACD,C;;AAEQ;AACP;AACE,iDAAM,MAAO,CAAEG,eAAgB,QAAlB,CAAb,iDAA2C,mDAAM,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKC,gBAAL,EAApC,EAA6D,cAAe,CAA5E,kDAAgF,KAAKJ,KAAL,CAAWK,QAA3F,CAA3C,CADF;;AAGD,C;;;AAGHhB,MAAMiB,SAAN;AACK,WAAKA,SADV;AAEEP,MAAO,gBAAMQ,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC,iCAA2DpB,KAA3D,CAApB,C;;AAEiBA,K,CAAfoB,W","file":"Title.js","sourcesContent":["import React from 'react';\nimport { Platform, View } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport { Text } from './Text';\nimport computeProps from '../../Utils/computeProps';\n\n\nclass Title extends NativeBaseComponent {\n\n\n prepareRootProps() {\n const type = {\n fontFamily: this.getTheme().btnFontFamily,\n fontWeight: (Platform.OS === 'ios') ? '500' : undefined,\n alignSelf: (Platform.OS === 'ios') ? 'center' : 'flex-start',\n };\n\n const defaultProps = {\n style: type,\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n render() {\n return (\n this._root = c} {...this.prepareRootProps()} numberOfLines={1}>{this.props.children}\n );\n }\n}\n\nTitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTitle = connectStyle('NativeBase.Title', {}, mapPropsToStyleNames)(Title);\nexport {\n StyledTitle as Title,\n};\n"]} \ No newline at end of file diff --git a/dist/src/backward/Widgets/View.js b/dist/src/backward/Widgets/View.js index 7efa2b443..634c95cce 100644 --- a/dist/src/backward/Widgets/View.js +++ b/dist/src/backward/Widgets/View.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ViewNB=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nViewNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledViewNB = connectStyle('NativeBase.ViewNB', {}, mapPropsToStyleNames)(ViewNB);\nexport {\n StyledViewNB as ViewNB,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/backward/Widgets/View.js"],"names":["ViewNB","_root","c","props","propTypes","style","PropTypes","object","StyledViewNB"],"mappings":";;;AAGA,4B;AACA;AACA;AACA,sE;AACA,iE;;;AAGMA,M;AACK;AACP;AACC,0DAAM,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKC,KAAzC,mDADD;;AAGD,C;;;AAGHH,OAAOI,SAAP;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,cAAe,yCAAa,mBAAb,CAAkC,EAAlC,iCAA4DR,MAA5D,CAArB,C;;AAEkBA,M,CAAhBQ,Y","file":"View.js","sourcesContent":["/* @flow */\n\n\nimport React from 'react';\nimport { View, ViewPropTypes } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\n\n\nclass ViewNB extends NativeBaseComponent {\n render() {\n return (\n \t this._root = c} {...this.props}>\n );\n }\n}\n\nViewNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledViewNB = connectStyle('NativeBase.ViewNB', {}, mapPropsToStyleNames)(ViewNB);\nexport {\n StyledViewNB as ViewNB,\n};\n"]} \ No newline at end of file diff --git a/dist/src/basic/Actionsheet.js b/dist/src/basic/Actionsheet.js index af4dd8d0d..7ccbdb4b9 100644 --- a/dist/src/basic/Actionsheet.js +++ b/dist/src/basic/Actionsheet.js @@ -1,49 +1,51 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ActionSheetContainer=undefined;var _extends=Object.assign||function(target){for(var i=1;i {\n return item.text\n });\n config.options = filtered;\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n }\n else {\n ActionSheetIOS.showActionSheetWithOptions(config, callback);\n }\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 this.setState({ modalVisible: false })}\n >\n this.setState({ modalVisible: false })} style={{ backgroundColor: 'rgba(0,0,0,0.4)', flex: 1, justifyContent: 'flex-end' }}>\n \n {this.state.title}\n {\n return (typeof this.state.items[0] === 'string') ?\n { this.state.callback(id); this.setState({ modalVisible: false }) }} style={{ borderColor: 'transparent' }}>\n {data}\n \n :\n { this.state.callback(id); this.setState({ modalVisible: false }) }} style={{ borderColor: 'transparent' }} icon>\n \n \n \n \n {data.text}\n \n \n \n }\n } />\n \n \n \n );\n }\n}\n\nActionSheetContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledActionSheetContainer = connectStyle('NativeBase.ActionSheetContainer', {}, mapPropsToStyleNames)(ActionSheetContainer);\n\nexport {\n StyledActionSheetContainer as ActionSheetContainer,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Actionsheet.js"],"names":["ActionSheetContainer","props","state","modalVisible","items","config","callback","OS","options","filtered","map","item","text","showActionSheetWithOptions","setState","title","message","destructiveButtonIndex","cancelButtonIndex","autoHide","duration","console","warn","backgroundColor","flex","justifyContent","height","length","padding","elevation","color","marginHorizontal","marginTop","data","i","id","borderColor","icon","actionsheetInstance","_root","showActionSheet","propTypes","style","PropTypes","object","StyledActionSheetContainer"],"mappings":";;AAEA,4B;AACA;;;;;;;;AAQA;AACA;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,GAAI,sBAASC,EAAT,GAAgB,KAApB,CAA2B;AACzB,GAAI,MAAOF,QAAOG,OAAP,CAAe,CAAf,CAAP,EAA4B,QAAhC,CAA0C;AACxC,GAAIA,SAAUH,OAAOG,OAArB;AACA,GAAIC,UAAWD,QAAQE,GAAR,CAAY,cAAQ;AACjC,MAAOC,MAAKC,IAAZ;AACD,CAFc,CAAf;AAGAP,OAA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;AAGE,UAAW,mBAAC6B,IAAD,CAAOC,CAAP,CAAUC,EAAV,CAAiB;AAC1B,MAAO,OAAO,QAAKjC,KAAL,CAAWE,KAAX,CAAiB,CAAjB,CAAP,GAA+B,QAA/B;AACH;AACE,QAAS,kBAAM;AACb,OAAKF,KAAL,CAAWI,QAAX,CAAoB6B,EAApB;AACA,OAAKrB,QAAL,CAAc,CAAEX,aAAc,KAAhB,CAAd;AACD,CAJH;AAKE,MAAO,CAAEiC,YAAa,aAAf,CALT;;AAOE,2FAAOH,IAAP,CAPF,CADG;;AAUH;AACE,QAAS,kBAAM;AACb,OAAK/B,KAAL,CAAWI,QAAX,CAAoB6B,EAApB;AACA,OAAKrB,QAAL,CAAc,CAAEX,aAAc,KAAhB,CAAd;AACD,CAJH;AAKE,MAAO,CAAEiC,YAAa,aAAf,CALT;AAME,SANF;;AAQE;AACE,0CAAM,KAAMH,KAAKI,IAAjB,kDADF,CARF;;AAWE,0CAAM,MAAO,CAAED,YAAa,aAAf,CAAb;AACE,2FAAOH,KAAKrB,IAAZ,CADF,CAXF;;AAcE,6FAdF,CAVJ;;AA0BD,CA9BH,iDAVF,CATF,CANF,CADF;;;;;;AA8DD,C,oCA/FWP,M,CAAQC,Q,CAAU,CAC5B,KAAKgC,mBAAL,CAAyBC,KAAzB,CAA+BC,eAA/B,CAA+CnC,MAA/C,CAAuDC,QAAvD,EACD,C;;;AAgGHN,qBAAqByC,SAArB;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,4BAA6B;AACjC,iCADiC;AAEjC,EAFiC;;AAIjC7C,oBAJiC,CAAnC,C;;AAMuCA,oB,CAA9B6C,0B","file":"Actionsheet.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport {\n View,\n Modal,\n Platform,\n ActionSheetIOS,\n TouchableOpacity,\n ViewPropTypes\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 { List } from \"./List\";\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 this.setState({ modalVisible: false })}\n >\n this.setState({ modalVisible: false })}\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 {\n return typeof this.state.items[0] === \"string\"\n ? {\n this.state.callback(id);\n this.setState({ modalVisible: false });\n }}\n style={{ borderColor: \"transparent\" }}\n >\n {data}\n \n : {\n this.state.callback(id);\n this.setState({ modalVisible: false });\n }}\n style={{ borderColor: \"transparent\" }}\n icon\n >\n \n \n \n \n {data.text}\n \n \n ;\n }}\n />\n \n \n \n );\n }\n}\n\nActionSheetContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\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/dist/src/basic/Badge.js b/dist/src/basic/Badge.js index 127b8258b..0e25ccdcb 100644 --- a/dist/src/basic/Badge.js +++ b/dist/src/basic/Badge.js @@ -1,30 +1,27 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Badge=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n {this.props.children}\n \n );\n }\n\n}\n\n\nBadge.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledBadge = connectStyle('NativeBase.Badge', {}, mapPropsToStyleNames)(Badge);\n\nexport {\n StyledBadge as Badge,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Badge.js"],"names":["Badge","_root","c","props","children","propTypes","style","PropTypes","object","StyledBadge"],"mappings":"q1BAAA,4B;AACA;;AAEA;AACA,qD;AACA,mE;;AAEMA,K;AACK;AACP;AACE,0DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C;AACG,KAAKA,KAAL,CAAWC,QADd,CADF;;;AAKD,C;;;AAGHJ,MAAMK,SAAN;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC;AAClBT,KADkB,CAApB,C;;;AAIwBA,K,CAAfS,W","file":"Badge.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport variables from \"../theme/variables/platform\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Badge extends Component {\n render() {\n return (\n (this._root = c)} {...this.props}>\n {this.props.children}\n \n );\n }\n}\n\nBadge.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledBadge = connectStyle(\"NativeBase.Badge\", {}, mapPropsToStyleNames)(\n Badge\n);\n\nexport { StyledBadge as Badge };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Base/NativeBaseComponent.js b/dist/src/basic/Base/NativeBaseComponent.js index 973110ed0..5239b602f 100644 --- a/dist/src/basic/Base/NativeBaseComponent.js +++ b/dist/src/basic/Base/NativeBaseComponent.js @@ -1,9 +1,9 @@ Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i this._root = c} {...this.props} />\n );\n }\n}\n\nBody.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledBody = connectStyle('NativeBase.Body', {}, mapPropsToStyleNames)(Body);\n\nexport {\n StyledBody as Body,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Body.js"],"names":["Body","_root","c","props","propTypes","style","PropTypes","object","StyledBody"],"mappings":"m1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,I;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,kDAAP;AACD,C;;;AAGHH,KAAKI,SAAL;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC;AACjBR,IADiB,CAAnB,C;;;AAIuBA,I,CAAdQ,U","file":"Body.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Body extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nBody.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledBody = connectStyle(\"NativeBase.Body\", {}, mapPropsToStyleNames)(\n Body\n);\n\nexport { StyledBody as Body };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Button.js b/dist/src/basic/Button.js index 1353ccfab..ed112448f 100644 --- a/dist/src/basic/Button.js +++ b/dist/src/basic/Button.js @@ -1,25 +1,30 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Button=undefined;var _extends=Object.assign||function(target){for(var i=1;i;\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().borderedBtn,\n };\n\n return computeProps(this.props, defaultProps);\n }\n render() {\n const children = Platform.OS === 'ios'\n ? this.props.children\n : React.Children.map(this.props.children, child => child && child.type === Text ? React.cloneElement(child, { uppercase: true, ...child.props }) : child);\n if (Platform.OS === 'ios' || variables.androidRipple === false || Platform['Version'] <= 21) {\n return (\n this._root = c}\n activeOpacity={(this.props.activeOpacity) ? this.props.activeOpacity : 0.5}\n >\n {children}\n \n );\n }\n else {\n return (\n this._root = c}\n onPress={this.props.onPress}\n background={(this.props.androidRippleColor) ? TouchableNativeFeedback.Ripple(this.props.androidRippleColor) : TouchableNativeFeedback.Ripple(variables.androidRippleColor)}\n {...this.prepareRootProps() }>\n \n {children}\n \n \n );\n }\n }\n}\n\nButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n block: React.PropTypes.bool,\n primary: React.PropTypes.bool,\n transparent: React.PropTypes.bool,\n success: React.PropTypes.bool,\n danger: React.PropTypes.bool,\n warning: React.PropTypes.bool,\n info: React.PropTypes.bool,\n bordered: React.PropTypes.bool,\n disabled: React.PropTypes.bool,\n rounded: React.PropTypes.bool,\n large: React.PropTypes.bool,\n small: React.PropTypes.bool,\n active: React.PropTypes.bool,\n};\n\nconst StyledButton = connectStyle('NativeBase.Button', {}, mapPropsToStyleNames)(Button);\nexport {\n StyledButton as Button,\n};"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Button.js"],"names":["Button","borderedBtn","borderWidth","props","bordered","undefined","borderRadius","rounded","borderRadiusLarge","defaultProps","style","getInitialStyle","children","OS","Children","map","child","type","cloneElement","uppercase","androidRipple","prepareRootProps","_root","c","activeOpacity","onPress","androidRippleColor","Ripple","propTypes","PropTypes","object","block","bool","primary","transparent","success","danger","warning","info","disabled","large","small","active","StyledButton"],"mappings":";;AAEA,4B;AACA;;;;;;AAMA;AACA,uD;AACA;AACA,mD;;AAEA,mE;;AAEMA,M;AACc;AAChB,MAAO;AACLC,YAAa;AACXC,YAAa,KAAKC,KAAL,CAAWC,QAAX,CAAsB,CAAtB,CAA0BC,SAD5B;AAEXC,aAAc,KAAKH,KAAL,CAAWI,OAAX,EAAsB,KAAKJ,KAAL,CAAWC,QAAjC;AACV,mBAAUI,iBADA;AAEV,CAJO,CADR,CAAP;;;AAQD,C;;;;AAIkB;AACjB,GAAMC,cAAe;AACnBC,MAAO,KAAKC,eAAL,GAAuBV,WADX,CAArB;;;AAIA,MAAO,2BAAa,KAAKE,KAAlB,CAAyBM,YAAzB,CAAP;AACD,C;AACQ;AACP,GAAMG,UAAW,sBAASC,EAAT,GAAgB,KAAhB;AACb,KAAKV,KAAL,CAAWS,QADE;AAEb,gBAAME,QAAN,CAAeC,GAAf;AACE,KAAKZ,KAAL,CAAWS,QADb;AAEE;AACEI,OAASA,MAAMC,IAAN,aAAT;AACI,gBAAMC,YAAN,CAAmBF,KAAnB,WAA4BG,UAAW,IAAvC,EAAgDH,MAAMb,KAAtD,EADJ;AAEIa,KAHN,GAFF,CAFJ;;AASA;AACE,sBAASH,EAAT,GAAgB,KAAhB;AACA,mBAAUO,aAAV,GAA4B,KAD5B;AAEA,sBAAS,SAAT,GAAuB,EAHzB;AAIE;AACA;AACE;AACM,KAAKC,gBAAL,EADN;AAEE,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAFP;AAGE;AACE,KAAKpB,KAAL,CAAWqB,aAAX,CAA2B,KAAKrB,KAAL,CAAWqB,aAAtC,CAAsD,GAJ1D;;;AAOGZ,QAPH,CADF;;;AAWD,CAhBD,IAgBO;AACL;AACE;AACE,IAAK,sBAAM,QAAKU,KAAL,CAAaC,CAAnB,EADP;AAEE,QAAS,KAAKpB,KAAL,CAAWsB,OAFtB;AAGE;AACE,KAAKtB,KAAL,CAAWuB,kBAAX;AACI,qCAAwBC,MAAxB,CAA+B,KAAKxB,KAAL,CAAWuB,kBAA1C,CADJ;AAEI,qCAAwBC,MAAxB,CAA+B,mBAAUD,kBAAzC,CANR;;AAQM,KAAKL,gBAAL,EARN;;AAUE,4DAAU,KAAKA,gBAAL,EAAV;AACGT,QADH,CAVF,CADF;;;;AAgBD;AACF,C;;;AAGHZ,OAAO4B,SAAP;AACK,8BAAiBA,SADtB;AAEElB,MAAO,gBAAMmB,SAAN,CAAgBC,MAFzB;AAGEC,MAAO,gBAAMF,SAAN,CAAgBG,IAHzB;AAIEC,QAAS,gBAAMJ,SAAN,CAAgBG,IAJ3B;AAKEE,YAAa,gBAAML,SAAN,CAAgBG,IAL/B;AAMEG,QAAS,gBAAMN,SAAN,CAAgBG,IAN3B;AAOEI,OAAQ,gBAAMP,SAAN,CAAgBG,IAP1B;AAQEK,QAAS,gBAAMR,SAAN,CAAgBG,IAR3B;AASEM,KAAM,gBAAMT,SAAN,CAAgBG,IATxB;AAUE5B,SAAU,gBAAMyB,SAAN,CAAgBG,IAV5B;AAWEO,SAAU,gBAAMV,SAAN,CAAgBG,IAX5B;AAYEzB,QAAS,gBAAMsB,SAAN,CAAgBG,IAZ3B;AAaEQ,MAAO,gBAAMX,SAAN,CAAgBG,IAbzB;AAcES,MAAO,gBAAMZ,SAAN,CAAgBG,IAdzB;AAeEU,OAAQ,gBAAMb,SAAN,CAAgBG,IAf1B;;;AAkBA,GAAMW,cAAe;AACnB,mBADmB;AAEnB,EAFmB;;AAInB3C,MAJmB,CAArB,C;AAKyBA,M,CAAhB2C,Y","file":"Button.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport {\n TouchableOpacity,\n Platform,\n View,\n TouchableNativeFeedback\n} from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport variables from \"./../theme/variables/platform\";\nimport { Text } from \"./Text\";\nimport computeProps from \"../Utils/computeProps\";\n\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Button extends Component {\n getInitialStyle() {\n return {\n borderedBtn: {\n borderWidth: this.props.bordered ? 1 : undefined,\n borderRadius: this.props.rounded && this.props.bordered\n ? variables.borderRadiusLarge\n : 2\n }\n };\n }\n\n _root: React$Element;\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getInitialStyle().borderedBtn\n };\n\n return computeProps(this.props, defaultProps);\n }\n render() {\n const children = Platform.OS === \"ios\"\n ? this.props.children\n : React.Children.map(\n this.props.children,\n child =>\n child && child.type === Text\n ? React.cloneElement(child, { uppercase: true, ...child.props })\n : child\n );\n if (\n Platform.OS === \"ios\" ||\n variables.androidRipple === false ||\n Platform[\"Version\"] <= 21\n ) {\n return (\n (this._root = c)}\n activeOpacity={\n this.props.activeOpacity ? this.props.activeOpacity : 0.5\n }\n >\n {children}\n \n );\n } else {\n return (\n (this._root = c)}\n onPress={this.props.onPress}\n background={\n this.props.androidRippleColor\n ? TouchableNativeFeedback.Ripple(this.props.androidRippleColor)\n : TouchableNativeFeedback.Ripple(variables.androidRippleColor)\n }\n {...this.prepareRootProps()}\n >\n \n {children}\n \n \n );\n }\n }\n}\n\nButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n block: React.PropTypes.bool,\n primary: React.PropTypes.bool,\n transparent: React.PropTypes.bool,\n success: React.PropTypes.bool,\n danger: React.PropTypes.bool,\n warning: React.PropTypes.bool,\n info: React.PropTypes.bool,\n bordered: React.PropTypes.bool,\n disabled: React.PropTypes.bool,\n rounded: React.PropTypes.bool,\n large: React.PropTypes.bool,\n small: React.PropTypes.bool,\n active: React.PropTypes.bool\n};\n\nconst StyledButton = connectStyle(\n \"NativeBase.Button\",\n {},\n mapPropsToStyleNames\n)(Button);\nexport { StyledButton as Button };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Card.js b/dist/src/basic/Card.js index 16d55004f..cc37e65a4 100644 --- a/dist/src/basic/Card.js +++ b/dist/src/basic/Card.js @@ -1,26 +1,27 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Card=undefined;var _extends=Object.assign||function(target){for(var i=1;i r1 !== r2 });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n this._root = c} {...this.props}>\n {this.props.children}\n \n );\n }\n}\n\nCard.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object,\n};\n\nconst StyledCard = connectStyle('NativeBase.Card', {}, mapPropsToStyleNames)(Card);\n\nexport {\n StyledCard as Card,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Card.js"],"names":["Card","props","dataArray","renderRow","ds","DataSource","rowHasChanged","r1","r2","dataSource","cloneWithRows","_root","c","children","propTypes","style","PropTypes","object","StyledCard"],"mappings":"m1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,I;AACK;AACP,GAAI,KAAKC,KAAL,CAAWC,SAAX,EAAwB,KAAKD,KAAL,CAAWE,SAAvC,CAAkD;AAChD,GAAMC,IAAK,GAAI,uBAASC,UAAb,CAAwB;AACjCC,cAAe,uBAACC,EAAD,CAAKC,EAAL,QAAYD,MAAOC,EAAnB,EADkB,CAAxB,CAAX;;AAGA,GAAMC,YAAaL,GAAGM,aAAH,CAAiB,KAAKT,KAAL,CAAWC,SAA5B,CAAnB;AACA;AACE;AACM,KAAKD,KADX;AAEE,wBAFF;AAGE,WAAYQ,UAHd;AAIE,UAAW,KAAKR,KAAL,CAAWE,SAJxB,kDADF;;;AAQD;AACD;AACE,0DAAM,IAAK,sBAAM,QAAKQ,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKX,KAA3C;AACG,KAAKA,KAAL,CAAWY,QADd,CADF;;;AAKD,C;;;AAGHb,KAAKc,SAAL;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEf,UAAW,gBAAMc,SAAN,CAAgBC,MAH7B;AAIEd,UAAW,gBAAMa,SAAN,CAAgBC,MAJ7B;;;AAOA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC;AACjBlB,IADiB,CAAnB,C;;;AAIuBA,I,CAAdkB,U","file":"Card.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ListView, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Card extends Component {\n render() {\n if (this.props.dataArray && this.props.renderRow) {\n const ds = new ListView.DataSource({\n rowHasChanged: (r1, r2) => r1 !== r2\n });\n const dataSource = ds.cloneWithRows(this.props.dataArray);\n return (\n \n );\n }\n return (\n (this._root = c)} {...this.props}>\n {this.props.children}\n \n );\n }\n}\n\nCard.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object\n};\n\nconst StyledCard = connectStyle(\"NativeBase.Card\", {}, mapPropsToStyleNames)(\n Card\n);\n\nexport { StyledCard as Card };\n"]} \ No newline at end of file diff --git a/dist/src/basic/CardItem.js b/dist/src/basic/CardItem.js index c6a66e088..2fa11af4d 100644 --- a/dist/src/basic/CardItem.js +++ b/dist/src/basic/CardItem.js @@ -1,25 +1,24 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.CardItem=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}\n activeOpacity={(this.props.button) ? 0.2 : 1}\n >\n {this.props.children}\n \n );\n }\n else {\n return (\n this._root = c} {...this.props}\n >\n {this.props.children}\n \n );\n }\n }\n}\n\nCardItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n header: React.PropTypes.bool,\n cardBody: React.PropTypes.bool,\n footer: React.PropTypes.bool,\n button: React.PropTypes.bool,\n};\n\nconst StyledCardItem = connectStyle('NativeBase.CardItem', {}, mapPropsToStyleNames)(CardItem);\n\nexport {\n StyledCardItem as CardItem,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/CardItem.js"],"names":["CardItem","props","button","_root","c","children","propTypes","style","PropTypes","object","header","bool","cardBody","footer","StyledCardItem"],"mappings":"21BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,Q;AACK;AACP,GAAI,KAAKC,KAAL,CAAWC,MAAf,CAAuB;AACrB;AACE;AACE,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EADP;AAEM,KAAKH,KAFX;AAGE,cAAe,KAAKA,KAAL,CAAWC,MAAX,CAAoB,GAApB,CAA0B,CAH3C;;AAKG,KAAKD,KAAL,CAAWI,QALd,CADF;;;AASD,CAVD,IAUO;AACL;AACE,0DAAM,IAAK,sBAAM,QAAKF,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKH,KAA3C;AACG,KAAKA,KAAL,CAAWI,QADd,CADF;;;AAKD;AACF,C;;;AAGHL,SAASM,SAAT;AACK,8BAAiBA,SADtB;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEC,OAAQ,gBAAMF,SAAN,CAAgBG,IAH1B;AAIEC,SAAU,gBAAMJ,SAAN,CAAgBG,IAJ5B;AAKEE,OAAQ,gBAAML,SAAN,CAAgBG,IAL1B;AAMET,OAAQ,gBAAMM,SAAN,CAAgBG,IAN1B;;;AASA,GAAMG,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;;AAIrBd,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlBc,c","file":"CardItem.js","sourcesContent":["import React, { Component } from \"react\";\nimport { TouchableOpacity, View } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass CardItem extends Component {\n render() {\n if (this.props.button) {\n return (\n (this._root = c)}\n {...this.props}\n activeOpacity={this.props.button ? 0.2 : 1}\n >\n {this.props.children}\n \n );\n } else {\n return (\n (this._root = c)} {...this.props}>\n {this.props.children}\n \n );\n }\n }\n}\n\nCardItem.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n header: React.PropTypes.bool,\n cardBody: React.PropTypes.bool,\n footer: React.PropTypes.bool,\n button: React.PropTypes.bool\n};\n\nconst StyledCardItem = connectStyle(\n \"NativeBase.CardItem\",\n {},\n mapPropsToStyleNames\n)(CardItem);\n\nexport { StyledCardItem as CardItem };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Checkbox.js b/dist/src/basic/Checkbox.js index 0ee8accad..b3575c1de 100644 --- a/dist/src/basic/Checkbox.js +++ b/dist/src/basic/Checkbox.js @@ -1,14 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.CheckBox=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.prepareRootProps(variables) }>\n \n \n );\n }\n}\n\nCheckBox.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n checked: React.PropTypes.bool,\n};\n\nconst StyledCheckBox = connectStyle('NativeBase.CheckBox', {}, mapPropsToStyleNames)(CheckBox);\n\nexport {\n StyledCheckBox as CheckBox,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Checkbox.js"],"names":["CheckBox","variables","checkStyle","borderColor","props","color","checkboxBgColor","backgroundColor","checked","defaultProps","style","getInitialStyle","context","theme","platformStyle","platform","_root","c","prepareRootProps","checkboxTickColor","fontSize","CheckboxFontSize","lineHeight","CheckboxIconSize","contextTypes","PropTypes","object","propTypes","bool","StyledCheckBox"],"mappings":"21BAAA,4B;AACA;AACA,4D;AACA;AACA,mE;AACA,qD;AACA,8B;AACA,mD;;AAEMA,Q;;;;;AAKYC,S,CAAW;AACzB,MAAO;AACLC,WAAY;AACVC,YAAa,KAAKC,KAAL,CAAWC,KAAX;AACT,KAAKD,KAAL,CAAWC,KADF;AAETJ,UAAUK,eAHJ;AAIVC,gBAAiB,KAAKH,KAAL,CAAWI,OAAX,GAAuB,IAAvB;AACb,KAAKJ,KAAL,CAAWC,KAAX,CAAmB,KAAKD,KAAL,CAAWC,KAA9B,CAAsCJ,UAAUK,eADnC;AAEb,aANM,CADP,CAAP;;;AAUD,C;;AAEgBL,S,CAAW;AAC1B,GAAMQ,cAAe;AACnBC,MAAO,KAAKC,eAAL,CAAqBV,SAArB,EAAgCC,UADpB,CAArB;;;AAIA,MAAO,2BAAa,KAAKE,KAAlB,CAAyBK,YAAzB,CAAP;AACD,C;AACQ;AACP,GAAMR,WAAY,KAAKW,OAAL,CAAaC,KAAb;AACd,KAAKD,OAAL,CAAaC,KAAb,CAAmB,4BAAnB,EAAiDZ,SADnC,mBAAlB;;AAGA,GAAMa,eAAgBb,UAAUa,aAAhC;AACA,GAAMC,UAAWd,UAAUc,QAA3B;AACA;AACE;AACE,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EADP;AAEM,KAAKC,gBAAL,CAAsBjB,SAAtB,CAFN;;AAIE;AACE,MAAO;AACLI,MAAOJ,UAAUkB,iBADZ;AAELC,SAAUnB,UAAUoB,gBAFf;AAGLC,WAAYrB,UAAUsB,gBAHjB,CADT;;AAME;AACER,WAAa,KAAb,EAAsBD,gBAAkB,UAAxC;AACI,uBADJ;AAEI,cATR,iDAJF,CADF;;;;;AAmBD,C,wCAlDGd,Q,CACGwB,Y,CAAe,CACpBX,MAAO,gBAAMY,SAAN,CAAgBC,MADH,C;;;AAoDxB1B,SAAS2B,SAAT;AACK,8BAAiBA,SADtB;AAEEjB,MAAO,gBAAMe,SAAN,CAAgBC,MAFzB;AAGElB,QAAS,gBAAMiB,SAAN,CAAgBG,IAH3B;;;AAMA,GAAMC,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;;AAIrB7B,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlB6B,c","file":"Checkbox.js","sourcesContent":["import React, { Component } from \"react\";\nimport { TouchableOpacity, Platform } from \"react-native\";\nimport IconNB from \"react-native-vector-icons/Ionicons\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\nimport variable from \"../theme/variables/platform\";\nimport _ from \"lodash\";\nimport computeProps from \"../Utils/computeProps\";\n\nclass CheckBox extends Component {\n static contextTypes = {\n theme: React.PropTypes.object\n };\n\n getInitialStyle(variables) {\n return {\n checkStyle: {\n borderColor: this.props.color\n ? this.props.color\n : variables.checkboxBgColor,\n backgroundColor: this.props.checked === true\n ? this.props.color ? this.props.color : variables.checkboxBgColor\n : \"transparent\"\n }\n };\n }\n\n prepareRootProps(variables) {\n const defaultProps = {\n style: this.getInitialStyle(variables).checkStyle\n };\n\n return computeProps(this.props, defaultProps);\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 const platform = variables.platform;\n return (\n (this._root = c)}\n {...this.prepareRootProps(variables)}\n >\n \n \n );\n }\n}\n\nCheckBox.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n checked: React.PropTypes.bool\n};\n\nconst StyledCheckBox = connectStyle(\n \"NativeBase.CheckBox\",\n {},\n mapPropsToStyleNames\n)(CheckBox);\n\nexport { StyledCheckBox as CheckBox };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Container.js b/dist/src/basic/Container.js index 75a85ca41..3212ed6f6 100644 --- a/dist/src/basic/Container.js +++ b/dist/src/basic/Container.js @@ -1,19 +1,28 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Container=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n {this.props.children}\n { if (!Toast.toastInstance) Toast.toastInstance = c; }} />\n { if (!ActionSheet.actionsheetInstance) ActionSheet.actionsheetInstance = c; }} />\n \n );\n }\n}\n\nContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledContainer = connectStyle('NativeBase.Container', {}, mapPropsToStyleNames)(Container);\n\nexport {\n StyledContainer as Container,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Container.js"],"names":["Container","_root","c","props","children","toastInstance","actionsheetInstance","propTypes","style","PropTypes","object","StyledContainer"],"mappings":"61BAAA,4B;AACA;;AAEA;AACA,mE;AACA;AACA;AACA,4B;;AAEMA,S;AACK;AACP;AACE,0DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C;AACG,KAAKA,KAAL,CAAWC,QADd;AAEE;AACE,IAAK,eAAK;AACR,GAAI,CAAC,+BAAMC,aAAX,CAA0B,+BAAMA,aAAN,CAAsBH,CAAtB;AAC3B,CAHH,iDAFF;;AAOE;AACE,IAAK,eAAK;AACR,GAAI,CAAC,kCAAYI,mBAAjB;AACE,kCAAYA,mBAAZ,CAAkCJ,CAAlC;AACH,CAJH,iDAPF,CADF;;;;AAgBD,C;;;AAGHF,UAAUO,SAAV;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,iBAAkB;AACtB,sBADsB;AAEtB,EAFsB;;AAItBX,SAJsB,CAAxB,C;;AAM4BA,S,CAAnBW,e","file":"Container.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\nimport { ToastContainer as Toast } from \"./ToastContainer\";\nimport { ActionSheetContainer as ActionSheet } from \"./Actionsheet\";\nimport { Text } from \"./Text\";\n\nclass Container extends Component {\n render() {\n return (\n (this._root = c)} {...this.props}>\n {this.props.children}\n {\n if (!Toast.toastInstance) Toast.toastInstance = c;\n }}\n />\n {\n if (!ActionSheet.actionsheetInstance)\n ActionSheet.actionsheetInstance = c;\n }}\n />\n \n );\n }\n}\n\nContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledContainer = connectStyle(\n \"NativeBase.Container\",\n {},\n mapPropsToStyleNames\n)(Container);\n\nexport { StyledContainer as Container };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Content.js b/dist/src/basic/Content.js index 93e69086f..fb24a80a1 100644 --- a/dist/src/basic/Content.js +++ b/dist/src/basic/Content.js @@ -1,16 +1,21 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Content=undefined;var _extends=Object.assign||function(target){for(var i=1;i { this._scrollview = c; this._root = c; }}\n {...this.props}\n >\n {this.props.children}\n \n );\n }\n}\n\nContent.propTypes = {\n style: React.PropTypes.object,\n padder: React.PropTypes.bool,\n disableKBDismissScroll: React.PropTypes.bool,\n enableResetScrollToCoords: React.PropTypes.bool\n};\n\nconst StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content);\n\nexport {\n StyledContent as Content,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Content.js"],"names":["Content","props","disableKBDismissScroll","x","y","_scrollview","c","_root","children","propTypes","style","PropTypes","object","padder","bool","enableResetScrollToCoords","StyledContent"],"mappings":"y1BAAA,4B;AACA;AACA;AACA,mE;;AAEMA,O;AACK;AACP;AACE;AACE,iCAAkC,KADpC;AAEE;AACE,KAAKC,KAAL,CAAWC,sBAAX,CAAoC,IAApC,CAA2C,CAAEC,EAAG,CAAL,CAAQC,EAAG,CAAX,CAH/C;;AAKE,IAAK,eAAK;AACR,OAAKC,WAAL,CAAmBC,CAAnB;AACA,OAAKC,KAAL,CAAaD,CAAb;AACD,CARH;AASM,KAAKL,KATX;;AAWG,KAAKA,KAAL,CAAWO,QAXd,CADF;;;AAeD,C;;;AAGHR,QAAQS,SAAR,CAAoB;AAClBC,MAAO,gBAAMC,SAAN,CAAgBC,MADL;AAElBC,OAAQ,gBAAMF,SAAN,CAAgBG,IAFN;AAGlBZ,uBAAwB,gBAAMS,SAAN,CAAgBG,IAHtB;AAIlBC,0BAA2B,gBAAMJ,SAAN,CAAgBG,IAJzB,CAApB;;;AAOA,GAAME,eAAgB;AACpB,oBADoB;AAEpB,EAFoB;;AAIpBhB,OAJoB,CAAtB,C;;AAM0BA,O,CAAjBgB,a","file":"Content.js","sourcesContent":["import React, { Component } from \"react\";\nimport { KeyboardAwareScrollView } from \"react-native-keyboard-aware-scroll-view\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Content extends Component {\n render() {\n return (\n {\n this._scrollview = c;\n this._root = c;\n }}\n {...this.props}\n >\n {this.props.children}\n \n );\n }\n}\n\nContent.propTypes = {\n style: React.PropTypes.object,\n padder: React.PropTypes.bool,\n disableKBDismissScroll: React.PropTypes.bool,\n enableResetScrollToCoords: React.PropTypes.bool\n};\n\nconst StyledContent = connectStyle(\n \"NativeBase.Content\",\n {},\n mapPropsToStyleNames\n)(Content);\n\nexport { StyledContent as Content };\n"]} \ No newline at end of file diff --git a/dist/src/basic/DeckSwiper.js b/dist/src/basic/DeckSwiper.js index 1ace60618..7290a6291 100644 --- a/dist/src/basic/DeckSwiper.js +++ b/dist/src/basic/DeckSwiper.js @@ -1,8 +1,8 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.DeckSwiper=undefined;var _extends=Object.assign||function(target){for(var i=1;ithis.props.dataSource.length-1&&newIdx===this.props.dataSource.length-1){ +if( +newIdx2>this.props.dataSource.length-1&& +newIdx===this.props.dataSource.length-1) +{ return[newIdx,0]; }else if(newIdx>this.props.dataSource.length-1){ return[0,1]; }else{ return[newIdx,newIdx2]; } -}},{key:'selectNext',value:function selectNext() +}},{key:"selectNext",value:function selectNext() {var _this2=this; var dataSource=this.props.dataSource; @@ -85,49 +88,33 @@ selectedItem2:_this2.props.dataSource[nextIndexes[1]]}); },350); },50); - -}},{key:'swipeRight',value:function swipeRight() - +}},{key:"swipeRight",value:function swipeRight() {var _this3=this; -if(this.props.onSwiping) -this.props.onSwiping('right'); +if(this.props.onSwiping)this.props.onSwiping("right"); setTimeout(function(){ -_reactNative.Animated.timing( -_this3.state.fadeAnim, -{toValue:1}). -start(); -_reactNative.Animated.spring( -_this3.state.enter, -{toValue:1,friction:7}). -start(); +_reactNative.Animated.timing(_this3.state.fadeAnim,{toValue:1}).start(); +_reactNative.Animated.spring(_this3.state.enter,{toValue:1,friction:7}).start(); _this3.selectNext(); _reactNative.Animated.decay(_this3.state.pan,{ velocity:{x:8,y:1}, deceleration:0.98}). start(_this3._resetState.bind(_this3)); },300); -}},{key:'swipeLeft',value:function swipeLeft() +}},{key:"swipeLeft",value:function swipeLeft() {var _this4=this; -if(this.props.onSwiping) -this.props.onSwiping('left'); +if(this.props.onSwiping)this.props.onSwiping("left"); setTimeout(function(){ -_reactNative.Animated.timing( -_this4.state.fadeAnim, -{toValue:1}). -start(); -_reactNative.Animated.spring( -_this4.state.enter, -{toValue:1,friction:7}). -start(); +_reactNative.Animated.timing(_this4.state.fadeAnim,{toValue:1}).start(); +_reactNative.Animated.spring(_this4.state.enter,{toValue:1,friction:7}).start(); _this4.selectNext(); _reactNative.Animated.decay(_this4.state.pan,{ velocity:{x:-8,y:1}, deceleration:0.98}). start(_this4._resetState.bind(_this4)); },300); -}},{key:'componentWillMount',value:function componentWillMount() +}},{key:"componentWillMount",value:function componentWillMount() {var _this5=this; this._panResponder=_reactNative.PanResponder.create({ @@ -137,41 +124,36 @@ return Math.abs(gestureState.dx)>5; }, onPanResponderGrant:function onPanResponderGrant(e,gestureState){ -_this5.state.pan.setOffset({x:_this5.state.pan.x._value,y:_this5.state.pan.y._value}); +_this5.state.pan.setOffset({ +x:_this5.state.pan.x._value, +y:_this5.state.pan.y._value}); + _this5.state.pan.setValue({x:0,y:0}); }, - onPanResponderMove:function onPanResponderMove(e,gestureState){ if(gestureState.dx>20){ if(_this5.props.onSwiping) -_this5.props.onSwiping('right',gestureState.dx); -}else -if(gestureState.dx<-20){ +_this5.props.onSwiping("right",gestureState.dx); +}else if(gestureState.dx<-20){ if(_this5.props.onSwiping) -_this5.props.onSwiping('left',gestureState.dx); +_this5.props.onSwiping("left",gestureState.dx); } -var val=Math.abs(gestureState.dx*.0013); -var opa=Math.abs(gestureState.dx*.0022); +var val=Math.abs(gestureState.dx*0.0013); +var opa=Math.abs(gestureState.dx*0.0022); if(val>0.2){ val=0.2; } -_reactNative.Animated.timing( -_this5.state.fadeAnim, -{toValue:0.8+val}). -start(); -_reactNative.Animated.spring( -_this5.state.enter, -{toValue:0.8+val,friction:7}). +_reactNative.Animated.timing(_this5.state.fadeAnim,{toValue:0.8+val}).start(); +_reactNative.Animated.spring(_this5.state.enter,{ +toValue:0.8+val, +friction:7}). start(); -_reactNative.Animated.event([ -null,{dx:_this5.state.pan.x}])( -e,gestureState); +_reactNative.Animated.event([null,{dx:_this5.state.pan.x}])(e,gestureState); }, onPanResponderRelease:function onPanResponderRelease(e,_ref){var vx=_ref.vx,vy=_ref.vy; -if(_this5.props.onSwiping) -_this5.props.onSwiping(null); +if(_this5.props.onSwiping)_this5.props.onSwiping(null); var velocity; if(vx>=0){ @@ -181,12 +163,15 @@ velocity=(0,_clamp2.default)(vx*-1,4.5,10)*-1; } if(Math.abs(_this5.state.pan.x._value)>SWIPE_THRESHOLD){ - if(velocity>0){ -_this5.props.onSwipeRight?_this5.props.onSwipeRight(_this5.state.selectedItem):undefined; +_this5.props.onSwipeRight? +_this5.props.onSwipeRight(_this5.state.selectedItem): +undefined; _this5.selectNext(); }else{ -_this5.props.onSwipeLeft?_this5.props.onSwipeLeft(_this5.state.selectedItem):undefined; +_this5.props.onSwipeLeft? +_this5.props.onSwipeLeft(_this5.state.selectedItem): +undefined; _this5.selectNext(); } @@ -202,7 +187,7 @@ start(); } }}); -}},{key:'_resetState',value:function _resetState() +}},{key:"_resetState",value:function _resetState() { this.state.pan.setValue({x:0,y:0}); @@ -212,102 +197,132 @@ this.setState({ card1Top:!this.state.card1Top, card2Top:!this.state.card2Top}); -if(this.props.onSwiping) -this.props.onSwiping(null); - -}},{key:'getCardStyles',value:function getCardStyles() +if(this.props.onSwiping)this.props.onSwiping(null); +}},{key:"getCardStyles",value:function getCardStyles() {var _state= - this.state,pan=_state.pan,pan2=_state.pan2,enter=_state.enter;var _ref2= [pan.x,pan.y],translateX=_ref2[0],translateY=_ref2[1]; -var rotate=pan.x.interpolate({inputRange:[-700,0,700],outputRange:['-10deg','0deg','10deg']}); +var rotate=pan.x.interpolate({ +inputRange:[-700,0,700], +outputRange:["-10deg","0deg","10deg"]}); + + +var opacity=pan.x.interpolate({ +inputRange:[-320,0,320], +outputRange:[0.9,1,0.9]}); -var opacity=pan.x.interpolate({inputRange:[-320,0,320],outputRange:[0.9,1,0.9]}); var scale=enter; -var animatedCardStyles={transform:[{translateX:translateX},{translateY:translateY},{rotate:rotate}],opacity:opacity}; +var animatedCardStyles={ +transform:[{translateX:translateX},{translateY:translateY},{rotate:rotate}], +opacity:opacity}; + var animatedCardStyles2={transform:[{scale:scale}]}; return[animatedCardStyles,animatedCardStyles2]; -}},{key:'render',value:function render() +}},{key:"render",value:function render() {var _this6=this; - if(this.state.disabled){ return( -_react2.default.createElement(_reactNative.View,{ref:function ref(c){return _this6._root=c;},style:{position:'relative',flexDirection:'column'}}, +_react2.default.createElement(_reactNative.View,{ +ref:function ref(c){return _this6._root=c;}, +style:{position:"relative",flexDirection:"column"},__source:{fileName:_jsxFileName,lineNumber:233}}, -_react2.default.createElement(_reactNative.View,null, +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:238}}, this.props.renderEmpty&&this.props.renderEmpty()))); - }else if(this.state.lastCard){ return( -_react2.default.createElement(_reactNative.View,{ref:function ref(c){return _this6._root=c;},style:{position:'relative',flexDirection:'column'}},this.state.selectedItem===undefined?_react2.default.createElement(_reactNative.View,null): +_react2.default.createElement(_reactNative.View,{ +ref:function ref(c){return _this6._root=c;}, +style:{position:"relative",flexDirection:"column"},__source:{fileName:_jsxFileName,lineNumber:247}}, + +this.state.selectedItem===undefined? +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:252}}): +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:253}}, +_react2.default.createElement(_reactNative.Animated.View,_extends({ +style:[ +this.getCardStyles()[1], +this.getInitialStyle().topCard, +{opacity:this.state.fadeAnim}]}, -_react2.default.createElement(_reactNative.View,null, -_react2.default.createElement(_reactNative.Animated.View,_extends({style:[this.getCardStyles()[1],this.getInitialStyle().topCard,{opacity:this.state.fadeAnim}]},this._panResponder.panHandlers), +this._panResponder.panHandlers,{__source:{fileName:_jsxFileName,lineNumber:254}}), this.props.renderEmpty&&this.props.renderEmpty()), +_react2.default.createElement(_reactNative.Animated.View,_extends({ +style:[ +this.getCardStyles()[0], +this.getInitialStyle().topCard]}, -_react2.default.createElement(_reactNative.Animated.View,_extends({style:[this.getCardStyles()[0],this.getInitialStyle().topCard]},this._panResponder.panHandlers), +this._panResponder.panHandlers,{__source:{fileName:_jsxFileName,lineNumber:264}}), this.props.renderItem(this.state.selectedItem))))); +}else{ +return( +_react2.default.createElement(_reactNative.View,{ +ref:function ref(c){return _this6._root=c;}, +style:{position:"relative",flexDirection:"column"},__source:{fileName:_jsxFileName,lineNumber:278}}, +this.state.selectedItem===undefined? +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:283}}): +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:284}}, +_react2.default.createElement(_reactNative.Animated.View,_extends({ +style:[ +this.getCardStyles()[1], +this.getInitialStyle().topCard, +{opacity:this.state.fadeAnim}]}, +this._panResponder.panHandlers,{__source:{fileName:_jsxFileName,lineNumber:285}}), -}else{ -return( -_react2.default.createElement(_reactNative.View,{ref:function ref(c){return _this6._root=c;},style:{position:'relative',flexDirection:'column'}},this.state.selectedItem===undefined?_react2.default.createElement(_reactNative.View,null): -_react2.default.createElement(_reactNative.View,null, -_react2.default.createElement(_reactNative.Animated.View,_extends({style:[this.getCardStyles()[1],this.getInitialStyle().topCard,{opacity:this.state.fadeAnim}]},this._panResponder.panHandlers), this.props.renderBottom? this.props.renderBottom(this.state.selectedItem2): - this.props.renderItem(this.state.selectedItem2)), +_react2.default.createElement(_reactNative.Animated.View,_extends({ +style:[ +this.getCardStyles()[0], +this.getInitialStyle().topCard]}, + +this._panResponder.panHandlers,{__source:{fileName:_jsxFileName,lineNumber:297}}), -_react2.default.createElement(_reactNative.Animated.View,_extends({style:[this.getCardStyles()[0],this.getInitialStyle().topCard]},this._panResponder.panHandlers), this.props.renderTop? this.props.renderTop(this.state.selectedItem): - this.props.renderItem(this.state.selectedItem))))); - - - } - }}]);return DeckSwiper;}(_react.Component); - DeckSwiper.propTypes=_extends({},_reactNative.ViewPropTypes,{ style:_react2.default.PropTypes.object, dataSource:_react2.default.PropTypes.array}); -var StyledDeckSwiper=(0,_nativeBaseShoutemTheme.connectStyle)('NativeBase.DeckSwiper',{},_mapPropsToStyleNames2.default)(DeckSwiper);exports. +var StyledDeckSwiper=(0,_nativeBaseShoutemTheme.connectStyle)( +"NativeBase.DeckSwiper", +{},_mapPropsToStyleNames2.default)( +DeckSwiper);exports. DeckSwiper=StyledDeckSwiper; //# sourceMappingURL=DeckSwiper.js.map \ No newline at end of file diff --git a/dist/src/basic/DeckSwiper.js.map b/dist/src/basic/DeckSwiper.js.map index 0549364ac..18450a26b 100644 --- a/dist/src/basic/DeckSwiper.js.map +++ b/dist/src/basic/DeckSwiper.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/basic/DeckSwiper.js"],"names":["SWIPE_THRESHOLD","DeckSwiper","props","state","pan","ValueXY","pan2","enter","Value","selectedItem","dataSource","selectedItem2","card1Top","card2Top","fadeAnim","looping","disabled","length","lastCard","topCard","position","top","right","left","currentIndex","newIdx","newIdx2","indexOf","setState","setTimeout","nextIndexes","findNextIndexes","onSwiping","timing","toValue","start","spring","friction","selectNext","decay","velocity","x","y","deceleration","_resetState","bind","_panResponder","create","onMoveShouldSetResponderCapture","onMoveShouldSetPanResponderCapture","evt","gestureState","Math","abs","dx","onPanResponderGrant","e","setOffset","_value","setValue","onPanResponderMove","val","opa","event","onPanResponderRelease","vx","vy","onSwipeRight","undefined","onSwipeLeft","translateX","translateY","rotate","interpolate","inputRange","outputRange","opacity","scale","animatedCardStyles","transform","animatedCardStyles2","_root","c","flexDirection","renderEmpty","getCardStyles","getInitialStyle","panHandlers","renderItem","renderBottom","renderTop","propTypes","style","PropTypes","object","array","StyledDeckSwiper"],"mappings":"ozBAAA,4B;AACA;AACA,4B;AACA;AACA,mE;;AAEA,GAAMA,iBAAkB,GAAxB,C;;AAEMC,U;AACF,oBAAYC,KAAZ,CAAmB;AACTA,KADS;AAEf,MAAKC,KAAL,CAAa;AACTC,IAAK,GAAI,uBAASC,OAAb,EADI;AAETC,KAAM,GAAI,uBAASD,OAAb,EAFG;AAGTE,MAAO,GAAI,uBAASC,KAAb,CAAmB,GAAnB,CAHE;AAITC,aAAc,MAAKP,KAAL,CAAWQ,UAAX,CAAsB,CAAtB,CAJL;AAKTC,cAAe,MAAKT,KAAL,CAAWQ,UAAX,CAAsB,CAAtB,CALN;AAMTE,SAAU,IAND;AAOTC,SAAU,KAPD;AAQTC,SAAU,GAAI,uBAASN,KAAb,CAAmB,GAAnB,CARD;AASTO,QAAS,MAAKb,KAAL,CAAWa,OAAX,EAAsB,IATtB;AAUTC,SAAU,MAAKd,KAAL,CAAWQ,UAAX,CAAsBO,MAAtB,GAAiC,CAVlC;AAWTC,SAAU,MAAKhB,KAAL,CAAWQ,UAAX,CAAsBO,MAAtB,GAAiC,CAXlC,CAAb,CAFe;;AAelB,C;;AAEiB;AACd,MAAO;AACHE,QAAS;AACLC,SAAU,UADL;AAELC,IAAK,CAFA;AAGLC,MAAO,CAHF;AAILC,KAAM,CAJD,CADN,CAAP;;;AAQH,C;;AAEeC,Y,CAAc;AAC1B,GAAIC,QAASD,aAAe,CAA5B;AACA,GAAIE,SAAUF,aAAe,CAA7B;;AAEA,GAAIE,QAAU,KAAKxB,KAAL,CAAW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B,EAAqF,KAAK2B,aAAL,CAAmByC,WAAxG;AACM,KAAKrF,KAAL,CAAWwF,SAAZ;AACG,KAAKxF,KAAL,CAAWwF,SAAX,CAAqB,KAAKvF,KAAL,CAAWM,YAAhC,CADH;;AAGG,KAAKP,KAAL,CAAWsF,UAAX,CAAsB,KAAKrF,KAAL,CAAWM,YAAjC,CAJR,CARH,CADL,CADJ;;;;;;;;AAsBH;;AAEJ,C;;;;AAILR,WAAW0F,SAAX;;AAEIC,MAAO,gBAAMC,SAAN,CAAgBC,MAF3B;AAGIpF,WAAY,gBAAMmF,SAAN,CAAgBE,KAHhC;;;AAMA,GAAMC,kBAAmB,yCAAa,uBAAb,CAAsC,EAAtC,iCAAgE/F,UAAhE,CAAzB,C;;;AAGwBA,U,CAApB+F,gB","file":"DeckSwiper.js","sourcesContent":["import React, { Component } from 'react';\nimport { View, Animated, PanResponder, ViewPropTypes } from 'react-native';\nimport clamp from 'clamp';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../Utils/mapPropsToStyleNames';\n\nconst SWIPE_THRESHOLD = 120;\n\nclass DeckSwiper extends Component {\n constructor(props) {\n super(props);\n this.state = {\n pan: new Animated.ValueXY(),\n pan2: new Animated.ValueXY(),\n enter: new Animated.Value(0.8),\n selectedItem: this.props.dataSource[0],\n selectedItem2: this.props.dataSource[1],\n card1Top: true,\n card2Top: false,\n fadeAnim: new Animated.Value(0.8),\n looping: this.props.looping || true,\n disabled: this.props.dataSource.length === 0,\n lastCard: this.props.dataSource.length === 1\n }\n }\n\n getInitialStyle() {\n return {\n topCard: {\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0\n }\n }\n }\n\n findNextIndexes(currentIndex) {\n let newIdx = currentIndex + 1;\n let newIdx2 = currentIndex + 2;\n\n if (newIdx2 > this.props.dataSource.length - 1 && newIdx === this.props.dataSource.length - 1) {\n return [newIdx, 0];\n } else if (newIdx > this.props.dataSource.length - 1) {\n return [0, 1];\n } else {\n return [newIdx, newIdx2];\n }\n }\n\n selectNext() {\n const dataSource = this.props.dataSource;\n let currentIndex = dataSource.indexOf(this.state.selectedItem);\n\n // if not looping, check for these conditionals and if true return from selectNext()\n if (!this.state.looping) {\n // reached end -> only display static renderEmpty() -> no swiping\n if (currentIndex === dataSource.length - 1) {\n return this.setState({\n disabled: true\n });\n } else if (currentIndex === dataSource.length - 2) {\n // show last card with renderEmpty() component behind it\n return setTimeout(() => {\n this.setState({\n selectedItem: dataSource[currentIndex + 1]\n });\n setTimeout(() => {\n this.setState({\n lastCard: true\n });\n }, 350);\n }, 50);\n }\n }\n\n let nextIndexes = this.findNextIndexes(currentIndex);\n setTimeout(() => {\n this.setState({\n selectedItem: this.props.dataSource[nextIndexes[0]]\n });\n setTimeout(() => {\n this.setState({\n selectedItem2: this.props.dataSource[nextIndexes[1]]\n });\n }, 350);\n }, 50);\n\n }\n\n\n swipeRight() {\n if (this.props.onSwiping)\n this.props.onSwiping('right');\n setTimeout(() => {\n Animated.timing(\n this.state.fadeAnim,\n { toValue: 1 }\n ).start();\n Animated.spring(\n this.state.enter,\n { toValue: 1, friction: 7 }\n ).start();\n this.selectNext();\n Animated.decay(this.state.pan, {\n velocity: { x: 8, y: 1 },\n deceleration: 0.98\n }).start(this._resetState.bind(this))\n }, 300);\n }\n\n swipeLeft() {\n if (this.props.onSwiping)\n this.props.onSwiping('left');\n setTimeout(() => {\n Animated.timing(\n this.state.fadeAnim,\n { toValue: 1 }\n ).start();\n Animated.spring(\n this.state.enter,\n { toValue: 1, friction: 7 }\n ).start();\n this.selectNext();\n Animated.decay(this.state.pan, {\n velocity: { x: -8, y: 1 },\n deceleration: 0.98\n }).start(this._resetState.bind(this))\n }, 300);\n }\n\n componentWillMount() {\n this._panResponder = PanResponder.create({\n onMoveShouldSetResponderCapture: () => true,\n onMoveShouldSetPanResponderCapture: (evt, gestureState) => {\n return Math.abs(gestureState.dx) > 5;\n },\n\n onPanResponderGrant: (e, gestureState) => {\n this.state.pan.setOffset({ x: this.state.pan.x._value, y: this.state.pan.y._value });\n this.state.pan.setValue({ x: 0, y: 0 });\n },\n\n\n onPanResponderMove: (e, gestureState) => {\n if (gestureState.dx > 20) {\n if (this.props.onSwiping)\n this.props.onSwiping('right', gestureState.dx);\n }\n else if (gestureState.dx < -20) {\n if (this.props.onSwiping)\n this.props.onSwiping('left', gestureState.dx);\n }\n let val = Math.abs((gestureState.dx * .0013));\n let opa = Math.abs((gestureState.dx * .0022));\n if (val > 0.2) {\n val = 0.2;\n }\n Animated.timing(\n this.state.fadeAnim,\n { toValue: 0.8 + val }\n ).start();\n Animated.spring(\n this.state.enter,\n { toValue: 0.8 + val, friction: 7 }\n ).start();\n Animated.event([\n null, { dx: this.state.pan.x },\n ])(e, gestureState)\n },\n\n onPanResponderRelease: (e, { vx, vy }) => {\n if (this.props.onSwiping)\n this.props.onSwiping(null);\n var velocity;\n\n if (vx >= 0) {\n velocity = clamp(vx, 4.5, 10);\n } else if (vx < 0) {\n velocity = clamp(vx * -1, 4.5, 10) * -1;\n }\n\n if (Math.abs(this.state.pan.x._value) > SWIPE_THRESHOLD) {\n\n if (velocity > 0) {\n (this.props.onSwipeRight) ? this.props.onSwipeRight(this.state.selectedItem) : undefined;\n this.selectNext();\n } else {\n (this.props.onSwipeLeft) ? this.props.onSwipeLeft(this.state.selectedItem) : undefined;\n this.selectNext();\n }\n\n Animated.decay(this.state.pan, {\n velocity: { x: velocity, y: vy },\n deceleration: 0.98\n }).start(this._resetState.bind(this))\n } else {\n Animated.spring(this.state.pan, {\n toValue: { x: 0, y: 0 },\n friction: 4\n }).start()\n }\n }\n })\n }\n\n _resetState() {\n this.state.pan.setValue({ x: 0, y: 0 });\n this.state.enter.setValue(0.8);\n this.state.fadeAnim.setValue(0.8);\n this.setState({\n card1Top: !this.state.card1Top,\n card2Top: !this.state.card2Top\n });\n if (this.props.onSwiping)\n this.props.onSwiping(null);\n\n }\n\n getCardStyles() {\n\n let { pan, pan2, enter } = this.state;\n\n let [translateX, translateY] = [pan.x, pan.y];\n // let [translateX, translateY] = [pan2.x, pan2.y];\n\n let rotate = pan.x.interpolate({ inputRange: [-700, 0, 700], outputRange: ['-10deg', '0deg', '10deg'] });\n\n let opacity = pan.x.interpolate({ inputRange: [-320, 0, 320], outputRange: [0.9, 1, 0.9] })\n let scale = enter;\n\n let animatedCardStyles = { transform: [{ translateX }, { translateY }, { rotate }], opacity };\n let animatedCardStyles2 = { transform: [{ scale }] };\n\n return [animatedCardStyles, animatedCardStyles2]\n }\n\n render() {\n\n if (this.state.disabled) {\n // disable swiping and renderEmpty\n return (\n this._root = c} style={{ position: 'relative', flexDirection: 'column' }}>\n {\n \n {\n this.props.renderEmpty && this.props.renderEmpty()\n }\n \n }\n \n );\n } else if (this.state.lastCard) {\n // display renderEmpty underneath last viable card\n return (\n this._root = c} style={{ position: 'relative', flexDirection: 'column' }}>{(this.state.selectedItem) === undefined ? () :\n (\n \n \n {\n this.props.renderEmpty && this.props.renderEmpty()\n }\n \n \n {\n this.props.renderItem(this.state.selectedItem)\n }\n \n \n )\n }\n \n );\n } else {\n return (\n this._root = c} style={{ position: 'relative', flexDirection: 'column' }}>{(this.state.selectedItem) === undefined ? () :\n (\n \n {(this.props.renderBottom) ?\n this.props.renderBottom(this.state.selectedItem2)\n :\n this.props.renderItem(this.state.selectedItem2)\n }\n \n \n {(this.props.renderTop) ?\n this.props.renderTop(this.state.selectedItem)\n :\n this.props.renderItem(this.state.selectedItem)\n }\n \n \n )\n }\n \n );\n }\n\n }\n\n}\n\nDeckSwiper.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataSource: React.PropTypes.array,\n};\n\nconst StyledDeckSwiper = connectStyle('NativeBase.DeckSwiper', {}, mapPropsToStyleNames)(DeckSwiper);\n\nexport {\n StyledDeckSwiper as DeckSwiper,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/DeckSwiper.js"],"names":["SWIPE_THRESHOLD","DeckSwiper","props","state","pan","ValueXY","pan2","enter","Value","selectedItem","dataSource","selectedItem2","card1Top","card2Top","fadeAnim","looping","disabled","length","lastCard","topCard","position","top","right","left","currentIndex","newIdx","newIdx2","indexOf","setState","setTimeout","nextIndexes","findNextIndexes","onSwiping","timing","toValue","start","spring","friction","selectNext","decay","velocity","x","y","deceleration","_resetState","bind","_panResponder","create","onMoveShouldSetResponderCapture","onMoveShouldSetPanResponderCapture","evt","gestureState","Math","abs","dx","onPanResponderGrant","e","setOffset","_value","setValue","onPanResponderMove","val","opa","event","onPanResponderRelease","vx","vy","onSwipeRight","undefined","onSwipeLeft","translateX","translateY","rotate","interpolate","inputRange","outputRange","opacity","scale","animatedCardStyles","transform","animatedCardStyles2","_root","c","flexDirection","renderEmpty","getCardStyles","getInitialStyle","panHandlers","renderItem","renderBottom","renderTop","propTypes","style","PropTypes","object","array","StyledDeckSwiper"],"mappings":"+1BAAA,4B;AACA;AACA,4B;AACA;AACA,mE;;AAEA,GAAMA,iBAAkB,GAAxB,C;;AAEMC,U;AACJ,oBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,IAAK,GAAI,uBAASC,OAAb,EADM;AAEXC,KAAM,GAAI,uBAASD,OAAb,EAFK;AAGXE,MAAO,GAAI,uBAASC,KAAb,CAAmB,GAAnB,CAHI;AAIXC,aAAc,MAAKP,KAAL,CAAWQ,UAAX,CAAsB,CAAtB,CAJH;AAKXC,cAAe,MAAKT,KAAL,CAAWQ,UAAX,CAAsB,CAAtB,CALJ;AAMXE,SAAU,IANC;AAOXC,SAAU,KAPC;AAQXC,SAAU,GAAI,uBAASN,KAAb,CAAmB,GAAnB,CARC;AASXO,QAAS,MAAKb,KAAL,CAAWa,OAAX,EAAsB,IATpB;AAUXC,SAAU,MAAKd,KAAL,CAAWQ,UAAX,CAAsBO,MAAtB,GAAiC,CAVhC;AAWXC,SAAU,MAAKhB,KAAL,CAAWQ,UAAX,CAAsBO,MAAtB,GAAiC,CAXhC,CAAb,CAFiB;;AAel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,KAAKT,KAAL,CAAWsF,UAAX,CAAsB,KAAKrF,KAAL,CAAWQ,aAAjC,CAVN,CADF;;AAaE,oDAAU,IAAV;AACE,MAAO;AACL,KAAK0E,aAAL,GAAqB,CAArB,CADK;AAEL,KAAKC,eAAL,GAAuBnE,OAFlB,CADT;;AAKM,KAAK2B,aAAL,CAAmByC,WALzB;;AAOG,KAAKrF,KAAL,CAAWwF,SAAX;AACG,KAAKxF,KAAL,CAAWwF,SAAX,CAAqB,KAAKvF,KAAL,CAAWM,YAAhC,CADH;AAEG,KAAKP,KAAL,CAAWsF,UAAX,CAAsB,KAAKrF,KAAL,CAAWM,YAAjC,CATN,CAbF,CANN,CADF;;;;;AAkCD;AACF,C;;;AAGHR,WAAW0F,SAAX;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEpF,WAAY,gBAAMmF,SAAN,CAAgBE,KAH9B;;;AAMA,GAAMC,kBAAmB;AACvB,uBADuB;AAEvB,EAFuB;;AAIvB/F,UAJuB,CAAzB,C;;AAM6BA,U,CAApB+F,gB","file":"DeckSwiper.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, Animated, PanResponder, ViewPropTypes } from \"react-native\";\nimport clamp from \"clamp\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nconst SWIPE_THRESHOLD = 120;\n\nclass DeckSwiper extends Component {\n constructor(props) {\n super(props);\n this.state = {\n pan: new Animated.ValueXY(),\n pan2: new Animated.ValueXY(),\n enter: new Animated.Value(0.8),\n selectedItem: this.props.dataSource[0],\n selectedItem2: this.props.dataSource[1],\n card1Top: true,\n card2Top: false,\n fadeAnim: new Animated.Value(0.8),\n looping: this.props.looping || true,\n disabled: this.props.dataSource.length === 0,\n lastCard: this.props.dataSource.length === 1\n };\n }\n\n getInitialStyle() {\n return {\n topCard: {\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0\n }\n };\n }\n\n findNextIndexes(currentIndex) {\n let newIdx = currentIndex + 1;\n let newIdx2 = currentIndex + 2;\n\n if (\n newIdx2 > this.props.dataSource.length - 1 &&\n newIdx === this.props.dataSource.length - 1\n ) {\n return [newIdx, 0];\n } else if (newIdx > this.props.dataSource.length - 1) {\n return [0, 1];\n } else {\n return [newIdx, newIdx2];\n }\n }\n\n selectNext() {\n const dataSource = this.props.dataSource;\n let currentIndex = dataSource.indexOf(this.state.selectedItem);\n\n // if not looping, check for these conditionals and if true return from selectNext()\n if (!this.state.looping) {\n // reached end -> only display static renderEmpty() -> no swiping\n if (currentIndex === dataSource.length - 1) {\n return this.setState({\n disabled: true\n });\n } else if (currentIndex === dataSource.length - 2) {\n // show last card with renderEmpty() component behind it\n return setTimeout(() => {\n this.setState({\n selectedItem: dataSource[currentIndex + 1]\n });\n setTimeout(() => {\n this.setState({\n lastCard: true\n });\n }, 350);\n }, 50);\n }\n }\n\n let nextIndexes = this.findNextIndexes(currentIndex);\n setTimeout(() => {\n this.setState({\n selectedItem: this.props.dataSource[nextIndexes[0]]\n });\n setTimeout(() => {\n this.setState({\n selectedItem2: this.props.dataSource[nextIndexes[1]]\n });\n }, 350);\n }, 50);\n }\n\n swipeRight() {\n if (this.props.onSwiping) this.props.onSwiping(\"right\");\n setTimeout(() => {\n Animated.timing(this.state.fadeAnim, { toValue: 1 }).start();\n Animated.spring(this.state.enter, { toValue: 1, friction: 7 }).start();\n this.selectNext();\n Animated.decay(this.state.pan, {\n velocity: { x: 8, y: 1 },\n deceleration: 0.98\n }).start(this._resetState.bind(this));\n }, 300);\n }\n\n swipeLeft() {\n if (this.props.onSwiping) this.props.onSwiping(\"left\");\n setTimeout(() => {\n Animated.timing(this.state.fadeAnim, { toValue: 1 }).start();\n Animated.spring(this.state.enter, { toValue: 1, friction: 7 }).start();\n this.selectNext();\n Animated.decay(this.state.pan, {\n velocity: { x: -8, y: 1 },\n deceleration: 0.98\n }).start(this._resetState.bind(this));\n }, 300);\n }\n\n componentWillMount() {\n this._panResponder = PanResponder.create({\n onMoveShouldSetResponderCapture: () => true,\n onMoveShouldSetPanResponderCapture: (evt, gestureState) => {\n return Math.abs(gestureState.dx) > 5;\n },\n\n onPanResponderGrant: (e, gestureState) => {\n this.state.pan.setOffset({\n x: this.state.pan.x._value,\n y: this.state.pan.y._value\n });\n this.state.pan.setValue({ x: 0, y: 0 });\n },\n\n onPanResponderMove: (e, gestureState) => {\n if (gestureState.dx > 20) {\n if (this.props.onSwiping)\n this.props.onSwiping(\"right\", gestureState.dx);\n } else if (gestureState.dx < -20) {\n if (this.props.onSwiping)\n this.props.onSwiping(\"left\", gestureState.dx);\n }\n let val = Math.abs(gestureState.dx * 0.0013);\n let opa = Math.abs(gestureState.dx * 0.0022);\n if (val > 0.2) {\n val = 0.2;\n }\n Animated.timing(this.state.fadeAnim, { toValue: 0.8 + val }).start();\n Animated.spring(this.state.enter, {\n toValue: 0.8 + val,\n friction: 7\n }).start();\n Animated.event([null, { dx: this.state.pan.x }])(e, gestureState);\n },\n\n onPanResponderRelease: (e, { vx, vy }) => {\n if (this.props.onSwiping) this.props.onSwiping(null);\n var velocity;\n\n if (vx >= 0) {\n velocity = clamp(vx, 4.5, 10);\n } else if (vx < 0) {\n velocity = clamp(vx * -1, 4.5, 10) * -1;\n }\n\n if (Math.abs(this.state.pan.x._value) > SWIPE_THRESHOLD) {\n if (velocity > 0) {\n this.props.onSwipeRight\n ? this.props.onSwipeRight(this.state.selectedItem)\n : undefined;\n this.selectNext();\n } else {\n this.props.onSwipeLeft\n ? this.props.onSwipeLeft(this.state.selectedItem)\n : undefined;\n this.selectNext();\n }\n\n Animated.decay(this.state.pan, {\n velocity: { x: velocity, y: vy },\n deceleration: 0.98\n }).start(this._resetState.bind(this));\n } else {\n Animated.spring(this.state.pan, {\n toValue: { x: 0, y: 0 },\n friction: 4\n }).start();\n }\n }\n });\n }\n\n _resetState() {\n this.state.pan.setValue({ x: 0, y: 0 });\n this.state.enter.setValue(0.8);\n this.state.fadeAnim.setValue(0.8);\n this.setState({\n card1Top: !this.state.card1Top,\n card2Top: !this.state.card2Top\n });\n if (this.props.onSwiping) this.props.onSwiping(null);\n }\n\n getCardStyles() {\n let { pan, pan2, enter } = this.state;\n\n let [translateX, translateY] = [pan.x, pan.y];\n // let [translateX, translateY] = [pan2.x, pan2.y];\n\n let rotate = pan.x.interpolate({\n inputRange: [-700, 0, 700],\n outputRange: [\"-10deg\", \"0deg\", \"10deg\"]\n });\n\n let opacity = pan.x.interpolate({\n inputRange: [-320, 0, 320],\n outputRange: [0.9, 1, 0.9]\n });\n let scale = enter;\n\n let animatedCardStyles = {\n transform: [{ translateX }, { translateY }, { rotate }],\n opacity\n };\n let animatedCardStyles2 = { transform: [{ scale }] };\n\n return [animatedCardStyles, animatedCardStyles2];\n }\n\n render() {\n if (this.state.disabled) {\n // disable swiping and renderEmpty\n return (\n (this._root = c)}\n style={{ position: \"relative\", flexDirection: \"column\" }}\n >\n {\n \n {this.props.renderEmpty && this.props.renderEmpty()}\n \n }\n \n );\n } else if (this.state.lastCard) {\n // display renderEmpty underneath last viable card\n return (\n (this._root = c)}\n style={{ position: \"relative\", flexDirection: \"column\" }}\n >\n {this.state.selectedItem === undefined\n ? \n : \n \n {this.props.renderEmpty && this.props.renderEmpty()}\n \n \n {this.props.renderItem(this.state.selectedItem)}\n \n }\n \n );\n } else {\n return (\n (this._root = c)}\n style={{ position: \"relative\", flexDirection: \"column\" }}\n >\n {this.state.selectedItem === undefined\n ? \n : \n \n {this.props.renderBottom\n ? this.props.renderBottom(this.state.selectedItem2)\n : this.props.renderItem(this.state.selectedItem2)}\n \n \n {this.props.renderTop\n ? this.props.renderTop(this.state.selectedItem)\n : this.props.renderItem(this.state.selectedItem)}\n \n }\n \n );\n }\n }\n}\n\nDeckSwiper.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataSource: React.PropTypes.array\n};\n\nconst StyledDeckSwiper = connectStyle(\n \"NativeBase.DeckSwiper\",\n {},\n mapPropsToStyleNames\n)(DeckSwiper);\n\nexport { StyledDeckSwiper as DeckSwiper };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Drawer/index.js b/dist/src/basic/Drawer/index.js index fc7b16f32..fac49f98c 100644 --- a/dist/src/basic/Drawer/index.js +++ b/dist/src/basic/Drawer/index.js @@ -1,34 +1,31 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}/>\n );\n }\n}\n\nDrawer.defaultProps = {\n type: 'overlay',\n tapToClose: true,\n openDrawerOffset: 0.2,\n panCloseMask: 0.2,\n closedDrawerOffset: 0,\n styles: {\n drawer: {\n shadowColor: '#000000',\n shadowOpacity: 0,\n shadowRadius: 0,\n elevation: 5\n },\n mainOverlay: {\n opacity: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.8)',\n elevation: 8\n }\n },\n tweenHandler: (ratio) => ({\n mainOverlay: { opacity: (ratio) / 2}\n })\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Drawer/index.js"],"names":["Drawer","props","_root","c","defaultProps","type","tapToClose","openDrawerOffset","panCloseMask","closedDrawerOffset","styles","drawer","shadowColor","shadowOpacity","shadowRadius","elevation","mainOverlay","opacity","backgroundColor","tweenHandler","ratio"],"mappings":"o0BAAA,4B;AACA,sD;;AAEqBA,M;AACnB,gBAAYC,KAAZ,CAAmB;AACXA,KADW;AAElB,C;AACQ;AACP,MAAO,qEAAU,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAf,EAA0C,KAAKF,KAA/C,kDAAP;AACD,C,sDANkBD,M;;;AASrBA,OAAOI,YAAP,CAAsB;AACpBC,KAAM,SADc;AAEpBC,WAAY,IAFQ;AAGpBC,iBAAkB,GAHE;AAIpBC,aAAc,GAJM;AAKpBC,mBAAoB,CALA;AAMpBC,OAAQ;AACNC,OAAQ;AACNC,YAAa,SADP;AAENC,cAAe,CAFT;AAGNC,aAAc,CAHR;AAINC,UAAW,CAJL,CADF;;AAONC,YAAa;AACXC,QAAS,CADE;AAEXC,gBAAiB,oBAFN;AAGXH,UAAW,CAHA,CAPP,CANY;;;AAmBpBI,aAAc,mCAAU;AACtBH,YAAa,CAAEC,QAASG,MAAQ,CAAnB,CADS,CAAV,EAnBM,CAAtB","file":"index.js","sourcesContent":["import React, { Component } from \"react\";\nimport RNDrawer from \"react-native-drawer\";\n\nexport default class Drawer extends Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nDrawer.defaultProps = {\n type: \"overlay\",\n tapToClose: true,\n openDrawerOffset: 0.2,\n panCloseMask: 0.2,\n closedDrawerOffset: 0,\n styles: {\n drawer: {\n shadowColor: \"#000000\",\n shadowOpacity: 0,\n shadowRadius: 0,\n elevation: 5\n },\n mainOverlay: {\n opacity: 0,\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n elevation: 8\n }\n },\n tweenHandler: ratio => ({\n mainOverlay: { opacity: ratio / 2 }\n })\n};\n"]} \ No newline at end of file diff --git a/dist/src/basic/Fab.js b/dist/src/basic/Fab.js index 9ba174724..34a5fdb92 100644 --- a/dist/src/basic/Fab.js +++ b/dist/src/basic/Fab.js @@ -1,19 +1,17 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Fab=undefined;var _extends=Object.assign||function(target){for(var i=1;i;\n active: boolean\n };\n\n constructor(props) {\n super(props);\n this.state = {\n buttons: undefined,\n active: false,\n };\n }\n\n fabTopValue(pos): ?{ top: ?number, bottom: ?number, left: ?number, right: ?number } {\n if (pos === 'topLeft') {\n return {\n top: 20,\n bottom: undefined,\n left: 20,\n right: undefined,\n };\n } else if (pos === 'bottomRight') {\n return {\n top: undefined,\n bottom: (Platform.OS === 'ios') ? 20 : 40,\n left: undefined,\n right: 20,\n };\n } else if (pos === 'bottomLeft') {\n return {\n top: undefined,\n bottom: (Platform.OS === 'ios') ? 20 : 40,\n left: 20,\n right: undefined,\n };\n } else if (pos === 'topRight') {\n return {\n top: 20,\n bottom: undefined,\n left: undefined,\n right: 20,\n };\n }\n }\n\n fabOtherBtns(direction, i) {\n if (direction === 'up') {\n return {\n top: undefined,\n bottom: (this.props.active === false) ? ((Platform.OS === 'ios') ? 8 : 8) : ((i * 50) + 65),\n left: 8,\n right: 0,\n };\n } else if (direction === 'left') {\n return {\n top: 8,\n bottom: 0,\n left: (this.props.active === false) ? ((Platform.OS === 'ios') ? 8 : 8) : -((i * 50) + 50),\n right: 0,\n };\n } else if (direction === 'down') {\n return {\n top: (this.props.active === false) ? ((Platform.OS === 'ios') ? 8 : 8) : ((i * 50) + 65),\n bottom: 0,\n left: 8,\n right: 0,\n };\n } else if (direction === 'right') {\n return {\n top: 10,\n bottom: 0,\n left: (this.props.active === false) ? ((Platform.OS === 'ios') ? 8 : 8) : ((i * 50) + 65),\n right: 0,\n };\n }\n }\n\n getInitialStyle(iconStyle) {\n return {\n fab: {\n height: 56,\n width: 56,\n borderRadius: 28,\n elevation: 4,\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n bottom: 0,\n backgroundColor: 'blue',\n },\n container: {\n position: 'absolute',\n top: (this.props.position) ? this.fabTopValue(this.props.position).top : undefined,\n bottom: (this.props.position) ? this.fabTopValue(this.props.position).bottom : 20,\n right: (this.props.position) ? this.fabTopValue(this.props.position).right : 20,\n left: (this.props.position) ? this.fabTopValue(this.props.position).left : undefined,\n width: 56,\n height: this.containerHeight,\n flexDirection: (this.props.direction) ? ((this.props.direction == 'left || right') ? 'row' : 'column') : 'column',\n alignItems: 'center',\n },\n iconStyle: {\n color: '#fff',\n fontSize: 24,\n lineHeight: (Platform.OS === 'ios') ? 27 : undefined,\n ...iconStyle,\n },\n buttonStyle: {\n position: 'absolute',\n height: 40,\n width: 40,\n left: 7,\n borderRadius: 20,\n marginBottom: 10,\n backgroundColor: 'blue',\n },\n };\n }\n\n getContainerStyle() {\n return _.merge(this.getInitialStyle().container, this.props.containerStyle);\n }\n\n prepareFabProps() {\n const defaultProps = {\n style: this.getInitialStyle().fab,\n };\n const incomingProps = _.clone(this.props);\n delete incomingProps.onPress;\n\n return computeProps(incomingProps, defaultProps);\n }\n\n getOtherButtonStyle(child, i) {\n const type = {\n top: (this.props.direction) ? (this.fabOtherBtns(this.props.direction, i).top) : undefined,\n left: (this.props.direction) ? (this.fabOtherBtns(this.props.direction, i).left) : 8,\n right: (this.props.direction) ? (this.fabOtherBtns(this.props.direction, i).right) : 0,\n bottom: (this.props.direction) ? (this.fabOtherBtns(this.props.direction, i).bottom) : ((this.props.active === false) ? ((Platform.OS === 'ios') ? 8 : 8) : ((i * 50) + 65)),\n };\n\n return _.merge(this.getInitialStyle().buttonStyle, child.props.style, type);\n }\n prepareButtonProps(child) {\n const inp = _.clone(child.props);\n delete inp.style;\n\n\n const defaultProps = {};\n\n return computeProps(inp, defaultProps);\n }\n\n componentDidMount() {\n const childrenArray = React.Children.toArray(this.props.children);\n const icon = _.remove(childrenArray, (item) => {\n if (item.type.displayName === 'Styled(Button)') {\n return true;\n }\n });\n this.setState({\n buttons: icon.length,\n });\n setTimeout(() => {\n this.setState({\n active: this.props.active,\n });\n }, 0);\n }\n\n renderFab() {\n const childrenArray = React.Children.toArray(this.props.children);\n const icon = _.remove(childrenArray, (item) => {\n if (item.type === Button) {\n return true;\n }\n });\n // this.setState({\n // buttons: icon.length\n // });\n return React.cloneElement(childrenArray[0], { style: this.getInitialStyle(childrenArray[0].props.style).iconStyle });\n }\n\n renderButtons() {\n const childrenArray = React.Children.toArray(this.props.children);\n // const icon = _.remove(childrenArray, (item) => {\n // if (item.type.displayName === \"Styled(Icon)\" || item.type.displayName === \"Styled(IconNB)\") {\n // return true;\n // }\n // });\n\n const newChildren = [];\n\n {\n childrenArray.slice(1).map((child, i) => {\n newChildren.push({child.props.children}\n );\n }\n );\n }\n return newChildren;\n }\n upAnimate() {\n if (!this.props.active) {\n Animated.spring(this.containerHeight, {\n toValue: (this.state.buttons * 51.3) + 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 1,\n }).start();\n } else {\n Animated.spring(this.containerHeight, {\n toValue: 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 0,\n }).start();\n }\n }\n\n leftAnimate() {\n if (!this.state.active) {\n Animated.spring(this.containerWidth, {\n toValue: (this.state.buttons * 51.3) + 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 1,\n }).start();\n } else {\n this.setState({\n active: false,\n });\n Animated.spring(this.containerHeight, {\n toValue: 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 0,\n }).start();\n }\n }\n\n rightAnimate() {\n if (!this.state.active) {\n Animated.spring(this.containerWidth, {\n toValue: (this.state.buttons * 51.3) + 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 1,\n }).start();\n } else {\n this.setState({\n active: false,\n });\n Animated.spring(this.containerHeight, {\n toValue: 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 0,\n }).start();\n }\n }\n\n downAnimate() {\n if (!this.state.active) {\n Animated.spring(this.containerHeight, {\n toValue: (56),\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 1,\n }).start();\n } else {\n this.setState({\n active: false,\n });\n Animated.spring(this.containerHeight, {\n toValue: 56,\n }).start();\n Animated.spring(this.buttonScale, {\n toValue: 0,\n }).start();\n }\n }\n\n _animate() {\n const { props: { direction, position } } = this;\n if (this.props.direction) {\n if (this.props.direction === 'up') {\n this.upAnimate();\n } else if (this.props.direction === 'left') {\n this.leftAnimate();\n } else if (this.props.direction === 'right') {\n this.rightAnimate();\n } else if (this.props.direction === 'down') {\n this.downAnimate();\n }\n } else {\n this.upAnimate();\n }\n }\n\n fabOnPress() {\n if (this.props.onPress) {\n this.props.onPress();\n this._animate();\n }\n }\n\n render() {\n const { props: { active } } = this;\n if (!this.props.active) {\n this.containerHeight = new Animated.Value(56);\n this.containerWidth = new Animated.Value(56);\n this.buttonScale = new Animated.Value(1);\n } else {\n this.containerHeight = this.containerHeight || new Animated.Value(0);\n this.containerWidth = this.containerWidth || new Animated.Value(0);\n this.buttonScale = this.buttonScale || new Animated.Value(0);\n }\n return (\n \n {this.renderButtons()}\n this.fabOnPress()}\n {...this.prepareFabProps() } activeOpacity={1}\n >\n {this.renderFab()}\n \n \n );\n }\n}\n\nFab.propTypes = {\n ...Animated.propTypes,\n style: React.PropTypes.object,\n active: React.PropTypes.bool,\n direction: React.PropTypes.string,\n containerStyle: React.PropTypes.object,\n position: React.PropTypes.string,\n};\nconst StyledFab = connectStyle('NativeBase.Fab', {}, mapPropsToStyleNames)(Fab);\nexport {\n StyledFab as Fab,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Fab.js"],"names":["AnimatedFab","createAnimatedComponent","Fab","props","state","buttons","undefined","active","pos","top","bottom","left","right","OS","direction","i","iconStyle","fab","height","width","borderRadius","elevation","justifyContent","alignItems","position","backgroundColor","container","fabTopValue","containerHeight","flexDirection","color","fontSize","lineHeight","buttonStyle","marginBottom","merge","getInitialStyle","containerStyle","defaultProps","style","incomingProps","clone","onPress","child","type","fabOtherBtns","inp","childrenArray","Children","toArray","children","icon","remove","item","displayName","setState","length","setTimeout","cloneElement","newChildren","slice","map","push","getOtherButtonStyle","prepareButtonProps","spring","toValue","start","buttonScale","containerWidth","upAnimate","leftAnimate","rightAnimate","downAnimate","_animate","Value","getContainerStyle","renderButtons","fabOnPress","prepareFabProps","renderFab","propTypes","PropTypes","object","bool","string","StyledFab"],"mappings":";;AAEA,4B;AACA;AACA;;AAEA;;AAEA;;AAEA,8B;AACA;AACA,mE;AACA,mD;;AAEA,GAAMA,aAAc,sBAASC,uBAAT,gBAApB,C;;AAEMC,G;;;;;;;;;;AAUJ,aAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,QAASC,SADE;AAEXC,OAAQ,KAFG,CAAb,CAFiB;;AAMlB,C;;;AAGCC,G;AACmE;AACnE,GAAIA,MAAQ,SAAZ,CAAuB;AACrB,MAAO;AACLC,IAAK,EADA;AAEL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,KAAKqB,eAAL,CAAuB,GAAI,uBAAS+C,KAAb,CAAmB,EAAnB,CAAvB;AACA,KAAKN,cAAL,CAAsB,GAAI,uBAASM,KAAb,CAAmB,EAAnB,CAAtB;AACA,KAAKP,WAAL,CAAmB,GAAI,uBAASO,KAAb,CAAmB,CAAnB,CAAnB;AACD,CAJD,IAIO;AACL,KAAK/C,eAAL,CAAuB,KAAKA,eAAL,EAAwB,GAAI,uBAAS+C,KAAb,CAAmB,CAAnB,CAA/C;AACA,KAAKN,cAAL,CAAsB,KAAKA,cAAL,EAAuB,GAAI,uBAASM,KAAb,CAAmB,CAAnB,CAA7C;AACA,KAAKP,WAAL,CAAmB,KAAKA,WAAL,EAAoB,GAAI,uBAASO,KAAb,CAAmB,CAAnB,CAAvC;AACD;AACD;AACE,oDAAU,IAAV,EAAe,MAAO,KAAKC,iBAAL,EAAtB;AACG,KAAKC,aAAL,EADH;AAEE;AACE,QAAS,yBAAM,QAAKC,UAAL,EAAN,EADX;AAEM,KAAKC,eAAL,EAFN;AAGE,cAAe,CAHjB;;AAKG,KAAKC,SAAL,EALH,CAFF,CADF;;;;AAYD,C;;;AAGH9E,IAAI+E,SAAJ;AACK,sBAASA,SADd;AAEE1C,MAAO,gBAAM2C,SAAN,CAAgBC,MAFzB;AAGE5E,OAAQ,gBAAM2E,SAAN,CAAgBE,IAH1B;AAIEtE,UAAW,gBAAMoE,SAAN,CAAgBG,MAJ7B;AAKEhD,eAAgB,gBAAM6C,SAAN,CAAgBC,MALlC;AAME3D,SAAU,gBAAM0D,SAAN,CAAgBG,MAN5B;;AAQA,GAAMC,WAAY,yCAAa,gBAAb,CAA+B,EAA/B,iCAAyDpF,GAAzD,CAAlB,C;AACsBA,G,CAAboF,S","file":"Fab.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { Button } from \"./Button\";\nimport { Platform, Animated, TouchableOpacity } from \"react-native\";\n// import View from './View';\nimport { Icon } from \"./Icon\";\n// import Badge from './Badge';\nimport { IconNB } from \"./IconNB\";\n// import Text from './Text';\nimport _ from \"lodash\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\nimport computeProps from \"../Utils/computeProps\";\n\nconst AnimatedFab = Animated.createAnimatedComponent(Button);\n\nclass Fab extends Component {\n props: Animated.props & {\n position: ?string\n };\n\n state: {\n buttons: void | React$Element;\n }\n\n renderHeader() {\n return (this.props.renderHeader) ? this.props.renderHeader(() => this._setModalVisible(false)) : (
\n { this._setModalVisible(false); }}\n >{this.props.headerBackButtonText || 'Back'}\n {this.props.iosHeader || 'Select One'}\n \n
);\n }\n\n render() {\n return (\n this._root = c}>\n {this.renderButton()}\n { this._setModalVisible(false); }}\n >\n \n {this.renderHeader()}\n \n \n {\n this._setModalVisible(false); this.props.onValueChange(child.props.value);\n this.setState({ current: child.props.label });\n }}\n >\n {child.props.label}\n \n {(child.props.value === this.props.selectedValue) ?\n ()\n :\n ()\n }\n \n \n }\n />\n \n \n \n \n );\n }\n\n}\n\nPickerNB.Item = React.createClass({\n\n render() {\n return (\n \n );\n },\n});\n\nPickerNB.propTypes = {\n ...ViewPropTypes,\n renderButton: React.PropTypes.func\n};\n\nconst StyledPickerNB = connectStyle('NativeBase.PickerNB', {}, mapPropsToStyleNames)(PickerNB);\n\nexport {\n StyledPickerNB as PickerNB,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Picker.ios.js"],"names":["PickerNB","props","state","modalVisible","currentLabel","getLabel","dataSource","children","nextProps","nextLabel","currentDS","nextDS","setState","picker","pickerItem","visible","defaultProps","style","getInitialStyle","itemStyle","item","find","child","value","selectedValue","get","cloneElement","iosIcon","fontSize","lineHeight","color","onPress","_setModalVisible","text","placeholder","renderButton","selectedItem","getSelectedItem","textStyle","note","undefined","renderIcon","renderHeader","headerStyle","shadowOffset","shadowColor","shadowRadius","shadowOpacity","headerBackButtonStyle","headerBackButtonText","headerTitleStyle","iosHeader","_root","c","supportedOrientations","onValueChange","current","label","itemTextStyle","Item","createClass","render","propTypes","PropTypes","func","StyledPickerNB"],"mappings":";;AAEA,4B;AACA;AACA,8B;AACA;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,WAAYL,MAAMM,QAHP,CAAb,CAFiB;;AAOlB,C;;AAEyBC,S,CAAW;AACnC,GAAMJ,cAAe,KAAKF,KAAL,CAAWE,YAAhC;AACA,GAAMK,WAAY,KAAKJ,QAAL,CAAcG,SAAd,CAAlB;AACA,GAAME,WAAY,KAAKR,KAAL,CAAWI,UAA7B;AACA,GAAMK,QAASH,UAAUD,QAAzB;;AAEA,GAAIH,eAAiBK,SAArB,CAAgC;AAC9B,KAAKG,QAAL,CAAc;AACZR,aAAcK,SADF,CAAd;;AAGD;AACD,GAAIC,YAAcC,MAAlB,CAA0B;AACxB,KAAKC,QAAL,CAAc;AACZN,WAAYK,MADA,CAAd;;AAGD;AACF,C;;AAEiB;AAChB,MAAO;AACLE,OAAQ,EADH;;;AAILC,WAAY,EAJP,CAAP;;AAMD,C;AACgBC,O,CAAS;AACxB,KAAKH,QAAL,CAAc,CAAET,aAAcY,OAAhB,CAAd;AACD,C;;AAEkB;AACjB,GAAMC,cAAe;AACnBC,MAAO,KAAKC,eAAL,GAAuBL,MADX;AAEnBM,UAAW,KAAKD,eAAL,GAAuBJ,UAFf,CAArB;;;AAKA,MAAO,2BAAa,KAAKb,KAAlB,CAAyBe,YAAzB,CAAP;AACD,C;;AAEQf,K,CAAO;AACd,GAAMmB,MAAO,iBAAEC,IAAF;AACXpB,MAAMM,QADK;AAEX,sBAASe,OAAMrB,KAAN,CAAYsB,KAAZ,GAAsBtB,MAAMuB,aAAr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AOE,MAAO,OAAKvB,KAAL,CAAWkB,SAPpB;AAQE,QAAS,kBAAM;AACb,OAAKa,gBAAL,CAAsB,KAAtB;AACA,OAAK/B,KAAL,CAAWsD,aAAX,CAAyBjC,MAAMrB,KAAN,CAAYsB,KAArC;AACA,OAAKX,QAAL,CAAc,CAAE4C,QAASlC,MAAMrB,KAAN,CAAYwD,KAAvB,CAAd;AACD,CAZH;;AAcE,0CAAM,MAAO,OAAKxD,KAAL,CAAWyD,aAAxB;AACGpC,MAAMrB,KAAN,CAAYwD,KADf,CAdF;;AAiBE;AACGnC,MAAMrB,KAAN,CAAYsB,KAAZ,GAAsB,OAAKtB,KAAL,CAAWuB,aAAjC;AACG,4CAAO,SAAU,IAAjB,kDADH;AAEG,4CAAO,SAAU,KAAjB,kDAHN,CAjBF,CADS,GAFb,kDADF,CAFF,CATF,CAFF,CADF;;;;;;;;;AA+CD,C;;;AAGHxB,SAAS2D,IAAT,CAAgB,gBAAMC,WAAN,CAAkB;AAChCC,MADgC,kBACvB;AACP,MAAO,mDAAQ,IAAR,aAAiB,KAAK5D,KAAL,EAAjB,oDAAP;AACD,CAH+B,CAAlB,CAAhB;;;AAMAD,SAAS8D,SAAT;;AAEE3B,aAAc,gBAAM4B,SAAN,CAAgBC,IAFhC;;;AAKA,GAAMC,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;;AAIrBjE,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlBiE,c","file":"Picker.ios.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { Picker, Modal, View, ListView, ViewPropTypes } 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 { Content } from \"./Content\";\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: 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 = 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 const item = _.find(\n props.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 renderIcon() {\n return React.cloneElement(this.props.iosIcon, {\n style: { fontSize: 22, lineHeight: 26, color: \"#7a7a7a\" }\n });\n }\n\n renderButton() {\n const onPress = () => {\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 {this.props.placeholder}\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 this._setModalVisible(false);\n }}\n >\n {this.props.headerBackButtonText || \"Back\"}\n \n \n \n \n {this.props.iosHeader || \"Select One\"}\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 \n \n {\n this._setModalVisible(false);\n this.props.onValueChange(child.props.value);\n this.setState({ current: child.props.label });\n }}\n >\n \n {child.props.label}\n \n \n {child.props.value === this.props.selectedValue\n ? \n : }\n \n }\n />\n \n \n \n \n );\n }\n}\n\nPickerNB.Item = React.createClass({\n render() {\n return ;\n }\n});\n\nPickerNB.propTypes = {\n ...ViewPropTypes,\n renderButton: React.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/dist/src/basic/PickerItem.js b/dist/src/basic/PickerItem.js index 6d7aaacda..3bf6a0c1b 100644 --- a/dist/src/basic/PickerItem.js +++ b/dist/src/basic/PickerItem.js @@ -1,14 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Item=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nItem.propTypes = {\n ...Picker.Item.propTypes,\n};\n\nconst StyledItem = connectStyle('NativeBase.Item', {}, mapPropsToStyleNames)(Item);\n\nexport {\n StyledItem as Item,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/PickerItem.js"],"names":["Item","_root","c","props","propTypes","StyledItem"],"mappings":"y1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,I;AACK;AACP,MAAO,mDAAQ,IAAR,WAAa,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAlB,EAA6C,KAAKC,KAAlD,kDAAP;AACD,C;;;AAGHH,KAAKI,SAAL;AACK,oBAAOJ,IAAP,CAAYI,SADjB;;;AAIA,GAAMC,YAAa,yCAAa,iBAAb,CAAgC,EAAhC;AACjBL,IADiB,CAAnB,C;;;AAIuBA,I,CAAdK,U","file":"PickerItem.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Picker } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Item extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nItem.propTypes = {\n ...Picker.Item.propTypes\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/basic/Radio.js b/dist/src/basic/Radio.js index 0f2ccba5f..60c1f355e 100644 --- a/dist/src/basic/Radio.js +++ b/dist/src/basic/Radio.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Radio=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.prepareRootProps()}>\n {(Platform.OS === 'ios' && !this.props.standardStyle) ?\n (this.props.selected) && \n :\n \n }\n \n );\n }\n}\n\nRadio.propTypes = {\n ...TouchableOpacity.propTypes,\n selected: React.PropTypes.bool,\n standardStyle: React.PropTypes.bool\n};\n\nconst StyledRadio = connectStyle('NativeBase.Radio', {}, mapPropsToStyleNames)(Radio);\n\nexport {\n StyledRadio as Radio,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Radio.js"],"names":["Radio","defaultProps","standardStyle","props","variables","context","theme","platformStyle","platform","_root","c","prepareRootProps","OS","selected","color","brandPrimary","lineHeight","height","fontSize","radioBtnSize","undefined","radioSelectedColorAndroid","radioBtnLineHeight","contextTypes","PropTypes","object","propTypes","bool","StyledRadio"],"mappings":"q1BAAA,4B;AACA;AACA;AACA,4D;AACA,mE;AACA,qD;AACA,mD;;AAEMA,K;;;;AAIe;AACjB,GAAMC,c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EEb,SAAU,gBAAMW,SAAN,CAAgBG,IAF5B;AAGEzB,cAAe,gBAAMsB,SAAN,CAAgBG,IAHjC;;;AAMA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC,iCAA2D5B,KAA3D,CAApB,C;;;AAGiBA,K,CAAf4B,W","file":"Radio.js","sourcesContent":["import React, { Component } from 'react';\nimport { TouchableOpacity, Platform } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport Icon from 'react-native-vector-icons/Ionicons';\nimport mapPropsToStyleNames from '../Utils/mapPropsToStyleNames';\nimport variable from '../theme/variables/platform';\nimport computeProps from '../Utils/computeProps';\n\nclass Radio extends Component {\n static contextTypes = {\n theme: React.PropTypes.object,\n }\n prepareRootProps() {\n const defaultProps = {\n standardStyle: false,\n };\n\n return computeProps(this.props, defaultProps);\n }\n\n\n render() {\n const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable;\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n return (\n this._root = c} {...this.prepareRootProps()}>\n {(Platform.OS === 'ios' && !this.props.standardStyle) ?\n (this.props.selected) && \n :\n \n }\n \n );\n }\n}\n\nRadio.propTypes = {\n ...TouchableOpacity.propTypes,\n selected: React.PropTypes.bool,\n standardStyle: React.PropTypes.bool\n};\n\nconst StyledRadio = connectStyle('NativeBase.Radio', {}, mapPropsToStyleNames)(Radio);\n\nexport {\n StyledRadio as Radio,\n};\n"]} \ No newline at end of file diff --git a/dist/src/basic/Right.js b/dist/src/basic/Right.js index 05ca032d0..c7ec65c46 100644 --- a/dist/src/basic/Right.js +++ b/dist/src/basic/Right.js @@ -1,14 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Right=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nRight.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledRight = connectStyle('NativeBase.Right', {}, mapPropsToStyleNames)(Right);\n\nexport {\n StyledRight as Right,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Right.js"],"names":["Right","_root","c","props","propTypes","style","PropTypes","object","StyledRight"],"mappings":"q1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,K;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,kDAAP;AACD,C;;;AAGHH,MAAMI,SAAN;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC;AAClBR,KADkB,CAApB,C;;;AAIwBA,K,CAAfQ,W","file":"Right.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Right extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nRight.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledRight = connectStyle(\"NativeBase.Right\", {}, mapPropsToStyleNames)(\n Right\n);\n\nexport { StyledRight as Right };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Segment.js b/dist/src/basic/Segment.js index 8f3069b54..2a5f3c7d8 100644 --- a/dist/src/basic/Segment.js +++ b/dist/src/basic/Segment.js @@ -1,17 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Segment=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nSegment.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSegment = connectStyle('NativeBase.Segment', {}, mapPropsToStyleNames)(Segment);\nexport {\n StyledSegment as Segment,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Segment.js"],"names":["Segment","_root","c","props","propTypes","style","PropTypes","object","StyledSegment"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,O;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,mDAAP;AACD,C;;;AAGHH,QAAQI,SAAR;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,eAAgB;AACpB,oBADoB;AAEpB,EAFoB;;AAIpBR,OAJoB,CAAtB,C;AAK0BA,O,CAAjBQ,a","file":"Segment.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Segment extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nSegment.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledSegment = connectStyle(\n \"NativeBase.Segment\",\n {},\n mapPropsToStyleNames\n)(Segment);\nexport { StyledSegment as Segment };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Separator.js b/dist/src/basic/Separator.js index b12267389..d332a177e 100644 --- a/dist/src/basic/Separator.js +++ b/dist/src/basic/Separator.js @@ -1,14 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Separator=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nSeparator.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSeparator = connectStyle('NativeBase.Separator', {}, mapPropsToStyleNames)(Separator);\n\nexport {\n StyledSeparator as Separator,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Separator.js"],"names":["Separator","_root","c","props","propTypes","style","PropTypes","object","StyledSeparator"],"mappings":"61BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,S;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,kDAAP;AACD,C;;;AAGHH,UAAUI,SAAV;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,iBAAkB;AACtB,sBADsB;AAEtB,EAFsB;;AAItBR,SAJsB,CAAxB,C;;AAM4BA,S,CAAnBQ,e","file":"Separator.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Separator extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nSeparator.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledSeparator = connectStyle(\n \"NativeBase.Separator\",\n {},\n mapPropsToStyleNames\n)(Separator);\n\nexport { StyledSeparator as Separator };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Spinner.js b/dist/src/basic/Spinner.js index be5e43a07..c84e95b02 100644 --- a/dist/src/basic/Spinner.js +++ b/dist/src/basic/Spinner.js @@ -1,20 +1,30 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Spinner=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}\n color={this.props.color ? this.props.color : this.props.inverse ? variables.inverseSpinnerColor : variables.defaultSpinnerColor} size={this.props.size ? this.props.size : 'large'}\n />\n );\n }\n}\n\nSpinner.propTypes = {\n ...ActivityIndicator.propTypes,\n color: React.PropTypes.string,\n inverse: React.PropTypes.bool,\n};\n\nconst StyledSpinner = connectStyle('NativeBase.Spinner', {}, mapPropsToStyleNames)(Spinner);\n\nexport {\n StyledSpinner as Spinner,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Spinner.js"],"names":["Spinner","variables","context","theme","_root","c","props","color","inverse","inverseSpinnerColor","defaultSpinnerColor","size","contextTypes","PropTypes","object","propTypes","string","bool","StyledSpinner"],"mappings":"y1BAAA,4B;AACA;;AAEA;AACA,qD;AACA,mE;;AAEMA,O;;;;AAIK;AACP,GAAMC,WAAY,KAAKC,OAAL,CAAaC,KAAb;AACd,KAAKD,OAAL,CAAaC,KAAb,CAAmB,4BAAnB,EAAiDF,SADnC,mBAAlB;;AAGA;AACE;AACE,IAAK,sBAAM,QAAKG,KAAL,CAAaC,CAAnB,EADP;AAEM,KAAKC,KAFX;AAGE;AACE,KAAKA,KAAL,CAAWC,KAAX;AACI,KAAKD,KAAL,CAAWC,KADf;AAEI,KAAKD,KAAL,CAAWE,OAAX;AACEP,UAAUQ,mBADZ;AAEER,UAAUS,mBARpB;;AAUE,KAAM,KAAKJ,KAAL,CAAWK,IAAX,CAAkB,KAAKL,KAAL,CAAWK,IAA7B,CAAoC,OAV5C,kDADF;;;AAcD,C,uCAtBGX,O,CACGY,Y,CAAe,CACpBT,MAAO,gBAAMU,SAAN,CAAgBC,MADH,C;;;AAwBxBd,QAAQe,SAAR;AACK,+BAAkBA,SADvB;AAEER,MAAO,gBAAMM,SAAN,CAAgBG,MAFzB;AAGER,QAAS,gBAAMK,SAAN,CAAgBI,IAH3B;;;AAMA,GAAMC,eAAgB;AACpB,oBADoB;AAEpB,EAFoB;;AAIpBlB,OAJoB,CAAtB,C;;AAM0BA,O,CAAjBkB,a","file":"Spinner.js","sourcesContent":["import React, { Component } from \"react\";\nimport { ActivityIndicator } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport variable from \"../theme/variables/platform\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Spinner extends Component {\n static contextTypes = {\n theme: React.PropTypes.object\n };\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n return (\n (this._root = c)}\n {...this.props}\n color={\n this.props.color\n ? this.props.color\n : this.props.inverse\n ? variables.inverseSpinnerColor\n : variables.defaultSpinnerColor\n }\n size={this.props.size ? this.props.size : \"large\"}\n />\n );\n }\n}\n\nSpinner.propTypes = {\n ...ActivityIndicator.propTypes,\n color: React.PropTypes.string,\n inverse: React.PropTypes.bool\n};\n\nconst StyledSpinner = connectStyle(\n \"NativeBase.Spinner\",\n {},\n mapPropsToStyleNames\n)(Spinner);\n\nexport { StyledSpinner as Spinner };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Swipe/NativeButton.js b/dist/src/basic/Swipe/NativeButton.js index 6f23613b0..2bbfa961f 100644 --- a/dist/src/basic/Swipe/NativeButton.js +++ b/dist/src/basic/Swipe/NativeButton.js @@ -1,8 +1,6 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i\n { this.props.children }\n \n );\n },\n\n render: function() {\n const disabledStyle = this.props.disabled ? (this.props.disabledStyle || styles.opacity) : {};\n\n // Extract Button props\n let buttonProps = {\n accessibilityComponentType: this.props.accessibilityComponentType,\n accessibilityTraits: this.props.accessibilityTraits,\n accessible: this.props.accessible,\n delayLongPress: this.props.delayLongPress,\n delayPressIn: this.props.delayPressIn,\n delayPressOut: this.props.delayPressOut,\n disabled: this.props.disabled,\n hitSlop: this.props.hitSlop,\n onLayout: this.props.onLayout,\n onPress: this.props.onPress,\n onPressIn: this.props.onPressIn,\n onPressOut: this.props.onPressOut,\n onLongPress: this.props.onLongPress,\n pressRetentionOffset: this.props.pressRetentionOffset,\n };\n\n // Render Native Android Button\n if (NativeButton.isAndroid) {\n buttonProps = Object.assign(buttonProps, {\n background: this.props.background || TouchableNativeFeedback.SelectableBackground(),\n });\n\n return (\n \n \n {this._renderText()}\n \n \n );\n }\n\n // Render default button\n return (\n \n { this._renderText() }\n \n );\n }\n});\n\nexport default NativeButton;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Swipe/NativeButton.js"],"names":["styles","create","button","flexDirection","alignSelf","justifyContent","textButton","fontSize","opacity","NativeButton","createClass","propTypes","textStyle","style","disabledStyle","children","node","isRequired","underlayColor","string","background","any","statics","isAndroid","OS","getDefaultProps","_renderText","props","render","disabled","buttonProps","accessibilityComponentType","accessibilityTraits","accessible","delayLongPress","delayPressIn","delayPressOut","hitSlop","onLayout","onPress","onPressIn","onPressOut","onLongPress","pressRetentionOffset","SelectableBackground"],"mappings":"4UAAA,4B;;AAEA,yC;;;;;;;;;;AAUA,GAAMA,QAAS,wBAAWC,MAAX,CAAkB;AAC/BC,OAAQ;AACNC,cAAe,KADT;AAENC,UAAW,SAFL;AAGNC,eAAgB,QAHV,CADuB;;AAM/BC,WAAY;AACVC,SAAU,EADA;AAEVH,UAAW,QAFD,CANmB;;AAU/BI,QAAS;AACPA,QAAS,GADF,CAVsB,CAAlB,CAAf;;;;AAeA,GAAMC,cAAe,gBAAMC,WAAN,CAAkB;AACrCC;;AAEK,sCAAyBA,SAF9B;AAGEC,UAAW,kBAAKD,SAAL,CAAeE,KAH5B;AAIEC,cAAe,kBAAKH,SAAL,CAAeE,KAJhC;AAKEE,SAAU,iBAAUC,IAAV,CAAeC,UAL3B;AAMEC,cAAe,iBAAUC,MAN3B;AAOEC,WAAY,qCAAwBT,SAAxB;AACR,qCAAwBA,SAAxB,CAAkCS,UAD1B;AAER,iBAAUC,GAThB,EADqC;;;AAarCC,QAAS;AACPC,UAAW,sBAASC,EAAT,GAAgB,SADpB,CAb4B;;;AAiBrCC,gBAAiB,0BAAW;AAC1B,MAAO;AACLb,UAAW,IADN;AAELE,cAAe,IAFV;AAGLI,cAAe,IAHV,CAAP;;AAKD,CAvBoC;;AAyBrCQ,YAAa,sBAAW;;AAEtB,GAAI,MAAO,MAAKC,KAAL,CAAWZ,QAAlB,GAA+B,QAAnC,CAA6C;AAC3C,MAAO,MAAKY,KAAL,CAAWZ,QAAlB;AACD;;AAED;AACE,iDAAM,MAAO,CAACf,OAAOM,UAAR,CAAoB,KAAKqB,KAAL,CAAWf,SAA/B,CAAb;AACG,KAAKe,KAAL,CAAWZ,QADd,CADF;;;AAKD,CApCoC;;AAs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AH5B;;AAKG,KAAKQ,WAAL,EALH,CADF;;;AASD,CAxFoC,CAAlB,CAArB,C;;;AA2FejB,Y","file":"NativeButton.js","sourcesContent":["import React, { PropTypes } from \"react\";\n\nimport {\n TouchableWithoutFeedback,\n TouchableNativeFeedback,\n TouchableHighlight,\n Text,\n StyleSheet,\n Platform,\n View\n} from \"react-native\";\n\nconst styles = StyleSheet.create({\n button: {\n flexDirection: \"row\",\n alignSelf: \"stretch\",\n justifyContent: \"center\"\n },\n textButton: {\n fontSize: 14,\n alignSelf: \"center\"\n },\n opacity: {\n opacity: 0.8\n }\n});\n\nconst NativeButton = React.createClass({\n propTypes: {\n // Extract parent props\n ...TouchableWithoutFeedback.propTypes,\n textStyle: Text.propTypes.style,\n disabledStyle: Text.propTypes.style,\n children: PropTypes.node.isRequired,\n underlayColor: PropTypes.string,\n background: TouchableNativeFeedback.propTypes\n ? TouchableNativeFeedback.propTypes.background\n : PropTypes.any\n },\n\n statics: {\n isAndroid: Platform.OS === \"android\"\n },\n\n getDefaultProps: function() {\n return {\n textStyle: null,\n disabledStyle: null,\n underlayColor: null\n };\n },\n\n _renderText: function() {\n // If children is not a string don't wrapp it in a Text component\n if (typeof this.props.children !== \"string\") {\n return this.props.children;\n }\n\n return (\n \n {this.props.children}\n \n );\n },\n\n render: function() {\n const disabledStyle = this.props.disabled\n ? this.props.disabledStyle || styles.opacity\n : {};\n\n // Extract Button props\n let buttonProps = {\n accessibilityComponentType: this.props.accessibilityComponentType,\n accessibilityTraits: this.props.accessibilityTraits,\n accessible: this.props.accessible,\n delayLongPress: this.props.delayLongPress,\n delayPressIn: this.props.delayPressIn,\n delayPressOut: this.props.delayPressOut,\n disabled: this.props.disabled,\n hitSlop: this.props.hitSlop,\n onLayout: this.props.onLayout,\n onPress: this.props.onPress,\n onPressIn: this.props.onPressIn,\n onPressOut: this.props.onPressOut,\n onLongPress: this.props.onLongPress,\n pressRetentionOffset: this.props.pressRetentionOffset\n };\n\n // Render Native Android Button\n if (NativeButton.isAndroid) {\n buttonProps = Object.assign(buttonProps, {\n background:\n this.props.background ||\n TouchableNativeFeedback.SelectableBackground()\n });\n\n return (\n \n \n {this._renderText()}\n \n \n );\n }\n\n // Render default button\n return (\n \n {this._renderText()}\n \n );\n }\n});\n\nexport default NativeButton;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Swipe/SwipeoutBtn.js b/dist/src/basic/Swipe/SwipeoutBtn.js index 95114ceef..d1bce35a2 100644 --- a/dist/src/basic/Swipe/SwipeoutBtn.js +++ b/dist/src/basic/Swipe/SwipeoutBtn.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.SwipeoutBtn=undefined;var _extends=Object.assign||function(target){for(var i=1;i\n {\n (btn.component ?\n {btn.component}\n :\n btn.text\n )\n }\n \n );\n }\n}\n\n\nSwipeoutBtn.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSwipeoutBtn = connectStyle('NativeBase.SwipeoutBtn', {}, mapPropsToStyleNames)(SwipeoutBtn);\n\nexport {\n StyledSwipeoutBtn as SwipeoutBtn,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Swipe/SwipeoutBtn.js"],"names":["SwipeoutBtn","btn","props","styleSwipeoutBtn","styles","swipeoutBtn","type","push","colorDelete","colorPrimary","colorSecondary","backgroundColor","height","width","styleSwipeoutBtnComponent","styleSwipeoutBtnText","swipeoutBtnText","color","onPress","swipeoutBtnTouchable","underlayColor","disabled","component","text","key","propTypes","style","PropTypes","object","StyledSwipeoutBtn"],"mappings":"u2BAAA,4B;AACA;;AAEA,4C;AACA;AACA,sE;;AAEMA,W;;;;;;;;;;;;;;;;AAgBK;AACP,GAAIC,KAAM,KAAKC,KAAf;;AAEA,GAAIC,kBAAmB,CAACC,OAAOC,WAAR,CAAvB;;;AAGA,GAAIJ,IAAIK,IAAJ,GAAa,QAAjB,CAA2BH,iBAAiBI,IAAjB,CAAsBH,OAAOI,WAA7B,EAA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,cAAe,IAJV,CAKLR,OAAQ,CALH,CAMLY,IAAK,IANA,CAOLN,QAAS,IAPJ,CAQLG,SAAU,KARL,CASLE,KAAM,UATD,CAULjB,KAAM,EAVD,CAWLO,MAAO,CAXF,CAAP,CAaD,C;;;;AAuDHb,YAAYyB,SAAZ;AACK,kBAAKA,SADV;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,mBAAoB,yCAAa,wBAAb,CAAuC,EAAvC,iCAAiE7B,WAAjE,CAA1B,C;;;AAGuBA,W,CAArB6B,iB","file":"SwipeoutBtn.js","sourcesContent":["import React, { Component } from 'react';\nimport { Text, TouchableHighlight, View } from 'react-native';\n\nimport NativeButton from './NativeButton';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\n\nclass SwipeoutBtn extends Component {\n static get defaultProps() {\n return {\n backgroundColor: null,\n color: null,\n component: null,\n underlayColor: null,\n height: 0,\n key: null,\n onPress: null,\n disabled: false,\n text: 'Click me',\n type: '',\n width: 0,\n };\n }\n render() {\n var btn = this.props;\n\n var styleSwipeoutBtn = [styles.swipeoutBtn];\n\n // apply \"type\" styles (delete || primary || secondary)\n if (btn.type === 'delete') styleSwipeoutBtn.push(styles.colorDelete);\n else if (btn.type === 'primary') styleSwipeoutBtn.push(styles.colorPrimary);\n else if (btn.type === 'secondary') styleSwipeoutBtn.push(styles.colorSecondary);\n\n // apply background color\n if (btn.backgroundColor) styleSwipeoutBtn.push([{ backgroundColor: btn.backgroundColor }]);\n\n styleSwipeoutBtn.push([{\n height: btn.height,\n width: btn.width,\n }]);\n\n var styleSwipeoutBtnComponent = [];\n\n // set button dimensions\n styleSwipeoutBtnComponent.push([{\n height: btn.height,\n width: btn.width,\n }]);\n\n var styleSwipeoutBtnText = [styles.swipeoutBtnText];\n\n // apply text color\n if (btn.color) styleSwipeoutBtnText.push([{ color: btn.color }]);\n\n // apply text color\n if (btn.color) styleSwipeoutBtnText.push([{ color: btn.color }])\n return (\n \n {\n (btn.component ?\n {btn.component}\n :\n btn.text\n )\n }\n \n );\n }\n}\n\n\nSwipeoutBtn.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledSwipeoutBtn = connectStyle('NativeBase.SwipeoutBtn', {}, mapPropsToStyleNames)(SwipeoutBtn);\n\nexport {\n StyledSwipeoutBtn as SwipeoutBtn,\n};\n"]} \ No newline at end of file diff --git a/dist/src/basic/Swipe/index.js b/dist/src/basic/Swipe/index.js index 3e4786104..6bf14f73f 100644 --- a/dist/src/basic/Swipe/index.js +++ b/dist/src/basic/Swipe/index.js @@ -1,25 +1,21 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Swipeout=undefined;var _extends=Object.assign||function(target){for(var i=1;i0&&this.props.left)this.setState({contentPos:Math.max(posX,0)}); +if(posX<0&&this.props.right) +this.setState({contentPos:Math.min(posX,0)});else +if(posX>0&&this.props.left) +this.setState({contentPos:Math.max(posX,0)}); } }, @@ -218,16 +221,23 @@ var openLeft=posX>openX/10&&!this.state.openedRight; if(this.state.swiping){ if(openRight&&contentPos<0&&posX<0){ -this._tweenContent('contentPos',-btnsRightWidth); -this.setState({contentPos:-btnsRightWidth,openedLeft:false,openedRight:true}); +this._tweenContent("contentPos",-btnsRightWidth); +this.setState({ +contentPos:-btnsRightWidth, +openedLeft:false, +openedRight:true}); + }else if(openLeft&&contentPos>0&&posX>0){ -this._tweenContent('contentPos',btnsLeftWidth); -this.setState({contentPos:btnsLeftWidth,openedLeft:true,openedRight:false}); -}else -{ +this._tweenContent("contentPos",btnsLeftWidth); +this.setState({ +contentPos:btnsLeftWidth, +openedLeft:true, +openedRight:false}); -this._tweenContent('contentPos',0); +}else{ + +this._tweenContent("contentPos",0); this.setState({contentPos:0,openedLeft:false,openedRight:false}); } } @@ -239,14 +249,18 @@ if(this.props.scroll)this.props.scroll(true); _tweenContent:function _tweenContent(state,endValue){ this.tweenState(state,{ easing:_reactTweenState2.default.easingTypes.easeInOutQuad, -duration:endValue===0?this.state.tweenDuration*1.5:this.state.tweenDuration, +duration:endValue===0? +this.state.tweenDuration*1.5: +this.state.tweenDuration, endValue:endValue}); }, _rubberBandEasing:function _rubberBandEasing(value,limit){ -if(value<0&&value0&&value>limit)return limit+Math.pow(value-limit,0.85); +if(value<0&&value0&&value>limit) +return limit+Math.pow(value-limit,0.85); return value; }, @@ -258,7 +272,7 @@ if(this.state.autoClose)this._close(); }, _close:function _close(){ -this._tweenContent('contentPos',0); +this._tweenContent("contentPos",0); this.setState({ openedRight:false, openedLeft:false}); @@ -267,7 +281,7 @@ openedLeft:false}); render:function render(){ var contentWidth=this.state.contentWidth; -var posX=this.getTweeningValue('contentPos'); +var posX=this.getTweeningValue("contentPos"); var styleSwipeout=[_styles2.default.swipeout,this.props.style]; if(this.props.backgroundColor){ @@ -280,7 +294,7 @@ if(posX>0)var limit=this.state.btnsLeftWidth; var styleLeftPos={ left:{ left:0, -overflow:'hidden', +overflow:"hidden", width:Math.min(limit*(posX/limit),limit)}}; @@ -309,12 +323,13 @@ var isRightVisible=posX<0; var isLeftVisible=posX>0; return( -_react2.default.createElement(_reactNative.View,{style:styleSwipeout}, +_react2.default.createElement(_reactNative.View,{style:styleSwipeout,__source:{fileName:_jsxFileName,lineNumber:326}}, _react2.default.createElement(_reactNative.View,_extends({ -ref:'swipeoutContent', +ref:"swipeoutContent", style:styleContent, onLayout:this._onLayout}, -this._panResponder.panHandlers), +this._panResponder.panHandlers,{__source:{fileName:_jsxFileName,lineNumber:327}}), + this.props.children), this._renderButtons(this.props.right,isRightVisible,styleRight), @@ -333,13 +348,13 @@ contentHeight:height}); _renderButtons:function _renderButtons(buttons,isVisible,style){ if(buttons&&isVisible){ -return _react2.default.createElement(_reactNative.View,{style:style}, -buttons.map(this._renderButton)); - -}else{ return( -_react2.default.createElement(_reactNative.View,null)); +_react2.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:352}}, +buttons.map(this._renderButton))); + +}else{ +return _react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:357}}); } }, @@ -356,7 +371,8 @@ onPress:function onPress(){return _this4._autoClose(btn);}, text:btn.text, type:btn.type, underlayColor:btn.underlayColor, -width:this.state.btnWidth})); +width:this.state.btnWidth,__source:{fileName:_jsxFileName,lineNumber:363}})); + }}); @@ -371,8 +387,11 @@ dataArray:_react2.default.PropTypes.object, renderRow:_react2.default.PropTypes.object}); -var StyledSwipeout=(0,_nativeBaseShoutemTheme.connectStyle)('NativeBase.Swipeout',{},_mapPropsToStyleNames2.default)(Swipeout);exports. +var StyledSwipeout=(0,_nativeBaseShoutemTheme.connectStyle)( +"NativeBase.Swipeout", +{},_mapPropsToStyleNames2.default)( +Swipeout);exports. Swipeout=StyledSwipeout; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/src/basic/Swipe/index.js.map b/dist/src/basic/Swipe/index.js.map index 6dee3e65c..1285233a7 100644 --- a/dist/src/basic/Swipe/index.js.map +++ b/dist/src/basic/Swipe/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/basic/Swipe/index.js"],"names":["SwipeoutBtn","btn","props","styleSwipeoutBtn","swipeoutBtn","type","push","colorDelete","colorPrimary","colorSecondary","backgroundColor","height","width","styleSwipeoutBtnComponent","styleSwipeoutBtnText","swipeoutBtnText","color","onPress","swipeoutBtnTouchable","underlayColor","disabled","component","text","key","Swipeout","createClass","mixins","Mixin","propTypes","autoClose","bool","string","close","left","array","onOpen","func","right","scroll","style","sensitivity","number","getDefaultProps","rowID","sectionID","getInitialState","btnWidth","btnsLeftWidth","btnsRightWidth","contentHeight","contentPos","contentWidth","openedRight","swiping","tweenDuration","timeStart","componentWillMount","_panResponder","create","onStartShouldSetPanResponder","event","gestureState","onMoveShouldSetPanResponder","Math","abs","dx","dy","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","onShouldBlockNativeResponder","componentWillReceiveProps","nextProps","_close","e","refs","swipeoutContent","measure","ox","oy","setState","length","Date","getTime","posX","posY","leftWidth","state","rightWidth","openedLeft","moveX","min","max","openX","openLeft","openRight","timeDiff","_tweenContent","endValue","tweenState","easing","easingTypes","easeInOutQuad","duration","_rubberBandEasing","value","limit","pow","_autoClose","render","getTweeningValue","styleSwipeout","swipeout","styleLeftPos","overflow","styleRightPos","styleContentPos","content","styleContent","styleRight","swipeoutBtns","styleLeft","isRightVisible","isLeftVisible","_onLayout","panHandlers","children","_renderButtons","nativeEvent","layout","buttons","isVisible","map","_renderButton","i","NativeButton","SwipeoutButton","PropTypes","object","dataArray","renderRow","StyledSwipeout"],"mappings":"kzBAAA,kD;AACA,4C;AACA,gC;AACA;AACA,sE;;AAEA,4B;;;;;AAKA,yC;;;;;;;;;AASqBA,W;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BV;AACP,GAAIC,KAAM,KAAKC,KAAf;;AAEA,GAAIC,kBAAmB,CAAC,iBAAOC,WAAR,CAAvB;;;AAGA,GAAIH,IAAII,IAAJ,GAAa,QAAjB,CAA2BF,iBAAiBG,IAAjB,CAAsB,iBAAOC,WAA7B,EAA3B;AACK,GAAIN,IAAII,IAAJ,GAAa,SAAjB,CAA4BF,iBAAiBG,IAAjB,CAAsB,iBAAOE,YAA7B,EAA5B;AACA,GAAIP,IAAII,IAAJ,GAAa,WAAjB,CAA8BF,iBAAiBG,IAAjB,CAAsB,iBAAOG,cAA7B;;;AAGnC,GAAIR,IAAIS,eAAR,CAAyBP,iBAAiBG,IAAjB,CAAsB,CAAC,CAAEI,gBAAiBT,IAAIS,eAAvB,CAAD,CAAtB;;AAEzBP,iBAAiBG,IAAjB,CAAsB,CAAC;AACrBK,OAAQV,IAAIU,MADS;AAErBC,MAAOX,IAAIW,KAFU,CAAD,CAAtB;;;AAKA,GAAIC,2BAA4B,EAAhC;;;AAGAA,0BAA0BP,IAA1B,CAA+B,CAAC;AA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A,KADmB,CACZD,MADY,uBACZA,MADY;AAEzB,KAAKyE,QAAL,CAAc;AACZjC,aAAcvC,KADF;AAEZqC,cAAetC,MAFH,CAAd;;AAID,CAxOgC;;AA0OjCwH,eAAgB,wBAASG,OAAT,CAAkBC,SAAlB,CAA6BhG,KAA7B,CAAoC;AAClD,GAAI+F,SAAWC,SAAf,CAA0B;AACxB,MAAQ,kDAAM,MAAOhG,KAAb;AACJ+F,QAAQE,GAAR,CAAY,KAAKC,aAAjB,CADI,CAAR;;AAGD,CAJD,IAIO;AACL;AACE,qDADF;;AAGD;AACF,CApPgC;;AAsPjCA,cAAe,uBAASxI,GAAT,CAAcyI,CAAd,CAAiB;AAC9B;AACE,8BAAC,WAAD;AACI,gBAAiBzI,IAAIS,eADzB;AAEI,MAAOT,IAAIe,KAFf;AAGI,UAAWf,IAAIoB,SAHnB;AAII,SAAUpB,IAAImB,QAJlB;AAKI,OAAQ,KAAKuE,KAAL,CAAW1C,aALvB;AAMI,IAAKyF,CANT;AAOI,QAAS,yBAAM,QAAK1B,UAAL,CAAgB/G,GAAhB,CAAN,EAPb;AAQI,KAAMA,IAAIqB,IARd;AASI,KAAMrB,IAAII,IATd;AAUI,cAAeJ,IAAIkB,aAVvB;AAWI,MAAO,KAAKwE,KAAL,CAAW7C,QAXtB,EADF;;AAcD,CArQgC,CAAlB,CAAjB;;;AAwQAtB,SAASmH,YAAT;AACAnH,SAASoH,cAAT,CAA0B5I,WAA1B;;AAEAwB,SAASI,SAAT;;AAEEW,MAAO,gBAAMsG,SAAN,CAAgBC,MAFzB;AAGEC,UAAW,gBAAMF,SAAN,CAAgBC,MAH7B;AAIEE,UAAW,gBAAMH,SAAN,CAAgBC,MAJ7B;;;AAOA,GAAMG,gBAAiB,yCAAa,qBAAb,CAAoC,EAApC,iCAA8DzH,QAA9D,CAAvB,C;;;AAGoBA,Q,CAAlByH,c","file":"index.js","sourcesContent":["import tweenState from 'react-tween-state';\nimport NativeButton from './NativeButton';\nimport styles from './styles';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\n\nimport React, {\n Component,\n PropTypes,\n} from 'react';\n\nimport {\n PanResponder,\n TouchableHighlight,\n StyleSheet,\n Text,\n View,\n ViewPropTypes\n} from 'react-native';\n\nexport default class SwipeoutBtn extends Component {\n\n propTypes: {\n backgroundColor: PropTypes.string,\n color: PropTypes.string,\n component: PropTypes.node,\n onPress: PropTypes.func,\n text: PropTypes.string,\n type: PropTypes.string,\n underlayColor: PropTypes.string,\n }\n\n static get defaultProps() {\n return {\n backgroundColor: null,\n color: null,\n component: null,\n underlayColor: null,\n height: 0,\n key: null,\n onPress: null,\n disabled: false,\n text: 'Click me',\n type: '',\n width: 0,\n };\n }\n\n render() {\n var btn = this.props;\n\n var styleSwipeoutBtn = [styles.swipeoutBtn];\n\n // apply \"type\" styles (delete || primary || secondary)\n if (btn.type === 'delete') styleSwipeoutBtn.push(styles.colorDelete);\n else if (btn.type === 'primary') styleSwipeoutBtn.push(styles.colorPrimary);\n else if (btn.type === 'secondary') styleSwipeoutBtn.push(styles.colorSecondary);\n\n // apply background color\n if (btn.backgroundColor) styleSwipeoutBtn.push([{ backgroundColor: btn.backgroundColor }]);\n\n styleSwipeoutBtn.push([{\n height: btn.height,\n width: btn.width,\n }]);\n\n var styleSwipeoutBtnComponent = [];\n\n // set button dimensions\n styleSwipeoutBtnComponent.push([{\n height: btn.height,\n width: btn.width,\n }]);\n\n var styleSwipeoutBtnText = [styles.swipeoutBtnText];\n\n // apply text color\n if (btn.color) styleSwipeoutBtnText.push([{ color: btn.color }]);\n\n return (\n \n {\n (btn.component ?\n {btn.component}\n :\n btn.text\n )\n }\n \n );\n }\n}\n\nconst Swipeout = React.createClass({\n mixins: [tweenState.Mixin],\n\n propTypes: {\n autoClose: PropTypes.bool,\n backgroundColor: PropTypes.string,\n close: PropTypes.bool,\n left: PropTypes.array,\n onOpen: PropTypes.func,\n right: PropTypes.array,\n scroll: PropTypes.func,\n style: ViewPropTypes.style,\n sensitivity: PropTypes.number,\n },\n\n getDefaultProps: function() {\n return {\n rowID: -1,\n sectionID: -1,\n sensitivity: 0,\n };\n },\n\n getInitialState: function() {\n return {\n autoClose: this.props.autoClose || false,\n btnWidth: 0,\n btnsLeftWidth: 0,\n btnsRightWidth: 0,\n contentHeight: 0,\n contentPos: 0,\n contentWidth: 0,\n openedRight: false,\n swiping: false,\n tweenDuration: 160,\n timeStart: null,\n };\n },\n\n componentWillMount: function() {\n this._panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (event, gestureState) => true,\n onMoveShouldSetPanResponder: (event, gestureState) =>\n Math.abs(gestureState.dx) > this.props.sensitivity &&\n Math.abs(gestureState.dy) > this.props.sensitivity,\n onPanResponderGrant: this._handlePanResponderGrant,\n onPanResponderMove: this._handlePanResponderMove,\n onPanResponderRelease: this._handlePanResponderEnd,\n onPanResponderTerminate: this._handlePanResponderEnd,\n onShouldBlockNativeResponder: (event, gestureState) => true,\n });\n },\n\n componentWillReceiveProps: function(nextProps) {\n if (nextProps.close) this._close();\n },\n\n _handlePanResponderGrant: function(e: Object, gestureState: Object) {\n if(this.props.onOpen){\n this.props.onOpen(this.props.sectionID, this.props.rowID);\n }\n this.refs.swipeoutContent.measure((ox, oy, width, height) => {\n this.setState({\n btnWidth: (width/5),\n btnsLeftWidth: this.props.left ? (width/5)*this.props.left.length : 0,\n btnsRightWidth: this.props.right ? (width/5)*this.props.right.length : 0,\n swiping: true,\n timeStart: (new Date()).getTime(),\n });\n });\n },\n\n _handlePanResponderMove: function(e: Object, gestureState: Object) {\n var posX = gestureState.dx;\n var posY = gestureState.dy;\n var leftWidth = this.state.btnsLeftWidth;\n var rightWidth = this.state.btnsRightWidth;\n if (this.state.openedRight) var posX = gestureState.dx - rightWidth;\n else if (this.state.openedLeft) var posX = gestureState.dx + leftWidth;\n\n // prevent scroll if moveX is true\n var moveX = Math.abs(posX) > Math.abs(posY);\n if (this.props.scroll) {\n if (moveX) this.props.scroll(false);\n else this.props.scroll(true);\n }\n if (this.state.swiping) {\n // move content to reveal swipeout\n if (posX < 0 && this.props.right) this.setState({ contentPos: Math.min(posX, 0) });\n else if (posX > 0 && this.props.left) this.setState({ contentPos: Math.max(posX, 0) });\n }\n },\n\n _handlePanResponderEnd: function(e: Object, gestureState: Object) {\n var posX = gestureState.dx;\n var contentPos = this.state.contentPos;\n var contentWidth = this.state.contentWidth;\n var btnsLeftWidth = this.state.btnsLeftWidth;\n var btnsRightWidth = this.state.btnsRightWidth;\n\n // minimum threshold to open swipeout\n var openX = contentWidth*0.33;\n\n // should open swipeout\n var openLeft = posX > openX || posX > btnsLeftWidth/2;\n var openRight = posX < -openX || posX < -btnsRightWidth/2;\n\n // account for open swipeouts\n if (this.state.openedRight) var openRight = posX-openX < -openX;\n if (this.state.openedLeft) var openLeft = posX+openX > openX;\n\n // reveal swipeout on quick swipe\n var timeDiff = (new Date()).getTime() - this.state.timeStart < 200;\n if (timeDiff) {\n var openRight = posX < -openX/10 && !this.state.openedLeft;\n var openLeft = posX > openX/10 && !this.state.openedRight;\n }\n\n if (this.state.swiping) {\n if (openRight && contentPos < 0 && posX < 0) {\n // open swipeout right\n this._tweenContent('contentPos', -btnsRightWidth);\n this.setState({ contentPos: -btnsRightWidth, openedLeft: false, openedRight: true });\n } else if (openLeft && contentPos > 0 && posX > 0) {\n // open swipeout left\n this._tweenContent('contentPos', btnsLeftWidth);\n this.setState({ contentPos: btnsLeftWidth, openedLeft: true, openedRight: false });\n }\n else {\n // close swipeout\n this._tweenContent('contentPos', 0);\n this.setState({ contentPos: 0, openedLeft: false, openedRight: false });\n }\n }\n\n // Allow scroll\n if (this.props.scroll) this.props.scroll(true);\n },\n\n _tweenContent: function(state, endValue) {\n this.tweenState(state, {\n easing: tweenState.easingTypes.easeInOutQuad,\n duration: endValue === 0 ? this.state.tweenDuration*1.5 : this.state.tweenDuration,\n endValue: endValue,\n });\n },\n\n _rubberBandEasing: function(value, limit) {\n if (value < 0 && value < limit) return limit - Math.pow(limit - value, 0.85);\n else if (value > 0 && value > limit) return limit + Math.pow(value - limit, 0.85);\n return value;\n },\n\n // close swipeout on button press\n _autoClose: function(btn) {\n var onPress = btn.onPress;\n if (onPress) onPress();\n if (this.state.autoClose) this._close();\n },\n\n _close: function() {\n this._tweenContent('contentPos', 0);\n this.setState({\n openedRight: false,\n openedLeft: false,\n });\n },\n\n render: function() {\n var contentWidth = this.state.contentWidth;\n var posX = this.getTweeningValue('contentPos');\n\n var styleSwipeout = [styles.swipeout, this.props.style];\n if (this.props.backgroundColor) {\n styleSwipeout.push([{ backgroundColor: this.props.backgroundColor }]);\n }\n\n var limit = -this.state.btnsRightWidth;\n if (posX > 0) var limit = this.state.btnsLeftWidth;\n\n var styleLeftPos = {\n left: {\n left: 0,\n overflow: 'hidden',\n width: Math.min(limit*(posX/limit), limit),\n },\n };\n var styleRightPos = {\n right: {\n left: Math.abs(contentWidth + Math.max(limit, posX)),\n right: 0,\n },\n };\n var styleContentPos = {\n content: {\n left: this._rubberBandEasing(posX, limit),\n },\n };\n\n var styleContent = [styles.swipeoutContent];\n styleContent.push(styleContentPos.content);\n\n var styleRight = [styles.swipeoutBtns];\n styleRight.push(styleRightPos.right);\n\n var styleLeft = [styles.swipeoutBtns];\n styleLeft.push(styleLeftPos.left);\n\n var isRightVisible = posX < 0;\n var isLeftVisible = posX > 0;\n\n return (\n \n \n {this.props.children}\n \n { this._renderButtons(this.props.right, isRightVisible, styleRight) }\n { this._renderButtons(this.props.left, isLeftVisible, styleLeft) }\n \n );\n },\n\n _onLayout: function(event) {\n var { width, height } = event.nativeEvent.layout;\n this.setState({\n contentWidth: width,\n contentHeight: height,\n });\n },\n\n _renderButtons: function(buttons, isVisible, style) {\n if (buttons && isVisible) {\n return( \n { buttons.map(this._renderButton) }\n );\n } else {\n return (\n \n );\n }\n },\n\n _renderButton: function(btn, i) {\n return (\n this._autoClose(btn)}\n text={btn.text}\n type={btn.type}\n underlayColor={btn.underlayColor}\n width={this.state.btnWidth}/>\n );\n }\n})\n\nSwipeout.NativeButton = NativeButton;\nSwipeout.SwipeoutButton = SwipeoutBtn;\n\nSwipeout.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object,\n};\n\nconst StyledSwipeout = connectStyle('NativeBase.Swipeout', {}, mapPropsToStyleNames)(Swipeout);\n\nexport {\n StyledSwipeout as Swipeout,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Swipe/index.js"],"names":["SwipeoutBtn","btn","props","styleSwipeoutBtn","swipeoutBtn","type","push","colorDelete","colorPrimary","colorSecondary","backgroundColor","height","width","styleSwipeoutBtnComponent","styleSwipeoutBtnText","swipeoutBtnText","color","onPress","swipeoutBtnTouchable","underlayColor","disabled","component","text","key","Swipeout","createClass","mixins","Mixin","propTypes","autoClose","bool","string","close","left","array","onOpen","func","right","scroll","style","sensitivity","number","getDefaultProps","rowID","sectionID","getInitialState","btnWidth","btnsLeftWidth","btnsRightWidth","contentHeight","contentPos","contentWidth","openedRight","swiping","tweenDuration","timeStart","componentWillMount","_panResponder","create","onStartShouldSetPanResponder","event","gestureState","onMoveShouldSetPanResponder","Math","abs","dx","dy","onPanResponderGrant","_handlePanResponderGrant","onPanResponderMove","_handlePanResponderMove","onPanResponderRelease","_handlePanResponderEnd","onPanResponderTerminate","onShouldBlockNativeResponder","componentWillReceiveProps","nextProps","_close","e","refs","swipeoutContent","measure","ox","oy","setState","length","Date","getTime","posX","posY","leftWidth","state","rightWidth","openedLeft","moveX","min","max","openX","openLeft","openRight","timeDiff","_tweenContent","endValue","tweenState","easing","easingTypes","easeInOutQuad","duration","_rubberBandEasing","value","limit","pow","_autoClose","render","getTweeningValue","styleSwipeout","swipeout","styleLeftPos","overflow","styleRightPos","styleContentPos","content","styleContent","styleRight","swipeoutBtns","styleLeft","isRightVisible","isLeftVisible","_onLayout","panHandlers","children","_renderButtons","nativeEvent","layout","buttons","isV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C,WAAD;AACE,gBAAiBzI,IAAIS,eADvB;AAEE,MAAOT,IAAIe,KAFb;AAGE,UAAWf,IAAIoB,SAHjB;AAIE,SAAUpB,IAAImB,QAJhB;AAKE,OAAQ,KAAKuE,KAAL,CAAW1C,aALrB;AAME,IAAKyF,CANP;AAOE,QAAS,yBAAM,QAAK1B,UAAL,CAAgB/G,GAAhB,CAAN,EAPX;AAQE,KAAMA,IAAIqB,IARZ;AASE,KAAMrB,IAAII,IATZ;AAUE,cAAeJ,IAAIkB,aAVrB;AAWE,MAAO,KAAKwE,KAAL,CAAW7C,QAXpB,kDADF;;;AAeD,CAtRgC,CAAlB,CAAjB;;;AAyRAtB,SAASmH,YAAT;AACAnH,SAASoH,cAAT,CAA0B5I,WAA1B;;AAEAwB,SAASI,SAAT;;AAEEW,MAAO,gBAAMsG,SAAN,CAAgBC,MAFzB;AAGEC,UAAW,gBAAMF,SAAN,CAAgBC,MAH7B;AAIEE,UAAW,gBAAMH,SAAN,CAAgBC,MAJ7B;;;AAOA,GAAMG,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;;AAIrBzH,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlByH,c","file":"index.js","sourcesContent":["import tweenState from \"react-tween-state\";\nimport NativeButton from \"./NativeButton\";\nimport styles from \"./styles\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../../Utils/mapPropsToStyleNames\";\n\nimport React, { Component, PropTypes } from \"react\";\n\nimport {\n PanResponder,\n TouchableHighlight,\n StyleSheet,\n Text,\n View,\n ViewPropTypes\n} from \"react-native\";\n\nexport default class SwipeoutBtn extends Component {\n propTypes: {\n backgroundColor: PropTypes.string,\n color: PropTypes.string,\n component: PropTypes.node,\n onPress: PropTypes.func,\n text: PropTypes.string,\n type: PropTypes.string,\n underlayColor: PropTypes.string\n };\n\n static get defaultProps() {\n return {\n backgroundColor: null,\n color: null,\n component: null,\n underlayColor: null,\n height: 0,\n key: null,\n onPress: null,\n disabled: false,\n text: \"Click me\",\n type: \"\",\n width: 0\n };\n }\n\n render() {\n var btn = this.props;\n\n var styleSwipeoutBtn = [styles.swipeoutBtn];\n\n // apply \"type\" styles (delete || primary || secondary)\n if (btn.type === \"delete\") styleSwipeoutBtn.push(styles.colorDelete);\n else if (btn.type === \"primary\") styleSwipeoutBtn.push(styles.colorPrimary);\n else if (btn.type === \"secondary\")\n styleSwipeoutBtn.push(styles.colorSecondary);\n\n // apply background color\n if (btn.backgroundColor)\n styleSwipeoutBtn.push([{ backgroundColor: btn.backgroundColor }]);\n\n styleSwipeoutBtn.push([\n {\n height: btn.height,\n width: btn.width\n }\n ]);\n\n var styleSwipeoutBtnComponent = [];\n\n // set button dimensions\n styleSwipeoutBtnComponent.push([\n {\n height: btn.height,\n width: btn.width\n }\n ]);\n\n var styleSwipeoutBtnText = [styles.swipeoutBtnText];\n\n // apply text color\n if (btn.color) styleSwipeoutBtnText.push([{ color: btn.color }]);\n\n return (\n \n {btn.component\n ? {btn.component}\n : btn.text}\n \n );\n }\n}\n\nconst Swipeout = React.createClass({\n mixins: [tweenState.Mixin],\n\n propTypes: {\n autoClose: PropTypes.bool,\n backgroundColor: PropTypes.string,\n close: PropTypes.bool,\n left: PropTypes.array,\n onOpen: PropTypes.func,\n right: PropTypes.array,\n scroll: PropTypes.func,\n style: ViewPropTypes.style,\n sensitivity: PropTypes.number\n },\n\n getDefaultProps: function() {\n return {\n rowID: -1,\n sectionID: -1,\n sensitivity: 0\n };\n },\n\n getInitialState: function() {\n return {\n autoClose: this.props.autoClose || false,\n btnWidth: 0,\n btnsLeftWidth: 0,\n btnsRightWidth: 0,\n contentHeight: 0,\n contentPos: 0,\n contentWidth: 0,\n openedRight: false,\n swiping: false,\n tweenDuration: 160,\n timeStart: null\n };\n },\n\n componentWillMount: function() {\n this._panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (event, gestureState) => true,\n onMoveShouldSetPanResponder: (event, gestureState) =>\n Math.abs(gestureState.dx) > this.props.sensitivity &&\n Math.abs(gestureState.dy) > this.props.sensitivity,\n onPanResponderGrant: this._handlePanResponderGrant,\n onPanResponderMove: this._handlePanResponderMove,\n onPanResponderRelease: this._handlePanResponderEnd,\n onPanResponderTerminate: this._handlePanResponderEnd,\n onShouldBlockNativeResponder: (event, gestureState) => true\n });\n },\n\n componentWillReceiveProps: function(nextProps) {\n if (nextProps.close) this._close();\n },\n\n _handlePanResponderGrant: function(e: Object, gestureState: Object) {\n if (this.props.onOpen) {\n this.props.onOpen(this.props.sectionID, this.props.rowID);\n }\n this.refs.swipeoutContent.measure((ox, oy, width, height) => {\n this.setState({\n btnWidth: width / 5,\n btnsLeftWidth: this.props.left ? width / 5 * this.props.left.length : 0,\n btnsRightWidth: this.props.right\n ? width / 5 * this.props.right.length\n : 0,\n swiping: true,\n timeStart: new Date().getTime()\n });\n });\n },\n\n _handlePanResponderMove: function(e: Object, gestureState: Object) {\n var posX = gestureState.dx;\n var posY = gestureState.dy;\n var leftWidth = this.state.btnsLeftWidth;\n var rightWidth = this.state.btnsRightWidth;\n if (this.state.openedRight) var posX = gestureState.dx - rightWidth;\n else if (this.state.openedLeft) var posX = gestureState.dx + leftWidth;\n\n // prevent scroll if moveX is true\n var moveX = Math.abs(posX) > Math.abs(posY);\n if (this.props.scroll) {\n if (moveX) this.props.scroll(false);\n else this.props.scroll(true);\n }\n if (this.state.swiping) {\n // move content to reveal swipeout\n if (posX < 0 && this.props.right)\n this.setState({ contentPos: Math.min(posX, 0) });\n else if (posX > 0 && this.props.left)\n this.setState({ contentPos: Math.max(posX, 0) });\n }\n },\n\n _handlePanResponderEnd: function(e: Object, gestureState: Object) {\n var posX = gestureState.dx;\n var contentPos = this.state.contentPos;\n var contentWidth = this.state.contentWidth;\n var btnsLeftWidth = this.state.btnsLeftWidth;\n var btnsRightWidth = this.state.btnsRightWidth;\n\n // minimum threshold to open swipeout\n var openX = contentWidth * 0.33;\n\n // should open swipeout\n var openLeft = posX > openX || posX > btnsLeftWidth / 2;\n var openRight = posX < -openX || posX < -btnsRightWidth / 2;\n\n // account for open swipeouts\n if (this.state.openedRight) var openRight = posX - openX < -openX;\n if (this.state.openedLeft) var openLeft = posX + openX > openX;\n\n // reveal swipeout on quick swipe\n var timeDiff = new Date().getTime() - this.state.timeStart < 200;\n if (timeDiff) {\n var openRight = posX < -openX / 10 && !this.state.openedLeft;\n var openLeft = posX > openX / 10 && !this.state.openedRight;\n }\n\n if (this.state.swiping) {\n if (openRight && contentPos < 0 && posX < 0) {\n // open swipeout right\n this._tweenContent(\"contentPos\", -btnsRightWidth);\n this.setState({\n contentPos: -btnsRightWidth,\n openedLeft: false,\n openedRight: true\n });\n } else if (openLeft && contentPos > 0 && posX > 0) {\n // open swipeout left\n this._tweenContent(\"contentPos\", btnsLeftWidth);\n this.setState({\n contentPos: btnsLeftWidth,\n openedLeft: true,\n openedRight: false\n });\n } else {\n // close swipeout\n this._tweenContent(\"contentPos\", 0);\n this.setState({ contentPos: 0, openedLeft: false, openedRight: false });\n }\n }\n\n // Allow scroll\n if (this.props.scroll) this.props.scroll(true);\n },\n\n _tweenContent: function(state, endValue) {\n this.tweenState(state, {\n easing: tweenState.easingTypes.easeInOutQuad,\n duration: endValue === 0\n ? this.state.tweenDuration * 1.5\n : this.state.tweenDuration,\n endValue: endValue\n });\n },\n\n _rubberBandEasing: function(value, limit) {\n if (value < 0 && value < limit)\n return limit - Math.pow(limit - value, 0.85);\n else if (value > 0 && value > limit)\n return limit + Math.pow(value - limit, 0.85);\n return value;\n },\n\n // close swipeout on button press\n _autoClose: function(btn) {\n var onPress = btn.onPress;\n if (onPress) onPress();\n if (this.state.autoClose) this._close();\n },\n\n _close: function() {\n this._tweenContent(\"contentPos\", 0);\n this.setState({\n openedRight: false,\n openedLeft: false\n });\n },\n\n render: function() {\n var contentWidth = this.state.contentWidth;\n var posX = this.getTweeningValue(\"contentPos\");\n\n var styleSwipeout = [styles.swipeout, this.props.style];\n if (this.props.backgroundColor) {\n styleSwipeout.push([{ backgroundColor: this.props.backgroundColor }]);\n }\n\n var limit = -this.state.btnsRightWidth;\n if (posX > 0) var limit = this.state.btnsLeftWidth;\n\n var styleLeftPos = {\n left: {\n left: 0,\n overflow: \"hidden\",\n width: Math.min(limit * (posX / limit), limit)\n }\n };\n var styleRightPos = {\n right: {\n left: Math.abs(contentWidth + Math.max(limit, posX)),\n right: 0\n }\n };\n var styleContentPos = {\n content: {\n left: this._rubberBandEasing(posX, limit)\n }\n };\n\n var styleContent = [styles.swipeoutContent];\n styleContent.push(styleContentPos.content);\n\n var styleRight = [styles.swipeoutBtns];\n styleRight.push(styleRightPos.right);\n\n var styleLeft = [styles.swipeoutBtns];\n styleLeft.push(styleLeftPos.left);\n\n var isRightVisible = posX < 0;\n var isLeftVisible = posX > 0;\n\n return (\n \n \n {this.props.children}\n \n {this._renderButtons(this.props.right, isRightVisible, styleRight)}\n {this._renderButtons(this.props.left, isLeftVisible, styleLeft)}\n \n );\n },\n\n _onLayout: function(event) {\n var { width, height } = event.nativeEvent.layout;\n this.setState({\n contentWidth: width,\n contentHeight: height\n });\n },\n\n _renderButtons: function(buttons, isVisible, style) {\n if (buttons && isVisible) {\n return (\n \n {buttons.map(this._renderButton)}\n \n );\n } else {\n return ;\n }\n },\n\n _renderButton: function(btn, i) {\n return (\n this._autoClose(btn)}\n text={btn.text}\n type={btn.type}\n underlayColor={btn.underlayColor}\n width={this.state.btnWidth}\n />\n );\n }\n});\n\nSwipeout.NativeButton = NativeButton;\nSwipeout.SwipeoutButton = SwipeoutBtn;\n\nSwipeout.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n dataArray: React.PropTypes.object,\n renderRow: React.PropTypes.object\n};\n\nconst StyledSwipeout = connectStyle(\n \"NativeBase.Swipeout\",\n {},\n mapPropsToStyleNames\n)(Swipeout);\n\nexport { StyledSwipeout as Swipeout };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Swipe/styles.js b/dist/src/basic/Swipe/styles.js index f4f19dd86..67df10d7e 100644 --- a/dist/src/basic/Swipe/styles.js +++ b/dist/src/basic/Swipe/styles.js @@ -1,44 +1,41 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); - - +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); var styles=_reactNative.StyleSheet.create({ swipeout:{ -backgroundColor:'#dbddde', -overflow:'hidden'}, +backgroundColor:"#dbddde", +overflow:"hidden"}, swipeoutBtnTouchable:{ flex:1}, swipeoutBtn:{ -alignItems:'center', -backgroundColor:'#b6bec0', +alignItems:"center", +backgroundColor:"#b6bec0", flex:1, -justifyContent:'center', -overflow:'hidden'}, +justifyContent:"center", +overflow:"hidden"}, swipeoutBtnText:{ -color:'#fff', -textAlign:'center'}, +color:"#fff", +textAlign:"center"}, swipeoutBtns:{ bottom:0, flex:1, -flexDirection:'row', -position:'absolute', +flexDirection:"row", +position:"absolute", right:0, top:0}, swipeoutContent:{}, - colorDelete:{ -backgroundColor:'#fb3d38'}, +backgroundColor:"#fb3d38"}, colorPrimary:{ -backgroundColor:'#006fff'}, +backgroundColor:"#006fff"}, colorSecondary:{ -backgroundColor:'#fd9427'}});exports.default= +backgroundColor:"#fd9427"}});exports.default= diff --git a/dist/src/basic/Swipe/styles.js.map b/dist/src/basic/Swipe/styles.js.map index 311373745..2979d15f9 100644 --- a/dist/src/basic/Swipe/styles.js.map +++ b/dist/src/basic/Swipe/styles.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/basic/Swipe/styles.js"],"names":["styles","create","swipeout","backgroundColor","overflow","swipeoutBtnTouchable","flex","swipeoutBtn","alignItems","justifyContent","swipeoutBtnText","color","textAlign","swipeoutBtns","bottom","flexDirection","position","right","top","swipeoutContent","colorDelete","colorPrimary","colorSecondary"],"mappings":"yDAAA;;;;AAIA,GAAMA,QAAS,wBAAWC,MAAX,CAAkB;AAC/BC,SAAU;AACRC,gBAAiB,SADT;AAERC,SAAU,QAFF,CADqB;;AAK/BC,qBAAsB;AACpBC,KAAM,CADc,CALS;;AAQ/BC,YAAa;AACXC,WAAY,QADD;AAEXL,gBAAiB,SAFN;AAGXG,KAAM,CAHK;AAIXG,eAAgB,QAJL;AAKXL,SAAU,QALC,CARkB;;AAe/BM,gBAAiB;AACfC,MAAO,MADQ;AAEfC,UAAW,QAFI,CAfc;;AAmB/BC,aAAc;AACZC,OAAQ,CADI;AAEZR,KAAM,CAFM;AAGZS,cAAe,KAHH;AAIZC,SAAU,UAJE;AAKZC,MAAO,CALK;AAMZC,IAAK,CANO,CAnBiB;;AA2B/BC,gBAAiB,EA3Bc;;AA6B/BC,YAAa;AACXjB,gBAAiB,SADN,CA7BkB;;AAgC/BkB,aAAc;AACZlB,gBAAiB,SADL,CAhCiB;;AAmC/BmB,eAAgB;AACdnB,gBAAiB,SADH,CAnCe,CAAlB,CAAf,C;;;;AAwCeH,M","file":"styles.js","sourcesContent":["import {\n StyleSheet,\n} from 'react-native';\n\nconst styles = StyleSheet.create({\n swipeout: {\n backgroundColor: '#dbddde',\n overflow: 'hidden',\n },\n swipeoutBtnTouchable: {\n flex: 1,\n },\n swipeoutBtn: {\n alignItems: 'center',\n backgroundColor: '#b6bec0',\n flex: 1,\n justifyContent: 'center',\n overflow: 'hidden',\n },\n swipeoutBtnText: {\n color: '#fff',\n textAlign: 'center',\n },\n swipeoutBtns: {\n bottom: 0,\n flex: 1,\n flexDirection: 'row',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n swipeoutContent: {\n },\n colorDelete: {\n backgroundColor: '#fb3d38',\n },\n colorPrimary: {\n backgroundColor: '#006fff'\n },\n colorSecondary: {\n backgroundColor: '#fd9427'\n },\n})\n\nexport default styles;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Swipe/styles.js"],"names":["styles","create","swipeout","backgroundColor","overflow","swipeoutBtnTouchable","flex","swipeoutBtn","alignItems","justifyContent","swipeoutBtnText","color","textAlign","swipeoutBtns","bottom","flexDirection","position","right","top","swipeoutContent","colorDelete","colorPrimary","colorSecondary"],"mappings":"yDAAA;;AAEA,GAAMA,QAAS,wBAAWC,MAAX,CAAkB;AAC/BC,SAAU;AACRC,gBAAiB,SADT;AAERC,SAAU,QAFF,CADqB;;AAK/BC,qBAAsB;AACpBC,KAAM,CADc,CALS;;AAQ/BC,YAAa;AACXC,WAAY,QADD;AAEXL,gBAAiB,SAFN;AAGXG,KAAM,CAHK;AAIXG,eAAgB,QAJL;AAKXL,SAAU,QALC,CARkB;;AAe/BM,gBAAiB;AACfC,MAAO,MADQ;AAEfC,UAAW,QAFI,CAfc;;AAmB/BC,aAAc;AACZC,OAAQ,CADI;AAEZR,KAAM,CAFM;AAGZS,cAAe,KAHH;AAIZC,SAAU,UAJE;AAKZC,MAAO,CALK;AAMZC,IAAK,CANO,CAnBiB;;AA2B/BC,gBAAiB,EA3Bc;AA4B/BC,YAAa;AACXjB,gBAAiB,SADN,CA5BkB;;AA+B/BkB,aAAc;AACZlB,gBAAiB,SADL,CA/BiB;;AAkC/BmB,eAAgB;AACdnB,gBAAiB,SADH,CAlCe,CAAlB,CAAf,C;;;;AAuCeH,M","file":"styles.js","sourcesContent":["import { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n swipeout: {\n backgroundColor: \"#dbddde\",\n overflow: \"hidden\"\n },\n swipeoutBtnTouchable: {\n flex: 1\n },\n swipeoutBtn: {\n alignItems: \"center\",\n backgroundColor: \"#b6bec0\",\n flex: 1,\n justifyContent: \"center\",\n overflow: \"hidden\"\n },\n swipeoutBtnText: {\n color: \"#fff\",\n textAlign: \"center\"\n },\n swipeoutBtns: {\n bottom: 0,\n flex: 1,\n flexDirection: \"row\",\n position: \"absolute\",\n right: 0,\n top: 0\n },\n swipeoutContent: {},\n colorDelete: {\n backgroundColor: \"#fb3d38\"\n },\n colorPrimary: {\n backgroundColor: \"#006fff\"\n },\n colorSecondary: {\n backgroundColor: \"#fd9427\"\n }\n});\n\nexport default styles;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Switch.js b/dist/src/basic/Switch.js index dee22221c..eb2d75418 100644 --- a/dist/src/basic/Switch.js +++ b/dist/src/basic/Switch.js @@ -1,14 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Switch=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nSwitch.propTypes = {\n ...Switch.propTypes,\n};\n\nconst StyledSwitch = connectStyle('NativeBase.Switch', {}, mapPropsToStyleNames)(Switch);\n\nexport {\n StyledSwitch as Switch,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Switch.js"],"names":["Switch","_root","c","props","propTypes","StyledSwitch"],"mappings":"u1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,M;AACK;AACP,MAAO,6DAAU,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAf,EAA0C,KAAKC,KAA/C,kDAAP;AACD,C;;;AAGHH,OAAOI,SAAP;AACKJ,OAAOI,SADZ;;;AAIA,GAAMC,cAAe;AACnB,mBADmB;AAEnB,EAFmB;;AAInBL,MAJmB,CAArB,C;;AAMyBA,M,CAAhBK,Y","file":"Switch.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Switch as SwitchNB } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Switch extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nSwitch.propTypes = {\n ...Switch.propTypes\n};\n\nconst StyledSwitch = connectStyle(\n \"NativeBase.Switch\",\n {},\n mapPropsToStyleNames\n)(Switch);\n\nexport { StyledSwitch as Switch };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tab.js b/dist/src/basic/Tab.js index 536b86268..a776df70f 100644 --- a/dist/src/basic/Tab.js +++ b/dist/src/basic/Tab.js @@ -1,13 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Tab=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n {this.props.children}\n \n );\n }\n}\n\nTab.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTab = connectStyle('NativeBase.Tab', {}, mapPropsToStyleNames)(Tab);\n\nexport {\n StyledTab as Tab,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Tab.js"],"names":["Tab","_root","c","props","children","propTypes","style","PropTypes","object","StyledTab"],"mappings":"i1BAAA,4B;AACA;;AAEA;AACA,mE;;AAEMA,G;AACK;AACP;AACE,0DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C;AACG,KAAKA,KAAL,CAAWC,QADd,CADF;;;AAKD,C;;;AAGHJ,IAAIK,SAAJ;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,WAAY,yCAAa,gBAAb,CAA+B,EAA/B,iCAAyDT,GAAzD,CAAlB,C;;AAEsBA,G,CAAbS,S","file":"Tab.js","sourcesContent":["import React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Tab extends Component {\n render() {\n return (\n (this._root = c)} {...this.props}>\n {this.props.children}\n \n );\n }\n}\n\nTab.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledTab = connectStyle(\"NativeBase.Tab\", {}, mapPropsToStyleNames)(Tab);\n\nexport { StyledTab as Tab };\n"]} \ No newline at end of file diff --git a/dist/src/basic/TabContainer.js b/dist/src/basic/TabContainer.js index 721148aac..146971e9b 100644 --- a/dist/src/basic/TabContainer.js +++ b/dist/src/basic/TabContainer.js @@ -1,17 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.TabContainer=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nTabContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTabContainer = connectStyle('NativeBase.TabContainer', {}, mapPropsToStyleNames)(TabContainer);\nexport {\n StyledTabContainer as TabContainer,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/TabContainer.js"],"names":["TabContainer","_root","c","props","propTypes","style","PropTypes","object","StyledTabContainer"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,Y;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,mDAAP;AACD,C;;;AAGHH,aAAaI,SAAb;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,oBAAqB;AACzB,yBADyB;AAEzB,EAFyB;;AAIzBR,YAJyB,CAA3B,C;AAK+BA,Y,CAAtBQ,kB","file":"TabContainer.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass TabContainer extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nTabContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledTabContainer = connectStyle(\n \"NativeBase.TabContainer\",\n {},\n mapPropsToStyleNames\n)(TabContainer);\nexport { StyledTabContainer as TabContainer };\n"]} \ No newline at end of file diff --git a/dist/src/basic/TabHeading.js b/dist/src/basic/TabHeading.js index b23be188e..15a149992 100644 --- a/dist/src/basic/TabHeading.js +++ b/dist/src/basic/TabHeading.js @@ -1,17 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.TabHeading=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nTabHeadingNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTabHeadingNB = connectStyle('NativeBase.TabHeading', {}, mapPropsToStyleNames)(TabHeadingNB);\nexport {\n StyledTabHeadingNB as TabHeading,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/TabHeading.js"],"names":["TabHeadingNB","_root","c","props","propTypes","style","PropTypes","object","StyledTabHeadingNB","TabHeading"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,Y;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,mDAAP;AACD,C;;;AAGHH,aAAaI,SAAb;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,oBAAqB;AACzB,uBADyB;AAEzB,EAFyB;;AAIzBR,YAJyB,CAA3B,C;AAK+BS,U,CAAtBD,kB","file":"TabHeading.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass TabHeadingNB extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nTabHeadingNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledTabHeadingNB = connectStyle(\n \"NativeBase.TabHeading\",\n {},\n mapPropsToStyleNames\n)(TabHeadingNB);\nexport { StyledTabHeadingNB as TabHeading };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/Button.android.js b/dist/src/basic/Tabs/Button.android.js index 4ca4239ba..6e4048248 100644 --- a/dist/src/basic/Tabs/Button.android.js +++ b/dist/src/basic/Tabs/Button.android.js @@ -1,17 +1,16 @@ -var _extends=Object.assign||function(target){for(var i=1;i {\n return \n {props.children}\n ;\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/Button.android.js"],"names":["React","require","ReactNative","TouchableNativeFeedback","View","Button","SelectableBackground","props","children","module","exports"],"mappings":"oRAAA,GAAMA,OAAQC,QAAQ,OAAR,CAAd;AACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;AACQE,uB,CAAkCD,W,CAAlCC,uB,CAAyBC,I,CAASF,W,CAATE,I;;AAEjC,GAAMC,QAAS,QAATA,OAAS,OAAS;AACtB;AACE,oBAAC,uBAAD;AACE,aAAc,CADhB;AAEE,WAAYF,wBAAwBG,oBAAxB,EAFd;AAGMC,KAHN;;AAKGA,MAAMC,QALT,CADF;;;AASD,CAVD;;AAYAC,OAAOC,OAAP,CAAiBL,MAAjB","file":"Button.android.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nconst { TouchableNativeFeedback, View } = ReactNative;\n\nconst Button = props => {\n return (\n \n {props.children}\n \n );\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/Button.ios.js b/dist/src/basic/Tabs/Button.ios.js index 0d0083538..a83ec9941 100644 --- a/dist/src/basic/Tabs/Button.ios.js +++ b/dist/src/basic/Tabs/Button.ios.js @@ -1,13 +1,12 @@ -var _extends=Object.assign||function(target){for(var i=1;i {\n return \n {props.children}\n ;\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/Button.ios.js"],"names":["React","require","ReactNative","TouchableOpacity","View","Button","props","children","module","exports"],"mappings":"gRAAA,GAAMA,OAAQC,QAAQ,OAAR,CAAd;AACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;AACQE,gB,CAA2BD,W,CAA3BC,gB,CAAkBC,I,CAASF,W,CAATE,I;;AAE1B,GAAMC,QAAS,QAATA,OAAS,OAAS;AACtB;AACE,oBAAC,gBAAD,WAAkB,cAAe,GAAjC,EAA0CC,KAA1C;AACGA,MAAMC,QADT,CADF;;;AAKD,CAND;;AAQAC,OAAOC,OAAP,CAAiBJ,MAAjB","file":"Button.ios.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nconst { TouchableOpacity, View } = ReactNative;\n\nconst Button = props => {\n return (\n \n {props.children}\n \n );\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/Button.windows.js b/dist/src/basic/Tabs/Button.windows.js index cfd473a0e..d16ca5ee9 100644 --- a/dist/src/basic/Tabs/Button.windows.js +++ b/dist/src/basic/Tabs/Button.windows.js @@ -1,13 +1,12 @@ -var React=require('react'); -var ReactNative=require('react-native');var - -TouchableOpacity= - -ReactNative.TouchableOpacity,View=ReactNative.View; +var _extends=Object.assign||function(target){for(var i=1;i {\n return \n {props.children}\n ;\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/Button.windows.js"],"names":["React","require","ReactNative","TouchableOpacity","View","Button","props","children","module","exports"],"mappings":"oRAAA,GAAMA,OAAQC,QAAQ,OAAR,CAAd;AACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;AACQE,gB,CAA2BD,W,CAA3BC,gB,CAAkBC,I,CAASF,W,CAATE,I;;AAE1B,GAAMC,QAAS,QAATA,OAAS,OAAS;AACtB;AACE,oBAAC,gBAAD,aAAsBC,KAAtB;AACGA,MAAMC,QADT,CADF;;;AAKD,CAND;;AAQAC,OAAOC,OAAP,CAAiBJ,MAAjB","file":"Button.windows.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nconst { TouchableOpacity, View } = ReactNative;\n\nconst Button = props => {\n return (\n \n {props.children}\n \n );\n};\n\nmodule.exports = Button;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/DefaultTabBar.js b/dist/src/basic/Tabs/DefaultTabBar.js index 54551773e..2bb10941a 100644 --- a/dist/src/basic/Tabs/DefaultTabBar.js +++ b/dist/src/basic/Tabs/DefaultTabBar.js @@ -1,20 +1,14 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.DefaultTabBar=undefined; +Object.defineProperty(exports,"__esModule",{value:true});exports.DefaultTabBar=undefined;var _jsxFileName="src/basic/Tabs/DefaultTabBar.js"; -var _nativeBaseShoutemTheme=require('native-base-shoutem-theme'); -var _platform=require('./../../theme/variables/platform');var _platform2=_interopRequireDefault(_platform); -var _index=require('./../../index'); -var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var React=require('react');var ReactNative=require('react-native');var +var _nativeBaseShoutemTheme=require("native-base-shoutem-theme"); +var _platform=require("./../../theme/variables/platform");var _platform2=_interopRequireDefault(_platform); +var _index=require("./../../index"); +var _lodash=require("lodash");var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var React=require("react");var ReactNative=require("react-native");var +StyleSheet=ReactNative.StyleSheet,View=ReactNative.View,Animated=ReactNative.Animated,Platform=ReactNative.Platform,ViewPropTypes=ReactNative.ViewPropTypes; +var Button=require("./Button"); -StyleSheet= - - - - -ReactNative.StyleSheet,View=ReactNative.View,Animated=ReactNative.Animated,Platform=ReactNative.Platform,ViewPropTypes=ReactNative.ViewPropTypes; -var Button=require('./Button'); - -var DefaultTabBar=React.createClass({displayName:'DefaultTabBar', +var DefaultTabBar=React.createClass({displayName:"DefaultTabBar", propTypes:{ goToPage:React.PropTypes.func, activeTab:React.PropTypes.number, @@ -38,72 +32,106 @@ backgroundColor:null}; }, -renderTabOption:function renderTabOption(name,page){ -}, - -renderTab:function renderTab(name,page,isTabActive,onPressHandler,tabStyle,activeTabStyle,textStyle,activeTextStyle,tabHeaderStyle){ -var headerContent=typeof name!=='string'?name.props.children:undefined;var _props= +renderTabOption:function renderTabOption(name,page){}, + +renderTab:function renderTab( +name, +page, +isTabActive, +onPressHandler, +tabStyle, +activeTabStyle, +textStyle, +activeTextStyle, +tabHeaderStyle) +{ +var headerContent=typeof name!=="string"? +name.props.children: +undefined;var _props= this.props,activeTextColor=_props.activeTextColor,inactiveTextColor=_props.inactiveTextColor; var textColor=isTabActive?activeTextColor:inactiveTextColor; -var fontWeight=isTabActive?'bold':'normal'; -if(typeof name==='string'){ -return React.createElement(Button,{ +var fontWeight=isTabActive?"bold":"normal"; +if(typeof name==="string"){ +return( +React.createElement(Button,{ style:{flex:1}, key:name, -onPress:function onPress(){return onPressHandler(page);}}, +onPress:function onPress(){return onPressHandler(page);},__source:{fileName:_jsxFileName,lineNumber:56}}, -React.createElement(_index.TabHeading,{style:isTabActive?activeTabStyle:tabStyle,active:isTabActive}, -React.createElement(_index.Text,{style:isTabActive?activeTextStyle:textStyle}, -name))); +React.createElement(_index.TabHeading,{ +style:isTabActive?activeTabStyle:tabStyle, +active:isTabActive,__source:{fileName:_jsxFileName,lineNumber:61}}, +React.createElement(_index.Text,{style:isTabActive?activeTextStyle:textStyle,__source:{fileName:_jsxFileName,lineNumber:65}}, +name)))); -}else -{ -return React.createElement(Button,{ + + +}else{ +return( +React.createElement(Button,{ style:{flex:1}, key:_lodash2.default.random(1.2,5.2), -onPress:function onPress(){return onPressHandler(page);}}, +onPress:function onPress(){return onPressHandler(page);},__source:{fileName:_jsxFileName,lineNumber:73}}, + +React.createElement(_index.TabHeading,{style:tabHeaderStyle,active:isTabActive,__source:{fileName:_jsxFileName,lineNumber:78}}, +headerContent))); -React.createElement(_index.TabHeading,{style:tabHeaderStyle,active:isTabActive}, -headerContent)); } }, render:function render(){var _this=this; -var variables=this.context.theme?this.context.theme['@@shoutem.theme/themeStyle'].variables:_platform2.default; +var variables=this.context.theme? +this.context.theme["@@shoutem.theme/themeStyle"].variables:_platform2.default; + var platformStyle=variables.platformStyle; var containerWidth=this.props.containerWidth; var numberOfTabs=this.props.tabs.length; var tabUnderlineStyle={ -position:'absolute', +position:"absolute", width:containerWidth/numberOfTabs, height:4, backgroundColor:variables.topTabBarActiveBorderColor, bottom:0}; - var left=this.props.scrollValue.interpolate({ -inputRange:[0,1],outputRange:[0,containerWidth/numberOfTabs]}); +inputRange:[0,1], +outputRange:[0,containerWidth/numberOfTabs]}); return( -React.createElement(_index.TabContainer,null, +React.createElement(_index.TabContainer,{__source:{fileName:_jsxFileName,lineNumber:106}}, this.props.tabs.map(function(name,page){ var isTabActive=_this.props.activeTab===page; var renderTab=_this.props.renderTab||_this.renderTab; -return renderTab(name,page,isTabActive,_this.props.goToPage,_this.props.tabStyle[page],_this.props.activeTabStyle[page],_this.props.textStyle[page],_this.props.activeTextStyle[page],_this.props.tabHeaderStyle[page]); +return renderTab( +name, +page, +isTabActive, +_this.props.goToPage, +_this.props.tabStyle[page], +_this.props.activeTabStyle[page], +_this.props.textStyle[page], +_this.props.activeTextStyle[page], +_this.props.tabHeaderStyle[page]); + }), -React.createElement(Animated.View,{style:[tabUnderlineStyle,{left:left},this.props.underlineStyle]}))); +React.createElement(Animated.View,{ +style:[tabUnderlineStyle,{left:left},this.props.underlineStyle],__source:{fileName:_jsxFileName,lineNumber:122}}))); -}}); +}}); -var StyledTab=(0,_nativeBaseShoutemTheme.connectStyle)('NativeBase.DefaultTabBar',{},mapPropsToStyleNames)(DefaultTabBar);exports. +var StyledTab=(0,_nativeBaseShoutemTheme.connectStyle)( +"NativeBase.DefaultTabBar", +{}, +mapPropsToStyleNames)( +DefaultTabBar);exports. DefaultTabBar=StyledTab; //# sourceMappingURL=DefaultTabBar.js.map \ No newline at end of file diff --git a/dist/src/basic/Tabs/DefaultTabBar.js.map b/dist/src/basic/Tabs/DefaultTabBar.js.map index 6a7f873c5..9633bee2d 100644 --- a/dist/src/basic/Tabs/DefaultTabBar.js.map +++ b/dist/src/basic/Tabs/DefaultTabBar.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/basic/Tabs/DefaultTabBar.js"],"names":["React","require","ReactNative","StyleSheet","View","Animated","Platform","ViewPropTypes","Button","DefaultTabBar","createClass","propTypes","goToPage","PropTypes","func","activeTab","number","tabs","array","backgroundColor","string","activeTextColor","inactiveTextColor","tabStyle","style","renderTab","underlineStyle","contextTypes","theme","object","getDefaultProps","topTabBarActiveTextColor","topTabBarTextColor","renderTabOption","name","page","isTabActive","onPressHandler","activeTabStyle","textStyle","activeTextStyle","tabHeaderStyle","headerContent","props","children","undefined","textColor","fontWeight","flex","random","render","variables","context","platformStyle","containerWidth","numberOfTabs","length","tabUnderlineStyle","position","width","height","topTabBarActiveBorderColor","bottom","left","scrollValue","interpolate","inputRange","outputRange","map","StyledTab","mapPropsToStyleNames"],"mappings":";;AAEA;AACA,0D;AACA;AACA,8B,gIALA,GAAMA,OAAQC,QAAQ,OAAR,CAAd,CACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;;;AAOEE,U;;;;;AAKED,W,CALFC,U,CACAC,I,CAIEF,W,CAJFE,I,CACAC,Q,CAGEH,W,CAHFG,Q,CACAC,Q,CAEEJ,W,CAFFI,Q,CACAC,a,CACEL,W,CADFK,a;AAEF,GAAMC,QAASP,QAAQ,UAAR,CAAf;;AAEA,GAAMQ,eAAgBT,MAAMU,WAAN,CAAkB;AACtCC,UAAW;AACTC,SAAUZ,MAAMa,SAAN,CAAgBC,IADjB;AAETC,UAAWf,MAAMa,SAAN,CAAgBG,MAFlB;AAGTC,KAAMjB,MAAMa,SAAN,CAAgBK,KAHb;AAITC,gBAAiBnB,MAAMa,SAAN,CAAgBO,MAJxB;AAKTC,gBAAiBrB,MAAMa,SAAN,CAAgBO,MALxB;AAMTE,kBAAmBtB,MAAMa,SAAN,CAAgBO,MAN1B;AAOTG,SAAUhB,cAAciB,KAPf;AAQTC,UAAWzB,MAAMa,SAAN,CAAgBC,IARlB;AASTY,eAAgBnB,cAAciB,KATrB,CAD2B;;AAYtCG,aAAc;AACZC,MAAO5B,MAAMa,SAAN,CAAgBgB,MADX,CAZwB;;;AAgBtCC,eAhBsC,2BAgBpB;AAChB,MAAO;AACLT,gBAAiB,mBAASU,wBADrB;AAELT,kBAAmB,mBAASU,kBAFvB;AAGLb,gBAAiB,IAHZ,CAAP;;AAKD,CAtB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C,QAAD,CAAU,IAAV,EAAe,MAAO,CAACsB,iBAAD,CAAoB,CAAEM,SAAF,CAApB,CAA+B,KAAKpB,KAAL,CAAWjB,cAA1C,CAAtB,EANF,CADF;;;AAUD,CArFqC,CAAlB,CAAtB;;;;AAyFA,GAAM2C,WAAY,yCAAa,0BAAb,CAAyC,EAAzC,CAA6CC,oBAA7C,EAAmE7D,aAAnE,CAAlB,C;;AAEeA,a,CAAb4D,S","file":"DefaultTabBar.js","sourcesContent":["const React = require('react');\nconst ReactNative = require('react-native');\nimport { connectStyle, StyleProvider } from 'native-base-shoutem-theme';\nimport variable from './../../theme/variables/platform';\nimport { TabHeading, Text, TabContainer } from './../../index';\nimport _ from 'lodash';\n\nconst {\n StyleSheet,\n View,\n Animated,\n Platform,\n ViewPropTypes\n} = ReactNative;\nconst Button = require('./Button');\n\nconst DefaultTabBar = React.createClass({\n propTypes: {\n goToPage: React.PropTypes.func,\n activeTab: React.PropTypes.number,\n tabs: React.PropTypes.array,\n backgroundColor: React.PropTypes.string,\n activeTextColor: React.PropTypes.string,\n inactiveTextColor: React.PropTypes.string,\n tabStyle: ViewPropTypes.style,\n renderTab: React.PropTypes.func,\n underlineStyle: ViewPropTypes.style,\n },\n contextTypes: {\n theme: React.PropTypes.object,\n },\n\n getDefaultProps() {\n return {\n activeTextColor: variable.topTabBarActiveTextColor,\n inactiveTextColor: variable.topTabBarTextColor,\n backgroundColor: null,\n };\n },\n\n renderTabOption(name, page) {\n },\n\n renderTab(name, page, isTabActive, onPressHandler, tabStyle, activeTabStyle, textStyle, activeTextStyle, tabHeaderStyle) {\n const headerContent = (typeof name !== 'string') ? name.props.children : undefined;\n const { activeTextColor, inactiveTextColor } = this.props;\n const textColor = isTabActive ? activeTextColor : inactiveTextColor;\n const fontWeight = isTabActive ? 'bold' : 'normal';\n if (typeof name === 'string') {\n return onPressHandler(page)}\n >\n \n \n {name}\n \n \n ;\n }\n else {\n return onPressHandler(page)}\n >\n \n {headerContent}\n \n \n }\n },\n\n render() {\n const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable;\n const platformStyle = variables.platformStyle;\n const containerWidth = this.props.containerWidth;\n const numberOfTabs = this.props.tabs.length;\n const tabUnderlineStyle = {\n position: 'absolute',\n width: containerWidth / numberOfTabs,\n height: 4,\n backgroundColor: variables.topTabBarActiveBorderColor,\n bottom: 0,\n };\n\n\n const left = this.props.scrollValue.interpolate({\n inputRange: [0, 1,], outputRange: [0, containerWidth / numberOfTabs,],\n });\n return (\n \n {this.props.tabs.map((name, page) => {\n const isTabActive = this.props.activeTab === page;\n const renderTab = this.props.renderTab || this.renderTab;\n return renderTab(name, page, isTabActive, this.props.goToPage, this.props.tabStyle[page], this.props.activeTabStyle[page], this.props.textStyle[page], this.props.activeTextStyle[page], this.props.tabHeaderStyle[page]);\n })}\n \n \n );\n },\n});\n\n// module.exports = DefaultTabBar;\nconst StyledTab = connectStyle('NativeBase.DefaultTabBar', {}, mapPropsToStyleNames)(DefaultTabBar);\nexport {\n StyledTab as DefaultTabBar,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/DefaultTabBar.js"],"names":["React","require","ReactNative","StyleSheet","View","Animated","Platform","ViewPropTypes","Button","DefaultTabBar","createClass","propTypes","goToPage","PropTypes","func","activeTab","number","tabs","array","backgroundColor","string","activeTextColor","inactiveTextColor","tabStyle","style","renderTab","underlineStyle","contextTypes","theme","object","getDefaultProps","topTabBarActiveTextColor","topTabBarTextColor","renderTabOption","name","page","isTabActive","onPressHandler","activeTabStyle","textStyle","activeTextStyle","tabHeaderStyle","headerContent","props","children","undefined","textColor","fontWeight","flex","random","render","variables","context","platformStyle","containerWidth","numberOfTabs","length","tabUnderlineStyle","position","width","height","topTabBarActiveBorderColor","bottom","left","scrollValue","interpolate","inputRange","outputRange","map","StyledTab","mapPropsToStyleNames"],"mappings":";;AAEA;AACA,0D;AACA;AACA,8B,gIALA,GAAMA,OAAQC,QAAQ,OAAR,CAAd,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AAQ,CALgB,CAA1B;;;AAQA,GAAMC,MAAO,KAAKpB,KAAL,CAAWqB,WAAX,CAAuBC,WAAvB,CAAmC;AAC9CC,WAAY,CAAC,CAAD,CAAI,CAAJ,CADkC;AAE9CC,YAAa,CAAC,CAAD,CAAIb,eAAiBC,YAArB,CAFiC,CAAnC,CAAb;;AAIA;AACE;AACG,KAAKZ,KAAL,CAAW1B,IAAX,CAAgBmD,GAAhB,CAAoB,SAAClC,IAAD,CAAOC,IAAP,CAAgB;AACnC,GAAMC,aAAc,MAAKO,KAAL,CAAW5B,SAAX,GAAyBoB,IAA7C;AACA,GAAMV,WAAY,MAAKkB,KAAL,CAAWlB,SAAX,EAAwB,MAAKA,SAA/C;AACA,MAAOA;AACLS,IADK;AAELC,IAFK;AAGLC,WAHK;AAIL,MAAKO,KAAL,CAAW/B,QAJN;AAKL,MAAK+B,KAAL,CAAWpB,QAAX,CAAoBY,IAApB,CALK;AAML,MAAKQ,KAAL,CAAWL,cAAX,CAA0BH,IAA1B,CANK;AAOL,MAAKQ,KAAL,CAAWJ,SAAX,CAAqBJ,IAArB,CAPK;AAQL,MAAKQ,KAAL,CAAWH,eAAX,CAA2BL,IAA3B,CARK;AASL,MAAKQ,KAAL,CAAWF,cAAX,CAA0BN,IAA1B,CATK,CAAP;;AAWD,CAdA,CADH;AAgBE,oBAAC,QAAD,CAAU,IAAV;AACE,MAAO,CAACsB,iBAAD,CAAoB,CAAEM,SAAF,CAApB,CAA8B,KAAKpB,KAAL,CAAWjB,cAAzC,CADT,kDAhBF,CADF;;;;AAsBD,CApHqC,CAAlB,CAAtB;;;;AAwHA,GAAM2C,WAAY;AAChB,0BADgB;AAEhB,EAFgB;AAGhBC,oBAHgB;AAIhB7D,aAJgB,CAAlB,C;AAKsBA,a,CAAb4D,S","file":"DefaultTabBar.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nimport { connectStyle, StyleProvider } from \"native-base-shoutem-theme\";\nimport variable from \"./../../theme/variables/platform\";\nimport { TabHeading, Text, TabContainer } from \"./../../index\";\nimport _ from \"lodash\";\n\nconst { StyleSheet, View, Animated, Platform, ViewPropTypes } = ReactNative;\nconst Button = require(\"./Button\");\n\nconst DefaultTabBar = React.createClass({\n propTypes: {\n goToPage: React.PropTypes.func,\n activeTab: React.PropTypes.number,\n tabs: React.PropTypes.array,\n backgroundColor: React.PropTypes.string,\n activeTextColor: React.PropTypes.string,\n inactiveTextColor: React.PropTypes.string,\n tabStyle: ViewPropTypes.style,\n renderTab: React.PropTypes.func,\n underlineStyle: ViewPropTypes.style\n },\n contextTypes: {\n theme: React.PropTypes.object\n },\n\n getDefaultProps() {\n return {\n activeTextColor: variable.topTabBarActiveTextColor,\n inactiveTextColor: variable.topTabBarTextColor,\n backgroundColor: null\n };\n },\n\n renderTabOption(name, page) {},\n\n renderTab(\n name,\n page,\n isTabActive,\n onPressHandler,\n tabStyle,\n activeTabStyle,\n textStyle,\n activeTextStyle,\n tabHeaderStyle\n ) {\n const headerContent = typeof name !== \"string\"\n ? name.props.children\n : undefined;\n const { activeTextColor, inactiveTextColor } = this.props;\n const textColor = isTabActive ? activeTextColor : inactiveTextColor;\n const fontWeight = isTabActive ? \"bold\" : \"normal\";\n if (typeof name === \"string\") {\n return (\n onPressHandler(page)}\n >\n \n \n {name}\n \n \n \n );\n } else {\n return (\n onPressHandler(page)}\n >\n \n {headerContent}\n \n \n );\n }\n },\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 const containerWidth = this.props.containerWidth;\n const numberOfTabs = this.props.tabs.length;\n const tabUnderlineStyle = {\n position: \"absolute\",\n width: containerWidth / numberOfTabs,\n height: 4,\n backgroundColor: variables.topTabBarActiveBorderColor,\n bottom: 0\n };\n\n const left = this.props.scrollValue.interpolate({\n inputRange: [0, 1],\n outputRange: [0, containerWidth / numberOfTabs]\n });\n return (\n \n {this.props.tabs.map((name, page) => {\n const isTabActive = this.props.activeTab === page;\n const renderTab = this.props.renderTab || this.renderTab;\n return renderTab(\n name,\n page,\n isTabActive,\n this.props.goToPage,\n this.props.tabStyle[page],\n this.props.activeTabStyle[page],\n this.props.textStyle[page],\n this.props.activeTextStyle[page],\n this.props.tabHeaderStyle[page]\n );\n })}\n \n \n );\n }\n});\n\n// module.exports = DefaultTabBar;\nconst StyledTab = connectStyle(\n \"NativeBase.DefaultTabBar\",\n {},\n mapPropsToStyleNames\n)(DefaultTabBar);\nexport { StyledTab as DefaultTabBar };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/SceneComponent.js b/dist/src/basic/Tabs/SceneComponent.js index ea32c9f5e..e13ba208c 100644 --- a/dist/src/basic/Tabs/SceneComponent.js +++ b/dist/src/basic/Tabs/SceneComponent.js @@ -1,15 +1,17 @@ -function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}var React=require('react'); -var ReactNative=require('react-native');var +var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}var React=require("react"); +var ReactNative=require("react-native");var Component=React.Component;var View=ReactNative.View,StyleSheet=ReactNative.StyleSheet; -var StaticContainer=require('./StaticContainer'); +var StaticContainer=require("./StaticContainer"); var SceneComponent=function SceneComponent(Props){var -shouldUpdated=Props.shouldUpdated,props=_objectWithoutProperties(Props,['shouldUpdated']); -return React.createElement(View,props, -React.createElement(StaticContainer,{shouldUpdate:shouldUpdated}, -props.children)); +shouldUpdated=Props.shouldUpdated,props=_objectWithoutProperties(Props,["shouldUpdated"]); +return( +React.createElement(View,_extends({},props,{__source:{fileName:_jsxFileName,lineNumber:11}}), +React.createElement(StaticContainer,{shouldUpdate:shouldUpdated,__source:{fileName:_jsxFileName,lineNumber:12}}, +props.children))); + }; diff --git a/dist/src/basic/Tabs/SceneComponent.js.map b/dist/src/basic/Tabs/SceneComponent.js.map index 8d5e52b75..51f65ba5f 100644 --- a/dist/src/basic/Tabs/SceneComponent.js.map +++ b/dist/src/basic/Tabs/SceneComponent.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/basic/Tabs/SceneComponent.js"],"names":["React","require","ReactNative","Component","View","StyleSheet","StaticContainer","SceneComponent","Props","shouldUpdated","props","children","module","exports"],"mappings":"qMAAA,GAAMA,OAAQC,QAAQ,OAAR,CAAd;AACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;AACQE,S,CAAeH,K,CAAfG,S;AACAC,I,CAAsBF,W,CAAtBE,I,CAAMC,U,CAAgBH,W,CAAhBG,U;;AAEd,GAAMC,iBAAkBL,QAAQ,mBAAR,CAAxB;;AAEA,GAAMM,gBAAiB,QAAjBA,eAAiB,CAACC,KAAD,CAAW;AACxBC,aADwB,CACKD,KADL,CACxBC,aADwB,CACNC,KADM,0BACKF,KADL;AAEhC,MAAO,qBAAC,IAAD,CAAUE,KAAV;AACL,oBAAC,eAAD,EAAiB,aAAcD,aAA/B;AACGC,MAAMC,QADT,CADK,CAAP;;;AAKD,CAPD;;AASAC,OAAOC,OAAP,CAAiBN,cAAjB","file":"SceneComponent.js","sourcesContent":["const React = require('react');\nconst ReactNative = require('react-native');\nconst { Component, } = React;\nconst { View, StyleSheet, } = ReactNative;\n\nconst StaticContainer = require('./StaticContainer');\n\nconst SceneComponent = (Props) => {\n const { shouldUpdated, ...props, } = Props;\n return \n \n {props.children}\n \n ;\n};\n\nmodule.exports = SceneComponent;\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/SceneComponent.js"],"names":["React","require","ReactNative","Component","View","StyleSheet","StaticContainer","SceneComponent","shouldUpdated","Props","props","children","module","exports"],"mappings":"ydAAA,GAAMA,OAAQC,QAAQ,OAAR,CAAd;AACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;AACQE,S,CAAcH,K,CAAdG,S;AACAC,I,CAAqBF,W,CAArBE,I,CAAMC,U,CAAeH,W,CAAfG,U;;AAEd,GAAMC,iBAAkBL,QAAQ,mBAAR,CAAxB;;AAEA,GAAMM,gBAAiB,QAAjBA,eAAiB,OAAS;AACtBC,aADsB,CACMC,KADN,CACtBD,aADsB,CACJE,KADI,0BACMD,KADN;AAE9B;AACE,oBAAC,IAAD,aAAUC,KAAV;AACE,oBAAC,eAAD,EAAiB,aAAcF,aAA/B;AACGE,MAAMC,QADT,CADF,CADF;;;;AAOD,CATD;;AAWAC,OAAOC,OAAP,CAAiBN,cAAjB","file":"SceneComponent.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nconst { Component } = React;\nconst { View, StyleSheet } = ReactNative;\n\nconst StaticContainer = require(\"./StaticContainer\");\n\nconst SceneComponent = Props => {\n const { shouldUpdated, ...props } = Props;\n return (\n \n \n {props.children}\n \n \n );\n};\n\nmodule.exports = SceneComponent;\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/ScrollableTabBar.js b/dist/src/basic/Tabs/ScrollableTabBar.js index 754f7c257..7d6b9cb41 100644 --- a/dist/src/basic/Tabs/ScrollableTabBar.js +++ b/dist/src/basic/Tabs/ScrollableTabBar.js @@ -1,9 +1,9 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ScrollableTab=undefined; +Object.defineProperty(exports,"__esModule",{value:true});exports.ScrollableTab=undefined;var _jsxFileName="src/basic/Tabs/ScrollableTabBar.js"; -var _nativeBaseShoutemTheme=require('native-base-shoutem-theme'); -var _platform=require('./../../theme/variables/platform');var _platform2=_interopRequireDefault(_platform); -var _index=require('./../../index'); -var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var React=require('react');var ReactNative=require('react-native');var +var _nativeBaseShoutemTheme=require("native-base-shoutem-theme"); +var _platform=require("./../../theme/variables/platform");var _platform2=_interopRequireDefault(_platform); +var _index=require("./../../index"); +var _lodash=require("lodash");var _lodash2=_interopRequireDefault(_lodash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var React=require("react");var ReactNative=require("react-native");var View= @@ -13,11 +13,11 @@ View= ReactNative.View,Animated=ReactNative.Animated,StyleSheet=ReactNative.StyleSheet,ScrollView=ReactNative.ScrollView,Platform=ReactNative.Platform,Dimensions=ReactNative.Dimensions,ViewPropTypes=ReactNative.ViewPropTypes; -var Button=require('./Button'); +var Button=require("./Button"); -var WINDOW_WIDTH=Dimensions.get('window').width; +var WINDOW_WIDTH=Dimensions.get("window").width; -var ScrollableTabBar=React.createClass({displayName:'ScrollableTabBar', +var ScrollableTabBar=React.createClass({displayName:"ScrollableTabBar", propTypes:{ goToPage:React.PropTypes.func, activeTab:React.PropTypes.number, @@ -40,8 +40,8 @@ theme:React.PropTypes.object}, getDefaultProps:function getDefaultProps(){ return{ scrollOffset:52, -activeTextColor:'navy', -inactiveTextColor:'black', +activeTextColor:"navy", +inactiveTextColor:"black", backgroundColor:null, style:{}, tabStyle:{}, @@ -73,40 +73,55 @@ if(tabCount===0||offset.value<0||offset.value>lastTabPosition){ return; } -if(this.necessarilyMeasurementsCompleted(position,position===lastTabPosition)){ +if( +this.necessarilyMeasurementsCompleted( +position, +position===lastTabPosition)) + +{ this.updateTabPanel(position,pageOffset); this.updateTabUnderline(position,pageOffset,tabCount); } }, necessarilyMeasurementsCompleted:function necessarilyMeasurementsCompleted(position,isLastTab){ -return this._tabsMeasurements[position]&&( +return( +this._tabsMeasurements[position]&&( isLastTab||this._tabsMeasurements[position+1])&& this._tabContainerMeasurements&& -this._containerMeasurements; +this._containerMeasurements); + }, updateTabPanel:function updateTabPanel(position,pageOffset){ var containerWidth=this._containerMeasurements.width; var tabWidth=this._tabsMeasurements[position].width; var nextTabMeasurements=this._tabsMeasurements[position+1]; -var nextTabWidth=nextTabMeasurements&&nextTabMeasurements.width||0; +var nextTabWidth= +nextTabMeasurements&&nextTabMeasurements.width||0; var tabOffset=this._tabsMeasurements[position].left; var absolutePageOffset=pageOffset*tabWidth; var newScrollX=tabOffset+absolutePageOffset; -newScrollX-=(containerWidth-(1-pageOffset)*tabWidth-pageOffset*nextTabWidth)/2; +newScrollX-= +(containerWidth- +(1-pageOffset)*tabWidth- +pageOffset*nextTabWidth)/ +2; newScrollX=newScrollX>=0?newScrollX:0; -if(Platform.OS==='android'){ +if(Platform.OS==="android"){ this._scrollView.scrollTo({x:newScrollX,y:0,animated:false}); }else{ -var rightBoundScroll=this._tabContainerMeasurements.width-this._containerMeasurements.width; -newScrollX=newScrollX>rightBoundScroll?rightBoundScroll:newScrollX; +var rightBoundScroll= +this._tabContainerMeasurements.width- +this._containerMeasurements.width; +newScrollX=newScrollX>rightBoundScroll? +rightBoundScroll: +newScrollX; this._scrollView.scrollTo({x:newScrollX,y:0,animated:false}); } - }, updateTabUnderline:function updateTabUnderline(position,pageOffset,tabCount){ @@ -117,8 +132,10 @@ if(position lastTabPosition) {\n return;\n }\n\n if (this.necessarilyMeasurementsCompleted(position, position === lastTabPosition)) {\n this.updateTabPanel(position, pageOffset);\n this.updateTabUnderline(position, pageOffset, tabCount);\n }\n },\n\n necessarilyMeasurementsCompleted(position, isLastTab) {\n return this._tabsMeasurements[position] &&\n (isLastTab || this._tabsMeasurements[position + 1]) &&\n this._tabContainerMeasurements &&\n this._containerMeasurements;\n },\n\n updateTabPanel(position, pageOffset) {\n const containerWidth = this._containerMeasurements.width;\n const tabWidth = this._tabsMeasurements[position].width;\n const nextTabMeasurements = this._tabsMeasurements[position + 1];\n const nextTabWidth = nextTabMeasurements && nextTabMeasurements.width || 0;\n const tabOffset = this._tabsMeasurements[position].left;\n const absolutePageOffset = pageOffset * tabWidth;\n let newScrollX = tabOffset + absolutePageOffset;\n\n // center tab and smooth tab change (for when tabWidth changes a lot between two tabs)\n newScrollX -= (containerWidth - (1 - pageOffset) * tabWidth - pageOffset * nextTabWidth) / 2;\n newScrollX = newScrollX >= 0 ? newScrollX : 0;\n\n if (Platform.OS === 'android') {\n this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false, });\n } else {\n const rightBoundScroll = this._tabContainerMeasurements.width - (this._containerMeasurements.width);\n newScrollX = newScrollX > rightBoundScroll ? rightBoundScroll : newScrollX;\n this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false, });\n }\n\n },\n\n updateTabUnderline(position, pageOffset, tabCount) {\n const lineLeft = this._tabsMeasurements[position].left;\n const lineRight = this._tabsMeasurements[position].right;\n\n if (position < tabCount - 1) {\n const nextTabLeft = this._tabsMeasurements[position + 1].left;\n const nextTabRight = this._tabsMeasurements[position + 1].right;\n\n const newLineLeft = (pageOffset * nextTabLeft + (1 - pageOffset) * lineLeft);\n const newLineRight = (pageOffset * nextTabRight + (1 - pageOffset) * lineRight);\n\n this.state._leftTabUnderline.setValue(newLineLeft);\n this.state._widthTabUnderline.setValue(newLineRight - newLineLeft);\n } else {\n this.state._leftTabUnderline.setValue(lineLeft);\n this.state._widthTabUnderline.setValue(lineRight - lineLeft);\n }\n },\n\n renderTab(name, page, isTabActive, onPressHandler, onLayoutHandler, tabStyle, activeTabStyle, textStyle, activeTextStyle, tabHeaderStyle) {\n const headerContent = (typeof name !== 'string') ? name.props.children : undefined;\n const { activeTextColor, inactiveTextColor } = this.props;\n const textColor = isTabActive ? activeTextColor : inactiveTextColor;\n const fontWeight = isTabActive ? 'bold' : 'normal';\n\n if (typeof name === 'string') {\n return onPressHandler(page)}\n onLayout={onLayoutHandler}\n >\n \n \n {name}\n \n \n ;\n }\n else {\n return onPressHandler(page)}\n >\n \n {headerContent}\n \n \n }\n },\n\n measureTab(page, event) {\n const { x, width, height, } = event.nativeEvent.layout;\n this._tabsMeasurements[page] = { left: x, right: x + width, width, height, };\n this.updateView({ value: this.props.scrollValue._value, });\n },\n\n render() {\n const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable;\n const tabUnderlineStyle = {\n position: 'absolute',\n height: 4,\n backgroundColor: variables.topTabBarActiveBorderColor,\n bottom: 0\n };\n\n const dynamicTabUnderline = {\n left: this.state._leftTabUnderline,\n width: this.state._widthTabUnderline,\n };\n\n return \n { this._scrollView = scrollView; }}\n horizontal={true}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n directionalLockEnabled={true}\n onScroll={this.props.onScroll}\n bounces={false}\n scrollsToTop={false}\n >\n \n {this.props.tabs.map((name, page) => {\n const isTabActive = this.props.activeTab === page;\n const renderTab = this.props.renderTab || this.renderTab;\n return renderTab(name, page, isTabActive, this.props.goToPage, this.measureTab.bind(this, page), this.props.tabStyle[page], this.props.activeTabStyle[page], this.props.textStyle[page], this.props.activeTextStyle[page], this.props.tabHeaderStyle[page]);\n })}\n \n \n \n
;\n },\n\n componentWillReceiveProps(nextProps) {\n // If the tabs change, force the width of the tabs container to be recalculated\n if (!_.isEqual(this.props.tabs, nextProps.tabs) && this.state._containerWidth) {\n this.setState({ _containerWidth: null, });\n }\n },\n\n onTabContainerLayout(e) {\n this._tabContainerMeasurements = e.nativeEvent.layout;\n let width = this._tabContainerMeasurements.width;\n if (width < WINDOW_WIDTH) {\n width = WINDOW_WIDTH;\n }\n this.setState({ _containerWidth: width, });\n this.updateView({ value: this.props.scrollValue._value, });\n },\n\n onContainerLayout(e) {\n this._containerMeasurements = e.nativeEvent.layout;\n this.updateView({ value: this.props.scrollValue._value, });\n },\n});\n\n// module.exports = ScrollableTabBar;\nconst StyledTab = connectStyle('NativeBase.ScrollableTab', {}, mapPropsToStyleNames)(ScrollableTabBar);\nexport {\n StyledTab as ScrollableTab,\n};\nconst styles = StyleSheet.create({\n tab: {\n height: 49,\n alignItems: 'center',\n justifyContent: 'center',\n paddingLeft: 20,\n paddingRight: 20,\n },\n container: {\n height: 50,\n borderWidth: 1,\n borderTopWidth: 0,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n borderColor: '#ccc',\n },\n tabs: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n },\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/ScrollableTabBar.js"],"names":["React","require","ReactNative","View","Animated","StyleSheet","ScrollView","Platform","Dimensions","ViewPropTypes","Button","WINDOW_WIDTH","get","width","ScrollableTabBar","createClass","propTypes","goToPage","PropTypes","func","activeTab","number","tabs","array","backgroundColor","string","activeTextColor","inactiveTextColor","scrollOffset","style","tabStyle","tabsContainerStyle","renderTab","underlineStyle","onScroll","contextTypes","theme","object","getDefaultProps","getInitialState","_tabsMeasurements","_leftTabUnderline","Value","_widthTabUnderline","_containerWidth","componentDidMount","props","scrollValue","addListener","updateView","offset","position","Math","floor","value","pageOffset","tabCount","length","lastTabPosition","necessarilyMeasurementsCompleted","updateTabPanel","updateTabUnderline","isLastTab","_tabContainerMeasurements","_containerMeasurements","containerWidth","tabWidth","nextTabMeasurements","nextTabWidth","tabOffset","left","absolutePageOffset","newScrollX","OS","_scrollView","scrollTo","x","y","animated","rightBoundScroll","lineLeft","lineRight","right","nextTabLeft","nextTabRight","newLineLeft","newLineRight","state","setValue","name","page","isTabActive","onPressHandler","onLayoutHandler","activeTabStyle","textStyle","activeTextStyle","tabHeaderStyle","headerContent","children","undefined","textColor","fontWeight","random","measureTab","event","nativeEvent","layout","height","_value","render","variables","context","tabUnderlineStyle","topTabBarActiveBorderColor","bottom","dynamicTabUnderline","styles","container","onContainerLayout","scrollView","onTabContainerLayout","map","bind","componentWillReceiveProps","nextProps","isEqual","setState","e","StyledTab","mapPropsToStyleNames","ScrollableTab","create","tab","alignItems","justifyContent","paddingLeft","paddingRight","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderColor","flexDirection"],"mappings":";;AAEA;AACA,0D;AACA;AACA,8B,gIALA,GAAMA,OAAQC,QAAQ,OAAR,CAAd,CACA,GAAMC,aAAcD,QAAQ,cAAR,CAApB,C;;AAMEE,I;;;;;;;AAOED,W,CAPFC,I,CACAC,Q,CAMEF,W,CANFE,Q,CACAC,U,CAKEH,W,CALFG,U,CACAC,U,CAIEJ,W,CA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C,aAAc,EALX,CAD0B;;AAQ/BnB,UAAW;AACTV,OAAQ,EADC;AAET8B,YAAa,CAFJ;AAGTC,eAAgB,CAHP;AAITC,gBAAiB,CAJR;AAKTC,iBAAkB,CALT;AAMTC,YAAa,MANJ,CARoB;;AAgB/BxH,KAAM;AACJyH,cAAe,KADX;AAEJR,eAAgB,cAFZ,CAhByB,CAAlB,CAAf","file":"ScrollableTabBar.js","sourcesContent":["const React = require(\"react\");\nconst ReactNative = require(\"react-native\");\nimport { connectStyle, StyleProvider } from \"native-base-shoutem-theme\";\nimport variable from \"./../../theme/variables/platform\";\nimport { TabHeading, Text, TabContainer } from \"./../../index\";\nimport _ from \"lodash\";\nconst {\n View,\n Animated,\n StyleSheet,\n ScrollView,\n Platform,\n Dimensions,\n ViewPropTypes\n} = ReactNative;\nconst Button = require(\"./Button\");\n\nconst WINDOW_WIDTH = Dimensions.get(\"window\").width;\n\nconst ScrollableTabBar = React.createClass({\n propTypes: {\n goToPage: React.PropTypes.func,\n activeTab: React.PropTypes.number,\n tabs: React.PropTypes.array,\n backgroundColor: React.PropTypes.string,\n activeTextColor: React.PropTypes.string,\n inactiveTextColor: React.PropTypes.string,\n scrollOffset: React.PropTypes.number,\n style: ViewPropTypes.style,\n tabStyle: ViewPropTypes.style,\n tabsContainerStyle: ViewPropTypes.style,\n renderTab: React.PropTypes.func,\n underlineStyle: ViewPropTypes.style,\n onScroll: React.PropTypes.func\n },\n contextTypes: {\n theme: React.PropTypes.object\n },\n\n getDefaultProps() {\n return {\n scrollOffset: 52,\n activeTextColor: \"navy\",\n inactiveTextColor: \"black\",\n backgroundColor: null,\n style: {},\n tabStyle: {},\n tabsContainerStyle: {},\n underlineStyle: {}\n };\n },\n\n getInitialState() {\n this._tabsMeasurements = [];\n return {\n _leftTabUnderline: new Animated.Value(0),\n _widthTabUnderline: new Animated.Value(0),\n _containerWidth: null\n };\n },\n\n componentDidMount() {\n this.props.scrollValue.addListener(this.updateView);\n },\n\n updateView(offset) {\n const position = Math.floor(offset.value);\n const pageOffset = offset.value % 1;\n const tabCount = this.props.tabs.length;\n const lastTabPosition = tabCount - 1;\n\n if (tabCount === 0 || offset.value < 0 || offset.value > lastTabPosition) {\n return;\n }\n\n if (\n this.necessarilyMeasurementsCompleted(\n position,\n position === lastTabPosition\n )\n ) {\n this.updateTabPanel(position, pageOffset);\n this.updateTabUnderline(position, pageOffset, tabCount);\n }\n },\n\n necessarilyMeasurementsCompleted(position, isLastTab) {\n return (\n this._tabsMeasurements[position] &&\n (isLastTab || this._tabsMeasurements[position + 1]) &&\n this._tabContainerMeasurements &&\n this._containerMeasurements\n );\n },\n\n updateTabPanel(position, pageOffset) {\n const containerWidth = this._containerMeasurements.width;\n const tabWidth = this._tabsMeasurements[position].width;\n const nextTabMeasurements = this._tabsMeasurements[position + 1];\n const nextTabWidth =\n (nextTabMeasurements && nextTabMeasurements.width) || 0;\n const tabOffset = this._tabsMeasurements[position].left;\n const absolutePageOffset = pageOffset * tabWidth;\n let newScrollX = tabOffset + absolutePageOffset;\n\n // center tab and smooth tab change (for when tabWidth changes a lot between two tabs)\n newScrollX -=\n (containerWidth -\n (1 - pageOffset) * tabWidth -\n pageOffset * nextTabWidth) /\n 2;\n newScrollX = newScrollX >= 0 ? newScrollX : 0;\n\n if (Platform.OS === \"android\") {\n this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false });\n } else {\n const rightBoundScroll =\n this._tabContainerMeasurements.width -\n this._containerMeasurements.width;\n newScrollX = newScrollX > rightBoundScroll\n ? rightBoundScroll\n : newScrollX;\n this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false });\n }\n },\n\n updateTabUnderline(position, pageOffset, tabCount) {\n const lineLeft = this._tabsMeasurements[position].left;\n const lineRight = this._tabsMeasurements[position].right;\n\n if (position < tabCount - 1) {\n const nextTabLeft = this._tabsMeasurements[position + 1].left;\n const nextTabRight = this._tabsMeasurements[position + 1].right;\n\n const newLineLeft =\n pageOffset * nextTabLeft + (1 - pageOffset) * lineLeft;\n const newLineRight =\n pageOffset * nextTabRight + (1 - pageOffset) * lineRight;\n\n this.state._leftTabUnderline.setValue(newLineLeft);\n this.state._widthTabUnderline.setValue(newLineRight - newLineLeft);\n } else {\n this.state._leftTabUnderline.setValue(lineLeft);\n this.state._widthTabUnderline.setValue(lineRight - lineLeft);\n }\n },\n\n renderTab(\n name,\n page,\n isTabActive,\n onPressHandler,\n onLayoutHandler,\n tabStyle,\n activeTabStyle,\n textStyle,\n activeTextStyle,\n tabHeaderStyle\n ) {\n const headerContent = typeof name !== \"string\"\n ? name.props.children\n : undefined;\n const { activeTextColor, inactiveTextColor } = this.props;\n const textColor = isTabActive ? activeTextColor : inactiveTextColor;\n const fontWeight = isTabActive ? \"bold\" : \"normal\";\n\n if (typeof name === \"string\") {\n return (\n onPressHandler(page)}\n onLayout={onLayoutHandler}\n >\n \n \n {name}\n \n \n \n );\n } else {\n return (\n \n );\n }\n },\n\n measureTab(page, event) {\n const { x, width, height } = event.nativeEvent.layout;\n this._tabsMeasurements[page] = { left: x, right: x + width, width, height };\n this.updateView({ value: this.props.scrollValue._value });\n },\n\n render() {\n const variables = this.context.theme\n ? this.context.theme[\"@@shoutem.theme/themeStyle\"].variables\n : variable;\n const tabUnderlineStyle = {\n position: \"absolute\",\n height: 4,\n backgroundColor: variables.topTabBarActiveBorderColor,\n bottom: 0\n };\n\n const dynamicTabUnderline = {\n left: this.state._leftTabUnderline,\n width: this.state._widthTabUnderline\n };\n\n return (\n \n {\n this._scrollView = scrollView;\n }}\n horizontal={true}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n directionalLockEnabled={true}\n onScroll={this.props.onScroll}\n bounces={false}\n scrollsToTop={false}\n >\n \n {this.props.tabs.map((name, page) => {\n const isTabActive = this.props.activeTab === page;\n const renderTab = this.props.renderTab || this.renderTab;\n return renderTab(\n name,\n page,\n isTabActive,\n this.props.goToPage,\n this.measureTab.bind(this, page),\n this.props.tabStyle[page],\n this.props.activeTabStyle[page],\n this.props.textStyle[page],\n this.props.activeTextStyle[page],\n this.props.tabHeaderStyle[page]\n );\n })}\n \n
\n \n \n );\n },\n\n componentWillReceiveProps(nextProps) {\n // If the tabs change, force the width of the tabs container to be recalculated\n if (\n !_.isEqual(this.props.tabs, nextProps.tabs) &&\n this.state._containerWidth\n ) {\n this.setState({ _containerWidth: null });\n }\n },\n\n onTabContainerLayout(e) {\n this._tabContainerMeasurements = e.nativeEvent.layout;\n let width = this._tabContainerMeasurements.width;\n if (width < WINDOW_WIDTH) {\n width = WINDOW_WIDTH;\n }\n this.setState({ _containerWidth: width });\n this.updateView({ value: this.props.scrollValue._value });\n },\n\n onContainerLayout(e) {\n this._containerMeasurements = e.nativeEvent.layout;\n this.updateView({ value: this.props.scrollValue._value });\n }\n});\n\n// module.exports = ScrollableTabBar;\nconst StyledTab = connectStyle(\n \"NativeBase.ScrollableTab\",\n {},\n mapPropsToStyleNames\n)(ScrollableTabBar);\nexport { StyledTab as ScrollableTab };\nconst styles = StyleSheet.create({\n tab: {\n height: 49,\n alignItems: \"center\",\n justifyContent: \"center\",\n paddingLeft: 20,\n paddingRight: 20\n },\n container: {\n height: 50,\n borderWidth: 1,\n borderTopWidth: 0,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n borderColor: \"#ccc\"\n },\n tabs: {\n flexDirection: \"row\",\n justifyContent: \"space-around\"\n }\n});\n"]} \ No newline at end of file diff --git a/dist/src/basic/Tabs/StaticContainer.js b/dist/src/basic/Tabs/StaticContainer.js index c41be4b9e..a3b1dba74 100644 --- a/dist/src/basic/Tabs/StaticContainer.js +++ b/dist/src/basic/Tabs/StaticContainer.js @@ -1,10 +1,9 @@ -var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0&&props.page!==this.state.currentPage){ @@ -91,7 +95,11 @@ this.goToPage(props.page); goToPage:function goToPage(pageNumber){ var offset=pageNumber*this.state.containerWidth; if(this.scrollView){ -this.scrollView.scrollTo({x:offset,y:0,animated:!this.props.scrollWithoutAnimation}); +this.scrollView.scrollTo({ +x:offset, +y:0, +animated:!this.props.scrollWithoutAnimation}); + } var currentPage=this.state.currentPage; @@ -107,21 +115,35 @@ return null; }else if(this.props.renderTabBar){ return React.cloneElement(this.props.renderTabBar(props),props); }else{ -return React.createElement(DefaultTabBar,props); +return React.createElement(DefaultTabBar,_extends({},props,{__source:{fileName:_jsxFileName,lineNumber:118}})); } }, -updateSceneKeys:function updateSceneKeys(_ref){var page=_ref.page,_ref$children=_ref.children,children=_ref$children===undefined?this.props.children:_ref$children,_ref$callback=_ref.callback,callback=_ref$callback===undefined?function(){}:_ref$callback; -var newKeys=this.newSceneKeys({previousKeys:this.state.sceneKeys,currentPage:page,children:children}); +updateSceneKeys:function updateSceneKeys(_ref) + + + +{var page=_ref.page,_ref$children=_ref.children,children=_ref$children===undefined?this.props.children:_ref$children,_ref$callback=_ref.callback,callback=_ref$callback===undefined?function(){}:_ref$callback; +var newKeys=this.newSceneKeys({ +previousKeys:this.state.sceneKeys, +currentPage:page, +children:children}); + this.setState({currentPage:page,sceneKeys:newKeys},callback); }, -newSceneKeys:function newSceneKeys(_ref2){var _this2=this;var _ref2$previousKeys=_ref2.previousKeys,previousKeys=_ref2$previousKeys===undefined?[]:_ref2$previousKeys,_ref2$currentPage=_ref2.currentPage,currentPage=_ref2$currentPage===undefined?0:_ref2$currentPage,_ref2$children=_ref2.children,children=_ref2$children===undefined?this.props.children:_ref2$children; +newSceneKeys:function newSceneKeys(_ref2) + + + +{var _this2=this;var _ref2$previousKeys=_ref2.previousKeys,previousKeys=_ref2$previousKeys===undefined?[]:_ref2$previousKeys,_ref2$currentPage=_ref2.currentPage,currentPage=_ref2$currentPage===undefined?0:_ref2$currentPage,_ref2$children=_ref2.children,children=_ref2$children===undefined?this.props.children:_ref2$children; var newKeys=[]; this._children(children).forEach(function(child,idx){ var key=_this2._makeSceneKey(child,idx); -if(_this2._keyExists(previousKeys,key)|| -_this2._shouldRenderSceneKey(idx,currentPage)){ +if( +_this2._keyExists(previousKeys,key)|| +_this2._shouldRenderSceneKey(idx,currentPage)) +{ newKeys.push(key); } }); @@ -130,8 +152,10 @@ return newKeys; _shouldRenderSceneKey:function _shouldRenderSceneKey(idx,currentPageKey){ var numOfSibling=this.props.prerenderingSiblingsNumber; -return idxcurrentPageKey-numOfSibling-1; +return( +idxcurrentPageKey-numOfSibling-1); + }, _keyExists:function _keyExists(sceneKeys,key){ @@ -139,17 +163,22 @@ return sceneKeys.find(function(sceneKey){return key===sceneKey;}); }, _makeSceneKey:function _makeSceneKey(child,idx){ -return child.props.heading+'_'+idx; +return child.props.heading+"_"+idx; }, renderScrollableContent:function renderScrollableContent(){var _this3=this; var scenes=this._composeScenes(); -return React.createElement(ScrollView,_extends({ +return( +React.createElement(ScrollView,_extends({ horizontal:true, pagingEnabled:true, automaticallyAdjustContentInsets:false, -contentOffset:{x:this.props.initialPage*this.state.containerWidth}, -ref:function ref(scrollView){_this3.scrollView=scrollView;}, +contentOffset:{ +x:this.props.initialPage*this.state.containerWidth}, + +ref:function ref(scrollView){ +_this3.scrollView=scrollView; +}, onScroll:function onScroll(e){ var offsetX=e.nativeEvent.contentOffset.x; _this3._updateScrollValue(offsetX/_this3.state.containerWidth); @@ -162,22 +191,30 @@ showsHorizontalScrollIndicator:false, scrollEnabled:!this.props.locked, directionalLockEnabled:true, alwaysBounceVertical:false, -keyboardDismissMode:'on-drag'}, -this.props.contentProps), +keyboardDismissMode:"on-drag"}, +this.props.contentProps,{__source:{fileName:_jsxFileName,lineNumber:172}}), + +scenes)); -scenes); }, _composeScenes:function _composeScenes(){var _this4=this; return this._children().map(function(child,idx){ var key=_this4._makeSceneKey(child,idx); -return React.createElement(SceneComponent,{ +return( +React.createElement(SceneComponent,{ key:child.key, -shouldUpdated:_this4._shouldRenderSceneKey(idx,_this4.state.currentPage), -style:{width:_this4.state.containerWidth}}, +shouldUpdated:_this4._shouldRenderSceneKey( +idx, +_this4.state.currentPage), + +style:{width:_this4.state.containerWidth},__source:{fileName:_jsxFileName,lineNumber:206}}, + +_this4._keyExists(_this4.state.sceneKeys,key)? +child: +React.createElement(View,{heading:child.props.heading,__source:{fileName:_jsxFileName,lineNumber:216}}))); -_this4._keyExists(_this4.state.sceneKeys,key)?child:React.createElement(View,{heading:child.props.heading})); }); }, @@ -192,7 +229,7 @@ this._updateSelectedPage(page); _updateSelectedPage:function _updateSelectedPage(nextPage){ var localNextPage=nextPage; -if(typeof localNextPage==='object'){ +if(typeof localNextPage==="object"){ localNextPage=nextPage.nativeEvent.position; } @@ -232,15 +269,21 @@ return React.Children.map(children,function(child){return child;}); }, render:function render(){ -var overlayTabs=this.props.tabBarPosition==='overlayTop'||this.props.tabBarPosition==='overlayBottom'; +var overlayTabs= +this.props.tabBarPosition==="overlayTop"|| +this.props.tabBarPosition==="overlayBottom"; var tabBarProps={ goToPage:this.goToPage, tabs:this._children().map(function(child){return child.props.heading;}), tabStyle:this._children().map(function(child){return child.props.tabStyle;}), activeTabStyle:this._children().map(function(child){return child.props.activeTabStyle;}), textStyle:this._children().map(function(child){return child.props.textStyle;}), -activeTextStyle:this._children().map(function(child){return child.props.activeTextStyle;}), -tabHeaderStyle:this._children().map(function(child){return _lodash2.default.get(child.props.heading.props,'style',undefined);}), +activeTextStyle:this._children().map( +function(child){return child.props.activeTextStyle;}), + +tabHeaderStyle:this._children().map(function(child){return( +_lodash2.default.get(child.props.heading.props,"style",undefined));}), + activeTab:this.state.currentPage, scrollValue:this.state.scrollValue, containerWidth:this.state.containerWidth}; @@ -263,17 +306,23 @@ tabBarProps.underlineStyle=this.props.tabBarUnderlineStyle; } if(overlayTabs){ tabBarProps.style=_defineProperty({ -position:'absolute', +position:"absolute", left:0, right:0}, -this.props.tabBarPosition==='overlayTop'?'top':'bottom',0); +this.props.tabBarPosition==="overlayTop"?"top":"bottom",0); } -return React.createElement(View,{style:[styles.container,this.props.style],onLayout:this._handleLayout}, -this.props.tabBarPosition==='top'&&this.renderTabBar(tabBarProps), +return( +React.createElement(View,{ +style:[styles.container,this.props.style], +onLayout:this._handleLayout,__source:{fileName:_jsxFileName,lineNumber:317}}, + +this.props.tabBarPosition==="top"&&this.renderTabBar(tabBarProps), this.renderScrollableContent(), -(this.props.tabBarPosition==='bottom'||overlayTabs)&&this.renderTabBar(tabBarProps)); +(this.props.tabBarPosition==="bottom"||overlayTabs)&& +this.renderTabBar(tabBarProps))); + }}); diff --git a/dist/src/basic/Tabs/index.js.map b/dist/src/basic/Tabs/index.js.map index 775ccbd58..ba9336c20 100644 --- a/dist/src/basic/Tabs/index.js.map +++ b/dist/src/basic/Tabs/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/basic/Tabs/index.js"],"names":["React","require","PropTypes","Component","ReactNative","Dimensions","View","Animated","ScrollView","StyleSheet","InteractionManager","Platform","ViewPropTypes","TimerMixin","SceneComponent","DefaultTabBar","ScrollableTabBar","ScrollableTabView","createClass","mixins","statics","propTypes","tabBarPosition","oneOf","initialPage","number","page","onChangeTab","func","onScroll","renderTabBar","any","style","contentProps","object","scrollWithoutAnimation","bool","locked","prerenderingSiblingsNumber","getDefaultProps","getInitialState","currentPage","props","scrollValue","Value","containerWidth","get","width","sceneKeys","newSceneKeys","componentDidMount","scrollFn","scrollView","OS","x","state","scrollTo","animated","setTimeout","runAfterInteractions","componentWillReceiveProps","children","updateSceneKeys","goToPage","pageNumber","offset","y","callback","_onChangeTab","bind","cloneElement","newKeys","previousKeys","setState","_children","forEach","child","idx","key","_makeSceneKey","_keyExists","_shouldRenderSceneKey","push","currentPageKey","numOfSibling","find","sceneKey","heading","renderScrollableContent","scenes","_composeScenes","e","offsetX","nativeEvent","contentOffset","_updateScrollValue","_onMomentumScrollBeginAndEnd","map","Math","round","_updateSelectedPage","nextPage","localNextPage","position","prevPage","i","ref","from","value","setValue","_handleLayout","layout","requestAnimationFrame","Children","render","overlayTabs","tabBarProps","tabs","tabStyle","activeTabStyle","textStyle","activeTextStyle","tabHeaderStyle","undefined","activeTab","tabBarBackgroundColor","backgroundColor","tabBarActiveTextColor","activeTextColor","tabBarInactiveTextColor","inactiveTextColor","tabBarTextStyle","tabBarUnderlineStyle","underlineStyle","left","right","styles","container","module","exports","create","flex","scrollableContentAndroid"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,8B,sTAjBA,GAAMA,OAAQC,QAAQ,OAAR,CAAd,C,GAEEC,U,CAEEF,K,CAFFE,S,CACAC,S,CACEH,K,CADFG,S,CAEF,GAAMC,aAAcH,QAAQ,cAAR,CAApB,C,GAEEI,W,CAQED,W,CARFC,U,CACAC,I,CAOEF,W,CAPFE,I,CACAC,Q,CAMEH,W,CANFG,Q,CACAC,U,CAKEJ,W,CALFI,U,CACAC,U,CAIEL,W,CAJFK,U,CACAC,kB,CAGEN,W,CAHFM,kB,CACAC,Q,CAEEP,W,CAFFO,Q,CACAC,a,CACER,W,CADFQ,a,CAEF,GAAMC,YAAaZ,QAAQ,mBAAR,CAAnB;;AAGA,GAAMa,gBAAiBb,QAAQ,kBAAR,CAAvB,C;AAC0BA,QAAQ,iBAAR,C,CAAlBc,a,UAAAA,a;AACqBd,QAAQ,oBAAR,C,CAArBe,gB,WAAAA,gB;;;AAGR,GAAMC,mBAAoBjB,MAAMkB,WAAN,CAAkB;AAC1CC,OAAQ,CAACN,UAAD,CADkC;AAE1CO,QAAS;AACPL,2BADO;AAEPC,iCAFO,CAFiC;;;AAO1CK,UAAW;AACTC,eAAgBpB,UAAUqB,KAAV,CAAgB,CAAC,KAAD,CAAQ,QAAR,CAAkB,YAAlB,CAAgC,eAAhC,CAAhB,CADP;AAETC,YAAatB,UAAUuB,MAFd;AAGTC,KAAMxB,UAAUuB,MAHP;AAITE,YAAazB,UAAU0B,IAJd;AAKTC,SAAU3B,UAAU0B,IALX;AAMTE,aAAc5B,UAAU6B,GANf;AAOTC,MAAOpB,cAAcoB,KAPZ;AAQTC,aAAc/B,UAAUgC,MARf;AASTC,uBAAwBjC,UAAUkC,IATzB;AAUTC,OAAQnC,UAAUkC,IAVT;AAWTE,2BA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AiB;AACfC,YAAYpF,KAAZ;AACEuE,SAAU,UADZ;AAEE+B,KAAM,CAFR;AAGEC,MAAO,CAHT;AAIG,KAAK7F,KAAL,CAAWpB,cAAX,GAA8B,YAA9B,CAA6C,KAA7C,CAAqD,QAJxD,CAImE,CAJnE;;AAMD;;AAED,MAAO,qBAAC,IAAD,EAAM,MAAO,CAACkH,OAAOC,SAAR,CAAmB,KAAK/F,KAAL,CAAWV,KAA9B,CAAb,CAAoD,SAAU,KAAK8E,aAAnE;AACJ,KAAKpE,KAAL,CAAWpB,cAAX,GAA8B,KAA9B,EAAuC,KAAKQ,YAAL,CAAkBsF,WAAlB,CADnC;AAEJ,KAAK5B,uBAAL,EAFI;AAGJ,CAAC,KAAK9C,KAAL,CAAWpB,cAAX,GAA8B,QAA9B,EAA0C6F,WAA3C,GAA2D,KAAKrF,YAAL,CAAkBsF,WAAlB,CAHvD,CAAP;;AAKD,CA7PyC,CAAlB,CAA1B;;;AAgQAsB,OAAOC,OAAP,CAAiB1H,iBAAjB;;AAEA,GAAMuH,QAAS/H,WAAWmI,MAAX,CAAkB;AAC/BH,UAAW;AACTI,KAAM,CADG,CADoB;;AAI/BC,yBAA0B;AACxBD,KAAM,CADkB,CAJK,CAAlB,CAAf","file":"index.js","sourcesContent":["const React = require('react');\nconst {\n PropTypes,\n Component,\n} = React;\nconst ReactNative = require('react-native');\nconst {\n Dimensions,\n View,\n Animated,\n ScrollView,\n StyleSheet,\n InteractionManager,\n Platform,\n ViewPropTypes\n} = ReactNative;\nconst TimerMixin = require('react-timer-mixin');\nimport _ from 'lodash';\n\nconst SceneComponent = require('./SceneComponent');\nconst { DefaultTabBar } = require('./DefaultTabBar');\nconst { ScrollableTabBar } = require('./ScrollableTabBar');\n\n\nconst ScrollableTabView = React.createClass({\n mixins: [TimerMixin,],\n statics: {\n DefaultTabBar,\n ScrollableTabBar,\n },\n\n propTypes: {\n tabBarPosition: PropTypes.oneOf(['top', 'bottom', 'overlayTop', 'overlayBottom',]),\n initialPage: PropTypes.number,\n page: PropTypes.number,\n onChangeTab: PropTypes.func,\n onScroll: PropTypes.func,\n renderTabBar: PropTypes.any,\n style: ViewPropTypes.style,\n contentProps: PropTypes.object,\n scrollWithoutAnimation: PropTypes.bool,\n locked: PropTypes.bool,\n prerenderingSiblingsNumber: PropTypes.number,\n },\n\n getDefaultProps() {\n return {\n tabBarPosition: 'top',\n initialPage: 0,\n page: -1,\n onChangeTab: () => { },\n onScroll: () => { },\n contentProps: {},\n scrollWithoutAnimation: false,\n locked: false,\n prerenderingSiblingsNumber: 0,\n };\n },\n\n getInitialState() {\n return {\n currentPage: this.props.initialPage,\n scrollValue: new Animated.Value(this.props.initialPage),\n containerWidth: Dimensions.get('window').width,\n sceneKeys: this.newSceneKeys({ currentPage: this.props.initialPage, }),\n };\n },\n\n componentDidMount() {\n const scrollFn = () => {\n if (this.scrollView && Platform.OS === 'android') {\n const x = this.props.initialPage * this.state.containerWidth;\n this.scrollView.scrollTo({ x, animated: false });\n }\n };\n this.setTimeout(() => {\n InteractionManager.runAfterInteractions(scrollFn);\n }, 0);\n },\n\n componentWillReceiveProps(props) {\n if (props.children !== this.props.children) {\n this.updateSceneKeys({ page: this.state.currentPage, children: props.children, });\n }\n\n if (props.page >= 0 && props.page !== this.state.currentPage) {\n this.goToPage(props.page);\n }\n },\n\n goToPage(pageNumber) {\n const offset = pageNumber * this.state.containerWidth;\n if (this.scrollView) {\n this.scrollView.scrollTo({ x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });\n }\n\n const currentPage = this.state.currentPage;\n this.updateSceneKeys({\n page: pageNumber,\n callback: this._onChangeTab.bind(this, currentPage, pageNumber),\n });\n },\n\n renderTabBar(props) {\n if (this.props.renderTabBar === false) {\n return null;\n } else if (this.props.renderTabBar) {\n return React.cloneElement(this.props.renderTabBar(props), props);\n } else {\n return ;\n }\n },\n\n updateSceneKeys({ page, children = this.props.children, callback = () => { }, }) {\n let newKeys = this.newSceneKeys({ previousKeys: this.state.sceneKeys, currentPage: page, children, });\n this.setState({ currentPage: page, sceneKeys: newKeys, }, callback);\n },\n\n newSceneKeys({ previousKeys = [], currentPage = 0, children = this.props.children, }) {\n let newKeys = [];\n this._children(children).forEach((child, idx) => {\n let key = this._makeSceneKey(child, idx);\n if (this._keyExists(previousKeys, key) ||\n this._shouldRenderSceneKey(idx, currentPage)) {\n newKeys.push(key);\n }\n });\n return newKeys;\n },\n\n _shouldRenderSceneKey(idx, currentPageKey) {\n let numOfSibling = this.props.prerenderingSiblingsNumber;\n return (idx < (currentPageKey + numOfSibling + 1) &&\n idx > (currentPageKey - numOfSibling - 1));\n },\n\n _keyExists(sceneKeys, key) {\n return sceneKeys.find((sceneKey) => key === sceneKey);\n },\n\n _makeSceneKey(child, idx) {\n return child.props.heading + '_' + idx;\n },\n\n renderScrollableContent() {\n const scenes = this._composeScenes();\n return { this.scrollView = scrollView; }}\n onScroll={(e) => {\n const offsetX = e.nativeEvent.contentOffset.x;\n this._updateScrollValue(offsetX / this.state.containerWidth);\n }}\n onMomentumScrollBegin={this._onMomentumScrollBeginAndEnd}\n onMomentumScrollEnd={this._onMomentumScrollBeginAndEnd}\n scrollEventThrottle={16}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n scrollEnabled={!this.props.locked}\n directionalLockEnabled\n alwaysBounceVertical={false}\n keyboardDismissMode=\"on-drag\"\n {...this.props.contentProps}\n >\n {scenes}\n ;\n },\n\n _composeScenes() {\n return this._children().map((child, idx) => {\n let key = this._makeSceneKey(child, idx);\n return \n {this._keyExists(this.state.sceneKeys, key) ? child : }\n ;\n });\n },\n\n _onMomentumScrollBeginAndEnd(e) {\n const offsetX = e.nativeEvent.contentOffset.x;\n const page = Math.round(offsetX / this.state.containerWidth);\n if (this.state.currentPage !== page) {\n this._updateSelectedPage(page);\n }\n },\n\n _updateSelectedPage(nextPage) {\n let localNextPage = nextPage;\n if (typeof localNextPage === 'object') {\n localNextPage = nextPage.nativeEvent.position;\n }\n\n const currentPage = this.state.currentPage;\n this.updateSceneKeys({\n page: localNextPage,\n callback: this._onChangeTab.bind(this, currentPage, localNextPage),\n });\n },\n\n _onChangeTab(prevPage, currentPage) {\n this.props.onChangeTab({\n i: currentPage,\n ref: this._children()[currentPage],\n from: prevPage,\n });\n },\n\n _updateScrollValue(value) {\n this.state.scrollValue.setValue(value);\n this.props.onScroll(value);\n },\n\n _handleLayout(e) {\n const { width, } = e.nativeEvent.layout;\n\n if (Math.round(width) !== Math.round(this.state.containerWidth)) {\n this.setState({ containerWidth: width, });\n this.requestAnimationFrame(() => {\n this.goToPage(this.state.currentPage);\n });\n }\n },\n\n _children(children = this.props.children) {\n return React.Children.map(children, (child) => child);\n },\n\n render() {\n let overlayTabs = (this.props.tabBarPosition === 'overlayTop' || this.props.tabBarPosition === 'overlayBottom');\n let tabBarProps = {\n goToPage: this.goToPage,\n tabs: this._children().map((child) => child.props.heading),\n tabStyle: this._children().map((child) => child.props.tabStyle),\n activeTabStyle: this._children().map((child) => child.props.activeTabStyle),\n textStyle: this._children().map((child) => child.props.textStyle),\n activeTextStyle: this._children().map((child) => child.props.activeTextStyle),\n tabHeaderStyle: this._children().map((child) => _.get(child.props.heading.props, 'style', undefined)),\n activeTab: this.state.currentPage,\n scrollValue: this.state.scrollValue,\n containerWidth: this.state.containerWidth,\n };\n\n if (this.props.tabBarBackgroundColor) {\n tabBarProps.backgroundColor = this.props.tabBarBackgroundColor;\n }\n if (this.props.tabBarActiveTextColor) {\n tabBarProps.activeTextColor = this.props.tabBarActiveTextColor;\n }\n if (this.props.tabBarInactiveTextColor) {\n tabBarProps.inactiveTextColor = this.props.tabBarInactiveTextColor;\n }\n if (this.props.tabBarTextStyle) {\n tabBarProps.textStyle = this.props.tabBarTextStyle;\n }\n if (this.props.tabBarUnderlineStyle) {\n tabBarProps.underlineStyle = this.props.tabBarUnderlineStyle;\n }\n if (overlayTabs) {\n tabBarProps.style = {\n position: 'absolute',\n left: 0,\n right: 0,\n [this.props.tabBarPosition === 'overlayTop' ? 'top' : 'bottom']: 0,\n };\n }\n\n return \n {this.props.tabBarPosition === 'top' && this.renderTabBar(tabBarProps)}\n {this.renderScrollableContent()}\n {(this.props.tabBarPosition === 'bottom' || overlayTabs) && this.renderTabBar(tabBarProps)}\n ;\n },\n});\n\nmodule.exports = ScrollableTabView;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n scrollableContentAndroid: {\n flex: 1,\n },\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/basic/Tabs/index.js"],"names":["React","require","PropTypes","Component","ReactNative","Dimensions","View","Animated","ScrollView","StyleSheet","InteractionManager","Platform","ViewPropTypes","TimerMixin","SceneComponent","DefaultTabBar","ScrollableTabBar","ScrollableTabView","createClass","mixins","statics","propTypes","tabBarPosition","oneOf","initialPage","number","page","onChangeTab","func","onScroll","renderTabBar","any","style","contentProps","object","scrollWithoutAnimation","bool","locked","prerenderingSiblingsNumber","getDefaultProps","getInitialState","currentPage","props","scrollValue","Value","containerWidth","get","width","sceneKeys","newSceneKeys","componentDidMount","scrollFn","scrollView","OS","x","state","scrollTo","animated","setTimeout","runAfterInteractions","componentWillReceiveProps","children","updateSceneKeys","goToPage","pageNumber","offset","y","callback","_onChangeTab","bind","cloneElement","newKeys","previousKeys","setState","_children","forEach","child","idx","key","_makeSceneKey","_keyExists","_shouldRenderSceneKey","push","currentPageKey","numOfSibling","find","sceneKey","heading","renderScrollableContent","scenes","_composeScenes","offsetX","e","nativeEvent","contentOffset","_updateScrollValue","_onMomentumScrollBeginAndEnd","map","Math","round","_updateSelectedPage","nextPage","localNextPage","position","prevPage","i","ref","from","value","setValue","_handleLayout","layout","requestAnimationFrame","Children","render","overlayTabs","tabBarProps","tabs","tabStyle","activeTabStyle","textStyle","activeTextStyle","tabHeaderStyle","undefined","activeTab","tabBarBackgroundColor","backgroundColor","tabBarActiveTextColor","activeTextColor","tabBarInactiveTextColor","inactiveTextColor","tabBarTextStyle","tabBarUnderlineStyle","underlineStyle","left","right","styles","container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KAAL,CAAWV,KAA9B,CADT;AAEE,SAAU,KAAK8E,aAFjB;;AAIG,KAAKpE,KAAL,CAAWpB,cAAX,GAA8B,KAA9B,EAAuC,KAAKQ,YAAL,CAAkBsF,WAAlB,CAJ1C;AAKG,KAAK5B,uBAAL,EALH;AAMG,CAAC,KAAK9C,KAAL,CAAWpB,cAAX,GAA8B,QAA9B,EAA0C6F,WAA3C;AACC,KAAKrF,YAAL,CAAkBsF,WAAlB,CAPJ,CADF;;;AAWD,CAlTyC,CAAlB,CAA1B;;;AAqTAsB,OAAOC,OAAP,CAAiB1H,iBAAjB;;AAEA,GAAMuH,QAAS/H,WAAWmI,MAAX,CAAkB;AAC/BH,UAAW;AACTI,KAAM,CADG,CADoB;;AAI/BC,yBAA0B;AACxBD,KAAM,CADkB,CAJK,CAAlB,CAAf","file":"index.js","sourcesContent":["const React = require(\"react\");\nconst { PropTypes, Component } = React;\nconst ReactNative = require(\"react-native\");\nconst {\n Dimensions,\n View,\n Animated,\n ScrollView,\n StyleSheet,\n InteractionManager,\n Platform,\n ViewPropTypes\n} = ReactNative;\nconst TimerMixin = require(\"react-timer-mixin\");\nimport _ from \"lodash\";\n\nconst SceneComponent = require(\"./SceneComponent\");\nconst { DefaultTabBar } = require(\"./DefaultTabBar\");\nconst { ScrollableTabBar } = require(\"./ScrollableTabBar\");\n\nconst ScrollableTabView = React.createClass({\n mixins: [TimerMixin],\n statics: {\n DefaultTabBar,\n ScrollableTabBar\n },\n\n propTypes: {\n tabBarPosition: PropTypes.oneOf([\n \"top\",\n \"bottom\",\n \"overlayTop\",\n \"overlayBottom\"\n ]),\n initialPage: PropTypes.number,\n page: PropTypes.number,\n onChangeTab: PropTypes.func,\n onScroll: PropTypes.func,\n renderTabBar: PropTypes.any,\n style: ViewPropTypes.style,\n contentProps: PropTypes.object,\n scrollWithoutAnimation: PropTypes.bool,\n locked: PropTypes.bool,\n prerenderingSiblingsNumber: PropTypes.number\n },\n\n getDefaultProps() {\n return {\n tabBarPosition: \"top\",\n initialPage: 0,\n page: -1,\n onChangeTab: () => {},\n onScroll: () => {},\n contentProps: {},\n scrollWithoutAnimation: false,\n locked: false,\n prerenderingSiblingsNumber: 0\n };\n },\n\n getInitialState() {\n return {\n currentPage: this.props.initialPage,\n scrollValue: new Animated.Value(this.props.initialPage),\n containerWidth: Dimensions.get(\"window\").width,\n sceneKeys: this.newSceneKeys({ currentPage: this.props.initialPage })\n };\n },\n\n componentDidMount() {\n const scrollFn = () => {\n if (this.scrollView && Platform.OS === \"android\") {\n const x = this.props.initialPage * this.state.containerWidth;\n this.scrollView.scrollTo({ x, animated: false });\n }\n };\n this.setTimeout(() => {\n InteractionManager.runAfterInteractions(scrollFn);\n }, 0);\n },\n\n componentWillReceiveProps(props) {\n if (props.children !== this.props.children) {\n this.updateSceneKeys({\n page: this.state.currentPage,\n children: props.children\n });\n }\n\n if (props.page >= 0 && props.page !== this.state.currentPage) {\n this.goToPage(props.page);\n }\n },\n\n goToPage(pageNumber) {\n const offset = pageNumber * this.state.containerWidth;\n if (this.scrollView) {\n this.scrollView.scrollTo({\n x: offset,\n y: 0,\n animated: !this.props.scrollWithoutAnimation\n });\n }\n\n const currentPage = this.state.currentPage;\n this.updateSceneKeys({\n page: pageNumber,\n callback: this._onChangeTab.bind(this, currentPage, pageNumber)\n });\n },\n\n renderTabBar(props) {\n if (this.props.renderTabBar === false) {\n return null;\n } else if (this.props.renderTabBar) {\n return React.cloneElement(this.props.renderTabBar(props), props);\n } else {\n return ;\n }\n },\n\n updateSceneKeys({\n page,\n children = this.props.children,\n callback = () => {}\n }) {\n let newKeys = this.newSceneKeys({\n previousKeys: this.state.sceneKeys,\n currentPage: page,\n children\n });\n this.setState({ currentPage: page, sceneKeys: newKeys }, callback);\n },\n\n newSceneKeys({\n previousKeys = [],\n currentPage = 0,\n children = this.props.children\n }) {\n let newKeys = [];\n this._children(children).forEach((child, idx) => {\n let key = this._makeSceneKey(child, idx);\n if (\n this._keyExists(previousKeys, key) ||\n this._shouldRenderSceneKey(idx, currentPage)\n ) {\n newKeys.push(key);\n }\n });\n return newKeys;\n },\n\n _shouldRenderSceneKey(idx, currentPageKey) {\n let numOfSibling = this.props.prerenderingSiblingsNumber;\n return (\n idx < currentPageKey + numOfSibling + 1 &&\n idx > currentPageKey - numOfSibling - 1\n );\n },\n\n _keyExists(sceneKeys, key) {\n return sceneKeys.find(sceneKey => key === sceneKey);\n },\n\n _makeSceneKey(child, idx) {\n return child.props.heading + \"_\" + idx;\n },\n\n renderScrollableContent() {\n const scenes = this._composeScenes();\n return (\n {\n this.scrollView = scrollView;\n }}\n onScroll={e => {\n const offsetX = e.nativeEvent.contentOffset.x;\n this._updateScrollValue(offsetX / this.state.containerWidth);\n }}\n onMomentumScrollBegin={this._onMomentumScrollBeginAndEnd}\n onMomentumScrollEnd={this._onMomentumScrollBeginAndEnd}\n scrollEventThrottle={16}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n scrollEnabled={!this.props.locked}\n directionalLockEnabled\n alwaysBounceVertical={false}\n keyboardDismissMode=\"on-drag\"\n {...this.props.contentProps}\n >\n {scenes}\n \n );\n },\n\n _composeScenes() {\n return this._children().map((child, idx) => {\n let key = this._makeSceneKey(child, idx);\n return (\n \n {this._keyExists(this.state.sceneKeys, key)\n ? child\n : }\n \n );\n });\n },\n\n _onMomentumScrollBeginAndEnd(e) {\n const offsetX = e.nativeEvent.contentOffset.x;\n const page = Math.round(offsetX / this.state.containerWidth);\n if (this.state.currentPage !== page) {\n this._updateSelectedPage(page);\n }\n },\n\n _updateSelectedPage(nextPage) {\n let localNextPage = nextPage;\n if (typeof localNextPage === \"object\") {\n localNextPage = nextPage.nativeEvent.position;\n }\n\n const currentPage = this.state.currentPage;\n this.updateSceneKeys({\n page: localNextPage,\n callback: this._onChangeTab.bind(this, currentPage, localNextPage)\n });\n },\n\n _onChangeTab(prevPage, currentPage) {\n this.props.onChangeTab({\n i: currentPage,\n ref: this._children()[currentPage],\n from: prevPage\n });\n },\n\n _updateScrollValue(value) {\n this.state.scrollValue.setValue(value);\n this.props.onScroll(value);\n },\n\n _handleLayout(e) {\n const { width } = e.nativeEvent.layout;\n\n if (Math.round(width) !== Math.round(this.state.containerWidth)) {\n this.setState({ containerWidth: width });\n this.requestAnimationFrame(() => {\n this.goToPage(this.state.currentPage);\n });\n }\n },\n\n _children(children = this.props.children) {\n return React.Children.map(children, child => child);\n },\n\n render() {\n let overlayTabs =\n this.props.tabBarPosition === \"overlayTop\" ||\n this.props.tabBarPosition === \"overlayBottom\";\n let tabBarProps = {\n goToPage: this.goToPage,\n tabs: this._children().map(child => child.props.heading),\n tabStyle: this._children().map(child => child.props.tabStyle),\n activeTabStyle: this._children().map(child => child.props.activeTabStyle),\n textStyle: this._children().map(child => child.props.textStyle),\n activeTextStyle: this._children().map(\n child => child.props.activeTextStyle\n ),\n tabHeaderStyle: this._children().map(child =>\n _.get(child.props.heading.props, \"style\", undefined)\n ),\n activeTab: this.state.currentPage,\n scrollValue: this.state.scrollValue,\n containerWidth: this.state.containerWidth\n };\n\n if (this.props.tabBarBackgroundColor) {\n tabBarProps.backgroundColor = this.props.tabBarBackgroundColor;\n }\n if (this.props.tabBarActiveTextColor) {\n tabBarProps.activeTextColor = this.props.tabBarActiveTextColor;\n }\n if (this.props.tabBarInactiveTextColor) {\n tabBarProps.inactiveTextColor = this.props.tabBarInactiveTextColor;\n }\n if (this.props.tabBarTextStyle) {\n tabBarProps.textStyle = this.props.tabBarTextStyle;\n }\n if (this.props.tabBarUnderlineStyle) {\n tabBarProps.underlineStyle = this.props.tabBarUnderlineStyle;\n }\n if (overlayTabs) {\n tabBarProps.style = {\n position: \"absolute\",\n left: 0,\n right: 0,\n [this.props.tabBarPosition === \"overlayTop\" ? \"top\" : \"bottom\"]: 0\n };\n }\n\n return (\n \n {this.props.tabBarPosition === \"top\" && this.renderTabBar(tabBarProps)}\n {this.renderScrollableContent()}\n {(this.props.tabBarPosition === \"bottom\" || overlayTabs) &&\n this.renderTabBar(tabBarProps)}\n \n );\n }\n});\n\nmodule.exports = ScrollableTabView;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1\n },\n scrollableContentAndroid: {\n flex: 1\n }\n});\n"]} \ No newline at end of file diff --git a/dist/src/basic/Text.js b/dist/src/basic/Text.js index 34afb9139..a75a07f8f 100644 --- a/dist/src/basic/Text.js +++ b/dist/src/basic/Text.js @@ -1,18 +1,17 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Text=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c}\n {...this.props}\n >\n {this.props.uppercase ? this.props.children.toUpperCase() : this.props.children}\n \n );\n }\n}\n\nText.propTypes = {\n ...RNText.propTypes,\n uppercase: React.PropTypes.bool,\n style: React.PropTypes.object,\n};\n\nconst AnimatedText = connectAnimation(Text);\nconst StyledText = connectStyle('NativeBase.Text', {}, mapPropsToStyleNames)(Text);\n\nexport {\n StyledText as Text,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Text.js"],"names":["Text","_root","c","props","uppercase","children","toUpperCase","propTypes","PropTypes","bool","style","object","AnimatedText","StyledText"],"mappings":"m1BAAA,4B;AACA;;AAEA;AACA;AACA,mE;;AAEMA,I;AACK;AACP;AACE,0DAAQ,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAb,EAAwC,KAAKC,KAA7C;AACG,KAAKA,KAAL,CAAWC,SAAX;AACG,KAAKD,KAAL,CAAWE,QAAX,CAAoBC,WAApB,EADH;AAEG,KAAKH,KAAL,CAAWE,QAHjB,CADF;;;AAOD,C;;;AAGHL,KAAKO,SAAL;AACK,kBAAOA,SADZ;AAEEH,UAAW,gBAAMI,SAAN,CAAgBC,IAF7B;AAGEC,MAAO,gBAAMF,SAAN,CAAgBG,MAHzB;;;AAMA,GAAMC,cAAe,gCAAiBZ,IAAjB,CAArB;AACA,GAAMa,YAAa,yCAAa,iBAAb,CAAgC,EAAhC;AACjBb,IADiB,CAAnB,C;;;AAIuBA,I,CAAda,U","file":"Text.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Text as RNText } from \"react-native\";\n\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport { connectAnimation } from \"@shoutem/animation\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Text extends Component {\n render() {\n return (\n (this._root = c)} {...this.props}>\n {this.props.uppercase\n ? this.props.children.toUpperCase()\n : this.props.children}\n \n );\n }\n}\n\nText.propTypes = {\n ...RNText.propTypes,\n uppercase: React.PropTypes.bool,\n style: React.PropTypes.object\n};\n\nconst AnimatedText = connectAnimation(Text);\nconst StyledText = connectStyle(\"NativeBase.Text\", {}, mapPropsToStyleNames)(\n Text\n);\n\nexport { StyledText as Text };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Textarea.js b/dist/src/basic/Textarea.js index e2e336881..48ef4ce81 100644 --- a/dist/src/basic/Textarea.js +++ b/dist/src/basic/Textarea.js @@ -1,32 +1,40 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Textarea=undefined;var _extends=Object.assign||function(target){for(var i=1;i { this._textInput = c; this._root = c; }} {...this.prepareRootProps()}\n multiline\n placeholderTextColor={this.props.placeholderTextColor ? this.props.placeholderTextColor : variables.inputColorPlaceholder} underlineColorAndroid=\"rgba(0,0,0,0)\"\n />\n );\n }\n}\n\nTextarea.propTypes = {\n ...TextInput.propTypes,\n style: React.PropTypes.object,\n rowSpan: React.PropTypes.number,\n bordered: React.PropTypes.bool,\n underline: React.PropTypes.bool,\n};\n\nconst StyledTextarea = connectStyle('NativeBase.Textarea', {}, mapPropsToStyleNames)(Textarea);\n\nexport {\n StyledTextarea as Textarea,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Textarea.js"],"names":["Textarea","textarea","height","props","rowSpan","defaultProps","style","getStyle","_textInput","c","_root","prepareRootProps","placeholderTextColor","inputColorPlaceholder","propTypes","PropTypes","object","number","bordered","bool","underline","StyledTextarea"],"mappings":"21BAAA,4B;AACA;AACA;AACA,qD;AACA,mD;AACA,mE;;AAEMA,Q;AACO;AACT,MAAO;AACLC,SAAU;AACRC,OAAQ,KAAKC,KAAL,CAAWC,OAAX,CAAqB,KAAKD,KAAL,CAAWC,OAAX,CAAqB,EAA1C,CAA+C,EAD/C,CADL,CAAP;;;AAKD,C;;AAEkB;AACjB,GAAMC,cAAe;AACnBC,MAAO,KAAKC,QAAL,GAAgBN,QADJ,CAArB;;AAGA,MAAO,2BAAa,KAAKE,KAAlB,CAAyBE,YAAzB,CAAP;AACD,C;AACQ;AACP;AACE;AACE,IAAK,eAAK;AACR,OAAKG,UAAL,CAAkBC,CAAlB;AACA,OAAKC,KAAL,CAAaD,CAAb;AACD,CAJH;AAKM,KAAKE,gBAAL,EALN;AAME,cANF;AAOE;AACE,KAAKR,KAAL,CAAWS,oBAAX;AACI,KAAKT,KAAL,CAAWS,oBADf;AAEI,mBAAUC,qBAVlB;;AAYE,sBAAsB,eAZxB,kDADF;;;AAgBD,C;;;AAGHb,SAASc,SAAT;AACK,uBAAUA,SADf;AAEER,MAAO,gBAAMS,SAAN,CAAgBC,MAFzB;AAGEZ,QAAS,gBAAMW,SAAN,CAAgBE,MAH3B;AAIEC,SAAU,gBAAMH,SAAN,CAAgBI,IAJ5B;AAKEC,UAAW,gBAAML,SAAN,CAAgBI,IAL7B;;;AAQA,GAAME,gBAAiB;AACrB,qBADqB;AAErB,EAFqB;;AAIrBrB,QAJqB,CAAvB,C;;AAM2BA,Q,CAAlBqB,c","file":"Textarea.js","sourcesContent":["import React, { Component } from \"react\";\nimport { TextInput } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport variables from \"../theme/variables/platform\";\nimport computeProps from \"../Utils/computeProps\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Textarea extends Component {\n getStyle() {\n return {\n textarea: {\n height: this.props.rowSpan ? this.props.rowSpan * 25 : 60\n }\n };\n }\n\n prepareRootProps() {\n const defaultProps = {\n style: this.getStyle().textarea\n };\n return computeProps(this.props, defaultProps);\n }\n render() {\n return (\n {\n this._textInput = c;\n this._root = c;\n }}\n {...this.prepareRootProps()}\n multiline\n placeholderTextColor={\n this.props.placeholderTextColor\n ? this.props.placeholderTextColor\n : variables.inputColorPlaceholder\n }\n underlineColorAndroid=\"rgba(0,0,0,0)\"\n />\n );\n }\n}\n\nTextarea.propTypes = {\n ...TextInput.propTypes,\n style: React.PropTypes.object,\n rowSpan: React.PropTypes.number,\n bordered: React.PropTypes.bool,\n underline: React.PropTypes.bool\n};\n\nconst StyledTextarea = connectStyle(\n \"NativeBase.Textarea\",\n {},\n mapPropsToStyleNames\n)(Textarea);\n\nexport { StyledTextarea as Textarea };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Thumbnail.js b/dist/src/basic/Thumbnail.js index ab3aee801..94b56e5e5 100644 --- a/dist/src/basic/Thumbnail.js +++ b/dist/src/basic/Thumbnail.js @@ -1,15 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Thumbnail=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} />\n );\n }\n}\n\nThumbnail.propTypes = {\n ...Image.propTypes,\n style: React.PropTypes.object,\n square: React.PropTypes.bool,\n circular: React.PropTypes.bool,\n size: React.PropTypes.number,\n};\n\nconst StyledThumbnail = connectStyle('NativeBase.Thumbnail', {}, mapPropsToStyleNames)(Thumbnail);\n\nexport {\n StyledThumbnail as Thumbnail,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Thumbnail.js"],"names":["Thumbnail","_root","c","props","propTypes","style","PropTypes","object","square","bool","circular","size","number","StyledThumbnail"],"mappings":"61BAAA,4B;AACA;AACA;AACA,mD;AACA,mE;;AAEMA,S;AACK;AACP,MAAO,4DAAO,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAZ,EAAuC,KAAKC,KAA5C,kDAAP;AACD,C;;;AAGHH,UAAUI,SAAV;AACK,mBAAMA,SADX;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEC,OAAQ,gBAAMF,SAAN,CAAgBG,IAH1B;AAIEC,SAAU,gBAAMJ,SAAN,CAAgBG,IAJ5B;AAKEE,KAAM,gBAAML,SAAN,CAAgBM,MALxB;;;AAQA,GAAMC,iBAAkB;AACtB,sBADsB;AAEtB,EAFsB;;AAItBb,SAJsB,CAAxB,C;;AAM4BA,S,CAAnBa,e","file":"Thumbnail.js","sourcesContent":["import React, { Component } from \"react\";\nimport { Image } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport computeProps from \"../Utils/computeProps\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Thumbnail extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nThumbnail.propTypes = {\n ...Image.propTypes,\n style: React.PropTypes.object,\n square: React.PropTypes.bool,\n circular: React.PropTypes.bool,\n size: React.PropTypes.number\n};\n\nconst StyledThumbnail = connectStyle(\n \"NativeBase.Thumbnail\",\n {},\n mapPropsToStyleNames\n)(Thumbnail);\n\nexport { StyledThumbnail as Thumbnail };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Title.js b/dist/src/basic/Title.js index d95d955c7..2bd255d45 100644 --- a/dist/src/basic/Title.js +++ b/dist/src/basic/Title.js @@ -1,15 +1,14 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Title=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props} numberOfLines={1} />\n );\n }\n}\n\nTitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledTitle = connectStyle('NativeBase.Title', {}, mapPropsToStyleNames)(Title);\nexport {\n StyledTitle as Title,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Title.js"],"names":["Title","_root","c","props","propTypes","style","PropTypes","object","StyledTitle"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,K;AACK;AACP;AACE,0DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,EAAkD,cAAe,CAAjE,kDADF;;AAGD,C;;;AAGHH,MAAMI,SAAN;AACK,kBAAKA,SADV;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC;AAClBR,KADkB,CAApB,C;;AAGwBA,K,CAAfQ,W","file":"Title.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { Text } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Title extends Component {\n render() {\n return (\n (this._root = c)} {...this.props} numberOfLines={1} />\n );\n }\n}\n\nTitle.propTypes = {\n ...Text.propTypes,\n style: React.PropTypes.object\n};\n\nconst StyledTitle = connectStyle(\"NativeBase.Title\", {}, mapPropsToStyleNames)(\n Title\n);\nexport { StyledTitle as Title };\n"]} \ No newline at end of file diff --git a/dist/src/basic/Toast.js b/dist/src/basic/Toast.js index 1a1588a8b..adf7ad959 100644 --- a/dist/src/basic/Toast.js +++ b/dist/src/basic/Toast.js @@ -1,17 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.Toast=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nToast.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledToast = connectStyle('NativeBase.Toast', {}, mapPropsToStyleNames)(Toast);\nexport {\n StyledToast as Toast,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/Toast.js"],"names":["Toast","_root","c","props","propTypes","style","PropTypes","object","StyledToast"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,K;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,mDAAP;AACD,C;;;AAGHH,MAAMI,SAAN;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC;AAClBR,KADkB,CAApB,C;;AAGwBA,K,CAAfQ,W","file":"Toast.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass Toast extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nToast.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledToast = connectStyle(\"NativeBase.Toast\", {}, mapPropsToStyleNames)(\n Toast\n);\nexport { StyledToast as Toast };\n"]} \ No newline at end of file diff --git a/dist/src/basic/ToastContainer.js b/dist/src/basic/ToastContainer.js index 52698f6a7..5bc0b5680 100644 --- a/dist/src/basic/ToastContainer.js +++ b/dist/src/basic/ToastContainer.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ToastContainer=undefined;var _extends=Object.assign||function(target){for(var i=1;i 0) {\n setTimeout(() => {\n Animated.timing(this.state.fadeAnim, {\n toValue: 0,\n duration: 200\n }).start();\n setTimeout(() => {\n this.setState({\n modalVisible: false\n });\n }, 500);\n }, config.duration);\n }\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 200\n }).start();\n }\n closeToast() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 0,\n duration: 200\n }).start();\n setTimeout(() => {\n this.setState({\n modalVisible: false\n });\n }, 500);\n }\n render() {\n if (this.state.modalVisible) {\n return (\n \n \n {this.state.text}\n {this.state.buttonText &&\n this.closeToast()}\n >\n \n {this.state.buttonText}\n \n }\n\n \n \n );\n } else return null;\n }\n}\n\nToastContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledToastContainer = connectStyle(\n \"NativeBase.ToastContainer\",\n {},\n mapPropsToStyleNames\n)(ToastContainer);\n\nexport { StyledToastContainer as ToastContainer };\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/ToastContainer.js"],"names":["ToastContainer","props","state","modalVisible","fadeAnim","Value","position","opacity","width","top","undefined","bottom","config","setState","text","buttonText","type","supportedOrientations","style","buttonTextStyle","buttonStyle","textStyle","duration","setTimeout","timing","toValue","start","getToastStyle","closeToast","toastInstance","_root","showToast","propTypes","PropTypes","object","StyledToastContainer"],"mappings":";;AAEA,4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mE;;AAEMA,c;AACJ,wBAAYC,KAAZ,CAAmB;AACXA,KADW;AAEjB,MAAKC,KAAL,CAAa;AACXC,aAAc,KADH;AAEXC,SAAU,GAAI,uBAASC,KAAb,CAAmB,CAAnB,CAFC,CAAb,CAFiB;;AAMlB,C;;;;;AAKe;AACd,MAAO;AACLC,SAAU,UADL;AAELC,QAAS,KAAKL,KAAL,CAAWE,QAFf;AAGLI,MAAO,KAHF;AAILC,IAAK,KAAKP,KAAL,CAAWI,QAAX,GAAwB,KAAxB,CAAgC,EAAhC,CAAqCI,SAJrC;AAKLC,OAAQ,KAAKT,KAAL,CAAWI,QAAX,GAAwB,QAAxB,CAAmC,EAAnC,CAAwCI,SAL3C,CAAP;;AAOD,C;AACqB,oBAAVE,OAAU,MAAVA,MAAU;AACpB,KAAKC,QAAL,CAAc;AACZV,aAAc,IADF;AAEZW,KAAMF,OAAOE,IAFD;AAGZC,WAAYH,OAAOG,UAHP;AAIZC,KAAMJ,OAAOI,IAJD;AAKZV,SAAUM,OAAON,QAAP,CAAkBM,OAAON,QAAzB,CAAoC,QALlC;AAMZW,sBAAuBL,OAAOK,qBANlB;AAOZC,MAAON,OAAOM,KAPF;AAQZC,gBAAiBP,OAAOO,eARZ;AASZC,YAAaR,OAAOQ,WATR;AAUZC,UAAWT,OAAOS,SAVN,CAAd;;AAYA,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AWkB,WADpB;AAEE,QAAS,yBAAM,QAAKQ,UAAL,EAAN,EAFX;;AAIE,0CAAM,MAAO,KAAK1B,KAAL,CAAWiB,eAAxB;AACG,KAAKjB,KAAL,CAAWa,UADd,CAJF,CARJ,CADF,CADF;;;;;;;AAsBD,CAvBD,IAuBO,OAAO,KAAP;AACR,C,0CA/E0B,IAAVH,OAAU,oCACzB,KAAKiB,aAAL,CAAmBC,KAAnB,CAAyBC,SAAzB,CAAmC,CAAEnB,aAAF,CAAnC,EACD,C;;;AAgFHZ,eAAegC,SAAf;;AAEEd,MAAO,gBAAMe,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,sBAAuB;AAC3B,2BAD2B;AAE3B,EAF2B;;AAI3BnC,cAJ2B,CAA7B,C;;AAMiCA,c,CAAxBmC,oB","file":"ToastContainer.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, Modal, Platform, ViewPropTypes, Animated } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport { Text } from \"./Text\";\nimport { Button } from \"./Button\";\nimport { ViewNB } from \"./View\";\nimport { Toast } from \"./Toast\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass ToastContainer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n modalVisible: false,\n fadeAnim: new Animated.Value(0)\n };\n }\n static toastInstance;\n static show({ ...config }) {\n this.toastInstance._root.showToast({ config });\n }\n getToastStyle() {\n return {\n position: \"absolute\",\n opacity: this.state.fadeAnim,\n width: \"90%\",\n top: this.state.position === \"top\" ? 30 : undefined,\n bottom: this.state.position === \"bottom\" ? 30 : undefined\n };\n }\n showToast({ config }) {\n this.setState({\n modalVisible: true,\n text: config.text,\n buttonText: config.buttonText,\n type: config.type,\n position: config.position ? config.position : \"bottom\",\n supportedOrientations: config.supportedOrientations,\n style: config.style,\n buttonTextStyle: config.buttonTextStyle,\n buttonStyle: config.buttonStyle,\n textStyle: config.textStyle\n });\n if (config.duration > 0) {\n setTimeout(() => {\n Animated.timing(this.state.fadeAnim, {\n toValue: 0,\n duration: 200\n }).start();\n setTimeout(() => {\n this.setState({\n modalVisible: false\n });\n }, 500);\n }, config.duration);\n }\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 200\n }).start();\n }\n closeToast() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 0,\n duration: 200\n }).start();\n setTimeout(() => {\n this.setState({\n modalVisible: false\n });\n }, 500);\n }\n render() {\n if (this.state.modalVisible) {\n return (\n \n \n {this.state.text}\n {this.state.buttonText &&\n this.closeToast()}\n >\n \n {this.state.buttonText}\n \n }\n\n \n \n );\n } else return null;\n }\n}\n\nToastContainer.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledToastContainer = connectStyle(\n \"NativeBase.ToastContainer\",\n {},\n mapPropsToStyleNames\n)(ToastContainer);\n\nexport { StyledToastContainer as ToastContainer };\n"]} \ No newline at end of file diff --git a/dist/src/basic/View.js b/dist/src/basic/View.js index 4dd9203bb..8b91e54a4 100644 --- a/dist/src/basic/View.js +++ b/dist/src/basic/View.js @@ -1,17 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.ViewNB=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n );\n }\n}\n\nViewNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n};\n\nconst StyledViewNB = connectStyle('NativeBase.ViewNB', {}, mapPropsToStyleNames)(ViewNB);\nexport {\n StyledViewNB as ViewNB,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/basic/View.js"],"names":["ViewNB","_root","c","props","propTypes","style","PropTypes","object","StyledViewNB"],"mappings":";;AAEA,4B;AACA;AACA;AACA,mE;;AAEMA,M;AACK;AACP,MAAO,2DAAM,IAAK,sBAAM,QAAKC,KAAL,CAAaC,CAAnB,EAAX,EAAsC,KAAKC,KAA3C,mDAAP;AACD,C;;;AAGHH,OAAOI,SAAP;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;;;AAKA,GAAMC,cAAe;AACnB,mBADmB;AAEnB,EAFmB;;AAInBR,MAJmB,CAArB,C;AAKyBA,M,CAAhBQ,Y","file":"View.js","sourcesContent":["/* @flow */\n\nimport React, { Component } from \"react\";\nimport { View, ViewPropTypes } from \"react-native\";\nimport { connectStyle } from \"native-base-shoutem-theme\";\nimport mapPropsToStyleNames from \"../Utils/mapPropsToStyleNames\";\n\nclass ViewNB extends Component {\n render() {\n return (this._root = c)} {...this.props} />;\n }\n}\n\nViewNB.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object\n};\n\nconst StyledViewNB = connectStyle(\n \"NativeBase.ViewNB\",\n {},\n mapPropsToStyleNames\n)(ViewNB);\nexport { StyledViewNB as ViewNB };\n"]} \ No newline at end of file diff --git a/dist/src/index.js b/dist/src/index.js index 0eb89e112..5cca915b4 100644 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -1,60 +1,60 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.mapPropsToStyleNames=exports.Segment=exports.DefaultTabBar=exports.TabContainer=exports.TabHeading=exports.ActionSheet=exports.ScrollableTab=exports.Toast=exports.View=exports.TabContent=exports.STabs=exports.Text=exports.Grid=exports.Row=exports.Col=exports.Gravatar=exports.Textarea=exports.Label=exports.Subtitle=exports.Item=exports.DeckSwiper=exports.Separator=exports.ListItem=exports.List=exports.Picker=exports.FooterTab=exports.Tabs=exports.Tab=exports.Footer=exports.Content=exports.Container=exports.Switch=exports.Spinner=exports.H3=exports.H2=exports.H1=exports.CardItem=exports.Card=exports.Thumbnail=exports.Radio=exports.CheckBox=exports.Badge=exports.Body=exports.Right=exports.Left=exports.Fab=exports.Title=exports.Input=exports.InputGroup=exports.Form=exports.Header=exports.Icon=exports.IconNB=exports.Button=exports.Drawer=exports.connectStyle=exports.StyleProvider=exports.variables=exports.getTheme=exports.Swipeout=undefined;var _nativeBaseShoutemTheme=require('native-base-shoutem-theme'); -var _lodash=require('lodash'); -var _reactNativeEasyGrid=require('react-native-easy-grid'); -var _Gravatar=require('./backward/Widgets/Gravatar'); -var _init=require('./init');var _init2=_interopRequireDefault(_init); -var _components=require('./theme/components');var _components2=_interopRequireDefault(_components); -var _platform=require('./theme/variables/platform');var _platform2=_interopRequireDefault(_platform); -var _Drawer=require('./basic/Drawer');var _Drawer2=_interopRequireDefault(_Drawer); -var _Swipe=require('./basic/Swipe'); -var _Text=require('./basic/Text'); -var _View=require('./basic/View'); -var _Button=require('./basic/Button'); -var _TabHeading=require('./basic/TabHeading'); -var _TabContainer=require('./basic/TabContainer'); -var _IconNB=require('./basic/IconNB'); -var _Icon=require('./basic/Icon'); -var _Header=require('./basic/Header'); -var _InputGroup=require('./basic/InputGroup'); -var _Input=require('./basic/Input'); -var _Title=require('./basic/Title'); -var _Fab=require('./basic/Fab'); -var _Left=require('./basic/Left'); -var _Right=require('./basic/Right'); -var _Body=require('./basic/Body'); -var _Badge=require('./basic/Badge'); -var _Checkbox=require('./basic/Checkbox'); -var _Radio=require('./basic/Radio'); -var _Thumbnail=require('./basic/Thumbnail'); -var _Card=require('./basic/Card'); -var _CardItem=require('./basic/CardItem'); -var _H=require('./basic/H1'); -var _H2=require('./basic/H2'); -var _H3=require('./basic/H3'); -var _Spinner=require('./basic/Spinner'); -var _Switch=require('./basic/Switch'); -var _Container=require('./basic/Container'); -var _Content=require('./basic/Content'); -var _Footer=require('./basic/Footer'); -var _FooterTab=require('./basic/FooterTab'); -var _Form=require('./basic/Form'); -var _ToastContainer=require('./basic/ToastContainer'); -var _Actionsheet=require('./basic/Actionsheet'); -var _Picker=require('./basic/Picker'); -var _List=require('./basic/List'); -var _ListItem=require('./basic/ListItem'); -var _Separator=require('./basic/Separator'); -var _DeckSwiper=require('./basic/DeckSwiper'); -var _Item=require('./basic/Item'); -var _Segment=require('./basic/Segment'); -var _Label=require('./basic/Label'); -var _Textarea=require('./basic/Textarea'); -var _Tab=require('./basic/Tab'); -var _Tabs=require('./basic/Tabs');var _Tabs2=_interopRequireDefault(_Tabs); -var _DefaultTabBar=require('./basic/Tabs/DefaultTabBar'); -var _ScrollableTabBar=require('./basic/Tabs/ScrollableTabBar'); -var _STabs=require('./smart/STabs'); -var _Subtitle=require('./backward/Widgets/Subtitle');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +Object.defineProperty(exports,"__esModule",{value:true});exports.mapPropsToStyleNames=exports.Segment=exports.DefaultTabBar=exports.TabContainer=exports.TabHeading=exports.ActionSheet=exports.ScrollableTab=exports.Toast=exports.View=exports.TabContent=exports.STabs=exports.Text=exports.Grid=exports.Row=exports.Col=exports.Gravatar=exports.Textarea=exports.Label=exports.Subtitle=exports.Item=exports.DeckSwiper=exports.Separator=exports.ListItem=exports.List=exports.Picker=exports.FooterTab=exports.Tabs=exports.Tab=exports.Footer=exports.Content=exports.Container=exports.Switch=exports.Spinner=exports.H3=exports.H2=exports.H1=exports.CardItem=exports.Card=exports.Thumbnail=exports.Radio=exports.CheckBox=exports.Badge=exports.Body=exports.Right=exports.Left=exports.Fab=exports.Title=exports.Input=exports.InputGroup=exports.Form=exports.Header=exports.Icon=exports.IconNB=exports.Button=exports.Drawer=exports.connectStyle=exports.StyleProvider=exports.variables=exports.getTheme=exports.Swipeout=undefined;var _nativeBaseShoutemTheme=require("native-base-shoutem-theme"); +var _lodash=require("lodash"); +var _reactNativeEasyGrid=require("react-native-easy-grid"); +var _Gravatar=require("./backward/Widgets/Gravatar"); +var _init=require("./init");var _init2=_interopRequireDefault(_init); +var _components=require("./theme/components");var _components2=_interopRequireDefault(_components); +var _platform=require("./theme/variables/platform");var _platform2=_interopRequireDefault(_platform); +var _Drawer=require("./basic/Drawer");var _Drawer2=_interopRequireDefault(_Drawer); +var _Swipe=require("./basic/Swipe"); +var _Text=require("./basic/Text"); +var _View=require("./basic/View"); +var _Button=require("./basic/Button"); +var _TabHeading=require("./basic/TabHeading"); +var _TabContainer=require("./basic/TabContainer"); +var _IconNB=require("./basic/IconNB"); +var _Icon=require("./basic/Icon"); +var _Header=require("./basic/Header"); +var _InputGroup=require("./basic/InputGroup"); +var _Input=require("./basic/Input"); +var _Title=require("./basic/Title"); +var _Fab=require("./basic/Fab"); +var _Left=require("./basic/Left"); +var _Right=require("./basic/Right"); +var _Body=require("./basic/Body"); +var _Badge=require("./basic/Badge"); +var _Checkbox=require("./basic/Checkbox"); +var _Radio=require("./basic/Radio"); +var _Thumbnail=require("./basic/Thumbnail"); +var _Card=require("./basic/Card"); +var _CardItem=require("./basic/CardItem"); +var _H=require("./basic/H1"); +var _H2=require("./basic/H2"); +var _H3=require("./basic/H3"); +var _Spinner=require("./basic/Spinner"); +var _Switch=require("./basic/Switch"); +var _Container=require("./basic/Container"); +var _Content=require("./basic/Content"); +var _Footer=require("./basic/Footer"); +var _FooterTab=require("./basic/FooterTab"); +var _Form=require("./basic/Form"); +var _ToastContainer=require("./basic/ToastContainer"); +var _Actionsheet=require("./basic/Actionsheet"); +var _Picker=require("./basic/Picker"); +var _List=require("./basic/List"); +var _ListItem=require("./basic/ListItem"); +var _Separator=require("./basic/Separator"); +var _DeckSwiper=require("./basic/DeckSwiper"); +var _Item=require("./basic/Item"); +var _Segment=require("./basic/Segment"); +var _Label=require("./basic/Label"); +var _Textarea=require("./basic/Textarea"); +var _Tab=require("./basic/Tab"); +var _Tabs=require("./basic/Tabs");var _Tabs2=_interopRequireDefault(_Tabs); +var _DefaultTabBar=require("./basic/Tabs/DefaultTabBar"); +var _ScrollableTabBar=require("./basic/Tabs/ScrollableTabBar"); +var _STabs=require("./smart/STabs"); +var _Subtitle=require("./backward/Widgets/Subtitle");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} (0,_init2.default)();exports. diff --git a/dist/src/index.js.map b/dist/src/index.js.map index 9c414e2b3..0726d2754 100644 --- a/dist/src/index.js.map +++ b/dist/src/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/index.js"],"names":["Swipeout","getTheme","variables","StyleProvider","connectStyle","Drawer","Button","IconNB","Icon","Header","Form","InputGroup","Input","Title","Fab","Left","Right","Body","Badge","CheckBox","Radio","Thumbnail","Card","CardItem","H1","H2","H3","Spinner","Switch","Container","Content","Footer","Tab","Tabs","FooterTab","Picker","List","ListItem","Separator","DeckSwiper","Item","Subtitle","Label","Textarea","Gravatar","Col","Row","Grid","Text","STabs","TabContent","View","Toast","ScrollableTab","ActionSheet","TabHeading","TabContainer","DefaultTabBar","Segment","mapPropsToStyleNames","styleNames","props"],"mappings":"u/BAAA;AACA;AACA;AACA;AACA,4B;AACA,8C;AACA,oD;AACA,sC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;AACA;AACA;AACA;AACA,qD;;AAEA,qB;;;AAGEA,Q;AACAC,Q;AACAC,S;AACAC,a;AACAC,Y;AACAC,M;AACAC,M;AACAC,M;AACAC,I;AACAC,M;AACAC,I;AACAC,U;AACAC,K;AACAC,K;AACAC,G;AACAC,I;AACAC,K;AACAC,I;AACAC,K;AACAC,Q;AACAC,K;AACAC,S;AACAC,I;AACAC,Q;AACAC,E;AACAC,E;AACAC,E;AACAC,O;AACAC,M;AACAC,S;AACAC,O;AACAC,M;AACAC,G;AACqBC,I;AACrBC,S;AACYC,M;AACZC,I;AACAC,Q;AACAC,S;AACAC,U;AACAC,I;AACAC,Q;AACAC,K;AACAC,Q;AACAC,Q;AACAC,G;AACAC,G;AACAC,I;AACAC,I;AACAC,K;AACWC,U;AACXC,I;AACkBC,K;AAClBC,a;AACwBC,W;AACxBC,U;AACAC,Y;AACAC,a;AACAC,O;;;AAGF,GAAMC,sBAAuB,QAAvBA,qBAAuB,CAACC,UAAD,CAAaC,KAAb,QAAuB,iBAAKA,KAAL,CAAvB,EAA7B,C;;AAESF,oB,CAAAA,oB","file":"index.js","sourcesContent":["import { StyleProvider, connectStyle } from 'native-base-shoutem-theme';\nimport { keys } from 'lodash';\nimport { Col, Row, Grid } from 'react-native-easy-grid';\nimport { Gravatar } from './backward/Widgets/Gravatar';\nimport setDefaultThemeStyle from './init';\nimport getTheme from './theme/components';\nimport variables from './theme/variables/platform';\nimport Drawer from './basic/Drawer';\nimport { Swipeout } from './basic/Swipe';\nimport { Text } from './basic/Text';\nimport { ViewNB as View } from './basic/View';\nimport { Button } from './basic/Button';\nimport { TabHeading } from './basic/TabHeading';\nimport { TabContainer } from './basic/TabContainer';\nimport { IconNB } from './basic/IconNB';\nimport { Icon } from './basic/Icon';\nimport { Header } from './basic/Header';\nimport { InputGroup } from './basic/InputGroup';\nimport { Input } from './basic/Input';\nimport { Title } from './basic/Title';\nimport { Fab } from './basic/Fab';\nimport { Left } from './basic/Left';\nimport { Right } from './basic/Right';\nimport { Body } from './basic/Body';\nimport { Badge } from './basic/Badge';\nimport { CheckBox } from './basic/Checkbox';\nimport { Radio } from './basic/Radio';\nimport { Thumbnail } from './basic/Thumbnail';\nimport { Card } from './basic/Card';\nimport { CardItem } from './basic/CardItem';\nimport { H1 } from './basic/H1';\nimport { H2 } from './basic/H2';\nimport { H3 } from './basic/H3';\nimport { Spinner } from './basic/Spinner';\nimport { Switch } from './basic/Switch';\nimport { Container } from './basic/Container';\nimport { Content } from './basic/Content';\nimport { Footer } from './basic/Footer';\nimport { FooterTab } from './basic/FooterTab';\nimport { Form } from './basic/Form';\nimport { ToastContainer } from './basic/ToastContainer';\nimport { ActionSheetContainer } from './basic/Actionsheet';\nimport { PickerNB } from './basic/Picker';\nimport { List } from './basic/List';\nimport { ListItem } from './basic/ListItem';\nimport { Separator } from './basic/Separator';\nimport { DeckSwiper } from './basic/DeckSwiper';\nimport { Item } from './basic/Item';\nimport { Segment } from './basic/Segment';\nimport { Label } from './basic/Label';\nimport { Textarea } from './basic/Textarea';\nimport { Tab } from './basic/Tab';\nimport ScrollableTabView from './basic/Tabs';\nimport { DefaultTabBar } from './basic/Tabs/DefaultTabBar';\nimport { ScrollableTab } from './basic/Tabs/ScrollableTabBar';\nimport { STabs } from './smart/STabs';\nimport { Subtitle } from './backward/Widgets/Subtitle';\n\nsetDefaultThemeStyle();\n// Theme\nexport {\n Swipeout,\n getTheme,\n variables,\n StyleProvider,\n connectStyle,\n Drawer,\n Button,\n IconNB,\n Icon,\n Header,\n Form,\n InputGroup,\n Input,\n Title,\n Fab,\n Left,\n Right,\n Body,\n Badge,\n CheckBox,\n Radio,\n Thumbnail,\n Card,\n CardItem,\n H1,\n H2,\n H3,\n Spinner,\n Switch,\n Container,\n Content,\n Footer,\n Tab,\n ScrollableTabView as Tabs,\n FooterTab,\n PickerNB as Picker,\n List,\n ListItem,\n Separator,\n DeckSwiper,\n Item,\n Subtitle,\n Label,\n Textarea,\n Gravatar,\n Col,\n Row,\n Grid,\n Text,\n STabs,\n Content as TabContent,\n View,\n ToastContainer as Toast,\n ScrollableTab,\n ActionSheetContainer as ActionSheet,\n TabHeading,\n TabContainer,\n DefaultTabBar,\n Segment,\n};\n\nconst mapPropsToStyleNames = (styleNames, props) => keys(props);\n\nexport { mapPropsToStyleNames };\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/index.js"],"names":["Swipeout","getTheme","variables","StyleProvider","connectStyle","Drawer","Button","IconNB","Icon","Header","Form","InputGroup","Input","Title","Fab","Left","Right","Body","Badge","CheckBox","Radio","Thumbnail","Card","CardItem","H1","H2","H3","Spinner","Switch","Container","Content","Footer","Tab","Tabs","FooterTab","Picker","List","ListItem","Separator","DeckSwiper","Item","Subtitle","Label","Textarea","Gravatar","Col","Row","Grid","Text","STabs","TabContent","View","Toast","ScrollableTab","ActionSheet","TabHeading","TabContainer","DefaultTabBar","Segment","mapPropsToStyleNames","styleNames","props"],"mappings":"u/BAAA;AACA;AACA;AACA;AACA,4B;AACA,8C;AACA,oD;AACA,sC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;AACA;AACA;AACA;AACA,qD;;AAEA,qB;;;AAGEA,Q;AACAC,Q;AACAC,S;AACAC,a;AACAC,Y;AACAC,M;AACAC,M;AACAC,M;AACAC,I;AACAC,M;AACAC,I;AACAC,U;AACAC,K;AACAC,K;AACAC,G;AACAC,I;AACAC,K;AACAC,I;AACAC,K;AACAC,Q;AACAC,K;AACAC,S;AACAC,I;AACAC,Q;AACAC,E;AACAC,E;AACAC,E;AACAC,O;AACAC,M;AACAC,S;AACAC,O;AACAC,M;AACAC,G;AACqBC,I;AACrBC,S;AACYC,M;AACZC,I;AACAC,Q;AACAC,S;AACAC,U;AACAC,I;AACAC,Q;AACAC,K;AACAC,Q;AACAC,Q;AACAC,G;AACAC,G;AACAC,I;AACAC,I;AACAC,K;AACWC,U;AACXC,I;AACkBC,K;AAClBC,a;AACwBC,W;AACxBC,U;AACAC,Y;AACAC,a;AACAC,O;;;AAGF,GAAMC,sBAAuB,QAAvBA,qBAAuB,CAACC,UAAD,CAAaC,KAAb,QAAuB,iBAAKA,KAAL,CAAvB,EAA7B,C;;AAESF,oB,CAAAA,oB","file":"index.js","sourcesContent":["import { StyleProvider, connectStyle } from \"native-base-shoutem-theme\";\nimport { keys } from \"lodash\";\nimport { Col, Row, Grid } from \"react-native-easy-grid\";\nimport { Gravatar } from \"./backward/Widgets/Gravatar\";\nimport setDefaultThemeStyle from \"./init\";\nimport getTheme from \"./theme/components\";\nimport variables from \"./theme/variables/platform\";\nimport Drawer from \"./basic/Drawer\";\nimport { Swipeout } from \"./basic/Swipe\";\nimport { Text } from \"./basic/Text\";\nimport { ViewNB as View } from \"./basic/View\";\nimport { Button } from \"./basic/Button\";\nimport { TabHeading } from \"./basic/TabHeading\";\nimport { TabContainer } from \"./basic/TabContainer\";\nimport { IconNB } from \"./basic/IconNB\";\nimport { Icon } from \"./basic/Icon\";\nimport { Header } from \"./basic/Header\";\nimport { InputGroup } from \"./basic/InputGroup\";\nimport { Input } from \"./basic/Input\";\nimport { Title } from \"./basic/Title\";\nimport { Fab } from \"./basic/Fab\";\nimport { Left } from \"./basic/Left\";\nimport { Right } from \"./basic/Right\";\nimport { Body } from \"./basic/Body\";\nimport { Badge } from \"./basic/Badge\";\nimport { CheckBox } from \"./basic/Checkbox\";\nimport { Radio } from \"./basic/Radio\";\nimport { Thumbnail } from \"./basic/Thumbnail\";\nimport { Card } from \"./basic/Card\";\nimport { CardItem } from \"./basic/CardItem\";\nimport { H1 } from \"./basic/H1\";\nimport { H2 } from \"./basic/H2\";\nimport { H3 } from \"./basic/H3\";\nimport { Spinner } from \"./basic/Spinner\";\nimport { Switch } from \"./basic/Switch\";\nimport { Container } from \"./basic/Container\";\nimport { Content } from \"./basic/Content\";\nimport { Footer } from \"./basic/Footer\";\nimport { FooterTab } from \"./basic/FooterTab\";\nimport { Form } from \"./basic/Form\";\nimport { ToastContainer } from \"./basic/ToastContainer\";\nimport { ActionSheetContainer } from \"./basic/Actionsheet\";\nimport { PickerNB } from \"./basic/Picker\";\nimport { List } from \"./basic/List\";\nimport { ListItem } from \"./basic/ListItem\";\nimport { Separator } from \"./basic/Separator\";\nimport { DeckSwiper } from \"./basic/DeckSwiper\";\nimport { Item } from \"./basic/Item\";\nimport { Segment } from \"./basic/Segment\";\nimport { Label } from \"./basic/Label\";\nimport { Textarea } from \"./basic/Textarea\";\nimport { Tab } from \"./basic/Tab\";\nimport ScrollableTabView from \"./basic/Tabs\";\nimport { DefaultTabBar } from \"./basic/Tabs/DefaultTabBar\";\nimport { ScrollableTab } from \"./basic/Tabs/ScrollableTabBar\";\nimport { STabs } from \"./smart/STabs\";\nimport { Subtitle } from \"./backward/Widgets/Subtitle\";\n\nsetDefaultThemeStyle();\n// Theme\nexport {\n Swipeout,\n getTheme,\n variables,\n StyleProvider,\n connectStyle,\n Drawer,\n Button,\n IconNB,\n Icon,\n Header,\n Form,\n InputGroup,\n Input,\n Title,\n Fab,\n Left,\n Right,\n Body,\n Badge,\n CheckBox,\n Radio,\n Thumbnail,\n Card,\n CardItem,\n H1,\n H2,\n H3,\n Spinner,\n Switch,\n Container,\n Content,\n Footer,\n Tab,\n ScrollableTabView as Tabs,\n FooterTab,\n PickerNB as Picker,\n List,\n ListItem,\n Separator,\n DeckSwiper,\n Item,\n Subtitle,\n Label,\n Textarea,\n Gravatar,\n Col,\n Row,\n Grid,\n Text,\n STabs,\n Content as TabContent,\n View,\n ToastContainer as Toast,\n ScrollableTab,\n ActionSheetContainer as ActionSheet,\n TabHeading,\n TabContainer,\n DefaultTabBar,\n Segment\n};\n\nconst mapPropsToStyleNames = (styleNames, props) => keys(props);\n\nexport { mapPropsToStyleNames };\n"]} \ No newline at end of file diff --git a/dist/src/init.js b/dist/src/init.js index b7ea6f629..ece96ecfe 100644 --- a/dist/src/init.js +++ b/dist/src/init.js @@ -1,7 +1,7 @@ Object.defineProperty(exports,"__esModule",{value:true});exports.default= -setDefaultThemeStyle;var _nativeBaseShoutemTheme=require('native-base-shoutem-theme');var _components=require('./theme/components');var _components2=_interopRequireDefault(_components);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function setDefaultThemeStyle(){ +setDefaultThemeStyle;var _nativeBaseShoutemTheme=require("native-base-shoutem-theme");var _components=require("./theme/components");var _components2=_interopRequireDefault(_components);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function setDefaultThemeStyle(){ var theme=(0,_components2.default)(); _nativeBaseShoutemTheme.Theme.setDefaultThemeStyle(theme); } diff --git a/dist/src/init.js.map b/dist/src/init.js.map index 5bb5b6919..16943dde4 100644 --- a/dist/src/init.js.map +++ b/dist/src/init.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/init.js"],"names":["setDefaultThemeStyle","theme"],"mappings":";;;AAGwBA,oB,CAHxB,iEACA,8C,wIAEe,QAASA,qBAAT,EAAgC;AAC7C,GAAMC,OAAQ,0BAAd;AACA,8BAAMD,oBAAN,CAA2BC,KAA3B;AACD","file":"init.js","sourcesContent":["import { Theme } from 'native-base-shoutem-theme';\nimport getThemeStyle from './theme/components';\n\nexport default function setDefaultThemeStyle() {\n const theme = getThemeStyle();\n Theme.setDefaultThemeStyle(theme);\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/init.js"],"names":["setDefaultThemeStyle","theme"],"mappings":";;;AAGwBA,oB,CAHxB,iEACA,8C,wIAEe,QAASA,qBAAT,EAAgC;AAC7C,GAAMC,OAAQ,0BAAd;AACA,8BAAMD,oBAAN,CAA2BC,KAA3B;AACD","file":"init.js","sourcesContent":["import { Theme } from \"native-base-shoutem-theme\";\nimport getThemeStyle from \"./theme/components\";\n\nexport default function setDefaultThemeStyle() {\n const theme = getThemeStyle();\n Theme.setDefaultThemeStyle(theme);\n}\n"]} \ No newline at end of file diff --git a/dist/src/smart/SButton.js b/dist/src/smart/SButton.js index cc248f209..0946cdf60 100644 --- a/dist/src/smart/SButton.js +++ b/dist/src/smart/SButton.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.SButton=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n {(this.props.iconLeft) ? {this.props.iconLeft} : }\n {(this.props.buttonText) ? \n {this.props.buttonText} : }\n {(this.props.iconRight) ? {this.props.iconRight} : }\n \n );\n }\n}\n\nSButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n iconLeft: React.PropTypes.object,\n buttonText: React.PropTypes.string,\n iconRight: React.PropTypes.object,\n buttonTextStyle: React.PropTypes.object,\n};\n\n\nconst StyledSButton = connectStyle('NativeBase.SButton', {}, mapPropsToStyleNames)(SButton);\nexport {\n StyledSButton as SButton,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/smart/SButton.js"],"names":["SButton","_root","c","props","iconLeft","buttonText","buttonTextStyle","iconRight","propTypes","style","PropTypes","object","string","StyledSButton"],"mappings":";;;AAGA,4B;AACA;AACA;AACA;AACA;;AAEA,mE;;AAEMA,O;;AAEK;AACP;AACE,uDAAQ,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAb,EAAsC,KAAKC,KAA3C;AACI,KAAKA,KAAL,CAAWC,QAAZ,CAAwB,iGAAO,KAAKD,KAAL,CAAWC,QAAlB,CAAxB,CAA6D,iGADhE;AAEI,KAAKD,KAAL,CAAWE,UAAZ,CAA0B,0CAAM,MAAO,KAAKF,KAAL,CAAWG,eAAxB;AACxB,KAAKH,KAAL,CAAWE,UADa,CAA1B,CACkC,iGAHrC;AAII,KAAKF,KAAL,CAAWI,SAAZ,CAAyB,iGAAO,KAAKJ,KAAL,CAAWI,SAAlB,CAAzB,CAA+D,iGAJlE,CADF;;;AAQD,C;;;AAGHP,QAAQQ,SAAR;AACK,8BAAiBA,SADtB;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEP,SAAU,gBAAMM,SAAN,CAAgBC,MAH5B;AAIEN,WAAY,gBAAMK,SAAN,CAAgBE,MAJ9B;AAKEL,UAAW,gBAAMG,SAAN,CAAgBC,MAL7B;AAMEL,gBAAiB,gBAAMI,SAAN,CAAgBC,MANnC;;;;AAUA,GAAME,eAAgB,yCAAa,oBAAb,CAAmC,EAAnC,iCAA6Db,OAA7D,CAAtB,C;;AAEmBA,O,CAAjBa,a","file":"SButton.js","sourcesContent":["/* @flow */\n\n\nimport React, { Component } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\nimport { Text } from '../basic/Text';\nimport { Button } from '../basic/Button';\nimport { connectStyle } from 'native-base-shoutem-theme';\n\nimport mapPropsToStyleNames from '../Utils/mapPropsToStyleNames';\n\nclass SButton extends Component {\n\n render() {\n return (\n \n );\n }\n}\n\nSButton.propTypes = {\n ...TouchableOpacity.propTypes,\n style: React.PropTypes.object,\n iconLeft: React.PropTypes.object,\n buttonText: React.PropTypes.string,\n iconRight: React.PropTypes.object,\n buttonTextStyle: React.PropTypes.object,\n};\n\n\nconst StyledSButton = connectStyle('NativeBase.SButton', {}, mapPropsToStyleNames)(SButton);\nexport {\n StyledSButton as SButton,\n};\n"]} \ No newline at end of file diff --git a/dist/src/smart/SHeader.js b/dist/src/smart/SHeader.js index 864e859f8..b59cf1ba2 100644 --- a/dist/src/smart/SHeader.js +++ b/dist/src/smart/SHeader.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.SHeader=undefined;var _extends=Object.assign||function(target){for(var i=1;i this._root = c} {...this.props}>\n \n {(this.props.leftButton) ? {this.props.leftButton} : }\n \n \n {(this.props.title) ? \n {this.props.title} : }\n \n \n {(this.props.rightButton) ? {this.props.rightButton} : }\n \n
\n );\n }\n}\n\nSHeader.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n leftButton: React.PropTypes.object,\n title: React.PropTypes.string,\n rightButton: React.PropTypes.object,\n leftButtonStyle: React.PropTypes.object,\n titleStyle: React.PropTypes.object,\n rightButtonStyle: React.PropTypes.object,\n};\n\nconst StyledSHeader = connectStyle('NativeBase.SHeader', {}, mapPropsToStyleNames)(SHeader);\nexport {\n StyledSHeader as SHeader,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/smart/SHeader.js"],"names":["SHeader","_root","c","props","leftButton","leftButtonPress","leftButtonStyle","title","titleStyle","rightButton","rightButtonPress","rightButtonStyle","propTypes","style","PropTypes","object","string","StyledSHeader"],"mappings":";AACA,4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mE;;AAEMA,O;;AAEK;AACP;AACE,uDAAQ,IAAK,sBAAK,QAAKC,KAAL,CAAaC,CAAlB,EAAb,EAAsC,KAAKC,KAA3C;AACE;AACI,KAAKA,KAAL,CAAWC,UAAZ,CAA0B;AACzB,gBADyB,CACb,QAAS,KAAKD,KAAL,CAAWE,eADP;AAEzB,MAAO,KAAKF,KAAL,CAAWG,eAFO;AAGzB,KAAKH,KAAL,CAAWC,UAHc,CAA1B,CAGmC,iGAJtC,CADF;;AAOE;AACI,KAAKD,KAAL,CAAWI,KAAZ,CAAqB,4CAAO,MAAO,KAAKJ,KAAL,CAAWK,UAAzB;AACnB,KAAKL,KAAL,CAAWI,KADQ,CAArB,CAC8B,iGAFjC,CAPF;;AAWE;AACI,KAAKJ,KAAL,CAAWM,WAAZ,CAA2B;AAC1B,gBAD0B;AAE1B,QAAS,KAAKN,KAAL,CAAWO,gBAFM,CAEY,MAAO,KAAKP,KAAL,CAAWQ,gBAF9B;AAG1B,KAAKR,KAAL,CAAWM,WAHe,CAA3B,CAGoC,iGAJvC,CAXF,CADF;;;;AAoBD,C;;;AAGHT,QAAQY,SAAR;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGEX,WAAY,gBAAMU,SAAN,CAAgBC,MAH9B;AAIER,MAAO,gBAAMO,SAAN,CAAgBE,MAJzB;AAKEP,YAAa,gBAAMK,SAAN,CAAgBC,MAL/B;AAMET,gBAAiB,gBAAMQ,SAAN,CAAgBC,MANnC;AAOEP,WAAY,gBAAMM,SAAN,CAAgBC,MAP9B;AAQEJ,iBAAkB,gBAAMG,SAAN,CAAgBC,MARpC;;;AAWA,GAAME,eAAgB,yCAAa,oBAAb,CAAmC,EAAnC,iCAA6DjB,OAA7D,CAAtB,C;;AAEmBA,O,CAAjBiB,a","file":"SHeader.js","sourcesContent":["\nimport React, { Component } from 'react';\nimport { View, ViewPropTypes } from 'react-native';\nimport { Left } from '../basic/Left';\nimport { Body } from '../basic/Body';\nimport { Right } from '../basic/Right';\nimport { Header } from '../basic/Header';\nimport { Button } from '../basic/Button';\nimport { Title } from '../basic/Title';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../Utils/mapPropsToStyleNames';\n\nclass SHeader extends Component {\n\n render() {\n return (\n
this._root = c} {...this.props}>\n \n {(this.props.leftButton) ? {this.props.leftButton} : }\n \n \n {(this.props.title) ? \n {this.props.title} : }\n \n \n {(this.props.rightButton) ? {this.props.rightButton} : }\n \n
\n );\n }\n}\n\nSHeader.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n leftButton: React.PropTypes.object,\n title: React.PropTypes.string,\n rightButton: React.PropTypes.object,\n leftButtonStyle: React.PropTypes.object,\n titleStyle: React.PropTypes.object,\n rightButtonStyle: React.PropTypes.object,\n};\n\nconst StyledSHeader = connectStyle('NativeBase.SHeader', {}, mapPropsToStyleNames)(SHeader);\nexport {\n StyledSHeader as SHeader,\n};\n"]} \ No newline at end of file diff --git a/dist/src/smart/STabs/TabBar.js b/dist/src/smart/STabs/TabBar.js index b895d8b91..bb242c5eb 100644 --- a/dist/src/smart/STabs/TabBar.js +++ b/dist/src/smart/STabs/TabBar.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.TabBar=undefined;var _extends=Object.assign||function(target){for(var i=1;i\n this.props.goToPage(page)}\n isTabActive={this.props.activeTab === page}\n >\n {name}\n \n \n );\n }\n\n renderTab(props) {\n const newTab = [];\n props.tabs.forEach((tabLabel, index) => {\n newTab.push({ label: tabLabel, icon: props.tabIcon[index] });\n });\n return this.renderNewTab(newTab);\n }\n\n renderNewTab(newTab) {\n return newTab.map((tab, i) => this.renderButtonTab(tab.label, tab.icon, i));\n }\n\n renderButtonTab(label, icon, page) {\n const isTabActive = this.props.activeTab === page;\n\n return (\n \n \n \n );\n }\n\n render() {\n const containerWidth = Dimensions.get('window').width;\n const numberOfTabs = this.props.tabs.length;\n const tabUnderlineStyle = {\n position: 'absolute',\n width: containerWidth / numberOfTabs,\n height: 4,\n backgroundColor: variables.sTabBarActiveTextColor,\n bottom: 0,\n };\n const left = this.props.scrollValue.interpolate({\n inputRange: [0, 1], outputRange: [0, containerWidth / numberOfTabs],\n });\n return (\n this._root = c} {...this.props}>\n {(this.props.iconPresent) ? this.renderTab(this.props) :\n this.props.tabs.map((tab, i) => this.renderLabelOption(tab, i))}\n \n \n );\n }\n}\n\nTabBar.propTypes = {\n ...ViewPropTypes,\n};\n\nconst StyledTabBar = connectStyle('NativeBase.TabBar', {}, mapPropsToStyleNames)(TabBar);\n\nexport {\n StyledTabBar as TabBar,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/smart/STabs/TabBar.js"],"names":["TabBar","name","page","isTabActive","props","activeTab","flex","tabBarStyle","goToPage","tabBarTextStyle","newTab","tabs","forEach","tabLabel","index","push","label","icon","tabIcon","renderNewTab","map","tab","i","renderButtonTab","flexDirection","vertical","tabBarIconStyle","containerWidth","get","width","numberOfTabs","length","tabUnderlineStyle","position","height","backgroundColor","sTabBarActiveTextColor","bottom","left","scrollValue","interpolate","inputRange","outputRange","_root","c","iconPresent","renderTab","renderLabelOption","underlineStyle","propTypes","StyledTabBar"],"mappings":"61BAAA,4B;AACA;AACA;AACA;AACA;AACA,wD;AACA;AACA,sE;AACMA,M;;AAEcC,I,CAAMC,I,CAAM;AAC5B,GAAMC,aAAc,KAAKC,KAAL,CAAWC,SAAX,GAAyBH,IAA7C;;AAEA;AACE,iDAAM,MAAO,CAAC,CAAEI,KAAM,CAAR,CAAD,CAAc,KAAKF,KAAL,CAAWG,WAAzB,CAAb,CAAoD,IAAKN,IAAzD;AACE;AACE,gBADF,CACc,QAAS,yBAAM,QAAKG,KAAL,CAAWI,QAAX,CAAoBN,IAApB,CAAN,EADvB;AAEE,YAAa,KAAKE,KAAL,CAAWC,SAAX,GAAyBH,IAFxC;;AAIE,0CAAM,MAAO,KAAKE,KAAL,CAAWK,eAAxB,iDAA0CR,IAA1C,CAJF,CADF,CADF;;;;AAUD,C;;AAESG,K,CAAO;AACf,GAAMM,QAAS,EAAf;AACAN,MAAMO,IAAN,CAAWC,OAAX,CAAmB,SAACC,QAAD,CAAWC,KAAX,CAAqB;AACtCJ,OA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,OAAQ,CALgB,CAA1B;;AAOA,GAAMC,MAAO,KAAKlC,KAAL,CAAWmC,WAAX,CAAuBC,WAAvB,CAAmC;AAC9CC,WAAY,CAAC,CAAD,CAAI,CAAJ,CADkC,CAC1BC,YAAa,CAAC,CAAD,CAAIf,eAAiBG,YAArB,CADa,CAAnC,CAAb;;AAGA;AACE,0DAAM,IAAK,sBAAK,QAAKa,KAAL,CAAaC,CAAlB,EAAX,EAAoC,KAAKxC,KAAzC;AACI,KAAKA,KAAL,CAAWyC,WAAZ,CAA2B,KAAKC,SAAL,CAAe,KAAK1C,KAApB,CAA3B;AACC,KAAKA,KAAL,CAAWO,IAAX,CAAgBS,GAAhB,CAAoB,SAACC,GAAD,CAAMC,CAAN,QAAY,QAAKyB,iBAAL,CAAuB1B,GAAvB,CAA4BC,CAA5B,CAAZ,EAApB,CAFJ;AAGE,oDAAU,IAAV,EAAe,MAAO,CAACU,iBAAD,CAAoB,CAAEM,SAAF,CAApB,CAA8B,KAAKlC,KAAL,CAAW4C,cAAzC,CAAtB,iDAHF,CADF;;;AAOD,C;;;AAGHhD,OAAOiD,SAAP;;;;AAIA,GAAMC,cAAe,yCAAa,mBAAb,CAAkC,EAAlC,iCAA4DlD,MAA5D,CAArB,C;;;AAGkBA,M,CAAhBkD,Y","file":"TabBar.js","sourcesContent":["import React, { Component } from 'react';\nimport { View, Animated, Dimensions, ViewPropTypes } from 'react-native';\nimport { IconNB } from '../../basic/IconNB';\nimport { Button } from '../../basic/Button';\nimport { Text } from '../../basic/Text';\nimport variables from '../../theme/variables/platform';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\nclass TabBar extends Component {\n\n renderLabelOption(name, page) {\n const isTabActive = this.props.activeTab === page;\n\n return (\n \n this.props.goToPage(page)}\n isTabActive={this.props.activeTab === page}\n >\n {name}\n \n \n );\n }\n\n renderTab(props) {\n const newTab = [];\n props.tabs.forEach((tabLabel, index) => {\n newTab.push({ label: tabLabel, icon: props.tabIcon[index] });\n });\n return this.renderNewTab(newTab);\n }\n\n renderNewTab(newTab) {\n return newTab.map((tab, i) => this.renderButtonTab(tab.label, tab.icon, i));\n }\n\n renderButtonTab(label, icon, page) {\n const isTabActive = this.props.activeTab === page;\n\n return (\n \n \n \n );\n }\n\n render() {\n const containerWidth = Dimensions.get('window').width;\n const numberOfTabs = this.props.tabs.length;\n const tabUnderlineStyle = {\n position: 'absolute',\n width: containerWidth / numberOfTabs,\n height: 4,\n backgroundColor: variables.sTabBarActiveTextColor,\n bottom: 0,\n };\n const left = this.props.scrollValue.interpolate({\n inputRange: [0, 1], outputRange: [0, containerWidth / numberOfTabs],\n });\n return (\n this._root = c} {...this.props}>\n {(this.props.iconPresent) ? this.renderTab(this.props) :\n this.props.tabs.map((tab, i) => this.renderLabelOption(tab, i))}\n \n \n );\n }\n}\n\nTabBar.propTypes = {\n ...ViewPropTypes,\n};\n\nconst StyledTabBar = connectStyle('NativeBase.TabBar', {}, mapPropsToStyleNames)(TabBar);\n\nexport {\n StyledTabBar as TabBar,\n};\n"]} \ No newline at end of file diff --git a/dist/src/smart/STabs/index.js b/dist/src/smart/STabs/index.js index 87224e44e..fa7a5aa97 100644 --- a/dist/src/smart/STabs/index.js +++ b/dist/src/smart/STabs/index.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.STabs=undefined;var _extends=Object.assign||function(target){for(var i=1;i {},\n onScroll: () => {},\n scrollWithoutAnimation: false,\n };\n }\n\n constructor(props) {\n super(props);\n const currentPage = (this.props.initialPage) ? this.props.initialPage : 0;\n this.state = {\n scrollValue: new Animated.Value(this.props.initialPage),\n containerWidth: Dimensions.get('window').width,\n currentPage,\n };\n }\n componentWillReceiveProps(props) {\n if (props.page >= 0 && props.page !== this.state.currentPage) {\n this.goToPage(props.page);\n }\n }\n\n goToPage(pageNumber) {\n if (Platform.OS === 'ios') {\n const offset = pageNumber * this.state.containerWidth;\n if (this.scrollView) {\n this.scrollView.scrollTo({ x: offset, y: 0, animated: !this.props.scrollWithoutAnimation });\n }\n } else if (this.scrollView) {\n if (this.props.scrollWithoutAnimation) {\n this.scrollView.setPageWithoutAnimation(pageNumber);\n } else {\n this.scrollView.setPage(pageNumber);\n }\n }\n\n const currentPage = this.state.currentPage;\n this.contentKey({\n page: pageNumber,\n callback: this.tabChange.bind(this, currentPage, pageNumber),\n });\n }\n\n\n contentKey({ page, children = this.props.children, callback = () => {} }) {\n const newKeys = page;\n this.setState({ currentPage: page, sceneKeys: newKeys }, callback);\n }\n\n tabChange(prevPage, currentPage) {\n this.props.onChangeTab({\n i: currentPage,\n ref: this.tabContent()[currentPage],\n from: prevPage,\n });\n }\n\n getScrollValue(value) {\n this.state.scrollValue.setValue(value);\n this.props.onScroll(value);\n }\n\n renderContent() {\n const content = this.getContent();\n if (Platform.OS === 'ios') {\n return ( { this.scrollView = scrollView; }}\n onScroll={(e) => {\n const offsetX = e.nativeEvent.contentOffset.x;\n this.getScrollValue(offsetX / this.state.containerWidth);\n }}\n scrollEventThrottle={16}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n scrollEnabled={!this.props.locked}\n directionalLockEnabled\n alwaysBounceVertical={false}\n >\n {content}\n );\n } else {\n return ( {\n const { offset, position } = e.nativeEvent;\n this.getScrollValue(position + offset);\n }}\n ref={(scrollView) => { this.scrollView = scrollView; }}\n >\n {content}\n );\n }\n }\n\n getContent() {\n return this.tabContent().map((child, idx) => \n {child}\n );\n }\n\n tabContent() {\n return React.Children.map(this.props.children, child => child);\n }\n\n renderTab(props) {\n if (this.props.renderTabBar === false) {\n return null;\n } else if (this.props.renderTabBar) {\n return React.cloneElement(this.props.renderTabBar(props), props);\n } else {\n return ;\n }\n }\n\n render() {\n const tabBarProps = {\n goToPage: this.goToPage.bind(this),\n tabs: this.props.children.map(child => child && child.props.tabLabel),\n tabIcon: this.props.children.map(child => child && child.props.tabIcon),\n activeTab: this.state.currentPage,\n iconPresent: (this.props.children[0].props.tabIcon) ? true : false,\n tabBarTextStyle: this.props.tabBarTextStyle,\n tabBarIconStyle: this.props.tabBarIconStyle,\n tabBarUnderlineColor: this.props.tabBarUnderlineColor,\n underlineStyle: this.props.underlineStyle,\n tabBarStyle: this.props.tabBarStyle,\n scrollValue: this.state.scrollValue,\n };\n\n return (\n this._root = c} {...this.props}>\n {this.props.tabBarPosition === 'top' && this.renderTab(tabBarProps)}\n {this.renderContent()}\n \n {this.props.tabBarPosition === 'bottom' && this.renderTab(tabBarProps)}\n \n \n );\n }\n}\n\nSTabs.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n initialPage: React.PropTypes.number,\n tabBarPosition: React.PropTypes.string,\n tabBarTextStyle: React.PropTypes.object,\n tabBarIconStyle: React.PropTypes.object,\n tabBarStyle: React.PropTypes.object,\n underlineStyle: React.PropTypes.object,\n vertical: React.PropTypes.bool,\n};\n\nconst StyledSTabs = connectStyle('NativeBase.STabs', {}, mapPropsToStyleNames)(STabs);\n\nexport {\n StyledSTabs as STabs,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/smart/STabs/index.js"],"names":["STabs","tabBarPosition","initialPage","page","locked","onChangeTab","onScroll","scrollWithoutAnimation","props","currentPage","state","scrollValue","Value","containerWidth","get","width","goToPage","pageNumber","OS","offset","scrollView","scrollTo","x","y","animated","setPageWithoutAnimation","setPage","contentKey","callback","tabChange","bind","children","newKeys","setState","sceneKeys","prevPage","i","ref","tabContent","from","value","setValue","content","getContent","e","offsetX","nativeEvent","contentOffset","getScrollValue","flex","position","map","child","idx","Children","renderTabBar","cloneElement","vertical","tabBarProps","tabs","tabLabel","tabIcon","activeTab","iconPresent","tabBarTextStyle","tabBarIconStyle","tabBarUnderlineColor","underlineStyle","tabBarStyle","_root","c","renderTab","renderContent","bottom","propTypes","style","PropTypes","object","number","string","bool","StyledSTabs"],"mappings":"21BAAA,4B;AACA;AACA;AACA,sE;;AAEA,gC;AACMA,K;;AAEsB;AACxB,MAAO;AACLC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,EAAvG;AACG,KAAKV,KAAL,CAAWP,cAAX,GAA8B,QAA9B,EAA0C,KAAKsE,SAAL,CAAeb,WAAf,CAD7C,CAHF,CADF;;;;AASD,C;;;AAGH1D,MAAM0E,SAAN;;AAEEC,MAAO,gBAAMC,SAAN,CAAgBC,MAFzB;AAGE3E,YAAa,gBAAM0E,SAAN,CAAgBE,MAH/B;AAIE7E,eAAgB,gBAAM2E,SAAN,CAAgBG,MAJlC;AAKEf,gBAAiB,gBAAMY,SAAN,CAAgBC,MALnC;AAMEZ,gBAAiB,gBAAMW,SAAN,CAAgBC,MANnC;AAOET,YAAa,gBAAMQ,SAAN,CAAgBC,MAP/B;AAQEV,eAAgB,gBAAMS,SAAN,CAAgBC,MARlC;AASEpB,SAAU,gBAAMmB,SAAN,CAAgBI,IAT5B;;;AAYA,GAAMC,aAAc,yCAAa,kBAAb,CAAiC,EAAjC,iCAA2DjF,KAA3D,CAApB,C;;;AAGiBA,K,CAAfiF,W","file":"index.js","sourcesContent":["import React, { Component } from 'react';\nimport { View, Animated, Dimensions, ScrollView, Platform, ViewPagerAndroid, ViewPropTypes } from 'react-native';\nimport { connectStyle } from 'native-base-shoutem-theme';\nimport mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';\n\nimport { TabBar } from './TabBar';\nclass STabs extends Component {\n\n static get defaultProps() {\n return {\n tabBarPosition: 'top',\n initialPage: 0,\n page: -1,\n locked: true,\n onChangeTab: () => {},\n onScroll: () => {},\n scrollWithoutAnimation: false,\n };\n }\n\n constructor(props) {\n super(props);\n const currentPage = (this.props.initialPage) ? this.props.initialPage : 0;\n this.state = {\n scrollValue: new Animated.Value(this.props.initialPage),\n containerWidth: Dimensions.get('window').width,\n currentPage,\n };\n }\n componentWillReceiveProps(props) {\n if (props.page >= 0 && props.page !== this.state.currentPage) {\n this.goToPage(props.page);\n }\n }\n\n goToPage(pageNumber) {\n if (Platform.OS === 'ios') {\n const offset = pageNumber * this.state.containerWidth;\n if (this.scrollView) {\n this.scrollView.scrollTo({ x: offset, y: 0, animated: !this.props.scrollWithoutAnimation });\n }\n } else if (this.scrollView) {\n if (this.props.scrollWithoutAnimation) {\n this.scrollView.setPageWithoutAnimation(pageNumber);\n } else {\n this.scrollView.setPage(pageNumber);\n }\n }\n\n const currentPage = this.state.currentPage;\n this.contentKey({\n page: pageNumber,\n callback: this.tabChange.bind(this, currentPage, pageNumber),\n });\n }\n\n\n contentKey({ page, children = this.props.children, callback = () => {} }) {\n const newKeys = page;\n this.setState({ currentPage: page, sceneKeys: newKeys }, callback);\n }\n\n tabChange(prevPage, currentPage) {\n this.props.onChangeTab({\n i: currentPage,\n ref: this.tabContent()[currentPage],\n from: prevPage,\n });\n }\n\n getScrollValue(value) {\n this.state.scrollValue.setValue(value);\n this.props.onScroll(value);\n }\n\n renderContent() {\n const content = this.getContent();\n if (Platform.OS === 'ios') {\n return ( { this.scrollView = scrollView; }}\n onScroll={(e) => {\n const offsetX = e.nativeEvent.contentOffset.x;\n this.getScrollValue(offsetX / this.state.containerWidth);\n }}\n scrollEventThrottle={16}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n scrollEnabled={!this.props.locked}\n directionalLockEnabled\n alwaysBounceVertical={false}\n >\n {content}\n );\n } else {\n return ( {\n const { offset, position } = e.nativeEvent;\n this.getScrollValue(position + offset);\n }}\n ref={(scrollView) => { this.scrollView = scrollView; }}\n >\n {content}\n );\n }\n }\n\n getContent() {\n return this.tabContent().map((child, idx) => \n {child}\n );\n }\n\n tabContent() {\n return React.Children.map(this.props.children, child => child);\n }\n\n renderTab(props) {\n if (this.props.renderTabBar === false) {\n return null;\n } else if (this.props.renderTabBar) {\n return React.cloneElement(this.props.renderTabBar(props), props);\n } else {\n return ;\n }\n }\n\n render() {\n const tabBarProps = {\n goToPage: this.goToPage.bind(this),\n tabs: this.props.children.map(child => child && child.props.tabLabel),\n tabIcon: this.props.children.map(child => child && child.props.tabIcon),\n activeTab: this.state.currentPage,\n iconPresent: (this.props.children[0].props.tabIcon) ? true : false,\n tabBarTextStyle: this.props.tabBarTextStyle,\n tabBarIconStyle: this.props.tabBarIconStyle,\n tabBarUnderlineColor: this.props.tabBarUnderlineColor,\n underlineStyle: this.props.underlineStyle,\n tabBarStyle: this.props.tabBarStyle,\n scrollValue: this.state.scrollValue,\n };\n\n return (\n this._root = c} {...this.props}>\n {this.props.tabBarPosition === 'top' && this.renderTab(tabBarProps)}\n {this.renderContent()}\n \n {this.props.tabBarPosition === 'bottom' && this.renderTab(tabBarProps)}\n \n \n );\n }\n}\n\nSTabs.propTypes = {\n ...ViewPropTypes,\n style: React.PropTypes.object,\n initialPage: React.PropTypes.number,\n tabBarPosition: React.PropTypes.string,\n tabBarTextStyle: React.PropTypes.object,\n tabBarIconStyle: React.PropTypes.object,\n tabBarStyle: React.PropTypes.object,\n underlineStyle: React.PropTypes.object,\n vertical: React.PropTypes.bool,\n};\n\nconst StyledSTabs = connectStyle('NativeBase.STabs', {}, mapPropsToStyleNames)(STabs);\n\nexport {\n StyledSTabs as STabs,\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Badge.js b/dist/src/theme/components/Badge.js index 33d0ef453..7fd46f850 100644 --- a/dist/src/theme/components/Badge.js +++ b/dist/src/theme/components/Badge.js @@ -1,33 +1,33 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var badgeTheme={ -'.primary':{ +".primary":{ backgroundColor:variables.btnPrimaryBg}, -'.warning':{ +".warning":{ backgroundColor:variables.btnWarningBg}, -'.info':{ +".info":{ backgroundColor:variables.btnInfoBg}, -'.success':{ +".success":{ backgroundColor:variables.btnSuccessBg}, -'.danger':{ +".danger":{ backgroundColor:variables.btnDangerBg}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.badgeColor, fontSize:variables.fontSizeBase, lineHeight:variables.lineHeight-1, -textAlign:'center', +textAlign:"center", paddingHorizontal:3}, backgroundColor:variables.badgeBg, padding:variables.badgePadding, paddingHorizontal:6, -alignSelf:'flex-start', +alignSelf:"flex-start", borderRadius:13.5, height:27}; diff --git a/dist/src/theme/components/Badge.js.map b/dist/src/theme/components/Badge.js.map index 1d0fec8b4..c7247c6c5 100644 --- a/dist/src/theme/components/Badge.js.map +++ b/dist/src/theme/components/Badge.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Badge.js"],"names":["variables","badgeTheme","backgroundColor","btnPrimaryBg","btnWarningBg","btnInfoBg","btnSuccessBg","btnDangerBg","color","badgeColor","fontSize","fontSizeBase","lineHeight","textAlign","paddingHorizontal","badgeBg","padding","badgePadding","alignSelf","borderRadius","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjB,WAAY;AACVC,gBAAiBF,UAAUG,YADjB,CADK;;AAIjB,WAAY;AACVD,gBAAiBF,UAAUI,YADjB,CAJK;;AAOjB,QAAS;AACPF,gBAAiBF,UAAUK,SADpB,CAPQ;;AAUjB,WAAY;AACVH,gBAAiBF,UAAUM,YADjB,CAVK;;AAajB,UAAW;AACTJ,gBAAiBF,UAAUO,WADlB,CAbM;;AAgBjB,kBAAmB;AACjBC,MAAOR,UAAUS,UADA;AAEjBC,SAAUV,UAAUW,YAFH;AAGjBC,WAAYZ,UAAUY,UAAV,CAAuB,CAHlB;AAIjBC,UAAW,QAJM;AAKjBC,kBAAmB,CALF,CAhBF;;AAuBjBZ,gBAAiBF,UAAUe,OAvBV;AAwBjBC,QAAShB,UAAUiB,YAxBF;AAyBjBH,kBAAmB,CAzBF;AA0BjBI,UAAW,YA1BM;AA2BjBC,aAAc,IA3BG;AA4BjBC,OAAQ,EA5BS,CAAnB;;AA8BA,MAAOnB,WAAP;AACD,C","file":"Badge.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const badgeTheme = {\n '.primary': {\n backgroundColor: variables.btnPrimaryBg,\n },\n '.warning': {\n backgroundColor: variables.btnWarningBg,\n },\n '.info': {\n backgroundColor: variables.btnInfoBg,\n },\n '.success': {\n backgroundColor: variables.btnSuccessBg,\n },\n '.danger': {\n backgroundColor: variables.btnDangerBg,\n },\n 'NativeBase.Text': {\n color: variables.badgeColor,\n fontSize: variables.fontSizeBase,\n lineHeight: variables.lineHeight - 1,\n textAlign: 'center',\n paddingHorizontal: 3,\n },\n backgroundColor: variables.badgeBg,\n padding: variables.badgePadding,\n paddingHorizontal: 6,\n alignSelf: 'flex-start',\n borderRadius: 13.5,\n height: 27,\n };\n return badgeTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Badge.js"],"names":["variables","badgeTheme","backgroundColor","btnPrimaryBg","btnWarningBg","btnInfoBg","btnSuccessBg","btnDangerBg","color","badgeColor","fontSize","fontSizeBase","lineHeight","textAlign","paddingHorizontal","badgeBg","padding","badgePadding","alignSelf","borderRadius","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjB,WAAY;AACVC,gBAAiBF,UAAUG,YADjB,CADK;;AAIjB,WAAY;AACVD,gBAAiBF,UAAUI,YADjB,CAJK;;AAOjB,QAAS;AACPF,gBAAiBF,UAAUK,SADpB,CAPQ;;AAUjB,WAAY;AACVH,gBAAiBF,UAAUM,YADjB,CAVK;;AAajB,UAAW;AACTJ,gBAAiBF,UAAUO,WADlB,CAbM;;AAgBjB,kBAAmB;AACjBC,MAAOR,UAAUS,UADA;AAEjBC,SAAUV,UAAUW,YAFH;AAGjBC,WAAYZ,UAAUY,UAAV,CAAuB,CAHlB;AAIjBC,UAAW,QAJM;AAKjBC,kBAAmB,CALF,CAhBF;;AAuBjBZ,gBAAiBF,UAAUe,OAvBV;AAwBjBC,QAAShB,UAAUiB,YAxBF;AAyBjBH,kBAAmB,CAzBF;AA0BjBI,UAAW,YA1BM;AA2BjBC,aAAc,IA3BG;AA4BjBC,OAAQ,EA5BS,CAAnB;;AA8BA,MAAOnB,WAAP;AACD,C","file":"Badge.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const badgeTheme = {\n \".primary\": {\n backgroundColor: variables.btnPrimaryBg\n },\n \".warning\": {\n backgroundColor: variables.btnWarningBg\n },\n \".info\": {\n backgroundColor: variables.btnInfoBg\n },\n \".success\": {\n backgroundColor: variables.btnSuccessBg\n },\n \".danger\": {\n backgroundColor: variables.btnDangerBg\n },\n \"NativeBase.Text\": {\n color: variables.badgeColor,\n fontSize: variables.fontSizeBase,\n lineHeight: variables.lineHeight - 1,\n textAlign: \"center\",\n paddingHorizontal: 3\n },\n backgroundColor: variables.badgeBg,\n padding: variables.badgePadding,\n paddingHorizontal: 6,\n alignSelf: \"flex-start\",\n borderRadius: 13.5,\n height: 27\n };\n return badgeTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Button.js b/dist/src/theme/components/Button.js index 56c6ef925..b631a1cc1 100644 --- a/dist/src/theme/components/Button.js +++ b/dist/src/theme/components/Button.js @@ -1,127 +1,127 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platformStyle=variables.platformStyle; var platform=variables.platform; var buttonTheme={ -'.disabled':{ +".disabled":{ backgroundColor:variables.btnDisabledBg}, -'.bordered':{ -'.dark':{ -'NativeBase.Text':{ -color:'#000'}, +".bordered":{ +".dark":{ +"NativeBase.Text":{ +color:"#000"}, -'NativeBase.Icon':{ -color:'#000'}, +"NativeBase.Icon":{ +color:"#000"}, -'NativeBase.IconNB':{ -color:'#000'}, +"NativeBase.IconNB":{ +color:"#000"}, -backgroundColor:'transparent', -borderColor:'#000', +backgroundColor:"transparent", +borderColor:"#000", borderWidth:variables.borderWidth*2}, -'.light':{ -'NativeBase.Text':{ -color:'#f4f4f4'}, +".light":{ +"NativeBase.Text":{ +color:"#f4f4f4"}, -'NativeBase.Icon':{ -color:'#f4f4f4'}, +"NativeBase.Icon":{ +color:"#f4f4f4"}, -'NativeBase.IconNB':{ -color:'#f4f4f4'}, +"NativeBase.IconNB":{ +color:"#f4f4f4"}, -backgroundColor:'transparent', -borderColor:'#f4f4f4', +backgroundColor:"transparent", +borderColor:"#f4f4f4", borderWidth:variables.borderWidth*2}, -'.primary':{ -'NativeBase.Text':{ +".primary":{ +"NativeBase.Text":{ color:variables.btnPrimaryBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnPrimaryBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnPrimaryBg}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:variables.btnPrimaryBg, borderWidth:variables.borderWidth*2}, -'.success':{ -'NativeBase.Text':{ +".success":{ +"NativeBase.Text":{ color:variables.btnSuccessBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnSuccessBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnSuccessBg}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:variables.btnSuccessBg, borderWidth:variables.borderWidth*2}, -'.info':{ -'NativeBase.Text':{ +".info":{ +"NativeBase.Text":{ color:variables.btnInfoBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnInfoBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnInfoBg}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:variables.btnInfoBg, borderWidth:variables.borderWidth*2}, -'.warning':{ -'NativeBase.Text':{ +".warning":{ +"NativeBase.Text":{ color:variables.btnWarningBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnWarningBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnWarningBg}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:variables.btnWarningBg, borderWidth:variables.borderWidth*2}, -'.danger':{ -'NativeBase.Text':{ +".danger":{ +"NativeBase.Text":{ color:variables.btnDangerBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnDangerBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnDangerBg}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:variables.btnDangerBg, borderWidth:variables.borderWidth*2}, -'.disabled':{ +".disabled":{ backgroundColor:null, borderColor:variables.btnDisabledBg, borderWidth:variables.borderWidth*2, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.btnDisabledBg}}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.btnPrimaryBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnPrimaryBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnPrimaryBg}, borderWidth:variables.borderWidth*2, @@ -130,282 +130,276 @@ shadowColor:null, shadowOffset:null, shadowOpacity:null, shadowRadius:null, -backgroundColor:'transparent'}, +backgroundColor:"transparent"}, -'.dark':{ -'.bordered':{ -'NativeBase.Text':{ -color:'#000'}, +".dark":{ +".bordered":{ +"NativeBase.Text":{ +color:"#000"}, -'NativeBase.Icon':{ -color:'#000'}, +"NativeBase.Icon":{ +color:"#000"}, -'NativeBase.IconNB':{ -color:'#000'}}, +"NativeBase.IconNB":{ +color:"#000"}}, -backgroundColor:'#000'}, +backgroundColor:"#000"}, -'.light':{ -'.transparent':{ -'NativeBase.Text':{ -color:'#f4f4f4'}, +".light":{ +".transparent":{ +"NativeBase.Text":{ +color:"#f4f4f4"}, -'NativeBase.Icon':{ -color:'#f4f4f4'}, +"NativeBase.Icon":{ +color:"#f4f4f4"}, -'NativeBase.IconNB':{ -color:'#f4f4f4'}, +"NativeBase.IconNB":{ +color:"#f4f4f4"}, backgroundColor:null}, -'.bordered':{ -'NativeBase.Text':{ -color:'#f4f4f4'}, +".bordered":{ +"NativeBase.Text":{ +color:"#f4f4f4"}, -'NativeBase.Icon':{ -color:'#f4f4f4'}, +"NativeBase.Icon":{ +color:"#f4f4f4"}, -'NativeBase.IconNB':{ -color:'#f4f4f4'}}, +"NativeBase.IconNB":{ +color:"#f4f4f4"}}, -'NativeBase.Text':{ -color:'#000'}, +"NativeBase.Text":{ +color:"#000"}, -'NativeBase.Icon':{ -color:'#000'}, +"NativeBase.Icon":{ +color:"#000"}, -'NativeBase.IconNB':{ -color:'#000'}, +"NativeBase.IconNB":{ +color:"#000"}, -backgroundColor:'#f4f4f4'}, +backgroundColor:"#f4f4f4"}, -'.primary':{ -'.bordered':{ -'NativeBase.Text':{ +".primary":{ +".bordered":{ +"NativeBase.Text":{ color:variables.btnPrimaryBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnPrimaryBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnPrimaryBg}}, backgroundColor:variables.btnPrimaryBg}, -'.success':{ -'.bordered':{ -'NativeBase.Text':{ +".success":{ +".bordered":{ +"NativeBase.Text":{ color:variables.btnSuccessBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnSuccessBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnSuccessBg}}, backgroundColor:variables.btnSuccessBg}, -'.info':{ -'.bordered':{ -'NativeBase.Text':{ +".info":{ +".bordered":{ +"NativeBase.Text":{ color:variables.btnInfoBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnInfoBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnInfoBg}}, backgroundColor:variables.btnInfoBg}, -'.warning':{ -'.bordered':{ -'NativeBase.Text':{ +".warning":{ +".bordered":{ +"NativeBase.Text":{ color:variables.btnWarningBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnWarningBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnWarningBg}}, backgroundColor:variables.btnWarningBg}, -'.danger':{ -'.bordered':{ -'NativeBase.Text':{ +".danger":{ +".bordered":{ +"NativeBase.Text":{ color:variables.btnDangerBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnDangerBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnDangerBg}}, backgroundColor:variables.btnDangerBg}, -'.block':{ -justifyContent:'center', -alignSelf:'stretch'}, +".block":{ +justifyContent:"center", +alignSelf:"stretch"}, -'.full':{ -justifyContent:'center', -alignSelf:'stretch', +".full":{ +justifyContent:"center", +alignSelf:"stretch", borderRadius:0}, -'.rounded':{ +".rounded":{ paddingHorizontal:variables.buttonPadding+20, borderRadius:variables.borderRadiusLarge}, - -'.transparent':{ -backgroundColor:'transparent', +".transparent":{ +backgroundColor:"transparent", elevation:0, shadowColor:null, shadowOffset:null, shadowRadius:null, shadowOpacity:null, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.btnPrimaryBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnPrimaryBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnPrimaryBg}, -'.dark':{ -'NativeBase.Text':{ -color:'#000'}, +".dark":{ +"NativeBase.Text":{ +color:"#000"}, -'NativeBase.IconNB':{ -color:'#000'}, +"NativeBase.IconNB":{ +color:"#000"}, -'NativeBase.Icon':{ -color:'#000'}, +"NativeBase.Icon":{ +color:"#000"}, backgroundColor:null}, -'.danger':{ -'NativeBase.Text':{ +".danger":{ +"NativeBase.Text":{ color:variables.btnDangerBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnDangerBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnDangerBg}, backgroundColor:null}, -'.warning':{ -'NativeBase.Text':{ +".warning":{ +"NativeBase.Text":{ color:variables.btnWarningBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnWarningBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnWarningBg}, backgroundColor:null}, -'.info':{ -'NativeBase.Text':{ +".info":{ +"NativeBase.Text":{ color:variables.btnInfoBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnInfoBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnInfoBg}, backgroundColor:null}, -'.primary':{ -'NativeBase.Text':{ +".primary":{ +"NativeBase.Text":{ color:variables.btnPrimaryBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnPrimaryBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnPrimaryBg}, backgroundColor:null}, -'.success':{ -'NativeBase.Text':{ +".success":{ +"NativeBase.Text":{ color:variables.btnSuccessBg}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.btnSuccessBg}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.btnSuccessBg}, backgroundColor:null}, -'.light':{ -'NativeBase.Text':{ -color:'#f4f4f4'}, +".light":{ +"NativeBase.Text":{ +color:"#f4f4f4"}, -'NativeBase.IconNB':{ -color:'#f4f4f4'}, +"NativeBase.IconNB":{ +color:"#f4f4f4"}, -'NativeBase.Icon':{ -color:'#f4f4f4'}, +"NativeBase.Icon":{ +color:"#f4f4f4"}, backgroundColor:null}}, - - -'.small':{ +".small":{ height:30, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:14}}, -'.large':{ +".large":{ height:60, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:22, lineHeight:32}}, -'.capitalize':{}, - +".capitalize":{}, - -'.vertical':{ -flexDirection:'column', +".vertical":{ +flexDirection:"column", height:null}, - -'NativeBase.Text':{ +"NativeBase.Text":{ fontFamily:variables.btnFontFamily, marginLeft:0, marginRight:0, @@ -415,49 +409,48 @@ lineHeight:variables.btnLineHeight}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.inverseTextColor, fontSize:24, marginHorizontal:5, -paddingTop:platform==='ios'?2:undefined}, +paddingTop:platform==="ios"?2:undefined}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.inverseTextColor, fontSize:24, marginHorizontal:5, -paddingTop:platform==='ios'?2:undefined}, - +paddingTop:platform==="ios"?2:undefined}, -'.iconLeft':{ -'NativeBase.Text':{ +".iconLeft":{ +"NativeBase.Text":{ marginLeft:variables.buttonPadding}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ marginRight:10, marginLeft:0}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginRight:10, marginLeft:0}}, -'.iconRight':{ -'NativeBase.Text':{ +".iconRight":{ +"NativeBase.Text":{ marginRight:variables.buttonPadding}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ marginLeft:10, marginRight:0}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginLeft:10, marginRight:0}}, -'.picker':{ -'NativeBase.Text':{ -'.note':{ +".picker":{ +"NativeBase.Text":{ +".note":{ fontSize:16, lineHeight:null}}}, @@ -471,15 +464,17 @@ borderRadius:variables.borderRadiusBase, borderColor:variables.btnPrimaryBg, borderWidth:null, height:45, -alignSelf:'flex-start', -flexDirection:'row', +alignSelf:"flex-start", +flexDirection:"row", elevation:2, -shadowColor:platformStyle==='material'?'#000':undefined, -shadowOffset:platformStyle==='material'?{width:0,height:2}:undefined, -shadowOpacity:platformStyle==='material'?0.2:undefined, -shadowRadius:platformStyle==='material'?1.2:undefined, -alignItems:'center', -justifyContent:'space-between'}; +shadowColor:platformStyle==="material"?"#000":undefined, +shadowOffset:platformStyle==="material"? +{width:0,height:2}: +undefined, +shadowOpacity:platformStyle==="material"?0.2:undefined, +shadowRadius:platformStyle==="material"?1.2:undefined, +alignItems:"center", +justifyContent:"space-between"}; return buttonTheme; }; diff --git a/dist/src/theme/components/Button.js.map b/dist/src/theme/components/Button.js.map index 766f58dbd..642b2ee31 100644 --- a/dist/src/theme/components/Button.js.map +++ b/dist/src/theme/components/Button.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Button.js"],"names":["variables","platformStyle","platform","buttonTheme","backgroundColor","btnDisabledBg","color","borderColor","borderWidth","btnPrimaryBg","btnSuccessBg","btnInfoBg","btnWarningBg","btnDangerBg","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","justifyContent","alignSelf","borderRadius","paddingHorizontal","buttonPadding","borderRadiusLarge","height","fontSize","lineHeight","flexDirection","fontFamily","btnFontFamily","marginLeft","marginRight","inverseTextColor","btnTextSize","btnLineHeight","marginHorizontal","paddingTop","undefined","paddingVertical","borderRadiusBase","width","alignItems"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,aAAc;AAClB,YAAa;AACXC,gBAAiBJ,UAAUK,aADhB,CADK;;AAIlB,YAAa;AACX,QAAS;AACP,kBAAmB;AACjBC,MAAO,MADU,CADZ;;AAIP,kBAAmB;AACjBA,MAAO,MADU,CAJZ;;AAOP,oBAAqB;AACnBA,MAAO,MADY,CAPd;;AAUPF,gBAAiB,aAVV;AAWPG,YAAa,MAXN;AAYPC,YAAaR,UAAUQ,WAAV,CAAwB,CAZ9B,CADE;;AAeX,SAAU;AACR,kBAAmB;AACjBF,MAAO,SADU,CADX;;AAIR,kBAAmB;AACjBA,MAAO,SADU,CAJX;;AAOR,oBAAqB;AACnBA,MAAO,SADY,CAPb;;AAURF,gBAAiB,aA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X,oBAAqB;AACnBS,YAAa,EADM;AAEnBD,WAAY,CAFO,CAJV;;AAQX,kBAAmB;AACjBC,YAAa,EADI;AAEjBD,WAAY,CAFK,CARR,CAzaK;;;AAsblB,aAAc;AACZ,kBAAmB;AACjBC,YAAahC,UAAUuB,aADN,CADP;;AAIZ,oBAAqB;AACnBQ,WAAY,EADO;AAEnBC,YAAa,CAFM,CAJT;;AAQZ,kBAAmB;AACjBD,WAAY,EADK;AAEjBC,YAAa,CAFI,CARP,CAtbI;;;AAmclB,UAAW;AACT,kBAAmB;AACjB,QAAS;AACPN,SAAU,EADH;AAEPC,WAAY,IAFL,CADQ,CADV,CAncO;;;;;AA4clBY,gBAAiBvC,UAAUuB,aA5cT;AA6clBD,kBAAmBtB,UAAUuB,aAAV,CAA0B,EA7c3B;AA8clBnB,gBAAiBJ,UAAUS,YA9cT;AA+clBY,aAAcrB,UAAUwC,gBA/cN;AAgdlBjC,YAAaP,UAAUS,YAhdL;AAidlBD,YAAa,IAjdK;AAkdlBiB,OAAQ,EAldU;AAmdlBL,UAAW,YAndO;AAodlBQ,cAAe,KApdG;AAqdlBd,UAAW,CArdO;AAsdlBC,YAAcd,gBAAkB,UAAnB,CAAiC,MAAjC,CAA0CqC,SAtdrC;AAudlBtB,aAAef,gBAAkB,UAAnB,CAAiC,CAAEwC,MAAO,CAAT,CAAYhB,OAAQ,CAApB,CAAjC,CAA2Da,SAvdvD;AAwdlBrB,cAAgBhB,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCqC,SAxdpC;AAydlBpB,aAAejB,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCqC,SAzdnC;AA0dlBI,WAAY,QA1dM;AA2dlBvB,eAAgB,eA3dE,CAApB;;AA6dA,MAAOhB,YAAP;AACD,C","file":"Button.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const buttonTheme = {\n '.disabled': {\n backgroundColor: variables.btnDisabledBg,\n },\n '.bordered': {\n '.dark': {\n 'NativeBase.Text': {\n color: '#000',\n },\n 'NativeBase.Icon': {\n color: '#000',\n },\n 'NativeBase.IconNB': {\n color: '#000',\n },\n backgroundColor: 'transparent',\n borderColor: '#000',\n borderWidth: variables.borderWidth * 2,\n },\n '.light': {\n 'NativeBase.Text': {\n color: '#f4f4f4',\n },\n 'NativeBase.Icon': {\n color: '#f4f4f4',\n },\n 'NativeBase.IconNB': {\n color: '#f4f4f4',\n },\n backgroundColor: 'transparent',\n borderColor: '#f4f4f4',\n borderWidth: variables.borderWidth * 2,\n },\n '.primary': {\n 'NativeBase.Text': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnPrimaryBg,\n },\n backgroundColor: 'transparent',\n borderColor: variables.btnPrimaryBg,\n borderWidth: variables.borderWidth * 2,\n },\n '.success': {\n 'NativeBase.Text': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnSuccessBg,\n },\n backgroundColor: 'transparent',\n borderColor: variables.btnSuccessBg,\n borderWidth: variables.borderWidth * 2,\n },\n '.info': {\n 'NativeBase.Text': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnInfoBg,\n },\n backgroundColor: 'transparent',\n borderColor: variables.btnInfoBg,\n borderWidth: variables.borderWidth * 2,\n },\n '.warning': {\n 'NativeBase.Text': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnWarningBg,\n },\n backgroundColor: 'transparent',\n borderColor: variables.btnWarningBg,\n borderWidth: variables.borderWidth * 2,\n },\n '.danger': {\n 'NativeBase.Text': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnDangerBg,\n },\n backgroundColor: 'transparent',\n borderColor: variables.btnDangerBg,\n borderWidth: variables.borderWidth * 2,\n },\n '.disabled': {\n backgroundColor: null,\n borderColor: variables.btnDisabledBg,\n borderWidth: variables.borderWidth * 2,\n 'NativeBase.Text': {\n color: variables.btnDisabledBg,\n },\n },\n 'NativeBase.Text': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnPrimaryBg,\n },\n borderWidth: variables.borderWidth * 2,\n elevation: null,\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n shadowRadius: null,\n backgroundColor: 'transparent',\n },\n\n '.dark': {\n '.bordered': {\n 'NativeBase.Text': {\n color: '#000',\n },\n 'NativeBase.Icon': {\n color: '#000',\n },\n 'NativeBase.IconNB': {\n color: '#000',\n },\n },\n backgroundColor: '#000',\n },\n '.light': {\n '.transparent': {\n 'NativeBase.Text': {\n color: '#f4f4f4',\n },\n 'NativeBase.Icon': {\n color: '#f4f4f4',\n },\n 'NativeBase.IconNB': {\n color: '#f4f4f4',\n },\n backgroundColor: null,\n },\n '.bordered': {\n 'NativeBase.Text': {\n color: '#f4f4f4',\n },\n 'NativeBase.Icon': {\n color: '#f4f4f4',\n },\n 'NativeBase.IconNB': {\n color: '#f4f4f4',\n },\n },\n 'NativeBase.Text': {\n color: '#000',\n },\n 'NativeBase.Icon': {\n color: '#000',\n },\n 'NativeBase.IconNB': {\n color: '#000',\n },\n backgroundColor: '#f4f4f4',\n },\n\n '.primary': {\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnPrimaryBg,\n },\n },\n backgroundColor: variables.btnPrimaryBg,\n },\n\n '.success': {\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnSuccessBg,\n },\n },\n backgroundColor: variables.btnSuccessBg,\n },\n\n '.info': {\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnInfoBg,\n },\n },\n backgroundColor: variables.btnInfoBg,\n },\n\n '.warning': {\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnWarningBg,\n },\n },\n backgroundColor: variables.btnWarningBg,\n },\n\n '.danger': {\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnDangerBg,\n },\n },\n backgroundColor: variables.btnDangerBg,\n },\n\n '.block': {\n justifyContent: 'center',\n alignSelf: 'stretch',\n },\n\n '.full': {\n justifyContent: 'center',\n alignSelf: 'stretch',\n borderRadius: 0\n },\n\n '.rounded': {\n paddingHorizontal: variables.buttonPadding + 20,\n borderRadius: variables.borderRadiusLarge,\n },\n\n\n '.transparent': {\n backgroundColor: 'transparent',\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n\n 'NativeBase.Text': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnPrimaryBg,\n },\n '.dark': {\n 'NativeBase.Text': {\n color: '#000',\n },\n 'NativeBase.IconNB': {\n color: '#000',\n },\n 'NativeBase.Icon': {\n color: '#000',\n },\n backgroundColor: null,\n },\n '.danger': {\n 'NativeBase.Text': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnDangerBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnDangerBg,\n },\n backgroundColor: null,\n },\n '.warning': {\n 'NativeBase.Text': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnWarningBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnWarningBg,\n },\n backgroundColor: null,\n },\n '.info': {\n 'NativeBase.Text': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnInfoBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnInfoBg,\n },\n backgroundColor: null,\n },\n '.primary': {\n 'NativeBase.Text': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnPrimaryBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnPrimaryBg,\n },\n backgroundColor: null,\n },\n '.success': {\n 'NativeBase.Text': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.IconNB': {\n color: variables.btnSuccessBg,\n },\n 'NativeBase.Icon': {\n color: variables.btnSuccessBg,\n },\n backgroundColor: null,\n },\n '.light': {\n 'NativeBase.Text': {\n color: '#f4f4f4',\n },\n 'NativeBase.IconNB': {\n color: '#f4f4f4',\n },\n 'NativeBase.Icon': {\n color: '#f4f4f4',\n },\n backgroundColor: null,\n },\n\n\n },\n\n '.small': {\n height: 30,\n 'NativeBase.Text': {\n fontSize: 14,\n },\n },\n\n '.large': {\n height: 60,\n 'NativeBase.Text': {\n fontSize: 22,\n lineHeight: 32,\n },\n },\n\n '.capitalize': {\n\n },\n\n '.vertical': {\n flexDirection: 'column',\n height: null,\n },\n\n\n 'NativeBase.Text': {\n fontFamily: variables.btnFontFamily,\n marginLeft: 0,\n marginRight: 0,\n color: variables.inverseTextColor,\n fontSize: variables.btnTextSize,\n lineHeight: variables.btnLineHeight,\n // childPosition: 1\n },\n\n 'NativeBase.Icon': {\n color: variables.inverseTextColor,\n fontSize: 24,\n marginHorizontal: 5,\n paddingTop: (platform === 'ios') ? 2 : undefined\n },\n 'NativeBase.IconNB': {\n color: variables.inverseTextColor,\n fontSize: 24,\n marginHorizontal: 5,\n paddingTop: (platform === 'ios') ? 2 : undefined\n },\n\n\n '.iconLeft': {\n 'NativeBase.Text': {\n marginLeft: variables.buttonPadding,\n },\n 'NativeBase.IconNB': {\n marginRight: 10,\n marginLeft: 0,\n },\n 'NativeBase.Icon': {\n marginRight: 10,\n marginLeft: 0,\n },\n },\n '.iconRight': {\n 'NativeBase.Text': {\n marginRight: variables.buttonPadding,\n },\n 'NativeBase.IconNB': {\n marginLeft: 10,\n marginRight: 0,\n },\n 'NativeBase.Icon': {\n marginLeft: 10,\n marginRight: 0,\n },\n },\n '.picker': {\n 'NativeBase.Text': {\n '.note': {\n fontSize: 16,\n lineHeight: null,\n },\n },\n },\n\n paddingVertical: variables.buttonPadding,\n paddingHorizontal: variables.buttonPadding + 10,\n backgroundColor: variables.btnPrimaryBg,\n borderRadius: variables.borderRadiusBase,\n borderColor: variables.btnPrimaryBg,\n borderWidth: null,\n height: 45,\n alignSelf: 'flex-start',\n flexDirection: 'row',\n elevation: 2,\n shadowColor: (platformStyle === 'material') ? '#000' : undefined,\n shadowOffset: (platformStyle === 'material') ? { width: 0, height: 2 } : undefined,\n shadowOpacity: (platformStyle === 'material') ? 0.2 : undefined,\n shadowRadius: (platformStyle === 'material') ? 1.2 : undefined,\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n return buttonTheme;\n};"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Button.js"],"names":["variables","platformStyle","platform","buttonTheme","backgroundColor","btnDisabledBg","color","borderColor","borderWidth","btnPrimaryBg","btnSuccessBg","btnInfoBg","btnWarningBg","btnDangerBg","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","justifyContent","alignSelf","borderRadius","paddingHorizontal","buttonPadding","borderRadiusLarge","height","fontSize","lineHeight","flexDirection","fontFamily","btnFontFamily","marginLeft","marginRight","inverseTextColor","btnTextSize","btnLineHeight","marginHorizontal","paddingTop","undefined","paddingVertical","borderRadiusBase","width","alignItems"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,aAAc;AAClB,YAAa;AACXC,gBAAiBJ,UAAUK,aADhB,CADK;;AAIlB,YAAa;AACX,QAAS;AACP,kBAAmB;AACjBC,MAAO,MADU,CADZ;;AAIP,kBAAmB;AACjBA,MAAO,MADU,CAJZ;;AAOP,oBAAqB;AACnBA,MAAO,MADY,CAPd;;AAUPF,gBAAiB,aAVV;AAWPG,YAAa,MAXN;AAYPC,YAAaR,UAAUQ,WAAV,CAAwB,CAZ9B,CADE;;AAeX,SAAU;AACR,kBAAmB;AACjBF,MAAO,SADU,CADX;;AAIR,kBAAmB;AACjBA,MAAO,SADU,CAJX;;AAOR,oBAAqB;AACnBA,MAAO,SADY,CAPb;;AAURF,gBAAiB,aAVT;AAWRG,YAAa,SAXL;AAYRC,YAAaR,UAAUQ,WAAV,CAAwB,CAZ7B,CAfC;;AA6BX,WAAY;AACV,kBAAmB;AACjBF,MAAON,UAAUS,YADA,CADT;;AAIV,kBAAmB;AACjBH,MAAON,UAAUS,YADA,CAJT;;AAOV,oBAAqB;AACnBH,MAAON,UAAUS,YADE,CAPX;;AAUVL,gBAAiB,aAVP;AAWVG,YAAaP,UAAUS,YAXb;AAYVD,YAAaR,UAAUQ,WAAV,CAAwB,CAZ3B,CA7BD;;AA2CX,WAAY;AACV,kBAAmB;AACjBF,MAAON,UAAUU,YADA,CADT;;AAIV,kBAAmB;AACjBJ,MAAON,UAAUU,YADA,CAJT;;AAOV,oBAAqB;AACnBJ,MAAON,UAAUU,YADE,CAPX;;AAUVN,gBAAiB,aAVP;AAWVG,YAAaP,UAAUU,YAXb;AAYVF,YAAaR,UAAUQ,WAAV,CAAwB,CAZ3B,CA3CD;;AAyDX,QAAS;AACP,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A1cK;AA2clBiB,OAAQ,EA3cU;AA4clBL,UAAW,YA5cO;AA6clBQ,cAAe,KA7cG;AA8clBd,UAAW,CA9cO;AA+clBC,YAAad,gBAAkB,UAAlB,CAA+B,MAA/B,CAAwCqC,SA/cnC;AAgdlBtB,aAAcf,gBAAkB,UAAlB;AACV,CAAEwC,MAAO,CAAT,CAAYhB,OAAQ,CAApB,CADU;AAEVa,SAldc;AAmdlBrB,cAAehB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqCqC,SAndlC;AAodlBpB,aAAcjB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqCqC,SApdjC;AAqdlBI,WAAY,QArdM;AAsdlBvB,eAAgB,eAtdE,CAApB;;AAwdA,MAAOhB,YAAP;AACD,C","file":"Button.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const buttonTheme = {\n \".disabled\": {\n backgroundColor: variables.btnDisabledBg\n },\n \".bordered\": {\n \".dark\": {\n \"NativeBase.Text\": {\n color: \"#000\"\n },\n \"NativeBase.Icon\": {\n color: \"#000\"\n },\n \"NativeBase.IconNB\": {\n color: \"#000\"\n },\n backgroundColor: \"transparent\",\n borderColor: \"#000\",\n borderWidth: variables.borderWidth * 2\n },\n \".light\": {\n \"NativeBase.Text\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.Icon\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.IconNB\": {\n color: \"#f4f4f4\"\n },\n backgroundColor: \"transparent\",\n borderColor: \"#f4f4f4\",\n borderWidth: variables.borderWidth * 2\n },\n \".primary\": {\n \"NativeBase.Text\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnPrimaryBg\n },\n backgroundColor: \"transparent\",\n borderColor: variables.btnPrimaryBg,\n borderWidth: variables.borderWidth * 2\n },\n \".success\": {\n \"NativeBase.Text\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnSuccessBg\n },\n backgroundColor: \"transparent\",\n borderColor: variables.btnSuccessBg,\n borderWidth: variables.borderWidth * 2\n },\n \".info\": {\n \"NativeBase.Text\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnInfoBg\n },\n backgroundColor: \"transparent\",\n borderColor: variables.btnInfoBg,\n borderWidth: variables.borderWidth * 2\n },\n \".warning\": {\n \"NativeBase.Text\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnWarningBg\n },\n backgroundColor: \"transparent\",\n borderColor: variables.btnWarningBg,\n borderWidth: variables.borderWidth * 2\n },\n \".danger\": {\n \"NativeBase.Text\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnDangerBg\n },\n backgroundColor: \"transparent\",\n borderColor: variables.btnDangerBg,\n borderWidth: variables.borderWidth * 2\n },\n \".disabled\": {\n backgroundColor: null,\n borderColor: variables.btnDisabledBg,\n borderWidth: variables.borderWidth * 2,\n \"NativeBase.Text\": {\n color: variables.btnDisabledBg\n }\n },\n \"NativeBase.Text\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnPrimaryBg\n },\n borderWidth: variables.borderWidth * 2,\n elevation: null,\n shadowColor: null,\n shadowOffset: null,\n shadowOpacity: null,\n shadowRadius: null,\n backgroundColor: \"transparent\"\n },\n\n \".dark\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: \"#000\"\n },\n \"NativeBase.Icon\": {\n color: \"#000\"\n },\n \"NativeBase.IconNB\": {\n color: \"#000\"\n }\n },\n backgroundColor: \"#000\"\n },\n \".light\": {\n \".transparent\": {\n \"NativeBase.Text\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.Icon\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.IconNB\": {\n color: \"#f4f4f4\"\n },\n backgroundColor: null\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.Icon\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.IconNB\": {\n color: \"#f4f4f4\"\n }\n },\n \"NativeBase.Text\": {\n color: \"#000\"\n },\n \"NativeBase.Icon\": {\n color: \"#000\"\n },\n \"NativeBase.IconNB\": {\n color: \"#000\"\n },\n backgroundColor: \"#f4f4f4\"\n },\n\n \".primary\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnPrimaryBg\n }\n },\n backgroundColor: variables.btnPrimaryBg\n },\n\n \".success\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnSuccessBg\n }\n },\n backgroundColor: variables.btnSuccessBg\n },\n\n \".info\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnInfoBg\n }\n },\n backgroundColor: variables.btnInfoBg\n },\n\n \".warning\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnWarningBg\n }\n },\n backgroundColor: variables.btnWarningBg\n },\n\n \".danger\": {\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnDangerBg\n }\n },\n backgroundColor: variables.btnDangerBg\n },\n\n \".block\": {\n justifyContent: \"center\",\n alignSelf: \"stretch\"\n },\n\n \".full\": {\n justifyContent: \"center\",\n alignSelf: \"stretch\",\n borderRadius: 0\n },\n\n \".rounded\": {\n paddingHorizontal: variables.buttonPadding + 20,\n borderRadius: variables.borderRadiusLarge\n },\n\n \".transparent\": {\n backgroundColor: \"transparent\",\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n\n \"NativeBase.Text\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnPrimaryBg\n },\n \".dark\": {\n \"NativeBase.Text\": {\n color: \"#000\"\n },\n \"NativeBase.IconNB\": {\n color: \"#000\"\n },\n \"NativeBase.Icon\": {\n color: \"#000\"\n },\n backgroundColor: null\n },\n \".danger\": {\n \"NativeBase.Text\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnDangerBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnDangerBg\n },\n backgroundColor: null\n },\n \".warning\": {\n \"NativeBase.Text\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnWarningBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnWarningBg\n },\n backgroundColor: null\n },\n \".info\": {\n \"NativeBase.Text\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnInfoBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnInfoBg\n },\n backgroundColor: null\n },\n \".primary\": {\n \"NativeBase.Text\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnPrimaryBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnPrimaryBg\n },\n backgroundColor: null\n },\n \".success\": {\n \"NativeBase.Text\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.IconNB\": {\n color: variables.btnSuccessBg\n },\n \"NativeBase.Icon\": {\n color: variables.btnSuccessBg\n },\n backgroundColor: null\n },\n \".light\": {\n \"NativeBase.Text\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.IconNB\": {\n color: \"#f4f4f4\"\n },\n \"NativeBase.Icon\": {\n color: \"#f4f4f4\"\n },\n backgroundColor: null\n }\n },\n\n \".small\": {\n height: 30,\n \"NativeBase.Text\": {\n fontSize: 14\n }\n },\n\n \".large\": {\n height: 60,\n \"NativeBase.Text\": {\n fontSize: 22,\n lineHeight: 32\n }\n },\n\n \".capitalize\": {},\n\n \".vertical\": {\n flexDirection: \"column\",\n height: null\n },\n\n \"NativeBase.Text\": {\n fontFamily: variables.btnFontFamily,\n marginLeft: 0,\n marginRight: 0,\n color: variables.inverseTextColor,\n fontSize: variables.btnTextSize,\n lineHeight: variables.btnLineHeight\n // childPosition: 1\n },\n\n \"NativeBase.Icon\": {\n color: variables.inverseTextColor,\n fontSize: 24,\n marginHorizontal: 5,\n paddingTop: platform === \"ios\" ? 2 : undefined\n },\n \"NativeBase.IconNB\": {\n color: variables.inverseTextColor,\n fontSize: 24,\n marginHorizontal: 5,\n paddingTop: platform === \"ios\" ? 2 : undefined\n },\n\n \".iconLeft\": {\n \"NativeBase.Text\": {\n marginLeft: variables.buttonPadding\n },\n \"NativeBase.IconNB\": {\n marginRight: 10,\n marginLeft: 0\n },\n \"NativeBase.Icon\": {\n marginRight: 10,\n marginLeft: 0\n }\n },\n \".iconRight\": {\n \"NativeBase.Text\": {\n marginRight: variables.buttonPadding\n },\n \"NativeBase.IconNB\": {\n marginLeft: 10,\n marginRight: 0\n },\n \"NativeBase.Icon\": {\n marginLeft: 10,\n marginRight: 0\n }\n },\n \".picker\": {\n \"NativeBase.Text\": {\n \".note\": {\n fontSize: 16,\n lineHeight: null\n }\n }\n },\n\n paddingVertical: variables.buttonPadding,\n paddingHorizontal: variables.buttonPadding + 10,\n backgroundColor: variables.btnPrimaryBg,\n borderRadius: variables.borderRadiusBase,\n borderColor: variables.btnPrimaryBg,\n borderWidth: null,\n height: 45,\n alignSelf: \"flex-start\",\n flexDirection: \"row\",\n elevation: 2,\n shadowColor: platformStyle === \"material\" ? \"#000\" : undefined,\n shadowOffset: platformStyle === \"material\"\n ? { width: 0, height: 2 }\n : undefined,\n shadowOpacity: platformStyle === \"material\" ? 0.2 : undefined,\n shadowRadius: platformStyle === \"material\" ? 1.2 : undefined,\n alignItems: \"center\",\n justifyContent: \"space-between\"\n };\n return buttonTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Card.js b/dist/src/theme/components/Card.js index 4f73d86a3..cfe24dde8 100644 --- a/dist/src/theme/components/Card.js +++ b/dist/src/theme/components/Card.js @@ -1,8 +1,8 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var cardTheme={ -'.transparent':{ +".transparent":{ shadowColor:null, shadowOffset:null, shadowOpacity:null, @@ -15,9 +15,9 @@ flex:1, borderWidth:variables.borderWidth, borderRadius:2, borderColor:variables.cardBorderColor, -flexWrap:'wrap', +flexWrap:"wrap", backgroundColor:variables.cardDefaultBg, -shadowColor:'#000', +shadowColor:"#000", shadowOffset:{width:0,height:2}, shadowOpacity:0.1, shadowRadius:1.5, diff --git a/dist/src/theme/components/Card.js.map b/dist/src/theme/components/Card.js.map index 6fae2c3a0..c9e265a60 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","cardTheme","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","marginVertical","marginHorizontal","flex","borderWidth","borderRadius","borderColor","cardBorderColor","flexWrap","backgroundColor","cardDefaultBg","width","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AACd,eAAgB;AACdC,YAAa,IADC;AAEdC,aAAc,IAFA;AAGdC,cAAe,IAHD;AAIdC,aAAc,IAJA;AAKdC,UAAW,IALG,CADF;;AAQdC,eAAgB,CARF;AASdC,iBAAkB,CATJ;AAUdC,KAAM,CAVQ;AAWdC,YAAaV,UAAUU,WAXT;AAYdC,aAAc,CAZA;AAadC,YAAaZ,UAAUa,eAbT;AAcdC,SAAU,MAdI;AAedC,gBAAiBf,UAAUgB,aAfb;AAgBdd,YAAa,MAhBC;AAiBdC,aAAc,CAAEc,MAAO,CAAT,CAAYC,OAAQ,CAApB,CAjBA;AAkBdd,cAAe,GAlBD;AAmBdC,aAAc,GAnBA;AAoBdC,UAAW,CApBG,CAAlB;;;AAuBA,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 marginVertical: 5,\n marginHorizontal: 2,\n flex: 1,\n borderWidth: variables.borderWidth,\n borderRadius: 2,\n borderColor: variables.cardBorderColor,\n flexWrap: 'wrap',\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","cardTheme","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","marginVertical","marginHorizontal","flex","borderWidth","borderRadius","borderColor","cardBorderColor","flexWrap","backgroundColor","cardDefaultBg","width","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChB,eAAgB;AACdC,YAAa,IADC;AAEdC,aAAc,IAFA;AAGdC,cAAe,IAHD;AAIdC,aAAc,IAJA;AAKdC,UAAW,IALG,CADA;;AAQhBC,eAAgB,CARA;AAShBC,iBAAkB,CATF;AAUhBC,KAAM,CAVU;AAWhBC,YAAaV,UAAUU,WAXP;AAYhBC,aAAc,CAZE;AAahBC,YAAaZ,UAAUa,eAbP;AAchBC,SAAU,MAdM;AAehBC,gBAAiBf,UAAUgB,aAfX;AAgBhBd,YAAa,MAhBG;AAiBhBC,aAAc,CAAEc,MAAO,CAAT,CAAYC,OAAQ,CAApB,CAjBE;AAkBhBd,cAAe,GAlBC;AAmBhBC,aAAc,GAnBE;AAoBhBC,UAAW,CApBK,CAAlB;;;AAuBA,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 marginVertical: 5,\n marginHorizontal: 2,\n flex: 1,\n borderWidth: variables.borderWidth,\n borderRadius: 2,\n borderColor: variables.cardBorderColor,\n flexWrap: \"wrap\",\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/CardItem.js b/dist/src/theme/components/CardItem.js index ea8dc1353..acb1238e3 100644 --- a/dist/src/theme/components/CardItem.js +++ b/dist/src/theme/components/CardItem.js @@ -1,15 +1,15 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var cardItemTheme={ -'NativeBase.Left':{ -'NativeBase.Body':{ -'NativeBase.Text':{ -'.note':{ +"NativeBase.Left":{ +"NativeBase.Body":{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'400', +fontWeight:"400", marginRight:20}}, @@ -17,28 +17,28 @@ flex:1, marginLeft:10, alignItems:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:variables.iconFontSize}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:variables.iconFontSize}, -'NativeBase.Text':{ +"NativeBase.Text":{ marginLeft:10, -alignSelf:'center'}, +alignSelf:"center"}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ fontSize:variables.DefaultFontSize-4, color:variables.sTabBarActiveTextColor}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor, marginHorizontal:null}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor}, @@ -48,70 +48,70 @@ paddingRight:variables.listItemPadding+5}}, flex:1, -flexDirection:'row', -alignItems:'center'}, +flexDirection:"row", +alignItems:"center"}, -'.content':{ -'NativeBase.Text':{ -color:platform==='ios'?'#555':'#222', +".content":{ +"NativeBase.Text":{ +color:platform==="ios"?"#555":"#222", fontSize:variables.DefaultFontSize-3}}, -'.cardBody':{ -'NativeBase.Text':{ +".cardBody":{ +"NativeBase.Text":{ marginTop:5}}, -'NativeBase.Body':{ -'NativeBase.Text':{ -'.note':{ +"NativeBase.Body":{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200', +fontWeight:"200", marginRight:20}}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ fontSize:variables.DefaultFontSize-4, color:variables.sTabBarActiveTextColor}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor, marginHorizontal:null}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor}, paddingVertical:null, paddingHorizontal:null, paddingRight:variables.listItemPadding+5, -alignSelf:'stretch'}}, +alignSelf:"stretch"}}, flex:1, -alignSelf:'stretch', -alignItems:'flex-start'}, +alignSelf:"stretch", +alignItems:"flex-start"}, -'NativeBase.Right':{ -'NativeBase.Badge':{ +"NativeBase.Right":{ +"NativeBase.Badge":{ alignSelf:null}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ fontSize:variables.DefaultFontSize-4, color:variables.sTabBarActiveTextColor}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor, marginHorizontal:null}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:variables.iconFontSize-10, color:variables.sTabBarActiveTextColor}, @@ -120,83 +120,83 @@ paddingHorizontal:null}, alignSelf:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ alignSelf:null, fontSize:variables.iconFontSize-8, color:variables.cardBorderColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ alignSelf:null, fontSize:variables.iconFontSize-8, color:variables.cardBorderColor}, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:variables.DefaultFontSize-2, alignSelf:null}, -'NativeBase.Thumbnail':{ +"NativeBase.Thumbnail":{ alignSelf:null}, -'NativeBase.Image':{ +"NativeBase.Image":{ alignSelf:null}, -'NativeBase.Radio':{ +"NativeBase.Radio":{ alignSelf:null}, -'NativeBase.Checkbox':{ +"NativeBase.Checkbox":{ alignSelf:null}, -'NativeBase.Switch':{ +"NativeBase.Switch":{ alignSelf:null}, flex:0.8}, -'.header':{ -'NativeBase.Text':{ +".header":{ +"NativeBase.Text":{ fontSize:16, -fontWeight:platform==='ios'?'500':undefined}, +fontWeight:platform==="ios"?"500":undefined}, -'.bordered':{ -'NativeBase.Text':{ +".bordered":{ +"NativeBase.Text":{ color:variables.sTabBarActiveTextColor, -fontWeight:platform==='ios'?'500':undefined}, +fontWeight:platform==="ios"?"500":undefined}, -borderBottomWidth:platform==='ios'?variables.borderWidth:null}, +borderBottomWidth:platform==="ios"?variables.borderWidth:null}, borderBottomWidth:null, paddingVertical:variables.listItemPadding+5}, -'.footer':{ -'NativeBase.Text':{ +".footer":{ +"NativeBase.Text":{ fontSize:16, -fontWeight:platform==='ios'?'500':undefined}, +fontWeight:platform==="ios"?"500":undefined}, -'.bordered':{ -'NativeBase.Text':{ +".bordered":{ +"NativeBase.Text":{ color:variables.activeTab, -fontWeight:'500'}, +fontWeight:"500"}, -borderTopWidth:platform==='ios'?variables.borderWidth:null}, +borderTopWidth:platform==="ios"?variables.borderWidth:null}, borderBottomWidth:null}, -'NativeBase.Text':{ -'.note':{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}}, +fontWeight:"200"}}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ width:variables.iconFontSize+5, fontSize:variables.iconFontSize-2}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ width:variables.iconFontSize+5, fontSize:variables.iconFontSize-2}, -'.bordered':{ +".bordered":{ borderBottomWidth:variables.borderWidth, borderColor:variables.cardBorderColor}, diff --git a/dist/src/theme/components/CardItem.js.map b/dist/src/theme/components/CardItem.js.map index d6a4df68a..9099586b1 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","platform","cardItemTheme","color","listNoteColor","fontWeight","marginRight","flex","marginLeft","alignItems","fontSize","iconFontSize","alignSelf","DefaultFontSize","sTabBarActiveTextColor","marginHorizontal","paddingVertical","paddingHorizontal","paddingRight","listItemPadding","flexDirection","marginTop","cardBorderColor","undefined","borderBottomWidth","borderWidth","activeTab","borderTopWidth","width","borderColor","borderRadius","padding","backgroundColor","cardDefaultBg"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,eAAgB;AACpB,kBAAmB;AACjB,kBAAmB;AACjB,kBAAmB;AACjB,QAAS;AACPC,MAAOH,UAAUI,aADV;AAEPC,WAAY,KAFL;AAGPC,YAAa,EAHN,CADQ,CADF;;;AAQjBC,KAAM,CARW;AASjBC,WAAY,EATK;AAUjBC,WAAY,IAVK,CADF;;AAajB,kBAAmB;AACjBC,SAAUV,UAAUW,YADH,CAbF;;AAgBjB,oBAAqB;AACnBD,SAAUV,UAAUW,YADD,CAhBJ;;AAmBjB,kBAAmB;AACjBH,WAAY,EADK;AAEjBI,UAAW,QAFM,CAnBF;;AAuBjB,oBAAqB;AACnB,eAAgB;AACd,kBAAmB;AACjBF,SAAUV,UAAUa,eAAV,CAA4B,CADrB;AAEjBV,MAAOH,UAAUc,sBAFA,CADL;;AAKd,kBAAmB;AACjBJ,SAAUV,UAAUW,YAAV,CAAyB,EADlB;AAEjBR,MAAOH,UAAUc,sBAFA;AAGjBC,iBAAkB,IAHD,CALL;;AAUd,oBAAqB;AACnBL,SAAUV,UAAUW,YAAV,CAAyB,EADhB;AAEnBR,MAAOH,UAAUc,sBAFE,CAVP;;AAcdE,gBAAiB,IAdH;AAedC,kBAAmB,IAfL;AAgBdC,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d,CAAuB,KAAvB,CAA+BsB,SAF1B,CADV;;AAKT,YAAa;AACX,kBAAmB;AACjBpB,MAAOH,UAAU0B,SADA;AAEjBrB,WAAY,KAFK,CADR;;AAKXsB,eAAiB1B,WAAa,KAAd,CAAuBD,UAAUyB,WAAjC,CAA+C,IALpD,CALJ;;AAYTD,kBAAmB,IAZV,CAnKS;;AAiLpB,kBAAmB;AACjB,QAAS;AACPrB,MAAOH,UAAUI,aADV;AAEPC,WAAY,KAFL,CADQ,CAjLC;;;;AAwLpB,kBAAmB;AACjBuB,MAAO5B,UAAUW,YAAV,CAAyB,CADf;AAEjBD,SAAUV,UAAUW,YAAV,CAAyB,CAFlB,CAxLC;;AA4LpB,oBAAqB;AACnBiB,MAAO5B,UAAUW,YAAV,CAAyB,CADb;AAEnBD,SAAUV,UAAUW,YAAV,CAAyB,CAFhB,CA5LD;;;AAiMpB,YAAa;AACXa,kBAAmBxB,UAAUyB,WADlB;AAEXI,YAAa7B,UAAUsB,eAFZ,CAjMO;;AAqMpBQ,aAAc,CArMM;AAsMpBC,QAAS/B,UAAUmB,eAAV,CAA4B,CAtMjB;AAuMpBH,gBAAiBhB,UAAUmB,eAvMP;AAwMpBa,gBAAiBhC,UAAUiC,aAxMP,CAAtB;;;AA2MA,MAAO/B,cAAP;AACD,C","file":"CardItem.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\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 'NativeBase.Text': {\n fontSize: variables.DefaultFontSize - 4,\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 paddingRight: variables.listItemPadding + 5,\n },\n },\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n },\n\n '.content': {\n 'NativeBase.Text': {\n color: (platform === 'ios') ? '#555' : '#222',\n fontSize: variables.DefaultFontSize - 3,\n },\n },\n '.cardBody': {\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 'NativeBase.Text': {\n fontSize: variables.DefaultFontSize - 4,\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 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 'NativeBase.Text': {\n fontSize: variables.DefaultFontSize - 4,\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 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 - 2,\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') ? '500' : undefined,\n },\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.sTabBarActiveTextColor,\n fontWeight: (platform === 'ios') ? '500' : undefined,\n },\n borderBottomWidth: (platform === 'ios') ? variables.borderWidth : null,\n },\n borderBottomWidth: null,\n paddingVertical: variables.listItemPadding + 5,\n },\n '.footer': {\n 'NativeBase.Text': {\n fontSize: 16,\n fontWeight: (platform === 'ios') ? '500' : undefined,\n },\n '.bordered': {\n 'NativeBase.Text': {\n color: variables.activeTab,\n fontWeight: '500',\n },\n borderTopWidth: (platform === 'ios') ? variables.borderWidth : null,\n },\n borderBottomWidth: null,\n },\n 'NativeBase.Text': {\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\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\n '.bordered': {\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.cardBorderColor,\n },\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","platform","cardItemTheme","color","listNoteColor","fontWeight","marginRight","flex","marginLeft","alignItems","fontSize","iconFontSize","alignSelf","DefaultFontSize","sTabBarActiveTextColor","marginHorizontal","paddingVertical","paddingHorizontal","paddingRight","listItemPadding","flexDirection","marginTop","cardBorderColor","undefined","borderBottomWidth","borderWidth","activeTab","borderTopWidth","width","borderColor","borderRadius","padding","backgroundColor","cardDefaultBg"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,eAAgB;AACpB,kBAAmB;AACjB,kBAAmB;AACjB,kBAAmB;AACjB,QAAS;AACPC,MAAOH,UAAUI,aADV;AAEPC,WAAY,KAFL;AAGPC,YAAa,EAHN,CADQ,CADF;;;AAQjBC,KAAM,CARW;AASjBC,WAAY,EATK;AAUjBC,WAAY,IAVK,CADF;;AAajB,kBAAmB;AACjBC,SAAUV,UAAUW,YADH,CAbF;;AAgBjB,oBAAqB;AACnBD,SAAUV,UAAUW,YADD,CAhBJ;;AAmBjB,kBAAmB;AACjBH,WAAY,EADK;AAEjBI,UAAW,QAFM,CAnBF;;AAuBjB,oBAAqB;AACnB,eAAgB;AACd,kBAAmB;AACjBF,SAAUV,UAAUa,eAAV,CAA4B,CADrB;AAEjBV,MAAOH,UAAUc,sBAFA,CADL;;AAKd,kBAAmB;AACjBJ,SAAUV,UAAUW,YAAV,CAAyB,EADlB;AAEjBR,MAAOH,UAAUc,sBAFA;AAGjBC,iBAAkB,IAHD,CALL;;AAUd,oBAAqB;AACnBL,SAAUV,UAAUW,YAAV,CAAyB,EADhB;AAEnBR,MAAOH,UAAUc,sBAFE,CAVP;;AAcdE,gBAAiB,IAdH;AAedC,kBAAmB,IAfL;AAgBdC,aAAclB,UAAUmB,eAAV,CAA4B,CAhB5B,CADG,CAvBJ;;;AA2CjBZ,KAAM,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AAOH,UAAU0B,SADA;AAEjBrB,WAAY,KAFK,CADR;;AAKXsB,eAAgB1B,WAAa,KAAb,CAAqBD,UAAUyB,WAA/B,CAA6C,IALlD,CALJ;;AAYTD,kBAAmB,IAZV,CAnKS;;AAiLpB,kBAAmB;AACjB,QAAS;AACPrB,MAAOH,UAAUI,aADV;AAEPC,WAAY,KAFL,CADQ,CAjLC;;;;AAwLpB,kBAAmB;AACjBuB,MAAO5B,UAAUW,YAAV,CAAyB,CADf;AAEjBD,SAAUV,UAAUW,YAAV,CAAyB,CAFlB,CAxLC;;AA4LpB,oBAAqB;AACnBiB,MAAO5B,UAAUW,YAAV,CAAyB,CADb;AAEnBD,SAAUV,UAAUW,YAAV,CAAyB,CAFhB,CA5LD;;;AAiMpB,YAAa;AACXa,kBAAmBxB,UAAUyB,WADlB;AAEXI,YAAa7B,UAAUsB,eAFZ,CAjMO;;AAqMpBQ,aAAc,CArMM;AAsMpBC,QAAS/B,UAAUmB,eAAV,CAA4B,CAtMjB;AAuMpBH,gBAAiBhB,UAAUmB,eAvMP;AAwMpBa,gBAAiBhC,UAAUiC,aAxMP,CAAtB;;;AA2MA,MAAO/B,cAAP;AACD,C","file":"CardItem.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\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 \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 4,\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 paddingRight: variables.listItemPadding + 5\n }\n },\n flex: 1,\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n\n \".content\": {\n \"NativeBase.Text\": {\n color: platform === \"ios\" ? \"#555\" : \"#222\",\n fontSize: variables.DefaultFontSize - 3\n }\n },\n \".cardBody\": {\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 \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 4,\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 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 \"NativeBase.Text\": {\n fontSize: variables.DefaultFontSize - 4,\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 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 - 2,\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\" ? \"500\" : undefined\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.sTabBarActiveTextColor,\n fontWeight: platform === \"ios\" ? \"500\" : undefined\n },\n borderBottomWidth: platform === \"ios\" ? variables.borderWidth : null\n },\n borderBottomWidth: null,\n paddingVertical: variables.listItemPadding + 5\n },\n \".footer\": {\n \"NativeBase.Text\": {\n fontSize: 16,\n fontWeight: platform === \"ios\" ? \"500\" : undefined\n },\n \".bordered\": {\n \"NativeBase.Text\": {\n color: variables.activeTab,\n fontWeight: \"500\"\n },\n borderTopWidth: platform === \"ios\" ? variables.borderWidth : null\n },\n borderBottomWidth: null\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n }\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\n \".bordered\": {\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.cardBorderColor\n },\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 diff --git a/dist/src/theme/components/CheckBox.js b/dist/src/theme/components/CheckBox.js index e4bba3198..e5edabbf9 100644 --- a/dist/src/theme/components/CheckBox.js +++ b/dist/src/theme/components/CheckBox.js @@ -1,30 +1,29 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= - +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var checkBoxTheme={ -'.checked':{ -'NativeBase.Icon':{ +".checked":{ +"NativeBase.Icon":{ color:variables.checkboxTickColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.checkboxTickColor}}, -'NativeBase.Icon':{ -color:'transparent', +"NativeBase.Icon":{ +color:"transparent", lineHeight:variables.CheckboxIconSize, marginTop:variables.CheckboxIconMarginTop, fontSize:variables.CheckboxFontSize}, -'NativeBase.IconNB':{ -color:'transparent', +"NativeBase.IconNB":{ +color:"transparent", lineHeight:variables.CheckboxIconSize, marginTop:variables.CheckboxIconMarginTop, fontSize:variables.CheckboxFontSize}, borderRadius:variables.CheckboxRadius, -overflow:'hidden', +overflow:"hidden", width:variables.checkboxSize, height:variables.checkboxSize, borderWidth:variables.CheckboxBorderWidth, @@ -33,7 +32,6 @@ paddingBottom:variables.CheckboxPaddingBottom, left:10}; - return checkBoxTheme; }; //# sourceMappingURL=CheckBox.js.map \ No newline at end of file diff --git a/dist/src/theme/components/CheckBox.js.map b/dist/src/theme/components/CheckBox.js.map index d84b80b4f..34991e1f5 100644 --- a/dist/src/theme/components/CheckBox.js.map +++ b/dist/src/theme/components/CheckBox.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/CheckBox.js"],"names":["variables","checkBoxTheme","color","checkboxTickColor","lineHeight","CheckboxIconSize","marginTop","CheckboxIconMarginTop","fontSize","CheckboxFontSize","borderRadius","CheckboxRadius","overflow","width","checkboxSize","height","borderWidth","CheckboxBorderWidth","paddingLeft","CheckboxPaddingLeft","paddingBottom","CheckboxPaddingBottom","left"],"mappings":"yDAAA,iD;;;AAGe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgB;AAClB,WAAY;AACV,kBAAmB;AACjBC,MAAOF,UAAUG,iBADA,CADT;;AAIV,oBAAqB;AACnBD,MAAOF,UAAUG,iBADE,CAJX,CADM;;;AASlB,kBAAmB;AACjBD,MAAO,aADU;AAEjBE,WAAYJ,UAAUK,gBAFL;AAGjBC,UAAWN,UAAUO,qBAHJ;AAIjBC,SAAUR,UAAUS,gBAJH,CATD;;AAelB,oBAAqB;AACnBP,MAAO,aADY;AAEnBE,WAAYJ,UAAUK,gBAFH;AAGnBC,UAAWN,UAAUO,qBAHF;AAInBC,SAAUR,UAAUS,gBAJD,CAfH;;AAqBlBC,aAAcV,UAAUW,cArBN;AAsBlBC,SAAU,QAtBQ;AAuBlBC,MAAOb,UAAUc,YAvBC;AAwBlBC,OAAQf,UAAUc,YAxBA;AAyBlBE,YAAahB,UAAUiB,mBAzBL;AA0BlBC,YAAalB,UAAUmB,mBAAV,CAAgC,CA1B3B;AA2BlBC,cAAepB,UAAUqB,qBA3BP;AA4BlBC,KAAM,EA5BY,CAAtB;;;;AAgCA,MAAOrB,cAAP;AACD,C","file":"CheckBox.js","sourcesContent":["import variable from './../variables/platform';\n\n\nexport default (variables = variable) => {\n const checkBoxTheme = {\n '.checked': {\n 'NativeBase.Icon': {\n color: variables.checkboxTickColor,\n },\n 'NativeBase.IconNB': {\n color: variables.checkboxTickColor,\n },\n },\n 'NativeBase.Icon': {\n color: 'transparent',\n lineHeight: variables.CheckboxIconSize,\n marginTop: variables.CheckboxIconMarginTop,\n fontSize: variables.CheckboxFontSize,\n },\n 'NativeBase.IconNB': {\n color: 'transparent',\n lineHeight: variables.CheckboxIconSize,\n marginTop: variables.CheckboxIconMarginTop,\n fontSize: variables.CheckboxFontSize,\n },\n borderRadius: variables.CheckboxRadius,\n overflow: 'hidden',\n width: variables.checkboxSize,\n height: variables.checkboxSize,\n borderWidth: variables.CheckboxBorderWidth,\n paddingLeft: variables.CheckboxPaddingLeft - 1,\n paddingBottom: variables.CheckboxPaddingBottom,\n left: 10,\n };\n\n\n return checkBoxTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/CheckBox.js"],"names":["variables","checkBoxTheme","color","checkboxTickColor","lineHeight","CheckboxIconSize","marginTop","CheckboxIconMarginTop","fontSize","CheckboxFontSize","borderRadius","CheckboxRadius","overflow","width","checkboxSize","height","borderWidth","CheckboxBorderWidth","paddingLeft","CheckboxPaddingLeft","paddingBottom","CheckboxPaddingBottom","left"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgB;AACpB,WAAY;AACV,kBAAmB;AACjBC,MAAOF,UAAUG,iBADA,CADT;;AAIV,oBAAqB;AACnBD,MAAOF,UAAUG,iBADE,CAJX,CADQ;;;AASpB,kBAAmB;AACjBD,MAAO,aADU;AAEjBE,WAAYJ,UAAUK,gBAFL;AAGjBC,UAAWN,UAAUO,qBAHJ;AAIjBC,SAAUR,UAAUS,gBAJH,CATC;;AAepB,oBAAqB;AACnBP,MAAO,aADY;AAEnBE,WAAYJ,UAAUK,gBAFH;AAGnBC,UAAWN,UAAUO,qBAHF;AAInBC,SAAUR,UAAUS,gBAJD,CAfD;;AAqBpBC,aAAcV,UAAUW,cArBJ;AAsBpBC,SAAU,QAtBU;AAuBpBC,MAAOb,UAAUc,YAvBG;AAwBpBC,OAAQf,UAAUc,YAxBE;AAyBpBE,YAAahB,UAAUiB,mBAzBH;AA0BpBC,YAAalB,UAAUmB,mBAAV,CAAgC,CA1BzB;AA2BpBC,cAAepB,UAAUqB,qBA3BL;AA4BpBC,KAAM,EA5Bc,CAAtB;;;AA+BA,MAAOrB,cAAP;AACD,C","file":"CheckBox.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const checkBoxTheme = {\n \".checked\": {\n \"NativeBase.Icon\": {\n color: variables.checkboxTickColor\n },\n \"NativeBase.IconNB\": {\n color: variables.checkboxTickColor\n }\n },\n \"NativeBase.Icon\": {\n color: \"transparent\",\n lineHeight: variables.CheckboxIconSize,\n marginTop: variables.CheckboxIconMarginTop,\n fontSize: variables.CheckboxFontSize\n },\n \"NativeBase.IconNB\": {\n color: \"transparent\",\n lineHeight: variables.CheckboxIconSize,\n marginTop: variables.CheckboxIconMarginTop,\n fontSize: variables.CheckboxFontSize\n },\n borderRadius: variables.CheckboxRadius,\n overflow: \"hidden\",\n width: variables.checkboxSize,\n height: variables.checkboxSize,\n borderWidth: variables.CheckboxBorderWidth,\n paddingLeft: variables.CheckboxPaddingLeft - 1,\n paddingBottom: variables.CheckboxPaddingBottom,\n left: 10\n };\n\n return checkBoxTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Container.js b/dist/src/theme/components/Container.js index 39710e558..2eb1bf6f4 100644 --- a/dist/src/theme/components/Container.js +++ b/dist/src/theme/components/Container.js @@ -1,12 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} -var deviceHeight=_reactNative.Dimensions.get('window').height;exports.default= +var deviceHeight=_reactNative.Dimensions.get("window").height;exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var theme={ flex:1, -height:_reactNative.Platform.OS==='ios'?deviceHeight:deviceHeight-20}; +height:_reactNative.Platform.OS==="ios"?deviceHeight:deviceHeight-20}; return theme; diff --git a/dist/src/theme/components/Container.js.map b/dist/src/theme/components/Container.js.map index d1bd7aa4d..b0744ab51 100644 --- a/dist/src/theme/components/Container.js.map +++ b/dist/src/theme/components/Container.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Container.js"],"names":["deviceHeight","get","height","variables","theme","flex","OS"],"mappings":"yDAAA;;AAEA,iD;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C,C;AACe,UAA0B,IAAzBC,UAAyB;AACvC,GAAMC,OAAQ;AACZC,KAAM,CADM;AAEZH,OAAS,sBAASI,EAAT,GAAgB,KAAjB,CAA0BN,YAA1B,CAAyCA,aAAe,EAFpD,CAAd;;;AAKA,MAAOI,MAAP;AACD,C","file":"Container.js","sourcesContent":["import { Platform, Dimensions } from 'react-native';\n\nimport variable from './../variables/platform';\n\nconst deviceHeight = Dimensions.get('window').height;\nexport default (variables = variable) => {\n const theme = {\n flex: 1,\n height: (Platform.OS === 'ios') ? deviceHeight : deviceHeight - 20,\n };\n\n return theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Container.js"],"names":["deviceHeight","get","height","variables","theme","flex","OS"],"mappings":"yDAAA;;AAEA,iD;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C,C;AACe,UAA0B,IAAzBC,UAAyB;AACvC,GAAMC,OAAQ;AACZC,KAAM,CADM;AAEZH,OAAQ,sBAASI,EAAT,GAAgB,KAAhB,CAAwBN,YAAxB,CAAuCA,aAAe,EAFlD,CAAd;;;AAKA,MAAOI,MAAP;AACD,C","file":"Container.js","sourcesContent":["import { Platform, Dimensions } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nconst deviceHeight = Dimensions.get(\"window\").height;\nexport default (variables = variable) => {\n const theme = {\n flex: 1,\n height: Platform.OS === \"ios\" ? deviceHeight : deviceHeight - 20\n };\n\n return theme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Content.js b/dist/src/theme/components/Content.js index b1c218f36..54ee155df 100644 --- a/dist/src/theme/components/Content.js +++ b/dist/src/theme/components/Content.js @@ -1,15 +1,15 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var contentTheme={ -'.padder':{ +".padder":{ padding:variables.contentPadding}, flex:1, -backgroundColor:'transparent', -'NativeBase.Segment':{ +backgroundColor:"transparent", +"NativeBase.Segment":{ borderWidth:0, -backgroundColor:'transparent'}}; +backgroundColor:"transparent"}}; diff --git a/dist/src/theme/components/Content.js.map b/dist/src/theme/components/Content.js.map index bc52e5278..518fda277 100644 --- a/dist/src/theme/components/Content.js.map +++ b/dist/src/theme/components/Content.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Content.js"],"names":["variables","contentTheme","padding","contentPadding","flex","backgroundColor","borderWidth"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,cAAe;AACjB,UAAW;AACTC,QAASF,UAAUG,cADV,CADM;;AAIjBC,KAAM,CAJW;AAKjBC,gBAAiB,aALA;AAMjB,qBAAsB;AACpBC,YAAa,CADO;AAEpBD,gBAAiB,aAFG,CANL,CAArB;;;;AAYA,MAAOJ,aAAP;AACD,C","file":"Content.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const contentTheme = {\n '.padder': {\n padding: variables.contentPadding,\n },\n flex: 1,\n backgroundColor: 'transparent',\n 'NativeBase.Segment': {\n borderWidth: 0,\n backgroundColor: 'transparent'\n }\n };\n\n return contentTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Content.js"],"names":["variables","contentTheme","padding","contentPadding","flex","backgroundColor","borderWidth"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,cAAe;AACnB,UAAW;AACTC,QAASF,UAAUG,cADV,CADQ;;AAInBC,KAAM,CAJa;AAKnBC,gBAAiB,aALE;AAMnB,qBAAsB;AACpBC,YAAa,CADO;AAEpBD,gBAAiB,aAFG,CANH,CAArB;;;;AAYA,MAAOJ,aAAP;AACD,C","file":"Content.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const contentTheme = {\n \".padder\": {\n padding: variables.contentPadding\n },\n flex: 1,\n backgroundColor: \"transparent\",\n \"NativeBase.Segment\": {\n borderWidth: 0,\n backgroundColor: \"transparent\"\n }\n };\n\n return contentTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Fab.js b/dist/src/theme/components/Fab.js index 98dcd434b..9722ba8d6 100644 --- a/dist/src/theme/components/Fab.js +++ b/dist/src/theme/components/Fab.js @@ -1,21 +1,20 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var fabTheme={ -'NativeBase.Button':{ -alignItems:'center', +"NativeBase.Button":{ +alignItems:"center", padding:null, -justifyContent:'center', -'NativeBase.Icon':{ -alignSelf:'center'}, +justifyContent:"center", +"NativeBase.Icon":{ +alignSelf:"center"}, -'NativeBase.IconNB':{ -alignSelf:'center', +"NativeBase.IconNB":{ +alignSelf:"center", fontSize:20, -lineHeight:platform==='ios'?24:undefined}}}; - +lineHeight:platform==="ios"?24:undefined}}}; diff --git a/dist/src/theme/components/Fab.js.map b/dist/src/theme/components/Fab.js.map index 6e8915d36..a83136a04 100644 --- a/dist/src/theme/components/Fab.js.map +++ b/dist/src/theme/components/Fab.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Fab.js"],"names":["variables","platform","fabTheme","alignItems","padding","justifyContent","alignSelf","fontSize","lineHeight","undefined"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,UAAW;AACf,oBAAqB;AACjBC,WAAY,QADK;AAEjBC,QAAS,IAFQ;AAGjBC,eAAgB,QAHC;AAIjB,kBAAmB;AACjBC,UAAW,QADM,CAJF;;AAOjB,oBAAqB;AACnBA,UAAW,QADQ;AAEnBC,SAAU,EAFS;AAGnBC,WAAaP,WAAa,KAAd,CAAuB,EAAvB,CAA4BQ,SAHrB,CAPJ,CADN,CAAjB;;;;;;AAiBA,MAAOP,SAAP;AACD,C","file":"Fab.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const fabTheme = {\n 'NativeBase.Button': {\n alignItems: 'center',\n padding: null,\n justifyContent: 'center',\n 'NativeBase.Icon': {\n alignSelf: 'center',\n },\n 'NativeBase.IconNB': {\n alignSelf: 'center',\n fontSize: 20,\n lineHeight: (platform === 'ios') ? 24 : undefined,\n },\n },\n };\n\n\n return fabTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Fab.js"],"names":["variables","platform","fabTheme","alignItems","padding","justifyContent","alignSelf","fontSize","lineHeight","undefined"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,UAAW;AACf,oBAAqB;AACnBC,WAAY,QADO;AAEnBC,QAAS,IAFU;AAGnBC,eAAgB,QAHG;AAInB,kBAAmB;AACjBC,UAAW,QADM,CAJA;;AAOnB,oBAAqB;AACnBA,UAAW,QADQ;AAEnBC,SAAU,EAFS;AAGnBC,WAAYP,WAAa,KAAb,CAAqB,EAArB,CAA0BQ,SAHnB,CAPF,CADN,CAAjB;;;;;AAgBA,MAAOP,SAAP;AACD,C","file":"Fab.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const fabTheme = {\n \"NativeBase.Button\": {\n alignItems: \"center\",\n padding: null,\n justifyContent: \"center\",\n \"NativeBase.Icon\": {\n alignSelf: \"center\"\n },\n \"NativeBase.IconNB\": {\n alignSelf: \"center\",\n fontSize: 20,\n lineHeight: platform === \"ios\" ? 24 : undefined\n }\n }\n };\n\n return fabTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Footer.js b/dist/src/theme/components/Footer.js index f9f88188d..b6c24eda4 100644 --- a/dist/src/theme/components/Footer.js +++ b/dist/src/theme/components/Footer.js @@ -1,14 +1,14 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platformStyle=variables.platformStyle; var platform=variables.platform; var footerTheme={ -'NativeBase.Left':{ -'NativeBase.Button':{ -'.transparent':{ -backgroundColor:'transparent', +"NativeBase.Left":{ +"NativeBase.Button":{ +".transparent":{ +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, @@ -16,27 +16,27 @@ shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.topTabBarActiveTextColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.topTabBarActiveTextColor}, alignSelf:null}, flex:1, -alignSelf:'center', -alignItems:'flex-start'}, +alignSelf:"center", +alignItems:"flex-start"}, -'NativeBase.Body':{ +"NativeBase.Body":{ flex:1, -alignItems:'center', -alignSelf:'center', -flexDirection:'row', -'NativeBase.Button':{ -alignSelf:'center', -'.transparent':{ -backgroundColor:'transparent', +alignItems:"center", +alignSelf:"center", +flexDirection:"row", +"NativeBase.Button":{ +alignSelf:"center", +".transparent":{ +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, @@ -44,22 +44,22 @@ shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'.full':{ +".full":{ height:variables.footerHeight, flex:1}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.topTabBarActiveTextColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.topTabBarActiveTextColor}}}, -'NativeBase.Right':{ -'NativeBase.Button':{ -'.transparent':{ -backgroundColor:'transparent', +"NativeBase.Right":{ +"NativeBase.Button":{ +".transparent":{ +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, @@ -67,30 +67,33 @@ shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.topTabBarActiveTextColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.topTabBarActiveTextColor}, alignSelf:null}, flex:1, -alignSelf:'center', -alignItems:'flex-end'}, +alignSelf:"center", +alignItems:"flex-end"}, backgroundColor:variables.footerDefaultBg, -flexDirection:'row', -justifyContent:'center', -borderTopWidth:platform==='ios'&&platformStyle!=='material'?variables.borderWidth:undefined, -borderColor:platform==='ios'&&platformStyle!=='material'?'#cbcbcb':undefined, +flexDirection:"row", +justifyContent:"center", +borderTopWidth:platform==="ios"&&platformStyle!=="material"? +variables.borderWidth: +undefined, +borderColor:platform==="ios"&&platformStyle!=="material"? +"#cbcbcb": +undefined, height:variables.footerHeight, elevation:3, left:0, right:0}; - return footerTheme; }; //# sourceMappingURL=Footer.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Footer.js.map b/dist/src/theme/components/Footer.js.map index c9b608dea..77ad16b2a 100644 --- a/dist/src/theme/components/Footer.js.map +++ b/dist/src/theme/components/Footer.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Footer.js"],"names":["variables","platformStyle","platform","footerTheme","backgroundColor","borderColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","color","topTabBarActiveTextColor","alignSelf","flex","alignItems","flexDirection","height","footerHeight","footerDefaultBg","justifyContent","borderTopWidth","borderWidth","undefined","left","right"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,aAAc;AACf,kBAAmB;AAClB,oBAAqB;AACnB,eAAgB;AACdC,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CADG;;AAUnB,kBAAmB;AACjBC,MAAOX,UAAUY,wBADA,CAVA;;AAanB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAbF;;AAgBnBC,UAAW,IAhBQ,CADH;;AAmBlBC,KAAM,CAnBY;AAoBlBD,UAAW,QApBO;AAqBlBE,WAAY,YArBM,CADJ;;AAwBhB,kBAAmB;AACjBD,KAAM,CADW;AAEjBC,WAAY,QAFK;AAGjBF,UAAW,QAHM;AAIjBG,cAAe,KAJE;AAKjB,oBAAqB;AACnBH,UAAW,QADQ;AAEnB,eAAgB;AACdT,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CAFG;;AAWnB,QAAS;AACPO,OAAQjB,UAAUkB,YADX;AAEPJ,KAAM,CAFC,CAXU;;AAenB,kBAAmB;AACjBH,MAAOX,UAAUY,wBADA,CAfA;;AAkBnB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAlBF,CALJ,CAxBH;;;;AAoDhB,mBAAoB;AAClB,oBAAqB;AACnB,eAAgB;AACdR,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CADG;;AAUnB,kBAAmB;AACjBC,MAAOX,UAAUY,wBADA,CAVA;;AAanB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAbF;;AAgBnBC,UAAW,IAhBQ,CADH;;AAmBlBC,KAAM,CAnBY;AAoBlBD,UAAW,QApBO;AAqBlBE,WAAY,UArBM,CApDJ;;AA2EhBX,gBAAiBJ,UAAUmB,eA3EX;AA4EhBH,cAAe,KA5EC;AA6EhBI,eAAgB,QA7EA;AA8EhBC,eAAkBnB,WAAa,KAAd,EAAyBD,gBAAgB,UAA1C,CAAyDD,UAAUsB,WAAnE,CAAiFC,SA9EjF;AA+EhBlB,YAAeH,WAAa,KAAd,EAAyBD,gBAAgB,UAA1C,CAAyD,SAAzD,CAAqEsB,SA/ElE;AAgFhBN,OAAQjB,UAAUkB,YAhFF;AAiFhBZ,UAAW,CAjFK;AAkFhBkB,KAAM,CAlFU;AAmFhBC,MAAO,CAnFS,CAApB;;;;AAuFA,MAAOtB,YAAP;AACD,C","file":"Footer.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const footerTheme = {\n 'NativeBase.Left': {\n 'NativeBase.Button': {\n '.transparent': {\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.topTabBarActiveTextColor,\n },\n 'NativeBase.IconNB': {\n color: variables.topTabBarActiveTextColor,\n },\n alignSelf: null,\n },\n flex: 1,\n alignSelf: 'center',\n alignItems: 'flex-start',\n },\n 'NativeBase.Body': {\n flex: 1,\n alignItems: 'center',\n alignSelf: 'center',\n flexDirection: 'row',\n 'NativeBase.Button': {\n alignSelf: 'center',\n '.transparent': {\n backgroundColor: 'transparent',\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n },\n '.full': {\n height: variables.footerHeight,\n flex: 1\n },\n 'NativeBase.Icon': {\n color: variables.topTabBarActiveTextColor,\n },\n 'NativeBase.IconNB': {\n color: variables.topTabBarActiveTextColor,\n }\n },\n },\n 'NativeBase.Right': {\n 'NativeBase.Button': {\n '.transparent': {\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.topTabBarActiveTextColor,\n },\n 'NativeBase.IconNB': {\n color: variables.topTabBarActiveTextColor,\n },\n alignSelf: null,\n },\n flex: 1,\n alignSelf: 'center',\n alignItems: 'flex-end',\n },\n backgroundColor: variables.footerDefaultBg,\n flexDirection: 'row',\n justifyContent: 'center',\n borderTopWidth: ((platform === 'ios') && (platformStyle!=='material')) ? variables.borderWidth : undefined,\n borderColor: ((platform === 'ios') && (platformStyle!=='material')) ? '#cbcbcb' : undefined,\n height: variables.footerHeight,\n elevation: 3,\n left: 0,\n right: 0,\n };\n\n\n return footerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Footer.js"],"names":["variables","platformStyle","platform","footerTheme","backgroundColor","borderColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","color","topTabBarActiveTextColor","alignSelf","flex","alignItems","flexDirection","height","footerHeight","footerDefaultBg","justifyContent","borderTopWidth","borderWidth","undefined","left","right"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,aAAc;AAClB,kBAAmB;AACjB,oBAAqB;AACnB,eAAgB;AACdC,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CADG;;AAUnB,kBAAmB;AACjBC,MAAOX,UAAUY,wBADA,CAVA;;AAanB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAbF;;AAgBnBC,UAAW,IAhBQ,CADJ;;AAmBjBC,KAAM,CAnBW;AAoBjBD,UAAW,QApBM;AAqBjBE,WAAY,YArBK,CADD;;AAwBlB,kBAAmB;AACjBD,KAAM,CADW;AAEjBC,WAAY,QAFK;AAGjBF,UAAW,QAHM;AAIjBG,cAAe,KAJE;AAKjB,oBAAqB;AACnBH,UAAW,QADQ;AAEnB,eAAgB;AACdT,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CAFG;;AAWnB,QAAS;AACPO,OAAQjB,UAAUkB,YADX;AAEPJ,KAAM,CAFC,CAXU;;AAenB,kBAAmB;AACjBH,MAAOX,UAAUY,wBADA,CAfA;;AAkBnB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAlBF,CALJ,CAxBD;;;;AAoDlB,mBAAoB;AAClB,oBAAqB;AACnB,eAAgB;AACdR,gBAAiB,aADH;AAEdC,YAAa,IAFC;AAGdC,UAAW,CAHG;AAIdC,YAAa,IAJC;AAKdC,aAAc,IALA;AAMdC,aAAc,IANA;AAOdC,cAAe,IAPD,CADG;;AAUnB,kBAAmB;AACjBC,MAAOX,UAAUY,wBADA,CAVA;;AAanB,oBAAqB;AACnBD,MAAOX,UAAUY,wBADE,CAbF;;AAgBnBC,UAAW,IAhBQ,CADH;;AAmBlBC,KAAM,CAnBY;AAoBlBD,UAAW,QApBO;AAqBlBE,WAAY,UArBM,CApDF;;AA2ElBX,gBAAiBJ,UAAUmB,eA3ET;AA4ElBH,cAAe,KA5EG;AA6ElBI,eAAgB,QA7EE;AA8ElBC,eAAgBnB,WAAa,KAAb,EAAsBD,gBAAkB,UAAxC;AACZD,UAAUsB,WADE;AAEZC,SAhFc;AAiFlBlB,YAAaH,WAAa,KAAb,EAAsBD,gBAAkB,UAAxC;AACT,SADS;AAETsB,SAnFc;AAoFlBN,OAAQjB,UAAUkB,YApFA;AAqFlBZ,UAAW,CArFO;AAsFlBkB,KAAM,CAtFY;AAuFlBC,MAAO,CAvFW,CAApB;;;AA0FA,MAAOtB,YAAP;AACD,C","file":"Footer.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const footerTheme = {\n \"NativeBase.Left\": {\n \"NativeBase.Button\": {\n \".transparent\": {\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.topTabBarActiveTextColor\n },\n \"NativeBase.IconNB\": {\n color: variables.topTabBarActiveTextColor\n },\n alignSelf: null\n },\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Body\": {\n flex: 1,\n alignItems: \"center\",\n alignSelf: \"center\",\n flexDirection: \"row\",\n \"NativeBase.Button\": {\n alignSelf: \"center\",\n \".transparent\": {\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null\n },\n \".full\": {\n height: variables.footerHeight,\n flex: 1\n },\n \"NativeBase.Icon\": {\n color: variables.topTabBarActiveTextColor\n },\n \"NativeBase.IconNB\": {\n color: variables.topTabBarActiveTextColor\n }\n }\n },\n \"NativeBase.Right\": {\n \"NativeBase.Button\": {\n \".transparent\": {\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.topTabBarActiveTextColor\n },\n \"NativeBase.IconNB\": {\n color: variables.topTabBarActiveTextColor\n },\n alignSelf: null\n },\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-end\"\n },\n backgroundColor: variables.footerDefaultBg,\n flexDirection: \"row\",\n justifyContent: \"center\",\n borderTopWidth: platform === \"ios\" && platformStyle !== \"material\"\n ? variables.borderWidth\n : undefined,\n borderColor: platform === \"ios\" && platformStyle !== \"material\"\n ? \"#cbcbcb\"\n : undefined,\n height: variables.footerHeight,\n elevation: 3,\n left: 0,\n right: 0\n };\n\n return footerTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/FooterTab.js b/dist/src/theme/components/FooterTab.js index 3b9af2792..eff84174c 100644 --- a/dist/src/theme/components/FooterTab.js +++ b/dist/src/theme/components/FooterTab.js @@ -1,75 +1,76 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var footerTabTheme={ -'NativeBase.Button':{ -'.active':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +".active":{ +"NativeBase.Text":{ color:variables.tabBarActiveTextColor, fontSize:variables.tabBarTextSize, lineHeight:16}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.tabBarActiveTextColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.tabBarActiveTextColor}, backgroundColor:variables.tabActiveBgColor}, flexDirection:null, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, shadowOffset:null, shadowRadius:null, shadowOpacity:null, -alignSelf:'center', +alignSelf:"center", flex:1, height:variables.footerHeight, -justifyContent:'center', -'.badge':{ -'NativeBase.Badge':{ -'NativeBase.Text':{ +justifyContent:"center", +".badge":{ +"NativeBase.Badge":{ +"NativeBase.Text":{ fontSize:11, -fontWeight:platform==='ios'?'600':undefined, +fontWeight:platform==="ios"?"600":undefined, lineHeight:14}, top:-3, -alignSelf:'center', +alignSelf:"center", left:10, zIndex:99, height:18, padding:1.7, paddingHorizontal:3}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginTop:-18}}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.tabBarTextColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.tabBarTextColor}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.tabBarTextColor, fontSize:variables.tabBarTextSize, lineHeight:16}}, -backgroundColor:_reactNative.Platform.OS==='android'?variables.tabActiveBgColor:undefined, -flexDirection:'row', -justifyContent:'space-between', +backgroundColor:_reactNative.Platform.OS==="android"? +variables.tabActiveBgColor: +undefined, +flexDirection:"row", +justifyContent:"space-between", flex:1, -alignSelf:'stretch'}; - +alignSelf:"stretch"}; return footerTabTheme; diff --git a/dist/src/theme/components/FooterTab.js.map b/dist/src/theme/components/FooterTab.js.map index f0251bfe5..4f4e62c61 100644 --- a/dist/src/theme/components/FooterTab.js.map +++ b/dist/src/theme/components/FooterTab.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/FooterTab.js"],"names":["variables","platform","footerTabTheme","color","tabBarActiveTextColor","fontSize","tabBarTextSize","lineHeight","backgroundColor","tabActiveBgColor","flexDirection","borderColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","alignSelf","flex","height","footerHeight","justifyContent","fontWeight","undefined","top","left","zIndex","padding","paddingHorizontal","marginTop","tabBarTextColor","OS"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,gBAAiB;AACnB,oBAAqB;AACnB,UAAW;AACT,kBAAmB;AACjBC,MAAOH,UAAUI,qBADA;AAEjBC,SAAUL,UAAUM,cAFH;AAGjBC,WAAY,EAHK,CADV;;AAMT,kBAAmB;AACjBJ,MAAOH,UAAUI,qBADA,CANV;;AAST,oBAAqB;AACnBD,MAAOH,UAAUI,qBADE,CATZ;;AAYTI,gBAAiBR,UAAUS,gBAZlB,CADQ;;AAenBC,cAAe,IAfI;AAgBnBF,gBAAiB,aAhBE;AAiBnBG,YAAa,IAjBM;AAkBnBC,UAAW,CAlBQ;AAmBnBC,YAAa,IAnBM;AAoBnBC,aAAc,IApBK;AAqBnBC,aAAc,IArBK;AAsBnBC,cAAe,IAtBI;AAuBnBC,UAAW,QAvBQ;AAwBnBC,KAAM,CAxBa;AAyBnBC,OAAQnB,UAAUoB,YAzBC;AA0BnBC,eAAgB,QA1BG;AA2BnB,SAAU;AACR,mBAAoB;AAClB,kBAAmB;AACjBhB,SAAU,EADO;AAEjBiB,WAAarB,WAAa,KAAd,CAAuB,KAAvB,CAA+BsB,SAF1B;AAGjBhB,WAAY,EAHK,CADD;;AAMlBiB,IAAK,CAAC,CANY;AAOlBP,UAAW,QAPO;AAQlBQ,KAAM,EARY;AASlBC,OAAQ,EATU;AAUlBP,OAAQ,EAVU;AAWlBQ,QAAS,GAXS;AAYlBC,kBAAmB,CAZD,CADZ;;AAeR,kBAAmB;AACjBC,UAAW,CAAC,EADK,CAfX,CA3BS;;;AA8CnB,kBAAmB;AACjB1B,MAAOH,UAAU8B,eADA,CA9CA;;AAiDnB,oBAAqB;AACnB3B,MAAOH,UAAU8B,eADE,CAjDF;;AAoDnB,kBAAmB;AACjB3B,MAAOH,UAAU8B,eADA;AAEjBzB,SAAUL,UAAUM,cAFH;AAGjBC,WAAY,EAHK,CApDA,CADF;;;AA2DnBC,gBAAkB,sBAASuB,EAAT,GAAgB,SAAjB,CAA8B/B,UAAUS,gBAAxC,CAA2Dc,SA3DzD;AA4DnBb,cAAe,KA5DI;AA6DnBW,eAAgB,eA7DG;AA8DnBH,KAAM,CA9Da;AA+DnBD,UAAW,SA/DQ,CAAvB;;;;AAmEA,MAAOf,eAAP;AACD,C","file":"FooterTab.js","sourcesContent":["import { Platform } from 'react-native';\n\nimport variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const footerTabTheme = {\n 'NativeBase.Button': {\n '.active': {\n 'NativeBase.Text': {\n color: variables.tabBarActiveTextColor,\n fontSize: variables.tabBarTextSize,\n lineHeight: 16,\n },\n 'NativeBase.Icon': {\n color: variables.tabBarActiveTextColor,\n },\n 'NativeBase.IconNB': {\n color: variables.tabBarActiveTextColor,\n },\n backgroundColor: variables.tabActiveBgColor,\n },\n flexDirection: null,\n backgroundColor: 'transparent',\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n alignSelf: 'center',\n flex: 1,\n height: variables.footerHeight,\n justifyContent: 'center',\n '.badge': {\n 'NativeBase.Badge': {\n 'NativeBase.Text': {\n fontSize: 11,\n fontWeight: (platform === 'ios') ? '600' : undefined,\n lineHeight: 14,\n },\n top: -3,\n alignSelf: 'center',\n left: 10,\n zIndex: 99,\n height: 18,\n padding: 1.7,\n paddingHorizontal: 3,\n },\n 'NativeBase.Icon': {\n marginTop: -18,\n },\n },\n 'NativeBase.Icon': {\n color: variables.tabBarTextColor,\n },\n 'NativeBase.IconNB': {\n color: variables.tabBarTextColor,\n },\n 'NativeBase.Text': {\n color: variables.tabBarTextColor,\n fontSize: variables.tabBarTextSize,\n lineHeight: 16,\n },\n },\n backgroundColor: (Platform.OS === 'android') ? variables.tabActiveBgColor : undefined,\n flexDirection: 'row',\n justifyContent: 'space-between',\n flex: 1,\n alignSelf: 'stretch',\n };\n\n\n return footerTabTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/FooterTab.js"],"names":["variables","platform","footerTabTheme","color","tabBarActiveTextColor","fontSize","tabBarTextSize","lineHeight","backgroundColor","tabActiveBgColor","flexDirection","borderColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","alignSelf","flex","height","footerHeight","justifyContent","fontWeight","undefined","top","left","zIndex","padding","paddingHorizontal","marginTop","tabBarTextColor","OS"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,gBAAiB;AACrB,oBAAqB;AACnB,UAAW;AACT,kBAAmB;AACjBC,MAAOH,UAAUI,qBADA;AAEjBC,SAAUL,UAAUM,cAFH;AAGjBC,WAAY,EAHK,CADV;;AAMT,kBAAmB;AACjBJ,MAAOH,UAAUI,qBADA,CANV;;AAST,oBAAqB;AACnBD,MAAOH,UAAUI,qBADE,CATZ;;AAYTI,gBAAiBR,UAAUS,gBAZlB,CADQ;;AAenBC,cAAe,IAfI;AAgBnBF,gBAAiB,aAhBE;AAiBnBG,YAAa,IAjBM;AAkBnBC,UAAW,CAlBQ;AAmBnBC,YAAa,IAnBM;AAoBnBC,aAAc,IApBK;AAqBnBC,aAAc,IArBK;AAsBnBC,cAAe,IAtBI;AAuBnBC,UAAW,QAvBQ;AAwBnBC,KAAM,CAxBa;AAyBnBC,OAAQnB,UAAUoB,YAzBC;AA0BnBC,eAAgB,QA1BG;AA2BnB,SAAU;AACR,mBAAoB;AAClB,kBAAmB;AACjBhB,SAAU,EADO;AAEjBiB,WAAYrB,WAAa,KAAb,CAAqB,KAArB,CAA6BsB,SAFxB;AAGjBhB,WAAY,EAHK,CADD;;AAMlBiB,IAAK,CAAC,CANY;AAOlBP,UAAW,QAPO;AAQlBQ,KAAM,EARY;AASlBC,OAAQ,EATU;AAUlBP,OAAQ,EAVU;AAWlBQ,QAAS,GAXS;AAYlBC,kBAAmB,CAZD,CADZ;;AAeR,kBAAmB;AACjBC,UAAW,CAAC,EADK,CAfX,CA3BS;;;AA8CnB,kBAAmB;AACjB1B,MAAOH,UAAU8B,eADA,CA9CA;;AAiDnB,oBAAqB;AACnB3B,MAAOH,UAAU8B,eADE,CAjDF;;AAoDnB,kBAAmB;AACjB3B,MAAOH,UAAU8B,eADA;AAEjBzB,SAAUL,UAAUM,cAFH;AAGjBC,WAAY,EAHK,CApDA,CADA;;;AA2DrBC,gBAAiB,sBAASuB,EAAT,GAAgB,SAAhB;AACb/B,UAAUS,gBADG;AAEbc,SA7DiB;AA8DrBb,cAAe,KA9DM;AA+DrBW,eAAgB,eA/DK;AAgErBH,KAAM,CAhEe;AAiErBD,UAAW,SAjEU,CAAvB;;;AAoEA,MAAOf,eAAP;AACD,C","file":"FooterTab.js","sourcesContent":["import { Platform } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const footerTabTheme = {\n \"NativeBase.Button\": {\n \".active\": {\n \"NativeBase.Text\": {\n color: variables.tabBarActiveTextColor,\n fontSize: variables.tabBarTextSize,\n lineHeight: 16\n },\n \"NativeBase.Icon\": {\n color: variables.tabBarActiveTextColor\n },\n \"NativeBase.IconNB\": {\n color: variables.tabBarActiveTextColor\n },\n backgroundColor: variables.tabActiveBgColor\n },\n flexDirection: null,\n backgroundColor: \"transparent\",\n borderColor: null,\n elevation: 0,\n shadowColor: null,\n shadowOffset: null,\n shadowRadius: null,\n shadowOpacity: null,\n alignSelf: \"center\",\n flex: 1,\n height: variables.footerHeight,\n justifyContent: \"center\",\n \".badge\": {\n \"NativeBase.Badge\": {\n \"NativeBase.Text\": {\n fontSize: 11,\n fontWeight: platform === \"ios\" ? \"600\" : undefined,\n lineHeight: 14\n },\n top: -3,\n alignSelf: \"center\",\n left: 10,\n zIndex: 99,\n height: 18,\n padding: 1.7,\n paddingHorizontal: 3\n },\n \"NativeBase.Icon\": {\n marginTop: -18\n }\n },\n \"NativeBase.Icon\": {\n color: variables.tabBarTextColor\n },\n \"NativeBase.IconNB\": {\n color: variables.tabBarTextColor\n },\n \"NativeBase.Text\": {\n color: variables.tabBarTextColor,\n fontSize: variables.tabBarTextSize,\n lineHeight: 16\n }\n },\n backgroundColor: Platform.OS === \"android\"\n ? variables.tabActiveBgColor\n : undefined,\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n flex: 1,\n alignSelf: \"stretch\"\n };\n\n return footerTabTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Form.js b/dist/src/theme/components/Form.js index 0ebf14416..b0b0658d5 100644 --- a/dist/src/theme/components/Form.js +++ b/dist/src/theme/components/Form.js @@ -1,84 +1,83 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var theme={ -'NativeBase.Item':{ -'.fixedLabel':{ -'NativeBase.Label':{ +"NativeBase.Item":{ +".fixedLabel":{ +"NativeBase.Label":{ paddingLeft:null}, marginLeft:15}, -'.inlineLabel':{ -'NativeBase.Label':{ +".inlineLabel":{ +"NativeBase.Label":{ paddingLeft:null}, marginLeft:15}, -'.placeholderLabel':{ -'NativeBase.Input':{}}, +".placeholderLabel":{ +"NativeBase.Input":{}}, - -'.stackedLabel':{ -'NativeBase.Label':{ +".stackedLabel":{ +"NativeBase.Label":{ top:5, paddingLeft:null}, -'NativeBase.Input':{ +"NativeBase.Input":{ paddingLeft:null, -marginLeft:platform==='ios'?undefined:-5}, +marginLeft:platform==="ios"?undefined:-5}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginTop:36}, marginLeft:15}, -'.floatingLabel':{ -'NativeBase.Input':{ +".floatingLabel":{ +"NativeBase.Input":{ paddingLeft:null, top:10, -marginLeft:platform==='ios'?undefined:-5}, +marginLeft:platform==="ios"?undefined:-5}, -'NativeBase.Label':{ +"NativeBase.Label":{ left:0, top:8}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ top:6}, marginTop:15, marginLeft:15}, -'.regular':{ -'NativeBase.Label':{ +".regular":{ +"NativeBase.Label":{ left:0}, marginLeft:0}, -'.rounded':{ -'NativeBase.Label':{ +".rounded":{ +"NativeBase.Label":{ left:0}, marginLeft:0}, -'.underline':{ -'NativeBase.Label':{ +".underline":{ +"NativeBase.Label":{ left:0, top:0, -position:'relative'}, +position:"relative"}, -'NativeBase.Input':{ +"NativeBase.Input":{ left:-15}, marginLeft:15}, -'.last':{ +".last":{ marginLeft:0, paddingLeft:15}, -'NativeBase.Label':{ +"NativeBase.Label":{ paddingRight:5}, marginLeft:15}}; diff --git a/dist/src/theme/components/Form.js.map b/dist/src/theme/components/Form.js.map index 4c0c88006..1074eb53b 100644 --- a/dist/src/theme/components/Form.js.map +++ b/dist/src/theme/components/Form.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Form.js"],"names":["variables","platform","theme","paddingLeft","marginLeft","top","undefined","marginTop","left","position","paddingRight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,OAAQ;AACZ,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","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const theme = {\n 'NativeBase.Item':{\n '.fixedLabel': {\n 'NativeBase.Label': {\n paddingLeft: null,\n },\n marginLeft: 15,\n },\n '.inlineLabel': {\n 'NativeBase.Label': {\n paddingLeft: null,\n },\n marginLeft: 15,\n },\n '.placeholderLabel': {\n 'NativeBase.Input': {\n },\n },\n '.stackedLabel': {\n 'NativeBase.Label': {\n top: 5,\n paddingLeft: null,\n },\n 'NativeBase.Input': {\n paddingLeft: null,\n marginLeft: (platform === 'ios') ? undefined : -5,\n },\n 'NativeBase.Icon': {\n marginTop: 36,\n },\n marginLeft: 15,\n },\n '.floatingLabel': {\n 'NativeBase.Input': {\n paddingLeft: null,\n top: 10,\n marginLeft: (platform === 'ios') ? undefined : -5,\n },\n 'NativeBase.Label': {\n left: 0,\n top: 8,\n },\n 'NativeBase.Icon': {\n top: 6,\n },\n marginTop: 15,\n marginLeft: 15,\n },\n '.regular': {\n 'NativeBase.Label': {\n left: 0,\n },\n marginLeft: 0,\n },\n '.rounded': {\n 'NativeBase.Label': {\n left: 0,\n },\n marginLeft: 0,\n },\n '.underline': {\n 'NativeBase.Label': {\n left: 0,\n top: 0,\n position: 'relative',\n },\n 'NativeBase.Input': {\n left: -15,\n },\n marginLeft: 15,\n },\n '.last': {\n marginLeft:0,\n paddingLeft:15,\n },\n 'NativeBase.Label': {\n paddingRight: 5,\n },\n marginLeft: 15,\n },\n };\n\n return theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Form.js"],"names":["variables","platform","theme","paddingLeft","marginLeft","top","undefined","marginTop","left","position","paddingRight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,OAAQ;AACZ,kBAAmB;AACjB,cAAe;AACb,mBAAoB;AAClBC,YAAa,IADK,CADP;;AAIbC,WAAY,EAJC,CADE;;AAOjB,eAAgB;AACd,mBAAoB;AAClBD,YAAa,IADK,CADN;;AAIdC,WAAY,EAJE,CAPC;;AAajB,oBAAqB;AACnB,mBAAoB,EADD,CAbJ;;AAgBjB,gBAAiB;AACf,mBAAoB;AAClBC,IAAK,CADa;AAElBF,YAAa,IAFK,CADL;;AAKf,mBAAoB;AAClBA,YAAa,IADK;AAElBC,WAAYH,WAAa,KAAb,CAAqBK,SAArB,CAAiC,CAAC,CAF5B,CALL;;AASf,kBAAmB;AACjBC,UAAW,EADM,CATJ;;AAYfH,WAAY,EAZG,CAhBA;;AA8BjB,iBAAkB;AAChB,mBAAoB;AAClBD,YAAa,IADK;AAElBE,IAAK,EAFa;AAGlBD,WAAYH,WAAa,KAAb,CAAqBK,SAArB,CAAiC,CAAC,CAH5B,CADJ;;AAMhB,mBAAoB;AAClBE,KAAM,CADY;AAElBH,IAAK,CAFa,CANJ;;AAUhB,kBAAmB;AACjBA,IAAK,CADY,CAVH;;AAahBE,UAAW,EAbK;AAchBH,WAAY,EAdI,CA9BD;;AA8CjB,WAAY;AACV,mBAAoB;AAClBI,KAAM,CADY,CADV;;AAIVJ,WAAY,CAJF,CA9CK;;AAoDjB,WAAY;AACV,mBAAoB;AAClBI,KAAM,CADY,CADV;;AAIVJ,WAAY,CAJF,CApDK;;AA0DjB,aAAc;AACZ,mBAAoB;AAClBI,KAAM,CADY;AAElBH,IAAK,CAFa;AAGlBI,SAAU,UAHQ,CADR;;AAMZ,mBAAoB;AAClBD,KAAM,CAAC,EADW,CANR;;AASZJ,WAAY,EATA,CA1DG;;AAqEjB,QAAS;AACPA,WAAY,CADL;AAEPD,YAAa,EAFN,CArEQ;;AAyEjB,mBAAoB;AAClBO,aAAc,CADI,CAzEH;;AA4EjBN,WAAY,EA5EK,CADP,CAAd;;;;AAiFA,MAAOF,MAAP;AACD,C","file":"Form.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const theme = {\n \"NativeBase.Item\": {\n \".fixedLabel\": {\n \"NativeBase.Label\": {\n paddingLeft: null\n },\n marginLeft: 15\n },\n \".inlineLabel\": {\n \"NativeBase.Label\": {\n paddingLeft: null\n },\n marginLeft: 15\n },\n \".placeholderLabel\": {\n \"NativeBase.Input\": {}\n },\n \".stackedLabel\": {\n \"NativeBase.Label\": {\n top: 5,\n paddingLeft: null\n },\n \"NativeBase.Input\": {\n paddingLeft: null,\n marginLeft: platform === \"ios\" ? undefined : -5\n },\n \"NativeBase.Icon\": {\n marginTop: 36\n },\n marginLeft: 15\n },\n \".floatingLabel\": {\n \"NativeBase.Input\": {\n paddingLeft: null,\n top: 10,\n marginLeft: platform === \"ios\" ? undefined : -5\n },\n \"NativeBase.Label\": {\n left: 0,\n top: 8\n },\n \"NativeBase.Icon\": {\n top: 6\n },\n marginTop: 15,\n marginLeft: 15\n },\n \".regular\": {\n \"NativeBase.Label\": {\n left: 0\n },\n marginLeft: 0\n },\n \".rounded\": {\n \"NativeBase.Label\": {\n left: 0\n },\n marginLeft: 0\n },\n \".underline\": {\n \"NativeBase.Label\": {\n left: 0,\n top: 0,\n position: \"relative\"\n },\n \"NativeBase.Input\": {\n left: -15\n },\n marginLeft: 15\n },\n \".last\": {\n marginLeft: 0,\n paddingLeft: 15\n },\n \"NativeBase.Label\": {\n paddingRight: 5\n },\n marginLeft: 15\n }\n };\n\n return theme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/H1.js b/dist/src/theme/components/H1.js index dccf6ac22..32f74e56e 100644 --- a/dist/src/theme/components/H1.js +++ b/dist/src/theme/components/H1.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var h1Theme={ @@ -7,7 +7,6 @@ fontSize:variables.fontSizeH1, lineHeight:variables.lineHeightH1}; - return h1Theme; }; //# sourceMappingURL=H1.js.map \ No newline at end of file diff --git a/dist/src/theme/components/H1.js.map b/dist/src/theme/components/H1.js.map index 986a51041..e44256062 100644 --- a/dist/src/theme/components/H1.js.map +++ b/dist/src/theme/components/H1.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/H1.js"],"names":["variables","h1Theme","color","textColor","fontSize","fontSizeH1","lineHeight","lineHeightH1"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACZC,MAAOF,UAAUG,SADL;AAEZC,SAAUJ,UAAUK,UAFR;AAGZC,WAAYN,UAAUO,YAHV,CAAhB;;;;AAOA,MAAON,QAAP;AACD,C","file":"H1.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const h1Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH1,\n lineHeight: variables.lineHeightH1,\n };\n\n\n return h1Theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/H1.js"],"names":["variables","h1Theme","color","textColor","fontSize","fontSizeH1","lineHeight","lineHeightH1"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACdC,MAAOF,UAAUG,SADH;AAEdC,SAAUJ,UAAUK,UAFN;AAGdC,WAAYN,UAAUO,YAHR,CAAhB;;;AAMA,MAAON,QAAP;AACD,C","file":"H1.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const h1Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH1,\n lineHeight: variables.lineHeightH1,\n };\n\n return h1Theme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/H2.js b/dist/src/theme/components/H2.js index b517061a6..d275ad799 100644 --- a/dist/src/theme/components/H2.js +++ b/dist/src/theme/components/H2.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var h2Theme={ @@ -7,7 +7,6 @@ fontSize:variables.fontSizeH2, lineHeight:variables.lineHeightH2}; - return h2Theme; }; //# sourceMappingURL=H2.js.map \ No newline at end of file diff --git a/dist/src/theme/components/H2.js.map b/dist/src/theme/components/H2.js.map index e277f14c4..5398489db 100644 --- a/dist/src/theme/components/H2.js.map +++ b/dist/src/theme/components/H2.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/H2.js"],"names":["variables","h2Theme","color","textColor","fontSize","fontSizeH2","lineHeight","lineHeightH2"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACZC,MAAOF,UAAUG,SADL;AAEZC,SAAUJ,UAAUK,UAFR;AAGZC,WAAYN,UAAUO,YAHV,CAAhB;;;;AAOA,MAAON,QAAP;AACD,C","file":"H2.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const h2Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH2,\n lineHeight: variables.lineHeightH2,\n };\n\n\n return h2Theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/H2.js"],"names":["variables","h2Theme","color","textColor","fontSize","fontSizeH2","lineHeight","lineHeightH2"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACdC,MAAOF,UAAUG,SADH;AAEdC,SAAUJ,UAAUK,UAFN;AAGdC,WAAYN,UAAUO,YAHR,CAAhB;;;AAMA,MAAON,QAAP;AACD,C","file":"H2.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const h2Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH2,\n lineHeight: variables.lineHeightH2,\n };\n\n return h2Theme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/H3.js b/dist/src/theme/components/H3.js index 23fe5f8a4..b73019e05 100644 --- a/dist/src/theme/components/H3.js +++ b/dist/src/theme/components/H3.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var h3Theme={ @@ -7,7 +7,6 @@ fontSize:variables.fontSizeH3, lineHeight:variables.lineHeightH3}; - return h3Theme; }; //# sourceMappingURL=H3.js.map \ No newline at end of file diff --git a/dist/src/theme/components/H3.js.map b/dist/src/theme/components/H3.js.map index 57a487696..d880f162b 100644 --- a/dist/src/theme/components/H3.js.map +++ b/dist/src/theme/components/H3.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/H3.js"],"names":["variables","h3Theme","color","textColor","fontSize","fontSizeH3","lineHeight","lineHeightH3"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACZC,MAAOF,UAAUG,SADL;AAEZC,SAAUJ,UAAUK,UAFR;AAGZC,WAAYN,UAAUO,YAHV,CAAhB;;;;AAOA,MAAON,QAAP;AACD,C","file":"H3.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const h3Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH3,\n lineHeight: variables.lineHeightH3,\n };\n\n\n return h3Theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/H3.js"],"names":["variables","h3Theme","color","textColor","fontSize","fontSizeH3","lineHeight","lineHeightH3"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,SAAU;AACdC,MAAOF,UAAUG,SADH;AAEdC,SAAUJ,UAAUK,UAFN;AAGdC,WAAYN,UAAUO,YAHR,CAAhB;;;AAMA,MAAON,QAAP;AACD,C","file":"H3.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const h3Theme = {\n color: variables.textColor,\n fontSize: variables.fontSizeH3,\n lineHeight: variables.lineHeightH3\n };\n\n return h3Theme;\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 9ef0027f7..17eb5fb5f 100644 --- a/dist/src/theme/components/Header.js +++ b/dist/src/theme/components/Header.js @@ -1,50 +1,50 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platformStyle=variables.platformStyle; var platform=variables.platform; var headerTheme={ -'.span':{ +".span":{ height:128, -'NativeBase.Left':{ -alignSelf:'flex-start'}, +"NativeBase.Left":{ +alignSelf:"flex-start"}, -'NativeBase.Body':{ -alignSelf:'flex-end', -alignItems:'flex-start', -justifyContent:'center', +"NativeBase.Body":{ +alignSelf:"flex-end", +alignItems:"flex-start", +justifyContent:"center", paddingBottom:26}, -'NativeBase.Right':{ -alignSelf:'flex-start'}}, +"NativeBase.Right":{ +alignSelf:"flex-start"}}, -'.hasSubtitle':{ -'NativeBase.Body':{ -'NativeBase.Title':{ +".hasSubtitle":{ +"NativeBase.Body":{ +"NativeBase.Title":{ fontSize:variables.titleFontSize-2, fontFamily:variables.titleFontfamily, -textAlign:'center'}, +textAlign:"center"}, -'NativeBase.Subtitle':{ +"NativeBase.Subtitle":{ fontSize:variables.subTitleFontSize, fontFamily:variables.titleFontfamily, color:variables.subtitleColor, -textAlign:'center'}}}, +textAlign:"center"}}}, -'.noShadow':{ +".noShadow":{ elevation:0, shadowColor:null, shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'.hasTabs':{ +".hasTabs":{ elevation:0, shadowColor:null, shadowOffset:null, @@ -52,7 +52,7 @@ shadowRadius:null, shadowOpacity:null, borderBottomWidth:null}, -'.hasSegment':{ +".hasSegment":{ elevation:0, shadowColor:null, shadowOffset:null, @@ -60,91 +60,93 @@ shadowRadius:null, shadowOpacity:null, borderBottomWidth:null}, -'NativeBase.Button':{ -justifyContent:'center', -alignSelf:'center', -alignItems:'center', -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +justifyContent:"center", +alignSelf:"center", +alignItems:"center", +".transparent":{ +"NativeBase.Text":{ color:variables.toolbarBtnColor, -fontWeight:'600'}, +fontWeight:"600"}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor}, paddingHorizontal:variables.buttonPadding}, paddingHorizontal:15}, -'.searchBar':{ -'NativeBase.Item':{ -'NativeBase.Icon':{ -backgroundColor:'transparent', +".searchBar":{ +"NativeBase.Item":{ +"NativeBase.Icon":{ +backgroundColor:"transparent", color:variables.dropdownLinkColor, fontSize:variables.toolbarSearchIconSize, -alignItems:'center', +alignItems:"center", marginTop:2, paddingRight:10, paddingLeft:10}, -'NativeBase.IconNB':{ -backgroundColor:'transparent', +"NativeBase.IconNB":{ +backgroundColor:"transparent", color:null, -alignSelf:'center'}, +alignSelf:"center"}, -'NativeBase.Input':{ -alignSelf:'center', +"NativeBase.Input":{ +alignSelf:"center", lineHeight:24, height:variables.searchBarHeight}, -alignSelf:'center', -alignItems:'center', -justifyContent:'flex-start', +alignSelf:"center", +alignItems:"center", +justifyContent:"flex-start", flex:1, height:variables.searchBarHeight, -borderColor:'transparent', +borderColor:"transparent", backgroundColor:variables.toolbarInputColor}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ -fontWeight:'500'}, +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ +fontWeight:"500"}, paddingHorizontal:null, -paddingLeft:platform==='ios'?10:null}, +paddingLeft:platform==="ios"?10:null}, -paddingHorizontal:platform==='ios'?undefined:null, -width:platform==='ios'?undefined:0, -height:platform==='ios'?undefined:0}}, +paddingHorizontal:platform==="ios"?undefined:null, +width:platform==="ios"?undefined:0, +height:platform==="ios"?undefined:0}}, -'.rounded':{ -'NativeBase.Item':{ -borderRadius:platform==='ios'&&platformStyle!=='material'?25:3}}, +".rounded":{ +"NativeBase.Item":{ +borderRadius:platform==="ios"&&platformStyle!=="material"? +25: +3}}, -'NativeBase.Left':{ -'NativeBase.Button':{ -'.hasText':{ +"NativeBase.Left":{ +"NativeBase.Button":{ +".hasText":{ marginLeft:-10, height:30, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize, marginTop:2, marginRight:5, marginLeft:2}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.toolbarBtnColor, fontSize:17, marginLeft:2, lineHeight:21}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize, marginTop:2, @@ -152,28 +154,28 @@ marginRight:5, marginLeft:2}}, -'.transparent':{ +".transparent":{ marginLeft:-3, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize, marginTop:2, marginRight:2, marginLeft:2}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize, marginTop:2, marginRight:2, marginLeft:2}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.toolbarBtnColor, fontSize:17, -top:platform==='ios'?undefined:-1.5}, +top:platform==="ios"?undefined:-1.5}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, @@ -181,62 +183,64 @@ shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor}, alignSelf:null, paddingHorizontal:variables.buttonPadding}, -flex:platform==='ios'&&platformStyle!=='material'?1:0.5, -alignSelf:'center', -alignItems:'flex-start'}, +flex:platform==="ios"&&platformStyle!=="material"?1:0.5, +alignSelf:"center", +alignItems:"flex-start"}, -'NativeBase.Body':{ +"NativeBase.Body":{ flex:1, -alignItems:platform==='ios'&&platformStyle!=='material'?'center':'flex-start', -alignSelf:'center', -'NativeBase.Segment':{ +alignItems:platform==="ios"&&platformStyle!=="material"? +"center": +"flex-start", +alignSelf:"center", +"NativeBase.Segment":{ borderWidth:0, -alignSelf:'flex-end', -marginRight:platform==='ios'?-40:-55}, +alignSelf:"flex-end", +marginRight:platform==="ios"?-40:-55}, -'NativeBase.Button':{ -alignSelf:'center', -'.transparent':{ -backgroundColor:'transparent'}, +"NativeBase.Button":{ +alignSelf:"center", +".transparent":{ +backgroundColor:"transparent"}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.inverseTextColor, -backgroundColor:'transparent'}}}, +backgroundColor:"transparent"}}}, -'NativeBase.Right':{ -'NativeBase.Button':{ -'.hasText':{ +"NativeBase.Right":{ +"NativeBase.Button":{ +".hasText":{ height:30, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize-2, marginTop:2, marginRight:2, marginLeft:5}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.toolbarBtnColor, fontSize:17, lineHeight:21}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor, fontSize:variables.iconHeaderSize-2, marginTop:2, @@ -244,30 +248,34 @@ marginRight:2, marginLeft:5}}, -'.transparent':{ +".transparent":{ marginRight:-8, paddingHorizontal:15, borderRadius:50, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor, -fontSize:platform==='ios'?variables.iconHeaderSize-6:variables.iconHeaderSize-2, +fontSize:platform==="ios"? +variables.iconHeaderSize-6: +variables.iconHeaderSize-2, marginTop:2, marginLeft:2, marginRight:2}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor, -fontSize:platform==='ios'?variables.iconHeaderSize-6:variables.iconHeaderSize-2, +fontSize:platform==="ios"? +variables.iconHeaderSize-6: +variables.iconHeaderSize-2, marginTop:2, marginLeft:2, marginRight:2}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.toolbarBtnColor, fontSize:17, -top:platform==='ios'?undefined:-1.5}, +top:platform==="ios"?undefined:-1.5}, -backgroundColor:'transparent', +backgroundColor:"transparent", borderColor:null, elevation:0, shadowColor:null, @@ -275,40 +283,43 @@ shadowOffset:null, shadowRadius:null, shadowOpacity:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.toolbarBtnColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.toolbarBtnColor}, alignSelf:null, paddingHorizontal:variables.buttonPadding}, flex:1, -alignSelf:'center', -alignItems:'flex-end', -flexDirection:'row', -justifyContent:'flex-end'}, +alignSelf:"center", +alignItems:"flex-end", +flexDirection:"row", +justifyContent:"flex-end"}, backgroundColor:variables.toolbarDefaultBg, -flexDirection:'row', +flexDirection:"row", paddingHorizontal:10, -justifyContent:'center', -paddingTop:platform==='ios'?15:0, -borderBottomWidth:platform==='ios'?1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1):0, +justifyContent:"center", +paddingTop:platform==="ios"?15:0, +borderBottomWidth:platform==="ios"? +1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1): +0, borderBottomColor:variables.toolbarDefaultBorder, height:variables.toolbarHeight, elevation:3, -shadowColor:platformStyle==='material'?'#000':undefined, -shadowOffset:platformStyle==='material'?{width:0,height:2}:undefined, -shadowOpacity:platformStyle==='material'?0.2:undefined, -shadowRadius:platformStyle==='material'?1.2:undefined, +shadowColor:platformStyle==="material"?"#000":undefined, +shadowOffset:platformStyle==="material"? +{width:0,height:2}: +undefined, +shadowOpacity:platformStyle==="material"?0.2:undefined, +shadowRadius:platformStyle==="material"?1.2:undefined, top:0, left:0, right:0}; - return headerTheme; }; //# sourceMappingURL=Header.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Header.js.map b/dist/src/theme/components/Header.js.map index 950397ee2..667325870 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","platformStyle","platform","headerTheme","height","alignSelf","alignItems","justifyContent","paddingBottom","fontSize","titleFontSize","fontFamily","titleFontfamily","textAlign","subTitleFontSize","color","subtitleColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","borderBottomWidth","toolbarBtnColor","fontWeight","paddingHorizontal","buttonPadding","backgroundColor","dropdownLinkColor","toolbarSearchIconSize","marginTop","paddingRight","paddingLeft","lineHeight","searchBarHeight","flex","borderColor","toolbarInputColor","undefined","width","borderRadius","marginLeft","iconHeaderSize","marginRight","top","borderWidth","inverseTextColor","flexDirection","toolbarDefaultBg","paddingTop","getPixelSizeForLayoutSize","borderBottomColor","toolbarDefaultBorder","toolbarHeight","left","right"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,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,SAAUT,UAAUU,aAAV,CAA0B,CADlB;AAElBC,WAAYX,UAAUY,eAFJ;AAGlBC,UAAW,QAHO,CADH;;AAMjB,sBAAuB;AACrBJ,SAAUT,UAAUc,gBADC;AAErBH,WAAYX,UAAUY,eAFD;AAGrBG,MAAOf,UAAUgB,aAHI;AAIrBH,UAAW,QAJU,CANN,CADL,CAhBE;;;;AA+BlB,YAAa;AACXI,UAAW,CADA;AAEXC,YAAa,IAFF;AAGXC,aAAc,IAHH;AAIXC,aAAc,IAJH;AAKXC,cAAe,IALJ,CA/BK;;AAsClB,WAAY;AACVJ,UAAW,CADD;AAEVC,YAAa,IAFH;AAGVC,aAAc,IAHJ;AAIVC,aAAc,IAJJ;AAKVC,cAAe,IALL;AAMVC,kBAAmB,IANT,CAtCM;;AA8ClB,cAAe;AACbL,UAAW,CADE;AAEbC,YAAa,IAFA;AAGbC,aAAc,IAHD;AAIbC,aAAc,IAJD;AAKbC,cAAe,IALF;AAMbC,kBAAmB,IANN,CA9CG;;AAsDlB,oBAAqB;AACnBf,eAAgB,QADG;AAEnBF,UAAW,QAFQ;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cAAe,KA7RG;AA8RlBtB,kBAAmB,EA9RD;AA+RlBlB,eAAgB,QA/RE;AAgSlB0C,WAAa/C,WAAa,KAAd,CAAuB,EAAvB,CAA4B,CAhStB;AAiSlBoB,kBAAoBpB,WAAa,KAAd,CAAwB,EAAI,wBAAWgD,yBAAX,CAAqC,CAArC,CAA5B,CAAuE,CAjSxE;AAkSlBC,kBAAmBnD,UAAUoD,oBAlSX;AAmSlBhD,OAAQJ,UAAUqD,aAnSA;AAoSlBpC,UAAW,CApSO;AAqSlBC,YAAcjB,gBAAkB,UAAnB,CAAiC,MAAjC,CAA0CqC,SArSrC;AAsSlBnB,aAAelB,gBAAkB,UAAnB,CAAiC,CAAEsC,MAAO,CAAT,CAAYnC,OAAQ,CAApB,CAAjC,CAA2DkC,SAtSvD;AAuSlBjB,cAAgBpB,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCqC,SAvSpC;AAwSlBlB,aAAenB,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCqC,SAxSnC;AAySlBM,IAAK,CAzSa;AA0SlBU,KAAM,CA1SY;AA2SlBC,MAAO,CA3SW,CAApB;;;;AA+SA,MAAOpD,YAAP;AACD,C","file":"Header.js","sourcesContent":["import { PixelRatio } 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 },\n 'NativeBase.Subtitle': {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: 'center',\n },\n },\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 },\n 'NativeBase.Button': {\n justifyContent: 'center',\n alignSelf: 'center',\n alignItems: 'center',\n '.transparent': {\n 'NativeBase.Text': {\n color: variables.toolbarBtnColor,\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: 24,\n height: variables.searchBarHeight,\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: ((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.toolbarBtnColor,\n fontSize: 17,\n marginLeft: 2,\n lineHeight: 21\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: -3,\n 'NativeBase.Icon': {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 2\n },\n 'NativeBase.IconNB': {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 2\n },\n 'NativeBase.Text': {\n color: variables.toolbarBtnColor,\n fontSize: 17,\n top: (platform === 'ios') ? undefined : -1.5,\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: ((platform === 'ios') && (platformStyle !== 'material')) ? 1 : 0.5,\n alignSelf: 'center',\n alignItems: 'flex-start',\n },\n 'NativeBase.Body': {\n flex: 1,\n alignItems: ((platform === 'ios') && (platformStyle !== 'material')) ? 'center' : '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.toolbarBtnColor,\n fontSize: 17,\n lineHeight: 21\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: -8,\n paddingHorizontal: 15,\n borderRadius: 50,\n 'NativeBase.Icon': {\n color: variables.toolbarBtnColor,\n fontSize: (platform === 'ios') ? variables.iconHeaderSize - 6 : variables.iconHeaderSize - 2,\n marginTop: 2,\n marginLeft: 2,\n marginRight: 2\n },\n 'NativeBase.IconNB': {\n color: variables.toolbarBtnColor,\n fontSize: (platform === 'ios') ? variables.iconHeaderSize - 6 : variables.iconHeaderSize - 2,\n marginTop: 2,\n marginLeft: 2,\n marginRight: 2\n },\n 'NativeBase.Text': {\n color: variables.toolbarBtnColor,\n fontSize: 17,\n top: (platform === 'ios') ? undefined : -1.5,\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 justifyContent: 'center',\n paddingTop: (platform === 'ios') ? 15 : 0,\n borderBottomWidth: (platform === 'ios') ? (1 / PixelRatio.getPixelSizeForLayoutSize(1)) : 0,\n borderBottomColor: variables.toolbarDefaultBorder,\n height: variables.toolbarHeight,\n elevation: 3,\n shadowColor: (platformStyle === 'material') ? '#000' : undefined,\n shadowOffset: (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\n return headerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Header.js"],"names":["variables","platformStyle","platform","headerTheme","height","alignSelf","alignItems","justifyContent","paddingBottom","fontSize","titleFontSize","fontFamily","titleFontfamily","textAlign","subTitleFontSize","color","subtitleColor","elevation","shadowColor","shadowOffset","shadowRadius","shadowOpacity","borderBottomWidth","toolbarBtnColor","fontWeight","paddingHorizontal","buttonPadding","backgroundColor","dropdownLinkColor","toolbarSearchIconSize","marginTop","paddingRight","paddingLeft","lineHeight","searchBarHeight","flex","borderColor","toolbarInputColor","undefined","width","borderRadius","marginLeft","iconHeaderSize","marginRight","top","borderWidth","inverseTextColor","flexDirection","toolbarDefaultBg","paddingTop","getPixelSizeForLayoutSize","borderBottomColor","toolbarDefaultBorder","toolbarHeight","left","right"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,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,mBAA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lB,CAA+B,GAA/B,CAAqCqC,SAnTlC;AAoTlBlB,aAAcnB,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqCqC,SApTjC;AAqTlBM,IAAK,CArTa;AAsTlBU,KAAM,CAtTY;AAuTlBC,MAAO,CAvTW,CAApB;;;AA0TA,MAAOpD,YAAP;AACD,C","file":"Header.js","sourcesContent":["import { PixelRatio } 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 },\n \"NativeBase.Subtitle\": {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: \"center\"\n }\n }\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 },\n \"NativeBase.Button\": {\n justifyContent: \"center\",\n alignSelf: \"center\",\n alignItems: \"center\",\n \".transparent\": {\n \"NativeBase.Text\": {\n color: variables.toolbarBtnColor,\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: 24,\n height: variables.searchBarHeight\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: platform === \"ios\" && platformStyle !== \"material\"\n ? 25\n : 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.toolbarBtnColor,\n fontSize: 17,\n marginLeft: 2,\n lineHeight: 21\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: -3,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 2\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: variables.iconHeaderSize,\n marginTop: 2,\n marginRight: 2,\n marginLeft: 2\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnColor,\n fontSize: 17,\n top: platform === \"ios\" ? undefined : -1.5\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: platform === \"ios\" && platformStyle !== \"material\" ? 1 : 0.5,\n alignSelf: \"center\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Body\": {\n flex: 1,\n alignItems: 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.toolbarBtnColor,\n fontSize: 17,\n lineHeight: 21\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: -8,\n paddingHorizontal: 15,\n borderRadius: 50,\n \"NativeBase.Icon\": {\n color: variables.toolbarBtnColor,\n fontSize: platform === \"ios\"\n ? variables.iconHeaderSize - 6\n : variables.iconHeaderSize - 2,\n marginTop: 2,\n marginLeft: 2,\n marginRight: 2\n },\n \"NativeBase.IconNB\": {\n color: variables.toolbarBtnColor,\n fontSize: platform === \"ios\"\n ? variables.iconHeaderSize - 6\n : variables.iconHeaderSize - 2,\n marginTop: 2,\n marginLeft: 2,\n marginRight: 2\n },\n \"NativeBase.Text\": {\n color: variables.toolbarBtnColor,\n fontSize: 17,\n top: platform === \"ios\" ? undefined : -1.5\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 justifyContent: \"center\",\n paddingTop: platform === \"ios\" ? 15 : 0,\n borderBottomWidth: platform === \"ios\"\n ? 1 / PixelRatio.getPixelSizeForLayoutSize(1)\n : 0,\n borderBottomColor: variables.toolbarDefaultBorder,\n height: variables.toolbarHeight,\n elevation: 3,\n shadowColor: platformStyle === \"material\" ? \"#000\" : undefined,\n shadowOffset: platformStyle === \"material\"\n ? { width: 0, height: 2 }\n : 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 diff --git a/dist/src/theme/components/Icon.js b/dist/src/theme/components/Icon.js index 19b2b744a..bd25c9f24 100644 --- a/dist/src/theme/components/Icon.js +++ b/dist/src/theme/components/Icon.js @@ -1,10 +1,9 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var iconTheme={ fontSize:variables.iconFontSize, -color:'#000'}; - +color:"#000"}; return iconTheme; diff --git a/dist/src/theme/components/Icon.js.map b/dist/src/theme/components/Icon.js.map index b1c570608..348143aea 100644 --- a/dist/src/theme/components/Icon.js.map +++ b/dist/src/theme/components/Icon.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Icon.js"],"names":["variables","iconTheme","fontSize","iconFontSize","color"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChBC,SAAUF,UAAUG,YADJ;AAEhBC,MAAO,MAFS,CAAlB;;;;AAMA,MAAOH,UAAP;AACD,C","file":"Icon.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const iconTheme = {\n fontSize: variables.iconFontSize,\n color: '#000',\n };\n\n\n return iconTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Icon.js"],"names":["variables","iconTheme","fontSize","iconFontSize","color"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChBC,SAAUF,UAAUG,YADJ;AAEhBC,MAAO,MAFS,CAAlB;;;AAKA,MAAOH,UAAP;AACD,C","file":"Icon.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const iconTheme = {\n fontSize: variables.iconFontSize,\n color: \"#000\"\n };\n\n return iconTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Input.js b/dist/src/theme/components/Input.js index 380e584cd..c5be88658 100644 --- a/dist/src/theme/components/Input.js +++ b/dist/src/theme/components/Input.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var inputTheme={ @@ -11,7 +11,6 @@ fontSize:variables.inputFontSize, lineHeight:variables.inputLineHeight}; - return inputTheme; }; //# sourceMappingURL=Input.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Input.js.map b/dist/src/theme/components/Input.js.map index 5945fb2fe..ae31620f5 100644 --- a/dist/src/theme/components/Input.js.map +++ b/dist/src/theme/components/Input.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Input.js"],"names":["variables","inputTheme","height","inputHeightBase","color","inputColor","paddingLeft","paddingRight","flex","fontSize","inputFontSize","lineHeight","inputLineHeight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjBC,OAAQF,UAAUG,eADD;AAEjBC,MAAOJ,UAAUK,UAFA;AAGjBC,YAAa,CAHI;AAIjBC,aAAc,CAJG;AAKjBC,KAAM,CALW;AAMjBC,SAAUT,UAAUU,aANH;AAOjBC,WAAYX,UAAUY,eAPL,CAAnB;;;;AAWA,MAAOX,WAAP;AACD,C","file":"Input.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const inputTheme = {\n height: variables.inputHeightBase,\n color: variables.inputColor,\n paddingLeft: 5,\n paddingRight: 5,\n flex: 1,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight,\n };\n\n\n return inputTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Input.js"],"names":["variables","inputTheme","height","inputHeightBase","color","inputColor","paddingLeft","paddingRight","flex","fontSize","inputFontSize","lineHeight","inputLineHeight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjBC,OAAQF,UAAUG,eADD;AAEjBC,MAAOJ,UAAUK,UAFA;AAGjBC,YAAa,CAHI;AAIjBC,aAAc,CAJG;AAKjBC,KAAM,CALW;AAMjBC,SAAUT,UAAUU,aANH;AAOjBC,WAAYX,UAAUY,eAPL,CAAnB;;;AAUA,MAAOX,WAAP;AACD,C","file":"Input.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const inputTheme = {\n height: variables.inputHeightBase,\n color: variables.inputColor,\n paddingLeft: 5,\n paddingRight: 5,\n flex: 1,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight\n };\n\n return inputTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/InputGroup.js b/dist/src/theme/components/InputGroup.js index 30b701c20..9fc4f0806 100644 --- a/dist/src/theme/components/InputGroup.js +++ b/dist/src/theme/components/InputGroup.js @@ -1,18 +1,18 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var inputGroupTheme={ -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:24, color:variables.sTabBarActiveTextColor, paddingHorizontal:5}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:24, color:variables.sTabBarActiveTextColor, paddingHorizontal:5}, -'NativeBase.Input':{ +"NativeBase.Input":{ height:variables.inputHeightBase, color:variables.inputColor, paddingLeft:5, @@ -21,11 +21,11 @@ flex:1, fontSize:variables.inputFontSize, lineHeight:variables.inputLineHeight}, -'.underline':{ -'.success':{ +".underline":{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, paddingLeft:5, @@ -35,22 +35,22 @@ borderRightWidth:0, borderLeftWidth:0, borderColor:variables.inputBorderColor}, -'.regular':{ -'.success':{ +".regular":{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, paddingLeft:5, borderWidth:variables.borderWidth, borderColor:variables.inputBorderColor}, -'.rounded':{ -'.success':{ +".rounded":{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, paddingLeft:5, @@ -59,21 +59,21 @@ borderRadius:variables.inputGroupRoundedBorderRadius, borderColor:variables.inputBorderColor}, -'.success':{ -'NativeBase.Icon':{ +".success":{ +"NativeBase.Icon":{ color:variables.inputSuccessBorderColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.inputSuccessBorderColor}, -'.rounded':{ +".rounded":{ borderRadius:30, borderColor:variables.inputSuccessBorderColor}, -'.regular':{ +".regular":{ borderColor:variables.inputSuccessBorderColor}, -'.underline':{ +".underline":{ borderWidth:variables.borderWidth, borderTopWidth:0, borderRightWidth:0, @@ -83,21 +83,21 @@ borderColor:variables.inputSuccessBorderColor}, borderColor:variables.inputSuccessBorderColor}, -'.error':{ -'NativeBase.Icon':{ +".error":{ +"NativeBase.Icon":{ color:variables.inputErrorBorderColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.inputErrorBorderColor}, -'.rounded':{ +".rounded":{ borderRadius:30, borderColor:variables.inputErrorBorderColor}, -'.regular':{ +".regular":{ borderColor:variables.inputErrorBorderColor}, -'.underline':{ +".underline":{ borderWidth:variables.borderWidth, borderTopWidth:0, borderRightWidth:0, @@ -106,12 +106,12 @@ borderColor:variables.inputErrorBorderColor}, borderColor:variables.inputErrorBorderColor}, -'.disabled':{ -'NativeBase.Icon':{ -color:'#384850'}, +".disabled":{ +"NativeBase.Icon":{ +color:"#384850"}, -'NativeBase.IconNB':{ -color:'#384850'}}, +"NativeBase.IconNB":{ +color:"#384850"}}, @@ -121,10 +121,9 @@ borderTopWidth:0, borderRightWidth:0, borderLeftWidth:0, borderColor:variables.inputBorderColor, -backgroundColor:'transparent', -flexDirection:'row', -alignItems:'center'}; - +backgroundColor:"transparent", +flexDirection:"row", +alignItems:"center"}; return inputGroupTheme; diff --git a/dist/src/theme/components/InputGroup.js.map b/dist/src/theme/components/InputGroup.js.map index 978f482ba..fc8d3f584 100644 --- a/dist/src/theme/components/InputGroup.js.map +++ b/dist/src/theme/components/InputGroup.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/InputGroup.js"],"names":["variables","inputGroupTheme","fontSize","color","sTabBarActiveTextColor","paddingHorizontal","height","inputHeightBase","inputColor","paddingLeft","paddingRight","flex","inputFontSize","lineHeight","inputLineHeight","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","inputGroupRoundedBorderRadius","backgroundColor","flexDirection","alignItems"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,iBAAkB;AACpB,kBAAmB;AACjBC,SAAU,EADO;AAEjBC,MAAOH,UAAUI,sBAFA;AAGjBC,kBAAmB,CAHF,CADC;;AAMpB,oBAAqB;AACnBH,SAAU,EADS;AAEnBC,MA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BAAiB,CAJL;AAKZN,YAAaf,UAAUgB,uBALX,CAdJ;;AAqBVD,YAAaf,UAAUgB,uBArBb,CA1DQ;;;AAkFpB,SAAU;AACR,kBAAmB;AACjBb,MAAOH,UAAUiB,qBADA,CADX;;AAIR,oBAAqB;AACnBd,MAAOH,UAAUiB,qBADE,CAJb;;AAOR,WAAY;AACVM,aAAc,EADJ;AAEVR,YAAaf,UAAUiB,qBAFb,CAPJ;;AAWR,WAAY;AACVF,YAAaf,UAAUiB,qBADb,CAXJ;;AAcR,aAAc;AACZC,YAAalB,UAAUkB,WADX;AAEZC,eAAgB,CAFJ;AAGZC,iBAAkB,CAHN;AAIZC,gBAAiB,CAJL;AAKZN,YAAaf,UAAUiB,qBALX,CAdN;;AAqBRF,YAAaf,UAAUiB,qBArBf,CAlFU;;AAyGpB,YAAa;AACX,kBAAmB;AACjBd,MAAO,SADU,CADR;;AAIX,oBAAqB;AACnBA,MAAO,SADY,CAJV,CAzGO;;;;AAkHpBM,YAAa,CAlHO;AAmHpBS,YAAalB,UAAUkB,WAnHH;AAoHpBC,eAAgB,CApHI;AAqHpBC,iBAAkB,CArHE;AAsHpBC,gBAAiB,CAtHG;AAuHpBN,YAAaf,UAAUsB,gBAvHH;AAwHpBG,gBAAiB,aAxHG;AAyHpBC,cAAe,KAzHK;AA0HpBC,WAAY,QA1HQ,CAAxB;;;;AA8HA,MAAO1B,gBAAP;AACD,C","file":"InputGroup.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const inputGroupTheme = {\n 'NativeBase.Icon': {\n fontSize: 24,\n color: variables.sTabBarActiveTextColor,\n paddingHorizontal: 5,\n },\n 'NativeBase.IconNB': {\n fontSize: 24,\n color: variables.sTabBarActiveTextColor,\n paddingHorizontal: 5,\n },\n 'NativeBase.Input': {\n height: variables.inputHeightBase,\n color: variables.inputColor,\n paddingLeft: 5,\n paddingRight: 5,\n flex: 1,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight,\n },\n '.underline': {\n '.success': {\n borderColor: variables.inputSuccessBorderColor,\n },\n '.error': {\n borderColor: variables.inputErrorBorderColor,\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor,\n },\n '.regular': {\n '.success': {\n borderColor: variables.inputSuccessBorderColor,\n },\n '.error': {\n borderColor: variables.inputErrorBorderColor,\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderColor: variables.inputBorderColor,\n },\n '.rounded': {\n '.success': {\n borderColor: variables.inputSuccessBorderColor,\n },\n '.error': {\n borderColor: variables.inputErrorBorderColor,\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderRadius: variables.inputGroupRoundedBorderRadius,\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,\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,\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 paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor,\n backgroundColor: 'transparent',\n flexDirection: 'row',\n alignItems: 'center',\n };\n\n\n return inputGroupTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/InputGroup.js"],"names":["variables","inputGroupTheme","fontSize","color","sTabBarActiveTextColor","paddingHorizontal","height","inputHeightBase","inputColor","paddingLeft","paddingRight","flex","inputFontSize","lineHeight","inputLineHeight","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","inputGroupRoundedBorderRadius","backgroundColor","flexDirection","alignItems"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,iBAAkB;AACtB,kBAAmB;AACjBC,SAAU,EADO;AAEjBC,MAAOH,UAAUI,sBAFA;AAGjBC,kBAAmB,CAHF,CADG;;AAMtB,oBAAqB;AACnBH,SAAU,EADS;AAEnBC,MAAOH,UAAUI,sBAFE;AAGnBC,kBAAmB,CAHA,CANC;;AAWtB,mBAAoB;AAClBC,OAAQN,UAAUO,eADA;AAElBJ,MAAOH,UAAUQ,UAFC;AAGlBC,YAAa,CAHK;AAIlBC,aAAc,CAJI;AAKlBC,KAAM,CALY;AAMlBT,SAAUF,UAAUY,aANF;AAOlBC,WAAYb,UAAUc,eAPJ,CAXE;;AAoBtB,aAAc;AACZ,WAAY;AACVC,YAAaf,UAAUgB,uBADb,CADA;;AAIZ,SAAU;AACRD,YAAaf,UAAUiB,qBADf,CAJE;;AAOZR,YAAa,CAPD;AAQZS,YAAalB,UAAUkB,WARX;AASZC,eAAgB,CATJ;AAUZC,iBAAkB,CAVN;AAWZC,gBAAiB,CAXL;AAYZN,YAAaf,UAAUsB,gBAZX,CApBQ;;AAkCtB,WAAY;A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,kBAAmB;AACjBd,MAAO,SADU,CADR;;AAIX,oBAAqB;AACnBA,MAAO,SADY,CAJV,CAzGS;;;;AAkHtBM,YAAa,CAlHS;AAmHtBS,YAAalB,UAAUkB,WAnHD;AAoHtBC,eAAgB,CApHM;AAqHtBC,iBAAkB,CArHI;AAsHtBC,gBAAiB,CAtHK;AAuHtBN,YAAaf,UAAUsB,gBAvHD;AAwHtBG,gBAAiB,aAxHK;AAyHtBC,cAAe,KAzHO;AA0HtBC,WAAY,QA1HU,CAAxB;;;AA6HA,MAAO1B,gBAAP;AACD,C","file":"InputGroup.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const inputGroupTheme = {\n \"NativeBase.Icon\": {\n fontSize: 24,\n color: variables.sTabBarActiveTextColor,\n paddingHorizontal: 5\n },\n \"NativeBase.IconNB\": {\n fontSize: 24,\n color: variables.sTabBarActiveTextColor,\n paddingHorizontal: 5\n },\n \"NativeBase.Input\": {\n height: variables.inputHeightBase,\n color: variables.inputColor,\n paddingLeft: 5,\n paddingRight: 5,\n flex: 1,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight\n },\n \".underline\": {\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor\n },\n \".regular\": {\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderColor: variables.inputBorderColor\n },\n \".rounded\": {\n \".success\": {\n borderColor: variables.inputSuccessBorderColor\n },\n \".error\": {\n borderColor: variables.inputErrorBorderColor\n },\n paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderRadius: variables.inputGroupRoundedBorderRadius,\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,\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,\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 paddingLeft: 5,\n borderWidth: variables.borderWidth,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderLeftWidth: 0,\n borderColor: variables.inputBorderColor,\n backgroundColor: \"transparent\",\n flexDirection: \"row\",\n alignItems: \"center\"\n };\n\n return inputGroupTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Item.js b/dist/src/theme/components/Item.js index 572879a4f..5728f098c 100644 --- a/dist/src/theme/components/Item.js +++ b/dist/src/theme/components/Item.js @@ -1,23 +1,23 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var itemTheme={ -'.floatingLabel':{ -'NativeBase.Input':{ +".floatingLabel":{ +"NativeBase.Input":{ height:60, top:8}, -'NativeBase.Label':{ +"NativeBase.Label":{ top:8}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ top:6}}, -'.fixedLabel':{ -'NativeBase.Label':{ +".fixedLabel":{ +"NativeBase.Label":{ position:null, top:null, left:null, @@ -27,34 +27,34 @@ height:null, width:null, fontSize:variables.inputFontSize}, -'NativeBase.Input':{ +"NativeBase.Input":{ flex:2, fontSize:variables.inputFontSize}}, -'.stackedLabel':{ -'NativeBase.Label':{ +".stackedLabel":{ +"NativeBase.Label":{ position:null, top:null, left:null, right:null, paddingTop:5, -alignSelf:'flex-start', +alignSelf:"flex-start", fontSize:variables.inputFontSize-2}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginTop:36}, -'NativeBase.Input':{ -alignSelf:_reactNative.Platform.OS==='ios'?'stretch':'flex-start', +"NativeBase.Input":{ +alignSelf:_reactNative.Platform.OS==="ios"?"stretch":"flex-start", flex:1, -width:_reactNative.Platform.OS==='ios'?null:variables.deviceWidth-25, +width:_reactNative.Platform.OS==="ios"?null:variables.deviceWidth-25, fontSize:variables.inputFontSize}, flexDirection:null}, -'.inlineLabel':{ -'NativeBase.Label':{ +".inlineLabel":{ +"NativeBase.Label":{ position:null, top:null, left:null, @@ -64,41 +64,41 @@ height:null, width:null, fontSize:variables.inputFontSize}, -'NativeBase.Input':{ +"NativeBase.Input":{ paddingLeft:5, fontSize:variables.inputFontSize}, -flexDirection:'row'}, +flexDirection:"row"}, -'NativeBase.Label':{ +"NativeBase.Label":{ fontSize:variables.inputFontSize, color:variables.inputColorPlaceholder, paddingRight:5}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ fontSize:24, paddingRight:8}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ fontSize:24, paddingRight:8}, -'NativeBase.Input':{ +"NativeBase.Input":{ height:variables.inputHeightBase, color:variables.inputColor, flex:1, -top:_reactNative.Platform.OS==='ios'?1.5:undefined, +top:_reactNative.Platform.OS==="ios"?1.5:undefined, fontSize:variables.inputFontSize, lineHeight:variables.inputLineHeight}, -'.underline':{ -'NativeBase.Input':{ +".underline":{ +"NativeBase.Input":{ paddingLeft:15}, -'.success':{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, borderWidth:variables.borderWidth*2, @@ -107,33 +107,33 @@ borderRightWidth:0, borderLeftWidth:0, borderColor:variables.inputBorderColor}, -'.regular':{ -'NativeBase.Input':{ +".regular":{ +"NativeBase.Input":{ paddingLeft:8}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ paddingLeft:10}, -'.success':{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, borderWidth:variables.borderWidth*2, borderColor:variables.inputBorderColor}, -'.rounded':{ -'NativeBase.Input':{ +".rounded":{ +"NativeBase.Input":{ paddingLeft:8}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ paddingLeft:10}, -'.success':{ +".success":{ borderColor:variables.inputSuccessBorderColor}, -'.error':{ +".error":{ borderColor:variables.inputErrorBorderColor}, borderWidth:variables.borderWidth*2, @@ -141,21 +141,21 @@ borderRadius:30, borderColor:variables.inputBorderColor}, -'.success':{ -'NativeBase.Icon':{ +".success":{ +"NativeBase.Icon":{ color:variables.inputSuccessBorderColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.inputSuccessBorderColor}, -'.rounded':{ +".rounded":{ borderRadius:30, borderColor:variables.inputSuccessBorderColor}, -'.regular':{ +".regular":{ borderColor:variables.inputSuccessBorderColor}, -'.underline':{ +".underline":{ borderWidth:variables.borderWidth*2, borderTopWidth:0, borderRightWidth:0, @@ -165,21 +165,21 @@ borderColor:variables.inputSuccessBorderColor}, borderColor:variables.inputSuccessBorderColor}, -'.error':{ -'NativeBase.Icon':{ +".error":{ +"NativeBase.Icon":{ color:variables.inputErrorBorderColor}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.inputErrorBorderColor}, -'.rounded':{ +".rounded":{ borderRadius:30, borderColor:variables.inputErrorBorderColor}, -'.regular':{ +".regular":{ borderColor:variables.inputErrorBorderColor}, -'.underline':{ +".underline":{ borderWidth:variables.borderWidth*2, borderTopWidth:0, borderRightWidth:0, @@ -188,12 +188,12 @@ borderColor:variables.inputErrorBorderColor}, borderColor:variables.inputErrorBorderColor}, -'.disabled':{ -'NativeBase.Icon':{ -color:'#384850'}, +".disabled":{ +"NativeBase.Icon":{ +color:"#384850"}, -'NativeBase.IconNB':{ -color:'#384850'}}, +"NativeBase.IconNB":{ +color:"#384850"}}, @@ -202,13 +202,12 @@ borderTopWidth:0, borderRightWidth:0, borderLeftWidth:0, borderColor:variables.inputBorderColor, -backgroundColor:'transparent', -flexDirection:'row', -alignItems:'center', +backgroundColor:"transparent", +flexDirection:"row", +alignItems:"center", marginLeft:2}; - return itemTheme; }; //# sourceMappingURL=Item.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Item.js.map b/dist/src/theme/components/Item.js.map index aa78dde1a..5dda46dea 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","itemTheme","height","top","position","left","right","flex","width","fontSize","inputFontSize","paddingTop","alignSelf","marginTop","OS","deviceWidth","flexDirection","paddingRight","paddingLeft","color","inputColorPlaceholder","inputHeightBase","inputColor","undefined","lineHeight","inputLineHeight","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","back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AgB,CAnMA;AAoMhBC,iBAAkB,CApMF;AAqMhBC,gBAAiB,CArMD;AAsMhBN,YAAa1B,UAAUiC,gBAtMP;AAuMhBE,gBAAiB,aAvMD;AAwMhBnB,cAAe,KAxMC;AAyMhBoB,WAAY,QAzMI;AA0MhBC,WAAY,CA1MI,CAAlB;;;;AA8MA,MAAOpC,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: 60,\n top: 8,\n },\n 'NativeBase.Label': {\n top: 8,\n },\n 'NativeBase.Icon': {\n top: 6,\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 },\n flexDirection: null,\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 height: variables.inputHeightBase,\n color: variables.inputColor,\n flex: 1,\n top: (Platform.OS === 'ios') ? 1.5 : undefined,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight,\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\n return itemTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Item.js"],"names":["variables","itemTheme","height","top","position","left","right","flex","width","fontSize","inputFontSize","paddingTop","alignSelf","marginTop","OS","deviceWidth","flexDirection","paddingRight","paddingLeft","color","inputColorPlaceholder","inputHeightBase","inputColor","undefined","lineHeight","inputLineHeight","borderColor","inputSuccessBorderColor","inputErrorBorderColor","borderWidth","borderTopWidth","borderRightWidth","borderLeftWidth","inputBorderColor","borderRadius","backgroundColor","alignItems","marginLeft"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChB,iBAAkB;AAChB,mBAAoB;AAClBC,OAAQ,EADU;AAElBC,IAAK,CAFa,CADJ;;AAKhB,mBAAoB;AAClBA,IAAK,CADa,CALJ;;AAQhB,kBAAmB;AACjBA,IAAK,CADY,CARH,CADF;;;AAahB,cAAe;AACb,mBAAoB;AAClBC,SAAU,IADQ;AAElBD,IAAK,IAFa;AAGlBE,KAAM,IAHY;AAIlBC,MAAO,IAJW;AAKlBC,KAAM,CALY;AAMlBL,OAAQ,IANU;AAOlBM,MAAO,IAPW;AAQlBC,SAA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AXF;;AAcV,aAAc;AACZE,YAAa7B,UAAU6B,WAAV,CAAwB,CADzB;AAEZC,eAAgB,CAFJ;AAGZC,iBAAkB,CAHN;AAIZC,gBAAiB,CAJL;AAKZN,YAAa1B,UAAU2B,uBALX,CAdJ;;AAqBVD,YAAa1B,UAAU2B,uBArBb,CA1II;;;AAkKhB,SAAU;AACR,kBAAmB;AACjBR,MAAOnB,UAAU4B,qBADA,CADX;;AAIR,oBAAqB;AACnBT,MAAOnB,UAAU4B,qBADE,CAJb;;AAOR,WAAY;AACVM,aAAc,EADJ;AAEVR,YAAa1B,UAAU4B,qBAFb,CAPJ;;AAWR,WAAY;AACVF,YAAa1B,UAAU4B,qBADb,CAXJ;;AAcR,aAAc;AACZC,YAAa7B,UAAU6B,WAAV,CAAwB,CADzB;AAEZC,eAAgB,CAFJ;AAGZC,iBAAkB,CAHN;AAIZC,gBAAiB,CAJL;AAKZN,YAAa1B,UAAU4B,qBALX,CAdN;;AAqBRF,YAAa1B,UAAU4B,qBArBf,CAlKM;;AAyLhB,YAAa;AACX,kBAAmB;AACjBT,MAAO,SADU,CADR;;AAIX,oBAAqB;AACnBA,MAAO,SADY,CAJV,CAzLG;;;;AAkMhBU,YAAa7B,UAAU6B,WAAV,CAAwB,CAlMrB;AAmMhBC,eAAgB,CAnMA;AAoMhBC,iBAAkB,CApMF;AAqMhBC,gBAAiB,CArMD;AAsMhBN,YAAa1B,UAAUiC,gBAtMP;AAuMhBE,gBAAiB,aAvMD;AAwMhBnB,cAAe,KAxMC;AAyMhBoB,WAAY,QAzMI;AA0MhBC,WAAY,CA1MI,CAAlB;;;AA6MA,MAAOpC,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: 60,\n top: 8\n },\n \"NativeBase.Label\": {\n top: 8\n },\n \"NativeBase.Icon\": {\n top: 6\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 },\n flexDirection: null\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 height: variables.inputHeightBase,\n color: variables.inputColor,\n flex: 1,\n top: Platform.OS === \"ios\" ? 1.5 : undefined,\n fontSize: variables.inputFontSize,\n lineHeight: variables.inputLineHeight\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 diff --git a/dist/src/theme/components/Label.js b/dist/src/theme/components/Label.js index f3d2a8aad..5d449e81a 100644 --- a/dist/src/theme/components/Label.js +++ b/dist/src/theme/components/Label.js @@ -1,14 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var labelTheme={ -'.focused':{ +".focused":{ width:0}, fontSize:17}; - return labelTheme; }; //# sourceMappingURL=Label.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Label.js.map b/dist/src/theme/components/Label.js.map index d6c1bb109..e13fa273f 100644 --- a/dist/src/theme/components/Label.js.map +++ b/dist/src/theme/components/Label.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Label.js"],"names":["variables","labelTheme","width","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACf,WAAY;AACVC,MAAO,CADG,CADG;;AAIfC,SAAU,EAJK,CAAnB;;;;AAQA,MAAOF,WAAP;AACD,C","file":"Label.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const labelTheme = {\n '.focused': {\n width: 0,\n },\n fontSize: 17,\n };\n\n\n return labelTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Label.js"],"names":["variables","labelTheme","width","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjB,WAAY;AACVC,MAAO,CADG,CADK;;AAIjBC,SAAU,EAJO,CAAnB;;;AAOA,MAAOF,WAAP;AACD,C","file":"Label.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const labelTheme = {\n \".focused\": {\n width: 0\n },\n fontSize: 17\n };\n\n return labelTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/ListItem.js b/dist/src/theme/components/ListItem.js index 0fdf0d220..d2d07dcb5 100644 --- a/dist/src/theme/components/ListItem.js +++ b/dist/src/theme/components/ListItem.js @@ -1,227 +1,233 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var listItemTheme={ -'NativeBase.InputGroup':{ -'NativeBase.Icon':{ +"NativeBase.InputGroup":{ +"NativeBase.Icon":{ paddingRight:5}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ paddingRight:5}, -'NativeBase.Input':{ +"NativeBase.Input":{ paddingHorizontal:5}, flex:1, borderWidth:null, margin:-10, -borderBottomColor:'transparent'}, +borderBottomColor:"transparent"}, -'.searchBar':{ -'NativeBase.Item':{ -'NativeBase.Icon':{ -backgroundColor:'transparent', +".searchBar":{ +"NativeBase.Item":{ +"NativeBase.Icon":{ +backgroundColor:"transparent", color:variables.dropdownLinkColor, -fontSize:platform==='ios'?variables.iconFontSize-10:variables.iconFontSize-5, -alignItems:'center', +fontSize:platform==="ios"? +variables.iconFontSize-10: +variables.iconFontSize-5, +alignItems:"center", marginTop:2, paddingRight:8}, -'NativeBase.IconNB':{ -backgroundColor:'transparent', +"NativeBase.IconNB":{ +backgroundColor:"transparent", color:null, -alignSelf:'center'}, +alignSelf:"center"}, -'NativeBase.Input':{ -alignSelf:'center'}, +"NativeBase.Input":{ +alignSelf:"center"}, -alignSelf:'center', -alignItems:'center', -justifyContent:'flex-start', +alignSelf:"center", +alignItems:"center", +justifyContent:"flex-start", flex:1, -height:platform==='ios'?30:40, -borderColor:'transparent', -backgroundColor:'#fff', +height:platform==="ios"?30:40, +borderColor:"transparent", +backgroundColor:"#fff", borderRadius:5}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ -fontWeight:'500'}, +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ +fontWeight:"500"}, paddingHorizontal:null, -paddingLeft:platform==='ios'?10:null}, +paddingLeft:platform==="ios"?10:null}, -paddingHorizontal:platform==='ios'?undefined:null, -width:platform==='ios'?undefined:0, -height:platform==='ios'?undefined:0}, +paddingHorizontal:platform==="ios"?undefined:null, +width:platform==="ios"?undefined:0, +height:platform==="ios"?undefined:0}, backgroundColor:variables.toolbarInputColor, padding:10, marginLeft:null}, -'NativeBase.CheckBox':{ +"NativeBase.CheckBox":{ marginLeft:-10}, -'.first':{ -'.itemHeader':{ +".first":{ +".itemHeader":{ paddingTop:variables.listItemPadding+3}}, -'.itemHeader':{ -'.first':{ +".itemHeader":{ +".first":{ paddingTop:variables.listItemPadding+3}, -borderBottomWidth:platform==='ios'?variables.borderWidth:null, +borderBottomWidth:platform==="ios"?variables.borderWidth:null, marginLeft:null, padding:variables.listItemPadding, paddingLeft:variables.listItemPadding+5, -paddingTop:platform==='ios'?variables.listItemPadding+25:undefined, -paddingBottom:platform==='android'?variables.listItemPadding+20:undefined, -flexDirection:'row', +paddingTop:platform==="ios"? +variables.listItemPadding+25: +undefined, +paddingBottom:platform==="android"? +variables.listItemPadding+20: +undefined, +flexDirection:"row", borderColor:variables.listBorderColor, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:14, -color:platform==='ios'?undefined:variables.listNoteColor}}, +color:platform==="ios"?undefined:variables.listNoteColor}}, -'.itemDivider':{ +".itemDivider":{ borderBottomWidth:null, marginLeft:null, padding:variables.listItemPadding, paddingLeft:variables.listItemPadding+5, backgroundColor:variables.listDividerBg, -flexDirection:'row', +flexDirection:"row", borderColor:variables.listBorderColor}, -'.selected':{ -'NativeBase.Left':{ -'NativeBase.Text':{ +".selected":{ +"NativeBase.Left":{ +"NativeBase.Text":{ color:variables.brandPrimary}}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.brandPrimary}}, -'NativeBase.Left':{ -'NativeBase.Body':{ -'NativeBase.Text':{ -'.note':{ +"NativeBase.Left":{ +"NativeBase.Body":{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}, +fontWeight:"200"}, -fontWeight:'600'}, +fontWeight:"600"}, marginLeft:10, alignItems:null, alignSelf:null}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ width:variables.iconFontSize-10, fontSize:variables.iconFontSize-10}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ width:variables.iconFontSize-10, fontSize:variables.iconFontSize-10}, -'NativeBase.Text':{ +"NativeBase.Text":{ marginLeft:10, -alignSelf:'center'}, +alignSelf:"center"}, -flexDirection:'row'}, +flexDirection:"row"}, -'NativeBase.Body':{ -'NativeBase.Text':{ +"NativeBase.Body":{ +"NativeBase.Text":{ marginHorizontal:variables.listItemPadding, -'.note':{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}}, +fontWeight:"200"}}, alignSelf:null, alignItems:null}, -'NativeBase.Right':{ -'NativeBase.Badge':{ +"NativeBase.Right":{ +"NativeBase.Badge":{ alignSelf:null}, -'NativeBase.PickerNB':{ -'NativeBase.Button':{ +"NativeBase.PickerNB":{ +"NativeBase.Button":{ marginRight:-15, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.topTabBarActiveTextColor}}}, -'NativeBase.Button':{ +"NativeBase.Button":{ alignSelf:null, -'.transparent':{ -'NativeBase.Text':{ +".transparent":{ +"NativeBase.Text":{ color:variables.topTabBarActiveTextColor}}}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ alignSelf:null, fontSize:variables.iconFontSize-8, -color:'#c9c8cd'}, +color:"#c9c8cd"}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ alignSelf:null, fontSize:variables.iconFontSize-8, -color:'#c9c8cd'}, +color:"#c9c8cd"}, -'NativeBase.Text':{ -'.note':{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}, +fontWeight:"200"}, alignSelf:null}, -'NativeBase.Thumbnail':{ +"NativeBase.Thumbnail":{ alignSelf:null}, -'NativeBase.Image':{ +"NativeBase.Image":{ alignSelf:null}, -'NativeBase.Radio':{ +"NativeBase.Radio":{ alignSelf:null}, -'NativeBase.Checkbox':{ +"NativeBase.Checkbox":{ alignSelf:null}, -'NativeBase.Switch':{ +"NativeBase.Switch":{ alignSelf:null}, padding:null, flex:0.28}, -'NativeBase.Text':{ -'.note':{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}, +fontWeight:"200"}, alignSelf:null}, -'.last':{ +".last":{ marginLeft:-(variables.listItemPadding+5), paddingLeft:(variables.listItemPadding+5)*2, top:1}, -'.avatar':{ -'NativeBase.Left':{ +".avatar":{ +"NativeBase.Left":{ flex:0}, -'NativeBase.Body':{ -'NativeBase.Text':{ +"NativeBase.Body":{ +"NativeBase.Text":{ marginLeft:null}, flex:1, @@ -230,15 +236,15 @@ borderBottomWidth:variables.borderWidth, borderColor:variables.listBorderColor, marginLeft:variables.listItemPadding+5}, -'NativeBase.Right':{ -'NativeBase.Text':{ -'.note':{ +"NativeBase.Right":{ +"NativeBase.Text":{ +".note":{ fontSize:variables.noteFontSize-2}}, flex:0, paddingRight:variables.listItemPadding+5, -alignSelf:'stretch', +alignSelf:"stretch", paddingVertical:variables.listItemPadding, borderBottomWidth:variables.borderWidth, borderColor:variables.listBorderColor}, @@ -248,13 +254,12 @@ paddingVertical:null, paddingRight:null}, - -'.thumbnail':{ -'NativeBase.Left':{ +".thumbnail":{ +"NativeBase.Left":{ flex:0}, -'NativeBase.Body':{ -'NativeBase.Text':{ +"NativeBase.Body":{ +"NativeBase.Text":{ marginLeft:null}, flex:1, @@ -263,10 +268,10 @@ borderBottomWidth:variables.borderWidth, borderColor:variables.listBorderColor, marginLeft:variables.listItemPadding+5}, -'NativeBase.Right':{ -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Right":{ +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ fontSize:variables.listNoteSize, color:variables.sTabBarActiveTextColor}}, @@ -274,8 +279,8 @@ color:variables.sTabBarActiveTextColor}}, height:null}, flex:0, -justifyContent:'center', -alignSelf:'stretch', +justifyContent:"center", +alignSelf:"stretch", paddingRight:variables.listItemPadding+5, paddingVertical:variables.listItemPadding+5, borderBottomWidth:variables.borderWidth, @@ -286,94 +291,94 @@ paddingVertical:null, paddingRight:null}, -'.icon':{ -'.last':{ -'NativeBase.Body':{ +".icon":{ +".last":{ +"NativeBase.Body":{ borderBottomWidth:null}, -'NativeBase.Right':{ +"NativeBase.Right":{ borderBottomWidth:null}, borderBottomWidth:variables.borderWidth, borderColor:variables.listBorderColor}, -'NativeBase.Left':{ -'NativeBase.Button':{ -'NativeBase.IconNB':{ +"NativeBase.Left":{ +"NativeBase.Button":{ +"NativeBase.IconNB":{ marginHorizontal:null, fontSize:variables.iconFontSize-5}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ marginHorizontal:null, fontSize:variables.iconFontSize-8}, -alignSelf:'center', +alignSelf:"center", height:29, width:29, borderRadius:6, paddingVertical:null, paddingHorizontal:null, -alignItems:'center', -justifyContent:'center'}, +alignItems:"center", +justifyContent:"center"}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ width:variables.iconFontSize-5, fontSize:variables.iconFontSize-2}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ width:variables.iconFontSize-5, fontSize:variables.iconFontSize-2}, paddingRight:variables.listItemPadding+5, flex:0, height:44, -justifyContent:'center', -alignItems:'center'}, +justifyContent:"center", +alignItems:"center"}, -'NativeBase.Body':{ -'NativeBase.Text':{ +"NativeBase.Body":{ +"NativeBase.Text":{ marginLeft:null, fontSize:17}, flex:1, height:44, -justifyContent:'center', +justifyContent:"center", borderBottomWidth:1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1), borderColor:variables.listBorderColor}, -'NativeBase.Right':{ -'NativeBase.Text':{ -textAlign:'center', -color:'#8F8E95', +"NativeBase.Right":{ +"NativeBase.Text":{ +textAlign:"center", +color:"#8F8E95", fontSize:17}, -'NativeBase.IconNB':{ -color:'#C8C7CC', +"NativeBase.IconNB":{ +color:"#C8C7CC", fontSize:variables.iconFontSize-10, -alignSelf:'center', +alignSelf:"center", paddingLeft:10, paddingTop:3}, -'NativeBase.Icon':{ -color:'#C8C7CC', +"NativeBase.Icon":{ +color:"#C8C7CC", fontSize:variables.iconFontSize-10, -alignSelf:'center', +alignSelf:"center", paddingLeft:10, paddingTop:3}, -'NativeBase.Switch':{ -marginRight:_reactNative.Platform.OS==='ios'?undefined:-5, +"NativeBase.Switch":{ +marginRight:_reactNative.Platform.OS==="ios"?undefined:-5, alignSelf:null}, -'NativeBase.PickerNB':_extends({}, +"NativeBase.PickerNB":_extends({}, (0,_Picker2.default)()), -flexDirection:'row', -alignItems:'center', +flexDirection:"row", +alignItems:"center", flex:0, -alignSelf:'stretch', +alignSelf:"stretch", height:44, -justifyContent:'flex-end', +justifyContent:"flex-end", borderBottomWidth:1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1), borderColor:variables.listBorderColor, paddingRight:variables.listItemPadding+5}, @@ -382,13 +387,13 @@ borderBottomWidth:null, paddingVertical:null, paddingRight:null, height:44, -justifyContent:'center'}, +justifyContent:"center"}, -'.noBorder':{ +".noBorder":{ borderBottomWidth:null}, -alignItems:'center', -flexDirection:'row', +alignItems:"center", +flexDirection:"row", paddingRight:variables.listItemPadding+5, paddingVertical:variables.listItemPadding+3, marginLeft:variables.listItemPadding+5, @@ -397,7 +402,6 @@ backgroundColor:variables.listBg, borderColor:variables.listBorderColor}; - return listItemTheme; }; //# sourceMappingURL=ListItem.js.map \ No newline at end of file diff --git a/dist/src/theme/components/ListItem.js.map b/dist/src/theme/components/ListItem.js.map index 7aa1dfc36..375f82fd9 100644 --- a/dist/src/theme/components/ListItem.js.map +++ b/dist/src/theme/components/ListItem.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/ListItem.js"],"names":["variables","platform","listItemTheme","paddingRight","paddingHorizontal","flex","borderWidth","margin","borderBottomColor","backgroundColor","color","dropdownLinkColor","fontSize","iconFontSize","alignItems","marginTop","alignSelf","justifyContent","height","borderColor","borderRadius","fontWeight","paddingLeft","undefined","width","toolbarInputColor","padding","marginLeft","paddingTop","listItemPadding","borderBottomWidth","paddingBottom","flexDirection","listBorderColor","listNoteColor","listDividerBg","brandPrimary","marginHorizontal","marginRight","topTabBarActiveTextColor","top","paddingVertical","noteFontSize","listNoteSize","sTabBarActiveTextColor","getPixelSizeForLayoutSize","textAlign","OS","listBg"],"mappings":"yRAAA;;AAEA,gC;AACA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,eAAgB;AACpB,wBAAyB;AACvB,kBAAmB;AACjBC,aAAc,CADG,CADI;;AAIvB,oBAAqB;AACnBA,aAAc,CADK,CAJE;;AAOvB,mBAAoB;AAClBC,kBAAmB,CADD,CAPG;;AAUvBC,KAAM,CAViB;AAWvBC,YAAa,IAXU;AAYvBC,OAAQ,CAAC,EAZc;AAavBC,kBAAmB,aAbI,CADL;;AAgBpB,aAAc;AACZ,kBAAmB;AACjB,kBAAmB;AACjBC,gBAAiB,aADA;AAEjBC,MAAOV,UAAUW,iBAFA;AAGjBC,SAAWX,WAAa,KAAd,CAAuBD,UAAUa,YAAV,CAAyB,EAAhD,CAAqDb,UAAUa,YAAV,CAAyB,CAHvE;AAIjBC,WAAY,QAJK;AAKjBC,UAAW,CALM;AAMjBZ,aAAc,CANG,CADF;;AASjB,oBAAqB;AACnBM,gBAAiB,aADE;AAEnBC,MAAO,IAFY;AAGnBM,UAAW,QAHQ,CATJ;;AAcjB,mBAAoB;AA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CAlYJ;AAmYpBpC,gBAAiBT,UAAUgD,MAnYP;AAoYpB7B,YAAanB,UAAUiC,eApYH,CAAtB;;;;AAwYA,MAAO/B,cAAP;AACD,C","file":"ListItem.js","sourcesContent":["import { Platform, PixelRatio } from 'react-native';\n\nimport pickerTheme from './Picker';\nimport variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const listItemTheme = {\n 'NativeBase.InputGroup': {\n 'NativeBase.Icon': {\n paddingRight: 5,\n },\n 'NativeBase.IconNB': {\n paddingRight: 5,\n },\n 'NativeBase.Input': {\n paddingHorizontal: 5,\n },\n flex: 1,\n borderWidth: null,\n margin: -10,\n borderBottomColor: 'transparent',\n },\n '.searchBar': {\n 'NativeBase.Item': {\n 'NativeBase.Icon': {\n backgroundColor: 'transparent',\n color: variables.dropdownLinkColor,\n fontSize: (platform === 'ios') ? variables.iconFontSize - 10 : variables.iconFontSize - 5,\n alignItems: 'center',\n marginTop: 2,\n paddingRight: 8,\n },\n 'NativeBase.IconNB': {\n backgroundColor: 'transparent',\n color: null,\n alignSelf: 'center',\n },\n 'NativeBase.Input': {\n alignSelf: 'center',\n },\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'flex-start',\n flex: 1,\n height: (platform === 'ios') ? 30 : 40,\n borderColor: 'transparent',\n backgroundColor: '#fff',\n borderRadius: 5,\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 backgroundColor: variables.toolbarInputColor,\n padding: 10,\n marginLeft: null,\n },\n 'NativeBase.CheckBox': {\n marginLeft: -10,\n },\n '.first': {\n '.itemHeader': {\n paddingTop: variables.listItemPadding + 3,\n },\n },\n '.itemHeader': {\n '.first': {\n paddingTop: variables.listItemPadding + 3,\n },\n borderBottomWidth: (platform === 'ios') ? variables.borderWidth : null,\n marginLeft: null,\n padding: variables.listItemPadding,\n paddingLeft: variables.listItemPadding + 5,\n paddingTop: (platform === 'ios') ? variables.listItemPadding + 25 : undefined,\n paddingBottom: (platform === 'android') ? variables.listItemPadding + 20 : undefined,\n flexDirection: 'row',\n borderColor: variables.listBorderColor,\n 'NativeBase.Text': {\n fontSize: 14,\n color: (platform === 'ios') ? undefined : variables.listNoteColor,\n },\n },\n '.itemDivider': {\n borderBottomWidth: null,\n marginLeft: null,\n padding: variables.listItemPadding,\n paddingLeft: variables.listItemPadding + 5,\n backgroundColor: variables.listDividerBg,\n flexDirection: 'row',\n borderColor: variables.listBorderColor,\n },\n '.selected': {\n 'NativeBase.Left': {\n 'NativeBase.Text': {\n color: variables.brandPrimary\n }\n },\n 'NativeBase.Text': {\n color: variables.brandPrimary\n },\n },\n 'NativeBase.Left': {\n 'NativeBase.Body': {\n 'NativeBase.Text': {\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\n fontWeight: '600',\n },\n marginLeft: 10,\n alignItems: null,\n alignSelf: null,\n },\n 'NativeBase.Icon': {\n width: variables.iconFontSize - 10,\n fontSize: variables.iconFontSize - 10,\n },\n 'NativeBase.IconNB': {\n width: variables.iconFontSize - 10,\n fontSize: variables.iconFontSize - 10,\n },\n 'NativeBase.Text': {\n marginLeft: 10,\n alignSelf: 'center',\n },\n flexDirection: 'row',\n },\n 'NativeBase.Body': {\n 'NativeBase.Text': {\n marginHorizontal: variables.listItemPadding,\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\n },\n alignSelf: null,\n alignItems: null,\n },\n 'NativeBase.Right': {\n 'NativeBase.Badge': {\n alignSelf: null,\n },\n 'NativeBase.PickerNB': {\n 'NativeBase.Button': {\n marginRight: -15,\n 'NativeBase.Text': {\n color: variables.topTabBarActiveTextColor,\n }\n }\n },\n 'NativeBase.Button': {\n alignSelf: null,\n '.transparent': {\n 'NativeBase.Text': {\n color: variables.topTabBarActiveTextColor,\n },\n },\n },\n 'NativeBase.Icon': {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: '#c9c8cd',\n },\n 'NativeBase.IconNB': {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: '#c9c8cd',\n },\n 'NativeBase.Text': {\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\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 padding: null,\n flex: 0.28,\n },\n 'NativeBase.Text': {\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\n alignSelf: null,\n },\n\n '.last': {\n marginLeft: -(variables.listItemPadding + 5),\n paddingLeft: (variables.listItemPadding + 5) * 2,\n top: 1,\n },\n\n '.avatar': {\n 'NativeBase.Left': {\n flex: 0,\n },\n 'NativeBase.Body': {\n 'NativeBase.Text': {\n marginLeft: null,\n },\n flex: 1,\n paddingVertical: variables.listItemPadding,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n marginLeft: variables.listItemPadding + 5,\n },\n 'NativeBase.Right': {\n 'NativeBase.Text': {\n '.note': {\n fontSize: variables.noteFontSize - 2,\n },\n },\n flex: 0,\n paddingRight: variables.listItemPadding + 5,\n alignSelf: 'stretch',\n paddingVertical: variables.listItemPadding,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null,\n },\n\n\n '.thumbnail': {\n 'NativeBase.Left': {\n flex: 0,\n },\n 'NativeBase.Body': {\n 'NativeBase.Text': {\n marginLeft: null,\n },\n flex: 1,\n paddingVertical: variables.listItemPadding + 5,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n marginLeft: variables.listItemPadding + 5,\n },\n 'NativeBase.Right': {\n 'NativeBase.Button': {\n '.transparent': {\n 'NativeBase.Text': {\n fontSize: variables.listNoteSize,\n color: variables.sTabBarActiveTextColor,\n },\n },\n height: null,\n },\n flex: 0,\n justifyContent: 'center',\n alignSelf: 'stretch',\n paddingRight: variables.listItemPadding + 5,\n paddingVertical: variables.listItemPadding + 5,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null,\n },\n\n '.icon': {\n '.last': {\n 'NativeBase.Body': {\n borderBottomWidth: null,\n },\n 'NativeBase.Right': {\n borderBottomWidth: null,\n },\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n },\n 'NativeBase.Left': {\n 'NativeBase.Button': {\n 'NativeBase.IconNB': {\n marginHorizontal: null,\n fontSize: variables.iconFontSize - 5,\n },\n 'NativeBase.Icon': {\n marginHorizontal: null,\n fontSize: variables.iconFontSize - 8,\n },\n alignSelf: 'center',\n height: 29,\n width: 29,\n borderRadius: 6,\n paddingVertical: null,\n paddingHorizontal: null,\n alignItems: 'center',\n justifyContent: 'center',\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 paddingRight: variables.listItemPadding + 5,\n flex: 0,\n height: 44,\n justifyContent: 'center',\n alignItems: 'center',\n },\n 'NativeBase.Body': {\n 'NativeBase.Text': {\n marginLeft: null,\n fontSize: 17,\n },\n flex: 1,\n height: 44,\n justifyContent: 'center',\n borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n borderColor: variables.listBorderColor,\n },\n 'NativeBase.Right': {\n 'NativeBase.Text': {\n textAlign: 'center',\n color: '#8F8E95',\n fontSize: 17,\n },\n 'NativeBase.IconNB': {\n color: '#C8C7CC',\n fontSize: variables.iconFontSize - 10,\n alignSelf: 'center',\n paddingLeft: 10,\n paddingTop: 3,\n },\n 'NativeBase.Icon': {\n color: '#C8C7CC',\n fontSize: variables.iconFontSize - 10,\n alignSelf: 'center',\n paddingLeft: 10,\n paddingTop: 3,\n },\n 'NativeBase.Switch': {\n marginRight: (Platform.OS === 'ios') ? undefined : -5,\n alignSelf: null,\n },\n 'NativeBase.PickerNB': {\n ...pickerTheme(),\n },\n flexDirection: 'row',\n alignItems: 'center',\n flex: 0,\n alignSelf: 'stretch',\n height: 44,\n justifyContent: 'flex-end',\n borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n borderColor: variables.listBorderColor,\n paddingRight: variables.listItemPadding + 5,\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null,\n height: 44,\n justifyContent: 'center',\n },\n '.noBorder': {\n borderBottomWidth: null,\n },\n alignItems: 'center',\n flexDirection: 'row',\n paddingRight: variables.listItemPadding + 5,\n paddingVertical: variables.listItemPadding + 3,\n marginLeft: variables.listItemPadding + 5,\n borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n backgroundColor: variables.listBg,\n borderColor: variables.listBorderColor,\n };\n\n\n return listItemTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/ListItem.js"],"names":["variables","platform","listItemTheme","paddingRight","paddingHorizontal","flex","borderWidth","margin","borderBottomColor","backgroundColor","color","dropdownLinkColor","fontSize","iconFontSize","alignItems","marginTop","alignSelf","justifyContent","height","borderColor","borderRadius","fontWeight","paddingLeft","undefined","width","toolbarInputColor","padding","marginLeft","paddingTop","listItemPadding","borderBottomWidth","paddingBottom","flexDirection","listBorderColor","listNoteColor","listDividerBg","brandPrimary","marginHorizontal","marginRight","topTabBarActiveTextColor","top","paddingVertical","noteFontSize","listNoteSize","sTabBarActiveTextColor","getPixelSizeForLayoutSize","textAlign","OS","listBg"],"mappings":"yRAAA;;AAEA,gC;AACA,iD;;AA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;AA6BlBT,KAAM,CA7BY;AA8BlBW,UAAW,SA9BO;AA+BlBE,OAAQ,EA/BU;AAgClBD,eAAgB,UAhCE;AAiClBa,kBAAmB,EAAI,wBAAWe,yBAAX,CAAqC,CAArC,CAjCL;AAkClB1B,YAAanB,UAAUiC,eAlCL;AAmClB9B,aAAcH,UAAU6B,eAAV,CAA4B,CAnCxB,CAvDb;;AA4FPC,kBAAmB,IA5FZ;AA6FPW,gBAAiB,IA7FV;AA8FPtC,aAAc,IA9FP;AA+FPe,OAAQ,EA/FD;AAgGPD,eAAgB,QAhGT,CA7RW;;AA+XpB,YAAa;AACXa,kBAAmB,IADR,CA/XO;;AAkYpBhB,WAAY,QAlYQ;AAmYpBkB,cAAe,KAnYK;AAoYpB7B,aAAcH,UAAU6B,eAAV,CAA4B,CApYtB;AAqYpBY,gBAAiBzC,UAAU6B,eAAV,CAA4B,CArYzB;AAsYpBF,WAAY3B,UAAU6B,eAAV,CAA4B,CAtYpB;AAuYpBC,kBAAmB,EAAI,wBAAWe,yBAAX,CAAqC,CAArC,CAvYH;AAwYpBpC,gBAAiBT,UAAUgD,MAxYP;AAyYpB7B,YAAanB,UAAUiC,eAzYH,CAAtB;;;AA4YA,MAAO/B,cAAP;AACD,C","file":"ListItem.js","sourcesContent":["import { Platform, PixelRatio } from \"react-native\";\n\nimport pickerTheme from \"./Picker\";\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const listItemTheme = {\n \"NativeBase.InputGroup\": {\n \"NativeBase.Icon\": {\n paddingRight: 5\n },\n \"NativeBase.IconNB\": {\n paddingRight: 5\n },\n \"NativeBase.Input\": {\n paddingHorizontal: 5\n },\n flex: 1,\n borderWidth: null,\n margin: -10,\n borderBottomColor: \"transparent\"\n },\n \".searchBar\": {\n \"NativeBase.Item\": {\n \"NativeBase.Icon\": {\n backgroundColor: \"transparent\",\n color: variables.dropdownLinkColor,\n fontSize: platform === \"ios\"\n ? variables.iconFontSize - 10\n : variables.iconFontSize - 5,\n alignItems: \"center\",\n marginTop: 2,\n paddingRight: 8\n },\n \"NativeBase.IconNB\": {\n backgroundColor: \"transparent\",\n color: null,\n alignSelf: \"center\"\n },\n \"NativeBase.Input\": {\n alignSelf: \"center\"\n },\n alignSelf: \"center\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n flex: 1,\n height: platform === \"ios\" ? 30 : 40,\n borderColor: \"transparent\",\n backgroundColor: \"#fff\",\n borderRadius: 5\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 backgroundColor: variables.toolbarInputColor,\n padding: 10,\n marginLeft: null\n },\n \"NativeBase.CheckBox\": {\n marginLeft: -10\n },\n \".first\": {\n \".itemHeader\": {\n paddingTop: variables.listItemPadding + 3\n }\n },\n \".itemHeader\": {\n \".first\": {\n paddingTop: variables.listItemPadding + 3\n },\n borderBottomWidth: platform === \"ios\" ? variables.borderWidth : null,\n marginLeft: null,\n padding: variables.listItemPadding,\n paddingLeft: variables.listItemPadding + 5,\n paddingTop: platform === \"ios\"\n ? variables.listItemPadding + 25\n : undefined,\n paddingBottom: platform === \"android\"\n ? variables.listItemPadding + 20\n : undefined,\n flexDirection: \"row\",\n borderColor: variables.listBorderColor,\n \"NativeBase.Text\": {\n fontSize: 14,\n color: platform === \"ios\" ? undefined : variables.listNoteColor\n }\n },\n \".itemDivider\": {\n borderBottomWidth: null,\n marginLeft: null,\n padding: variables.listItemPadding,\n paddingLeft: variables.listItemPadding + 5,\n backgroundColor: variables.listDividerBg,\n flexDirection: \"row\",\n borderColor: variables.listBorderColor\n },\n \".selected\": {\n \"NativeBase.Left\": {\n \"NativeBase.Text\": {\n color: variables.brandPrimary\n }\n },\n \"NativeBase.Text\": {\n color: variables.brandPrimary\n }\n },\n \"NativeBase.Left\": {\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n },\n fontWeight: \"600\"\n },\n marginLeft: 10,\n alignItems: null,\n alignSelf: null\n },\n \"NativeBase.Icon\": {\n width: variables.iconFontSize - 10,\n fontSize: variables.iconFontSize - 10\n },\n \"NativeBase.IconNB\": {\n width: variables.iconFontSize - 10,\n fontSize: variables.iconFontSize - 10\n },\n \"NativeBase.Text\": {\n marginLeft: 10,\n alignSelf: \"center\"\n },\n flexDirection: \"row\"\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n marginHorizontal: variables.listItemPadding,\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n }\n },\n alignSelf: null,\n alignItems: null\n },\n \"NativeBase.Right\": {\n \"NativeBase.Badge\": {\n alignSelf: null\n },\n \"NativeBase.PickerNB\": {\n \"NativeBase.Button\": {\n marginRight: -15,\n \"NativeBase.Text\": {\n color: variables.topTabBarActiveTextColor\n }\n }\n },\n \"NativeBase.Button\": {\n alignSelf: null,\n \".transparent\": {\n \"NativeBase.Text\": {\n color: variables.topTabBarActiveTextColor\n }\n }\n },\n \"NativeBase.Icon\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: \"#c9c8cd\"\n },\n \"NativeBase.IconNB\": {\n alignSelf: null,\n fontSize: variables.iconFontSize - 8,\n color: \"#c9c8cd\"\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n },\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 padding: null,\n flex: 0.28\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n },\n alignSelf: null\n },\n\n \".last\": {\n marginLeft: -(variables.listItemPadding + 5),\n paddingLeft: (variables.listItemPadding + 5) * 2,\n top: 1\n },\n\n \".avatar\": {\n \"NativeBase.Left\": {\n flex: 0\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n marginLeft: null\n },\n flex: 1,\n paddingVertical: variables.listItemPadding,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n marginLeft: variables.listItemPadding + 5\n },\n \"NativeBase.Right\": {\n \"NativeBase.Text\": {\n \".note\": {\n fontSize: variables.noteFontSize - 2\n }\n },\n flex: 0,\n paddingRight: variables.listItemPadding + 5,\n alignSelf: \"stretch\",\n paddingVertical: variables.listItemPadding,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null\n },\n\n \".thumbnail\": {\n \"NativeBase.Left\": {\n flex: 0\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n marginLeft: null\n },\n flex: 1,\n paddingVertical: variables.listItemPadding + 5,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n marginLeft: variables.listItemPadding + 5\n },\n \"NativeBase.Right\": {\n \"NativeBase.Button\": {\n \".transparent\": {\n \"NativeBase.Text\": {\n fontSize: variables.listNoteSize,\n color: variables.sTabBarActiveTextColor\n }\n },\n height: null\n },\n flex: 0,\n justifyContent: \"center\",\n alignSelf: \"stretch\",\n paddingRight: variables.listItemPadding + 5,\n paddingVertical: variables.listItemPadding + 5,\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null\n },\n\n \".icon\": {\n \".last\": {\n \"NativeBase.Body\": {\n borderBottomWidth: null\n },\n \"NativeBase.Right\": {\n borderBottomWidth: null\n },\n borderBottomWidth: variables.borderWidth,\n borderColor: variables.listBorderColor\n },\n \"NativeBase.Left\": {\n \"NativeBase.Button\": {\n \"NativeBase.IconNB\": {\n marginHorizontal: null,\n fontSize: variables.iconFontSize - 5\n },\n \"NativeBase.Icon\": {\n marginHorizontal: null,\n fontSize: variables.iconFontSize - 8\n },\n alignSelf: \"center\",\n height: 29,\n width: 29,\n borderRadius: 6,\n paddingVertical: null,\n paddingHorizontal: null,\n alignItems: \"center\",\n justifyContent: \"center\"\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 paddingRight: variables.listItemPadding + 5,\n flex: 0,\n height: 44,\n justifyContent: \"center\",\n alignItems: \"center\"\n },\n \"NativeBase.Body\": {\n \"NativeBase.Text\": {\n marginLeft: null,\n fontSize: 17\n },\n flex: 1,\n height: 44,\n justifyContent: \"center\",\n borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n borderColor: variables.listBorderColor\n },\n \"NativeBase.Right\": {\n \"NativeBase.Text\": {\n textAlign: \"center\",\n color: \"#8F8E95\",\n fontSize: 17\n },\n \"NativeBase.IconNB\": {\n color: \"#C8C7CC\",\n fontSize: variables.iconFontSize - 10,\n alignSelf: \"center\",\n paddingLeft: 10,\n paddingTop: 3\n },\n \"NativeBase.Icon\": {\n color: \"#C8C7CC\",\n fontSize: variables.iconFontSize - 10,\n alignSelf: \"center\",\n paddingLeft: 10,\n paddingTop: 3\n },\n \"NativeBase.Switch\": {\n marginRight: Platform.OS === \"ios\" ? undefined : -5,\n alignSelf: null\n },\n \"NativeBase.PickerNB\": {\n ...pickerTheme()\n },\n flexDirection: \"row\",\n alignItems: \"center\",\n flex: 0,\n alignSelf: \"stretch\",\n height: 44,\n justifyContent: \"flex-end\",\n borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n borderColor: variables.listBorderColor,\n paddingRight: variables.listItemPadding + 5\n },\n borderBottomWidth: null,\n paddingVertical: null,\n paddingRight: null,\n height: 44,\n justifyContent: \"center\"\n },\n \".noBorder\": {\n borderBottomWidth: null\n },\n alignItems: \"center\",\n flexDirection: \"row\",\n paddingRight: variables.listItemPadding + 5,\n paddingVertical: variables.listItemPadding + 3,\n marginLeft: variables.listItemPadding + 5,\n borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n backgroundColor: variables.listBg,\n borderColor: variables.listBorderColor\n };\n\n return listItemTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Picker.android.js b/dist/src/theme/components/Picker.android.js index cea6edd8a..5d77e044e 100644 --- a/dist/src/theme/components/Picker.android.js +++ b/dist/src/theme/components/Picker.android.js @@ -1,15 +1,14 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var pickerTheme={ -'.note':{ -color:'#8F8E95'}, +".note":{ +color:"#8F8E95"}, width:90, marginRight:-4}; - return pickerTheme; }; //# sourceMappingURL=Picker.android.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Picker.android.js.map b/dist/src/theme/components/Picker.android.js.map index c8c701713..d69e2bd68 100644 --- a/dist/src/theme/components/Picker.android.js.map +++ b/dist/src/theme/components/Picker.android.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Picker.android.js"],"names":["variables","pickerTheme","color","width","marginRight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc;AAClB,QAAS;AACPC,MAAO,SADA,CADS;;AAIlBC,MAAO,EAJW;AAKlBC,YAAa,CAAC,CALI,CAApB;;;;AASA,MAAOH,YAAP;AACD,C","file":"Picker.android.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const pickerTheme = {\n '.note': {\n color: '#8F8E95',\n },\n width: 90,\n marginRight: -4,\n };\n\n\n return pickerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Picker.android.js"],"names":["variables","pickerTheme","color","width","marginRight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc;AAClB,QAAS;AACPC,MAAO,SADA,CADS;;AAIlBC,MAAO,EAJW;AAKlBC,YAAa,CAAC,CALI,CAApB;;;AAQA,MAAOH,YAAP;AACD,C","file":"Picker.android.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const pickerTheme = {\n \".note\": {\n color: \"#8F8E95\"\n },\n width: 90,\n marginRight: -4\n };\n\n return pickerTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Picker.ios.js b/dist/src/theme/components/Picker.ios.js index 4dbd2e33b..5b3c7afbd 100644 --- a/dist/src/theme/components/Picker.ios.js +++ b/dist/src/theme/components/Picker.ios.js @@ -1,10 +1,8 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var pickerTheme={}; - - return pickerTheme; }; //# sourceMappingURL=Picker.ios.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Picker.ios.js.map b/dist/src/theme/components/Picker.ios.js.map index 90be9f723..26188623e 100644 --- a/dist/src/theme/components/Picker.ios.js.map +++ b/dist/src/theme/components/Picker.ios.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Picker.ios.js"],"names":["variables","pickerTheme"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc,EAApB;;;;AAIA,MAAOA,YAAP;AACD,C","file":"Picker.ios.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const pickerTheme = {\n };\n\n\n return pickerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Picker.ios.js"],"names":["variables","pickerTheme"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc,EAApB;;AAEA,MAAOA,YAAP;AACD,C","file":"Picker.ios.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const pickerTheme = {};\n\n return pickerTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Radio.js b/dist/src/theme/components/Radio.js index e6d939528..6988924a6 100644 --- a/dist/src/theme/components/Radio.js +++ b/dist/src/theme/components/Radio.js @@ -1,21 +1,24 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var radioTheme={ -'.selected':{ -'NativeBase.IconNB':{ -color:_reactNative.Platform.OS==='ios'?variables.brandPrimary:variables.radioSelectedColorAndroid, -lineHeight:_reactNative.Platform.OS==='ios'?25:variables.radioBtnLineHeight, -height:_reactNative.Platform.OS==='ios'?20:undefined}}, - - -'NativeBase.IconNB':{ -color:_reactNative.Platform.OS==='ios'?'transparent':undefined, -lineHeight:_reactNative.Platform.OS==='ios'?undefined:variables.radioBtnLineHeight, -fontSize:_reactNative.Platform.OS==='ios'?undefined:variables.radioBtnSize}}; - +".selected":{ +"NativeBase.IconNB":{ +color:_reactNative.Platform.OS==="ios"? +variables.brandPrimary: +variables.radioSelectedColorAndroid, +lineHeight:_reactNative.Platform.OS==="ios"?25:variables.radioBtnLineHeight, +height:_reactNative.Platform.OS==="ios"?20:undefined}}, + + +"NativeBase.IconNB":{ +color:_reactNative.Platform.OS==="ios"?"transparent":undefined, +lineHeight:_reactNative.Platform.OS==="ios"? +undefined: +variables.radioBtnLineHeight, +fontSize:_reactNative.Platform.OS==="ios"?undefined:variables.radioBtnSize}}; diff --git a/dist/src/theme/components/Radio.js.map b/dist/src/theme/components/Radio.js.map index f9cfa4363..c06e62488 100644 --- a/dist/src/theme/components/Radio.js.map +++ b/dist/src/theme/components/Radio.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Radio.js"],"names":["variables","radioTheme","color","OS","brandPrimary","radioSelectedColorAndroid","lineHeight","radioBtnLineHeight","height","undefined","fontSize","radioBtnSize"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACf,YAAa;AACX,oBAAqB;AACnBC,MAAQ,sBAASC,EAAT,GAAgB,KAAjB,CAA0BH,UAAUI,YAApC,CAAmDJ,UAAUK,yBADjD;AAEnBC,WAAa,sBAASH,EAAT,GAAgB,KAAjB,CAA0B,EAA1B,CAA+BH,UAAUO,kBAFlC;AAGnBC,OAAS,sBAASL,EAAT,GAAgB,KAAjB,CAA0B,EAA1B,CAA+BM,SAHpB,CADV,CADE;;;AAQf,oBAAqB;AACnBP,MAAQ,sBAASC,EAAT,GAAiB,KAAlB,CAA2B,aAA3B,CAA2CM,SAD/B;AAEnBH,WAAa,sBAASH,EAAT,GAAiB,KAAlB,CAA2BM,SAA3B,CAAuCT,UAAUO,kBAF1C;AAGnBG,SAAW,sBAASP,EAAT,GAAiB,KAAlB,CAA2BM,SAA3B,CAAuCT,UAAUW,YAHxC,CARN,CAAnB;;;;;AAgBA,MAAOV,WAAP;AACD,C","file":"Radio.js","sourcesContent":["import { Platform } from 'react-native';\n\nimport variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const radioTheme = {\n '.selected': {\n 'NativeBase.IconNB': {\n color: (Platform.OS === 'ios') ? variables.brandPrimary : variables.radioSelectedColorAndroid,\n lineHeight: (Platform.OS === 'ios') ? 25 : variables.radioBtnLineHeight,\n height: (Platform.OS === 'ios') ? 20 : undefined,\n },\n },\n 'NativeBase.IconNB': {\n color: (Platform.OS === 'ios') ? 'transparent' : undefined,\n lineHeight: (Platform.OS === 'ios') ? undefined : variables.radioBtnLineHeight,\n fontSize: (Platform.OS === 'ios') ? undefined : variables.radioBtnSize,\n },\n };\n\n\n return radioTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Radio.js"],"names":["variables","radioTheme","color","OS","brandPrimary","radioSelectedColorAndroid","lineHeight","radioBtnLineHeight","height","undefined","fontSize","radioBtnSize"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjB,YAAa;AACX,oBAAqB;AACnBC,MAAO,sBAASC,EAAT,GAAgB,KAAhB;AACHH,UAAUI,YADP;AAEHJ,UAAUK,yBAHK;AAInBC,WAAY,sBAASH,EAAT,GAAgB,KAAhB,CAAwB,EAAxB,CAA6BH,UAAUO,kBAJhC;AAKnBC,OAAQ,sBAASL,EAAT,GAAgB,KAAhB,CAAwB,EAAxB,CAA6BM,SALlB,CADV,CADI;;;AAUjB,oBAAqB;AACnBP,MAAO,sBAASC,EAAT,GAAgB,KAAhB,CAAwB,aAAxB,CAAwCM,SAD5B;AAEnBH,WAAY,sBAASH,EAAT,GAAgB,KAAhB;AACRM,SADQ;AAERT,UAAUO,kBAJK;AAKnBG,SAAU,sBAASP,EAAT,GAAgB,KAAhB,CAAwBM,SAAxB,CAAoCT,UAAUW,YALrC,CAVJ,CAAnB;;;;AAmBA,MAAOV,WAAP;AACD,C","file":"Radio.js","sourcesContent":["import { Platform } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const radioTheme = {\n \".selected\": {\n \"NativeBase.IconNB\": {\n color: Platform.OS === \"ios\"\n ? variables.brandPrimary\n : variables.radioSelectedColorAndroid,\n lineHeight: Platform.OS === \"ios\" ? 25 : variables.radioBtnLineHeight,\n height: Platform.OS === \"ios\" ? 20 : undefined\n }\n },\n \"NativeBase.IconNB\": {\n color: Platform.OS === \"ios\" ? \"transparent\" : undefined,\n lineHeight: Platform.OS === \"ios\"\n ? undefined\n : variables.radioBtnLineHeight,\n fontSize: Platform.OS === \"ios\" ? undefined : variables.radioBtnSize\n }\n };\n\n return radioTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Segment.js b/dist/src/theme/components/Segment.js index e7d081cb0..b426f336d 100644 --- a/dist/src/theme/components/Segment.js +++ b/dist/src/theme/components/Segment.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; @@ -6,42 +6,41 @@ var platform=variables.platform; var segmentTheme={ height:45, borderColor:variables.segmentBorderColorMain, -flexDirection:'row', -justifyContent:'center', +flexDirection:"row", +justifyContent:"center", backgroundColor:variables.segmentBackgroundColor, -'NativeBase.Button':{ -alignSelf:'center', +"NativeBase.Button":{ +alignSelf:"center", borderRadius:0, paddingHorizontal:20, height:30, -backgroundColor:'transparent', +backgroundColor:"transparent", borderWidth:1, borderColor:variables.segmentBorderColor, elevation:0, -'.active':{ +".active":{ backgroundColor:variables.segmentActiveBackgroundColor, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.segmentActiveTextColor}}, -'.first':{ -borderTopLeftRadius:platform==='ios'?5:undefined, -borderBottomLeftRadius:platform==='ios'?5:undefined, +".first":{ +borderTopLeftRadius:platform==="ios"?5:undefined, +borderBottomLeftRadius:platform==="ios"?5:undefined, borderRightWidth:0}, -'.last':{ -borderTopRightRadius:platform==='ios'?5:undefined, -borderBottomRightRadius:platform==='ios'?5:undefined, +".last":{ +borderTopRightRadius:platform==="ios"?5:undefined, +borderBottomRightRadius:platform==="ios"?5:undefined, borderLeftWidth:0}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.segmentTextColor, fontSize:14}}}; - return segmentTheme; }; //# sourceMappingURL=Segment.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Segment.js.map b/dist/src/theme/components/Segment.js.map index 172110053..1bdebc1f9 100644 --- a/dist/src/theme/components/Segment.js.map +++ b/dist/src/theme/components/Segment.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Segment.js"],"names":["variables","platform","segmentTheme","height","borderColor","segmentBorderColorMain","flexDirection","justifyContent","backgroundColor","segmentBackgroundColor","alignSelf","borderRadius","paddingHorizontal","borderWidth","segmentBorderColor","elevation","segmentActiveBackgroundColor","color","segmentActiveTextColor","borderTopLeftRadius","undefined","borderBottomLeftRadius","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderLeftWidth","segmentTextColor","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,cAAe;AACnBC,OAAQ,EADW;AAEnBC,YAAaJ,UAAUK,sBAFJ;AAGnBC,cAAe,KAHI;AAInBC,eAAgB,QAJG;AAKnBC,gBAAiBR,UAAUS,sBALR;AAMnB,oBAAqB;AACnBC,UAAW,QADQ;AAEnBC,aAAc,CAFK;AAGnBC,kBAAmB,EAHA;AAInBT,OAAQ,EAJW;AAKnBK,gBAAiB,aALE;AAMnBK,YAAa,CANM;AAOnBT,YAAaJ,UAAUc,kBAPJ;AAQnBC,UAAW,CARQ;AASnB,UAAW;AACTP,gBAAiBR,UAAUgB,4BADlB;AAET,kBAAmB;AACjBC,MAAOjB,UAAUkB,sBADA,CAFV,CATQ;;;AAenB,SAAU;AACRC,oBAAsBlB,WAAa,KAAd,CAAuB,CAAvB,CAA2BmB,SADxC;AAERC,uBAAyBpB,WAAa,KAAd,CAAuB,CAAvB,CAA2BmB,SAF3C;AAGRE,iBAAkB,CAHV,CAfS;;AAoBnB,QAAS;AACPC,qBAAuBtB,WAAa,KAAd,CAAuB,CAAvB,CAA2BmB,SAD1C;AAEPI,wBAA0BvB,WAAa,KAAd,CAAuB,CAAvB,CAA2BmB,SAF7C;AAGPK,gBAAiB,CAHV,CApBU;;AAyBnB,kBAAmB;AACjBR,MAAOjB,UAAU0B,gBADA;AAEjBC,SAAU,EAFO,CAzBA,CANF,CAArB;;;;;;AAuCA,MAAOzB,aAAP;AACD,C","file":"Segment.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const segmentTheme = {\n height: 45,\n borderColor: variables.segmentBorderColorMain,\n flexDirection: 'row',\n justifyContent: 'center',\n backgroundColor: variables.segmentBackgroundColor,\n 'NativeBase.Button': {\n alignSelf: 'center',\n borderRadius: 0,\n paddingHorizontal: 20,\n height: 30,\n backgroundColor: 'transparent',\n borderWidth: 1,\n borderColor: variables.segmentBorderColor,\n elevation: 0,\n '.active': {\n backgroundColor: variables.segmentActiveBackgroundColor,\n 'NativeBase.Text': {\n color: variables.segmentActiveTextColor,\n },\n },\n '.first': {\n borderTopLeftRadius: (platform === 'ios') ? 5 : undefined,\n borderBottomLeftRadius: (platform === 'ios') ? 5 : undefined,\n borderRightWidth: 0,\n },\n '.last': {\n borderTopRightRadius: (platform === 'ios') ? 5 : undefined,\n borderBottomRightRadius: (platform === 'ios') ? 5 : undefined,\n borderLeftWidth: 0,\n },\n 'NativeBase.Text': {\n color: variables.segmentTextColor,\n fontSize: 14,\n },\n },\n };\n\n\n return segmentTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Segment.js"],"names":["variables","platform","segmentTheme","height","borderColor","segmentBorderColorMain","flexDirection","justifyContent","backgroundColor","segmentBackgroundColor","alignSelf","borderRadius","paddingHorizontal","borderWidth","segmentBorderColor","elevation","segmentActiveBackgroundColor","color","segmentActiveTextColor","borderTopLeftRadius","undefined","borderBottomLeftRadius","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderLeftWidth","segmentTextColor","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,cAAe;AACnBC,OAAQ,EADW;AAEnBC,YAAaJ,UAAUK,sBAFJ;AAGnBC,cAAe,KAHI;AAInBC,eAAgB,QAJG;AAKnBC,gBAAiBR,UAAUS,sBALR;AAMnB,oBAAqB;AACnBC,UAAW,QADQ;AAEnBC,aAAc,CAFK;AAGnBC,kBAAmB,EAHA;AAInBT,OAAQ,EAJW;AAKnBK,gBAAiB,aALE;AAMnBK,YAAa,CANM;AAOnBT,YAAaJ,UAAUc,kBAPJ;AAQnBC,UAAW,CARQ;AASnB,UAAW;AACTP,gBAAiBR,UAAUgB,4BADlB;AAET,kBAAmB;AACjBC,MAAOjB,UAAUkB,sBADA,CAFV,CATQ;;;AAenB,SAAU;AACRC,oBAAqBlB,WAAa,KAAb,CAAqB,CAArB,CAAyBmB,SADtC;AAERC,uBAAwBpB,WAAa,KAAb,CAAqB,CAArB,CAAyBmB,SAFzC;AAGRE,iBAAkB,CAHV,CAfS;;AAoBnB,QAAS;AACPC,qBAAsBtB,WAAa,KAAb,CAAqB,CAArB,CAAyBmB,SADxC;AAEPI,wBAAyBvB,WAAa,KAAb,CAAqB,CAArB,CAAyBmB,SAF3C;AAGPK,gBAAiB,CAHV,CApBU;;AAyBnB,kBAAmB;AACjBR,MAAOjB,UAAU0B,gBADA;AAEjBC,SAAU,EAFO,CAzBA,CANF,CAArB;;;;;AAsCA,MAAOzB,aAAP;AACD,C","file":"Segment.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const segmentTheme = {\n height: 45,\n borderColor: variables.segmentBorderColorMain,\n flexDirection: \"row\",\n justifyContent: \"center\",\n backgroundColor: variables.segmentBackgroundColor,\n \"NativeBase.Button\": {\n alignSelf: \"center\",\n borderRadius: 0,\n paddingHorizontal: 20,\n height: 30,\n backgroundColor: \"transparent\",\n borderWidth: 1,\n borderColor: variables.segmentBorderColor,\n elevation: 0,\n \".active\": {\n backgroundColor: variables.segmentActiveBackgroundColor,\n \"NativeBase.Text\": {\n color: variables.segmentActiveTextColor\n }\n },\n \".first\": {\n borderTopLeftRadius: platform === \"ios\" ? 5 : undefined,\n borderBottomLeftRadius: platform === \"ios\" ? 5 : undefined,\n borderRightWidth: 0\n },\n \".last\": {\n borderTopRightRadius: platform === \"ios\" ? 5 : undefined,\n borderBottomRightRadius: platform === \"ios\" ? 5 : undefined,\n borderLeftWidth: 0\n },\n \"NativeBase.Text\": {\n color: variables.segmentTextColor,\n fontSize: 14\n }\n }\n };\n\n return segmentTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Separator.js b/dist/src/theme/components/Separator.js index b03d20713..9cba4ec08 100644 --- a/dist/src/theme/components/Separator.js +++ b/dist/src/theme/components/Separator.js @@ -1,12 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var theme={ -'.bordered':{ -'.noTopBorder':{ +".bordered":{ +".noTopBorder":{ borderTopWidth:0}, -'.noBottomBorder':{ +".noBottomBorder":{ borderBottomWidth:0}, height:35, @@ -15,19 +15,19 @@ borderBottomWidth:variables.borderWidth, borderTopWidth:variables.borderWidth, borderColor:variables.listBorderColor}, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:variables.tabBarTextSize}, -'.noTopBorder':{ +".noTopBorder":{ borderTopWidth:0}, -'.noBottomBorder':{ +".noBottomBorder":{ borderBottomWidth:0}, height:38, -backgroundColor:'#F0EFF5', +backgroundColor:"#F0EFF5", flex:1, -justifyContent:'center', +justifyContent:"center", paddingLeft:variables.listItemPadding+5}; diff --git a/dist/src/theme/components/Separator.js.map b/dist/src/theme/components/Separator.js.map index db0985660..06c7ad6f1 100644 --- a/dist/src/theme/components/Separator.js.map +++ b/dist/src/theme/components/Separator.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Separator.js"],"names":["variables","theme","borderTopWidth","borderBottomWidth","height","paddingVertical","listItemPadding","borderWidth","borderColor","listBorderColor","fontSize","tabBarTextSize","backgroundColor","flex","justifyContent","paddingLeft"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,OAAQ;AACZ,YAAa;AACX,eAAgB;AACdC,eAAgB,CADF,CADL;;AAIX,kBAAmB;AACjBC,kBAAmB,CADF,CAJR;;AAOXC,OAAQ,EAPG;AAQXC,gBAAiBL,UAAUM,eAAV,CAA4B,CARlC;AASXH,kBAAmBH,UAAUO,WATlB;AAUXL,eAAgBF,UAAUO,WAVf;AAWXC,YAAaR,UAAUS,eAXZ,CADD;;AAcZ,kBAAmB;AACjBC,SAAUV,UAAUW,cADH,CAdP;;AAiBZ,eAAgB;AACdT,eAAgB,CADF,CAjBJ;;AAoBZ,kBAAmB;AACjBC,kBAAmB,CADF,CApBP;;AAuBZC,OAAQ,EAvBI;AAwBZQ,gBAAiB,SAxBL;AAyBZC,KAAM,CAzBM;AA0BZC,eAAgB,QA1BJ;AA2BZC,YAAaf,UAAUM,eAAV,CAA4B,CA3B7B,CAAd;;;AA8BA,MAAOL,MAAP;AACD,C","file":"Separator.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const theme = {\n '.bordered': {\n '.noTopBorder': {\n borderTopWidth: 0,\n },\n '.noBottomBorder': {\n borderBottomWidth: 0,\n },\n height: 35,\n paddingVertical: variables.listItemPadding + 1,\n borderBottomWidth: variables.borderWidth,\n borderTopWidth: variables.borderWidth,\n borderColor: variables.listBorderColor,\n },\n 'NativeBase.Text': {\n fontSize: variables.tabBarTextSize,\n },\n '.noTopBorder': {\n borderTopWidth: 0,\n },\n '.noBottomBorder': {\n borderBottomWidth: 0,\n },\n height: 38,\n backgroundColor: '#F0EFF5',\n flex: 1,\n justifyContent: 'center',\n paddingLeft: variables.listItemPadding + 5\n };\n\n return theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Separator.js"],"names":["variables","theme","borderTopWidth","borderBottomWidth","height","paddingVertical","listItemPadding","borderWidth","borderColor","listBorderColor","fontSize","tabBarTextSize","backgroundColor","flex","justifyContent","paddingLeft"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,OAAQ;AACZ,YAAa;AACX,eAAgB;AACdC,eAAgB,CADF,CADL;;AAIX,kBAAmB;AACjBC,kBAAmB,CADF,CAJR;;AAOXC,OAAQ,EAPG;AAQXC,gBAAiBL,UAAUM,eAAV,CAA4B,CARlC;AASXH,kBAAmBH,UAAUO,WATlB;AAUXL,eAAgBF,UAAUO,WAVf;AAWXC,YAAaR,UAAUS,eAXZ,CADD;;AAcZ,kBAAmB;AACjBC,SAAUV,UAAUW,cADH,CAdP;;AAiBZ,eAAgB;AACdT,eAAgB,CADF,CAjBJ;;AAoBZ,kBAAmB;AACjBC,kBAAmB,CADF,CApBP;;AAuBZC,OAAQ,EAvBI;AAwBZQ,gBAAiB,SAxBL;AAyBZC,KAAM,CAzBM;AA0BZC,eAAgB,QA1BJ;AA2BZC,YAAaf,UAAUM,eAAV,CAA4B,CA3B7B,CAAd;;;AA8BA,MAAOL,MAAP;AACD,C","file":"Separator.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const theme = {\n \".bordered\": {\n \".noTopBorder\": {\n borderTopWidth: 0\n },\n \".noBottomBorder\": {\n borderBottomWidth: 0\n },\n height: 35,\n paddingVertical: variables.listItemPadding + 1,\n borderBottomWidth: variables.borderWidth,\n borderTopWidth: variables.borderWidth,\n borderColor: variables.listBorderColor\n },\n \"NativeBase.Text\": {\n fontSize: variables.tabBarTextSize\n },\n \".noTopBorder\": {\n borderTopWidth: 0\n },\n \".noBottomBorder\": {\n borderBottomWidth: 0\n },\n height: 38,\n backgroundColor: \"#F0EFF5\",\n flex: 1,\n justifyContent: \"center\",\n paddingLeft: variables.listItemPadding + 5\n };\n\n return theme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Spinner.js b/dist/src/theme/components/Spinner.js index 8a4ab8eb9..114019927 100644 --- a/dist/src/theme/components/Spinner.js +++ b/dist/src/theme/components/Spinner.js @@ -1,11 +1,10 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var spinnerTheme={ height:80}; - return spinnerTheme; }; //# sourceMappingURL=Spinner.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Spinner.js.map b/dist/src/theme/components/Spinner.js.map index 098da425d..dbd1eb33a 100644 --- a/dist/src/theme/components/Spinner.js.map +++ b/dist/src/theme/components/Spinner.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Spinner.js"],"names":["variables","spinnerTheme","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,cAAe;AACnBC,OAAQ,EADW,CAArB;;;;AAKA,MAAOD,aAAP;AACD,C","file":"Spinner.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const spinnerTheme = {\n height: 80,\n };\n\n\n return spinnerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Spinner.js"],"names":["variables","spinnerTheme","height"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,cAAe;AACnBC,OAAQ,EADW,CAArB;;;AAIA,MAAOD,aAAP;AACD,C","file":"Spinner.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const spinnerTheme = {\n height: 80\n };\n\n return spinnerTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Tab.js b/dist/src/theme/components/Tab.js index d1bc986ec..317ab6ad8 100644 --- a/dist/src/theme/components/Tab.js +++ b/dist/src/theme/components/Tab.js @@ -1,11 +1,9 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; - var tabTheme={ flex:1, -backgroundColor:'#FFF'}; - +backgroundColor:"#FFF"}; return tabTheme; diff --git a/dist/src/theme/components/Tab.js.map b/dist/src/theme/components/Tab.js.map index 704dbe92d..ee6212fe6 100644 --- a/dist/src/theme/components/Tab.js.map +++ b/dist/src/theme/components/Tab.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Tab.js"],"names":["variables","tabTheme","flex","backgroundColor"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;;AAEvC,GAAMC,UAAW;AACfC,KAAM,CADS;AAEfC,gBAAiB,MAFF,CAAjB;;;;AAMA,MAAOF,SAAP;AACD,C","file":"Tab.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n\n const tabTheme = {\n flex: 1,\n backgroundColor: '#FFF',\n };\n\n\n return tabTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Tab.js"],"names":["variables","tabTheme","flex","backgroundColor"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAW;AACfC,KAAM,CADS;AAEfC,gBAAiB,MAFF,CAAjB;;;AAKA,MAAOF,SAAP;AACD,C","file":"Tab.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const tabTheme = {\n flex: 1,\n backgroundColor: \"#FFF\"\n };\n\n return tabTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/TabBar.js b/dist/src/theme/components/TabBar.js index 910ab0a12..6ee1a9839 100644 --- a/dist/src/theme/components/TabBar.js +++ b/dist/src/theme/components/TabBar.js @@ -1,57 +1,56 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var tabBarTheme={ -'.tabIcon':{ +".tabIcon":{ height:undefined}, -'.vertical':{ +".vertical":{ height:60}, -'NativeBase.Button':{ -'.transparent':{ -'NativeBase.Text':{ +"NativeBase.Button":{ +".transparent":{ +"NativeBase.Text":{ fontSize:variables.tabFontSize, color:variables.sTabBarActiveTextColor, -fontWeight:'400'}, +fontWeight:"400"}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.sTabBarActiveTextColor}}, -'NativeBase.IconNB':{ +"NativeBase.IconNB":{ color:variables.sTabBarActiveTextColor}, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:variables.tabFontSize, color:variables.sTabBarActiveTextColor, -fontWeight:'400'}, +fontWeight:"400"}, -'.isTabActive':{ -'NativeBase.Text':{ -fontWeight:'900'}}, +".isTabActive":{ +"NativeBase.Text":{ +fontWeight:"900"}}, flex:1, -alignSelf:'stretch', -alignItems:'center', -justifyContent:'center', +alignSelf:"stretch", +alignItems:"center", +justifyContent:"center", borderRadius:null, -borderBottomColor:'transparent', +borderBottomColor:"transparent", backgroundColor:variables.tabBgColor}, height:45, -flexDirection:'row', -justifyContent:'space-around', +flexDirection:"row", +justifyContent:"space-around", borderWidth:1, borderTopWidth:0, borderLeftWidth:0, borderRightWidth:0, -borderBottomColor:'#ccc', +borderBottomColor:"#ccc", backgroundColor:variables.tabBgColor}; - return tabBarTheme; }; //# sourceMappingURL=TabBar.js.map \ No newline at end of file diff --git a/dist/src/theme/components/TabBar.js.map b/dist/src/theme/components/TabBar.js.map index a29f4f6d5..08c146009 100644 --- a/dist/src/theme/components/TabBar.js.map +++ b/dist/src/theme/components/TabBar.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/TabBar.js"],"names":["variables","tabBarTheme","height","undefined","fontSize","tabFontSize","color","sTabBarActiveTextColor","fontWeight","flex","alignSelf","alignItems","justifyContent","borderRadius","borderBottomColor","backgroundColor","tabBgColor","flexDirection","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc;AAChB,WAAY;AACVC,OAAQC,SADE,CADI;;AAIhB,YAAa;AACXD,OAAQ,EADG,CAJG;;AAOhB,oBAAqB;AACnB,eAAgB;AACd,kBAAmB;AACjBE,SAAUJ,UAAUK,WADH;AAEjBC,MAAON,UAAUO,sBAFA;AAGjBC,WAAY,KAHK,CADL;;AAMd,oBAAqB;AACnBF,MAAON,UAAUO,sBADE,CANP,CADG;;;AAWnB,oBAAqB;AACnBD,MAAON,UAAUO,sBADE,CAXF;;AAcnB,kBAAmB;AACjBH,SAAUJ,UAAUK,WADH;AAEjBC,MAAON,UAAUO,sBAFA;AAGjBC,WAAY,KAHK,CAdA;;AAmBnB,eAAgB;AACd,kBAAmB;AACjBA,WAAY,KADK,CADL,CAnBG;;;AAwBnBC,KAAM,CAxBa;AAyBnBC,UAAW,SAzBQ;AA0BnBC,WAAY,QA1BO;AA2BnBC,eAAgB,QA3BG;AA4BnBC,aAAc,IA5BK;AA6BnBC,kBAAmB,aA7BA;AA8BnBC,gBAAiBf,UAAUgB,UA9BR,CAPL;;AAuChBd,OAAQ,EAvCQ;AAwChBe,cAAe,KAxCC;AAyChBL,eAAgB,cAzCA;AA0ChBM,YAAa,CA1CG;AA2ChBC,eAAgB,CA3CA;AA4ChBC,gBAAiB,CA5CD;AA6ChBC,iBAAkB,CA7CF;AA8ChBP,kBAAmB,MA9CH;AA+ChBC,gBAAiBf,UAAUgB,UA/CX,CAApB;;;;AAmDA,MAAOf,YAAP;AACD,C","file":"TabBar.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const tabBarTheme = {\n '.tabIcon': {\n height: undefined,\n },\n '.vertical': {\n height: 60,\n },\n 'NativeBase.Button': {\n '.transparent': {\n 'NativeBase.Text': {\n fontSize: variables.tabFontSize,\n color: variables.sTabBarActiveTextColor,\n fontWeight: '400',\n },\n 'NativeBase.IconNB': {\n color: variables.sTabBarActiveTextColor,\n },\n },\n 'NativeBase.IconNB': {\n color: variables.sTabBarActiveTextColor,\n },\n 'NativeBase.Text': {\n fontSize: variables.tabFontSize,\n color: variables.sTabBarActiveTextColor,\n fontWeight: '400',\n },\n '.isTabActive': {\n 'NativeBase.Text': {\n fontWeight: '900',\n },\n },\n flex: 1,\n alignSelf: 'stretch',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: null,\n borderBottomColor: 'transparent',\n backgroundColor: variables.tabBgColor,\n },\n height: 45,\n flexDirection: 'row',\n justifyContent: 'space-around',\n borderWidth: 1,\n borderTopWidth: 0,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n borderBottomColor: '#ccc',\n backgroundColor: variables.tabBgColor,\n };\n\n\n return tabBarTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/TabBar.js"],"names":["variables","tabBarTheme","height","undefined","fontSize","tabFontSize","color","sTabBarActiveTextColor","fontWeight","flex","alignSelf","alignItems","justifyContent","borderRadius","borderBottomColor","backgroundColor","tabBgColor","flexDirection","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,aAAc;AAClB,WAAY;AACVC,OAAQC,SADE,CADM;;AAIlB,YAAa;AACXD,OAAQ,EADG,CAJK;;AAOlB,oBAAqB;AACnB,eAAgB;AACd,kBAAmB;AACjBE,SAAUJ,UAAUK,WADH;AAEjBC,MAAON,UAAUO,sBAFA;AAGjBC,WAAY,KAHK,CADL;;AAMd,oBAAqB;AACnBF,MAAON,UAAUO,sBADE,CANP,CADG;;;AAWnB,oBAAqB;AACnBD,MAAON,UAAUO,sBADE,CAXF;;AAcnB,kBAAmB;AACjBH,SAAUJ,UAAUK,WADH;AAEjBC,MAAON,UAAUO,sBAFA;AAGjBC,WAAY,KAHK,CAdA;;AAmBnB,eAAgB;AACd,kBAAmB;AACjBA,WAAY,KADK,CADL,CAnBG;;;AAwBnBC,KAAM,CAxBa;AAyBnBC,UAAW,SAzBQ;AA0BnBC,WAAY,QA1BO;AA2BnBC,eAAgB,QA3BG;AA4BnBC,aAAc,IA5BK;AA6BnBC,kBAAmB,aA7BA;AA8BnBC,gBAAiBf,UAAUgB,UA9BR,CAPH;;AAuClBd,OAAQ,EAvCU;AAwClBe,cAAe,KAxCG;AAyClBL,eAAgB,cAzCE;AA0ClBM,YAAa,CA1CK;AA2ClBC,eAAgB,CA3CE;AA4ClBC,gBAAiB,CA5CC;AA6ClBC,iBAAkB,CA7CA;AA8ClBP,kBAAmB,MA9CD;AA+ClBC,gBAAiBf,UAAUgB,UA/CT,CAApB;;;AAkDA,MAAOf,YAAP;AACD,C","file":"TabBar.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const tabBarTheme = {\n \".tabIcon\": {\n height: undefined\n },\n \".vertical\": {\n height: 60\n },\n \"NativeBase.Button\": {\n \".transparent\": {\n \"NativeBase.Text\": {\n fontSize: variables.tabFontSize,\n color: variables.sTabBarActiveTextColor,\n fontWeight: \"400\"\n },\n \"NativeBase.IconNB\": {\n color: variables.sTabBarActiveTextColor\n }\n },\n \"NativeBase.IconNB\": {\n color: variables.sTabBarActiveTextColor\n },\n \"NativeBase.Text\": {\n fontSize: variables.tabFontSize,\n color: variables.sTabBarActiveTextColor,\n fontWeight: \"400\"\n },\n \".isTabActive\": {\n \"NativeBase.Text\": {\n fontWeight: \"900\"\n }\n },\n flex: 1,\n alignSelf: \"stretch\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: null,\n borderBottomColor: \"transparent\",\n backgroundColor: variables.tabBgColor\n },\n height: 45,\n flexDirection: \"row\",\n justifyContent: \"space-around\",\n borderWidth: 1,\n borderTopWidth: 0,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n borderBottomColor: \"#ccc\",\n backgroundColor: variables.tabBgColor\n };\n\n return tabBarTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/TabContainer.js b/dist/src/theme/components/TabContainer.js index 066a1b2c3..9b7da8ba1 100644 --- a/dist/src/theme/components/TabContainer.js +++ b/dist/src/theme/components/TabContainer.js @@ -1,5 +1,5 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform); -var _reactNative=require('react-native');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform); +var _reactNative=require("react-native");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platformStyle=variables.platformStyle; @@ -8,17 +8,18 @@ var platform=variables.platform; var tabContainerTheme={ elevation:3, height:50, -flexDirection:'row', -shadowColor:platformStyle==='material'?'#000':undefined, -shadowOffset:platformStyle==='material'?{width:0,height:2}:undefined, -shadowOpacity:platformStyle==='material'?0.2:undefined, -shadowRadius:platformStyle==='material'?1.2:undefined, -justifyContent:'space-around', -borderBottomWidth:_reactNative.Platform.OS==='ios'?variables.borderWidth:0, +flexDirection:"row", +shadowColor:platformStyle==="material"?"#000":undefined, +shadowOffset:platformStyle==="material"? +{width:0,height:2}: +undefined, +shadowOpacity:platformStyle==="material"?0.2:undefined, +shadowRadius:platformStyle==="material"?1.2:undefined, +justifyContent:"space-around", +borderBottomWidth:_reactNative.Platform.OS==="ios"?variables.borderWidth:0, borderColor:variables.topTabBarBorderColor}; - return tabContainerTheme; }; //# sourceMappingURL=TabContainer.js.map \ No newline at end of file diff --git a/dist/src/theme/components/TabContainer.js.map b/dist/src/theme/components/TabContainer.js.map index b2c8d68d0..dd3d9743e 100644 --- a/dist/src/theme/components/TabContainer.js.map +++ b/dist/src/theme/components/TabContainer.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/TabContainer.js"],"names":["variables","platformStyle","platform","tabContainerTheme","elevation","height","flexDirection","shadowColor","undefined","shadowOffset","width","shadowOpacity","shadowRadius","justifyContent","borderBottomWidth","OS","borderWidth","borderColor","topTabBarBorderColor"],"mappings":"yDAAA,iD;AACA,yC;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,mBAAoB;AACxBC,UAAW,CADa;AAExBC,OAAQ,EAFgB;AAGxBC,cAAe,KAHS;AAIxBC,YAAcN,gBAAkB,UAAnB,CAAiC,MAAjC,CAA0CO,SAJ/B;AAKxBC,aAAeR,gBAAkB,UAAnB,CAAiC,CAAES,MAAO,CAAT,CAAYL,OAAQ,CAApB,CAAjC,CAA2DG,SALjD;AAMxBG,cAAgBV,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCO,SAN9B;AAOxBI,aAAeX,gBAAkB,UAAnB,CAAiC,GAAjC,CAAuCO,SAP7B;AAQxBK,eAAgB,cARQ;AASxBC,kBAAoB,sBAASC,EAAT,GAAgB,KAAjB,CAA0Bf,UAAUgB,WAApC,CAAkD,CAT7C;AAUxBC,YAAajB,UAAUkB,oBAVC,CAA1B;;;;AAcA,MAAOf,kBAAP;AACD,C","file":"TabContainer.js","sourcesContent":["import variable from './../variables/platform';\nimport { Platform } from 'react-native';\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const tabContainerTheme = {\n elevation: 3,\n height: 50,\n flexDirection: 'row',\n shadowColor: (platformStyle === 'material') ? '#000' : undefined,\n shadowOffset: (platformStyle === 'material') ? { width: 0, height: 2 } : undefined,\n shadowOpacity: (platformStyle === 'material') ? 0.2 : undefined,\n shadowRadius: (platformStyle === 'material') ? 1.2 : undefined,\n justifyContent: 'space-around',\n borderBottomWidth: (Platform.OS === 'ios') ? variables.borderWidth : 0,\n borderColor: variables.topTabBarBorderColor,\n };\n\n\n return tabContainerTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/TabContainer.js"],"names":["variables","platformStyle","platform","tabContainerTheme","elevation","height","flexDirection","shadowColor","undefined","shadowOffset","width","shadowOpacity","shadowRadius","justifyContent","borderBottomWidth","OS","borderWidth","borderColor","topTabBarBorderColor"],"mappings":"yDAAA,iD;AACA,yC;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgBD,UAAUC,aAAhC;AACA,GAAMC,UAAWF,UAAUE,QAA3B;;AAEA,GAAMC,mBAAoB;AACxBC,UAAW,CADa;AAExBC,OAAQ,EAFgB;AAGxBC,cAAe,KAHS;AAIxBC,YAAaN,gBAAkB,UAAlB,CAA+B,MAA/B,CAAwCO,SAJ7B;AAKxBC,aAAcR,gBAAkB,UAAlB;AACV,CAAES,MAAO,CAAT,CAAYL,OAAQ,CAApB,CADU;AAEVG,SAPoB;AAQxBG,cAAeV,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqCO,SAR5B;AASxBI,aAAcX,gBAAkB,UAAlB,CAA+B,GAA/B,CAAqCO,SAT3B;AAUxBK,eAAgB,cAVQ;AAWxBC,kBAAmB,sBAASC,EAAT,GAAgB,KAAhB,CAAwBf,UAAUgB,WAAlC,CAAgD,CAX3C;AAYxBC,YAAajB,UAAUkB,oBAZC,CAA1B;;;AAeA,MAAOf,kBAAP;AACD,C","file":"TabContainer.js","sourcesContent":["import variable from \"./../variables/platform\";\nimport { Platform } from \"react-native\";\n\nexport default (variables = variable) => {\n const platformStyle = variables.platformStyle;\n const platform = variables.platform;\n\n const tabContainerTheme = {\n elevation: 3,\n height: 50,\n flexDirection: \"row\",\n shadowColor: platformStyle === \"material\" ? \"#000\" : undefined,\n shadowOffset: platformStyle === \"material\"\n ? { width: 0, height: 2 }\n : undefined,\n shadowOpacity: platformStyle === \"material\" ? 0.2 : undefined,\n shadowRadius: platformStyle === \"material\" ? 1.2 : undefined,\n justifyContent: \"space-around\",\n borderBottomWidth: Platform.OS === \"ios\" ? variables.borderWidth : 0,\n borderColor: variables.topTabBarBorderColor\n };\n\n return tabContainerTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/TabHeading.js b/dist/src/theme/components/TabHeading.js index 310aea596..875590d66 100644 --- a/dist/src/theme/components/TabHeading.js +++ b/dist/src/theme/components/TabHeading.js @@ -1,39 +1,38 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var tabHeadingTheme={ -flexDirection:'row', +flexDirection:"row", backgroundColor:variables.tabDefaultBg, flex:1, -alignItems:'center', -justifyContent:'center', -'.scrollable':{ +alignItems:"center", +justifyContent:"center", +".scrollable":{ paddingHorizontal:20, -flex:platform==='android'?0:1, -minWidth:platform==='android'?undefined:60}, +flex:platform==="android"?0:1, +minWidth:platform==="android"?undefined:60}, -'NativeBase.Text':{ +"NativeBase.Text":{ color:variables.topTabBarTextColor, marginHorizontal:7}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.topTabBarTextColor, -fontSize:platform==='ios'?26:undefined}, +fontSize:platform==="ios"?26:undefined}, -'.active':{ -'NativeBase.Text':{ +".active":{ +"NativeBase.Text":{ color:variables.topTabBarActiveTextColor, -fontWeight:'600'}, +fontWeight:"600"}, -'NativeBase.Icon':{ +"NativeBase.Icon":{ color:variables.topTabBarActiveTextColor}}}; - return tabHeadingTheme; }; //# sourceMappingURL=TabHeading.js.map \ No newline at end of file diff --git a/dist/src/theme/components/TabHeading.js.map b/dist/src/theme/components/TabHeading.js.map index 811639d11..180b6900b 100644 --- a/dist/src/theme/components/TabHeading.js.map +++ b/dist/src/theme/components/TabHeading.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/TabHeading.js"],"names":["variables","platform","tabHeadingTheme","flexDirection","backgroundColor","tabDefaultBg","flex","alignItems","justifyContent","paddingHorizontal","minWidth","undefined","color","topTabBarTextColor","marginHorizontal","fontSize","topTabBarActiveTextColor","fontWeight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,iBAAkB;AACtBC,cAAe,KADO;AAEtBC,gBAAiBJ,UAAUK,YAFL;AAGtBC,KAAM,CAHgB;AAItBC,WAAY,QAJU;AAKtBC,eAAgB,QALM;AAMtB,cAAe;AACbC,kBAAmB,EADN;AAEbH,KAAOL,WAAW,SAAZ,CAAyB,CAAzB,CAA6B,CAFtB;AAGbS,SAAWT,WAAW,SAAZ,CAAyBU,SAAzB,CAAqC,EAHlC,CANO;;AAWtB,kBAAmB;AACjBC,MAAOZ,UAAUa,kBADA;AAEjBC,iBAAkB,CAFD,CAXG;;AAetB,kBAAmB;AACjBF,MAAOZ,UAAUa,kBADA;AAEjBE,SAAWd,WAAW,KAAZ,CAAqB,EAArB,CAA0BU,SAFnB,CAfG;;AAmBtB,UAAW;AACT,kBAAmB;AACjBC,MAAOZ,UAAUgB,wBADA;AAEjBC,WAAY,KAFK,CADV;;AAKT,kBAAmB;AACjBL,MAAOZ,UAAUgB,wBADA,CALV,CAnBW,CAAxB;;;;;;AA+BA,MAAOd,gBAAP;AACD,C","file":"TabHeading.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const tabHeadingTheme = {\n flexDirection: 'row',\n backgroundColor: variables.tabDefaultBg,\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n '.scrollable': {\n paddingHorizontal: 20,\n flex: (platform==='android') ? 0 : 1,\n minWidth: (platform==='android') ? undefined : 60,\n },\n 'NativeBase.Text': {\n color: variables.topTabBarTextColor,\n marginHorizontal: 7\n },\n 'NativeBase.Icon': {\n color: variables.topTabBarTextColor,\n fontSize: (platform==='ios') ? 26 : undefined\n },\n '.active': {\n 'NativeBase.Text': {\n color: variables.topTabBarActiveTextColor,\n fontWeight: '600'\n },\n 'NativeBase.Icon': {\n color: variables.topTabBarActiveTextColor\n },\n }\n };\n\n\n return tabHeadingTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/TabHeading.js"],"names":["variables","platform","tabHeadingTheme","flexDirection","backgroundColor","tabDefaultBg","flex","alignItems","justifyContent","paddingHorizontal","minWidth","undefined","color","topTabBarTextColor","marginHorizontal","fontSize","topTabBarActiveTextColor","fontWeight"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,iBAAkB;AACtBC,cAAe,KADO;AAEtBC,gBAAiBJ,UAAUK,YAFL;AAGtBC,KAAM,CAHgB;AAItBC,WAAY,QAJU;AAKtBC,eAAgB,QALM;AAMtB,cAAe;AACbC,kBAAmB,EADN;AAEbH,KAAML,WAAa,SAAb,CAAyB,CAAzB,CAA6B,CAFtB;AAGbS,SAAUT,WAAa,SAAb,CAAyBU,SAAzB,CAAqC,EAHlC,CANO;;AAWtB,kBAAmB;AACjBC,MAAOZ,UAAUa,kBADA;AAEjBC,iBAAkB,CAFD,CAXG;;AAetB,kBAAmB;AACjBF,MAAOZ,UAAUa,kBADA;AAEjBE,SAAUd,WAAa,KAAb,CAAqB,EAArB,CAA0BU,SAFnB,CAfG;;AAmBtB,UAAW;AACT,kBAAmB;AACjBC,MAAOZ,UAAUgB,wBADA;AAEjBC,WAAY,KAFK,CADV;;AAKT,kBAAmB;AACjBL,MAAOZ,UAAUgB,wBADA,CALV,CAnBW,CAAxB;;;;;AA8BA,MAAOd,gBAAP;AACD,C","file":"TabHeading.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const tabHeadingTheme = {\n flexDirection: \"row\",\n backgroundColor: variables.tabDefaultBg,\n flex: 1,\n alignItems: \"center\",\n justifyContent: \"center\",\n \".scrollable\": {\n paddingHorizontal: 20,\n flex: platform === \"android\" ? 0 : 1,\n minWidth: platform === \"android\" ? undefined : 60\n },\n \"NativeBase.Text\": {\n color: variables.topTabBarTextColor,\n marginHorizontal: 7\n },\n \"NativeBase.Icon\": {\n color: variables.topTabBarTextColor,\n fontSize: platform === \"ios\" ? 26 : undefined\n },\n \".active\": {\n \"NativeBase.Text\": {\n color: variables.topTabBarActiveTextColor,\n fontWeight: \"600\"\n },\n \"NativeBase.Icon\": {\n color: variables.topTabBarActiveTextColor\n }\n }\n };\n\n return tabHeadingTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Text.js b/dist/src/theme/components/Text.js index a5dad6ab4..ac97ddc7f 100644 --- a/dist/src/theme/components/Text.js +++ b/dist/src/theme/components/Text.js @@ -1,12 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var textTheme={ fontSize:variables.DefaultFontSize-1, fontFamily:variables.fontFamily, color:variables.textColor, -'.note':{ -color:'#a7a7a7', +".note":{ +color:"#a7a7a7", fontSize:variables.noteFontSize}}; diff --git a/dist/src/theme/components/Text.js.map b/dist/src/theme/components/Text.js.map index de2137057..c37606913 100644 --- a/dist/src/theme/components/Text.js.map +++ b/dist/src/theme/components/Text.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Text.js"],"names":["variables","textTheme","fontSize","DefaultFontSize","fontFamily","color","textColor","noteFontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AACdC,SAAUF,UAAUG,eAAV,CAA4B,CADxB;AAEdC,WAAYJ,UAAUI,UAFR;AAGdC,MAAOL,UAAUM,SAHH;AAId,QAAS;AACPD,MAAO,SADA;AAEPH,SAAUF,UAAUO,YAFb,CAJK,CAAlB;;;;AAUA,MAAON,UAAP;AACD,C","file":"Text.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const textTheme = {\n fontSize: variables.DefaultFontSize - 1,\n fontFamily: variables.fontFamily,\n color: variables.textColor,\n '.note': {\n color: '#a7a7a7',\n fontSize: variables.noteFontSize\n }\n };\n\n return textTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Text.js"],"names":["variables","textTheme","fontSize","DefaultFontSize","fontFamily","color","textColor","noteFontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChBC,SAAUF,UAAUG,eAAV,CAA4B,CADtB;AAEhBC,WAAYJ,UAAUI,UAFN;AAGhBC,MAAOL,UAAUM,SAHD;AAIhB,QAAS;AACPD,MAAO,SADA;AAEPH,SAAUF,UAAUO,YAFb,CAJO,CAAlB;;;;AAUA,MAAON,UAAP;AACD,C","file":"Text.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const textTheme = {\n fontSize: variables.DefaultFontSize - 1,\n fontFamily: variables.fontFamily,\n color: variables.textColor,\n \".note\": {\n color: \"#a7a7a7\",\n fontSize: variables.noteFontSize\n }\n };\n\n return textTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Textarea.js b/dist/src/theme/components/Textarea.js index 5fefbfbd3..d1b2aee15 100644 --- a/dist/src/theme/components/Textarea.js +++ b/dist/src/theme/components/Textarea.js @@ -1,13 +1,13 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var textAreaTheme={ -'.underline':{ +".underline":{ borderBottomWidth:variables.borderWidth, marginTop:5, borderColor:variables.inputBorderColor}, -'.bordered':{ +".bordered":{ borderWidth:1, marginTop:5, borderColor:variables.inputBorderColor}, @@ -16,8 +16,7 @@ color:variables.textColor, paddingLeft:10, paddingRight:5, fontSize:15, -textAlignVertical:'top'}; - +textAlignVertical:"top"}; return textAreaTheme; diff --git a/dist/src/theme/components/Textarea.js.map b/dist/src/theme/components/Textarea.js.map index abfdab7e3..51637a678 100644 --- a/dist/src/theme/components/Textarea.js.map +++ b/dist/src/theme/components/Textarea.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Textarea.js"],"names":["variables","textAreaTheme","borderBottomWidth","borderWidth","marginTop","borderColor","inputBorderColor","color","textColor","paddingLeft","paddingRight","fontSize","textAlignVertical"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgB;AAClB,aAAc;AACZC,kBAAmBF,UAAUG,WADjB;AAEZC,UAAW,CAFC;AAGZC,YAAaL,UAAUM,gBAHX,CADI;;AAMlB,YAAa;AACXH,YAAa,CADF;AAEXC,UAAW,CAFA;AAGXC,YAAaL,UAAUM,gBAHZ,CANK;;AAWlBC,MAAOP,UAAUQ,SAXC;AAYlBC,YAAa,EAZK;AAalBC,aAAc,CAbI;AAclBC,SAAU,EAdQ;AAelBC,kBAAmB,KAfD,CAAtB;;;;AAmBA,MAAOX,cAAP;AACD,C","file":"Textarea.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const textAreaTheme = {\n '.underline': {\n borderBottomWidth: variables.borderWidth,\n marginTop: 5,\n borderColor: variables.inputBorderColor,\n },\n '.bordered': {\n borderWidth: 1,\n marginTop: 5,\n borderColor: variables.inputBorderColor,\n },\n color: variables.textColor,\n paddingLeft: 10,\n paddingRight: 5,\n fontSize: 15,\n textAlignVertical: 'top',\n };\n\n\n return textAreaTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Textarea.js"],"names":["variables","textAreaTheme","borderBottomWidth","borderWidth","marginTop","borderColor","inputBorderColor","color","textColor","paddingLeft","paddingRight","fontSize","textAlignVertical"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,eAAgB;AACpB,aAAc;AACZC,kBAAmBF,UAAUG,WADjB;AAEZC,UAAW,CAFC;AAGZC,YAAaL,UAAUM,gBAHX,CADM;;AAMpB,YAAa;AACXH,YAAa,CADF;AAEXC,UAAW,CAFA;AAGXC,YAAaL,UAAUM,gBAHZ,CANO;;AAWpBC,MAAOP,UAAUQ,SAXG;AAYpBC,YAAa,EAZO;AAapBC,aAAc,CAbM;AAcpBC,SAAU,EAdU;AAepBC,kBAAmB,KAfC,CAAtB;;;AAkBA,MAAOX,cAAP;AACD,C","file":"Textarea.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const textAreaTheme = {\n \".underline\": {\n borderBottomWidth: variables.borderWidth,\n marginTop: 5,\n borderColor: variables.inputBorderColor\n },\n \".bordered\": {\n borderWidth: 1,\n marginTop: 5,\n borderColor: variables.inputBorderColor\n },\n color: variables.textColor,\n paddingLeft: 10,\n paddingRight: 5,\n fontSize: 15,\n textAlignVertical: \"top\"\n };\n\n return textAreaTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Title.js b/dist/src/theme/components/Title.js index 8e21661cf..d8028938f 100644 --- a/dist/src/theme/components/Title.js +++ b/dist/src/theme/components/Title.js @@ -1,15 +1,14 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require('react-native'); +Object.defineProperty(exports,"__esModule",{value:true});var _reactNative=require("react-native"); -var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var titleTheme={ fontSize:variables.titleFontSize, fontFamily:variables.titleFontfamily, color:variables.titleFontColor, -fontWeight:_reactNative.Platform.OS==='ios'?'600':undefined, -textAlign:'center'}; - +fontWeight:_reactNative.Platform.OS==="ios"?"600":undefined, +textAlign:"center"}; return titleTheme; diff --git a/dist/src/theme/components/Title.js.map b/dist/src/theme/components/Title.js.map index 179a754ed..ba9b29657 100644 --- a/dist/src/theme/components/Title.js.map +++ b/dist/src/theme/components/Title.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Title.js"],"names":["variables","titleTheme","fontSize","titleFontSize","fontFamily","titleFontfamily","color","titleFontColor","fontWeight","OS","undefined","textAlign"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjBC,SAAUF,UAAUG,aADH;AAEjBC,WAAYJ,UAAUK,eAFL;AAGjBC,MAAON,UAAUO,cAHA;AAIjBC,WAAa,sBAASC,EAAT,GAAc,KAAf,CAAwB,KAAxB,CAAgCC,SAJ3B;AAKjBC,UAAW,QALM,CAAnB;;;;AASA,MAAOV,WAAP;AACD,C","file":"Title.js","sourcesContent":["import { Platform } from 'react-native';\n\nimport variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const titleTheme = {\n fontSize: variables.titleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.titleFontColor,\n fontWeight: (Platform.OS==='ios') ? '600' : undefined,\n textAlign: 'center'\n };\n\n\n return titleTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Title.js"],"names":["variables","titleTheme","fontSize","titleFontSize","fontFamily","titleFontfamily","color","titleFontColor","fontWeight","OS","undefined","textAlign"],"mappings":"yDAAA;;AAEA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,YAAa;AACjBC,SAAUF,UAAUG,aADH;AAEjBC,WAAYJ,UAAUK,eAFL;AAGjBC,MAAON,UAAUO,cAHA;AAIjBC,WAAY,sBAASC,EAAT,GAAgB,KAAhB,CAAwB,KAAxB,CAAgCC,SAJ3B;AAKjBC,UAAW,QALM,CAAnB;;;AAQA,MAAOV,WAAP;AACD,C","file":"Title.js","sourcesContent":["import { Platform } from \"react-native\";\n\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const titleTheme = {\n fontSize: variables.titleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.titleFontColor,\n fontWeight: Platform.OS === \"ios\" ? \"600\" : undefined,\n textAlign: \"center\"\n };\n\n return titleTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/Toast.js b/dist/src/theme/components/Toast.js index 11f0c0b9e..835ab3eb4 100644 --- a/dist/src/theme/components/Toast.js +++ b/dist/src/theme/components/Toast.js @@ -1,40 +1,39 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var platform=variables.platform; var toastTheme={ -'.danger':{ +".danger":{ backgroundColor:variables.brandDanger}, -'.warning':{ +".warning":{ backgroundColor:variables.brandWarning}, -'.success':{ +".success":{ backgroundColor:variables.brandSuccess}, -backgroundColor:'rgba(0,0,0,0.8)', -borderRadius:platform==='ios'?5:0, -flexDirection:'row', -justifyContent:'space-between', -alignItems:'center', +backgroundColor:"rgba(0,0,0,0.8)", +borderRadius:platform==="ios"?5:0, +flexDirection:"row", +justifyContent:"space-between", +alignItems:"center", padding:10, minHeight:50, -'NativeBase.Text':{ -color:'#fff', +"NativeBase.Text":{ +color:"#fff", flex:1}, -'NativeBase.Button':{ -backgroundColor:'transparent', +"NativeBase.Button":{ +backgroundColor:"transparent", height:30, elevation:0, -'NativeBase.Text':{ +"NativeBase.Text":{ fontSize:14}}}; - return toastTheme; }; //# sourceMappingURL=Toast.js.map \ No newline at end of file diff --git a/dist/src/theme/components/Toast.js.map b/dist/src/theme/components/Toast.js.map index 7051e56cf..25325989f 100644 --- a/dist/src/theme/components/Toast.js.map +++ b/dist/src/theme/components/Toast.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/Toast.js"],"names":["variables","platform","toastTheme","backgroundColor","brandDanger","brandWarning","brandSuccess","borderRadius","flexDirection","justifyContent","alignItems","padding","minHeight","color","flex","height","elevation","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,YAAa;AACjB,UAAW;AACTC,gBAAiBH,UAAUI,WADlB,CADM;;AAIjB,WAAY;AACVD,gBAAiBH,UAAUK,YADjB,CAJK;;AAOjB,WAAY;AACVF,gBAAiBH,UAAUM,YADjB,CAPK;;AAUjBH,gBAAiB,iBAVA;AAWjBI,aAAeN,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CAXxB;AAYjBO,cAAe,KAZE;AAajBC,eAAgB,eAbC;AAcjBC,WAAY,QAdK;AAejBC,QAAS,EAfQ;AAgBjBC,UAAW,EAhBM;AAiBjB,kBAAmB;AACjBC,MAAO,MADU;AAEjBC,KAAM,CAFW,CAjBF;;AAqBjB,oBAAqB;AACnBX,gBAAiB,aADE;AAEnBY,OAAQ,EAFW;AAGnBC,UAAW,CAHQ;AAInB,kBAAmB;AACjBC,SAAU,EADO,CAJA,CArBJ,CAAnB;;;;;;AAgCA,MAAOf,WAAP;AACD,C","file":"Toast.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const toastTheme = {\n '.danger': {\n backgroundColor: variables.brandDanger\n },\n '.warning': {\n backgroundColor: variables.brandWarning\n },\n '.success': {\n backgroundColor: variables.brandSuccess\n },\n backgroundColor: 'rgba(0,0,0,0.8)',\n borderRadius: (platform === 'ios') ? 5 : 0,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 10,\n minHeight: 50,\n 'NativeBase.Text': {\n color: '#fff',\n flex: 1,\n },\n 'NativeBase.Button': {\n backgroundColor: 'transparent',\n height: 30,\n elevation: 0,\n 'NativeBase.Text': {\n fontSize: 14\n }\n }\n };\n\n\n return toastTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/Toast.js"],"names":["variables","platform","toastTheme","backgroundColor","brandDanger","brandWarning","brandSuccess","borderRadius","flexDirection","justifyContent","alignItems","padding","minHeight","color","flex","height","elevation","fontSize"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,UAAWD,UAAUC,QAA3B;;AAEA,GAAMC,YAAa;AACjB,UAAW;AACTC,gBAAiBH,UAAUI,WADlB,CADM;;AAIjB,WAAY;AACVD,gBAAiBH,UAAUK,YADjB,CAJK;;AAOjB,WAAY;AACVF,gBAAiBH,UAAUM,YADjB,CAPK;;AAUjBH,gBAAiB,iBAVA;AAWjBI,aAAcN,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAXtB;AAYjBO,cAAe,KAZE;AAajBC,eAAgB,eAbC;AAcjBC,WAAY,QAdK;AAejBC,QAAS,EAfQ;AAgBjBC,UAAW,EAhBM;AAiBjB,kBAAmB;AACjBC,MAAO,MADU;AAEjBC,KAAM,CAFW,CAjBF;;AAqBjB,oBAAqB;AACnBX,gBAAiB,aADE;AAEnBY,OAAQ,EAFW;AAGnBC,UAAW,CAHQ;AAInB,kBAAmB;AACjBC,SAAU,EADO,CAJA,CArBJ,CAAnB;;;;;AA+BA,MAAOf,WAAP;AACD,C","file":"Toast.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const platform = variables.platform;\n\n const toastTheme = {\n \".danger\": {\n backgroundColor: variables.brandDanger\n },\n \".warning\": {\n backgroundColor: variables.brandWarning\n },\n \".success\": {\n backgroundColor: variables.brandSuccess\n },\n backgroundColor: \"rgba(0,0,0,0.8)\",\n borderRadius: platform === \"ios\" ? 5 : 0,\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n padding: 10,\n minHeight: 50,\n \"NativeBase.Text\": {\n color: \"#fff\",\n flex: 1\n },\n \"NativeBase.Button\": {\n backgroundColor: \"transparent\",\n height: 30,\n elevation: 0,\n \"NativeBase.Text\": {\n fontSize: 14\n }\n }\n };\n\n return toastTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/View.js b/dist/src/theme/components/View.js index 5b4270b57..798836edf 100644 --- a/dist/src/theme/components/View.js +++ b/dist/src/theme/components/View.js @@ -1,13 +1,12 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _platform=require('./../variables/platform');var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= +Object.defineProperty(exports,"__esModule",{value:true});var _platform=require("./../variables/platform");var _platform2=_interopRequireDefault(_platform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default= function(){var variables=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var viewTheme={ -'.padder':{ +".padder":{ padding:variables.contentPadding}}; - return viewTheme; }; //# sourceMappingURL=View.js.map \ No newline at end of file diff --git a/dist/src/theme/components/View.js.map b/dist/src/theme/components/View.js.map index 16567550d..50c22a3ef 100644 --- a/dist/src/theme/components/View.js.map +++ b/dist/src/theme/components/View.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/View.js"],"names":["variables","viewTheme","padding","contentPadding"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AACd,UAAW;AACTC,QAASF,UAAUG,cADV,CADG,CAAlB;;;;;AAOA,MAAOF,UAAP;AACD,C","file":"View.js","sourcesContent":["import variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const viewTheme = {\n '.padder': {\n padding: variables.contentPadding,\n },\n };\n\n\n return viewTheme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/View.js"],"names":["variables","viewTheme","padding","contentPadding"],"mappings":"yDAAA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,WAAY;AAChB,UAAW;AACTC,QAASF,UAAUG,cADV,CADK,CAAlB;;;;AAMA,MAAOF,UAAP;AACD,C","file":"View.js","sourcesContent":["import variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const viewTheme = {\n \".padder\": {\n padding: variables.contentPadding\n }\n };\n\n return viewTheme;\n};\n"]} \ No newline at end of file diff --git a/dist/src/theme/components/index.js b/dist/src/theme/components/index.js index d71dc4fd0..8ad826246 100644 --- a/dist/src/theme/components/index.js +++ b/dist/src/theme/components/index.js @@ -1,269 +1,267 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i0&&arguments[0]!==undefined?arguments[0]:_platform2.default; var theme={ variables:variables, -'NativeBase.Left':{ +"NativeBase.Left":{ flex:1, -alignSelf:'center', -alignItems:'flex-start'}, +alignSelf:"center", +alignItems:"flex-start"}, -'NativeBase.Right':{ -'NativeBase.Button':{ +"NativeBase.Right":{ +"NativeBase.Button":{ alignSelf:null}, flex:1, -alignSelf:'center', -alignItems:'flex-end'}, +alignSelf:"center", +alignItems:"flex-end"}, -'NativeBase.Body':{ +"NativeBase.Body":{ flex:1, -alignItems:'center', -alignSelf:'center'}, +alignItems:"center", +alignSelf:"center"}, -'NativeBase.Header':_extends({}, +"NativeBase.Header":_extends({}, (0,_Header2.default)(variables)), -'NativeBase.Button':_extends({}, +"NativeBase.Button":_extends({}, (0,_Button2.default)(variables)), -'NativeBase.Title':_extends({}, +"NativeBase.Title":_extends({}, (0,_Title2.default)(variables)), -'NativeBase.Subtitle':{ +"NativeBase.Subtitle":{ fontSize:variables.subTitleFontSize, fontFamily:variables.titleFontfamily, color:variables.subtitleColor, -textAlign:'center'}, +textAlign:"center"}, -'NativeBase.InputGroup':_extends({}, +"NativeBase.InputGroup":_extends({}, (0,_InputGroup2.default)(variables)), -'NativeBase.Input':_extends({}, +"NativeBase.Input":_extends({}, (0,_Input2.default)(variables)), -'NativeBase.Badge':_extends({}, +"NativeBase.Badge":_extends({}, (0,_Badge2.default)(variables)), -'NativeBase.CheckBox':_extends({}, +"NativeBase.CheckBox":_extends({}, (0,_CheckBox2.default)(variables)), -'NativeBase.Radio':_extends({}, +"NativeBase.Radio":_extends({}, (0,_Radio2.default)(variables)), -'NativeBase.Card':_extends({}, +"NativeBase.Card":_extends({}, (0,_Card2.default)()), -'NativeBase.CardItem':_extends({}, +"NativeBase.CardItem":_extends({}, (0,_CardItem2.default)(variables),{ -'.cardBody':{ +".cardBody":{ padding:-5, -'NativeBase.Text':{ +"NativeBase.Text":{ marginTop:5}}, -flexDirection:'row', -alignItems:'center'}), +flexDirection:"row", +alignItems:"center"}), -'NativeBase.CardItem1':_extends({}, +"NativeBase.CardItem1":_extends({}, (0,_CardItem2.default)(variables)), -'NativeBase.Toast':_extends({}, +"NativeBase.Toast":_extends({}, (0,_Toast2.default)(variables)), -'NativeBase.H1':_extends({}, +"NativeBase.H1":_extends({}, (0,_H6.default)(variables)), -'NativeBase.H2':_extends({}, +"NativeBase.H2":_extends({}, (0,_H4.default)(variables)), -'NativeBase.H3':_extends({}, +"NativeBase.H3":_extends({}, (0,_H2.default)(variables)), -'NativeBase.Form':_extends({}, +"NativeBase.Form":_extends({}, (0,_Form2.default)(variables)), -'NativeBase.Container':_extends({}, +"NativeBase.Container":_extends({}, (0,_Container2.default)(variables)), -'NativeBase.Content':_extends({}, +"NativeBase.Content":_extends({}, (0,_Content2.default)(variables)), - -'NativeBase.Footer':_extends({}, +"NativeBase.Footer":_extends({}, (0,_Footer2.default)(variables)), -'NativeBase.Tabs':{ +"NativeBase.Tabs":{ flex:1}, -'NativeBase.FooterTab':_extends({}, +"NativeBase.FooterTab":_extends({}, (0,_FooterTab2.default)(variables)), -'NativeBase.ListItem':_extends({}, +"NativeBase.ListItem":_extends({}, (0,_ListItem2.default)(variables),{ -'NativeBase.CheckBox':{ +"NativeBase.CheckBox":{ marginLeft:-10, marginRight:10}, -'NativeBase.Text':{ -'.note':{ +"NativeBase.Text":{ +".note":{ color:variables.listNoteColor, -fontWeight:'200'}, +fontWeight:"200"}, -alignSelf:'center'}}), +alignSelf:"center"}}), -'NativeBase.ListItem1':_extends({}, +"NativeBase.ListItem1":_extends({}, (0,_ListItem2.default)(variables)), -'NativeBase.Icon':_extends({}, +"NativeBase.Icon":_extends({}, (0,_Icon2.default)(variables)), -'NativeBase.IconNB':_extends({}, +"NativeBase.IconNB":_extends({}, (0,_Icon2.default)(variables)), -'NativeBase.Text':_extends({}, +"NativeBase.Text":_extends({}, (0,_Text2.default)(variables)), -'NativeBase.Spinner':_extends({}, +"NativeBase.Spinner":_extends({}, (0,_Spinner2.default)(variables)), -'NativeBase.Fab':_extends({}, +"NativeBase.Fab":_extends({}, (0,_Fab2.default)(variables)), -'NativeBase.Item':_extends({}, +"NativeBase.Item":_extends({}, (0,_Item2.default)(variables)), -'NativeBase.Label':_extends({}, +"NativeBase.Label":_extends({}, (0,_Label2.default)(variables)), -'NativeBase.Textarea':_extends({}, +"NativeBase.Textarea":_extends({}, (0,_Textarea2.default)(variables)), -'NativeBase.PickerNB':{ -'NativeBase.Button':{ -'NativeBase.Text':{}}}, - +"NativeBase.PickerNB":{ +"NativeBase.Button":{ +"NativeBase.Text":{}}}, -'NativeBase.Tab':_extends({}, +"NativeBase.Tab":_extends({}, (0,_Tab2.default)(variables)), -'NativeBase.Segment':_extends({}, +"NativeBase.Segment":_extends({}, (0,_Segment2.default)(variables)), -'NativeBase.STabs':{ +"NativeBase.STabs":{ flex:1}, -'NativeBase.TabBar':_extends({}, +"NativeBase.TabBar":_extends({}, (0,_TabBar2.default)(variables)), -'NativeBase.ViewNB':_extends({}, +"NativeBase.ViewNB":_extends({}, (0,_View2.default)(variables)), -'NativeBase.TabHeading':_extends({}, +"NativeBase.TabHeading":_extends({}, (0,_TabHeading2.default)(variables)), -'NativeBase.TabContainer':_extends({}, +"NativeBase.TabContainer":_extends({}, (0,_TabContainer2.default)(variables)), -'NativeBase.Switch':{ +"NativeBase.Switch":{ marginVertical:-5}, -'NativeBase.Separator':_extends({}, +"NativeBase.Separator":_extends({}, (0,_Separator2.default)(variables)), -'NativeBase.Thumbnail':{ -'.square':{ +"NativeBase.Thumbnail":{ +".square":{ borderRadius:0, -'.small':{ +".small":{ width:36, height:36, borderRadius:0}, -'.large':{ +".large":{ width:80, height:80, borderRadius:0}}, -'.small':{ +".small":{ width:36, height:36, borderRadius:18, -'.square':{ +".square":{ borderRadius:0}}, -'.large':{ +".large":{ width:80, height:80, borderRadius:40, -'.square':{ +".square":{ borderRadius:0}}, @@ -273,12 +271,15 @@ borderRadius:28}}; - var cssifyTheme=function cssifyTheme(grandparent,parent,parentKey){ _lodash2.default.forEach(parent,function(style,styleName){ -if(styleName.indexOf('.')===0&&parentKey&&parentKey.indexOf('.')===0){ +if( +styleName.indexOf(".")===0&& +parentKey&& +parentKey.indexOf(".")===0) +{ if(grandparent){ if(!grandparent[styleName]){ grandparent[styleName]={}; @@ -287,7 +288,7 @@ grandparent[styleName][parentKey]=style; } } } -if(style&&typeof style==='object'){ +if(style&&typeof style==="object"){ cssifyTheme(parent,style,styleName); } }); diff --git a/dist/src/theme/components/index.js.map b/dist/src/theme/components/index.js.map index 73e0cfffd..b335e8401 100644 --- a/dist/src/theme/components/index.js.map +++ b/dist/src/theme/components/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../src/theme/components/index.js"],"names":["variables","theme","flex","alignSelf","alignItems","fontSize","subTitleFontSize","fontFamily","titleFontfamily","color","subtitleColor","textAlign","padding","marginTop","flexDirection","marginLeft","marginRight","listNoteColor","fontWeight","marginVertical","borderRadius","width","height","cssifyTheme","grandparent","parent","parentKey","forEach","style","styleName","indexOf"],"mappings":"yRAAA,8B;AACA,gC;AACA,sC;AACA,kC;AACA,gC;AACA,8B;AACA,wC;AACA,8B;AACA,oC;AACA,4B;AACA,8B;AACA,uB;AACA,wB;AACA,wB;AACA,gC;AACA,sC;AACA,0B;AACA,4B;AACA,8B;AACA,oC;AACA,4B;AACA,8B;AACA,0B;AACA,gC;AACA,4C;AACA,4B;AACA,wC;AACA,4B;AACA,8B;AACA,kC;AACA,kC;AACA,oC;AACA,oC;AACA,4B;AACA,sC;AACA,iD;;AAEe,UAA0B,IAAzBA,UAAyB;AACvC,GAAMC,OAAQ;AACZD,mBADY;AAEZ,kBAAmB;AACjBE,KAAM,CADW;AAEjBC,UAAW,QAFM;AAGjBC,WAAY,YAHK,CAFP;;AAOZ,mBAAoB;AAClB,oBAAqB;AACnBD,UAAW,IADQ,CADH;;AAIlBD,KAAM,CAJY;AAKlBC,UAAW,QALO;AAMlBC,WAAY,UANM,CAPR;;AAeZ,kBAAmB;AACjBF,KAAM,CADW;AAEjBE,WAAY,QAFK;AAGjBD,UAAW,QAHM,CAfP;;;AAqBZ;AACK,qBAAYH,SAAZ,CADL,CArBY;;;AAyBZ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C,OAAQ,EAFA;AAGRF,aAAc,EAHN;AAIR,UAAW;AACTA,aAAc,CADL,CAJH,CAtBY;;;AA8BtBC,MAAO,EA9Be;AA+BtBC,OAAQ,EA/Bc;AAgCtBF,aAAc,EAhCQ,CAzMZ,CAAd;;;;;AA8OA,GAAMG,aAAc,QAAdA,YAAc,CAACC,WAAD,CAAcC,MAAd,CAAsBC,SAAtB,CAAoC;AACtD,iBAAEC,OAAF,CAAUF,MAAV,CAAkB,SAACG,KAAD,CAAQC,SAAR,CAAsB;;;AAGtC,GAAIA,UAAUC,OAAV,CAAkB,GAAlB,IAA2B,CAA3B,EAAgCJ,SAAhC,EAA6CA,UAAUI,OAAV,CAAkB,GAAlB,IAA2B,CAA5E,CAA+E;AAC7E,GAAIN,WAAJ,CAAiB;AACf,GAAI,CAACA,YAAYK,SAAZ,CAAL,CAA6B;AAC3BL,YAAYK,SAAZ,EAAyB,EAAzB;AACD,CAFD,IAEO;AACLL,YAAYK,SAAZ,EAAuBH,SAAvB,EAAoCE,KAApC;AACD;AACF;AACF;AACD,GAAIA,OAAS,MAAOA,MAAP,GAAiB,QAA9B,CAAwC;AACtCL,YAAYE,MAAZ,CAAoBG,KAApB,CAA2BC,SAA3B;AACD;AACF,CAfD;AAgBD,CAjBD;;AAmBAN,YAAY,IAAZ,CAAkBtB,KAAlB,CAAyB,IAAzB;;AAEA,MAAOA,MAAP;AACD,C","file":"index.js","sourcesContent":["import _ from 'lodash';\nimport headerTheme from './Header';\nimport containerTheme from './Container'\nimport contentTheme from './Content';\nimport buttonTheme from './Button';\nimport titleTheme from './Title';\nimport inputGroupTheme from './InputGroup';\nimport badgeTheme from './Badge';\nimport checkBoxTheme from './CheckBox';\nimport cardTheme from './Card';\nimport radioTheme from './Radio';\nimport h3Theme from './H3';\nimport h2Theme from './H2';\nimport h1Theme from './H1';\nimport footerTheme from './Footer';\nimport footerTabTheme from './FooterTab';\nimport fabTheme from './Fab';\nimport itemTheme from './Item';\nimport labelTheme from './Label';\nimport textAreaTheme from './Textarea';\nimport textTheme from './Text';\nimport toastTheme from './Toast';\nimport tabTheme from './Tab';\nimport tabBarTheme from './TabBar';\nimport tabContainerTheme from './TabContainer';\nimport viewTheme from './View';\nimport tabHeadingTheme from './TabHeading';\nimport iconTheme from './Icon';\nimport inputTheme from './Input';\nimport segmentTheme from './Segment';\nimport spinnerTheme from './Spinner';\nimport cardItemTheme from './CardItem';\nimport listItemTheme from './ListItem';\nimport formTheme from './Form';\nimport separatorTheme from './Separator';\nimport variable from './../variables/platform';\n\nexport default (variables = variable) => {\n const theme = {\n variables,\n 'NativeBase.Left': {\n flex: 1,\n alignSelf: 'center',\n alignItems: 'flex-start',\n },\n 'NativeBase.Right': {\n 'NativeBase.Button': {\n alignSelf: null,\n },\n flex: 1,\n alignSelf: 'center',\n alignItems: 'flex-end',\n },\n 'NativeBase.Body': {\n flex: 1,\n alignItems: 'center',\n alignSelf: 'center',\n },\n\n 'NativeBase.Header': {\n ...headerTheme(variables),\n },\n\n 'NativeBase.Button': {\n ...buttonTheme(variables),\n },\n\n 'NativeBase.Title': {\n ...titleTheme(variables),\n },\n 'NativeBase.Subtitle': {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: 'center',\n },\n\n 'NativeBase.InputGroup': {\n ...inputGroupTheme(variables),\n },\n\n 'NativeBase.Input': {\n ...inputTheme(variables),\n },\n\n 'NativeBase.Badge': {\n ...badgeTheme(variables),\n },\n\n 'NativeBase.CheckBox': {\n ...checkBoxTheme(variables),\n },\n\n 'NativeBase.Radio': {\n ...radioTheme(variables),\n },\n\n 'NativeBase.Card': {\n ...cardTheme(),\n },\n\n 'NativeBase.CardItem': {\n ...cardItemTheme(variables),\n '.cardBody': {\n padding: -5,\n 'NativeBase.Text': {\n marginTop: 5,\n },\n },\n flexDirection: 'row',\n alignItems: 'center',\n },\n\n 'NativeBase.CardItem1': {\n ...cardItemTheme(variables),\n },\n\n 'NativeBase.Toast': {\n ...toastTheme(variables),\n },\n\n 'NativeBase.H1': {\n ...h1Theme(variables),\n },\n 'NativeBase.H2': {\n ...h2Theme(variables),\n },\n 'NativeBase.H3': {\n ...h3Theme(variables),\n },\n 'NativeBase.Form': {\n ...formTheme(variables),\n },\n\n 'NativeBase.Container': {\n ...containerTheme(variables),\n },\n 'NativeBase.Content': {\n ...contentTheme(variables),\n },\n\n\n 'NativeBase.Footer': {\n ...footerTheme(variables),\n },\n\n 'NativeBase.Tabs': {\n flex: 1,\n },\n\n 'NativeBase.FooterTab': {\n ...footerTabTheme(variables),\n },\n\n 'NativeBase.ListItem': {\n ...listItemTheme(variables),\n 'NativeBase.CheckBox': {\n marginLeft: -10,\n marginRight: 10,\n },\n 'NativeBase.Text': {\n '.note': {\n color: variables.listNoteColor,\n fontWeight: '200',\n },\n alignSelf: 'center',\n },\n },\n\n 'NativeBase.ListItem1': {\n ...listItemTheme(variables),\n },\n\n 'NativeBase.Icon': {\n ...iconTheme(variables),\n },\n 'NativeBase.IconNB': {\n ...iconTheme(variables),\n },\n 'NativeBase.Text': {\n ...textTheme(variables),\n },\n 'NativeBase.Spinner': {\n ...spinnerTheme(variables),\n },\n\n 'NativeBase.Fab': {\n ...fabTheme(variables),\n },\n\n 'NativeBase.Item': {\n ...itemTheme(variables),\n },\n\n 'NativeBase.Label': {\n ...labelTheme(variables),\n },\n\n 'NativeBase.Textarea': {\n ...textAreaTheme(variables),\n },\n\n 'NativeBase.PickerNB': {\n 'NativeBase.Button': {\n 'NativeBase.Text': {\n },\n },\n },\n\n 'NativeBase.Tab': {\n ...tabTheme(variables),\n },\n\n 'NativeBase.Segment': {\n ...segmentTheme(variables),\n },\n\n 'NativeBase.STabs': {\n flex: 1,\n },\n\n 'NativeBase.TabBar': {\n ...tabBarTheme(variables),\n },\n 'NativeBase.ViewNB': {\n ...viewTheme(variables),\n },\n 'NativeBase.TabHeading': {\n ...tabHeadingTheme(variables),\n },\n 'NativeBase.TabContainer': {\n ...tabContainerTheme(variables),\n },\n 'NativeBase.Switch': {\n marginVertical: -5,\n },\n 'NativeBase.Separator': {\n ...separatorTheme(variables),\n },\n 'NativeBase.Thumbnail': {\n '.square': {\n borderRadius: 0,\n '.small': {\n width: 36,\n height: 36,\n borderRadius: 0,\n },\n '.large': {\n width: 80,\n height: 80,\n borderRadius: 0,\n },\n },\n '.small': {\n width: 36,\n height: 36,\n borderRadius: 18,\n '.square': {\n borderRadius: 0,\n },\n },\n '.large': {\n width: 80,\n height: 80,\n borderRadius: 40,\n '.square': {\n borderRadius: 0,\n },\n },\n width: 56,\n height: 56,\n borderRadius: 28,\n },\n\n };\n\n const cssifyTheme = (grandparent, parent, parentKey) => {\n _.forEach(parent, (style, styleName) => {\n // console.log('styleName', styleName);\n // console.log('parentKey', parentKey);\n if (styleName.indexOf('.') === 0 && parentKey && parentKey.indexOf('.') === 0) {\n if (grandparent) {\n if (!grandparent[styleName]) {\n grandparent[styleName] = {};\n } else {\n grandparent[styleName][parentKey] = style;\n }\n }\n }\n if (style && typeof style === 'object') {\n cssifyTheme(parent, style, styleName);\n }\n });\n };\n\n cssifyTheme(null, theme, null);\n\n return theme;\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/components/index.js"],"names":["variables","theme","flex","alignSelf","alignItems","fontSize","subTitleFontSize","fontFamily","titleFontfamily","color","subtitleColor","textAlign","padding","marginTop","flexDirection","marginLeft","marginRight","listNoteColor","fontWeight","marginVertical","borderRadius","width","height","cssifyTheme","grandparent","parent","parentKey","forEach","style","styleName","indexOf"],"mappings":"yRAAA,8B;AACA,gC;AACA,sC;AACA,kC;AACA,gC;AACA,8B;AACA,wC;AACA,8B;AACA,oC;AACA,4B;AACA,8B;AACA,uB;AACA,wB;AACA,wB;AACA,gC;AACA,sC;AACA,0B;AACA,4B;AACA,8B;AACA,oC;AACA,4B;AACA,8B;AACA,0B;AACA,gC;AACA,4C;AACA,4B;AACA,wC;AACA,4B;AACA,8B;AACA,kC;AACA,kC;AACA,oC;AAC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B,KAAlB,CAAyB,IAAzB;;AAEA,MAAOA,MAAP;AACD,C","file":"index.js","sourcesContent":["import _ from \"lodash\";\nimport headerTheme from \"./Header\";\nimport containerTheme from \"./Container\";\nimport contentTheme from \"./Content\";\nimport buttonTheme from \"./Button\";\nimport titleTheme from \"./Title\";\nimport inputGroupTheme from \"./InputGroup\";\nimport badgeTheme from \"./Badge\";\nimport checkBoxTheme from \"./CheckBox\";\nimport cardTheme from \"./Card\";\nimport radioTheme from \"./Radio\";\nimport h3Theme from \"./H3\";\nimport h2Theme from \"./H2\";\nimport h1Theme from \"./H1\";\nimport footerTheme from \"./Footer\";\nimport footerTabTheme from \"./FooterTab\";\nimport fabTheme from \"./Fab\";\nimport itemTheme from \"./Item\";\nimport labelTheme from \"./Label\";\nimport textAreaTheme from \"./Textarea\";\nimport textTheme from \"./Text\";\nimport toastTheme from \"./Toast\";\nimport tabTheme from \"./Tab\";\nimport tabBarTheme from \"./TabBar\";\nimport tabContainerTheme from \"./TabContainer\";\nimport viewTheme from \"./View\";\nimport tabHeadingTheme from \"./TabHeading\";\nimport iconTheme from \"./Icon\";\nimport inputTheme from \"./Input\";\nimport segmentTheme from \"./Segment\";\nimport spinnerTheme from \"./Spinner\";\nimport cardItemTheme from \"./CardItem\";\nimport listItemTheme from \"./ListItem\";\nimport formTheme from \"./Form\";\nimport separatorTheme from \"./Separator\";\nimport variable from \"./../variables/platform\";\n\nexport default (variables = variable) => {\n const theme = {\n variables,\n \"NativeBase.Left\": {\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-start\"\n },\n \"NativeBase.Right\": {\n \"NativeBase.Button\": {\n alignSelf: null\n },\n flex: 1,\n alignSelf: \"center\",\n alignItems: \"flex-end\"\n },\n \"NativeBase.Body\": {\n flex: 1,\n alignItems: \"center\",\n alignSelf: \"center\"\n },\n\n \"NativeBase.Header\": {\n ...headerTheme(variables)\n },\n\n \"NativeBase.Button\": {\n ...buttonTheme(variables)\n },\n\n \"NativeBase.Title\": {\n ...titleTheme(variables)\n },\n \"NativeBase.Subtitle\": {\n fontSize: variables.subTitleFontSize,\n fontFamily: variables.titleFontfamily,\n color: variables.subtitleColor,\n textAlign: \"center\"\n },\n\n \"NativeBase.InputGroup\": {\n ...inputGroupTheme(variables)\n },\n\n \"NativeBase.Input\": {\n ...inputTheme(variables)\n },\n\n \"NativeBase.Badge\": {\n ...badgeTheme(variables)\n },\n\n \"NativeBase.CheckBox\": {\n ...checkBoxTheme(variables)\n },\n\n \"NativeBase.Radio\": {\n ...radioTheme(variables)\n },\n\n \"NativeBase.Card\": {\n ...cardTheme()\n },\n\n \"NativeBase.CardItem\": {\n ...cardItemTheme(variables),\n \".cardBody\": {\n padding: -5,\n \"NativeBase.Text\": {\n marginTop: 5\n }\n },\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n\n \"NativeBase.CardItem1\": {\n ...cardItemTheme(variables)\n },\n\n \"NativeBase.Toast\": {\n ...toastTheme(variables)\n },\n\n \"NativeBase.H1\": {\n ...h1Theme(variables)\n },\n \"NativeBase.H2\": {\n ...h2Theme(variables)\n },\n \"NativeBase.H3\": {\n ...h3Theme(variables)\n },\n \"NativeBase.Form\": {\n ...formTheme(variables)\n },\n\n \"NativeBase.Container\": {\n ...containerTheme(variables)\n },\n \"NativeBase.Content\": {\n ...contentTheme(variables)\n },\n\n \"NativeBase.Footer\": {\n ...footerTheme(variables)\n },\n\n \"NativeBase.Tabs\": {\n flex: 1\n },\n\n \"NativeBase.FooterTab\": {\n ...footerTabTheme(variables)\n },\n\n \"NativeBase.ListItem\": {\n ...listItemTheme(variables),\n \"NativeBase.CheckBox\": {\n marginLeft: -10,\n marginRight: 10\n },\n \"NativeBase.Text\": {\n \".note\": {\n color: variables.listNoteColor,\n fontWeight: \"200\"\n },\n alignSelf: \"center\"\n }\n },\n\n \"NativeBase.ListItem1\": {\n ...listItemTheme(variables)\n },\n\n \"NativeBase.Icon\": {\n ...iconTheme(variables)\n },\n \"NativeBase.IconNB\": {\n ...iconTheme(variables)\n },\n \"NativeBase.Text\": {\n ...textTheme(variables)\n },\n \"NativeBase.Spinner\": {\n ...spinnerTheme(variables)\n },\n\n \"NativeBase.Fab\": {\n ...fabTheme(variables)\n },\n\n \"NativeBase.Item\": {\n ...itemTheme(variables)\n },\n\n \"NativeBase.Label\": {\n ...labelTheme(variables)\n },\n\n \"NativeBase.Textarea\": {\n ...textAreaTheme(variables)\n },\n\n \"NativeBase.PickerNB\": {\n \"NativeBase.Button\": {\n \"NativeBase.Text\": {}\n }\n },\n\n \"NativeBase.Tab\": {\n ...tabTheme(variables)\n },\n\n \"NativeBase.Segment\": {\n ...segmentTheme(variables)\n },\n\n \"NativeBase.STabs\": {\n flex: 1\n },\n\n \"NativeBase.TabBar\": {\n ...tabBarTheme(variables)\n },\n \"NativeBase.ViewNB\": {\n ...viewTheme(variables)\n },\n \"NativeBase.TabHeading\": {\n ...tabHeadingTheme(variables)\n },\n \"NativeBase.TabContainer\": {\n ...tabContainerTheme(variables)\n },\n \"NativeBase.Switch\": {\n marginVertical: -5\n },\n \"NativeBase.Separator\": {\n ...separatorTheme(variables)\n },\n \"NativeBase.Thumbnail\": {\n \".square\": {\n borderRadius: 0,\n \".small\": {\n width: 36,\n height: 36,\n borderRadius: 0\n },\n \".large\": {\n width: 80,\n height: 80,\n borderRadius: 0\n }\n },\n \".small\": {\n width: 36,\n height: 36,\n borderRadius: 18,\n \".square\": {\n borderRadius: 0\n }\n },\n \".large\": {\n width: 80,\n height: 80,\n borderRadius: 40,\n \".square\": {\n borderRadius: 0\n }\n },\n width: 56,\n height: 56,\n borderRadius: 28\n }\n };\n\n const cssifyTheme = (grandparent, parent, parentKey) => {\n _.forEach(parent, (style, styleName) => {\n // console.log('styleName', styleName);\n // console.log('parentKey', parentKey);\n if (\n styleName.indexOf(\".\") === 0 &&\n parentKey &&\n parentKey.indexOf(\".\") === 0\n ) {\n if (grandparent) {\n if (!grandparent[styleName]) {\n grandparent[styleName] = {};\n } else {\n grandparent[styleName][parentKey] = style;\n }\n }\n }\n if (style && typeof style === \"object\") {\n cssifyTheme(parent, style, styleName);\n }\n });\n };\n\n cssifyTheme(null, theme, null);\n\n return theme;\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 7f17afa34..4e6600a1a 100644 --- a/dist/src/theme/variables/commonColor.js +++ b/dist/src/theme/variables/commonColor.js @@ -1,9 +1,9 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _color=require('color');var _color2=_interopRequireDefault(_color); +Object.defineProperty(exports,"__esModule",{value:true});var _color=require("color");var _color2=_interopRequireDefault(_color); -var _reactNative=require('react-native');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +var _reactNative=require("react-native");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} -var deviceHeight=_reactNative.Dimensions.get('window').height; -var deviceWidth=_reactNative.Dimensions.get('window').width; +var deviceHeight=_reactNative.Dimensions.get("window").height; +var deviceWidth=_reactNative.Dimensions.get("window").width; var platform=_reactNative.Platform.OS; var platformStyle=undefined;exports.default= @@ -12,47 +12,46 @@ platformStyle:platformStyle, platform:platform, androidRipple:true, -androidRippleColor:'rgba(256, 256, 256, 0.3)', -androidRippleColorDark:'rgba(0, 0, 0, 0.15)', +androidRippleColor:"rgba(256, 256, 256, 0.3)", +androidRippleColorDark:"rgba(0, 0, 0, 0.15)", -badgeBg:'#ED1727', -badgeColor:'#fff', +badgeBg:"#ED1727", +badgeColor:"#fff", -badgePadding:platform==='ios'?3:0, +badgePadding:platform==="ios"?3:0, -btnFontFamily:platform==='ios'?'System':'Roboto_medium', -btnDisabledBg:'#b5b5b5', -btnDisabledClr:'#f1f1f1', +btnFontFamily:platform==="ios"?"System":"Roboto_medium", +btnDisabledBg:"#b5b5b5", +btnDisabledClr:"#f1f1f1", -CheckboxRadius:platform==='ios'?13:0, -CheckboxBorderWidth:platform==='ios'?1:2, -CheckboxPaddingLeft:platform==='ios'?4:2, -CheckboxPaddingBottom:platform==='ios'?0:5, -CheckboxIconSize:platform==='ios'?21:14, -CheckboxIconMarginTop:platform==='ios'?undefined:1, -CheckboxFontSize:platform==='ios'?23/0.9:18, +CheckboxRadius:platform==="ios"?13:0, +CheckboxBorderWidth:platform==="ios"?1:2, +CheckboxPaddingLeft:platform==="ios"?4:2, +CheckboxPaddingBottom:platform==="ios"?0:5, +CheckboxIconSize:platform==="ios"?21:14, +CheckboxIconMarginTop:platform==="ios"?undefined:1, +CheckboxFontSize:platform==="ios"?23/0.9:18, DefaultFontSize:17, -checkboxBgColor:'#039BE5', +checkboxBgColor:"#039BE5", checkboxSize:20, -checkboxTickColor:'#fff', +checkboxTickColor:"#fff", -segmentBackgroundColor:'#3F51B5', -segmentActiveBackgroundColor:'#fff', -segmentTextColor:'#fff', -segmentActiveTextColor:'#3F51B5', -segmentBorderColor:'#fff', -segmentBorderColorMain:'#3F51B5', +segmentBackgroundColor:"#3F51B5", +segmentActiveBackgroundColor:"#fff", +segmentTextColor:"#fff", +segmentActiveTextColor:"#3F51B5", +segmentBorderColor:"#fff", +segmentBorderColorMain:"#3F51B5", get defaultTextColor(){ return this.textColor; }, - get btnPrimaryBg(){ return this.brandPrimary; }, @@ -84,9 +83,7 @@ get btnWarningColor(){ return this.inverseTextColor; }, get btnTextSize(){ -return platform==='ios'? -this.fontSizeBase*1.1: -this.fontSizeBase-1; +return platform==="ios"?this.fontSizeBase*1.1:this.fontSizeBase-1; }, get btnTextSizeLarge(){ return this.fontSizeBase*1.5; @@ -108,21 +105,18 @@ return this.iconFontSize*0.6; }, - -cardDefaultBg:'#fff', - +cardDefaultBg:"#fff", -brandPrimary:'#2874F0', -brandInfo:'#62B1F6', -brandSuccess:'#5cb85c', -brandDanger:'#d9534f', -brandWarning:'#f0ad4e', -brandSidebar:'#252932', +brandPrimary:"#2874F0", +brandInfo:"#62B1F6", +brandSuccess:"#5cb85c", +brandDanger:"#d9534f", +brandWarning:"#f0ad4e", +brandSidebar:"#252932", - -fontFamily:platform==='ios'?'System':'Roboto', +fontFamily:platform==="ios"?"System":"Roboto", fontSizeBase:15, get fontSizeH1(){ @@ -136,63 +130,58 @@ return this.fontSizeBase*1.4; }, - footerHeight:55, -footerDefaultBg:'#2874F0', - - - -tabBarTextColor:'#8bb3f4', -tabBarTextSize:platform==='ios'?14:11, -activeTab:platform==='ios'?'#007aff':'#fff', -sTabBarActiveTextColor:'#007aff', -tabBarActiveTextColor:'#fff', -tabActiveBgColor:platform==='ios'?'#1569f4':undefined, - - -tabDefaultBg:'#2874F0', -topTabBarTextColor:'#b3c7f9', -topTabBarActiveTextColor:'#fff', -topTabActiveBgColor:platform==='ios'?'#1569f4':undefined, -topTabBarBorderColor:'#fff', -topTabBarActiveBorderColor:'#fff', - - - -toolbarBtnColor:'#fff', -toolbarDefaultBg:'#2874F0', -toolbarHeight:platform==='ios'?64:56, -toolbarIconSize:platform==='ios'?20:22, -toolbarSearchIconSize:platform==='ios'?20:23, -toolbarInputColor:platform==='ios'?'#CECDD2':'#fff', -searchBarHeight:platform==='ios'?30:40, -toolbarInverseBg:'#222', -toolbarTextColor:'#fff', -iosStatusbar:'light-content', -toolbarDefaultBorder:'#2874F0', +footerDefaultBg:"#2874F0", + + +tabBarTextColor:"#8bb3f4", +tabBarTextSize:platform==="ios"?14:11, +activeTab:platform==="ios"?"#007aff":"#fff", +sTabBarActiveTextColor:"#007aff", +tabBarActiveTextColor:"#fff", +tabActiveBgColor:platform==="ios"?"#1569f4":undefined, + + +tabDefaultBg:"#2874F0", +topTabBarTextColor:"#b3c7f9", +topTabBarActiveTextColor:"#fff", +topTabActiveBgColor:platform==="ios"?"#1569f4":undefined, +topTabBarBorderColor:"#fff", +topTabBarActiveBorderColor:"#fff", + + +toolbarBtnColor:"#fff", +toolbarDefaultBg:"#2874F0", +toolbarHeight:platform==="ios"?64:56, +toolbarIconSize:platform==="ios"?20:22, +toolbarSearchIconSize:platform==="ios"?20:23, +toolbarInputColor:platform==="ios"?"#CECDD2":"#fff", +searchBarHeight:platform==="ios"?30:40, +toolbarInverseBg:"#222", +toolbarTextColor:"#fff", +iosStatusbar:"light-content", +toolbarDefaultBorder:"#2874F0", get statusBarColor(){ return(0,_color2.default)(this.toolbarDefaultBg).darken(0.2).hex(); }, - -iconFamily:'Ionicons', -iconFontSize:platform==='ios'?30:28, +iconFamily:"Ionicons", +iconFontSize:platform==="ios"?30:28, iconMargin:7, -iconHeaderSize:platform==='ios'?33:24, - +iconHeaderSize:platform==="ios"?33:24, inputFontSize:17, -inputBorderColor:'#D9D5DC', -inputSuccessBorderColor:'#2b8339', -inputErrorBorderColor:'#ed2f2f', +inputBorderColor:"#D9D5DC", +inputSuccessBorderColor:"#2b8339", +inputErrorBorderColor:"#ed2f2f", get inputColor(){ return this.textColor; }, get inputColorPlaceholder(){ -return'#575757'; +return"#575757"; }, inputGroupMarginBottom:10, @@ -204,79 +193,70 @@ return this.inputPaddingLeft*8; }, - btnLineHeight:19, lineHeightH1:32, lineHeightH2:27, lineHeightH3:22, -iconLineHeight:platform==='ios'?37:30, -lineHeight:platform==='ios'?20:24, - +iconLineHeight:platform==="ios"?37:30, +lineHeight:platform==="ios"?20:24, -listBorderColor:'#c9c9c9', -listDividerBg:'#f4f4f4', +listBorderColor:"#c9c9c9", +listDividerBg:"#f4f4f4", listItemHeight:45, -listBtnUnderlayColor:'#DDD', +listBtnUnderlayColor:"#DDD", -cardBorderColor:'#ccc', +cardBorderColor:"#ccc", -listItemPadding:platform==='ios'?10:12, +listItemPadding:platform==="ios"?10:12, -listNoteColor:'#808080', +listNoteColor:"#808080", listNoteSize:13, - -defaultProgressColor:'#E4202D', -inverseProgressColor:'#1A191B', +defaultProgressColor:"#E4202D", +inverseProgressColor:"#1A191B", +radioBtnSize:platform==="ios"?25:23, +radioSelectedColorAndroid:"#5067FF", -radioBtnSize:platform==='ios'?25:23, -radioSelectedColorAndroid:'#5067FF', +radioBtnLineHeight:platform==="ios"?29:24, -radioBtnLineHeight:platform==='ios'?29:24, - -radioColor:'#7e7e7e', +radioColor:"#7e7e7e", get radioSelectedColor(){ return(0,_color2.default)(this.radioColor).darken(0.2).hex(); }, - -defaultSpinnerColor:'#45D56E', -inverseSpinnerColor:'#1A191B', - +defaultSpinnerColor:"#45D56E", +inverseSpinnerColor:"#1A191B", -tabBgColor:'#F8F8F8', +tabBgColor:"#F8F8F8", tabFontSize:15, -tabTextColor:'#222222', +tabTextColor:"#222222", - -textColor:'#000', -inverseTextColor:'#fff', +textColor:"#000", +inverseTextColor:"#fff", noteFontSize:14, +titleFontfamily:platform==="ios"?"System":"Roboto_medium", +titleFontSize:platform==="ios"?17:19, +subTitleFontSize:platform==="ios"?12:14, +subtitleColor:"#FFF", -titleFontfamily:platform==='ios'?'System':'Roboto_medium', -titleFontSize:platform==='ios'?17:19, -subTitleFontSize:platform==='ios'?12:14, -subtitleColor:'#FFF', - - -titleFontColor:'#FFF', +titleFontColor:"#FFF", -borderRadiusBase:platform==='ios'?5:2, +borderRadiusBase:platform==="ios"?5:2, borderWidth:1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1), contentPadding:10, @@ -284,10 +264,10 @@ get darkenHeader(){ return(0,_color2.default)(this.tabBgColor).darken(0.03).hex(); }, -dropdownBg:'#000', -dropdownLinkColor:'#414142', +dropdownBg:"#000", +dropdownLinkColor:"#414142", inputLineHeight:24, -jumbotronBg:'#C9C9CE', +jumbotronBg:"#C9C9CE", jumbotronPadding:30, deviceWidth:deviceWidth, deviceHeight:deviceHeight, diff --git a/dist/src/theme/variables/commonColor.js.map b/dist/src/theme/variables/commonColor.js.map index 92b097107..51a8ab89a 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","get","height","deviceWidth","width","platform","OS","platformStyle","undefined","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","iosStatusbar","toolbarDefaultBorder","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg","dropdownLinkColor","inputLineHeight","jumbotronBg","jumbotronPadding","inputGroupRoundedBorderRadius"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAc,wBAAWF,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAW,sBAASC,EAA1B;AACA,GAAMC,eAAgBC,SAAtB,C;;AAEe;AACbD,2BADa;AAEbF,iBAFa;;AAIbI,cAAe,IAJF;AAKbC,mBAAoB,0BALP;AAMbC,uBAAwB,qBANX;;;AASbC,QAAS,SATI;AAUbC,WAAY,MAVC;;AAYbC,aAAeT,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CAZ5B;;;AAebU,cAAgBV,WAAa,KAAd,CAAuB,QAAvB,CAAkC,eAfpC;AAgBbW,cAAe,SAhBF;AAiBbC,eAAgB,SAjBH;;;AAoBbC,eAAiBb,WAAa,KAAd,CAAuB,EAAvB,CAA4B,CApB/B;AAqBbc,oBAAsBd,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CArBnC;AAsBbe,oBAAsBf,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CAtBnC;AAuBbgB,sBAAwBhB,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CAvBrC;AAwBbiB,iBAAmBjB,WAAa,KAAd,CAAuB,EAAvB,CAA4B,EAxBjC;AAyBbkB,sBAAwBlB,WAAa,KAAd,CAAuBG,SAAvB,CAAmC,CAzB7C;AA0BbgB,iBAAmBnB,WAAa,KAAd,CAAwB,GAAK,GAA7B,CAAoC,EA1BzC;AA2BboB,gBAAiB,EA3BJ;AA4BbC,gBAAiB,SA5BJ;AA6BbC,aAAc,EA7BD;AA8BbC,kBAAmB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qC,CAArC,CA9QL;AA+QbC,eAAgB,EA/QH;;AAiRb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CAnRY;;AAqRbmD,WAAY,MArRC;AAsRbC,kBAAmB,SAtRN;AAuRbC,gBAAiB,EAvRJ;AAwRbC,YAAa,SAxRA;AAyRbC,iBAAkB,EAzRL;AA0RbnJ,uBA1Ra;AA2RbH,yBA3Ra;;;AA8RbuJ,8BAA+B,EA9RlB,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;\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: 'rgba(256, 256, 256, 0.3)',\n androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',\n\n // Badge\n badgeBg: '#ED1727',\n badgeColor: '#fff',\n // New Variable\n badgePadding: (platform === 'ios') ? 3 : 0,\n\n // Button\n btnFontFamily: (platform === 'ios') ? 'System' : 'Roboto_medium',\n btnDisabledBg: '#b5b5b5',\n btnDisabledClr: '#f1f1f1',\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 : 14,\n CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1,\n CheckboxFontSize: (platform === 'ios') ? (23 / 0.9) : 18,\n DefaultFontSize: 17,\n checkboxBgColor: '#039BE5',\n checkboxSize: 20,\n checkboxTickColor: '#fff',\n\n // Segment\n segmentBackgroundColor: '#3F51B5',\n segmentActiveBackgroundColor: '#fff',\n segmentTextColor: '#fff',\n segmentActiveTextColor: '#3F51B5',\n segmentBorderColor: '#fff',\n segmentBorderColorMain: '#3F51B5',\n\n // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\n\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')\n ? this.fontSizeBase * 1.1\n : 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\n buttonPadding: 6,\n\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n\n // Card\n cardDefaultBg: '#fff',\n\n\n // Color\n brandPrimary: '#2874F0',\n brandInfo: '#62B1F6',\n brandSuccess: '#5cb85c',\n brandDanger: '#d9534f',\n brandWarning: '#f0ad4e',\n brandSidebar: '#252932',\n\n\n // Font\n fontFamily: (platform === 'ios') ? 'System' : 'Roboto',\n fontSizeBase: 15,\n\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\n // Footer\n footerHeight: 55,\n footerDefaultBg: '#2874F0',\n\n\n // FooterTab\n tabBarTextColor: '#8bb3f4',\n tabBarTextSize: (platform === 'ios') ? 14 : 11,\n activeTab: (platform === 'ios') ? '#007aff' : '#fff',\n sTabBarActiveTextColor: '#007aff',\n tabBarActiveTextColor: '#fff',\n tabActiveBgColor: (platform === 'ios') ? '#1569f4' : undefined,\n\n // Tab\n tabDefaultBg: '#2874F0',\n topTabBarTextColor: '#b3c7f9',\n topTabBarActiveTextColor: '#fff',\n topTabActiveBgColor: (platform === 'ios') ? '#1569f4' : undefined,\n topTabBarBorderColor: '#fff',\n topTabBarActiveBorderColor: '#fff',\n\n\n // Header\n toolbarBtnColor: '#fff',\n toolbarDefaultBg: '#2874F0',\n toolbarHeight: (platform === 'ios') ? 64 : 56,\n toolbarIconSize: (platform === 'ios') ? 20 : 22,\n toolbarSearchIconSize: (platform === 'ios') ? 20 : 23,\n toolbarInputColor: (platform === 'ios') ? '#CECDD2' : '#fff',\n searchBarHeight: (platform === 'ios') ? 30 : 40,\n toolbarInverseBg: '#222',\n toolbarTextColor: '#fff',\n iosStatusbar: 'light-content',\n toolbarDefaultBorder: '#2874F0',\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n\n // Icon\n iconFamily: 'Ionicons',\n iconFontSize: (platform === 'ios') ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: (platform === 'ios') ? 33 : 24,\n\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: '#D9D5DC',\n inputSuccessBorderColor: '#2b8339',\n inputErrorBorderColor: '#ed2f2f',\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return '#575757';\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: (platform === 'ios') ? 37 : 30,\n lineHeight: (platform === 'ios') ? 20 : 24,\n\n\n // List\n listBorderColor: '#c9c9c9',\n listDividerBg: '#f4f4f4',\n listItemHeight: 45,\n listBtnUnderlayColor: '#DDD',\n\n // Card\n cardBorderColor: '#ccc',\n\n // Changed Variable\n listItemPadding: (platform === 'ios') ? 10 : 12,\n\n listNoteColor: '#808080',\n listNoteSize: 13,\n\n\n // Progress Bar\n defaultProgressColor: '#E4202D',\n inverseProgressColor: '#1A191B',\n\n\n // Radio Button\n radioBtnSize: (platform === 'ios') ? 25 : 23,\n radioSelectedColorAndroid: '#5067FF',\n\n // New Variable\n radioBtnLineHeight: (platform === 'ios') ? 29 : 24,\n\n radioColor: '#7e7e7e',\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n\n // Spinner\n defaultSpinnerColor: '#45D56E',\n inverseSpinnerColor: '#1A191B',\n\n\n // Tabs\n tabBgColor: '#F8F8F8',\n tabFontSize: 15,\n tabTextColor: '#222222',\n\n\n // Text\n textColor: '#000',\n inverseTextColor: '#fff',\n noteFontSize: 14,\n\n\n // Title\n titleFontfamily: (platform === 'ios') ? 'System' : 'Roboto_medium',\n titleFontSize: (platform === 'ios') ? 17 : 19,\n subTitleFontSize: (platform === 'ios') ? 12 : 14,\n subtitleColor: '#FFF',\n\n // New Variable\n titleFontColor: '#FFF',\n\n\n // Other\n borderRadiusBase: (platform === 'ios') ? 5 : 2,\n borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n contentPadding: 10,\n\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: '#000',\n dropdownLinkColor: '#414142',\n inputLineHeight: 24,\n jumbotronBg: '#C9C9CE',\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/commonColor.js"],"names":["deviceHeight","get","height","deviceWidth","width","platform","OS","platformStyle","undefined","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","iosStatusbar","toolbarDefaultBorder","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg","dropdownLinkColor","inputLineHeight","jumbotronBg","jumbotronPadding","inputGroupRoundedBorderRadius"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAc,wBAAWF,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAW,sBAASC,EAA1B;AACA,GAAMC,eAAgBC,SAAtB,C;;AAEe;AACbD,2BADa;AAEbF,iBAFa;;AAIbI,cAAe,IAJF;AAKbC,mBAAoB,0BALP;AAMbC,uBAAwB,qBANX;;;AASbC,QAAS,SATI;AAUbC,WAAY,MAVC;;AAYbC,aAAcT,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAZ1B;;;AAebU,cAAeV,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAflC;AAgBbW,cAAe,SAhBF;AAiBbC,eAAgB,SAjBH;;;AAoBbC,eAAgBb,WAAa,KAAb,CAAqB,EAArB,CAA0B,CApB7B;AAqBbc,oBAAqBd,WAAa,KAAb,CAAqB,CAArB,CAAyB,CArBjC;AAsBbe,oBAAqBf,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAtBjC;AAuBbgB,sBAAuBhB,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAvBnC;AAwBbiB,iBAAkBjB,WAAa,KAAb,CAAqB,EAArB,CAA0B,EAxB/B;AAyBbkB,sBAAuBlB,WAAa,KAAb,CAAqBG,SAArB,CAAiC,CAzB3C;AA0BbgB,iBAAkBnB,WAAa,KAAb,CAAqB,GAAK,GAA1B,CAAgC,EA1BrC;AA2BboB,gBAAiB,EA3BJ;AA4BbC,gBAAiB,SA5BJ;AA6BbC,aAAc,EA7BD;AA8BbC,kBAAmB,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pb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CA/PY;;AAiQbmD,WAAY,MAjQC;AAkQbC,kBAAmB,SAlQN;AAmQbC,gBAAiB,EAnQJ;AAoQbC,YAAa,SApQA;AAqQbC,iBAAkB,EArQL;AAsQbnJ,uBAtQa;AAuQbH,yBAvQa;;;AA0QbuJ,8BAA+B,EA1QlB,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;\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n // New Variable\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n btnDisabledClr: \"#f1f1f1\",\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 : 14,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 18,\n DefaultFontSize: 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Segment\n segmentBackgroundColor: \"#3F51B5\",\n segmentActiveBackgroundColor: \"#fff\",\n segmentTextColor: \"#fff\",\n segmentActiveTextColor: \"#3F51B5\",\n segmentBorderColor: \"#fff\",\n segmentBorderColorMain: \"#3F51B5\",\n\n // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\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\n buttonPadding: 6,\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\n // Color\n brandPrimary: \"#2874F0\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandSidebar: \"#252932\",\n\n // Font\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n\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: \"#2874F0\",\n\n // FooterTab\n tabBarTextColor: \"#8bb3f4\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: \"#fff\",\n tabActiveBgColor: platform === \"ios\" ? \"#1569f4\" : undefined,\n\n // Tab\n tabDefaultBg: \"#2874F0\",\n topTabBarTextColor: \"#b3c7f9\",\n topTabBarActiveTextColor: \"#fff\",\n topTabActiveBgColor: platform === \"ios\" ? \"#1569f4\" : undefined,\n topTabBarBorderColor: \"#fff\",\n topTabBarActiveBorderColor: \"#fff\",\n\n // Header\n toolbarBtnColor: \"#fff\",\n toolbarDefaultBg: \"#2874F0\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarIconSize: platform === \"ios\" ? 20 : 22,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n toolbarInverseBg: \"#222\",\n toolbarTextColor: \"#fff\",\n iosStatusbar: \"light-content\",\n toolbarDefaultBorder: \"#2874F0\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: platform === \"ios\" ? 37 : 30,\n lineHeight: platform === \"ios\" ? 20 : 24,\n\n // List\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listItemHeight: 45,\n listBtnUnderlayColor: \"#DDD\",\n\n // Card\n cardBorderColor: \"#ccc\",\n\n // Changed Variable\n listItemPadding: platform === \"ios\" ? 10 : 12,\n\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: \"#5067FF\",\n\n // New Variable\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n\n radioColor: \"#7e7e7e\",\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n tabTextColor: \"#222222\",\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 12 : 14,\n subtitleColor: \"#FFF\",\n\n // New Variable\n titleFontColor: \"#FFF\",\n\n // Other\n borderRadiusBase: platform === \"ios\" ? 5 : 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: \"#000\",\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n jumbotronBg: \"#C9C9CE\",\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30\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 bfe2d1662..60b7c5c05 100644 --- a/dist/src/theme/variables/material.js +++ b/dist/src/theme/variables/material.js @@ -1,58 +1,57 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _color=require('color');var _color2=_interopRequireDefault(_color); +Object.defineProperty(exports,"__esModule",{value:true});var _color=require("color");var _color2=_interopRequireDefault(_color); -var _reactNative=require('react-native');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +var _reactNative=require("react-native");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} -var deviceHeight=_reactNative.Dimensions.get('window').height; -var deviceWidth=_reactNative.Dimensions.get('window').width; +var deviceHeight=_reactNative.Dimensions.get("window").height; +var deviceWidth=_reactNative.Dimensions.get("window").width; var platform=_reactNative.Platform.OS; -var platformStyle='material';exports.default= +var platformStyle="material";exports.default= { platformStyle:platformStyle, platform:platform, androidRipple:true, -androidRippleColor:'rgba(256, 256, 256, 0.3)', -androidRippleColorDark:'rgba(0, 0, 0, 0.15)', +androidRippleColor:"rgba(256, 256, 256, 0.3)", +androidRippleColorDark:"rgba(0, 0, 0, 0.15)", -badgeBg:'#ED1727', -badgeColor:'#fff', +badgeBg:"#ED1727", +badgeColor:"#fff", -badgePadding:platform==='ios'?3:0, +badgePadding:platform==="ios"?3:0, -btnFontFamily:platform==='ios'?'Roboto':'Roboto_medium', -btnDisabledBg:'#b5b5b5', -btnDisabledClr:'#f1f1f1', +btnFontFamily:platform==="ios"?"Roboto":"Roboto_medium", +btnDisabledBg:"#b5b5b5", +btnDisabledClr:"#f1f1f1", CheckboxRadius:0, CheckboxBorderWidth:2, CheckboxPaddingLeft:2, -CheckboxPaddingBottom:platform==='ios'?0:5, -CheckboxIconSize:platform==='ios'?18:14, -CheckboxIconMarginTop:platform==='ios'?undefined:1, -CheckboxFontSize:platform==='ios'?21:18, +CheckboxPaddingBottom:platform==="ios"?0:5, +CheckboxIconSize:platform==="ios"?18:14, +CheckboxIconMarginTop:platform==="ios"?undefined:1, +CheckboxFontSize:platform==="ios"?21:18, DefaultFontSize:17, -checkboxBgColor:'#039BE5', +checkboxBgColor:"#039BE5", checkboxSize:20, -checkboxTickColor:'#fff', +checkboxTickColor:"#fff", -segmentBackgroundColor:'#3F51B5', -segmentActiveBackgroundColor:'#fff', -segmentTextColor:'#fff', -segmentActiveTextColor:'#3F51B5', -segmentBorderColor:'#fff', -segmentBorderColorMain:'#3F51B5', +segmentBackgroundColor:"#3F51B5", +segmentActiveBackgroundColor:"#fff", +segmentTextColor:"#fff", +segmentActiveTextColor:"#3F51B5", +segmentBorderColor:"#fff", +segmentBorderColorMain:"#3F51B5", get defaultTextColor(){ return this.textColor; }, - get btnPrimaryBg(){ return this.brandPrimary; }, @@ -84,9 +83,7 @@ get btnWarningColor(){ return this.inverseTextColor; }, get btnTextSize(){ -return platform==='ios'? -this.fontSizeBase*1.1: -this.fontSizeBase-1; +return platform==="ios"?this.fontSizeBase*1.1:this.fontSizeBase-1; }, get btnTextSizeLarge(){ return this.fontSizeBase*1.5; @@ -108,21 +105,18 @@ return this.iconFontSize*0.6; }, - -cardDefaultBg:'#fff', - +cardDefaultBg:"#fff", -brandPrimary:'#3F51B5', -brandInfo:'#3F57D3', -brandSuccess:'#5cb85c', -brandDanger:'#d9534f', -brandWarning:'#f0ad4e', -brandSidebar:'#252932', +brandPrimary:"#3F51B5", +brandInfo:"#3F57D3", +brandSuccess:"#5cb85c", +brandDanger:"#d9534f", +brandWarning:"#f0ad4e", +brandSidebar:"#252932", - -fontFamily:'Roboto', +fontFamily:"Roboto", fontSizeBase:15, get fontSizeH1(){ @@ -136,63 +130,58 @@ return this.fontSizeBase*1.4; }, - footerHeight:55, -footerDefaultBg:'#3F51B5', +footerDefaultBg:"#3F51B5", - -tabBarTextColor:'#b3c7f9', -tabBarTextSize:platform==='ios'?14:11, -activeTab:'#fff', -sTabBarActiveTextColor:'#007aff', -tabBarActiveTextColor:'#fff', +tabBarTextColor:"#b3c7f9", +tabBarTextSize:platform==="ios"?14:11, +activeTab:"#fff", +sTabBarActiveTextColor:"#007aff", +tabBarActiveTextColor:"#fff", tabActiveBgColor:undefined, -tabDefaultBg:'#3F51B5', -topTabBarTextColor:'#b3c7f9', -topTabBarActiveTextColor:'#fff', +tabDefaultBg:"#3F51B5", +topTabBarTextColor:"#b3c7f9", +topTabBarActiveTextColor:"#fff", topTabActiveBgColor:undefined, -topTabBarBorderColor:'#fff', -topTabBarActiveBorderColor:'#fff', - - - -toolbarBtnColor:'#fff', -toolbarDefaultBg:'#3F51B5', -toolbarHeight:platform==='ios'?76:56, -toolbarIconSize:platform==='ios'?20:22, -toolbarSearchIconSize:platform==='ios'?20:23, -toolbarInputColor:'#fff', -searchBarHeight:platform==='ios'?30:40, -toolbarInverseBg:'#222', -toolbarTextColor:'#fff', -toolbarDefaultBorder:'#3F51B5', -iosStatusbar:'light-content', +topTabBarBorderColor:"#fff", +topTabBarActiveBorderColor:"#fff", + + +toolbarBtnColor:"#fff", +toolbarDefaultBg:"#3F51B5", +toolbarHeight:platform==="ios"?76:56, +toolbarIconSize:platform==="ios"?20:22, +toolbarSearchIconSize:platform==="ios"?20:23, +toolbarInputColor:"#fff", +searchBarHeight:platform==="ios"?30:40, +toolbarInverseBg:"#222", +toolbarTextColor:"#fff", +toolbarDefaultBorder:"#3F51B5", +iosStatusbar:"light-content", get statusBarColor(){ return(0,_color2.default)(this.toolbarDefaultBg).darken(0.2).hex(); }, - -iconFamily:'Ionicons', -iconFontSize:platform==='ios'?30:28, +iconFamily:"Ionicons", +iconFontSize:platform==="ios"?30:28, iconMargin:7, -iconHeaderSize:platform==='ios'?29:24, - +iconHeaderSize:platform==="ios"?29:24, inputFontSize:17, -inputBorderColor:'#D9D5DC', -inputSuccessBorderColor:'#2b8339', -inputErrorBorderColor:'#ed2f2f', +inputBorderColor:"#D9D5DC", +inputSuccessBorderColor:"#2b8339", +inputErrorBorderColor:"#ed2f2f", get inputColor(){ return this.textColor; }, get inputColorPlaceholder(){ -return'#575757'; +return"#575757"; }, inputGroupMarginBottom:10, @@ -204,76 +193,67 @@ return this.inputPaddingLeft*8; }, - btnLineHeight:19, lineHeightH1:32, lineHeightH2:27, lineHeightH3:22, -iconLineHeight:platform==='ios'?37:30, -lineHeight:platform==='ios'?20:24, +iconLineHeight:platform==="ios"?37:30, +lineHeight:platform==="ios"?20:24, - -listBorderColor:'#c9c9c9', -listDividerBg:'#f4f4f4', +listBorderColor:"#c9c9c9", +listDividerBg:"#f4f4f4", listItemHeight:45, -listBtnUnderlayColor:'#DDD', +listBtnUnderlayColor:"#DDD", -cardBorderColor:'#ccc', +cardBorderColor:"#ccc", -listItemPadding:platform==='ios'?10:12, +listItemPadding:platform==="ios"?10:12, -listNoteColor:'#808080', +listNoteColor:"#808080", listNoteSize:13, - -defaultProgressColor:'#E4202D', -inverseProgressColor:'#1A191B', +defaultProgressColor:"#E4202D", +inverseProgressColor:"#1A191B", +radioBtnSize:platform==="ios"?25:23, +radioSelectedColorAndroid:"#5067FF", -radioBtnSize:platform==='ios'?25:23, -radioSelectedColorAndroid:'#5067FF', +radioBtnLineHeight:platform==="ios"?29:24, -radioBtnLineHeight:platform==='ios'?29:24, - -radioColor:'#7e7e7e', +radioColor:"#7e7e7e", get radioSelectedColor(){ return(0,_color2.default)(this.radioColor).darken(0.2).hex(); }, - -defaultSpinnerColor:'#45D56E', -inverseSpinnerColor:'#1A191B', +defaultSpinnerColor:"#45D56E", +inverseSpinnerColor:"#1A191B", - -tabBgColor:'#F8F8F8', +tabBgColor:"#F8F8F8", tabFontSize:15, -tabTextColor:'#222222', - +tabTextColor:"#222222", -textColor:'#000', -inverseTextColor:'#fff', +textColor:"#000", +inverseTextColor:"#fff", noteFontSize:14, - -titleFontfamily:platform==='ios'?'Roboto':'Roboto_medium', +titleFontfamily:platform==="ios"?"Roboto":"Roboto_medium", titleFontSize:19, subTitleFontSize:14, -subtitleColor:'#FFF', - +subtitleColor:"#FFF", -titleFontColor:'#FFF', +titleFontColor:"#FFF", borderRadiusBase:2, @@ -284,10 +264,10 @@ get darkenHeader(){ return(0,_color2.default)(this.tabBgColor).darken(0.03).hex(); }, -dropdownBg:'#000', -dropdownLinkColor:'#414142', +dropdownBg:"#000", +dropdownLinkColor:"#414142", inputLineHeight:24, -jumbotronBg:'#C9C9CE', +jumbotronBg:"#C9C9CE", jumbotronPadding:30, deviceWidth:deviceWidth, deviceHeight:deviceHeight, diff --git a/dist/src/theme/variables/material.js.map b/dist/src/theme/variables/material.js.map index 51847ea41..566eaf23d 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","get","height","deviceWidth","width","platform","OS","platformStyle","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","undefined","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg","dropdownLinkColor","inputLineHeight","jumbotronBg","jumbotronPadding","inputGroupRoundedBorderRadius"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAc,wBAAWF,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAW,sBAASC,EAA1B;AACA,GAAMC,eAAgB,UAAtB,C;;AAEe;AACbA,2BADa;AAEbF,iBAFa;;AAIbG,cAAe,IAJF;AAKbC,mBAAoB,0BALP;AAMbC,uBAAwB,qBANX;;;AASbC,QAAS,SATI;AAUbC,WAAY,MAVC;;AAYbC,aAAeR,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CAZ5B;;;AAebS,cAAgBT,WAAa,KAAd,CAAuB,QAAvB,CAAkC,eAfpC;AAgBbU,cAAe,SAhBF;AAiBbC,eAAgB,SAjBH;;;AAoBbC,eAAgB,CApBH;AAq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,MAzQH;;;;AA6QbC,iBAAkB,CA7QL;AA8QbC,YAAc,EAAI,wBAAWC,yBAAX,CAAqC,CAArC,CA9QL;AA+QbC,eAAgB,EA/QH;;AAiRb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CAnRY;;AAqRbmD,WAAY,MArRC;AAsRbC,kBAAmB,SAtRN;AAuRbC,gBAAiB,EAvRJ;AAwRbC,YAAa,SAxRA;AAyRbC,iBAAkB,EAzRL;AA0RbnJ,uBA1Ra;AA2RbH,yBA3Ra;;;AA8RbuJ,8BAA+B,EA9RlB,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';\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: 'rgba(256, 256, 256, 0.3)',\n androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',\n\n // Badge\n badgeBg: '#ED1727',\n badgeColor: '#fff',\n // New Variable\n badgePadding: (platform === 'ios') ? 3 : 0,\n\n // Button\n btnFontFamily: (platform === 'ios') ? 'Roboto' : 'Roboto_medium',\n btnDisabledBg: '#b5b5b5',\n btnDisabledClr: '#f1f1f1',\n\n // CheckBox\n CheckboxRadius: 0,\n CheckboxBorderWidth: 2,\n CheckboxPaddingLeft: 2,\n CheckboxPaddingBottom: (platform === 'ios') ? 0 : 5,\n CheckboxIconSize: (platform === 'ios') ? 18 : 14,\n CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1,\n CheckboxFontSize: (platform === 'ios') ? 21 : 18,\n DefaultFontSize: 17,\n checkboxBgColor: '#039BE5',\n checkboxSize: 20,\n checkboxTickColor: '#fff',\n\n // Segment\n segmentBackgroundColor: '#3F51B5',\n segmentActiveBackgroundColor: '#fff',\n segmentTextColor: '#fff',\n segmentActiveTextColor: '#3F51B5',\n segmentBorderColor: '#fff',\n segmentBorderColorMain: '#3F51B5',\n\n // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\n\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')\n ? this.fontSizeBase * 1.1\n : 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\n buttonPadding: 6,\n\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n\n // Card\n cardDefaultBg: '#fff',\n\n\n // Color\n brandPrimary: '#3F51B5',\n brandInfo: '#3F57D3',\n brandSuccess: '#5cb85c',\n brandDanger: '#d9534f',\n brandWarning: '#f0ad4e',\n brandSidebar: '#252932',\n\n\n // Font\n fontFamily: 'Roboto',\n fontSizeBase: 15,\n\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\n // Footer\n footerHeight: 55,\n footerDefaultBg: '#3F51B5',\n\n\n // FooterTab\n tabBarTextColor: '#b3c7f9',\n tabBarTextSize: (platform === 'ios') ? 14 : 11,\n activeTab: '#fff',\n sTabBarActiveTextColor: '#007aff',\n tabBarActiveTextColor: '#fff',\n tabActiveBgColor: undefined,\n\n // Tab\n tabDefaultBg: '#3F51B5',\n topTabBarTextColor: '#b3c7f9',\n topTabBarActiveTextColor: '#fff',\n topTabActiveBgColor: undefined,\n topTabBarBorderColor: '#fff',\n topTabBarActiveBorderColor: '#fff',\n\n\n // Header\n toolbarBtnColor: '#fff',\n toolbarDefaultBg: '#3F51B5',\n toolbarHeight: (platform === 'ios') ? 76 : 56,\n toolbarIconSize: (platform === 'ios') ? 20 : 22,\n toolbarSearchIconSize: (platform === 'ios') ? 20 : 23,\n toolbarInputColor: '#fff',\n searchBarHeight: (platform === 'ios') ? 30 : 40,\n toolbarInverseBg: '#222',\n toolbarTextColor: '#fff',\n toolbarDefaultBorder: '#3F51B5',\n iosStatusbar: 'light-content',\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n\n // Icon\n iconFamily: 'Ionicons',\n iconFontSize: (platform === 'ios') ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: (platform === 'ios') ? 29 : 24,\n\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: '#D9D5DC',\n inputSuccessBorderColor: '#2b8339',\n inputErrorBorderColor: '#ed2f2f',\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return '#575757';\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: (platform === 'ios') ? 37 : 30,\n lineHeight: (platform === 'ios') ? 20 : 24,\n\n\n // List\n listBorderColor: '#c9c9c9',\n listDividerBg: '#f4f4f4',\n listItemHeight: 45,\n listBtnUnderlayColor: '#DDD',\n\n // Card\n cardBorderColor: '#ccc',\n\n // Changed Variable\n listItemPadding: (platform === 'ios') ? 10 : 12,\n\n listNoteColor: '#808080',\n listNoteSize: 13,\n\n\n // Progress Bar\n defaultProgressColor: '#E4202D',\n inverseProgressColor: '#1A191B',\n\n\n // Radio Button\n radioBtnSize: (platform === 'ios') ? 25 : 23,\n radioSelectedColorAndroid: '#5067FF',\n\n // New Variable\n radioBtnLineHeight: (platform === 'ios') ? 29 : 24,\n\n radioColor: '#7e7e7e',\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n\n // Spinner\n defaultSpinnerColor: '#45D56E',\n inverseSpinnerColor: '#1A191B',\n\n\n // Tabs\n tabBgColor: '#F8F8F8',\n tabFontSize: 15,\n tabTextColor: '#222222',\n\n\n // Text\n textColor: '#000',\n inverseTextColor: '#fff',\n noteFontSize: 14,\n\n\n // Title\n titleFontfamily: (platform === 'ios') ? 'Roboto' : 'Roboto_medium',\n titleFontSize: 19,\n subTitleFontSize: 14,\n subtitleColor: '#FFF',\n\n // New Variable\n titleFontColor: '#FFF',\n\n\n // Other\n borderRadiusBase: 2,\n borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n contentPadding: 10,\n\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: '#000',\n dropdownLinkColor: '#414142',\n inputLineHeight: 24,\n jumbotronBg: '#C9C9CE',\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/material.js"],"names":["deviceHeight","get","height","deviceWidth","width","platform","OS","platformStyle","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","undefined","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg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A2B,SAtNd;;;AAyNbC,mBAAoB1H,WAAa,KAAb,CAAqB,EAArB,CAA0B,EAzNjC;;AA2Nb2H,WAAY,SA3NC;;AA6Nb,GAAIC,mBAAJ,EAAyB;AACvB,MAAO,oBAAM,KAAKD,UAAX,EAAuBlC,MAAvB,CAA8B,GAA9B,EAAmCC,GAAnC,EAAP;AACD,CA/NY;;;AAkObmC,oBAAqB,SAlOR;AAmObC,oBAAqB,SAnOR;;;AAsObC,WAAY,SAtOC;AAuObC,YAAa,EAvOA;AAwObC,aAAc,SAxOD;;;AA2OblG,UAAW,MA3OE;AA4ObI,iBAAkB,MA5OL;AA6Ob+F,aAAc,EA7OD;;;AAgPbC,gBAAiBnI,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAhPpC;AAiPboI,cAAe,EAjPF;AAkPbC,iBAAkB,EAlPL;AAmPbC,cAAe,MAnPF;;;AAsPbC,eAAgB,MAtPH;;;AAyPbC,iBAAkB,CAzPL;AA0PbC,YAAa,EAAI,wBAAWC,yBAAX,CAAqC,CAArC,CA1PJ;AA2PbC,eAAgB,EA3PH;;AA6Pb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CA/PY;;AAiQbmD,WAAY,MAjQC;AAkQbC,kBAAmB,SAlQN;AAmQbC,gBAAiB,EAnQJ;AAoQbC,YAAa,SApQA;AAqQbC,iBAAkB,EArQL;AAsQbnJ,uBAtQa;AAuQbH,yBAvQa;;;AA0QbuJ,8BAA+B,EA1QlB,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\";\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n // New Variable\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"Roboto\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n btnDisabledClr: \"#f1f1f1\",\n\n // CheckBox\n CheckboxRadius: 0,\n CheckboxBorderWidth: 2,\n CheckboxPaddingLeft: 2,\n CheckboxPaddingBottom: platform === \"ios\" ? 0 : 5,\n CheckboxIconSize: platform === \"ios\" ? 18 : 14,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 21 : 18,\n DefaultFontSize: 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\n\n // Segment\n segmentBackgroundColor: \"#3F51B5\",\n segmentActiveBackgroundColor: \"#fff\",\n segmentTextColor: \"#fff\",\n segmentActiveTextColor: \"#3F51B5\",\n segmentBorderColor: \"#fff\",\n segmentBorderColorMain: \"#3F51B5\",\n\n // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\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\n buttonPadding: 6,\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\n // Color\n brandPrimary: \"#3F51B5\",\n brandInfo: \"#3F57D3\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandSidebar: \"#252932\",\n\n // Font\n fontFamily: \"Roboto\",\n fontSizeBase: 15,\n\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\n // FooterTab\n tabBarTextColor: \"#b3c7f9\",\n tabBarTextSize: platform === \"ios\" ? 14 : 11,\n activeTab: \"#fff\",\n sTabBarActiveTextColor: \"#007aff\",\n tabBarActiveTextColor: \"#fff\",\n tabActiveBgColor: undefined,\n\n // Tab\n tabDefaultBg: \"#3F51B5\",\n topTabBarTextColor: \"#b3c7f9\",\n topTabBarActiveTextColor: \"#fff\",\n topTabActiveBgColor: undefined,\n topTabBarBorderColor: \"#fff\",\n topTabBarActiveBorderColor: \"#fff\",\n\n // Header\n toolbarBtnColor: \"#fff\",\n toolbarDefaultBg: \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 76 : 56,\n toolbarIconSize: platform === \"ios\" ? 20 : 22,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n toolbarInverseBg: \"#222\",\n toolbarTextColor: \"#fff\",\n toolbarDefaultBorder: \"#3F51B5\",\n iosStatusbar: \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: platform === \"ios\" ? 29 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: platform === \"ios\" ? 37 : 30,\n lineHeight: platform === \"ios\" ? 20 : 24,\n\n // List\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listItemHeight: 45,\n listBtnUnderlayColor: \"#DDD\",\n\n // Card\n cardBorderColor: \"#ccc\",\n\n // Changed Variable\n listItemPadding: platform === \"ios\" ? 10 : 12,\n\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: \"#5067FF\",\n\n // New Variable\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n\n radioColor: \"#7e7e7e\",\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n tabTextColor: \"#222222\",\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"Roboto\" : \"Roboto_medium\",\n titleFontSize: 19,\n subTitleFontSize: 14,\n subtitleColor: \"#FFF\",\n\n // New Variable\n titleFontColor: \"#FFF\",\n\n // Other\n borderRadiusBase: 2,\n borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),\n contentPadding: 10,\n\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: \"#000\",\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n jumbotronBg: \"#C9C9CE\",\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30\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 db7d9ae34..8a5a3dad5 100644 --- a/dist/src/theme/variables/platform.js +++ b/dist/src/theme/variables/platform.js @@ -1,9 +1,9 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _color=require('color');var _color2=_interopRequireDefault(_color); +Object.defineProperty(exports,"__esModule",{value:true});var _color=require("color");var _color2=_interopRequireDefault(_color); -var _reactNative=require('react-native');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} +var _reactNative=require("react-native");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} -var deviceHeight=_reactNative.Dimensions.get('window').height; -var deviceWidth=_reactNative.Dimensions.get('window').width; +var deviceHeight=_reactNative.Dimensions.get("window").height; +var deviceWidth=_reactNative.Dimensions.get("window").width; var platform=_reactNative.Platform.OS; var platformStyle=undefined;exports.default= @@ -12,47 +12,46 @@ platformStyle:platformStyle, platform:platform, androidRipple:true, -androidRippleColor:'rgba(256, 256, 256, 0.3)', -androidRippleColorDark:'rgba(0, 0, 0, 0.15)', +androidRippleColor:"rgba(256, 256, 256, 0.3)", +androidRippleColorDark:"rgba(0, 0, 0, 0.15)", -badgeBg:'#ED1727', -badgeColor:'#fff', +badgeBg:"#ED1727", +badgeColor:"#fff", -badgePadding:platform==='ios'?3:0, +badgePadding:platform==="ios"?3:0, -btnFontFamily:platform==='ios'?'System':'Roboto_medium', -btnDisabledBg:'#b5b5b5', -btnDisabledClr:'#f1f1f1', +btnFontFamily:platform==="ios"?"System":"Roboto_medium", +btnDisabledBg:"#b5b5b5", +btnDisabledClr:"#f1f1f1", -CheckboxRadius:platform==='ios'?13:0, -CheckboxBorderWidth:platform==='ios'?1:2, -CheckboxPaddingLeft:platform==='ios'?4:2, -CheckboxPaddingBottom:platform==='ios'?0:5, -CheckboxIconSize:platform==='ios'?21:14, -CheckboxIconMarginTop:platform==='ios'?undefined:1, -CheckboxFontSize:platform==='ios'?23/0.9:18, +CheckboxRadius:platform==="ios"?13:0, +CheckboxBorderWidth:platform==="ios"?1:2, +CheckboxPaddingLeft:platform==="ios"?4:2, +CheckboxPaddingBottom:platform==="ios"?0:5, +CheckboxIconSize:platform==="ios"?21:14, +CheckboxIconMarginTop:platform==="ios"?undefined:1, +CheckboxFontSize:platform==="ios"?23/0.9:18, DefaultFontSize:17, -checkboxBgColor:'#039BE5', +checkboxBgColor:"#039BE5", checkboxSize:20, -checkboxTickColor:'#fff', +checkboxTickColor:"#fff", -segmentBackgroundColor:platform==='ios'?'#F8F8F8':'#3F51B5', -segmentActiveBackgroundColor:platform==='ios'?'#007aff':'#fff', -segmentTextColor:platform==='ios'?'#007aff':'#fff', -segmentActiveTextColor:platform==='ios'?'#fff':'#3F51B5', -segmentBorderColor:platform==='ios'?'#007aff':'#fff', -segmentBorderColorMain:platform==='ios'?'#a7a6ab':'#3F51B5', +segmentBackgroundColor:platform==="ios"?"#F8F8F8":"#3F51B5", +segmentActiveBackgroundColor:platform==="ios"?"#007aff":"#fff", +segmentTextColor:platform==="ios"?"#007aff":"#fff", +segmentActiveTextColor:platform==="ios"?"#fff":"#3F51B5", +segmentBorderColor:platform==="ios"?"#007aff":"#fff", +segmentBorderColorMain:platform==="ios"?"#a7a6ab":"#3F51B5", get defaultTextColor(){ return this.textColor; }, - get btnPrimaryBg(){ return this.brandPrimary; }, @@ -84,9 +83,7 @@ get btnWarningColor(){ return this.inverseTextColor; }, get btnTextSize(){ -return platform==='ios'? -this.fontSizeBase*1.1: -this.fontSizeBase-1; +return platform==="ios"?this.fontSizeBase*1.1:this.fontSizeBase-1; }, get btnTextSizeLarge(){ return this.fontSizeBase*1.5; @@ -108,21 +105,18 @@ return this.iconFontSize*0.6; }, - -cardDefaultBg:'#fff', - +cardDefaultBg:"#fff", -brandPrimary:platform==='ios'?'#007aff':'#3F51B5', -brandInfo:'#62B1F6', -brandSuccess:'#5cb85c', -brandDanger:'#d9534f', -brandWarning:'#f0ad4e', -brandSidebar:'#252932', +brandPrimary:platform==="ios"?"#007aff":"#3F51B5", +brandInfo:"#62B1F6", +brandSuccess:"#5cb85c", +brandDanger:"#d9534f", +brandWarning:"#f0ad4e", +brandSidebar:"#252932", - -fontFamily:platform==='ios'?'System':'Roboto', +fontFamily:platform==="ios"?"System":"Roboto", fontSizeBase:15, get fontSizeH1(){ @@ -136,63 +130,58 @@ return this.fontSizeBase*1.4; }, - footerHeight:55, -footerDefaultBg:platform==='ios'?'#F8F8F8':'#4179F7', - - - -tabBarTextColor:platform==='ios'?'#6b6b6b':'#b3c7f9', -tabBarTextSize:platform==='ios'?14:11, -activeTab:platform==='ios'?'#007aff':'#fff', -sTabBarActiveTextColor:'#007aff', -tabBarActiveTextColor:platform==='ios'?'#007aff':'#fff', -tabActiveBgColor:platform==='ios'?'#cde1f9':'#3F51B5', - - -tabDefaultBg:platform==='ios'?'#F8F8F8':'#3F51B5', -topTabBarTextColor:platform==='ios'?'#6b6b6b':'#b3c7f9', -topTabBarActiveTextColor:platform==='ios'?'#007aff':'#fff', -topTabActiveBgColor:platform==='ios'?'#cde1f9':undefined, -topTabBarBorderColor:platform==='ios'?'#a7a6ab':'#fff', -topTabBarActiveBorderColor:platform==='ios'?'#007aff':'#fff', - - - -toolbarBtnColor:platform==='ios'?'#007aff':'#fff', -toolbarDefaultBg:platform==='ios'?'#F8F8F8':'#3F51B5', -toolbarHeight:platform==='ios'?64:56, -toolbarIconSize:platform==='ios'?20:22, -toolbarSearchIconSize:platform==='ios'?20:23, -toolbarInputColor:platform==='ios'?'#CECDD2':'#fff', -searchBarHeight:platform==='ios'?30:40, -toolbarInverseBg:'#222', -toolbarTextColor:platform==='ios'?'#000':'#fff', -toolbarDefaultBorder:platform==='ios'?'#a7a6ab':'#3F51B5', -iosStatusbar:platform==='ios'?'dark-content':'light-content', +footerDefaultBg:platform==="ios"?"#F8F8F8":"#4179F7", + + +tabBarTextColor:platform==="ios"?"#6b6b6b":"#b3c7f9", +tabBarTextSize:platform==="ios"?14:11, +activeTab:platform==="ios"?"#007aff":"#fff", +sTabBarActiveTextColor:"#007aff", +tabBarActiveTextColor:platform==="ios"?"#007aff":"#fff", +tabActiveBgColor:platform==="ios"?"#cde1f9":"#3F51B5", + + +tabDefaultBg:platform==="ios"?"#F8F8F8":"#3F51B5", +topTabBarTextColor:platform==="ios"?"#6b6b6b":"#b3c7f9", +topTabBarActiveTextColor:platform==="ios"?"#007aff":"#fff", +topTabActiveBgColor:platform==="ios"?"#cde1f9":undefined, +topTabBarBorderColor:platform==="ios"?"#a7a6ab":"#fff", +topTabBarActiveBorderColor:platform==="ios"?"#007aff":"#fff", + + +toolbarBtnColor:platform==="ios"?"#007aff":"#fff", +toolbarDefaultBg:platform==="ios"?"#F8F8F8":"#3F51B5", +toolbarHeight:platform==="ios"?64:56, +toolbarIconSize:platform==="ios"?20:22, +toolbarSearchIconSize:platform==="ios"?20:23, +toolbarInputColor:platform==="ios"?"#CECDD2":"#fff", +searchBarHeight:platform==="ios"?30:40, +toolbarInverseBg:"#222", +toolbarTextColor:platform==="ios"?"#000":"#fff", +toolbarDefaultBorder:platform==="ios"?"#a7a6ab":"#3F51B5", +iosStatusbar:platform==="ios"?"dark-content":"light-content", get statusBarColor(){ return(0,_color2.default)(this.toolbarDefaultBg).darken(0.2).hex(); }, - -iconFamily:'Ionicons', -iconFontSize:platform==='ios'?30:28, +iconFamily:"Ionicons", +iconFontSize:platform==="ios"?30:28, iconMargin:7, -iconHeaderSize:platform==='ios'?33:24, - +iconHeaderSize:platform==="ios"?33:24, inputFontSize:17, -inputBorderColor:'#D9D5DC', -inputSuccessBorderColor:'#2b8339', -inputErrorBorderColor:'#ed2f2f', +inputBorderColor:"#D9D5DC", +inputSuccessBorderColor:"#2b8339", +inputErrorBorderColor:"#ed2f2f", get inputColor(){ return this.textColor; }, get inputColorPlaceholder(){ -return'#575757'; +return"#575757"; }, inputGroupMarginBottom:10, @@ -204,79 +193,70 @@ return this.inputPaddingLeft*8; }, - btnLineHeight:19, lineHeightH1:32, lineHeightH2:27, lineHeightH3:22, -iconLineHeight:platform==='ios'?37:30, -lineHeight:platform==='ios'?20:24, - +iconLineHeight:platform==="ios"?37:30, +lineHeight:platform==="ios"?20:24, -listBorderColor:'#c9c9c9', -listDividerBg:'#f4f4f4', +listBorderColor:"#c9c9c9", +listDividerBg:"#f4f4f4", listItemHeight:45, -listBtnUnderlayColor:'#DDD', +listBtnUnderlayColor:"#DDD", -cardBorderColor:'#ccc', +cardBorderColor:"#ccc", -listItemPadding:platform==='ios'?10:12, +listItemPadding:platform==="ios"?10:12, -listNoteColor:'#808080', +listNoteColor:"#808080", listNoteSize:13, - -defaultProgressColor:'#E4202D', -inverseProgressColor:'#1A191B', +defaultProgressColor:"#E4202D", +inverseProgressColor:"#1A191B", +radioBtnSize:platform==="ios"?25:23, +radioSelectedColorAndroid:"#3F51B5", -radioBtnSize:platform==='ios'?25:23, -radioSelectedColorAndroid:'#3F51B5', +radioBtnLineHeight:platform==="ios"?29:24, -radioBtnLineHeight:platform==='ios'?29:24, - -radioColor:'#7e7e7e', +radioColor:"#7e7e7e", get radioSelectedColor(){ return(0,_color2.default)(this.radioColor).darken(0.2).hex(); }, - -defaultSpinnerColor:'#45D56E', -inverseSpinnerColor:'#1A191B', - +defaultSpinnerColor:"#45D56E", +inverseSpinnerColor:"#1A191B", -tabBgColor:'#F8F8F8', +tabBgColor:"#F8F8F8", tabFontSize:15, -tabTextColor:'#222222', +tabTextColor:"#222222", - -textColor:'#000', -inverseTextColor:'#fff', +textColor:"#000", +inverseTextColor:"#fff", noteFontSize:14, +titleFontfamily:platform==="ios"?"System":"Roboto_medium", +titleFontSize:platform==="ios"?17:19, +subTitleFontSize:platform==="ios"?12:14, +subtitleColor:platform==="ios"?"#8e8e93":"#FFF", -titleFontfamily:platform==='ios'?'System':'Roboto_medium', -titleFontSize:platform==='ios'?17:19, -subTitleFontSize:platform==='ios'?12:14, -subtitleColor:platform==='ios'?'#8e8e93':'#FFF', - - -titleFontColor:platform==='ios'?'#000':'#FFF', +titleFontColor:platform==="ios"?"#000":"#FFF", -borderRadiusBase:platform==='ios'?5:2, +borderRadiusBase:platform==="ios"?5:2, borderWidth:1/_reactNative.PixelRatio.getPixelSizeForLayoutSize(1), contentPadding:10, @@ -284,10 +264,10 @@ get darkenHeader(){ return(0,_color2.default)(this.tabBgColor).darken(0.03).hex(); }, -dropdownBg:'#000', -dropdownLinkColor:'#414142', +dropdownBg:"#000", +dropdownLinkColor:"#414142", inputLineHeight:24, -jumbotronBg:'#C9C9CE', +jumbotronBg:"#C9C9CE", jumbotronPadding:30, deviceWidth:deviceWidth, deviceHeight:deviceHeight, diff --git a/dist/src/theme/variables/platform.js.map b/dist/src/theme/variables/platform.js.map index 8a3757157..73a5b20db 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","get","height","deviceWidth","width","platform","OS","platformStyle","undefined","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg","dropdownLinkColor","inputLineHeight","jumbotronBg","j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AuBlC,MAAvB,CAA8B,GAA9B,EAAmCC,GAAnC,EAAP;AACD,CA9OY;;;;AAkPbmC,oBAAqB,SAlPR;AAmPbC,oBAAqB,SAnPR;;;;AAuPbC,WAAY,SAvPC;AAwPbC,YAAa,EAxPA;AAyPbC,aAAc,SAzPD;;;;AA6PblG,UAAW,MA7PE;AA8PbI,iBAAkB,MA9PL;AA+Pb+F,aAAc,EA/PD;;;;AAmQbC,gBAAkBnI,WAAa,KAAd,CAAuB,QAAvB,CAAkC,eAnQtC;AAoQboI,cAAgBpI,WAAa,KAAd,CAAuB,EAAvB,CAA4B,EApQ9B;AAqQbqI,iBAAmBrI,WAAa,KAAd,CAAuB,EAAvB,CAA4B,EArQjC;AAsQbsI,cAAgBtI,WAAa,KAAd,CAAuB,SAAvB,CAAmC,MAtQrC;;;AAyQbuI,eAAiBvI,WAAa,KAAd,CAAuB,MAAvB,CAAgC,MAzQnC;;;;AA6QbwI,iBAAmBxI,WAAa,KAAd,CAAuB,CAAvB,CAA2B,CA7QhC;AA8QbyI,YAAc,EAAI,wBAAWC,yBAAX,CAAqC,CAArC,CA9QL;AA+QbC,eAAgB,EA/QH;;AAiRb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CAnRY;;AAqRbmD,WAAY,MArRC;AAsRbC,kBAAmB,SAtRN;AAuRbC,gBAAiB,EAvRJ;AAwRbC,YAAa,SAxRA;AAyRbC,iBAAkB,EAzRL;AA0RbnJ,uBA1Ra;AA2RbH,yBA3Ra;;;AA8RbuJ,8BAA+B,EA9RlB,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;\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: 'rgba(256, 256, 256, 0.3)',\n androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',\n\n // Badge\n badgeBg: '#ED1727',\n badgeColor: '#fff',\n // New Variable\n badgePadding: (platform === 'ios') ? 3 : 0,\n\n // Button\n btnFontFamily: (platform === 'ios') ? 'System' : 'Roboto_medium',\n btnDisabledBg: '#b5b5b5',\n btnDisabledClr: '#f1f1f1',\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 : 14,\n CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1,\n CheckboxFontSize: (platform === 'ios') ? (23 / 0.9) : 18,\n DefaultFontSize: 17,\n checkboxBgColor: '#039BE5',\n checkboxSize: 20,\n checkboxTickColor: '#fff',\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 // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\n\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')\n ? this.fontSizeBase * 1.1\n : 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\n buttonPadding: 6,\n\n get iconSizeLarge() {\n return this.iconFontSize * 1.5;\n },\n get iconSizeSmall() {\n return this.iconFontSize * 0.6;\n },\n\n\n // Card\n cardDefaultBg: '#fff',\n\n\n // Color\n brandPrimary: (platform === 'ios') ? '#007aff' : '#3F51B5',\n brandInfo: '#62B1F6',\n brandSuccess: '#5cb85c',\n brandDanger: '#d9534f',\n brandWarning: '#f0ad4e',\n brandSidebar: '#252932',\n\n\n // Font\n fontFamily: (platform === 'ios') ? 'System' : 'Roboto',\n fontSizeBase: 15,\n\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\n // Footer\n footerHeight: 55,\n footerDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#4179F7',\n\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 // Tab\n tabDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#3F51B5',\n topTabBarTextColor: (platform === 'ios') ? '#6b6b6b' : '#b3c7f9',\n topTabBarActiveTextColor: (platform === 'ios') ? '#007aff' : '#fff',\n topTabActiveBgColor: (platform === 'ios') ? '#cde1f9' : undefined,\n topTabBarBorderColor: (platform === 'ios') ? '#a7a6ab' : '#fff',\n topTabBarActiveBorderColor: (platform === 'ios') ? '#007aff' : '#fff',\n\n\n // Header\n toolbarBtnColor: (platform === 'ios') ? '#007aff' : '#fff',\n toolbarDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#3F51B5',\n toolbarHeight: (platform === 'ios') ? 64 : 56,\n toolbarIconSize: (platform === 'ios') ? 20 : 22,\n toolbarSearchIconSize: (platform === 'ios') ? 20 : 23,\n toolbarInputColor: (platform === 'ios') ? '#CECDD2' : '#fff',\n searchBarHeight: (platform === 'ios') ? 30 : 40,\n toolbarInverseBg: '#222',\n toolbarTextColor: (platform === 'ios') ? '#000' : '#fff',\n toolbarDefaultBorder: (platform === 'ios') ? '#a7a6ab' : '#3F51B5',\n iosStatusbar: (platform === 'ios') ? 'dark-content' : 'light-content',\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n\n // Icon\n iconFamily: 'Ionicons',\n iconFontSize: (platform === 'ios') ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: (platform === 'ios') ? 33 : 24,\n\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: '#D9D5DC',\n inputSuccessBorderColor: '#2b8339',\n inputErrorBorderColor: '#ed2f2f',\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return '#575757';\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: (platform === 'ios') ? 37 : 30,\n lineHeight: (platform === 'ios') ? 20 : 24,\n\n\n // List\n listBorderColor: '#c9c9c9',\n listDividerBg: '#f4f4f4',\n listItemHeight: 45,\n listBtnUnderlayColor: '#DDD',\n\n // Card\n cardBorderColor: '#ccc',\n\n // Changed Variable\n listItemPadding: (platform === 'ios') ? 10 : 12,\n\n listNoteColor: '#808080',\n listNoteSize: 13,\n\n\n // Progress Bar\n defaultProgressColor: '#E4202D',\n inverseProgressColor: '#1A191B',\n\n\n // Radio Button\n radioBtnSize: (platform === 'ios') ? 25 : 23,\n radioSelectedColorAndroid: '#3F51B5',\n\n // New Variable\n radioBtnLineHeight: (platform === 'ios') ? 29 : 24,\n\n radioColor: '#7e7e7e',\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n\n // Spinner\n defaultSpinnerColor: '#45D56E',\n inverseSpinnerColor: '#1A191B',\n\n\n // Tabs\n tabBgColor: '#F8F8F8',\n tabFontSize: 15,\n tabTextColor: '#222222',\n\n\n // Text\n textColor: '#000',\n inverseTextColor: '#fff',\n noteFontSize: 14,\n\n\n // Title\n titleFontfamily: (platform === 'ios') ? 'System' : 'Roboto_medium',\n titleFontSize: (platform === 'ios') ? 17 : 19,\n subTitleFontSize: (platform === 'ios') ? 12 : 14,\n subtitleColor: (platform === 'ios') ? '#8e8e93' : '#FFF',\n\n // New Variable\n titleFontColor: (platform === 'ios') ? '#000' : '#FFF',\n\n\n // Other\n borderRadiusBase: (platform === 'ios') ? 5 : 2,\n borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)),\n contentPadding: 10,\n\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: '#000',\n dropdownLinkColor: '#414142',\n inputLineHeight: 24,\n jumbotronBg: '#C9C9CE',\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30,\n};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../../src/theme/variables/platform.js"],"names":["deviceHeight","get","height","deviceWidth","width","platform","OS","platformStyle","undefined","androidRipple","androidRippleColor","androidRippleColorDark","badgeBg","badgeColor","badgePadding","btnFontFamily","btnDisabledBg","btnDisabledClr","CheckboxRadius","CheckboxBorderWidth","CheckboxPaddingLeft","CheckboxPaddingBottom","CheckboxIconSize","CheckboxIconMarginTop","CheckboxFontSize","DefaultFontSize","checkboxBgColor","checkboxSize","checkboxTickColor","segmentBackgroundColor","segmentActiveBackgroundColor","segmentTextColor","segmentActiveTextColor","segmentBorderColor","segmentBorderColorMain","defaultTextColor","textColor","btnPrimaryBg","brandPrimary","btnPrimaryColor","inverseTextColor","btnInfoBg","brandInfo","btnInfoColor","btnSuccessBg","brandSuccess","btnSuccessColor","btnDangerBg","brandDanger","btnDangerColor","btnWarningBg","brandWarning","btnWarningColor","btnTextSize","fontSizeBase","btnTextSizeLarge","btnTextSizeSmall","borderRadiusLarge","buttonPadding","iconSizeLarge","iconFontSize","iconSizeSmall","cardDefaultBg","brandSidebar","fontFamily","fontSizeH1","fontSizeH2","fontSizeH3","footerHeight","footerDefaultBg","tabBarTextColor","tabBarTextSize","activeTab","sTabBarActiveTextColor","tabBarActiveTextColor","tabActiveBgColor","tabDefaultBg","topTabBarTextColor","topTabBarActiveTextColor","topTabActiveBgColor","topTabBarBorderColor","topTabBarActiveBorderColor","toolbarBtnColor","toolbarDefaultBg","toolbarHeight","toolbarIconSize","toolbarSearchIconSize","toolbarInputColor","searchBarHeight","toolbarInverseBg","toolbarTextColor","toolbarDefaultBorder","iosStatusbar","statusBarColor","darken","hex","iconFamily","iconMargin","iconHeaderSize","inputFontSize","inputBorderColor","inputSuccessBorderColor","inputErrorBorderColor","inputColor","inputColorPlaceholder","inputGroupMarginBottom","inputHeightBase","inputPaddingLeft","inputPaddingLeftIcon","btnLineHeight","lineHeightH1","lineHeightH2","lineHeightH3","iconLineHeight","lineHeight","listBorderColor","listDividerBg","listItemHeight","listBtnUnderlayColor","cardBorderColor","listItemPadding","listNoteColor","listNoteSize","defaultProgressColor","inverseProgressColor","radioBtnSize","radioSelectedColorAndroid","radioBtnLineHeight","radioColor","radioSelectedColor","defaultSpinnerColor","inverseSpinnerColor","tabBgColor","tabFontSize","tabTextColor","noteFontSize","titleFontfamily","titleFontSize","subTitleFontSize","subtitleColor","titleFontColor","borderRadiusBase","borderWidth","getPixelSizeForLayoutSize","contentPadding","darkenHeader","dropdownBg","dropdownLinkColor","inputLineHeight","jumbotronBg","jumbotronPadding","inputGroupRoundedBorderRadius"],"mappings":"yDAAA,4B;;AAEA,yC;;AAEA,GAAMA,cAAe,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,MAA9C;AACA,GAAMC,aAAc,wBAAWF,GAAX,CAAe,QAAf,EAAyBG,KAA7C;AACA,GAAMC,UAAW,sBAASC,EAA1B;AACA,GAAMC,eAAgBC,SAAtB,C;;AAEe;AACbD,2BADa;AAEbF,iBAFa;;AAIbI,cAAe,IAJF;AAKbC,mBAAoB,0BALP;AAMbC,uBAAwB,qBANX;;;AASbC,QAAS,SATI;AAUbC,WAAY,MAVC;;AAYbC,aAAcT,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAZ1B;;;AAebU,cAAeV,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAflC;AAgBbW,cAAe,SAhBF;AAiBbC,eAAgB,SAjBH;;;AAoBbC,eAAgBb,WAAa,KAAb,CAAqB,EAArB,CAA0B,CApB7B;AAqBbc,oBAAqBd,WAAa,KAAb,CAAqB,CAArB,CAAyB,CArBjC;AAsBbe,oBAAqBf,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAtBjC;AAuBbgB,sBAAuBhB,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAvBnC;AAwBbiB,iBAAkBjB,WAAa,KAAb,CAAqB,EAArB,CAA0B,EAxB/B;AAyBbkB,sBAAuBlB,WAAa,KAAb,CAAqBG,SAArB,CAAiC,CAzB3C;AA0BbgB,iBAAkBnB,WAAa,KAAb,CAAqB,GAAK,GAA1B,CAAgC,EA1BrC;AA2BboB,gBAAiB,EA3BJ;AA4BbC,gBAAiB,SA5BJ;AA6BbC,aAAc,EA7BD;AA8BbC,kBAAmB,MA9BN;;;AAiCbC,uBAAwBxB,WAAa,KAAb,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AAY,SA3NC;;AA6Nb,GAAIC,mBAAJ,EAAyB;AACvB,MAAO,oBAAM,KAAKD,UAAX,EAAuBlC,MAAvB,CAA8B,GAA9B,EAAmCC,GAAnC,EAAP;AACD,CA/NY;;;AAkObmC,oBAAqB,SAlOR;AAmObC,oBAAqB,SAnOR;;;AAsObC,WAAY,SAtOC;AAuObC,YAAa,EAvOA;AAwObC,aAAc,SAxOD;;;AA2OblG,UAAW,MA3OE;AA4ObI,iBAAkB,MA5OL;AA6Ob+F,aAAc,EA7OD;;;AAgPbC,gBAAiBnI,WAAa,KAAb,CAAqB,QAArB,CAAgC,eAhPpC;AAiPboI,cAAepI,WAAa,KAAb,CAAqB,EAArB,CAA0B,EAjP5B;AAkPbqI,iBAAkBrI,WAAa,KAAb,CAAqB,EAArB,CAA0B,EAlP/B;AAmPbsI,cAAetI,WAAa,KAAb,CAAqB,SAArB,CAAiC,MAnPnC;;;AAsPbuI,eAAgBvI,WAAa,KAAb,CAAqB,MAArB,CAA8B,MAtPjC;;;AAyPbwI,iBAAkBxI,WAAa,KAAb,CAAqB,CAArB,CAAyB,CAzP9B;AA0PbyI,YAAa,EAAI,wBAAWC,yBAAX,CAAqC,CAArC,CA1PJ;AA2PbC,eAAgB,EA3PH;;AA6Pb,GAAIC,aAAJ,EAAmB;AACjB,MAAO,oBAAM,KAAKb,UAAX,EAAuBtC,MAAvB,CAA8B,IAA9B,EAAoCC,GAApC,EAAP;AACD,CA/PY;;AAiQbmD,WAAY,MAjQC;AAkQbC,kBAAmB,SAlQN;AAmQbC,gBAAiB,EAnQJ;AAoQbC,YAAa,SApQA;AAqQbC,iBAAkB,EArQL;AAsQbnJ,uBAtQa;AAuQbH,yBAvQa;;;AA0QbuJ,8BAA+B,EA1QlB,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;\n\nexport default {\n platformStyle,\n platform,\n // AndroidRipple\n androidRipple: true,\n androidRippleColor: \"rgba(256, 256, 256, 0.3)\",\n androidRippleColorDark: \"rgba(0, 0, 0, 0.15)\",\n\n // Badge\n badgeBg: \"#ED1727\",\n badgeColor: \"#fff\",\n // New Variable\n badgePadding: platform === \"ios\" ? 3 : 0,\n\n // Button\n btnFontFamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n btnDisabledBg: \"#b5b5b5\",\n btnDisabledClr: \"#f1f1f1\",\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 : 14,\n CheckboxIconMarginTop: platform === \"ios\" ? undefined : 1,\n CheckboxFontSize: platform === \"ios\" ? 23 / 0.9 : 18,\n DefaultFontSize: 17,\n checkboxBgColor: \"#039BE5\",\n checkboxSize: 20,\n checkboxTickColor: \"#fff\",\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 // New Variable\n get defaultTextColor() {\n return this.textColor;\n },\n\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\n buttonPadding: 6,\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\n // Color\n brandPrimary: platform === \"ios\" ? \"#007aff\" : \"#3F51B5\",\n brandInfo: \"#62B1F6\",\n brandSuccess: \"#5cb85c\",\n brandDanger: \"#d9534f\",\n brandWarning: \"#f0ad4e\",\n brandSidebar: \"#252932\",\n\n // Font\n fontFamily: platform === \"ios\" ? \"System\" : \"Roboto\",\n fontSizeBase: 15,\n\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\" : \"#4179F7\",\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 // Tab\n tabDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n topTabBarTextColor: platform === \"ios\" ? \"#6b6b6b\" : \"#b3c7f9\",\n topTabBarActiveTextColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n topTabActiveBgColor: platform === \"ios\" ? \"#cde1f9\" : undefined,\n topTabBarBorderColor: platform === \"ios\" ? \"#a7a6ab\" : \"#fff\",\n topTabBarActiveBorderColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n\n // Header\n toolbarBtnColor: platform === \"ios\" ? \"#007aff\" : \"#fff\",\n toolbarDefaultBg: platform === \"ios\" ? \"#F8F8F8\" : \"#3F51B5\",\n toolbarHeight: platform === \"ios\" ? 64 : 56,\n toolbarIconSize: platform === \"ios\" ? 20 : 22,\n toolbarSearchIconSize: platform === \"ios\" ? 20 : 23,\n toolbarInputColor: platform === \"ios\" ? \"#CECDD2\" : \"#fff\",\n searchBarHeight: platform === \"ios\" ? 30 : 40,\n toolbarInverseBg: \"#222\",\n toolbarTextColor: platform === \"ios\" ? \"#000\" : \"#fff\",\n toolbarDefaultBorder: platform === \"ios\" ? \"#a7a6ab\" : \"#3F51B5\",\n iosStatusbar: platform === \"ios\" ? \"dark-content\" : \"light-content\",\n get statusBarColor() {\n return color(this.toolbarDefaultBg).darken(0.2).hex();\n },\n\n // Icon\n iconFamily: \"Ionicons\",\n iconFontSize: platform === \"ios\" ? 30 : 28,\n iconMargin: 7,\n iconHeaderSize: platform === \"ios\" ? 33 : 24,\n\n // InputGroup\n inputFontSize: 17,\n inputBorderColor: \"#D9D5DC\",\n inputSuccessBorderColor: \"#2b8339\",\n inputErrorBorderColor: \"#ed2f2f\",\n\n get inputColor() {\n return this.textColor;\n },\n get inputColorPlaceholder() {\n return \"#575757\";\n },\n\n inputGroupMarginBottom: 10,\n inputHeightBase: 50,\n inputPaddingLeft: 5,\n\n get inputPaddingLeftIcon() {\n return this.inputPaddingLeft * 8;\n },\n\n // Line Height\n btnLineHeight: 19,\n lineHeightH1: 32,\n lineHeightH2: 27,\n lineHeightH3: 22,\n iconLineHeight: platform === \"ios\" ? 37 : 30,\n lineHeight: platform === \"ios\" ? 20 : 24,\n\n // List\n listBorderColor: \"#c9c9c9\",\n listDividerBg: \"#f4f4f4\",\n listItemHeight: 45,\n listBtnUnderlayColor: \"#DDD\",\n\n // Card\n cardBorderColor: \"#ccc\",\n\n // Changed Variable\n listItemPadding: platform === \"ios\" ? 10 : 12,\n\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\n // New Variable\n radioBtnLineHeight: platform === \"ios\" ? 29 : 24,\n\n radioColor: \"#7e7e7e\",\n\n get radioSelectedColor() {\n return color(this.radioColor).darken(0.2).hex();\n },\n\n // Spinner\n defaultSpinnerColor: \"#45D56E\",\n inverseSpinnerColor: \"#1A191B\",\n\n // Tabs\n tabBgColor: \"#F8F8F8\",\n tabFontSize: 15,\n tabTextColor: \"#222222\",\n\n // Text\n textColor: \"#000\",\n inverseTextColor: \"#fff\",\n noteFontSize: 14,\n\n // Title\n titleFontfamily: platform === \"ios\" ? \"System\" : \"Roboto_medium\",\n titleFontSize: platform === \"ios\" ? 17 : 19,\n subTitleFontSize: platform === \"ios\" ? 12 : 14,\n subtitleColor: platform === \"ios\" ? \"#8e8e93\" : \"#FFF\",\n\n // New Variable\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\n get darkenHeader() {\n return color(this.tabBgColor).darken(0.03).hex();\n },\n\n dropdownBg: \"#000\",\n dropdownLinkColor: \"#414142\",\n inputLineHeight: 24,\n jumbotronBg: \"#C9C9CE\",\n jumbotronPadding: 30,\n deviceWidth,\n deviceHeight,\n\n // New Variable\n inputGroupRoundedBorderRadius: 30\n};\n"]} \ No newline at end of file diff --git a/dist/src/ui/index.js b/dist/src/ui/index.js index c7aece3f1..d7dc96ad9 100644 --- a/dist/src/ui/index.js +++ b/dist/src/ui/index.js @@ -1,7 +1,7 @@ -Object.defineProperty(exports,"__esModule",{value:true});exports.mapPropsToStyleNames=undefined;var _Content=require('../basic/Content'); -var _STabs=require('../smart/STabs'); -var _SButton=require('../smart/SButton'); -var _SHeader=require('../smart/SHeader'); +Object.defineProperty(exports,"__esModule",{value:true});exports.mapPropsToStyleNames=undefined;var _Content=require("../basic/Content"); +var _STabs=require("../smart/STabs"); +var _SButton=require("../smart/SButton"); +var _SHeader=require("../smart/SHeader"); module.exports={ Tabs:_STabs.STabs, diff --git a/dist/src/ui/index.js.map b/dist/src/ui/index.js.map index 26901125b..4d7b0cc3a 100644 --- a/dist/src/ui/index.js.map +++ b/dist/src/ui/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/ui/index.js"],"names":["module","exports","Tabs","TabContent","Button","Header","mapPropsToStyleNames","styleNames","props","_","keys"],"mappings":"gGAAA;AACA;AACA;AACA;;AAEAA,OAAOC,OAAP,CAAiB;AAChBC,iBADgB;AAEhBC,2BAFgB;AAGhBC,uBAHgB;AAIhBC,uBAJgB,CAAjB;;;AAOA,GAAMC,sBAAuB,QAAvBA,qBAAuB,CAACC,UAAD,CAAaC,KAAb,QAAuBC,GAAEC,IAAF,CAAOF,KAAP,CAAvB,EAA7B,C;;AAESF,oB,CAAAA,oB","file":"index.js","sourcesContent":["import { Content as TabContent } from '../basic/Content';\nimport { STabs as Tabs } from '../smart/STabs';\nimport { SButton as Button } from '../smart/SButton';\nimport { SHeader as Header } from '../smart/SHeader';\n\nmodule.exports = {\n\tTabs,\n\tTabContent,\n\tButton,\n\tHeader,\n};\n\nconst mapPropsToStyleNames = (styleNames, props) => _.keys(props);\n\nexport { mapPropsToStyleNames };\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/ui/index.js"],"names":["module","exports","Tabs","TabContent","Button","Header","mapPropsToStyleNames","styleNames","props","_","keys"],"mappings":"gGAAA;AACA;AACA;AACA;;AAEAA,OAAOC,OAAP,CAAiB;AACfC,iBADe;AAEfC,2BAFe;AAGfC,uBAHe;AAIfC,uBAJe,CAAjB;;;AAOA,GAAMC,sBAAuB,QAAvBA,qBAAuB,CAACC,UAAD,CAAaC,KAAb,QAAuBC,GAAEC,IAAF,CAAOF,KAAP,CAAvB,EAA7B,C;;AAESF,oB,CAAAA,oB","file":"index.js","sourcesContent":["import { Content as TabContent } from \"../basic/Content\";\nimport { STabs as Tabs } from \"../smart/STabs\";\nimport { SButton as Button } from \"../smart/SButton\";\nimport { SHeader as Header } from \"../smart/SHeader\";\n\nmodule.exports = {\n Tabs,\n TabContent,\n Button,\n Header\n};\n\nconst mapPropsToStyleNames = (styleNames, props) => _.keys(props);\n\nexport { mapPropsToStyleNames };\n"]} \ No newline at end of file diff --git a/ejectTheme.js b/ejectTheme.js index 7bbfece60..e4855c685 100644 --- a/ejectTheme.js +++ b/ejectTheme.js @@ -1,34 +1,40 @@ -var fs = require('fs-extra'); -var path = require('path'); - -var printMessage = require('print-message'); +var fs = require("fs-extra"); +var path = require("path"); +var printMessage = require("print-message"); try { - fs.copySync(path.join(__dirname, 'src', 'theme'), path.join(process.cwd(), 'native-base-theme')); - printMessage([ - 'NativeBase theme has been copied at ' + path.join(process.cwd(), 'native-base-theme'), - 'Here\'s how to theme your app', - '', - 'import getTheme from \'./native-base-theme/components\';', - 'export default class ThemeExample extends Component {', - 'render() {', - ' return (', - ' ', - ' ', - ' ', - ' ...', - ' ', - ' ', - ' ', - ' );', - '}', - '', - 'Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization', - ], { - color: 'yellow', - borderColor: 'green', - }); -} catch(err) { - console.log('Error: ' + err); + fs.copySync( + path.join(__dirname, "src", "theme"), + path.join(process.cwd(), "native-base-theme") + ); + printMessage( + [ + "NativeBase theme has been copied at " + + path.join(process.cwd(), "native-base-theme"), + "Here's how to theme your app", + "", + "import getTheme from './native-base-theme/components';", + "export default class ThemeExample extends Component {", + "render() {", + " return (", + " ", + " ", + " ", + " ...", + " ", + " ", + " ", + " );", + "}", + "", + "Head over to the docs (http://docs.nativebase.io/CUSTOMIZE.html#Customize) for detailed information on customization" + ], + { + color: "yellow", + borderColor: "green" + } + ); +} catch (err) { + console.log("Error: " + err); } diff --git a/index.d.ts b/index.d.ts index b5c014033..027827224 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,296 +1,301 @@ -import * as React from 'react'; -import * as ReactNative from 'react-native'; - -declare module 'native-base' { - namespace NativeBase { - - interface Text extends ReactNative.TextProperties { - note?: boolean, - uppercase?: boolean - } +import * as React from "react"; +import * as ReactNative from "react-native"; + +declare module "native-base" { + namespace NativeBase { + interface Text extends ReactNative.TextProperties { + note?: boolean; + uppercase?: boolean; + } - interface Switch extends ReactNative.SwitchProperties { } + interface Switch extends ReactNative.SwitchProperties {} - interface View extends ReactNative.ViewProperties { - padder?: boolean, - } + interface View extends ReactNative.ViewProperties { + padder?: boolean; + } - interface Picker extends ReactNative.PickerProperties { - iosHeader?: string, - inlineLabel?: boolean, - } + interface Picker extends ReactNative.PickerProperties { + iosHeader?: string; + inlineLabel?: boolean; + } - interface H1 extends ReactNative.TextProperties { } - /** + interface H1 extends ReactNative.TextProperties {} + /** * see Widget Text.js */ - interface H2 extends ReactNative.TextProperties { } - /** + interface H2 extends ReactNative.TextProperties {} + /** * see Widget Text.js */ - interface H3 extends ReactNative.TextProperties { } - /** + interface H3 extends ReactNative.TextProperties {} + /** * see Widget Text.js */ - interface BsStyle{ - success?:boolean, - primary?:boolean, - danger?: boolean, - warning?: boolean, - info?: boolean, - } - - interface Badge extends ReactNative.ViewProperties,BsStyle { - } - /** + interface BsStyle { + success?: boolean; + primary?: boolean; + danger?: boolean; + warning?: boolean; + info?: boolean; + } + + interface Badge extends ReactNative.ViewProperties, BsStyle {} + /** * see Widget CardSwiper.js */ - interface CardSwiper { } - /** + interface CardSwiper {} + /** * see Widget DeckSwiper.js */ - interface DeckSwiper { - /** + interface DeckSwiper { + /** * Array */ - dataSource?: Array, - /** + dataSource?: Array; + /** * Direction of iteration for elements * Default: iterates in backward direction */ - onSwipeLeft?: Function, - /** + onSwipeLeft?: Function; + /** * Direction of iteration for elements * Default: iterates in forward direction */ - onSwipeRight?: Function, - /** + onSwipeRight?: Function; + /** * Takes a data entry from the data source and should return a renderable component to be rendered as the row. */ - renderItem?: Function - } - /** + renderItem?: Function; + } + /** * see Widget Header.js */ - interface Header { - /** + interface Header { + /** * Prop to be used with
component to have Search bar onto the Header section of your screen. */ - searchBar?: boolean, - /** + searchBar?: boolean; + /** * Wraps the search bar with predefined border options. * Default: regular */ - rounded?: boolean, - style?: ReactNative.ViewStyle, - /** + rounded?: boolean; + style?: ReactNative.ViewStyle; + /** * It is advisable to use hasTabs prop with Header while using Tab */ - hasTabs?:boolean - } + hasTabs?: boolean; + } - interface Left{ - style?: ReactNative.ViewStyle - } + interface Left { + style?: ReactNative.ViewStyle; + } - interface Body{ - style?: ReactNative.ViewStyle - } + interface Body { + style?: ReactNative.ViewStyle; + } - interface Right{ - style?: ReactNative.ViewStyle - } + interface Right { + style?: ReactNative.ViewStyle; + } - /** + /** * see Widget FooterTab.js */ - interface FooterTab { - style?: ReactNative.ViewStyle - } - /** + interface FooterTab { + style?: ReactNative.ViewStyle; + } + /** * see Widget Footer.js */ - interface Footer { - style?: ReactNative.ViewStyle - } - /** + interface Footer { + style?: ReactNative.ViewStyle; + } + /** * see Widget Title.js */ - interface Title { - style?: ReactNative.ViewStyle - } - /** + interface Title { + style?: ReactNative.ViewStyle; + } + /** * see Widget Subtitle/index.js */ - interface SubTitle { - style?: ReactNative.ViewStyle - } - /** + interface SubTitle { + style?: ReactNative.ViewStyle; + } + /** * see Widget Container.js */ - interface Container { - /** + interface Container { + /** * The theme prop can be applied to any component of NativeBase. */ - theme?: Object, - style?: ReactNative.ViewStyle - } - /** + theme?: Object; + style?: ReactNative.ViewStyle; + } + /** * see Widget Content.js */ - interface Content { - /** + interface Content { + /** * The theme prop can be applied to any component of NativeBase. */ - theme?: Object, - padder?: boolean, - style?: ReactNative.ViewStyle - } - /** + theme?: Object; + padder?: boolean; + style?: ReactNative.ViewStyle; + } + /** * see Widget Button.js */ - interface Button extends ReactNative.TouchableOpacityProperties,BsStyle { - /** + interface Button extends ReactNative.TouchableOpacityProperties, BsStyle { + /** * Defines button style */ - style?: ReactNative.ViewStyle, - /** + style?: ReactNative.ViewStyle; + /** * Defines button text style */ - textStyle?: ReactNative.TextStyle, - /** + textStyle?: ReactNative.TextStyle; + /** * Block level button */ - block?: boolean, - //primary?: boolean, - /** + block?: boolean; + //primary?: boolean, + /** * Gives you effect of Icon-buttons. * To have button with transparent background, include this prop. */ - transparent?: boolean, - //success?: boolean, - //danger?: boolean, - // warning?: boolean, - //info?: boolean, - color?: string, - /** + transparent?: boolean; + //success?: boolean, + //danger?: boolean, + // warning?: boolean, + //info?: boolean, + color?: string; + /** * Applies outline button style. */ - bordered?: boolean, - /** + bordered?: boolean; + /** * Renders button with slightly round shaped edges. */ - rounded?: boolean, - /** + rounded?: boolean; + /** * For large size button */ - large?: boolean, - /** + large?: boolean; + /** * For small size button */ - small?: boolean, - /** + small?: boolean; + /** * Used for Icon alignment. * Aligns icon to the left in button. * By default, icons are aligned to the left in button. */ - iconLeft?: boolean, - /** + iconLeft?: boolean; + /** * Used for Icon alignment. * Aligns icon to the right in button. */ - iconRight?: boolean, - /** + iconRight?: boolean; + /** * Disables onPress option for button */ - disabled?: boolean, - active?: boolean, - inputButton?: boolean, - full?:boolean, - light?:boolean, - dark?:boolean - } - /** + disabled?: boolean; + active?: boolean; + inputButton?: boolean; + full?: boolean; + light?: boolean; + dark?: boolean; + } + /** * see Widget List.js */ - interface List extends ReactListViewProperties{ - listBorderColor?: string, - listDividerBg?: string, - listNoteColor?: string, - listItemPadding?: number, - listNoteSize?: number, - listItemHeight?: number, - inset?: boolean, - /** + interface List extends ReactListViewProperties { + listBorderColor?: string; + listDividerBg?: string; + listNoteColor?: string; + listItemPadding?: number; + listNoteSize?: number; + listItemHeight?: number; + inset?: boolean; + /** * Array of data chunks to render iteratively. */ - dataArray?: Array, - renderRow?: ( rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean ) => React.ReactElement, - } - /** + dataArray?: Array; + renderRow?: ( + rowData: any, + sectionID: string | number, + rowID: string | number, + highlightRow?: boolean + ) => React.ReactElement; + } + /** * see Widget ListItem.js */ - interface ListItem extends ReactNative.TouchableOpacityProperties { - header?: boolean, - /** + interface ListItem extends ReactNative.TouchableOpacityProperties { + header?: boolean; + /** * Aligns icon to the right of ListItem. * Default: false */ - iconRight?: boolean, - /** + iconRight?: boolean; + /** * Aligns icon to the left of ListItem. * Default: true */ - iconLeft?: boolean, - icon?:boolean, - button?: boolean, - /** + iconLeft?: boolean; + icon?: boolean; + button?: boolean; + /** * Helps to organize and group the list items. */ - itemDivider?: boolean, - /** + itemDivider?: boolean; + /** * Sub caption for List Item. */ - note?: string, - itemHeader?:boolean, - first?:boolean, - selected?:boolean - } + note?: string; + itemHeader?: boolean; + first?: boolean; + selected?: boolean; + } - interface Separator{ - bordered?:boolean, - } + interface Separator { + bordered?: boolean; + } - /** + /** * see Widget CardItem.js */ - interface CardItem extends ReactNative.TouchableOpacityProperties { - header?: boolean, - footer?:boolean, - cardBody?: boolean, - button?: boolean - } - /** + interface CardItem extends ReactNative.TouchableOpacityProperties { + header?: boolean; + footer?: boolean; + cardBody?: boolean; + button?: boolean; + } + /** * Override React ListViewProperties */ - interface ReactListViewProperties extends ReactNative.ScrollViewProperties, React.Props { - /** + interface ReactListViewProperties extends ReactNative.ScrollViewProperties, React.Props< + ReactNative.ListViewStatic + > { + /** * Flag indicating whether empty section headers should be rendered. * In the future release empty section headers will be rendered by * default, and the flag will be deprecated. If empty sections are not * desired to be rendered their indices should be excluded from * sectionID object. */ - enableEmptySections?: boolean + enableEmptySections?: boolean; - /** + /** * How many rows to render on initial component mount. Use this to make * it so that the first screen worth of data apears at one time instead of * over the course of multiple frames. */ - initialListSize?: number + initialListSize?: number; - /** + /** * (visibleRows, changedRows) => void * * Called when the set of visible rows changes. `visibleRows` maps @@ -299,33 +304,40 @@ declare module 'native-base' { * that have changed their visibility, with true indicating visible, and * false indicating the view has moved out of view. */ - onChangeVisibleRows?: (visibleRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>, changedRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>) => void + onChangeVisibleRows?: ( + visibleRows: Array< + { [sectionId: string]: { [rowID: string]: boolean } } + >, + changedRows: Array< + { [sectionId: string]: { [rowID: string]: boolean } } + > + ) => void; - /** + /** * Called when all rows have been rendered and the list has been scrolled * to within onEndReachedThreshold of the bottom. The native scroll * event is provided. */ - onEndReached?: () => void + onEndReached?: () => void; - /** + /** * Threshold in pixels for onEndReached. */ - onEndReachedThreshold?: number + onEndReachedThreshold?: number; - /** + /** * Number of rows to render per event loop. */ - pageSize?: number + pageSize?: number; - /** + /** * A performance optimization for improving scroll perf of * large lists, used in conjunction with overflow: 'hidden' on the row * containers. Use at your own risk. */ - removeClippedSubviews?: boolean + removeClippedSubviews?: boolean; - /** + /** * () => renderable * * The header and footer are always rendered (if these props are provided) @@ -333,9 +345,9 @@ declare module 'native-base' { * in StaticContainer or other mechanism as appropriate. Footer is always * at the bottom of the list, and header at the top, on every render pass. */ - renderFooter?: () => React.ReactElement + renderFooter?: () => React.ReactElement; - /** + /** * () => renderable * * The header and footer are always rendered (if these props are provided) @@ -343,25 +355,31 @@ declare module 'native-base' { * in StaticContainer or other mechanism as appropriate. Footer is always * at the bottom of the list, and header at the top, on every render pass. */ - renderHeader?: () => React.ReactElement + renderHeader?: () => React.ReactElement; - /** + /** * (rowData, sectionID, rowID) => renderable * Takes a data entry from the data source and its ids and should return * a renderable component to be rendered as the row. By default the data * is exactly what was put into the data source, but it's also possible to * provide custom extractors. */ - renderRow?: (rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean) => React.ReactElement - + renderRow?: ( + rowData: any, + sectionID: string | number, + rowID: string | number, + highlightRow?: boolean + ) => React.ReactElement; - /** + /** * A function that returns the scrollable component in which the list rows are rendered. * Defaults to returning a ScrollView with the given props. */ - renderScrollComponent?: (props: ReactNative.ScrollViewProperties) => React.ReactElement + renderScrollComponent?: ( + props: ReactNative.ScrollViewProperties + ) => React.ReactElement; - /** + /** * (sectionData, sectionID) => renderable * * If provided, a sticky header is rendered for this section. The sticky @@ -370,24 +388,30 @@ declare module 'native-base' { * stick to the top until it is pushed off the screen by the next section * header. */ - renderSectionHeader?: (sectionData: any, sectionId: string | number) => React.ReactElement + renderSectionHeader?: ( + sectionData: any, + sectionId: string | number + ) => React.ReactElement; - - /** + /** * (sectionID, rowID, adjacentRowHighlighted) => renderable * If provided, a renderable component to be rendered as the separator below each row * but not the last row if there is a section header below. * Take a sectionID and rowID of the row above and whether its adjacent row is highlighted. */ - renderSeparator?: (sectionID: string | number, rowID: string | number, adjacentRowHighlighted?: boolean) => React.ReactElement + renderSeparator?: ( + sectionID: string | number, + rowID: string | number, + adjacentRowHighlighted?: boolean + ) => React.ReactElement; - /** + /** * How early to start rendering rows before they come on screen, in * pixels. */ - scrollRenderAheadDistance?: number + scrollRenderAheadDistance?: number; - /** + /** * An array of child indices determining which children get docked to the * top of the screen when scrolling. For example, passing * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the @@ -395,231 +419,232 @@ declare module 'native-base' { * with `horizontal={true}`. * @platform ios */ - stickyHeaderIndices?: number[] + stickyHeaderIndices?: number[]; - ref?: React.Ref - } - /** + ref?: React.Ref< + ReactNative.ListViewStatic & + ReactNative.ScrollViewStatic & + ReactNative.ViewStatic + >; + } + /** * see Widget Card.js */ - interface Card extends ReactNative.ViewProperties, ReactListViewProperties { - dataArray?: Array, - style?: ReactNative.ViewStyle, - ref?: React.Ref, - } - /** + interface Card extends ReactNative.ViewProperties, ReactListViewProperties { + dataArray?: Array; + style?: ReactNative.ViewStyle; + ref?: React.Ref; + } + /** * react-native-easy-grid */ - interface Grid extends ReactNative.ViewProperties { } - interface Row extends ReactNative.ViewProperties { size?: number } - interface Col extends ReactNative.ViewProperties { size?: number } - /** + interface Grid extends ReactNative.ViewProperties {} + interface Row extends ReactNative.ViewProperties { size?: number } + interface Col extends ReactNative.ViewProperties { size?: number } + /** * see Widget InputGroup.js */ - interface InputGroup extends ReactNative.ViewProperties { - /** + interface InputGroup extends ReactNative.ViewProperties { + /** * Wraps the textbox with predefined border options. * Default: underline */ - borderType?: 'rounded' | 'regular' | 'underline', - toolbar?: boolean, - atoolbar?: boolean, - /** + borderType?: "rounded" | "regular" | "underline"; + toolbar?: boolean; + atoolbar?: boolean; + /** * If true, the icon in the input text box appears to the right. * Default: true */ - iconRight?: boolean, - /** + iconRight?: boolean; + /** * The border color of textbox for valid input. */ - success?: boolean, - /** + success?: boolean; + /** * The border color of textbox for invalid input. */ - error?: boolean, - /** + error?: boolean; + /** * Disables inputting data. */ - disabled?: boolean, - regular?:boolean, - underline?:boolean, - rounded?:boolean - } - /** + disabled?: boolean; + regular?: boolean; + underline?: boolean; + rounded?: boolean; + } + /** * see Widget Input.js */ - interface Input extends ReactNative.TextInputProperties { - label?: string, - /** + interface Input extends ReactNative.TextInputProperties { + label?: string; + /** * Label placed to the left of the input element. * When the user enters text, the label does not hide. * This can also be used along with placeholder. */ - inlineLabel?: boolean, - /** + inlineLabel?: boolean; + /** * Places the label on top of the input element which appears like a stack. * This can also be used along with placeholder. */ - stackedLabel?: boolean - } - /** + stackedLabel?: boolean; + } + /** * see Widget Textarea.js */ - interface Textarea extends ReactNative.TextInputProperties { - rowSpan: number; - } - - interface Label{ + interface Textarea extends ReactNative.TextInputProperties { + rowSpan: number; + } - } - /** + interface Label {} + /** * see Widget Icon.js */ - interface Icon { - name: string, - style?: ReactNative.TextStyle, - active?:boolean - } - /** + interface Icon { + name: string; + style?: ReactNative.TextStyle; + active?: boolean; + } + /** * see Widget Icon.js */ - interface Thumbnail extends ReactNative.ImageProperties { - /** + interface Thumbnail extends ReactNative.ImageProperties { + /** * Dimension of thumbnail. * Default: 30 */ - size?: number, - /** + size?: number; + /** * Represents shape of thumbnail. * By default thumbnail is circle in shape. */ - circular?: boolean, - /** + circular?: boolean; + /** * Represents shape of thumbnail. * By default thumbnail is circle in shape. */ - square?: boolean - } - /** + square?: boolean; + } + /** * see Widget Spinner.js */ - interface Spinner extends ReactNative.ActivityIndicatorProperties { - inverse?: boolean - } - /** + interface Spinner extends ReactNative.ActivityIndicatorProperties { + inverse?: boolean; + } + /** * see Widget CheckBox.js */ - interface CheckBox { - checked?: boolean - } - /** + interface CheckBox { + checked?: boolean; + } + /** * see Widget CheckBox.js */ - interface Radio extends ReactNative.TouchableOpacityProperties { - selected?: boolean - } - /** + interface Radio extends ReactNative.TouchableOpacityProperties { + selected?: boolean; + } + /** * see Widget ProgressBar.js */ - interface ProgressBar { - progress?: number, - color?: string, - inverse?: boolean - } - /** + interface ProgressBar { + progress?: number; + color?: string; + inverse?: boolean; + } + /** * vendor react-native-drawer */ - interface DrawerStyles { - drawer?: ReactNative.ViewStyle, - main?: ReactNative.ViewStyle, - drawerOverlay?: ReactNative.ViewStyle, - mainOverlay?: ReactNative.ViewStyle - } - interface Drawer { - acceptDoubleTap?: boolean, - acceptPan?: boolean, - acceptTap?: boolean, - captureGestures?: boolean, - children?: any, - open?: boolean, - closedDrawerOffset?: number, - content?: any, - deviceScreen?: ReactNative.ScaledSize, - disabled?: boolean, - initializeOpen?: boolean, - negotiatePan?: boolean, - onClose?: Function, - onCloseStart?: Function, - onOpen?: Function, - onOpenStart?: Function, - openDrawerOffset?: number, - openDrawerThreshold?: number, - panCloseMask?: number, - panOpenMask?: number, - panStartCompensation?: boolean, - relativeDrag?: boolean, - side?: 'left' | 'right', - styles?: DrawerStyles, - tapToClose?: boolean, - tweenDuration?: number, - tweenEasing?: string, - tweenHandler?: Function, - type?: 'overlay' | 'static' | 'displace', - } - /** + interface DrawerStyles { + drawer?: ReactNative.ViewStyle; + main?: ReactNative.ViewStyle; + drawerOverlay?: ReactNative.ViewStyle; + mainOverlay?: ReactNative.ViewStyle; + } + interface Drawer { + acceptDoubleTap?: boolean; + acceptPan?: boolean; + acceptTap?: boolean; + captureGestures?: boolean; + children?: any; + open?: boolean; + closedDrawerOffset?: number; + content?: any; + deviceScreen?: ReactNative.ScaledSize; + disabled?: boolean; + initializeOpen?: boolean; + negotiatePan?: boolean; + onClose?: Function; + onCloseStart?: Function; + onOpen?: Function; + onOpenStart?: Function; + openDrawerOffset?: number; + openDrawerThreshold?: number; + panCloseMask?: number; + panOpenMask?: number; + panStartCompensation?: boolean; + relativeDrag?: boolean; + side?: "left" | "right"; + styles?: DrawerStyles; + tapToClose?: boolean; + tweenDuration?: number; + tweenEasing?: string; + tweenHandler?: Function; + type?: "overlay" | "static" | "displace"; + } + /** * see Widget Tabs.js */ - interface Tabs { - tabBarPosition?: 'top' | 'bottom', - edgeHitWidth?: number, - springTension?: number, - springFriction?: number - } - - interface Tab { - heading:TabHeading, - - } - interface TabHeading { - activeTabStyle?:ReactNative.ViewStyle, - textStyle?:ReactNative.TextStyle, - activeTextStyle?:ReactNative.TextStyle - } - - interface Item { - fixedLabel?: boolean, - floatingLabel?: boolean, - inlineLabel?: boolean, - stackedLabel?: boolean, - placeholderLabel?: boolean, - bordered?: boolean, - regular?: boolean, - underline?: boolean, - rounded?: boolean, - disabled?: boolean, - error?: boolean, - placeholder?: string, - secureTextEntry?: boolean, - success?: boolean, - last?: boolean, - } - - interface Form { - style?: ReactNative.ViewStyle - } - - interface Fab { - active?:boolean, - direction?:"down"|"up"|"left"|"right", - containerStyle?:ReactNative.ViewStyle, - onPress?:()=>void, - position?:'topLeft'|'topRight'|'bottomLeft'|'bottomRight', - style?:ReactNative.ViewStyle - } - } - - // Export definitions - /** + interface Tabs { + tabBarPosition?: "top" | "bottom"; + edgeHitWidth?: number; + springTension?: number; + springFriction?: number; + } + + interface Tab { + heading: TabHeading; + } + interface TabHeading { + activeTabStyle?: ReactNative.ViewStyle; + textStyle?: ReactNative.TextStyle; + activeTextStyle?: ReactNative.TextStyle; + } + + interface Item { + fixedLabel?: boolean; + floatingLabel?: boolean; + inlineLabel?: boolean; + stackedLabel?: boolean; + placeholderLabel?: boolean; + bordered?: boolean; + regular?: boolean; + underline?: boolean; + rounded?: boolean; + disabled?: boolean; + error?: boolean; + placeholder?: string; + secureTextEntry?: boolean; + success?: boolean; + last?: boolean; + } + + interface Form { + style?: ReactNative.ViewStyle; + } + + interface Fab { + active?: boolean; + direction?: "down" | "up" | "left" | "right"; + containerStyle?: ReactNative.ViewStyle; + onPress?: () => void; + position?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight"; + style?: ReactNative.ViewStyle; + } + } + + // Export definitions + /** * NativeBase.Container * * Provides its own frame component, named after . @@ -629,8 +654,8 @@ declare module 'native-base' { * Usage of Container's Header component is very similar to your HTML . * The Content component of Container is nothing but the body section of your screen. */ - export class Container extends React.Component { } - /** + export class Container extends React.Component {} + /** * NativeBase.Header * * NativeBase component that renders as Header (navbar) for your screen. @@ -643,8 +668,8 @@ declare module 'native-base' { * User can add custom styles while defining
within their app. * Replacing Component: React Native */ - export class Header extends React.Component { } - /** + export class Header extends React.Component {} + /** * NativeBase.Content * * This is a NativeBase component which renders as body element of your screen. @@ -654,33 +679,33 @@ declare module 'native-base' { * User can add custom styles while defining within their app. * Replacing Component: React Native */ - /** + /** * NativeBase.Left */ - export class Left extends React.Component { } - /** + export class Left extends React.Component {} + /** * NativeBase.Right */ - export class Right extends React.Component { } - /** + export class Right extends React.Component {} + /** * NativeBase.Body */ - export class Body extends React.Component { } + export class Body extends React.Component {} - export class Content extends React.Component { } - /** + export class Content extends React.Component {} + /** * NativeBase.FooterTab */ - export class FooterTab extends React.Component { } - /** + export class FooterTab extends React.Component {} + /** * NativeBase.Footer */ - export class Footer extends React.Component { } - /** + export class Footer extends React.Component {} + /** * NativeBase.Title */ - export class Title extends React.Component { } - /** + export class Title extends React.Component {} + /** * NativeBase.Button * * Provides Button component which is readily not available in React Native. @@ -692,34 +717,37 @@ declare module 'native-base' { * NativeBase has provided its users with enormous list of props that can be used with Button. * Replacing Component: React Native */ - export class Button extends React.Component { } - /** + export class Button extends React.Component {} + /** * NativeBase.View */ - export class View extends React.Component { } - /** + export class View extends React.Component {} + /** * NativeBase.Text */ - export class Text extends React.Component { } - /** + export class Text extends React.Component {} + /** * NativeBase.Switch */ - export class Switch extends React.Component { } - /** + export class Switch extends React.Component {} + /** * NativeBase.Picker */ - export class Picker extends React.Component { } - namespace Picker { - export class Item extends React.Component { } - } - /** + export class Picker extends React.Component {} + namespace Picker { + export class Item extends React.Component< + ReactNative.PickerItemProperties, + any + > {} + } + /** * NativeBase.List * * A base component for specifying lists of information. List must contain one or more list elements. * Props provide configurability for several features. Provides a number of attributes that follows styling and interaction guidelines for each platform, so that they are intuitive for users to interact with. */ - export class List extends React.Component { } - /** + export class List extends React.Component {} + /** * NativeBase.ListItem * * • This is the child component of List. @@ -727,60 +755,60 @@ declare module 'native-base' { * • Adds border at bottom of each ListItem. * • List takes any number of ListItem. */ - export class ListItem extends React.Component { } - /** + export class ListItem extends React.Component {} + /** * NativeBase.H1 */ - export class H1 extends React.Component { } - /** + export class H1 extends React.Component {} + /** * NativeBase.H2 */ - export class H2 extends React.Component { } - /** + export class H2 extends React.Component {} + /** * NativeBase.H3 */ - export class H3 extends React.Component { } - /** + export class H3 extends React.Component {} + /** * NativeBase.Row */ - export class Row extends React.Component { } - /** + export class Row extends React.Component {} + /** * NativeBase.Col */ - export class Col extends React.Component { } - /** + export class Col extends React.Component {} + /** * NativeBase.Grid */ - export class Grid extends React.Component { } - /** + export class Grid extends React.Component {} + /** * NativeBase.InputGroup * * A foundational component for inputting text into the app via a keyboard. * Props provide configurability for several features, such as auto-correction, auto-capitalization, placeholder text, and different keyboard types, such as a numeric keypad. * Provides a number of attributes that follows styling and interaction guidelines for each platform, so that they are intuitive for users to interact with. */ - export class InputGroup extends React.Component { } - /** + export class InputGroup extends React.Component {} + /** * NativeBase.Input */ - export class Input extends React.Component { } - /** + export class Input extends React.Component {} + /** * NativeBase.Textarea */ - export class Textarea extends React.Component { } - /** + export class Textarea extends React.Component {} + /** * NativeBase.Icon */ - export class Icon extends React.Component { } - /** + export class Icon extends React.Component {} + /** * NativeBase.Thumbnail * * Thumbnail component works very similar to Image. * It helps you to showcase an image with variuos dimensions and shapes. * By default, Thumbnail renders an image in circular shape. */ - export class Thumbnail extends React.Component { } - /** + export class Thumbnail extends React.Component {} + /** * NativeBase.Card * * Card is a flexible and extensible content container. @@ -788,100 +816,105 @@ declare module 'native-base' { * NativeBase Cards support a wide variety of content, including images, text, list groups, links, and more. * Mix and match multiple content types to create the card you need. */ - export class Card extends React.Component { } - /** + export class Card extends React.Component {} + /** * NativeBase.CardItem * * This is the child component of Card. Works very similar to the list items of list. Card takes any number of CardItem. * CardItem component takes input such as: Text, Button, Image, Thumbnail, Icon. */ - export class CardItem extends React.Component { } - /** + export class CardItem extends React.Component {} + /** * NativeBase.CardSwiper * * Looking at data one piece at a time is more efficient when you consider people you might want to date, restaurants, streaming music, or local events you might want to check out. * NativeBase Card Swiper helps you evaluate one option at a time, instead of selecting from a set of options. */ - export class CardSwiper extends React.Component { } - /** + export class CardSwiper extends React.Component {} + /** * NativeBase.DeckSwiper */ - export class DeckSwiper extends React.Component { } - /** + export class DeckSwiper extends React.Component {} + /** * NativeBase.Badge * * All of us must have seen notification badges somewhere, such as on smart phones or facebook. */ - export class Badge extends React.Component { } - /** + export class Badge extends React.Component {} + /** * NativeBase.Spinner */ - export class Spinner extends React.Component { } - /** + export class Spinner extends React.Component {} + /** * NativeBase.CheckBox */ - export class CheckBox extends React.Component { } - /** + export class CheckBox extends React.Component {} + /** * NativeBase.Radio */ - export class Radio extends React.Component { } - /** + export class Radio extends React.Component {} + /** * NativeBase.ProgressBar */ - export class ProgressBar extends React.Component { } - /** + export class ProgressBar extends React.Component< + NativeBase.ProgressBar, + any + > {} + /** * NativeBase.Drawer */ - export class Drawer extends React.Component { } - /** + export class Drawer extends React.Component {} + /** * NativeBase.Tabs * * Tabs are a horizontal region of buttons or links that allow for a consistent navigation experience between screens. * It can contain any combination of text and icons, and is a popular method for enabling mobile navigation. */ - export class Tabs extends React.Component { } - /** + export class Tabs extends React.Component {} + /** * NativeBase.Tab */ - export class Tab extends React.Component{} + export class Tab extends React.Component {} - export class TabHeading extends React.Component{} - /** + export class TabHeading extends React.Component {} + /** * NativeBase.Item */ - export class Item extends React.Component { } - /** + export class Item extends React.Component {} + /** * NativeBase.Form */ - export class Form extends React.Component{} - /** + export class Form extends React.Component {} + /** * NativeBase.Fab */ - export class Fab extends React.Component{} - - export class Separator extends React.Component{} - - export class Label extends React.Component{} - - export class ActionSheet{ - static show:( - configuration:{ - options: string[], - cancelButtonIndex: number, - destructiveButtonIndex: number, - title: string}, - onSelect:(index:number)=>void - - )=>void - } - - export class Toast { - static show(configuration: { - text: string, - buttonText: string, - position: 'top'|'bottom'|'center', - type?: 'danger'|'success'|'warning', - duration?: number - }): void; - } + export class Fab extends React.Component {} + + export class Separator extends React.Component {} + + export class Label extends React.Component {} + + export class ActionSheet { + static show: ( + configuration: { + options: string[]; + cancelButtonIndex: number; + destructiveButtonIndex: number; + title: string; + }, + onSelect: (index: number) => void + ) => void; + } + + export class Toast { + static show( + configuration: { + text: string; + buttonText: string; + position: "top" | "bottom" | "center"; + type?: "danger" | "success" | "warning"; + duration?: number; + } + ): void; + } } diff --git a/src/Utils/computeProps.js b/src/Utils/computeProps.js index 19d01d300..6a68eac08 100644 --- a/src/Utils/computeProps.js +++ b/src/Utils/computeProps.js @@ -1,9 +1,9 @@ -'use_strict'; -import _ from 'lodash'; -import ReactNativePropRegistry from 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry'; +"use_strict"; +import _ from "lodash"; +import ReactNativePropRegistry from "react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry"; // For compatibility with RN 0.25 // import ReactNativePropRegistry from "react-native/Libraries/ReactNative/ReactNativePropRegistry"; -module.exports = function (incomingProps, defaultProps) { +module.exports = function(incomingProps, defaultProps) { // External props has a higher precedence let computedProps = {}; @@ -16,20 +16,22 @@ module.exports = function (incomingProps, defaultProps) { // console.log(defaultProps, incomingProps); if (incomingProps) { _.assign(computedProps, defaultProps, incomingProps); - } else { computedProps = defaultProps; } + } else { + computedProps = defaultProps; + } // Pass the merged Style Object instead if (incomingPropsStyle) { let computedPropsStyle = {}; computedProps.style = {}; if (Array.isArray(incomingPropsStyle)) { - _.forEach(incomingPropsStyle, (style) => { - if (typeof style === 'number') { + _.forEach(incomingPropsStyle, style => { + if (typeof style === "number") { _.merge(computedPropsStyle, ReactNativePropRegistry.getByID(style)); } else { _.merge(computedPropsStyle, style); } }); - } else if (typeof incomingPropsStyle === 'number') { + } else if (typeof incomingPropsStyle === "number") { computedPropsStyle = ReactNativePropRegistry.getByID(incomingPropsStyle); } else { computedPropsStyle = incomingPropsStyle; diff --git a/src/Utils/mapPropsToStyleNames.js b/src/Utils/mapPropsToStyleNames.js index 3c6b5d739..83d5e194c 100644 --- a/src/Utils/mapPropsToStyleNames.js +++ b/src/Utils/mapPropsToStyleNames.js @@ -1,12 +1,14 @@ -import _ from 'lodash'; +import _ from "lodash"; -export default mapPropsToStyleNames = (styleNames, props) => { +export default (mapPropsToStyleNames = (styleNames, props) => { const keys = _.keys(props); const values = _.values(props); _.forEach(keys, (key, index) => { - if (values[index]) { styleNames.push(key); } + if (values[index]) { + styleNames.push(key); + } }); return styleNames; -}; +}); diff --git a/src/basic/Actionsheet.js b/src/basic/Actionsheet.js index dfb19cc48..a97bbbf1a 100644 --- a/src/basic/Actionsheet.js +++ b/src/basic/Actionsheet.js @@ -1,49 +1,51 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, Modal, Platform, ActionSheetIOS, TouchableOpacity, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import { Text } from './Text'; -import { Button } from './Button'; -import { ViewNB } from './View'; -import { Icon } from './Icon'; -import { Left } from './Left'; -import { Right } from './Right'; -import { Body } from './Body'; -import { List } from './List'; -import { ListItem } from './ListItem'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { + View, + Modal, + Platform, + ActionSheetIOS, + TouchableOpacity, + ViewPropTypes +} from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import { Text } from "./Text"; +import { Button } from "./Button"; +import { ViewNB } from "./View"; +import { Icon } from "./Icon"; +import { Left } from "./Left"; +import { Right } from "./Right"; +import { Body } from "./Body"; +import { List } from "./List"; +import { ListItem } from "./ListItem"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class ActionSheetContainer extends Component { - constructor(props) { super(props); this.state = { modalVisible: false, - items: [], - } + items: [] + }; } static actionsheetInstance; static show(config, callback) { this.actionsheetInstance._root.showActionSheet(config, callback); } showActionSheet(config, callback) { - if (Platform.OS === 'ios') { - if (typeof config.options[0] == 'object') { + if (Platform.OS === "ios") { + if (typeof config.options[0] == "object") { let options = config.options; - let filtered = options.map((item) => { - return item.text + let filtered = options.map(item => { + return item.text; }); config.options = filtered; ActionSheetIOS.showActionSheetWithOptions(config, callback); - } - else { + } else { ActionSheetIOS.showActionSheetWithOptions(config, callback); } - } - else { + } else { this.setState({ items: config.options, title: config.title, @@ -68,26 +70,57 @@ class ActionSheetContainer extends Component { visible={this.state.modalVisible} onRequestClose={() => this.setState({ modalVisible: false })} > - this.setState({ modalVisible: false })} style={{ backgroundColor: 'rgba(0,0,0,0.4)', flex: 1, justifyContent: 'flex-end' }}> - - {this.state.title} - { - return (typeof this.state.items[0] === 'string') ? - { this.state.callback(id); this.setState({ modalVisible: false }) }} style={{ borderColor: 'transparent' }}> - {data} - - : - { this.state.callback(id); this.setState({ modalVisible: false }) }} style={{ borderColor: 'transparent' }} icon> - - - - - {data.text} - - - - } - } /> + this.setState({ modalVisible: false })} + style={{ + backgroundColor: "rgba(0,0,0,0.4)", + flex: 1, + justifyContent: "flex-end" + }} + > + + {this.state.title} + { + return typeof this.state.items[0] === "string" + ? { + this.state.callback(id); + this.setState({ modalVisible: false }); + }} + style={{ borderColor: "transparent" }} + > + {data} + + : { + this.state.callback(id); + this.setState({ modalVisible: false }); + }} + style={{ borderColor: "transparent" }} + icon + > + + + + + {data.text} + + + ; + }} + /> @@ -97,11 +130,13 @@ class ActionSheetContainer extends Component { ActionSheetContainer.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledActionSheetContainer = connectStyle('NativeBase.ActionSheetContainer', {}, mapPropsToStyleNames)(ActionSheetContainer); +const StyledActionSheetContainer = connectStyle( + "NativeBase.ActionSheetContainer", + {}, + mapPropsToStyleNames +)(ActionSheetContainer); -export { - StyledActionSheetContainer as ActionSheetContainer, -}; +export { StyledActionSheetContainer as ActionSheetContainer }; diff --git a/src/basic/Badge.js b/src/basic/Badge.js index cbdae2caa..6d37e363a 100644 --- a/src/basic/Badge.js +++ b/src/basic/Badge.js @@ -1,31 +1,27 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import variables from '../theme/variables/platform'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import variables from "../theme/variables/platform"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Badge extends Component { - - render() { return ( - this._root = c} {...this.props}> + (this._root = c)} {...this.props}> {this.props.children} ); } - } - Badge.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledBadge = connectStyle('NativeBase.Badge', {}, mapPropsToStyleNames)(Badge); +const StyledBadge = connectStyle("NativeBase.Badge", {}, mapPropsToStyleNames)( + Badge +); -export { - StyledBadge as Badge, -}; +export { StyledBadge as Badge }; diff --git a/src/basic/Base/NativeBaseComponent.js b/src/basic/Base/NativeBaseComponent.js index 249c62e85..b70dceb2f 100644 --- a/src/basic/Base/NativeBaseComponent.js +++ b/src/basic/Base/NativeBaseComponent.js @@ -1,29 +1,30 @@ /* @flow */ -import React, { Component } from 'react'; -import lightTheme from '../../backward/Themes/light'; +import React, { Component } from "react"; +import lightTheme from "../../backward/Themes/light"; export default class NativeBaseComponent extends Component { static contextTypes = { theme: React.PropTypes.object, - foregroundColor: React.PropTypes.string, - } + foregroundColor: React.PropTypes.string + }; static propTypes = { theme: React.PropTypes.object, - foregroundColor: React.PropTypes.string, - } + foregroundColor: React.PropTypes.string + }; static childContextTypes = { theme: React.PropTypes.object, - foregroundColor: React.PropTypes.string, - } + foregroundColor: React.PropTypes.string + }; getChildContext() { return { theme: this.props.theme ? this.props.theme : this.getTheme(), - foregroundColor: this.props.foregroundColor ? - this.props.foregroundColor : this.getTheme().textColor, + foregroundColor: this.props.foregroundColor + ? this.props.foregroundColor + : this.getTheme().textColor }; } @@ -32,7 +33,8 @@ export default class NativeBaseComponent extends Component { } getTheme() { - return this.props.theme ? this.props.theme : - this.context.theme || lightTheme; + return this.props.theme + ? this.props.theme + : this.context.theme || lightTheme; } } diff --git a/src/basic/Body.js b/src/basic/Body.js index 58b8f41be..3ce7faf01 100644 --- a/src/basic/Body.js +++ b/src/basic/Body.js @@ -1,24 +1,22 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Body extends Component { render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } Body.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledBody = connectStyle('NativeBase.Body', {}, mapPropsToStyleNames)(Body); +const StyledBody = connectStyle("NativeBase.Body", {}, mapPropsToStyleNames)( + Body +); -export { - StyledBody as Body, -}; +export { StyledBody as Body }; diff --git a/src/basic/Button.js b/src/basic/Button.js index 938a21820..df824a19e 100644 --- a/src/basic/Button.js +++ b/src/basic/Button.js @@ -1,23 +1,28 @@ /* @flow */ +import React, { Component } from "react"; +import { + TouchableOpacity, + Platform, + View, + TouchableNativeFeedback +} from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import variables from "./../theme/variables/platform"; +import { Text } from "./Text"; +import computeProps from "../Utils/computeProps"; -import React, { Component } from 'react'; -import { TouchableOpacity, Platform, View, TouchableNativeFeedback } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import variables from './../theme/variables/platform'; -import { Text } from './Text'; -import computeProps from '../Utils/computeProps'; - -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Button extends Component { - getInitialStyle() { return { borderedBtn: { - borderWidth: (this.props.bordered) ? 1 : undefined, - borderRadius: (this.props.rounded && this.props.bordered) ? variables.borderRadiusLarge : 2, - }, + borderWidth: this.props.bordered ? 1 : undefined, + borderRadius: this.props.rounded && this.props.bordered + ? variables.borderRadiusLarge + : 2 + } }; } @@ -25,33 +30,50 @@ class Button extends Component { prepareRootProps() { const defaultProps = { - style: this.getInitialStyle().borderedBtn, + style: this.getInitialStyle().borderedBtn }; return computeProps(this.props, defaultProps); } render() { - const children = Platform.OS === 'ios' + const children = Platform.OS === "ios" ? this.props.children - : React.Children.map(this.props.children, child => child && child.type === Text ? React.cloneElement(child, { uppercase: true, ...child.props }) : child); - if (Platform.OS === 'ios' || variables.androidRipple === false || Platform['Version'] <= 21) { + : React.Children.map( + this.props.children, + child => + child && child.type === Text + ? React.cloneElement(child, { uppercase: true, ...child.props }) + : child + ); + if ( + Platform.OS === "ios" || + variables.androidRipple === false || + Platform["Version"] <= 21 + ) { return ( this._root = c} - activeOpacity={(this.props.activeOpacity) ? this.props.activeOpacity : 0.5} + {...this.prepareRootProps()} + ref={c => (this._root = c)} + activeOpacity={ + this.props.activeOpacity ? this.props.activeOpacity : 0.5 + } > {children} ); - } - else { + } else { return ( - this._root = c} + (this._root = c)} onPress={this.props.onPress} - background={(this.props.androidRippleColor) ? TouchableNativeFeedback.Ripple(this.props.androidRippleColor) : TouchableNativeFeedback.Ripple(variables.androidRippleColor)} - {...this.prepareRootProps() }> - + background={ + this.props.androidRippleColor + ? TouchableNativeFeedback.Ripple(this.props.androidRippleColor) + : TouchableNativeFeedback.Ripple(variables.androidRippleColor) + } + {...this.prepareRootProps()} + > + {children} @@ -75,10 +97,12 @@ Button.propTypes = { rounded: React.PropTypes.bool, large: React.PropTypes.bool, small: React.PropTypes.bool, - active: React.PropTypes.bool, + active: React.PropTypes.bool }; -const StyledButton = connectStyle('NativeBase.Button', {}, mapPropsToStyleNames)(Button); -export { - StyledButton as Button, -}; \ No newline at end of file +const StyledButton = connectStyle( + "NativeBase.Button", + {}, + mapPropsToStyleNames +)(Button); +export { StyledButton as Button }; diff --git a/src/basic/Card.js b/src/basic/Card.js index 86796b5fa..dc3c1a9e0 100644 --- a/src/basic/Card.js +++ b/src/basic/Card.js @@ -1,14 +1,15 @@ -import React, { Component } from 'react'; -import { View, ListView, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ListView, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Card extends Component { - render() { if (this.props.dataArray && this.props.renderRow) { - const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); + const ds = new ListView.DataSource({ + rowHasChanged: (r1, r2) => r1 !== r2 + }); const dataSource = ds.cloneWithRows(this.props.dataArray); return ( this._root = c} {...this.props}> + (this._root = c)} {...this.props}> {this.props.children} ); @@ -31,11 +32,11 @@ Card.propTypes = { ...ViewPropTypes, style: React.PropTypes.object, dataArray: React.PropTypes.object, - renderRow: React.PropTypes.object, + renderRow: React.PropTypes.object }; -const StyledCard = connectStyle('NativeBase.Card', {}, mapPropsToStyleNames)(Card); +const StyledCard = connectStyle("NativeBase.Card", {}, mapPropsToStyleNames)( + Card +); -export { - StyledCard as Card, -}; +export { StyledCard as Card }; diff --git a/src/basic/CardItem.js b/src/basic/CardItem.js index 890b3915f..22d6b3ccc 100644 --- a/src/basic/CardItem.js +++ b/src/basic/CardItem.js @@ -1,27 +1,26 @@ -import React, { Component } from 'react'; -import { TouchableOpacity, View } from 'react-native'; +import React, { Component } from "react"; +import { TouchableOpacity, View } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class CardItem extends Component { render() { if (this.props.button) { - return ( - this._root = c} {...this.props} - activeOpacity={(this.props.button) ? 0.2 : 1} - > - {this.props.children} - - ); - } - else { return ( - this._root = c} {...this.props} - > - {this.props.children} - + (this._root = c)} + {...this.props} + activeOpacity={this.props.button ? 0.2 : 1} + > + {this.props.children} + + ); + } else { + return ( + (this._root = c)} {...this.props}> + {this.props.children} + ); } } @@ -33,11 +32,13 @@ CardItem.propTypes = { header: React.PropTypes.bool, cardBody: React.PropTypes.bool, footer: React.PropTypes.bool, - button: React.PropTypes.bool, + button: React.PropTypes.bool }; -const StyledCardItem = connectStyle('NativeBase.CardItem', {}, mapPropsToStyleNames)(CardItem); +const StyledCardItem = connectStyle( + "NativeBase.CardItem", + {}, + mapPropsToStyleNames +)(CardItem); -export { - StyledCardItem as CardItem, -}; +export { StyledCardItem as CardItem }; diff --git a/src/basic/Checkbox.js b/src/basic/Checkbox.js index 0a9f3d617..9add85792 100644 --- a/src/basic/Checkbox.js +++ b/src/basic/Checkbox.js @@ -1,45 +1,60 @@ -import React, { Component } from 'react'; -import { TouchableOpacity, Platform } from 'react-native'; -import IconNB from 'react-native-vector-icons/Ionicons'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; -import variable from '../theme/variables/platform'; -import _ from 'lodash'; -import computeProps from '../Utils/computeProps'; - +import React, { Component } from "react"; +import { TouchableOpacity, Platform } from "react-native"; +import IconNB from "react-native-vector-icons/Ionicons"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; +import variable from "../theme/variables/platform"; +import _ from "lodash"; +import computeProps from "../Utils/computeProps"; class CheckBox extends Component { static contextTypes = { - theme: React.PropTypes.object, - } + theme: React.PropTypes.object + }; getInitialStyle(variables) { return { checkStyle: { - borderColor: this.props.color ? this.props.color : variables.checkboxBgColor, - backgroundColor: (this.props.checked === true) ? (this.props.color ? this.props.color : variables.checkboxBgColor) : 'transparent', - }, + borderColor: this.props.color + ? this.props.color + : variables.checkboxBgColor, + backgroundColor: this.props.checked === true + ? this.props.color ? this.props.color : variables.checkboxBgColor + : "transparent" + } }; } prepareRootProps(variables) { const defaultProps = { - style: this.getInitialStyle(variables).checkStyle, + style: this.getInitialStyle(variables).checkStyle }; return computeProps(this.props, defaultProps); } render() { - const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable; + const variables = this.context.theme + ? this.context.theme["@@shoutem.theme/themeStyle"].variables + : variable; const platformStyle = variables.platformStyle; const platform = variables.platform; return ( - this._root = c} {...this.prepareRootProps(variables) }> - + (this._root = c)} + {...this.prepareRootProps(variables)} + > + ); } @@ -48,11 +63,13 @@ class CheckBox extends Component { CheckBox.propTypes = { ...TouchableOpacity.propTypes, style: React.PropTypes.object, - checked: React.PropTypes.bool, + checked: React.PropTypes.bool }; -const StyledCheckBox = connectStyle('NativeBase.CheckBox', {}, mapPropsToStyleNames)(CheckBox); +const StyledCheckBox = connectStyle( + "NativeBase.CheckBox", + {}, + mapPropsToStyleNames +)(CheckBox); -export { - StyledCheckBox as CheckBox, -}; +export { StyledCheckBox as CheckBox }; diff --git a/src/basic/Container.js b/src/basic/Container.js index 0ce2ad724..839744fc8 100644 --- a/src/basic/Container.js +++ b/src/basic/Container.js @@ -1,19 +1,28 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; -import { ToastContainer as Toast } from './ToastContainer'; -import { ActionSheetContainer as ActionSheet } from './Actionsheet'; -import { Text } from './Text'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; +import { ToastContainer as Toast } from "./ToastContainer"; +import { ActionSheetContainer as ActionSheet } from "./Actionsheet"; +import { Text } from "./Text"; class Container extends Component { render() { return ( - this._root = c} {...this.props}> + (this._root = c)} {...this.props}> {this.props.children} - { if (!Toast.toastInstance) Toast.toastInstance = c; }} /> - { if (!ActionSheet.actionsheetInstance) ActionSheet.actionsheetInstance = c; }} /> + { + if (!Toast.toastInstance) Toast.toastInstance = c; + }} + /> + { + if (!ActionSheet.actionsheetInstance) + ActionSheet.actionsheetInstance = c; + }} + /> ); } @@ -21,11 +30,13 @@ class Container extends Component { Container.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledContainer = connectStyle('NativeBase.Container', {}, mapPropsToStyleNames)(Container); +const StyledContainer = connectStyle( + "NativeBase.Container", + {}, + mapPropsToStyleNames +)(Container); -export { - StyledContainer as Container, -}; +export { StyledContainer as Container }; diff --git a/src/basic/Content.js b/src/basic/Content.js index b97391568..8f26dffa6 100644 --- a/src/basic/Content.js +++ b/src/basic/Content.js @@ -1,15 +1,20 @@ -import React, { Component } from 'react'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import React, { Component } from "react"; +import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Content extends Component { render() { return ( { this._scrollview = c; this._root = c; }} + resetScrollToCoords={ + this.props.disableKBDismissScroll ? null : { x: 0, y: 0 } + } + ref={c => { + this._scrollview = c; + this._root = c; + }} {...this.props} > {this.props.children} @@ -25,8 +30,10 @@ Content.propTypes = { enableResetScrollToCoords: React.PropTypes.bool }; -const StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content); +const StyledContent = connectStyle( + "NativeBase.Content", + {}, + mapPropsToStyleNames +)(Content); -export { - StyledContent as Content, -}; +export { StyledContent as Content }; diff --git a/src/basic/DeckSwiper.js b/src/basic/DeckSwiper.js index 16d70989a..417a17a7b 100644 --- a/src/basic/DeckSwiper.js +++ b/src/basic/DeckSwiper.js @@ -1,313 +1,327 @@ -import React, { Component } from 'react'; -import { View, Animated, PanResponder, ViewPropTypes } from 'react-native'; -import clamp from 'clamp'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import React, { Component } from "react"; +import { View, Animated, PanResponder, ViewPropTypes } from "react-native"; +import clamp from "clamp"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; const SWIPE_THRESHOLD = 120; class DeckSwiper extends Component { - constructor(props) { - super(props); - this.state = { - pan: new Animated.ValueXY(), - pan2: new Animated.ValueXY(), - enter: new Animated.Value(0.8), - selectedItem: this.props.dataSource[0], - selectedItem2: this.props.dataSource[1], - card1Top: true, - card2Top: false, - fadeAnim: new Animated.Value(0.8), - looping: this.props.looping || true, - disabled: this.props.dataSource.length === 0, - lastCard: this.props.dataSource.length === 1 - } - } - - getInitialStyle() { - return { - topCard: { - position: 'absolute', - top: 0, - right: 0, - left: 0 - } - } - } - - findNextIndexes(currentIndex) { - let newIdx = currentIndex + 1; - let newIdx2 = currentIndex + 2; - - if (newIdx2 > this.props.dataSource.length - 1 && newIdx === this.props.dataSource.length - 1) { - return [newIdx, 0]; - } else if (newIdx > this.props.dataSource.length - 1) { - return [0, 1]; - } else { - return [newIdx, newIdx2]; - } + constructor(props) { + super(props); + this.state = { + pan: new Animated.ValueXY(), + pan2: new Animated.ValueXY(), + enter: new Animated.Value(0.8), + selectedItem: this.props.dataSource[0], + selectedItem2: this.props.dataSource[1], + card1Top: true, + card2Top: false, + fadeAnim: new Animated.Value(0.8), + looping: this.props.looping || true, + disabled: this.props.dataSource.length === 0, + lastCard: this.props.dataSource.length === 1 + }; + } + + getInitialStyle() { + return { + topCard: { + position: "absolute", + top: 0, + right: 0, + left: 0 + } + }; + } + + findNextIndexes(currentIndex) { + let newIdx = currentIndex + 1; + let newIdx2 = currentIndex + 2; + + if ( + newIdx2 > this.props.dataSource.length - 1 && + newIdx === this.props.dataSource.length - 1 + ) { + return [newIdx, 0]; + } else if (newIdx > this.props.dataSource.length - 1) { + return [0, 1]; + } else { + return [newIdx, newIdx2]; } - - selectNext() { - const dataSource = this.props.dataSource; - let currentIndex = dataSource.indexOf(this.state.selectedItem); - - // if not looping, check for these conditionals and if true return from selectNext() - if (!this.state.looping) { - // reached end -> only display static renderEmpty() -> no swiping - if (currentIndex === dataSource.length - 1) { - return this.setState({ - disabled: true - }); - } else if (currentIndex === dataSource.length - 2) { - // show last card with renderEmpty() component behind it - return setTimeout(() => { - this.setState({ - selectedItem: dataSource[currentIndex + 1] - }); - setTimeout(() => { - this.setState({ - lastCard: true - }); - }, 350); - }, 50); - } - } - - let nextIndexes = this.findNextIndexes(currentIndex); - setTimeout(() => { + } + + selectNext() { + const dataSource = this.props.dataSource; + let currentIndex = dataSource.indexOf(this.state.selectedItem); + + // if not looping, check for these conditionals and if true return from selectNext() + if (!this.state.looping) { + // reached end -> only display static renderEmpty() -> no swiping + if (currentIndex === dataSource.length - 1) { + return this.setState({ + disabled: true + }); + } else if (currentIndex === dataSource.length - 2) { + // show last card with renderEmpty() component behind it + return setTimeout(() => { + this.setState({ + selectedItem: dataSource[currentIndex + 1] + }); + setTimeout(() => { this.setState({ - selectedItem: this.props.dataSource[nextIndexes[0]] + lastCard: true }); - setTimeout(() => { - this.setState({ - selectedItem2: this.props.dataSource[nextIndexes[1]] - }); - }, 350); + }, 350); }, 50); - + } } - - swipeRight() { - if (this.props.onSwiping) - this.props.onSwiping('right'); - setTimeout(() => { - Animated.timing( - this.state.fadeAnim, - { toValue: 1 } - ).start(); - Animated.spring( - this.state.enter, - { toValue: 1, friction: 7 } - ).start(); - this.selectNext(); - Animated.decay(this.state.pan, { - velocity: { x: 8, y: 1 }, - deceleration: 0.98 - }).start(this._resetState.bind(this)) - }, 300); - } - - swipeLeft() { - if (this.props.onSwiping) - this.props.onSwiping('left'); - setTimeout(() => { - Animated.timing( - this.state.fadeAnim, - { toValue: 1 } - ).start(); - Animated.spring( - this.state.enter, - { toValue: 1, friction: 7 } - ).start(); - this.selectNext(); - Animated.decay(this.state.pan, { - velocity: { x: -8, y: 1 }, - deceleration: 0.98 - }).start(this._resetState.bind(this)) - }, 300); - } - - componentWillMount() { - this._panResponder = PanResponder.create({ - onMoveShouldSetResponderCapture: () => true, - onMoveShouldSetPanResponderCapture: (evt, gestureState) => { - return Math.abs(gestureState.dx) > 5; - }, - - onPanResponderGrant: (e, gestureState) => { - this.state.pan.setOffset({ x: this.state.pan.x._value, y: this.state.pan.y._value }); - this.state.pan.setValue({ x: 0, y: 0 }); - }, - - - onPanResponderMove: (e, gestureState) => { - if (gestureState.dx > 20) { - if (this.props.onSwiping) - this.props.onSwiping('right', gestureState.dx); - } - else if (gestureState.dx < -20) { - if (this.props.onSwiping) - this.props.onSwiping('left', gestureState.dx); - } - let val = Math.abs((gestureState.dx * .0013)); - let opa = Math.abs((gestureState.dx * .0022)); - if (val > 0.2) { - val = 0.2; - } - Animated.timing( - this.state.fadeAnim, - { toValue: 0.8 + val } - ).start(); - Animated.spring( - this.state.enter, - { toValue: 0.8 + val, friction: 7 } - ).start(); - Animated.event([ - null, { dx: this.state.pan.x }, - ])(e, gestureState) - }, - - onPanResponderRelease: (e, { vx, vy }) => { - if (this.props.onSwiping) - this.props.onSwiping(null); - var velocity; - - if (vx >= 0) { - velocity = clamp(vx, 4.5, 10); - } else if (vx < 0) { - velocity = clamp(vx * -1, 4.5, 10) * -1; - } - - if (Math.abs(this.state.pan.x._value) > SWIPE_THRESHOLD) { - - if (velocity > 0) { - (this.props.onSwipeRight) ? this.props.onSwipeRight(this.state.selectedItem) : undefined; - this.selectNext(); - } else { - (this.props.onSwipeLeft) ? this.props.onSwipeLeft(this.state.selectedItem) : undefined; - this.selectNext(); - } - - Animated.decay(this.state.pan, { - velocity: { x: velocity, y: vy }, - deceleration: 0.98 - }).start(this._resetState.bind(this)) - } else { - Animated.spring(this.state.pan, { - toValue: { x: 0, y: 0 }, - friction: 4 - }).start() - } - } - }) - } - - _resetState() { - this.state.pan.setValue({ x: 0, y: 0 }); - this.state.enter.setValue(0.8); - this.state.fadeAnim.setValue(0.8); + let nextIndexes = this.findNextIndexes(currentIndex); + setTimeout(() => { + this.setState({ + selectedItem: this.props.dataSource[nextIndexes[0]] + }); + setTimeout(() => { this.setState({ - card1Top: !this.state.card1Top, - card2Top: !this.state.card2Top + selectedItem2: this.props.dataSource[nextIndexes[1]] }); - if (this.props.onSwiping) - this.props.onSwiping(null); - - } - - getCardStyles() { - - let { pan, pan2, enter } = this.state; - - let [translateX, translateY] = [pan.x, pan.y]; - // let [translateX, translateY] = [pan2.x, pan2.y]; - - let rotate = pan.x.interpolate({ inputRange: [-700, 0, 700], outputRange: ['-10deg', '0deg', '10deg'] }); - - let opacity = pan.x.interpolate({ inputRange: [-320, 0, 320], outputRange: [0.9, 1, 0.9] }) - let scale = enter; - - let animatedCardStyles = { transform: [{ translateX }, { translateY }, { rotate }], opacity }; - let animatedCardStyles2 = { transform: [{ scale }] }; - - return [animatedCardStyles, animatedCardStyles2] - } + }, 350); + }, 50); + } + + swipeRight() { + if (this.props.onSwiping) this.props.onSwiping("right"); + setTimeout(() => { + Animated.timing(this.state.fadeAnim, { toValue: 1 }).start(); + Animated.spring(this.state.enter, { toValue: 1, friction: 7 }).start(); + this.selectNext(); + Animated.decay(this.state.pan, { + velocity: { x: 8, y: 1 }, + deceleration: 0.98 + }).start(this._resetState.bind(this)); + }, 300); + } + + swipeLeft() { + if (this.props.onSwiping) this.props.onSwiping("left"); + setTimeout(() => { + Animated.timing(this.state.fadeAnim, { toValue: 1 }).start(); + Animated.spring(this.state.enter, { toValue: 1, friction: 7 }).start(); + this.selectNext(); + Animated.decay(this.state.pan, { + velocity: { x: -8, y: 1 }, + deceleration: 0.98 + }).start(this._resetState.bind(this)); + }, 300); + } + + componentWillMount() { + this._panResponder = PanResponder.create({ + onMoveShouldSetResponderCapture: () => true, + onMoveShouldSetPanResponderCapture: (evt, gestureState) => { + return Math.abs(gestureState.dx) > 5; + }, + + onPanResponderGrant: (e, gestureState) => { + this.state.pan.setOffset({ + x: this.state.pan.x._value, + y: this.state.pan.y._value + }); + this.state.pan.setValue({ x: 0, y: 0 }); + }, + + onPanResponderMove: (e, gestureState) => { + if (gestureState.dx > 20) { + if (this.props.onSwiping) + this.props.onSwiping("right", gestureState.dx); + } else if (gestureState.dx < -20) { + if (this.props.onSwiping) + this.props.onSwiping("left", gestureState.dx); + } + let val = Math.abs(gestureState.dx * 0.0013); + let opa = Math.abs(gestureState.dx * 0.0022); + if (val > 0.2) { + val = 0.2; + } + Animated.timing(this.state.fadeAnim, { toValue: 0.8 + val }).start(); + Animated.spring(this.state.enter, { + toValue: 0.8 + val, + friction: 7 + }).start(); + Animated.event([null, { dx: this.state.pan.x }])(e, gestureState); + }, + + onPanResponderRelease: (e, { vx, vy }) => { + if (this.props.onSwiping) this.props.onSwiping(null); + var velocity; + + if (vx >= 0) { + velocity = clamp(vx, 4.5, 10); + } else if (vx < 0) { + velocity = clamp(vx * -1, 4.5, 10) * -1; + } - render() { + if (Math.abs(this.state.pan.x._value) > SWIPE_THRESHOLD) { + if (velocity > 0) { + this.props.onSwipeRight + ? this.props.onSwipeRight(this.state.selectedItem) + : undefined; + this.selectNext(); + } else { + this.props.onSwipeLeft + ? this.props.onSwipeLeft(this.state.selectedItem) + : undefined; + this.selectNext(); + } - if (this.state.disabled) { - // disable swiping and renderEmpty - return ( - this._root = c} style={{ position: 'relative', flexDirection: 'column' }}> - { - - { - this.props.renderEmpty && this.props.renderEmpty() - } - - } - - ); - } else if (this.state.lastCard) { - // display renderEmpty underneath last viable card - return ( - this._root = c} style={{ position: 'relative', flexDirection: 'column' }}>{(this.state.selectedItem) === undefined ? () : - ( - - - { - this.props.renderEmpty && this.props.renderEmpty() - } - - - { - this.props.renderItem(this.state.selectedItem) - } - - - ) - } - - ); + Animated.decay(this.state.pan, { + velocity: { x: velocity, y: vy }, + deceleration: 0.98 + }).start(this._resetState.bind(this)); } else { - return ( - this._root = c} style={{ position: 'relative', flexDirection: 'column' }}>{(this.state.selectedItem) === undefined ? () : - ( - - {(this.props.renderBottom) ? - this.props.renderBottom(this.state.selectedItem2) - : - this.props.renderItem(this.state.selectedItem2) - } - - - {(this.props.renderTop) ? - this.props.renderTop(this.state.selectedItem) - : - this.props.renderItem(this.state.selectedItem) - } - - - ) - } - - ); + Animated.spring(this.state.pan, { + toValue: { x: 0, y: 0 }, + friction: 4 + }).start(); } - + } + }); + } + + _resetState() { + this.state.pan.setValue({ x: 0, y: 0 }); + this.state.enter.setValue(0.8); + this.state.fadeAnim.setValue(0.8); + this.setState({ + card1Top: !this.state.card1Top, + card2Top: !this.state.card2Top + }); + if (this.props.onSwiping) this.props.onSwiping(null); + } + + getCardStyles() { + let { pan, pan2, enter } = this.state; + + let [translateX, translateY] = [pan.x, pan.y]; + // let [translateX, translateY] = [pan2.x, pan2.y]; + + let rotate = pan.x.interpolate({ + inputRange: [-700, 0, 700], + outputRange: ["-10deg", "0deg", "10deg"] + }); + + let opacity = pan.x.interpolate({ + inputRange: [-320, 0, 320], + outputRange: [0.9, 1, 0.9] + }); + let scale = enter; + + let animatedCardStyles = { + transform: [{ translateX }, { translateY }, { rotate }], + opacity + }; + let animatedCardStyles2 = { transform: [{ scale }] }; + + return [animatedCardStyles, animatedCardStyles2]; + } + + render() { + if (this.state.disabled) { + // disable swiping and renderEmpty + return ( + (this._root = c)} + style={{ position: "relative", flexDirection: "column" }} + > + { + + {this.props.renderEmpty && this.props.renderEmpty()} + + } + + ); + } else if (this.state.lastCard) { + // display renderEmpty underneath last viable card + return ( + (this._root = c)} + style={{ position: "relative", flexDirection: "column" }} + > + {this.state.selectedItem === undefined + ? + : + + {this.props.renderEmpty && this.props.renderEmpty()} + + + {this.props.renderItem(this.state.selectedItem)} + + } + + ); + } else { + return ( + (this._root = c)} + style={{ position: "relative", flexDirection: "column" }} + > + {this.state.selectedItem === undefined + ? + : + + {this.props.renderBottom + ? this.props.renderBottom(this.state.selectedItem2) + : this.props.renderItem(this.state.selectedItem2)} + + + {this.props.renderTop + ? this.props.renderTop(this.state.selectedItem) + : this.props.renderItem(this.state.selectedItem)} + + } + + ); } - + } } DeckSwiper.propTypes = { - ...ViewPropTypes, - style: React.PropTypes.object, - dataSource: React.PropTypes.array, + ...ViewPropTypes, + style: React.PropTypes.object, + dataSource: React.PropTypes.array }; -const StyledDeckSwiper = connectStyle('NativeBase.DeckSwiper', {}, mapPropsToStyleNames)(DeckSwiper); +const StyledDeckSwiper = connectStyle( + "NativeBase.DeckSwiper", + {}, + mapPropsToStyleNames +)(DeckSwiper); -export { - StyledDeckSwiper as DeckSwiper, -}; +export { StyledDeckSwiper as DeckSwiper }; diff --git a/src/basic/Drawer/index.js b/src/basic/Drawer/index.js index 5f3a5d0b1..0a46a17bf 100644 --- a/src/basic/Drawer/index.js +++ b/src/basic/Drawer/index.js @@ -1,38 +1,35 @@ -import React, { Component } from 'react'; -import RNDrawer from 'react-native-drawer'; +import React, { Component } from "react"; +import RNDrawer from "react-native-drawer"; export default class Drawer extends Component { constructor(props) { super(props); - } render() { - return ( - this._root = c} {...this.props}/> - ); + return (this._root = c)} {...this.props} />; } } Drawer.defaultProps = { - type: 'overlay', + type: "overlay", tapToClose: true, openDrawerOffset: 0.2, panCloseMask: 0.2, closedDrawerOffset: 0, styles: { drawer: { - shadowColor: '#000000', + shadowColor: "#000000", shadowOpacity: 0, shadowRadius: 0, elevation: 5 }, mainOverlay: { opacity: 0, - backgroundColor: 'rgba(0, 0, 0, 0.8)', + backgroundColor: "rgba(0, 0, 0, 0.8)", elevation: 8 } }, - tweenHandler: (ratio) => ({ - mainOverlay: { opacity: (ratio) / 2} + tweenHandler: ratio => ({ + mainOverlay: { opacity: ratio / 2 } }) -} +}; diff --git a/src/basic/Fab.js b/src/basic/Fab.js index be57d0905..21ec91de5 100644 --- a/src/basic/Fab.js +++ b/src/basic/Fab.js @@ -1,30 +1,27 @@ /* @flow */ - -import React, { Component } from 'react'; -import { Button } from './Button'; -import { Platform, Animated, TouchableOpacity } from 'react-native'; +import React, { Component } from "react"; +import { Button } from "./Button"; +import { Platform, Animated, TouchableOpacity } from "react-native"; // import View from './View'; -import { Icon } from './Icon'; +import { Icon } from "./Icon"; // import Badge from './Badge'; -import { IconNB } from './IconNB'; +import { IconNB } from "./IconNB"; // import Text from './Text'; -import _ from 'lodash'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; -import computeProps from '../Utils/computeProps'; - +import _ from "lodash"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; +import computeProps from "../Utils/computeProps"; const AnimatedFab = Animated.createAnimatedComponent(Button); class Fab extends Component { - props: Animated.props & { - position: ?string; + position: ?string }; state: { - buttons: void | React$Element; + return ( + + ); } renderHeader() { - return (this.props.renderHeader) ? this.props.renderHeader(() => this._setModalVisible(false)) : (
- - {this.props.iosHeader || 'Select One'} - -
); + return this.props.renderHeader + ? this.props.renderHeader(() => this._setModalVisible(false)) + :
+ + + + + + {this.props.iosHeader || "Select One"} + + + +
; } render() { return ( - this._root = c}> + (this._root = c)}> {this.renderButton()} { this._setModalVisible(false); }} + onRequestClose={() => { + this._setModalVisible(false); + }} > {this.renderHeader()} @@ -137,24 +176,28 @@ class PickerNB extends Component { dataArray={this.state.dataSource} renderRow={child => { - this._setModalVisible(false); this.props.onValueChange(child.props.value); + this._setModalVisible(false); + this.props.onValueChange(child.props.value); this.setState({ current: child.props.label }); }} > - {child.props.label} + + {child.props.label} + - {(child.props.value === this.props.selectedValue) ? - () - : - () - } + {child.props.value === this.props.selectedValue + ? + : } - - } + } />
@@ -162,16 +205,12 @@ class PickerNB extends Component {
); } - } PickerNB.Item = React.createClass({ - render() { - return ( - - ); - }, + return ; + } }); PickerNB.propTypes = { @@ -179,8 +218,10 @@ PickerNB.propTypes = { renderButton: React.PropTypes.func }; -const StyledPickerNB = connectStyle('NativeBase.PickerNB', {}, mapPropsToStyleNames)(PickerNB); +const StyledPickerNB = connectStyle( + "NativeBase.PickerNB", + {}, + mapPropsToStyleNames +)(PickerNB); -export { - StyledPickerNB as PickerNB, -}; +export { StyledPickerNB as PickerNB }; diff --git a/src/basic/PickerItem.js b/src/basic/PickerItem.js index ad0b84a42..d250d85c6 100644 --- a/src/basic/PickerItem.js +++ b/src/basic/PickerItem.js @@ -1,23 +1,21 @@ -import React, { Component } from 'react'; -import { Picker } from 'react-native'; +import React, { Component } from "react"; +import { Picker } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Item extends Component { render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } Item.propTypes = { - ...Picker.Item.propTypes, + ...Picker.Item.propTypes }; -const StyledItem = connectStyle('NativeBase.Item', {}, mapPropsToStyleNames)(Item); +const StyledItem = connectStyle("NativeBase.Item", {}, mapPropsToStyleNames)( + Item +); -export { - StyledItem as Item, -}; +export { StyledItem as Item }; diff --git a/src/basic/Right.js b/src/basic/Right.js index 3c6a59059..3f0232a6e 100644 --- a/src/basic/Right.js +++ b/src/basic/Right.js @@ -1,24 +1,22 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Right extends Component { render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } Right.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledRight = connectStyle('NativeBase.Right', {}, mapPropsToStyleNames)(Right); +const StyledRight = connectStyle("NativeBase.Right", {}, mapPropsToStyleNames)( + Right +); -export { - StyledRight as Right, -}; +export { StyledRight as Right }; diff --git a/src/basic/Segment.js b/src/basic/Segment.js index 24c47445b..dad92c103 100644 --- a/src/basic/Segment.js +++ b/src/basic/Segment.js @@ -1,26 +1,24 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Segment extends Component { render() { - return ( - this._root = c} {...this.props}> - ); + return (this._root = c)} {...this.props} />; } } Segment.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledSegment = connectStyle('NativeBase.Segment', {}, mapPropsToStyleNames)(Segment); -export { - StyledSegment as Segment, -}; +const StyledSegment = connectStyle( + "NativeBase.Segment", + {}, + mapPropsToStyleNames +)(Segment); +export { StyledSegment as Segment }; diff --git a/src/basic/Separator.js b/src/basic/Separator.js index 09853e361..c91f6a6c4 100644 --- a/src/basic/Separator.js +++ b/src/basic/Separator.js @@ -1,24 +1,24 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Separator extends Component { render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } Separator.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledSeparator = connectStyle('NativeBase.Separator', {}, mapPropsToStyleNames)(Separator); +const StyledSeparator = connectStyle( + "NativeBase.Separator", + {}, + mapPropsToStyleNames +)(Separator); -export { - StyledSeparator as Separator, -}; +export { StyledSeparator as Separator }; diff --git a/src/basic/Spinner.js b/src/basic/Spinner.js index 4486e8145..5afc89781 100644 --- a/src/basic/Spinner.js +++ b/src/basic/Spinner.js @@ -1,20 +1,30 @@ -import React, { Component } from 'react'; -import { ActivityIndicator } from 'react-native'; +import React, { Component } from "react"; +import { ActivityIndicator } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import variable from '../theme/variables/platform'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import variable from "../theme/variables/platform"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Spinner extends Component { static contextTypes = { - theme: React.PropTypes.object, - } + theme: React.PropTypes.object + }; render() { - const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable; + const variables = this.context.theme + ? this.context.theme["@@shoutem.theme/themeStyle"].variables + : variable; return ( this._root = c} {...this.props} - color={this.props.color ? this.props.color : this.props.inverse ? variables.inverseSpinnerColor : variables.defaultSpinnerColor} size={this.props.size ? this.props.size : 'large'} + ref={c => (this._root = c)} + {...this.props} + color={ + this.props.color + ? this.props.color + : this.props.inverse + ? variables.inverseSpinnerColor + : variables.defaultSpinnerColor + } + size={this.props.size ? this.props.size : "large"} /> ); } @@ -23,11 +33,13 @@ class Spinner extends Component { Spinner.propTypes = { ...ActivityIndicator.propTypes, color: React.PropTypes.string, - inverse: React.PropTypes.bool, + inverse: React.PropTypes.bool }; -const StyledSpinner = connectStyle('NativeBase.Spinner', {}, mapPropsToStyleNames)(Spinner); +const StyledSpinner = connectStyle( + "NativeBase.Spinner", + {}, + mapPropsToStyleNames +)(Spinner); -export { - StyledSpinner as Spinner, -}; +export { StyledSpinner as Spinner }; diff --git a/src/basic/Swipe/NativeButton.js b/src/basic/Swipe/NativeButton.js index 494619a9c..a96b96b96 100644 --- a/src/basic/Swipe/NativeButton.js +++ b/src/basic/Swipe/NativeButton.js @@ -1,6 +1,4 @@ -import React, { - PropTypes, -} from 'react'; +import React, { PropTypes } from "react"; import { TouchableWithoutFeedback, @@ -9,26 +7,25 @@ import { Text, StyleSheet, Platform, - View, -} from 'react-native'; + View +} from "react-native"; const styles = StyleSheet.create({ button: { - flexDirection: 'row', - alignSelf: 'stretch', - justifyContent: 'center', + flexDirection: "row", + alignSelf: "stretch", + justifyContent: "center" }, textButton: { fontSize: 14, - alignSelf: 'center', + alignSelf: "center" }, opacity: { - opacity: 0.8, - }, + opacity: 0.8 + } }); const NativeButton = React.createClass({ - propTypes: { // Extract parent props ...TouchableWithoutFeedback.propTypes, @@ -36,36 +33,40 @@ const NativeButton = React.createClass({ disabledStyle: Text.propTypes.style, children: PropTypes.node.isRequired, underlayColor: PropTypes.string, - background: (TouchableNativeFeedback.propTypes) ? TouchableNativeFeedback.propTypes.background : PropTypes.any, + background: TouchableNativeFeedback.propTypes + ? TouchableNativeFeedback.propTypes.background + : PropTypes.any }, statics: { - isAndroid: (Platform.OS === 'android'), + isAndroid: Platform.OS === "android" }, getDefaultProps: function() { return { textStyle: null, disabledStyle: null, - underlayColor: null, + underlayColor: null }; }, _renderText: function() { // If children is not a string don't wrapp it in a Text component - if (typeof this.props.children !== 'string') { + if (typeof this.props.children !== "string") { return this.props.children; } return ( - - { this.props.children } + + {this.props.children} ); }, render: function() { - const disabledStyle = this.props.disabled ? (this.props.disabledStyle || styles.opacity) : {}; + const disabledStyle = this.props.disabled + ? this.props.disabledStyle || styles.opacity + : {}; // Extract Button props let buttonProps = { @@ -82,18 +83,19 @@ const NativeButton = React.createClass({ onPressIn: this.props.onPressIn, onPressOut: this.props.onPressOut, onLongPress: this.props.onLongPress, - pressRetentionOffset: this.props.pressRetentionOffset, + pressRetentionOffset: this.props.pressRetentionOffset }; // Render Native Android Button if (NativeButton.isAndroid) { buttonProps = Object.assign(buttonProps, { - background: this.props.background || TouchableNativeFeedback.SelectableBackground(), + background: + this.props.background || + TouchableNativeFeedback.SelectableBackground() }); return ( - + {this._renderText()} @@ -106,8 +108,9 @@ const NativeButton = React.createClass({ - { this._renderText() } + underlayColor={this.props.underlayColor} + > + {this._renderText()} ); } diff --git a/src/basic/Swipe/index.js b/src/basic/Swipe/index.js index 4745340c4..e43db80e8 100644 --- a/src/basic/Swipe/index.js +++ b/src/basic/Swipe/index.js @@ -1,13 +1,10 @@ -import tweenState from 'react-tween-state'; -import NativeButton from './NativeButton'; -import styles from './styles'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames'; +import tweenState from "react-tween-state"; +import NativeButton from "./NativeButton"; +import styles from "./styles"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../../Utils/mapPropsToStyleNames"; -import React, { - Component, - PropTypes, -} from 'react'; +import React, { Component, PropTypes } from "react"; import { PanResponder, @@ -16,10 +13,9 @@ import { Text, View, ViewPropTypes -} from 'react-native'; +} from "react-native"; export default class SwipeoutBtn extends Component { - propTypes: { backgroundColor: PropTypes.string, color: PropTypes.string, @@ -27,8 +23,8 @@ export default class SwipeoutBtn extends Component { onPress: PropTypes.func, text: PropTypes.string, type: PropTypes.string, - underlayColor: PropTypes.string, - } + underlayColor: PropTypes.string + }; static get defaultProps() { return { @@ -40,9 +36,9 @@ export default class SwipeoutBtn extends Component { key: null, onPress: null, disabled: false, - text: 'Click me', - type: '', - width: 0, + text: "Click me", + type: "", + width: 0 }; } @@ -52,46 +48,49 @@ export default class SwipeoutBtn extends Component { var styleSwipeoutBtn = [styles.swipeoutBtn]; // apply "type" styles (delete || primary || secondary) - if (btn.type === 'delete') styleSwipeoutBtn.push(styles.colorDelete); - else if (btn.type === 'primary') styleSwipeoutBtn.push(styles.colorPrimary); - else if (btn.type === 'secondary') styleSwipeoutBtn.push(styles.colorSecondary); + if (btn.type === "delete") styleSwipeoutBtn.push(styles.colorDelete); + else if (btn.type === "primary") styleSwipeoutBtn.push(styles.colorPrimary); + else if (btn.type === "secondary") + styleSwipeoutBtn.push(styles.colorSecondary); // apply background color - if (btn.backgroundColor) styleSwipeoutBtn.push([{ backgroundColor: btn.backgroundColor }]); + if (btn.backgroundColor) + styleSwipeoutBtn.push([{ backgroundColor: btn.backgroundColor }]); - styleSwipeoutBtn.push([{ - height: btn.height, - width: btn.width, - }]); + styleSwipeoutBtn.push([ + { + height: btn.height, + width: btn.width + } + ]); var styleSwipeoutBtnComponent = []; // set button dimensions - styleSwipeoutBtnComponent.push([{ - height: btn.height, - width: btn.width, - }]); + styleSwipeoutBtnComponent.push([ + { + height: btn.height, + width: btn.width + } + ]); var styleSwipeoutBtnText = [styles.swipeoutBtnText]; // apply text color if (btn.color) styleSwipeoutBtnText.push([{ color: btn.color }]); - return ( + return ( - { - (btn.component ? - {btn.component} - : - btn.text - ) - } + textStyle={styleSwipeoutBtnText} + > + {btn.component + ? {btn.component} + : btn.text} ); } @@ -109,14 +108,14 @@ const Swipeout = React.createClass({ right: PropTypes.array, scroll: PropTypes.func, style: ViewPropTypes.style, - sensitivity: PropTypes.number, + sensitivity: PropTypes.number }, getDefaultProps: function() { return { rowID: -1, sectionID: -1, - sensitivity: 0, + sensitivity: 0 }; }, @@ -132,7 +131,7 @@ const Swipeout = React.createClass({ openedRight: false, swiping: false, tweenDuration: 160, - timeStart: null, + timeStart: null }; }, @@ -146,7 +145,7 @@ const Swipeout = React.createClass({ onPanResponderMove: this._handlePanResponderMove, onPanResponderRelease: this._handlePanResponderEnd, onPanResponderTerminate: this._handlePanResponderEnd, - onShouldBlockNativeResponder: (event, gestureState) => true, + onShouldBlockNativeResponder: (event, gestureState) => true }); }, @@ -155,16 +154,18 @@ const Swipeout = React.createClass({ }, _handlePanResponderGrant: function(e: Object, gestureState: Object) { - if(this.props.onOpen){ + if (this.props.onOpen) { this.props.onOpen(this.props.sectionID, this.props.rowID); } this.refs.swipeoutContent.measure((ox, oy, width, height) => { this.setState({ - btnWidth: (width/5), - btnsLeftWidth: this.props.left ? (width/5)*this.props.left.length : 0, - btnsRightWidth: this.props.right ? (width/5)*this.props.right.length : 0, + btnWidth: width / 5, + btnsLeftWidth: this.props.left ? width / 5 * this.props.left.length : 0, + btnsRightWidth: this.props.right + ? width / 5 * this.props.right.length + : 0, swiping: true, - timeStart: (new Date()).getTime(), + timeStart: new Date().getTime() }); }); }, @@ -185,8 +186,10 @@ const Swipeout = React.createClass({ } if (this.state.swiping) { // move content to reveal swipeout - if (posX < 0 && this.props.right) this.setState({ contentPos: Math.min(posX, 0) }); - else if (posX > 0 && this.props.left) this.setState({ contentPos: Math.max(posX, 0) }); + if (posX < 0 && this.props.right) + this.setState({ contentPos: Math.min(posX, 0) }); + else if (posX > 0 && this.props.left) + this.setState({ contentPos: Math.max(posX, 0) }); } }, @@ -198,36 +201,43 @@ const Swipeout = React.createClass({ var btnsRightWidth = this.state.btnsRightWidth; // minimum threshold to open swipeout - var openX = contentWidth*0.33; + var openX = contentWidth * 0.33; // should open swipeout - var openLeft = posX > openX || posX > btnsLeftWidth/2; - var openRight = posX < -openX || posX < -btnsRightWidth/2; + var openLeft = posX > openX || posX > btnsLeftWidth / 2; + var openRight = posX < -openX || posX < -btnsRightWidth / 2; // account for open swipeouts - if (this.state.openedRight) var openRight = posX-openX < -openX; - if (this.state.openedLeft) var openLeft = posX+openX > openX; + if (this.state.openedRight) var openRight = posX - openX < -openX; + if (this.state.openedLeft) var openLeft = posX + openX > openX; // reveal swipeout on quick swipe - var timeDiff = (new Date()).getTime() - this.state.timeStart < 200; + var timeDiff = new Date().getTime() - this.state.timeStart < 200; if (timeDiff) { - var openRight = posX < -openX/10 && !this.state.openedLeft; - var openLeft = posX > openX/10 && !this.state.openedRight; + var openRight = posX < -openX / 10 && !this.state.openedLeft; + var openLeft = posX > openX / 10 && !this.state.openedRight; } if (this.state.swiping) { if (openRight && contentPos < 0 && posX < 0) { // open swipeout right - this._tweenContent('contentPos', -btnsRightWidth); - this.setState({ contentPos: -btnsRightWidth, openedLeft: false, openedRight: true }); + this._tweenContent("contentPos", -btnsRightWidth); + this.setState({ + contentPos: -btnsRightWidth, + openedLeft: false, + openedRight: true + }); } else if (openLeft && contentPos > 0 && posX > 0) { // open swipeout left - this._tweenContent('contentPos', btnsLeftWidth); - this.setState({ contentPos: btnsLeftWidth, openedLeft: true, openedRight: false }); - } - else { + this._tweenContent("contentPos", btnsLeftWidth); + this.setState({ + contentPos: btnsLeftWidth, + openedLeft: true, + openedRight: false + }); + } else { // close swipeout - this._tweenContent('contentPos', 0); + this._tweenContent("contentPos", 0); this.setState({ contentPos: 0, openedLeft: false, openedRight: false }); } } @@ -239,14 +249,18 @@ const Swipeout = React.createClass({ _tweenContent: function(state, endValue) { this.tweenState(state, { easing: tweenState.easingTypes.easeInOutQuad, - duration: endValue === 0 ? this.state.tweenDuration*1.5 : this.state.tweenDuration, - endValue: endValue, + duration: endValue === 0 + ? this.state.tweenDuration * 1.5 + : this.state.tweenDuration, + endValue: endValue }); }, _rubberBandEasing: function(value, limit) { - if (value < 0 && value < limit) return limit - Math.pow(limit - value, 0.85); - else if (value > 0 && value > limit) return limit + Math.pow(value - limit, 0.85); + if (value < 0 && value < limit) + return limit - Math.pow(limit - value, 0.85); + else if (value > 0 && value > limit) + return limit + Math.pow(value - limit, 0.85); return value; }, @@ -258,16 +272,16 @@ const Swipeout = React.createClass({ }, _close: function() { - this._tweenContent('contentPos', 0); + this._tweenContent("contentPos", 0); this.setState({ openedRight: false, - openedLeft: false, + openedLeft: false }); }, render: function() { var contentWidth = this.state.contentWidth; - var posX = this.getTweeningValue('contentPos'); + var posX = this.getTweeningValue("contentPos"); var styleSwipeout = [styles.swipeout, this.props.style]; if (this.props.backgroundColor) { @@ -280,20 +294,20 @@ const Swipeout = React.createClass({ var styleLeftPos = { left: { left: 0, - overflow: 'hidden', - width: Math.min(limit*(posX/limit), limit), - }, + overflow: "hidden", + width: Math.min(limit * (posX / limit), limit) + } }; var styleRightPos = { right: { left: Math.abs(contentWidth + Math.max(limit, posX)), - right: 0, - }, + right: 0 + } }; var styleContentPos = { content: { - left: this._rubberBandEasing(posX, limit), - }, + left: this._rubberBandEasing(posX, limit) + } }; var styleContent = [styles.swipeoutContent]; @@ -314,11 +328,12 @@ const Swipeout = React.createClass({ ref="swipeoutContent" style={styleContent} onLayout={this._onLayout} - {...this._panResponder.panHandlers}> + {...this._panResponder.panHandlers} + > {this.props.children} - { this._renderButtons(this.props.right, isRightVisible, styleRight) } - { this._renderButtons(this.props.left, isLeftVisible, styleLeft) } + {this._renderButtons(this.props.right, isRightVisible, styleRight)} + {this._renderButtons(this.props.left, isLeftVisible, styleLeft)} ); }, @@ -327,39 +342,40 @@ const Swipeout = React.createClass({ var { width, height } = event.nativeEvent.layout; this.setState({ contentWidth: width, - contentHeight: height, + contentHeight: height }); }, _renderButtons: function(buttons, isVisible, style) { if (buttons && isVisible) { - return( - { buttons.map(this._renderButton) } - ); - } else { return ( - + + {buttons.map(this._renderButton)} + ); + } else { + return ; } }, _renderButton: function(btn, i) { return ( this._autoClose(btn)} - text={btn.text} - type={btn.type} - underlayColor={btn.underlayColor} - width={this.state.btnWidth}/> - ); + backgroundColor={btn.backgroundColor} + color={btn.color} + component={btn.component} + disabled={btn.disabled} + height={this.state.contentHeight} + key={i} + onPress={() => this._autoClose(btn)} + text={btn.text} + type={btn.type} + underlayColor={btn.underlayColor} + width={this.state.btnWidth} + /> + ); } -}) +}); Swipeout.NativeButton = NativeButton; Swipeout.SwipeoutButton = SwipeoutBtn; @@ -368,11 +384,13 @@ Swipeout.propTypes = { ...ViewPropTypes, style: React.PropTypes.object, dataArray: React.PropTypes.object, - renderRow: React.PropTypes.object, + renderRow: React.PropTypes.object }; -const StyledSwipeout = connectStyle('NativeBase.Swipeout', {}, mapPropsToStyleNames)(Swipeout); +const StyledSwipeout = connectStyle( + "NativeBase.Swipeout", + {}, + mapPropsToStyleNames +)(Swipeout); -export { - StyledSwipeout as Swipeout, -}; +export { StyledSwipeout as Swipeout }; diff --git a/src/basic/Swipe/styles.js b/src/basic/Swipe/styles.js index 78f61006a..973a8319d 100644 --- a/src/basic/Swipe/styles.js +++ b/src/basic/Swipe/styles.js @@ -1,45 +1,42 @@ -import { - StyleSheet, -} from 'react-native'; +import { StyleSheet } from "react-native"; const styles = StyleSheet.create({ swipeout: { - backgroundColor: '#dbddde', - overflow: 'hidden', + backgroundColor: "#dbddde", + overflow: "hidden" }, swipeoutBtnTouchable: { - flex: 1, + flex: 1 }, swipeoutBtn: { - alignItems: 'center', - backgroundColor: '#b6bec0', + alignItems: "center", + backgroundColor: "#b6bec0", flex: 1, - justifyContent: 'center', - overflow: 'hidden', + justifyContent: "center", + overflow: "hidden" }, swipeoutBtnText: { - color: '#fff', - textAlign: 'center', + color: "#fff", + textAlign: "center" }, swipeoutBtns: { bottom: 0, flex: 1, - flexDirection: 'row', - position: 'absolute', + flexDirection: "row", + position: "absolute", right: 0, - top: 0, - }, - swipeoutContent: { + top: 0 }, + swipeoutContent: {}, colorDelete: { - backgroundColor: '#fb3d38', + backgroundColor: "#fb3d38" }, colorPrimary: { - backgroundColor: '#006fff' + backgroundColor: "#006fff" }, colorSecondary: { - backgroundColor: '#fd9427' - }, -}) + backgroundColor: "#fd9427" + } +}); export default styles; diff --git a/src/basic/Switch.js b/src/basic/Switch.js index ab3c2a598..2adb2ec39 100644 --- a/src/basic/Switch.js +++ b/src/basic/Switch.js @@ -1,23 +1,23 @@ -import React, { Component } from 'react'; -import { Switch as SwitchNB } from 'react-native'; +import React, { Component } from "react"; +import { Switch as SwitchNB } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Switch extends Component { render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } Switch.propTypes = { - ...Switch.propTypes, + ...Switch.propTypes }; -const StyledSwitch = connectStyle('NativeBase.Switch', {}, mapPropsToStyleNames)(Switch); +const StyledSwitch = connectStyle( + "NativeBase.Switch", + {}, + mapPropsToStyleNames +)(Switch); -export { - StyledSwitch as Switch, -}; +export { StyledSwitch as Switch }; diff --git a/src/basic/Tab.js b/src/basic/Tab.js index 46225d5a6..ba020e6ce 100644 --- a/src/basic/Tab.js +++ b/src/basic/Tab.js @@ -1,13 +1,13 @@ -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Tab extends Component { render() { return ( - this._root = c} {...this.props}> + (this._root = c)} {...this.props}> {this.props.children} ); @@ -16,11 +16,9 @@ class Tab extends Component { Tab.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledTab = connectStyle('NativeBase.Tab', {}, mapPropsToStyleNames)(Tab); +const StyledTab = connectStyle("NativeBase.Tab", {}, mapPropsToStyleNames)(Tab); -export { - StyledTab as Tab, -}; +export { StyledTab as Tab }; diff --git a/src/basic/TabContainer.js b/src/basic/TabContainer.js index 9cd7d2069..aad3bdbfe 100644 --- a/src/basic/TabContainer.js +++ b/src/basic/TabContainer.js @@ -1,26 +1,24 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class TabContainer extends Component { render() { - return ( - this._root = c} {...this.props}> - ); + return (this._root = c)} {...this.props} />; } } TabContainer.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledTabContainer = connectStyle('NativeBase.TabContainer', {}, mapPropsToStyleNames)(TabContainer); -export { - StyledTabContainer as TabContainer, -}; +const StyledTabContainer = connectStyle( + "NativeBase.TabContainer", + {}, + mapPropsToStyleNames +)(TabContainer); +export { StyledTabContainer as TabContainer }; diff --git a/src/basic/TabHeading.js b/src/basic/TabHeading.js index 0e3ef771b..b90e518ec 100644 --- a/src/basic/TabHeading.js +++ b/src/basic/TabHeading.js @@ -1,26 +1,24 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class TabHeadingNB extends Component { render() { - return ( - this._root = c} {...this.props}> - ); + return (this._root = c)} {...this.props} />; } } TabHeadingNB.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledTabHeadingNB = connectStyle('NativeBase.TabHeading', {}, mapPropsToStyleNames)(TabHeadingNB); -export { - StyledTabHeadingNB as TabHeading, -}; +const StyledTabHeadingNB = connectStyle( + "NativeBase.TabHeading", + {}, + mapPropsToStyleNames +)(TabHeadingNB); +export { StyledTabHeadingNB as TabHeading }; diff --git a/src/basic/Tabs/Button.android.js b/src/basic/Tabs/Button.android.js index e1e184e40..3f9a138b1 100644 --- a/src/basic/Tabs/Button.android.js +++ b/src/basic/Tabs/Button.android.js @@ -1,18 +1,17 @@ -const React = require('react'); -const ReactNative = require('react-native'); -const { - TouchableNativeFeedback, - View, -} = ReactNative; +const React = require("react"); +const ReactNative = require("react-native"); +const { TouchableNativeFeedback, View } = ReactNative; -const Button = (props) => { - return - {props.children} - ; +const Button = props => { + return ( + + {props.children} + + ); }; module.exports = Button; diff --git a/src/basic/Tabs/Button.ios.js b/src/basic/Tabs/Button.ios.js index d205a2a58..c6a628506 100644 --- a/src/basic/Tabs/Button.ios.js +++ b/src/basic/Tabs/Button.ios.js @@ -1,14 +1,13 @@ -const React = require('react'); -const ReactNative = require('react-native'); -const { - TouchableOpacity, - View, -} = ReactNative; +const React = require("react"); +const ReactNative = require("react-native"); +const { TouchableOpacity, View } = ReactNative; -const Button = (props) => { - return - {props.children} - ; +const Button = props => { + return ( + + {props.children} + + ); }; module.exports = Button; diff --git a/src/basic/Tabs/Button.windows.js b/src/basic/Tabs/Button.windows.js index c2cc1a453..a088aa9c0 100644 --- a/src/basic/Tabs/Button.windows.js +++ b/src/basic/Tabs/Button.windows.js @@ -1,14 +1,13 @@ -const React = require('react'); -const ReactNative = require('react-native'); -const { - TouchableOpacity, - View, -} = ReactNative; +const React = require("react"); +const ReactNative = require("react-native"); +const { TouchableOpacity, View } = ReactNative; -const Button = (props) => { - return - {props.children} - ; +const Button = props => { + return ( + + {props.children} + + ); }; module.exports = Button; diff --git a/src/basic/Tabs/DefaultTabBar.js b/src/basic/Tabs/DefaultTabBar.js index 9a3dc03d9..bcd553a0a 100644 --- a/src/basic/Tabs/DefaultTabBar.js +++ b/src/basic/Tabs/DefaultTabBar.js @@ -1,18 +1,12 @@ -const React = require('react'); -const ReactNative = require('react-native'); -import { connectStyle, StyleProvider } from 'native-base-shoutem-theme'; -import variable from './../../theme/variables/platform'; -import { TabHeading, Text, TabContainer } from './../../index'; -import _ from 'lodash'; +const React = require("react"); +const ReactNative = require("react-native"); +import { connectStyle, StyleProvider } from "native-base-shoutem-theme"; +import variable from "./../../theme/variables/platform"; +import { TabHeading, Text, TabContainer } from "./../../index"; +import _ from "lodash"; -const { - StyleSheet, - View, - Animated, - Platform, - ViewPropTypes -} = ReactNative; -const Button = require('./Button'); +const { StyleSheet, View, Animated, Platform, ViewPropTypes } = ReactNative; +const Button = require("./Button"); const DefaultTabBar = React.createClass({ propTypes: { @@ -24,86 +18,119 @@ const DefaultTabBar = React.createClass({ inactiveTextColor: React.PropTypes.string, tabStyle: ViewPropTypes.style, renderTab: React.PropTypes.func, - underlineStyle: ViewPropTypes.style, + underlineStyle: ViewPropTypes.style }, contextTypes: { - theme: React.PropTypes.object, + theme: React.PropTypes.object }, getDefaultProps() { return { activeTextColor: variable.topTabBarActiveTextColor, inactiveTextColor: variable.topTabBarTextColor, - backgroundColor: null, + backgroundColor: null }; }, - renderTabOption(name, page) { - }, + renderTabOption(name, page) {}, - renderTab(name, page, isTabActive, onPressHandler, tabStyle, activeTabStyle, textStyle, activeTextStyle, tabHeaderStyle) { - const headerContent = (typeof name !== 'string') ? name.props.children : undefined; + renderTab( + name, + page, + isTabActive, + onPressHandler, + tabStyle, + activeTabStyle, + textStyle, + activeTextStyle, + tabHeaderStyle + ) { + const headerContent = typeof name !== "string" + ? name.props.children + : undefined; const { activeTextColor, inactiveTextColor } = this.props; const textColor = isTabActive ? activeTextColor : inactiveTextColor; - const fontWeight = isTabActive ? 'bold' : 'normal'; - if (typeof name === 'string') { - return ; - } - else { - return + const fontWeight = isTabActive ? "bold" : "normal"; + if (typeof name === "string") { + return ( + + ); + } else { + return ( + + ); } }, render() { - const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable; + const variables = this.context.theme + ? this.context.theme["@@shoutem.theme/themeStyle"].variables + : variable; const platformStyle = variables.platformStyle; const containerWidth = this.props.containerWidth; const numberOfTabs = this.props.tabs.length; const tabUnderlineStyle = { - position: 'absolute', + position: "absolute", width: containerWidth / numberOfTabs, height: 4, backgroundColor: variables.topTabBarActiveBorderColor, - bottom: 0, + bottom: 0 }; - const left = this.props.scrollValue.interpolate({ - inputRange: [0, 1,], outputRange: [0, containerWidth / numberOfTabs,], + inputRange: [0, 1], + outputRange: [0, containerWidth / numberOfTabs] }); return ( {this.props.tabs.map((name, page) => { const isTabActive = this.props.activeTab === page; const renderTab = this.props.renderTab || this.renderTab; - return renderTab(name, page, isTabActive, this.props.goToPage, this.props.tabStyle[page], this.props.activeTabStyle[page], this.props.textStyle[page], this.props.activeTextStyle[page], this.props.tabHeaderStyle[page]); + return renderTab( + name, + page, + isTabActive, + this.props.goToPage, + this.props.tabStyle[page], + this.props.activeTabStyle[page], + this.props.textStyle[page], + this.props.activeTextStyle[page], + this.props.tabHeaderStyle[page] + ); })} - + ); - }, + } }); // module.exports = DefaultTabBar; -const StyledTab = connectStyle('NativeBase.DefaultTabBar', {}, mapPropsToStyleNames)(DefaultTabBar); -export { - StyledTab as DefaultTabBar, -}; +const StyledTab = connectStyle( + "NativeBase.DefaultTabBar", + {}, + mapPropsToStyleNames +)(DefaultTabBar); +export { StyledTab as DefaultTabBar }; diff --git a/src/basic/Tabs/SceneComponent.js b/src/basic/Tabs/SceneComponent.js index 6d31620ab..04b680e6d 100644 --- a/src/basic/Tabs/SceneComponent.js +++ b/src/basic/Tabs/SceneComponent.js @@ -1,17 +1,19 @@ -const React = require('react'); -const ReactNative = require('react-native'); -const { Component, } = React; -const { View, StyleSheet, } = ReactNative; +const React = require("react"); +const ReactNative = require("react-native"); +const { Component } = React; +const { View, StyleSheet } = ReactNative; -const StaticContainer = require('./StaticContainer'); +const StaticContainer = require("./StaticContainer"); -const SceneComponent = (Props) => { - const { shouldUpdated, ...props, } = Props; - return - - {props.children} - - ; +const SceneComponent = Props => { + const { shouldUpdated, ...props } = Props; + return ( + + + {props.children} + + + ); }; module.exports = SceneComponent; diff --git a/src/basic/Tabs/ScrollableTabBar.js b/src/basic/Tabs/ScrollableTabBar.js index 0e9b5079f..208befb1b 100644 --- a/src/basic/Tabs/ScrollableTabBar.js +++ b/src/basic/Tabs/ScrollableTabBar.js @@ -1,9 +1,9 @@ -const React = require('react'); -const ReactNative = require('react-native'); -import { connectStyle, StyleProvider } from 'native-base-shoutem-theme'; -import variable from './../../theme/variables/platform'; -import { TabHeading, Text, TabContainer } from './../../index'; -import _ from 'lodash'; +const React = require("react"); +const ReactNative = require("react-native"); +import { connectStyle, StyleProvider } from "native-base-shoutem-theme"; +import variable from "./../../theme/variables/platform"; +import { TabHeading, Text, TabContainer } from "./../../index"; +import _ from "lodash"; const { View, Animated, @@ -13,9 +13,9 @@ const { Dimensions, ViewPropTypes } = ReactNative; -const Button = require('./Button'); +const Button = require("./Button"); -const WINDOW_WIDTH = Dimensions.get('window').width; +const WINDOW_WIDTH = Dimensions.get("window").width; const ScrollableTabBar = React.createClass({ propTypes: { @@ -31,22 +31,22 @@ const ScrollableTabBar = React.createClass({ tabsContainerStyle: ViewPropTypes.style, renderTab: React.PropTypes.func, underlineStyle: ViewPropTypes.style, - onScroll: React.PropTypes.func, + onScroll: React.PropTypes.func }, contextTypes: { - theme: React.PropTypes.object, + theme: React.PropTypes.object }, getDefaultProps() { return { scrollOffset: 52, - activeTextColor: 'navy', - inactiveTextColor: 'black', + activeTextColor: "navy", + inactiveTextColor: "black", backgroundColor: null, style: {}, tabStyle: {}, tabsContainerStyle: {}, - underlineStyle: {}, + underlineStyle: {} }; }, @@ -55,7 +55,7 @@ const ScrollableTabBar = React.createClass({ return { _leftTabUnderline: new Animated.Value(0), _widthTabUnderline: new Animated.Value(0), - _containerWidth: null, + _containerWidth: null }; }, @@ -73,40 +73,55 @@ const ScrollableTabBar = React.createClass({ return; } - if (this.necessarilyMeasurementsCompleted(position, position === lastTabPosition)) { + if ( + this.necessarilyMeasurementsCompleted( + position, + position === lastTabPosition + ) + ) { this.updateTabPanel(position, pageOffset); this.updateTabUnderline(position, pageOffset, tabCount); } }, necessarilyMeasurementsCompleted(position, isLastTab) { - return this._tabsMeasurements[position] && + return ( + this._tabsMeasurements[position] && (isLastTab || this._tabsMeasurements[position + 1]) && this._tabContainerMeasurements && - this._containerMeasurements; + this._containerMeasurements + ); }, updateTabPanel(position, pageOffset) { const containerWidth = this._containerMeasurements.width; const tabWidth = this._tabsMeasurements[position].width; const nextTabMeasurements = this._tabsMeasurements[position + 1]; - const nextTabWidth = nextTabMeasurements && nextTabMeasurements.width || 0; + const nextTabWidth = + (nextTabMeasurements && nextTabMeasurements.width) || 0; const tabOffset = this._tabsMeasurements[position].left; const absolutePageOffset = pageOffset * tabWidth; let newScrollX = tabOffset + absolutePageOffset; // center tab and smooth tab change (for when tabWidth changes a lot between two tabs) - newScrollX -= (containerWidth - (1 - pageOffset) * tabWidth - pageOffset * nextTabWidth) / 2; + newScrollX -= + (containerWidth - + (1 - pageOffset) * tabWidth - + pageOffset * nextTabWidth) / + 2; newScrollX = newScrollX >= 0 ? newScrollX : 0; - if (Platform.OS === 'android') { - this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false, }); + if (Platform.OS === "android") { + this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false }); } else { - const rightBoundScroll = this._tabContainerMeasurements.width - (this._containerMeasurements.width); - newScrollX = newScrollX > rightBoundScroll ? rightBoundScroll : newScrollX; - this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false, }); + const rightBoundScroll = + this._tabContainerMeasurements.width - + this._containerMeasurements.width; + newScrollX = newScrollX > rightBoundScroll + ? rightBoundScroll + : newScrollX; + this._scrollView.scrollTo({ x: newScrollX, y: 0, animated: false }); } - }, updateTabUnderline(position, pageOffset, tabCount) { @@ -117,8 +132,10 @@ const ScrollableTabBar = React.createClass({ const nextTabLeft = this._tabsMeasurements[position + 1].left; const nextTabRight = this._tabsMeasurements[position + 1].right; - const newLineLeft = (pageOffset * nextTabLeft + (1 - pageOffset) * lineLeft); - const newLineRight = (pageOffset * nextTabRight + (1 - pageOffset) * lineRight); + const newLineLeft = + pageOffset * nextTabLeft + (1 - pageOffset) * lineLeft; + const newLineRight = + pageOffset * nextTabRight + (1 - pageOffset) * lineRight; this.state._leftTabUnderline.setValue(newLineLeft); this.state._widthTabUnderline.setValue(newLineRight - newLineLeft); @@ -128,47 +145,66 @@ const ScrollableTabBar = React.createClass({ } }, - renderTab(name, page, isTabActive, onPressHandler, onLayoutHandler, tabStyle, activeTabStyle, textStyle, activeTextStyle, tabHeaderStyle) { - const headerContent = (typeof name !== 'string') ? name.props.children : undefined; + renderTab( + name, + page, + isTabActive, + onPressHandler, + onLayoutHandler, + tabStyle, + activeTabStyle, + textStyle, + activeTextStyle, + tabHeaderStyle + ) { + const headerContent = typeof name !== "string" + ? name.props.children + : undefined; const { activeTextColor, inactiveTextColor } = this.props; const textColor = isTabActive ? activeTextColor : inactiveTextColor; - const fontWeight = isTabActive ? 'bold' : 'normal'; + const fontWeight = isTabActive ? "bold" : "normal"; - if (typeof name === 'string') { - return ; - } - else { - return + if (typeof name === "string") { + return ( + + ); + } else { + return ( + + ); } }, measureTab(page, event) { - const { x, width, height, } = event.nativeEvent.layout; - this._tabsMeasurements[page] = { left: x, right: x + width, width, height, }; - this.updateView({ value: this.props.scrollValue._value, }); + const { x, width, height } = event.nativeEvent.layout; + this._tabsMeasurements[page] = { left: x, right: x + width, width, height }; + this.updateView({ value: this.props.scrollValue._value }); }, render() { - const variables = (this.context.theme) ? this.context.theme['@@shoutem.theme/themeStyle'].variables : variable; + const variables = this.context.theme + ? this.context.theme["@@shoutem.theme/themeStyle"].variables + : variable; const tabUnderlineStyle = { - position: 'absolute', + position: "absolute", height: 4, backgroundColor: variables.topTabBarActiveBorderColor, bottom: 0 @@ -176,44 +212,76 @@ const ScrollableTabBar = React.createClass({ const dynamicTabUnderline = { left: this.state._leftTabUnderline, - width: this.state._widthTabUnderline, + width: this.state._widthTabUnderline }; - return - { this._scrollView = scrollView; }} - horizontal={true} - showsHorizontalScrollIndicator={false} - showsVerticalScrollIndicator={false} - directionalLockEnabled={true} - onScroll={this.props.onScroll} - bounces={false} - scrollsToTop={false} + return ( + - { + this._scrollView = scrollView; + }} + horizontal={true} + showsHorizontalScrollIndicator={false} + showsVerticalScrollIndicator={false} + directionalLockEnabled={true} + onScroll={this.props.onScroll} + bounces={false} + scrollsToTop={false} > - {this.props.tabs.map((name, page) => { - const isTabActive = this.props.activeTab === page; - const renderTab = this.props.renderTab || this.renderTab; - return renderTab(name, page, isTabActive, this.props.goToPage, this.measureTab.bind(this, page), this.props.tabStyle[page], this.props.activeTabStyle[page], this.props.textStyle[page], this.props.activeTextStyle[page], this.props.tabHeaderStyle[page]); - })} - - - - ; + + {this.props.tabs.map((name, page) => { + const isTabActive = this.props.activeTab === page; + const renderTab = this.props.renderTab || this.renderTab; + return renderTab( + name, + page, + isTabActive, + this.props.goToPage, + this.measureTab.bind(this, page), + this.props.tabStyle[page], + this.props.activeTabStyle[page], + this.props.textStyle[page], + this.props.activeTextStyle[page], + this.props.tabHeaderStyle[page] + ); + })} + + + + + ); }, componentWillReceiveProps(nextProps) { // If the tabs change, force the width of the tabs container to be recalculated - if (!_.isEqual(this.props.tabs, nextProps.tabs) && this.state._containerWidth) { - this.setState({ _containerWidth: null, }); + if ( + !_.isEqual(this.props.tabs, nextProps.tabs) && + this.state._containerWidth + ) { + this.setState({ _containerWidth: null }); } }, @@ -223,28 +291,30 @@ const ScrollableTabBar = React.createClass({ if (width < WINDOW_WIDTH) { width = WINDOW_WIDTH; } - this.setState({ _containerWidth: width, }); - this.updateView({ value: this.props.scrollValue._value, }); + this.setState({ _containerWidth: width }); + this.updateView({ value: this.props.scrollValue._value }); }, onContainerLayout(e) { this._containerMeasurements = e.nativeEvent.layout; - this.updateView({ value: this.props.scrollValue._value, }); - }, + this.updateView({ value: this.props.scrollValue._value }); + } }); // module.exports = ScrollableTabBar; -const StyledTab = connectStyle('NativeBase.ScrollableTab', {}, mapPropsToStyleNames)(ScrollableTabBar); -export { - StyledTab as ScrollableTab, -}; +const StyledTab = connectStyle( + "NativeBase.ScrollableTab", + {}, + mapPropsToStyleNames +)(ScrollableTabBar); +export { StyledTab as ScrollableTab }; const styles = StyleSheet.create({ tab: { height: 49, - alignItems: 'center', - justifyContent: 'center', + alignItems: "center", + justifyContent: "center", paddingLeft: 20, - paddingRight: 20, + paddingRight: 20 }, container: { height: 50, @@ -252,10 +322,10 @@ const styles = StyleSheet.create({ borderTopWidth: 0, borderLeftWidth: 0, borderRightWidth: 0, - borderColor: '#ccc', + borderColor: "#ccc" }, tabs: { - flexDirection: 'row', - justifyContent: 'space-around', - }, + flexDirection: "row", + justifyContent: "space-around" + } }); diff --git a/src/basic/Tabs/StaticContainer.js b/src/basic/Tabs/StaticContainer.js index 791d60d7a..3c7163115 100644 --- a/src/basic/Tabs/StaticContainer.js +++ b/src/basic/Tabs/StaticContainer.js @@ -1,7 +1,6 @@ -var React = require('react'); +var React = require("react"); class StaticContainer extends React.Component { - shouldComponentUpdate(nextProps: Object): boolean { return !!nextProps.shouldUpdate; } @@ -13,7 +12,6 @@ class StaticContainer extends React.Component { } return React.Children.only(child); } - } -module.exports = StaticContainer; \ No newline at end of file +module.exports = StaticContainer; diff --git a/src/basic/Tabs/index.js b/src/basic/Tabs/index.js index 12a527324..c0b7159c6 100644 --- a/src/basic/Tabs/index.js +++ b/src/basic/Tabs/index.js @@ -1,9 +1,6 @@ -const React = require('react'); -const { - PropTypes, - Component, -} = React; -const ReactNative = require('react-native'); +const React = require("react"); +const { PropTypes, Component } = React; +const ReactNative = require("react-native"); const { Dimensions, View, @@ -14,23 +11,27 @@ const { Platform, ViewPropTypes } = ReactNative; -const TimerMixin = require('react-timer-mixin'); -import _ from 'lodash'; - -const SceneComponent = require('./SceneComponent'); -const { DefaultTabBar } = require('./DefaultTabBar'); -const { ScrollableTabBar } = require('./ScrollableTabBar'); +const TimerMixin = require("react-timer-mixin"); +import _ from "lodash"; +const SceneComponent = require("./SceneComponent"); +const { DefaultTabBar } = require("./DefaultTabBar"); +const { ScrollableTabBar } = require("./ScrollableTabBar"); const ScrollableTabView = React.createClass({ - mixins: [TimerMixin,], + mixins: [TimerMixin], statics: { DefaultTabBar, - ScrollableTabBar, + ScrollableTabBar }, propTypes: { - tabBarPosition: PropTypes.oneOf(['top', 'bottom', 'overlayTop', 'overlayBottom',]), + tabBarPosition: PropTypes.oneOf([ + "top", + "bottom", + "overlayTop", + "overlayBottom" + ]), initialPage: PropTypes.number, page: PropTypes.number, onChangeTab: PropTypes.func, @@ -40,20 +41,20 @@ const ScrollableTabView = React.createClass({ contentProps: PropTypes.object, scrollWithoutAnimation: PropTypes.bool, locked: PropTypes.bool, - prerenderingSiblingsNumber: PropTypes.number, + prerenderingSiblingsNumber: PropTypes.number }, getDefaultProps() { return { - tabBarPosition: 'top', + tabBarPosition: "top", initialPage: 0, page: -1, - onChangeTab: () => { }, - onScroll: () => { }, + onChangeTab: () => {}, + onScroll: () => {}, contentProps: {}, scrollWithoutAnimation: false, locked: false, - prerenderingSiblingsNumber: 0, + prerenderingSiblingsNumber: 0 }; }, @@ -61,14 +62,14 @@ const ScrollableTabView = React.createClass({ return { currentPage: this.props.initialPage, scrollValue: new Animated.Value(this.props.initialPage), - containerWidth: Dimensions.get('window').width, - sceneKeys: this.newSceneKeys({ currentPage: this.props.initialPage, }), + containerWidth: Dimensions.get("window").width, + sceneKeys: this.newSceneKeys({ currentPage: this.props.initialPage }) }; }, componentDidMount() { const scrollFn = () => { - if (this.scrollView && Platform.OS === 'android') { + if (this.scrollView && Platform.OS === "android") { const x = this.props.initialPage * this.state.containerWidth; this.scrollView.scrollTo({ x, animated: false }); } @@ -80,7 +81,10 @@ const ScrollableTabView = React.createClass({ componentWillReceiveProps(props) { if (props.children !== this.props.children) { - this.updateSceneKeys({ page: this.state.currentPage, children: props.children, }); + this.updateSceneKeys({ + page: this.state.currentPage, + children: props.children + }); } if (props.page >= 0 && props.page !== this.state.currentPage) { @@ -91,13 +95,17 @@ const ScrollableTabView = React.createClass({ goToPage(pageNumber) { const offset = pageNumber * this.state.containerWidth; if (this.scrollView) { - this.scrollView.scrollTo({ x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, }); + this.scrollView.scrollTo({ + x: offset, + y: 0, + animated: !this.props.scrollWithoutAnimation + }); } const currentPage = this.state.currentPage; this.updateSceneKeys({ page: pageNumber, - callback: this._onChangeTab.bind(this, currentPage, pageNumber), + callback: this._onChangeTab.bind(this, currentPage, pageNumber) }); }, @@ -111,17 +119,31 @@ const ScrollableTabView = React.createClass({ } }, - updateSceneKeys({ page, children = this.props.children, callback = () => { }, }) { - let newKeys = this.newSceneKeys({ previousKeys: this.state.sceneKeys, currentPage: page, children, }); - this.setState({ currentPage: page, sceneKeys: newKeys, }, callback); + updateSceneKeys({ + page, + children = this.props.children, + callback = () => {} + }) { + let newKeys = this.newSceneKeys({ + previousKeys: this.state.sceneKeys, + currentPage: page, + children + }); + this.setState({ currentPage: page, sceneKeys: newKeys }, callback); }, - newSceneKeys({ previousKeys = [], currentPage = 0, children = this.props.children, }) { + newSceneKeys({ + previousKeys = [], + currentPage = 0, + children = this.props.children + }) { let newKeys = []; this._children(children).forEach((child, idx) => { let key = this._makeSceneKey(child, idx); - if (this._keyExists(previousKeys, key) || - this._shouldRenderSceneKey(idx, currentPage)) { + if ( + this._keyExists(previousKeys, key) || + this._shouldRenderSceneKey(idx, currentPage) + ) { newKeys.push(key); } }); @@ -130,55 +152,70 @@ const ScrollableTabView = React.createClass({ _shouldRenderSceneKey(idx, currentPageKey) { let numOfSibling = this.props.prerenderingSiblingsNumber; - return (idx < (currentPageKey + numOfSibling + 1) && - idx > (currentPageKey - numOfSibling - 1)); + return ( + idx < currentPageKey + numOfSibling + 1 && + idx > currentPageKey - numOfSibling - 1 + ); }, _keyExists(sceneKeys, key) { - return sceneKeys.find((sceneKey) => key === sceneKey); + return sceneKeys.find(sceneKey => key === sceneKey); }, _makeSceneKey(child, idx) { - return child.props.heading + '_' + idx; + return child.props.heading + "_" + idx; }, renderScrollableContent() { const scenes = this._composeScenes(); - return { this.scrollView = scrollView; }} - onScroll={(e) => { - const offsetX = e.nativeEvent.contentOffset.x; - this._updateScrollValue(offsetX / this.state.containerWidth); - }} - onMomentumScrollBegin={this._onMomentumScrollBeginAndEnd} - onMomentumScrollEnd={this._onMomentumScrollBeginAndEnd} - scrollEventThrottle={16} - scrollsToTop={false} - showsHorizontalScrollIndicator={false} - scrollEnabled={!this.props.locked} - directionalLockEnabled - alwaysBounceVertical={false} - keyboardDismissMode="on-drag" - {...this.props.contentProps} - > - {scenes} - ; + return ( + { + this.scrollView = scrollView; + }} + onScroll={e => { + const offsetX = e.nativeEvent.contentOffset.x; + this._updateScrollValue(offsetX / this.state.containerWidth); + }} + onMomentumScrollBegin={this._onMomentumScrollBeginAndEnd} + onMomentumScrollEnd={this._onMomentumScrollBeginAndEnd} + scrollEventThrottle={16} + scrollsToTop={false} + showsHorizontalScrollIndicator={false} + scrollEnabled={!this.props.locked} + directionalLockEnabled + alwaysBounceVertical={false} + keyboardDismissMode="on-drag" + {...this.props.contentProps} + > + {scenes} + + ); }, _composeScenes() { return this._children().map((child, idx) => { let key = this._makeSceneKey(child, idx); - return - {this._keyExists(this.state.sceneKeys, key) ? child : } - ; + return ( + + {this._keyExists(this.state.sceneKeys, key) + ? child + : } + + ); }); }, @@ -192,14 +229,14 @@ const ScrollableTabView = React.createClass({ _updateSelectedPage(nextPage) { let localNextPage = nextPage; - if (typeof localNextPage === 'object') { + if (typeof localNextPage === "object") { localNextPage = nextPage.nativeEvent.position; } const currentPage = this.state.currentPage; this.updateSceneKeys({ page: localNextPage, - callback: this._onChangeTab.bind(this, currentPage, localNextPage), + callback: this._onChangeTab.bind(this, currentPage, localNextPage) }); }, @@ -207,7 +244,7 @@ const ScrollableTabView = React.createClass({ this.props.onChangeTab({ i: currentPage, ref: this._children()[currentPage], - from: prevPage, + from: prevPage }); }, @@ -217,10 +254,10 @@ const ScrollableTabView = React.createClass({ }, _handleLayout(e) { - const { width, } = e.nativeEvent.layout; + const { width } = e.nativeEvent.layout; if (Math.round(width) !== Math.round(this.state.containerWidth)) { - this.setState({ containerWidth: width, }); + this.setState({ containerWidth: width }); this.requestAnimationFrame(() => { this.goToPage(this.state.currentPage); }); @@ -228,22 +265,28 @@ const ScrollableTabView = React.createClass({ }, _children(children = this.props.children) { - return React.Children.map(children, (child) => child); + return React.Children.map(children, child => child); }, render() { - let overlayTabs = (this.props.tabBarPosition === 'overlayTop' || this.props.tabBarPosition === 'overlayBottom'); + let overlayTabs = + this.props.tabBarPosition === "overlayTop" || + this.props.tabBarPosition === "overlayBottom"; let tabBarProps = { goToPage: this.goToPage, - tabs: this._children().map((child) => child.props.heading), - tabStyle: this._children().map((child) => child.props.tabStyle), - activeTabStyle: this._children().map((child) => child.props.activeTabStyle), - textStyle: this._children().map((child) => child.props.textStyle), - activeTextStyle: this._children().map((child) => child.props.activeTextStyle), - tabHeaderStyle: this._children().map((child) => _.get(child.props.heading.props, 'style', undefined)), + tabs: this._children().map(child => child.props.heading), + tabStyle: this._children().map(child => child.props.tabStyle), + activeTabStyle: this._children().map(child => child.props.activeTabStyle), + textStyle: this._children().map(child => child.props.textStyle), + activeTextStyle: this._children().map( + child => child.props.activeTextStyle + ), + tabHeaderStyle: this._children().map(child => + _.get(child.props.heading.props, "style", undefined) + ), activeTab: this.state.currentPage, scrollValue: this.state.scrollValue, - containerWidth: this.state.containerWidth, + containerWidth: this.state.containerWidth }; if (this.props.tabBarBackgroundColor) { @@ -263,28 +306,34 @@ const ScrollableTabView = React.createClass({ } if (overlayTabs) { tabBarProps.style = { - position: 'absolute', + position: "absolute", left: 0, right: 0, - [this.props.tabBarPosition === 'overlayTop' ? 'top' : 'bottom']: 0, + [this.props.tabBarPosition === "overlayTop" ? "top" : "bottom"]: 0 }; } - return - {this.props.tabBarPosition === 'top' && this.renderTabBar(tabBarProps)} - {this.renderScrollableContent()} - {(this.props.tabBarPosition === 'bottom' || overlayTabs) && this.renderTabBar(tabBarProps)} - ; - }, + return ( + + {this.props.tabBarPosition === "top" && this.renderTabBar(tabBarProps)} + {this.renderScrollableContent()} + {(this.props.tabBarPosition === "bottom" || overlayTabs) && + this.renderTabBar(tabBarProps)} + + ); + } }); module.exports = ScrollableTabView; const styles = StyleSheet.create({ container: { - flex: 1, + flex: 1 }, scrollableContentAndroid: { - flex: 1, - }, + flex: 1 + } }); diff --git a/src/basic/Text.js b/src/basic/Text.js index 708b8f1fb..7e5b2b1ff 100644 --- a/src/basic/Text.js +++ b/src/basic/Text.js @@ -1,18 +1,17 @@ -import React, { Component } from 'react'; -import { Text as RNText } from 'react-native'; +import React, { Component } from "react"; +import { Text as RNText } from "react-native"; -import { connectStyle } from 'native-base-shoutem-theme'; -import { connectAnimation } from '@shoutem/animation'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import { connectStyle } from "native-base-shoutem-theme"; +import { connectAnimation } from "@shoutem/animation"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Text extends Component { render() { return ( - this._root = c} - {...this.props} - > - {this.props.uppercase ? this.props.children.toUpperCase() : this.props.children} + (this._root = c)} {...this.props}> + {this.props.uppercase + ? this.props.children.toUpperCase() + : this.props.children} ); } @@ -21,12 +20,12 @@ class Text extends Component { Text.propTypes = { ...RNText.propTypes, uppercase: React.PropTypes.bool, - style: React.PropTypes.object, + style: React.PropTypes.object }; const AnimatedText = connectAnimation(Text); -const StyledText = connectStyle('NativeBase.Text', {}, mapPropsToStyleNames)(Text); +const StyledText = connectStyle("NativeBase.Text", {}, mapPropsToStyleNames)( + Text +); -export { - StyledText as Text, -}; +export { StyledText as Text }; diff --git a/src/basic/Textarea.js b/src/basic/Textarea.js index dbb8fefe9..9c5b31d56 100644 --- a/src/basic/Textarea.js +++ b/src/basic/Textarea.js @@ -1,32 +1,40 @@ -import React, { Component } from 'react'; -import { TextInput } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import variables from '../theme/variables/platform'; -import computeProps from '../Utils/computeProps'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import React, { Component } from "react"; +import { TextInput } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import variables from "../theme/variables/platform"; +import computeProps from "../Utils/computeProps"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Textarea extends Component { - getStyle() { return { textarea: { - height: (this.props.rowSpan) ? this.props.rowSpan * 25 : 60, - }, + height: this.props.rowSpan ? this.props.rowSpan * 25 : 60 + } }; } prepareRootProps() { const defaultProps = { - style: this.getStyle().textarea, + style: this.getStyle().textarea }; return computeProps(this.props, defaultProps); } render() { return ( { this._textInput = c; this._root = c; }} {...this.prepareRootProps()} + ref={c => { + this._textInput = c; + this._root = c; + }} + {...this.prepareRootProps()} multiline - placeholderTextColor={this.props.placeholderTextColor ? this.props.placeholderTextColor : variables.inputColorPlaceholder} underlineColorAndroid="rgba(0,0,0,0)" + placeholderTextColor={ + this.props.placeholderTextColor + ? this.props.placeholderTextColor + : variables.inputColorPlaceholder + } + underlineColorAndroid="rgba(0,0,0,0)" /> ); } @@ -37,11 +45,13 @@ Textarea.propTypes = { style: React.PropTypes.object, rowSpan: React.PropTypes.number, bordered: React.PropTypes.bool, - underline: React.PropTypes.bool, + underline: React.PropTypes.bool }; -const StyledTextarea = connectStyle('NativeBase.Textarea', {}, mapPropsToStyleNames)(Textarea); +const StyledTextarea = connectStyle( + "NativeBase.Textarea", + {}, + mapPropsToStyleNames +)(Textarea); -export { - StyledTextarea as Textarea, -}; +export { StyledTextarea as Textarea }; diff --git a/src/basic/Thumbnail.js b/src/basic/Thumbnail.js index 92ae95862..dcd22cfb8 100644 --- a/src/basic/Thumbnail.js +++ b/src/basic/Thumbnail.js @@ -1,15 +1,12 @@ -import React, { Component } from 'react'; -import { Image } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import computeProps from '../Utils/computeProps'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import React, { Component } from "react"; +import { Image } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import computeProps from "../Utils/computeProps"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Thumbnail extends Component { - render() { - return ( - this._root = c} {...this.props} /> - ); + return (this._root = c)} {...this.props} />; } } @@ -18,11 +15,13 @@ Thumbnail.propTypes = { style: React.PropTypes.object, square: React.PropTypes.bool, circular: React.PropTypes.bool, - size: React.PropTypes.number, + size: React.PropTypes.number }; -const StyledThumbnail = connectStyle('NativeBase.Thumbnail', {}, mapPropsToStyleNames)(Thumbnail); +const StyledThumbnail = connectStyle( + "NativeBase.Thumbnail", + {}, + mapPropsToStyleNames +)(Thumbnail); -export { - StyledThumbnail as Thumbnail, -}; +export { StyledThumbnail as Thumbnail }; diff --git a/src/basic/Title.js b/src/basic/Title.js index 380ed1f1e..50026d04b 100644 --- a/src/basic/Title.js +++ b/src/basic/Title.js @@ -1,25 +1,24 @@ /* @flow */ - -import React, { Component } from 'react'; -import { Text } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; +import React, { Component } from "react"; +import { Text } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Title extends Component { render() { return ( - this._root = c} {...this.props} numberOfLines={1} /> + (this._root = c)} {...this.props} numberOfLines={1} /> ); } } Title.propTypes = { ...Text.propTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledTitle = connectStyle('NativeBase.Title', {}, mapPropsToStyleNames)(Title); -export { - StyledTitle as Title, -}; +const StyledTitle = connectStyle("NativeBase.Title", {}, mapPropsToStyleNames)( + Title +); +export { StyledTitle as Title }; diff --git a/src/basic/Toast.js b/src/basic/Toast.js index e4e5ce327..1f43ad75f 100644 --- a/src/basic/Toast.js +++ b/src/basic/Toast.js @@ -1,26 +1,22 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class Toast extends Component { render() { - return ( - this._root = c} {...this.props}> - ); + return (this._root = c)} {...this.props} />; } } Toast.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledToast = connectStyle('NativeBase.Toast', {}, mapPropsToStyleNames)(Toast); -export { - StyledToast as Toast, -}; +const StyledToast = connectStyle("NativeBase.Toast", {}, mapPropsToStyleNames)( + Toast +); +export { StyledToast as Toast }; diff --git a/src/basic/View.js b/src/basic/View.js index 7428a566a..4262963b5 100644 --- a/src/basic/View.js +++ b/src/basic/View.js @@ -1,26 +1,24 @@ /* @flow */ - -import React, { Component } from 'react'; -import { View, ViewPropTypes } from 'react-native'; -import { connectStyle } from 'native-base-shoutem-theme'; -import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; - +import React, { Component } from "react"; +import { View, ViewPropTypes } from "react-native"; +import { connectStyle } from "native-base-shoutem-theme"; +import mapPropsToStyleNames from "../Utils/mapPropsToStyleNames"; class ViewNB extends Component { render() { - return ( - this._root = c} {...this.props}> - ); + return (this._root = c)} {...this.props} />; } } ViewNB.propTypes = { ...ViewPropTypes, - style: React.PropTypes.object, + style: React.PropTypes.object }; -const StyledViewNB = connectStyle('NativeBase.ViewNB', {}, mapPropsToStyleNames)(ViewNB); -export { - StyledViewNB as ViewNB, -}; +const StyledViewNB = connectStyle( + "NativeBase.ViewNB", + {}, + mapPropsToStyleNames +)(ViewNB); +export { StyledViewNB as ViewNB }; diff --git a/src/index.js b/src/index.js index 2fc949b8e..d7709266b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,60 +1,60 @@ -import { StyleProvider, connectStyle } from 'native-base-shoutem-theme'; -import { keys } from 'lodash'; -import { Col, Row, Grid } from 'react-native-easy-grid'; -import { Gravatar } from './backward/Widgets/Gravatar'; -import setDefaultThemeStyle from './init'; -import getTheme from './theme/components'; -import variables from './theme/variables/platform'; -import Drawer from './basic/Drawer'; -import { Swipeout } from './basic/Swipe'; -import { Text } from './basic/Text'; -import { ViewNB as View } from './basic/View'; -import { Button } from './basic/Button'; -import { TabHeading } from './basic/TabHeading'; -import { TabContainer } from './basic/TabContainer'; -import { IconNB } from './basic/IconNB'; -import { Icon } from './basic/Icon'; -import { Header } from './basic/Header'; -import { InputGroup } from './basic/InputGroup'; -import { Input } from './basic/Input'; -import { Title } from './basic/Title'; -import { Fab } from './basic/Fab'; -import { Left } from './basic/Left'; -import { Right } from './basic/Right'; -import { Body } from './basic/Body'; -import { Badge } from './basic/Badge'; -import { CheckBox } from './basic/Checkbox'; -import { Radio } from './basic/Radio'; -import { Thumbnail } from './basic/Thumbnail'; -import { Card } from './basic/Card'; -import { CardItem } from './basic/CardItem'; -import { H1 } from './basic/H1'; -import { H2 } from './basic/H2'; -import { H3 } from './basic/H3'; -import { Spinner } from './basic/Spinner'; -import { Switch } from './basic/Switch'; -import { Container } from './basic/Container'; -import { Content } from './basic/Content'; -import { Footer } from './basic/Footer'; -import { FooterTab } from './basic/FooterTab'; -import { Form } from './basic/Form'; -import { ToastContainer } from './basic/ToastContainer'; -import { ActionSheetContainer } from './basic/Actionsheet'; -import { PickerNB } from './basic/Picker'; -import { List } from './basic/List'; -import { ListItem } from './basic/ListItem'; -import { Separator } from './basic/Separator'; -import { DeckSwiper } from './basic/DeckSwiper'; -import { Item } from './basic/Item'; -import { Segment } from './basic/Segment'; -import { Label } from './basic/Label'; -import { Textarea } from './basic/Textarea'; -import { Tab } from './basic/Tab'; -import ScrollableTabView from './basic/Tabs'; -import { DefaultTabBar } from './basic/Tabs/DefaultTabBar'; -import { ScrollableTab } from './basic/Tabs/ScrollableTabBar'; -import { STabs } from './smart/STabs'; -import { Subtitle } from './backward/Widgets/Subtitle'; +import { StyleProvider, connectStyle } from "native-base-shoutem-theme"; +import { keys } from "lodash"; +import { Col, Row, Grid } from "react-native-easy-grid"; +import { Gravatar } from "./backward/Widgets/Gravatar"; +import setDefaultThemeStyle from "./init"; +import getTheme from "./theme/components"; +import variables from "./theme/variables/platform"; +import Drawer from "./basic/Drawer"; +import { Swipeout } from "./basic/Swipe"; +import { Text } from "./basic/Text"; +import { ViewNB as View } from "./basic/View"; +import { Button } from "./basic/Button"; +import { TabHeading } from "./basic/TabHeading"; +import { TabContainer } from "./basic/TabContainer"; +import { IconNB } from "./basic/IconNB"; +import { Icon } from "./basic/Icon"; +import { Header } from "./basic/Header"; +import { InputGroup } from "./basic/InputGroup"; +import { Input } from "./basic/Input"; +import { Title } from "./basic/Title"; +import { Fab } from "./basic/Fab"; +import { Left } from "./basic/Left"; +import { Right } from "./basic/Right"; +import { Body } from "./basic/Body"; +import { Badge } from "./basic/Badge"; +import { CheckBox } from "./basic/Checkbox"; +import { Radio } from "./basic/Radio"; +import { Thumbnail } from "./basic/Thumbnail"; +import { Card } from "./basic/Card"; +import { CardItem } from "./basic/CardItem"; +import { H1 } from "./basic/H1"; +import { H2 } from "./basic/H2"; +import { H3 } from "./basic/H3"; +import { Spinner } from "./basic/Spinner"; +import { Switch } from "./basic/Switch"; +import { Container } from "./basic/Container"; +import { Content } from "./basic/Content"; +import { Footer } from "./basic/Footer"; +import { FooterTab } from "./basic/FooterTab"; +import { Form } from "./basic/Form"; +import { ToastContainer } from "./basic/ToastContainer"; +import { ActionSheetContainer } from "./basic/Actionsheet"; +import { PickerNB } from "./basic/Picker"; +import { List } from "./basic/List"; +import { ListItem } from "./basic/ListItem"; +import { Separator } from "./basic/Separator"; +import { DeckSwiper } from "./basic/DeckSwiper"; +import { Item } from "./basic/Item"; +import { Segment } from "./basic/Segment"; +import { Label } from "./basic/Label"; +import { Textarea } from "./basic/Textarea"; +import { Tab } from "./basic/Tab"; +import ScrollableTabView from "./basic/Tabs"; +import { DefaultTabBar } from "./basic/Tabs/DefaultTabBar"; +import { ScrollableTab } from "./basic/Tabs/ScrollableTabBar"; +import { STabs } from "./smart/STabs"; +import { Subtitle } from "./backward/Widgets/Subtitle"; setDefaultThemeStyle(); // Theme @@ -117,7 +117,7 @@ export { TabHeading, TabContainer, DefaultTabBar, - Segment, + Segment }; const mapPropsToStyleNames = (styleNames, props) => keys(props); diff --git a/src/init.js b/src/init.js index e870047f9..d95e3cb1b 100644 --- a/src/init.js +++ b/src/init.js @@ -1,5 +1,5 @@ -import { Theme } from 'native-base-shoutem-theme'; -import getThemeStyle from './theme/components'; +import { Theme } from "native-base-shoutem-theme"; +import getThemeStyle from "./theme/components"; export default function setDefaultThemeStyle() { const theme = getThemeStyle(); diff --git a/src/theme/components/Badge.js b/src/theme/components/Badge.js index bfe2dc3a3..9bc066755 100644 --- a/src/theme/components/Badge.js +++ b/src/theme/components/Badge.js @@ -1,35 +1,35 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const badgeTheme = { - '.primary': { - backgroundColor: variables.btnPrimaryBg, + ".primary": { + backgroundColor: variables.btnPrimaryBg }, - '.warning': { - backgroundColor: variables.btnWarningBg, + ".warning": { + backgroundColor: variables.btnWarningBg }, - '.info': { - backgroundColor: variables.btnInfoBg, + ".info": { + backgroundColor: variables.btnInfoBg }, - '.success': { - backgroundColor: variables.btnSuccessBg, + ".success": { + backgroundColor: variables.btnSuccessBg }, - '.danger': { - backgroundColor: variables.btnDangerBg, + ".danger": { + backgroundColor: variables.btnDangerBg }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.badgeColor, fontSize: variables.fontSizeBase, lineHeight: variables.lineHeight - 1, - textAlign: 'center', - paddingHorizontal: 3, + textAlign: "center", + paddingHorizontal: 3 }, backgroundColor: variables.badgeBg, padding: variables.badgePadding, paddingHorizontal: 6, - alignSelf: 'flex-start', + alignSelf: "flex-start", borderRadius: 13.5, - height: 27, + height: 27 }; return badgeTheme; }; diff --git a/src/theme/components/Button.js b/src/theme/components/Button.js index 13fae3950..3f54b9550 100644 --- a/src/theme/components/Button.js +++ b/src/theme/components/Button.js @@ -1,128 +1,128 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platformStyle = variables.platformStyle; const platform = variables.platform; const buttonTheme = { - '.disabled': { - backgroundColor: variables.btnDisabledBg, + ".disabled": { + backgroundColor: variables.btnDisabledBg }, - '.bordered': { - '.dark': { - 'NativeBase.Text': { - color: '#000', + ".bordered": { + ".dark": { + "NativeBase.Text": { + color: "#000" }, - 'NativeBase.Icon': { - color: '#000', + "NativeBase.Icon": { + color: "#000" }, - 'NativeBase.IconNB': { - color: '#000', + "NativeBase.IconNB": { + color: "#000" }, - backgroundColor: 'transparent', - borderColor: '#000', - borderWidth: variables.borderWidth * 2, + backgroundColor: "transparent", + borderColor: "#000", + borderWidth: variables.borderWidth * 2 }, - '.light': { - 'NativeBase.Text': { - color: '#f4f4f4', + ".light": { + "NativeBase.Text": { + color: "#f4f4f4" }, - 'NativeBase.Icon': { - color: '#f4f4f4', + "NativeBase.Icon": { + color: "#f4f4f4" }, - 'NativeBase.IconNB': { - color: '#f4f4f4', + "NativeBase.IconNB": { + color: "#f4f4f4" }, - backgroundColor: 'transparent', - borderColor: '#f4f4f4', - borderWidth: variables.borderWidth * 2, + backgroundColor: "transparent", + borderColor: "#f4f4f4", + borderWidth: variables.borderWidth * 2 }, - '.primary': { - 'NativeBase.Text': { - color: variables.btnPrimaryBg, + ".primary": { + "NativeBase.Text": { + color: variables.btnPrimaryBg }, - 'NativeBase.Icon': { - color: variables.btnPrimaryBg, + "NativeBase.Icon": { + color: variables.btnPrimaryBg }, - 'NativeBase.IconNB': { - color: variables.btnPrimaryBg, + "NativeBase.IconNB": { + color: variables.btnPrimaryBg }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: variables.btnPrimaryBg, - borderWidth: variables.borderWidth * 2, + borderWidth: variables.borderWidth * 2 }, - '.success': { - 'NativeBase.Text': { - color: variables.btnSuccessBg, + ".success": { + "NativeBase.Text": { + color: variables.btnSuccessBg }, - 'NativeBase.Icon': { - color: variables.btnSuccessBg, + "NativeBase.Icon": { + color: variables.btnSuccessBg }, - 'NativeBase.IconNB': { - color: variables.btnSuccessBg, + "NativeBase.IconNB": { + color: variables.btnSuccessBg }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: variables.btnSuccessBg, - borderWidth: variables.borderWidth * 2, + borderWidth: variables.borderWidth * 2 }, - '.info': { - 'NativeBase.Text': { - color: variables.btnInfoBg, + ".info": { + "NativeBase.Text": { + color: variables.btnInfoBg }, - 'NativeBase.Icon': { - color: variables.btnInfoBg, + "NativeBase.Icon": { + color: variables.btnInfoBg }, - 'NativeBase.IconNB': { - color: variables.btnInfoBg, + "NativeBase.IconNB": { + color: variables.btnInfoBg }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: variables.btnInfoBg, - borderWidth: variables.borderWidth * 2, + borderWidth: variables.borderWidth * 2 }, - '.warning': { - 'NativeBase.Text': { - color: variables.btnWarningBg, + ".warning": { + "NativeBase.Text": { + color: variables.btnWarningBg }, - 'NativeBase.Icon': { - color: variables.btnWarningBg, + "NativeBase.Icon": { + color: variables.btnWarningBg }, - 'NativeBase.IconNB': { - color: variables.btnWarningBg, + "NativeBase.IconNB": { + color: variables.btnWarningBg }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: variables.btnWarningBg, - borderWidth: variables.borderWidth * 2, + borderWidth: variables.borderWidth * 2 }, - '.danger': { - 'NativeBase.Text': { - color: variables.btnDangerBg, + ".danger": { + "NativeBase.Text": { + color: variables.btnDangerBg }, - 'NativeBase.Icon': { - color: variables.btnDangerBg, + "NativeBase.Icon": { + color: variables.btnDangerBg }, - 'NativeBase.IconNB': { - color: variables.btnDangerBg, + "NativeBase.IconNB": { + color: variables.btnDangerBg }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: variables.btnDangerBg, - borderWidth: variables.borderWidth * 2, + borderWidth: variables.borderWidth * 2 }, - '.disabled': { + ".disabled": { backgroundColor: null, borderColor: variables.btnDisabledBg, borderWidth: variables.borderWidth * 2, - 'NativeBase.Text': { - color: variables.btnDisabledBg, - }, + "NativeBase.Text": { + color: variables.btnDisabledBg + } }, - 'NativeBase.Text': { - color: variables.btnPrimaryBg, + "NativeBase.Text": { + color: variables.btnPrimaryBg }, - 'NativeBase.Icon': { - color: variables.btnPrimaryBg, + "NativeBase.Icon": { + color: variables.btnPrimaryBg }, - 'NativeBase.IconNB': { - color: variables.btnPrimaryBg, + "NativeBase.IconNB": { + color: variables.btnPrimaryBg }, borderWidth: variables.borderWidth * 2, elevation: null, @@ -130,338 +130,331 @@ export default (variables = variable) => { shadowOffset: null, shadowOpacity: null, shadowRadius: null, - backgroundColor: 'transparent', + backgroundColor: "transparent" }, - '.dark': { - '.bordered': { - 'NativeBase.Text': { - color: '#000', + ".dark": { + ".bordered": { + "NativeBase.Text": { + color: "#000" }, - 'NativeBase.Icon': { - color: '#000', - }, - 'NativeBase.IconNB': { - color: '#000', + "NativeBase.Icon": { + color: "#000" }, + "NativeBase.IconNB": { + color: "#000" + } }, - backgroundColor: '#000', + backgroundColor: "#000" }, - '.light': { - '.transparent': { - 'NativeBase.Text': { - color: '#f4f4f4', + ".light": { + ".transparent": { + "NativeBase.Text": { + color: "#f4f4f4" }, - 'NativeBase.Icon': { - color: '#f4f4f4', + "NativeBase.Icon": { + color: "#f4f4f4" }, - 'NativeBase.IconNB': { - color: '#f4f4f4', + "NativeBase.IconNB": { + color: "#f4f4f4" }, - backgroundColor: null, + backgroundColor: null }, - '.bordered': { - 'NativeBase.Text': { - color: '#f4f4f4', + ".bordered": { + "NativeBase.Text": { + color: "#f4f4f4" }, - 'NativeBase.Icon': { - color: '#f4f4f4', - }, - 'NativeBase.IconNB': { - color: '#f4f4f4', + "NativeBase.Icon": { + color: "#f4f4f4" }, + "NativeBase.IconNB": { + color: "#f4f4f4" + } }, - 'NativeBase.Text': { - color: '#000', + "NativeBase.Text": { + color: "#000" }, - 'NativeBase.Icon': { - color: '#000', + "NativeBase.Icon": { + color: "#000" }, - 'NativeBase.IconNB': { - color: '#000', + "NativeBase.IconNB": { + color: "#000" }, - backgroundColor: '#f4f4f4', + backgroundColor: "#f4f4f4" }, - '.primary': { - '.bordered': { - 'NativeBase.Text': { - color: variables.btnPrimaryBg, - }, - 'NativeBase.Icon': { - color: variables.btnPrimaryBg, + ".primary": { + ".bordered": { + "NativeBase.Text": { + color: variables.btnPrimaryBg }, - 'NativeBase.IconNB': { - color: variables.btnPrimaryBg, + "NativeBase.Icon": { + color: variables.btnPrimaryBg }, + "NativeBase.IconNB": { + color: variables.btnPrimaryBg + } }, - backgroundColor: variables.btnPrimaryBg, + backgroundColor: variables.btnPrimaryBg }, - '.success': { - '.bordered': { - 'NativeBase.Text': { - color: variables.btnSuccessBg, - }, - 'NativeBase.Icon': { - color: variables.btnSuccessBg, + ".success": { + ".bordered": { + "NativeBase.Text": { + color: variables.btnSuccessBg }, - 'NativeBase.IconNB': { - color: variables.btnSuccessBg, + "NativeBase.Icon": { + color: variables.btnSuccessBg }, + "NativeBase.IconNB": { + color: variables.btnSuccessBg + } }, - backgroundColor: variables.btnSuccessBg, + backgroundColor: variables.btnSuccessBg }, - '.info': { - '.bordered': { - 'NativeBase.Text': { - color: variables.btnInfoBg, + ".info": { + ".bordered": { + "NativeBase.Text": { + color: variables.btnInfoBg }, - 'NativeBase.Icon': { - color: variables.btnInfoBg, - }, - 'NativeBase.IconNB': { - color: variables.btnInfoBg, + "NativeBase.Icon": { + color: variables.btnInfoBg }, + "NativeBase.IconNB": { + color: variables.btnInfoBg + } }, - backgroundColor: variables.btnInfoBg, + backgroundColor: variables.btnInfoBg }, - '.warning': { - '.bordered': { - 'NativeBase.Text': { - color: variables.btnWarningBg, - }, - 'NativeBase.Icon': { - color: variables.btnWarningBg, + ".warning": { + ".bordered": { + "NativeBase.Text": { + color: variables.btnWarningBg }, - 'NativeBase.IconNB': { - color: variables.btnWarningBg, + "NativeBase.Icon": { + color: variables.btnWarningBg }, + "NativeBase.IconNB": { + color: variables.btnWarningBg + } }, - backgroundColor: variables.btnWarningBg, + backgroundColor: variables.btnWarningBg }, - '.danger': { - '.bordered': { - 'NativeBase.Text': { - color: variables.btnDangerBg, + ".danger": { + ".bordered": { + "NativeBase.Text": { + color: variables.btnDangerBg }, - 'NativeBase.Icon': { - color: variables.btnDangerBg, - }, - 'NativeBase.IconNB': { - color: variables.btnDangerBg, + "NativeBase.Icon": { + color: variables.btnDangerBg }, + "NativeBase.IconNB": { + color: variables.btnDangerBg + } }, - backgroundColor: variables.btnDangerBg, + backgroundColor: variables.btnDangerBg }, - '.block': { - justifyContent: 'center', - alignSelf: 'stretch', + ".block": { + justifyContent: "center", + alignSelf: "stretch" }, - '.full': { - justifyContent: 'center', - alignSelf: 'stretch', + ".full": { + justifyContent: "center", + alignSelf: "stretch", borderRadius: 0 }, - '.rounded': { + ".rounded": { paddingHorizontal: variables.buttonPadding + 20, - borderRadius: variables.borderRadiusLarge, + borderRadius: variables.borderRadiusLarge }, - - '.transparent': { - backgroundColor: 'transparent', + ".transparent": { + backgroundColor: "transparent", elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, shadowOpacity: null, - 'NativeBase.Text': { - color: variables.btnPrimaryBg, + "NativeBase.Text": { + color: variables.btnPrimaryBg }, - 'NativeBase.Icon': { - color: variables.btnPrimaryBg, + "NativeBase.Icon": { + color: variables.btnPrimaryBg }, - 'NativeBase.IconNB': { - color: variables.btnPrimaryBg, + "NativeBase.IconNB": { + color: variables.btnPrimaryBg }, - '.dark': { - 'NativeBase.Text': { - color: '#000', + ".dark": { + "NativeBase.Text": { + color: "#000" }, - 'NativeBase.IconNB': { - color: '#000', + "NativeBase.IconNB": { + color: "#000" }, - 'NativeBase.Icon': { - color: '#000', + "NativeBase.Icon": { + color: "#000" }, - backgroundColor: null, + backgroundColor: null }, - '.danger': { - 'NativeBase.Text': { - color: variables.btnDangerBg, + ".danger": { + "NativeBase.Text": { + color: variables.btnDangerBg }, - 'NativeBase.IconNB': { - color: variables.btnDangerBg, + "NativeBase.IconNB": { + color: variables.btnDangerBg }, - 'NativeBase.Icon': { - color: variables.btnDangerBg, + "NativeBase.Icon": { + color: variables.btnDangerBg }, - backgroundColor: null, + backgroundColor: null }, - '.warning': { - 'NativeBase.Text': { - color: variables.btnWarningBg, + ".warning": { + "NativeBase.Text": { + color: variables.btnWarningBg }, - 'NativeBase.IconNB': { - color: variables.btnWarningBg, + "NativeBase.IconNB": { + color: variables.btnWarningBg }, - 'NativeBase.Icon': { - color: variables.btnWarningBg, + "NativeBase.Icon": { + color: variables.btnWarningBg }, - backgroundColor: null, + backgroundColor: null }, - '.info': { - 'NativeBase.Text': { - color: variables.btnInfoBg, + ".info": { + "NativeBase.Text": { + color: variables.btnInfoBg }, - 'NativeBase.IconNB': { - color: variables.btnInfoBg, + "NativeBase.IconNB": { + color: variables.btnInfoBg }, - 'NativeBase.Icon': { - color: variables.btnInfoBg, + "NativeBase.Icon": { + color: variables.btnInfoBg }, - backgroundColor: null, + backgroundColor: null }, - '.primary': { - 'NativeBase.Text': { - color: variables.btnPrimaryBg, + ".primary": { + "NativeBase.Text": { + color: variables.btnPrimaryBg }, - 'NativeBase.IconNB': { - color: variables.btnPrimaryBg, + "NativeBase.IconNB": { + color: variables.btnPrimaryBg }, - 'NativeBase.Icon': { - color: variables.btnPrimaryBg, + "NativeBase.Icon": { + color: variables.btnPrimaryBg }, - backgroundColor: null, + backgroundColor: null }, - '.success': { - 'NativeBase.Text': { - color: variables.btnSuccessBg, + ".success": { + "NativeBase.Text": { + color: variables.btnSuccessBg }, - 'NativeBase.IconNB': { - color: variables.btnSuccessBg, + "NativeBase.IconNB": { + color: variables.btnSuccessBg }, - 'NativeBase.Icon': { - color: variables.btnSuccessBg, + "NativeBase.Icon": { + color: variables.btnSuccessBg }, - backgroundColor: null, + backgroundColor: null }, - '.light': { - 'NativeBase.Text': { - color: '#f4f4f4', + ".light": { + "NativeBase.Text": { + color: "#f4f4f4" }, - 'NativeBase.IconNB': { - color: '#f4f4f4', + "NativeBase.IconNB": { + color: "#f4f4f4" }, - 'NativeBase.Icon': { - color: '#f4f4f4', + "NativeBase.Icon": { + color: "#f4f4f4" }, - backgroundColor: null, - }, - - + backgroundColor: null + } }, - '.small': { + ".small": { height: 30, - 'NativeBase.Text': { - fontSize: 14, - }, + "NativeBase.Text": { + fontSize: 14 + } }, - '.large': { + ".large": { height: 60, - 'NativeBase.Text': { + "NativeBase.Text": { fontSize: 22, - lineHeight: 32, - }, + lineHeight: 32 + } }, - '.capitalize': { - - }, + ".capitalize": {}, - '.vertical': { - flexDirection: 'column', - height: null, + ".vertical": { + flexDirection: "column", + height: null }, - - 'NativeBase.Text': { + "NativeBase.Text": { fontFamily: variables.btnFontFamily, marginLeft: 0, marginRight: 0, color: variables.inverseTextColor, fontSize: variables.btnTextSize, - lineHeight: variables.btnLineHeight, + lineHeight: variables.btnLineHeight // childPosition: 1 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.inverseTextColor, fontSize: 24, marginHorizontal: 5, - paddingTop: (platform === 'ios') ? 2 : undefined + paddingTop: platform === "ios" ? 2 : undefined }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { color: variables.inverseTextColor, fontSize: 24, marginHorizontal: 5, - paddingTop: (platform === 'ios') ? 2 : undefined + paddingTop: platform === "ios" ? 2 : undefined }, - - '.iconLeft': { - 'NativeBase.Text': { - marginLeft: variables.buttonPadding, + ".iconLeft": { + "NativeBase.Text": { + marginLeft: variables.buttonPadding }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { marginRight: 10, - marginLeft: 0, + marginLeft: 0 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { marginRight: 10, - marginLeft: 0, - }, + marginLeft: 0 + } }, - '.iconRight': { - 'NativeBase.Text': { - marginRight: variables.buttonPadding, + ".iconRight": { + "NativeBase.Text": { + marginRight: variables.buttonPadding }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { marginLeft: 10, - marginRight: 0, + marginRight: 0 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { marginLeft: 10, - marginRight: 0, - }, + marginRight: 0 + } }, - '.picker': { - 'NativeBase.Text': { - '.note': { + ".picker": { + "NativeBase.Text": { + ".note": { fontSize: 16, - lineHeight: null, - }, - }, + lineHeight: null + } + } }, paddingVertical: variables.buttonPadding, @@ -471,15 +464,17 @@ export default (variables = variable) => { borderColor: variables.btnPrimaryBg, borderWidth: null, height: 45, - alignSelf: 'flex-start', - flexDirection: 'row', + alignSelf: "flex-start", + flexDirection: "row", elevation: 2, - shadowColor: (platformStyle === 'material') ? '#000' : undefined, - shadowOffset: (platformStyle === 'material') ? { width: 0, height: 2 } : undefined, - shadowOpacity: (platformStyle === 'material') ? 0.2 : undefined, - shadowRadius: (platformStyle === 'material') ? 1.2 : undefined, - alignItems: 'center', - justifyContent: 'space-between', + shadowColor: platformStyle === "material" ? "#000" : undefined, + shadowOffset: platformStyle === "material" + ? { width: 0, height: 2 } + : undefined, + shadowOpacity: platformStyle === "material" ? 0.2 : undefined, + shadowRadius: platformStyle === "material" ? 1.2 : undefined, + alignItems: "center", + justifyContent: "space-between" }; return buttonTheme; -}; \ No newline at end of file +}; diff --git a/src/theme/components/Card.js b/src/theme/components/Card.js index c41f40b91..ce9bac5dc 100644 --- a/src/theme/components/Card.js +++ b/src/theme/components/Card.js @@ -1,27 +1,27 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const cardTheme = { - '.transparent': { - shadowColor: null, - shadowOffset: null, - shadowOpacity: null, - shadowRadius: null, - elevation: null, - }, - marginVertical: 5, - marginHorizontal: 2, - flex: 1, - borderWidth: variables.borderWidth, - borderRadius: 2, - borderColor: variables.cardBorderColor, - flexWrap: 'wrap', - backgroundColor: variables.cardDefaultBg, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, - shadowRadius: 1.5, - elevation: 3, + ".transparent": { + shadowColor: null, + shadowOffset: null, + shadowOpacity: null, + shadowRadius: null, + elevation: null + }, + marginVertical: 5, + marginHorizontal: 2, + flex: 1, + borderWidth: variables.borderWidth, + borderRadius: 2, + borderColor: variables.cardBorderColor, + flexWrap: "wrap", + backgroundColor: variables.cardDefaultBg, + shadowColor: "#000", + shadowOffset: { width: 0, height: 2 }, + shadowOpacity: 0.1, + shadowRadius: 1.5, + elevation: 3 }; return cardTheme; diff --git a/src/theme/components/CardItem.js b/src/theme/components/CardItem.js index a877a1464..7861cf4bf 100644 --- a/src/theme/components/CardItem.js +++ b/src/theme/components/CardItem.js @@ -1,209 +1,209 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const cardItemTheme = { - 'NativeBase.Left': { - 'NativeBase.Body': { - 'NativeBase.Text': { - '.note': { + "NativeBase.Left": { + "NativeBase.Body": { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '400', - marginRight: 20, - }, + fontWeight: "400", + marginRight: 20 + } }, flex: 1, marginLeft: 10, - alignItems: null, + alignItems: null }, - 'NativeBase.Icon': { - fontSize: variables.iconFontSize, + "NativeBase.Icon": { + fontSize: variables.iconFontSize }, - 'NativeBase.IconNB': { - fontSize: variables.iconFontSize, + "NativeBase.IconNB": { + fontSize: variables.iconFontSize }, - 'NativeBase.Text': { + "NativeBase.Text": { marginLeft: 10, - alignSelf: 'center', + alignSelf: "center" }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { fontSize: variables.DefaultFontSize - 4, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, - 'NativeBase.Icon': { + "NativeBase.Icon": { fontSize: variables.iconFontSize - 10, color: variables.sTabBarActiveTextColor, - marginHorizontal: null, + marginHorizontal: null }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { fontSize: variables.iconFontSize - 10, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, paddingVertical: null, paddingHorizontal: null, - paddingRight: variables.listItemPadding + 5, - }, + paddingRight: variables.listItemPadding + 5 + } }, flex: 1, - flexDirection: 'row', - alignItems: 'center', + flexDirection: "row", + alignItems: "center" }, - '.content': { - 'NativeBase.Text': { - color: (platform === 'ios') ? '#555' : '#222', - fontSize: variables.DefaultFontSize - 3, - }, + ".content": { + "NativeBase.Text": { + color: platform === "ios" ? "#555" : "#222", + fontSize: variables.DefaultFontSize - 3 + } }, - '.cardBody': { - 'NativeBase.Text': { - marginTop: 5, - }, + ".cardBody": { + "NativeBase.Text": { + marginTop: 5 + } }, - 'NativeBase.Body': { - 'NativeBase.Text': { - '.note': { + "NativeBase.Body": { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', - marginRight: 20, - }, + fontWeight: "200", + marginRight: 20 + } }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { fontSize: variables.DefaultFontSize - 4, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, - 'NativeBase.Icon': { + "NativeBase.Icon": { fontSize: variables.iconFontSize - 10, color: variables.sTabBarActiveTextColor, - marginHorizontal: null, + marginHorizontal: null }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { fontSize: variables.iconFontSize - 10, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, paddingVertical: null, paddingHorizontal: null, paddingRight: variables.listItemPadding + 5, - alignSelf: 'stretch', - }, + alignSelf: "stretch" + } }, flex: 1, - alignSelf: 'stretch', - alignItems: 'flex-start', + alignSelf: "stretch", + alignItems: "flex-start" }, - 'NativeBase.Right': { - 'NativeBase.Badge': { - alignSelf: null, + "NativeBase.Right": { + "NativeBase.Badge": { + alignSelf: null }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { fontSize: variables.DefaultFontSize - 4, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, - 'NativeBase.Icon': { + "NativeBase.Icon": { fontSize: variables.iconFontSize - 10, color: variables.sTabBarActiveTextColor, - marginHorizontal: null, + marginHorizontal: null }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { fontSize: variables.iconFontSize - 10, - color: variables.sTabBarActiveTextColor, + color: variables.sTabBarActiveTextColor }, paddingVertical: null, - paddingHorizontal: null, + paddingHorizontal: null }, - alignSelf: null, + alignSelf: null }, - 'NativeBase.Icon': { + "NativeBase.Icon": { alignSelf: null, fontSize: variables.iconFontSize - 8, - color: variables.cardBorderColor, + color: variables.cardBorderColor }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { alignSelf: null, fontSize: variables.iconFontSize - 8, - color: variables.cardBorderColor, + color: variables.cardBorderColor }, - 'NativeBase.Text': { + "NativeBase.Text": { fontSize: variables.DefaultFontSize - 2, - alignSelf: null, + alignSelf: null }, - 'NativeBase.Thumbnail': { - alignSelf: null, + "NativeBase.Thumbnail": { + alignSelf: null }, - 'NativeBase.Image': { - alignSelf: null, + "NativeBase.Image": { + alignSelf: null }, - 'NativeBase.Radio': { - alignSelf: null, + "NativeBase.Radio": { + alignSelf: null }, - 'NativeBase.Checkbox': { - alignSelf: null, + "NativeBase.Checkbox": { + alignSelf: null }, - 'NativeBase.Switch': { - alignSelf: null, + "NativeBase.Switch": { + alignSelf: null }, - flex: 0.8, + flex: 0.8 }, - '.header': { - 'NativeBase.Text': { + ".header": { + "NativeBase.Text": { fontSize: 16, - fontWeight: (platform === 'ios') ? '500' : undefined, + fontWeight: platform === "ios" ? "500" : undefined }, - '.bordered': { - 'NativeBase.Text': { + ".bordered": { + "NativeBase.Text": { color: variables.sTabBarActiveTextColor, - fontWeight: (platform === 'ios') ? '500' : undefined, + fontWeight: platform === "ios" ? "500" : undefined }, - borderBottomWidth: (platform === 'ios') ? variables.borderWidth : null, + borderBottomWidth: platform === "ios" ? variables.borderWidth : null }, borderBottomWidth: null, - paddingVertical: variables.listItemPadding + 5, + paddingVertical: variables.listItemPadding + 5 }, - '.footer': { - 'NativeBase.Text': { + ".footer": { + "NativeBase.Text": { fontSize: 16, - fontWeight: (platform === 'ios') ? '500' : undefined, + fontWeight: platform === "ios" ? "500" : undefined }, - '.bordered': { - 'NativeBase.Text': { + ".bordered": { + "NativeBase.Text": { color: variables.activeTab, - fontWeight: '500', + fontWeight: "500" }, - borderTopWidth: (platform === 'ios') ? variables.borderWidth : null, + borderTopWidth: platform === "ios" ? variables.borderWidth : null }, - borderBottomWidth: null, + borderBottomWidth: null }, - 'NativeBase.Text': { - '.note': { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', - }, + fontWeight: "200" + } }, - 'NativeBase.Icon': { + "NativeBase.Icon": { width: variables.iconFontSize + 5, - fontSize: variables.iconFontSize - 2, + fontSize: variables.iconFontSize - 2 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { width: variables.iconFontSize + 5, - fontSize: variables.iconFontSize - 2, + fontSize: variables.iconFontSize - 2 }, - '.bordered': { + ".bordered": { borderBottomWidth: variables.borderWidth, - borderColor: variables.cardBorderColor, + borderColor: variables.cardBorderColor }, borderRadius: 2, padding: variables.listItemPadding + 5, paddingVertical: variables.listItemPadding, - backgroundColor: variables.cardDefaultBg, + backgroundColor: variables.cardDefaultBg }; return cardItemTheme; diff --git a/src/theme/components/CheckBox.js b/src/theme/components/CheckBox.js index 7342e7564..f82bdf875 100644 --- a/src/theme/components/CheckBox.js +++ b/src/theme/components/CheckBox.js @@ -1,38 +1,36 @@ -import variable from './../variables/platform'; - +import variable from "./../variables/platform"; export default (variables = variable) => { const checkBoxTheme = { - '.checked': { - 'NativeBase.Icon': { - color: variables.checkboxTickColor, - }, - 'NativeBase.IconNB': { - color: variables.checkboxTickColor, - }, - }, - 'NativeBase.Icon': { - color: 'transparent', - lineHeight: variables.CheckboxIconSize, - marginTop: variables.CheckboxIconMarginTop, - fontSize: variables.CheckboxFontSize, + ".checked": { + "NativeBase.Icon": { + color: variables.checkboxTickColor }, - 'NativeBase.IconNB': { - color: 'transparent', - lineHeight: variables.CheckboxIconSize, - marginTop: variables.CheckboxIconMarginTop, - fontSize: variables.CheckboxFontSize, - }, - borderRadius: variables.CheckboxRadius, - overflow: 'hidden', - width: variables.checkboxSize, - height: variables.checkboxSize, - borderWidth: variables.CheckboxBorderWidth, - paddingLeft: variables.CheckboxPaddingLeft - 1, - paddingBottom: variables.CheckboxPaddingBottom, - left: 10, + "NativeBase.IconNB": { + color: variables.checkboxTickColor + } + }, + "NativeBase.Icon": { + color: "transparent", + lineHeight: variables.CheckboxIconSize, + marginTop: variables.CheckboxIconMarginTop, + fontSize: variables.CheckboxFontSize + }, + "NativeBase.IconNB": { + color: "transparent", + lineHeight: variables.CheckboxIconSize, + marginTop: variables.CheckboxIconMarginTop, + fontSize: variables.CheckboxFontSize + }, + borderRadius: variables.CheckboxRadius, + overflow: "hidden", + width: variables.checkboxSize, + height: variables.checkboxSize, + borderWidth: variables.CheckboxBorderWidth, + paddingLeft: variables.CheckboxPaddingLeft - 1, + paddingBottom: variables.CheckboxPaddingBottom, + left: 10 }; - return checkBoxTheme; }; diff --git a/src/theme/components/Container.js b/src/theme/components/Container.js index 2e0350ac4..9f1fbf478 100644 --- a/src/theme/components/Container.js +++ b/src/theme/components/Container.js @@ -1,12 +1,12 @@ -import { Platform, Dimensions } from 'react-native'; +import { Platform, Dimensions } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; -const deviceHeight = Dimensions.get('window').height; +const deviceHeight = Dimensions.get("window").height; export default (variables = variable) => { const theme = { flex: 1, - height: (Platform.OS === 'ios') ? deviceHeight : deviceHeight - 20, + height: Platform.OS === "ios" ? deviceHeight : deviceHeight - 20 }; return theme; diff --git a/src/theme/components/Content.js b/src/theme/components/Content.js index 5b6dc0448..17d66c8d5 100644 --- a/src/theme/components/Content.js +++ b/src/theme/components/Content.js @@ -1,16 +1,16 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const contentTheme = { - '.padder': { - padding: variables.contentPadding, - }, - flex: 1, - backgroundColor: 'transparent', - 'NativeBase.Segment': { - borderWidth: 0, - backgroundColor: 'transparent' - } + ".padder": { + padding: variables.contentPadding + }, + flex: 1, + backgroundColor: "transparent", + "NativeBase.Segment": { + borderWidth: 0, + backgroundColor: "transparent" + } }; return contentTheme; diff --git a/src/theme/components/Fab.js b/src/theme/components/Fab.js index 58b957a16..b76f4fb60 100644 --- a/src/theme/components/Fab.js +++ b/src/theme/components/Fab.js @@ -1,24 +1,23 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const fabTheme = { - 'NativeBase.Button': { - alignItems: 'center', - padding: null, - justifyContent: 'center', - 'NativeBase.Icon': { - alignSelf: 'center', - }, - 'NativeBase.IconNB': { - alignSelf: 'center', - fontSize: 20, - lineHeight: (platform === 'ios') ? 24 : undefined, - }, - }, + "NativeBase.Button": { + alignItems: "center", + padding: null, + justifyContent: "center", + "NativeBase.Icon": { + alignSelf: "center" + }, + "NativeBase.IconNB": { + alignSelf: "center", + fontSize: 20, + lineHeight: platform === "ios" ? 24 : undefined + } + } }; - return fabTheme; }; diff --git a/src/theme/components/Footer.js b/src/theme/components/Footer.js index 40bfc1bab..8f74e28a3 100644 --- a/src/theme/components/Footer.js +++ b/src/theme/components/Footer.js @@ -1,95 +1,98 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platformStyle = variables.platformStyle; const platform = variables.platform; const footerTheme = { - 'NativeBase.Left': { - 'NativeBase.Button': { - '.transparent': { - backgroundColor: 'transparent', - borderColor: null, - elevation: 0, - shadowColor: null, - shadowOffset: null, - shadowRadius: null, - shadowOpacity: null, - }, - 'NativeBase.Icon': { - color: variables.topTabBarActiveTextColor, - }, - 'NativeBase.IconNB': { - color: variables.topTabBarActiveTextColor, - }, - alignSelf: null, + "NativeBase.Left": { + "NativeBase.Button": { + ".transparent": { + backgroundColor: "transparent", + borderColor: null, + elevation: 0, + shadowColor: null, + shadowOffset: null, + shadowRadius: null, + shadowOpacity: null }, - flex: 1, - alignSelf: 'center', - alignItems: 'flex-start', - }, - 'NativeBase.Body': { - flex: 1, - alignItems: 'center', - alignSelf: 'center', - flexDirection: 'row', - 'NativeBase.Button': { - alignSelf: 'center', - '.transparent': { - backgroundColor: 'transparent', - borderColor: null, - elevation: 0, - shadowColor: null, - shadowOffset: null, - shadowRadius: null, - shadowOpacity: null, - }, - '.full': { - height: variables.footerHeight, - flex: 1 - }, - 'NativeBase.Icon': { - color: variables.topTabBarActiveTextColor, - }, - 'NativeBase.IconNB': { - color: variables.topTabBarActiveTextColor, - } + "NativeBase.Icon": { + color: variables.topTabBarActiveTextColor + }, + "NativeBase.IconNB": { + color: variables.topTabBarActiveTextColor }, + alignSelf: null }, - 'NativeBase.Right': { - 'NativeBase.Button': { - '.transparent': { - backgroundColor: 'transparent', - borderColor: null, - elevation: 0, - shadowColor: null, - shadowOffset: null, - shadowRadius: null, - shadowOpacity: null, - }, - 'NativeBase.Icon': { - color: variables.topTabBarActiveTextColor, - }, - 'NativeBase.IconNB': { - color: variables.topTabBarActiveTextColor, - }, - alignSelf: null, + flex: 1, + alignSelf: "center", + alignItems: "flex-start" + }, + "NativeBase.Body": { + flex: 1, + alignItems: "center", + alignSelf: "center", + flexDirection: "row", + "NativeBase.Button": { + alignSelf: "center", + ".transparent": { + backgroundColor: "transparent", + borderColor: null, + elevation: 0, + shadowColor: null, + shadowOffset: null, + shadowRadius: null, + shadowOpacity: null + }, + ".full": { + height: variables.footerHeight, + flex: 1 + }, + "NativeBase.Icon": { + color: variables.topTabBarActiveTextColor }, - flex: 1, - alignSelf: 'center', - alignItems: 'flex-end', + "NativeBase.IconNB": { + color: variables.topTabBarActiveTextColor + } + } + }, + "NativeBase.Right": { + "NativeBase.Button": { + ".transparent": { + backgroundColor: "transparent", + borderColor: null, + elevation: 0, + shadowColor: null, + shadowOffset: null, + shadowRadius: null, + shadowOpacity: null + }, + "NativeBase.Icon": { + color: variables.topTabBarActiveTextColor + }, + "NativeBase.IconNB": { + color: variables.topTabBarActiveTextColor + }, + alignSelf: null }, - backgroundColor: variables.footerDefaultBg, - flexDirection: 'row', - justifyContent: 'center', - borderTopWidth: ((platform === 'ios') && (platformStyle!=='material')) ? variables.borderWidth : undefined, - borderColor: ((platform === 'ios') && (platformStyle!=='material')) ? '#cbcbcb' : undefined, - height: variables.footerHeight, - elevation: 3, - left: 0, - right: 0, + flex: 1, + alignSelf: "center", + alignItems: "flex-end" + }, + backgroundColor: variables.footerDefaultBg, + flexDirection: "row", + justifyContent: "center", + borderTopWidth: platform === "ios" && platformStyle !== "material" + ? variables.borderWidth + : undefined, + borderColor: platform === "ios" && platformStyle !== "material" + ? "#cbcbcb" + : undefined, + height: variables.footerHeight, + elevation: 3, + left: 0, + right: 0 }; - return footerTheme; }; diff --git a/src/theme/components/FooterTab.js b/src/theme/components/FooterTab.js index b565180bd..f1e9a8142 100644 --- a/src/theme/components/FooterTab.js +++ b/src/theme/components/FooterTab.js @@ -1,76 +1,77 @@ -import { Platform } from 'react-native'; +import { Platform } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const footerTabTheme = { - 'NativeBase.Button': { - '.active': { - 'NativeBase.Text': { - color: variables.tabBarActiveTextColor, - fontSize: variables.tabBarTextSize, - lineHeight: 16, - }, - 'NativeBase.Icon': { - color: variables.tabBarActiveTextColor, - }, - 'NativeBase.IconNB': { - color: variables.tabBarActiveTextColor, - }, - backgroundColor: variables.tabActiveBgColor, - }, - flexDirection: null, - backgroundColor: 'transparent', - borderColor: null, - elevation: 0, - shadowColor: null, - shadowOffset: null, - shadowRadius: null, - shadowOpacity: null, - alignSelf: 'center', - flex: 1, - height: variables.footerHeight, - justifyContent: 'center', - '.badge': { - 'NativeBase.Badge': { - 'NativeBase.Text': { - fontSize: 11, - fontWeight: (platform === 'ios') ? '600' : undefined, - lineHeight: 14, - }, - top: -3, - alignSelf: 'center', - left: 10, - zIndex: 99, - height: 18, - padding: 1.7, - paddingHorizontal: 3, - }, - 'NativeBase.Icon': { - marginTop: -18, - }, + "NativeBase.Button": { + ".active": { + "NativeBase.Text": { + color: variables.tabBarActiveTextColor, + fontSize: variables.tabBarTextSize, + lineHeight: 16 }, - 'NativeBase.Icon': { - color: variables.tabBarTextColor, + "NativeBase.Icon": { + color: variables.tabBarActiveTextColor }, - 'NativeBase.IconNB': { - color: variables.tabBarTextColor, - }, - 'NativeBase.Text': { - color: variables.tabBarTextColor, - fontSize: variables.tabBarTextSize, - lineHeight: 16, + "NativeBase.IconNB": { + color: variables.tabBarActiveTextColor }, + backgroundColor: variables.tabActiveBgColor }, - backgroundColor: (Platform.OS === 'android') ? variables.tabActiveBgColor : undefined, - flexDirection: 'row', - justifyContent: 'space-between', + flexDirection: null, + backgroundColor: "transparent", + borderColor: null, + elevation: 0, + shadowColor: null, + shadowOffset: null, + shadowRadius: null, + shadowOpacity: null, + alignSelf: "center", flex: 1, - alignSelf: 'stretch', + height: variables.footerHeight, + justifyContent: "center", + ".badge": { + "NativeBase.Badge": { + "NativeBase.Text": { + fontSize: 11, + fontWeight: platform === "ios" ? "600" : undefined, + lineHeight: 14 + }, + top: -3, + alignSelf: "center", + left: 10, + zIndex: 99, + height: 18, + padding: 1.7, + paddingHorizontal: 3 + }, + "NativeBase.Icon": { + marginTop: -18 + } + }, + "NativeBase.Icon": { + color: variables.tabBarTextColor + }, + "NativeBase.IconNB": { + color: variables.tabBarTextColor + }, + "NativeBase.Text": { + color: variables.tabBarTextColor, + fontSize: variables.tabBarTextSize, + lineHeight: 16 + } + }, + backgroundColor: Platform.OS === "android" + ? variables.tabActiveBgColor + : undefined, + flexDirection: "row", + justifyContent: "space-between", + flex: 1, + alignSelf: "stretch" }; - return footerTabTheme; }; diff --git a/src/theme/components/Form.js b/src/theme/components/Form.js index 578cad92e..d022d5063 100644 --- a/src/theme/components/Form.js +++ b/src/theme/components/Form.js @@ -1,88 +1,87 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const theme = { - 'NativeBase.Item':{ - '.fixedLabel': { - 'NativeBase.Label': { - paddingLeft: null, + "NativeBase.Item": { + ".fixedLabel": { + "NativeBase.Label": { + paddingLeft: null + }, + marginLeft: 15 }, - marginLeft: 15, - }, - '.inlineLabel': { - 'NativeBase.Label': { - paddingLeft: null, + ".inlineLabel": { + "NativeBase.Label": { + paddingLeft: null + }, + marginLeft: 15 }, - marginLeft: 15, - }, - '.placeholderLabel': { - 'NativeBase.Input': { + ".placeholderLabel": { + "NativeBase.Input": {} }, - }, - '.stackedLabel': { - 'NativeBase.Label': { - top: 5, - paddingLeft: null, + ".stackedLabel": { + "NativeBase.Label": { + top: 5, + paddingLeft: null + }, + "NativeBase.Input": { + paddingLeft: null, + marginLeft: platform === "ios" ? undefined : -5 + }, + "NativeBase.Icon": { + marginTop: 36 + }, + marginLeft: 15 }, - 'NativeBase.Input': { - paddingLeft: null, - marginLeft: (platform === 'ios') ? undefined : -5, + ".floatingLabel": { + "NativeBase.Input": { + paddingLeft: null, + top: 10, + marginLeft: platform === "ios" ? undefined : -5 + }, + "NativeBase.Label": { + left: 0, + top: 8 + }, + "NativeBase.Icon": { + top: 6 + }, + marginTop: 15, + marginLeft: 15 }, - 'NativeBase.Icon': { - marginTop: 36, + ".regular": { + "NativeBase.Label": { + left: 0 + }, + marginLeft: 0 }, - marginLeft: 15, - }, - '.floatingLabel': { - 'NativeBase.Input': { - paddingLeft: null, - top: 10, - marginLeft: (platform === 'ios') ? undefined : -5, + ".rounded": { + "NativeBase.Label": { + left: 0 + }, + marginLeft: 0 }, - 'NativeBase.Label': { - left: 0, - top: 8, + ".underline": { + "NativeBase.Label": { + left: 0, + top: 0, + position: "relative" + }, + "NativeBase.Input": { + left: -15 + }, + marginLeft: 15 }, - 'NativeBase.Icon': { - top: 6, + ".last": { + marginLeft: 0, + paddingLeft: 15 }, - marginTop: 15, - marginLeft: 15, - }, - '.regular': { - 'NativeBase.Label': { - left: 0, + "NativeBase.Label": { + paddingRight: 5 }, - marginLeft: 0, - }, - '.rounded': { - 'NativeBase.Label': { - left: 0, - }, - marginLeft: 0, - }, - '.underline': { - 'NativeBase.Label': { - left: 0, - top: 0, - position: 'relative', - }, - 'NativeBase.Input': { - left: -15, - }, - marginLeft: 15, - }, - '.last': { - marginLeft:0, - paddingLeft:15, - }, - 'NativeBase.Label': { - paddingRight: 5, - }, - marginLeft: 15, - }, + marginLeft: 15 + } }; return theme; diff --git a/src/theme/components/H1.js b/src/theme/components/H1.js index 971b2f59f..7ce6b1dac 100644 --- a/src/theme/components/H1.js +++ b/src/theme/components/H1.js @@ -1,12 +1,11 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const h1Theme = { - color: variables.textColor, - fontSize: variables.fontSizeH1, - lineHeight: variables.lineHeightH1, + color: variables.textColor, + fontSize: variables.fontSizeH1, + lineHeight: variables.lineHeightH1, }; - return h1Theme; }; diff --git a/src/theme/components/H2.js b/src/theme/components/H2.js index fb52fe0c3..aaf2b7990 100644 --- a/src/theme/components/H2.js +++ b/src/theme/components/H2.js @@ -1,12 +1,11 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const h2Theme = { - color: variables.textColor, - fontSize: variables.fontSizeH2, - lineHeight: variables.lineHeightH2, + color: variables.textColor, + fontSize: variables.fontSizeH2, + lineHeight: variables.lineHeightH2, }; - return h2Theme; }; diff --git a/src/theme/components/H3.js b/src/theme/components/H3.js index 94793e1e5..be8521392 100644 --- a/src/theme/components/H3.js +++ b/src/theme/components/H3.js @@ -1,12 +1,11 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const h3Theme = { - color: variables.textColor, - fontSize: variables.fontSizeH3, - lineHeight: variables.lineHeightH3, + color: variables.textColor, + fontSize: variables.fontSizeH3, + lineHeight: variables.lineHeightH3 }; - return h3Theme; }; diff --git a/src/theme/components/Header.js b/src/theme/components/Header.js index 0ad5e8272..468eb137b 100644 --- a/src/theme/components/Header.js +++ b/src/theme/components/Header.js @@ -1,313 +1,324 @@ -import { PixelRatio } from 'react-native' +import { PixelRatio } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platformStyle = variables.platformStyle; const platform = variables.platform; const headerTheme = { - '.span': { + ".span": { height: 128, - 'NativeBase.Left': { - alignSelf: 'flex-start', + "NativeBase.Left": { + alignSelf: "flex-start" }, - 'NativeBase.Body': { - alignSelf: 'flex-end', - alignItems: 'flex-start', - justifyContent: 'center', - paddingBottom: 26, - }, - 'NativeBase.Right': { - alignSelf: 'flex-start', + "NativeBase.Body": { + alignSelf: "flex-end", + alignItems: "flex-start", + justifyContent: "center", + paddingBottom: 26 }, + "NativeBase.Right": { + alignSelf: "flex-start" + } }, - '.hasSubtitle': { - 'NativeBase.Body': { - 'NativeBase.Title': { + ".hasSubtitle": { + "NativeBase.Body": { + "NativeBase.Title": { fontSize: variables.titleFontSize - 2, fontFamily: variables.titleFontfamily, - textAlign: 'center', + textAlign: "center" }, - 'NativeBase.Subtitle': { + "NativeBase.Subtitle": { fontSize: variables.subTitleFontSize, fontFamily: variables.titleFontfamily, color: variables.subtitleColor, - textAlign: 'center', - }, - }, + textAlign: "center" + } + } }, - '.noShadow': { + ".noShadow": { elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, - shadowOpacity: null, + shadowOpacity: null }, - '.hasTabs': { + ".hasTabs": { elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, shadowOpacity: null, - borderBottomWidth: null, + borderBottomWidth: null }, - '.hasSegment': { + ".hasSegment": { elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, shadowOpacity: null, - borderBottomWidth: null, + borderBottomWidth: null }, - 'NativeBase.Button': { - justifyContent: 'center', - alignSelf: 'center', - alignItems: 'center', - '.transparent': { - 'NativeBase.Text': { + "NativeBase.Button": { + justifyContent: "center", + alignSelf: "center", + alignItems: "center", + ".transparent": { + "NativeBase.Text": { color: variables.toolbarBtnColor, - fontWeight: '600', + fontWeight: "600" }, - 'NativeBase.Icon': { - color: variables.toolbarBtnColor, + "NativeBase.Icon": { + color: variables.toolbarBtnColor }, - 'NativeBase.IconNB': { - color: variables.toolbarBtnColor, + "NativeBase.IconNB": { + color: variables.toolbarBtnColor }, - paddingHorizontal: variables.buttonPadding, + paddingHorizontal: variables.buttonPadding }, - paddingHorizontal: 15, + paddingHorizontal: 15 }, - '.searchBar': { - 'NativeBase.Item': { - 'NativeBase.Icon': { - backgroundColor: 'transparent', + ".searchBar": { + "NativeBase.Item": { + "NativeBase.Icon": { + backgroundColor: "transparent", color: variables.dropdownLinkColor, fontSize: variables.toolbarSearchIconSize, - alignItems: 'center', + alignItems: "center", marginTop: 2, paddingRight: 10, - paddingLeft: 10, + paddingLeft: 10 }, - 'NativeBase.IconNB': { - backgroundColor: 'transparent', + "NativeBase.IconNB": { + backgroundColor: "transparent", color: null, - alignSelf: 'center', + alignSelf: "center" }, - 'NativeBase.Input': { - alignSelf: 'center', + "NativeBase.Input": { + alignSelf: "center", lineHeight: 24, - height: variables.searchBarHeight, + height: variables.searchBarHeight }, - alignSelf: 'center', - alignItems: 'center', - justifyContent: 'flex-start', + alignSelf: "center", + alignItems: "center", + justifyContent: "flex-start", flex: 1, height: variables.searchBarHeight, - borderColor: 'transparent', - backgroundColor: variables.toolbarInputColor, + borderColor: "transparent", + backgroundColor: variables.toolbarInputColor }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { - fontWeight: '500', + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { + fontWeight: "500" }, paddingHorizontal: null, - paddingLeft: (platform === 'ios') ? 10 : null, + paddingLeft: platform === "ios" ? 10 : null }, - paddingHorizontal: (platform === 'ios') ? undefined : null, - width: (platform === 'ios') ? undefined : 0, - height: (platform === 'ios') ? undefined : 0, - }, + paddingHorizontal: platform === "ios" ? undefined : null, + width: platform === "ios" ? undefined : 0, + height: platform === "ios" ? undefined : 0 + } }, - '.rounded': { - 'NativeBase.Item': { - borderRadius: ((platform === 'ios') && (platformStyle !== 'material')) ? 25 : 3, - }, + ".rounded": { + "NativeBase.Item": { + borderRadius: platform === "ios" && platformStyle !== "material" + ? 25 + : 3 + } }, - 'NativeBase.Left': { - 'NativeBase.Button': { - '.hasText': { + "NativeBase.Left": { + "NativeBase.Button": { + ".hasText": { marginLeft: -10, height: 30, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize, marginTop: 2, marginRight: 5, marginLeft: 2 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.toolbarBtnColor, fontSize: 17, marginLeft: 2, lineHeight: 21 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize, marginTop: 2, marginRight: 5, marginLeft: 2 - }, + } }, - '.transparent': { + ".transparent": { marginLeft: -3, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize, marginTop: 2, marginRight: 2, marginLeft: 2 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize, marginTop: 2, marginRight: 2, marginLeft: 2 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.toolbarBtnColor, fontSize: 17, - top: (platform === 'ios') ? undefined : -1.5, + top: platform === "ios" ? undefined : -1.5 }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: null, elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, - shadowOpacity: null, + shadowOpacity: null }, - 'NativeBase.Icon': { - color: variables.toolbarBtnColor, + "NativeBase.Icon": { + color: variables.toolbarBtnColor }, - 'NativeBase.IconNB': { - color: variables.toolbarBtnColor, + "NativeBase.IconNB": { + color: variables.toolbarBtnColor }, alignSelf: null, - paddingHorizontal: variables.buttonPadding, + paddingHorizontal: variables.buttonPadding }, - flex: ((platform === 'ios') && (platformStyle !== 'material')) ? 1 : 0.5, - alignSelf: 'center', - alignItems: 'flex-start', + flex: platform === "ios" && platformStyle !== "material" ? 1 : 0.5, + alignSelf: "center", + alignItems: "flex-start" }, - 'NativeBase.Body': { + "NativeBase.Body": { flex: 1, - alignItems: ((platform === 'ios') && (platformStyle !== 'material')) ? 'center' : 'flex-start', - alignSelf: 'center', - 'NativeBase.Segment': { + alignItems: platform === "ios" && platformStyle !== "material" + ? "center" + : "flex-start", + alignSelf: "center", + "NativeBase.Segment": { borderWidth: 0, - alignSelf: 'flex-end', - marginRight: (platform === 'ios') ? -40 : -55 + alignSelf: "flex-end", + marginRight: platform === "ios" ? -40 : -55 }, - 'NativeBase.Button': { - alignSelf: 'center', - '.transparent': { - backgroundColor: 'transparent', + "NativeBase.Button": { + alignSelf: "center", + ".transparent": { + backgroundColor: "transparent" }, - 'NativeBase.Icon': { - color: variables.toolbarBtnColor, + "NativeBase.Icon": { + color: variables.toolbarBtnColor }, - 'NativeBase.IconNB': { - color: variables.toolbarBtnColor, + "NativeBase.IconNB": { + color: variables.toolbarBtnColor }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.inverseTextColor, - backgroundColor: 'transparent', - }, - }, + backgroundColor: "transparent" + } + } }, - 'NativeBase.Right': { - 'NativeBase.Button': { - '.hasText': { + "NativeBase.Right": { + "NativeBase.Button": { + ".hasText": { height: 30, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize - 2, marginTop: 2, marginRight: 2, marginLeft: 5 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.toolbarBtnColor, fontSize: 17, lineHeight: 21 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { color: variables.toolbarBtnColor, fontSize: variables.iconHeaderSize - 2, marginTop: 2, marginRight: 2, marginLeft: 5 - }, + } }, - '.transparent': { + ".transparent": { marginRight: -8, paddingHorizontal: 15, borderRadius: 50, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.toolbarBtnColor, - fontSize: (platform === 'ios') ? variables.iconHeaderSize - 6 : variables.iconHeaderSize - 2, + fontSize: platform === "ios" + ? variables.iconHeaderSize - 6 + : variables.iconHeaderSize - 2, marginTop: 2, marginLeft: 2, marginRight: 2 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { color: variables.toolbarBtnColor, - fontSize: (platform === 'ios') ? variables.iconHeaderSize - 6 : variables.iconHeaderSize - 2, + fontSize: platform === "ios" + ? variables.iconHeaderSize - 6 + : variables.iconHeaderSize - 2, marginTop: 2, marginLeft: 2, marginRight: 2 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.toolbarBtnColor, fontSize: 17, - top: (platform === 'ios') ? undefined : -1.5, + top: platform === "ios" ? undefined : -1.5 }, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderColor: null, elevation: 0, shadowColor: null, shadowOffset: null, shadowRadius: null, - shadowOpacity: null, + shadowOpacity: null }, - 'NativeBase.Icon': { - color: variables.toolbarBtnColor, + "NativeBase.Icon": { + color: variables.toolbarBtnColor }, - 'NativeBase.IconNB': { - color: variables.toolbarBtnColor, + "NativeBase.IconNB": { + color: variables.toolbarBtnColor }, alignSelf: null, - paddingHorizontal: variables.buttonPadding, + paddingHorizontal: variables.buttonPadding }, flex: 1, - alignSelf: 'center', - alignItems: 'flex-end', - flexDirection: 'row', - justifyContent: 'flex-end', + alignSelf: "center", + alignItems: "flex-end", + flexDirection: "row", + justifyContent: "flex-end" }, backgroundColor: variables.toolbarDefaultBg, - flexDirection: 'row', + flexDirection: "row", paddingHorizontal: 10, - justifyContent: 'center', - paddingTop: (platform === 'ios') ? 15 : 0, - borderBottomWidth: (platform === 'ios') ? (1 / PixelRatio.getPixelSizeForLayoutSize(1)) : 0, + justifyContent: "center", + paddingTop: platform === "ios" ? 15 : 0, + borderBottomWidth: platform === "ios" + ? 1 / PixelRatio.getPixelSizeForLayoutSize(1) + : 0, borderBottomColor: variables.toolbarDefaultBorder, height: variables.toolbarHeight, elevation: 3, - shadowColor: (platformStyle === 'material') ? '#000' : undefined, - shadowOffset: (platformStyle === 'material') ? { width: 0, height: 2 } : undefined, - shadowOpacity: (platformStyle === 'material') ? 0.2 : undefined, - shadowRadius: (platformStyle === 'material') ? 1.2 : undefined, + shadowColor: platformStyle === "material" ? "#000" : undefined, + shadowOffset: platformStyle === "material" + ? { width: 0, height: 2 } + : undefined, + shadowOpacity: platformStyle === "material" ? 0.2 : undefined, + shadowRadius: platformStyle === "material" ? 1.2 : undefined, top: 0, left: 0, - right: 0, + right: 0 }; - return headerTheme; }; diff --git a/src/theme/components/Icon.js b/src/theme/components/Icon.js index fc2cb574e..697d90ebc 100644 --- a/src/theme/components/Icon.js +++ b/src/theme/components/Icon.js @@ -1,11 +1,10 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const iconTheme = { fontSize: variables.iconFontSize, - color: '#000', + color: "#000" }; - return iconTheme; }; diff --git a/src/theme/components/Input.js b/src/theme/components/Input.js index 79c614363..c4a691ffa 100644 --- a/src/theme/components/Input.js +++ b/src/theme/components/Input.js @@ -1,4 +1,4 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const inputTheme = { @@ -8,9 +8,8 @@ export default (variables = variable) => { paddingRight: 5, flex: 1, fontSize: variables.inputFontSize, - lineHeight: variables.inputLineHeight, + lineHeight: variables.inputLineHeight }; - return inputTheme; }; diff --git a/src/theme/components/InputGroup.js b/src/theme/components/InputGroup.js index 04361e48f..9baa8a6cc 100644 --- a/src/theme/components/InputGroup.js +++ b/src/theme/components/InputGroup.js @@ -1,131 +1,130 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const inputGroupTheme = { - 'NativeBase.Icon': { - fontSize: 24, - color: variables.sTabBarActiveTextColor, - paddingHorizontal: 5, - }, - 'NativeBase.IconNB': { - fontSize: 24, - color: variables.sTabBarActiveTextColor, - paddingHorizontal: 5, - }, - 'NativeBase.Input': { - height: variables.inputHeightBase, - color: variables.inputColor, - paddingLeft: 5, - paddingRight: 5, - flex: 1, - fontSize: variables.inputFontSize, - lineHeight: variables.inputLineHeight, - }, - '.underline': { - '.success': { - borderColor: variables.inputSuccessBorderColor, - }, - '.error': { - borderColor: variables.inputErrorBorderColor, - }, - paddingLeft: 5, + "NativeBase.Icon": { + fontSize: 24, + color: variables.sTabBarActiveTextColor, + paddingHorizontal: 5 + }, + "NativeBase.IconNB": { + fontSize: 24, + color: variables.sTabBarActiveTextColor, + paddingHorizontal: 5 + }, + "NativeBase.Input": { + height: variables.inputHeightBase, + color: variables.inputColor, + paddingLeft: 5, + paddingRight: 5, + flex: 1, + fontSize: variables.inputFontSize, + lineHeight: variables.inputLineHeight + }, + ".underline": { + ".success": { + borderColor: variables.inputSuccessBorderColor + }, + ".error": { + borderColor: variables.inputErrorBorderColor + }, + paddingLeft: 5, + borderWidth: variables.borderWidth, + borderTopWidth: 0, + borderRightWidth: 0, + borderLeftWidth: 0, + borderColor: variables.inputBorderColor + }, + ".regular": { + ".success": { + borderColor: variables.inputSuccessBorderColor + }, + ".error": { + borderColor: variables.inputErrorBorderColor + }, + paddingLeft: 5, + borderWidth: variables.borderWidth, + borderColor: variables.inputBorderColor + }, + ".rounded": { + ".success": { + borderColor: variables.inputSuccessBorderColor + }, + ".error": { + borderColor: variables.inputErrorBorderColor + }, + paddingLeft: 5, + borderWidth: variables.borderWidth, + borderRadius: variables.inputGroupRoundedBorderRadius, + borderColor: variables.inputBorderColor + }, + + ".success": { + "NativeBase.Icon": { + color: variables.inputSuccessBorderColor + }, + "NativeBase.IconNB": { + color: variables.inputSuccessBorderColor + }, + ".rounded": { + borderRadius: 30, + borderColor: variables.inputSuccessBorderColor + }, + ".regular": { + borderColor: variables.inputSuccessBorderColor + }, + ".underline": { borderWidth: variables.borderWidth, borderTopWidth: 0, borderRightWidth: 0, borderLeftWidth: 0, - borderColor: variables.inputBorderColor, - }, - '.regular': { - '.success': { - borderColor: variables.inputSuccessBorderColor, - }, - '.error': { - borderColor: variables.inputErrorBorderColor, - }, - paddingLeft: 5, - borderWidth: variables.borderWidth, - borderColor: variables.inputBorderColor, - }, - '.rounded': { - '.success': { - borderColor: variables.inputSuccessBorderColor, - }, - '.error': { - borderColor: variables.inputErrorBorderColor, - }, - paddingLeft: 5, - borderWidth: variables.borderWidth, - borderRadius: variables.inputGroupRoundedBorderRadius, - borderColor: variables.inputBorderColor, + borderColor: variables.inputSuccessBorderColor }, + borderColor: variables.inputSuccessBorderColor + }, - '.success': { - 'NativeBase.Icon': { - color: variables.inputSuccessBorderColor, - }, - 'NativeBase.IconNB': { - color: variables.inputSuccessBorderColor, - }, - '.rounded': { - borderRadius: 30, - borderColor: variables.inputSuccessBorderColor, - }, - '.regular': { - borderColor: variables.inputSuccessBorderColor, - }, - '.underline': { - borderWidth: variables.borderWidth, - borderTopWidth: 0, - borderRightWidth: 0, - borderLeftWidth: 0, - borderColor: variables.inputSuccessBorderColor, - }, - borderColor: variables.inputSuccessBorderColor, + ".error": { + "NativeBase.Icon": { + color: variables.inputErrorBorderColor }, - - '.error': { - 'NativeBase.Icon': { - color: variables.inputErrorBorderColor, - }, - 'NativeBase.IconNB': { - color: variables.inputErrorBorderColor, - }, - '.rounded': { - borderRadius: 30, - borderColor: variables.inputErrorBorderColor, - }, - '.regular': { - borderColor: variables.inputErrorBorderColor, - }, - '.underline': { - borderWidth: variables.borderWidth, - borderTopWidth: 0, - borderRightWidth: 0, - borderLeftWidth: 0, - borderColor: variables.inputErrorBorderColor, - }, - borderColor: variables.inputErrorBorderColor, - }, - '.disabled': { - 'NativeBase.Icon': { - color: '#384850', - }, - 'NativeBase.IconNB': { - color: '#384850', - }, + "NativeBase.IconNB": { + color: variables.inputErrorBorderColor }, + ".rounded": { + borderRadius: 30, + borderColor: variables.inputErrorBorderColor + }, + ".regular": { + borderColor: variables.inputErrorBorderColor + }, + ".underline": { + borderWidth: variables.borderWidth, + borderTopWidth: 0, + borderRightWidth: 0, + borderLeftWidth: 0, + borderColor: variables.inputErrorBorderColor + }, + borderColor: variables.inputErrorBorderColor + }, + ".disabled": { + "NativeBase.Icon": { + color: "#384850" + }, + "NativeBase.IconNB": { + color: "#384850" + } + }, - paddingLeft: 5, - borderWidth: variables.borderWidth, - borderTopWidth: 0, - borderRightWidth: 0, - borderLeftWidth: 0, - borderColor: variables.inputBorderColor, - backgroundColor: 'transparent', - flexDirection: 'row', - alignItems: 'center', + paddingLeft: 5, + borderWidth: variables.borderWidth, + borderTopWidth: 0, + borderRightWidth: 0, + borderLeftWidth: 0, + borderColor: variables.inputBorderColor, + backgroundColor: "transparent", + flexDirection: "row", + alignItems: "center" }; - return inputGroupTheme; }; diff --git a/src/theme/components/Item.js b/src/theme/components/Item.js index 8a7772988..ae92d52df 100644 --- a/src/theme/components/Item.js +++ b/src/theme/components/Item.js @@ -1,23 +1,23 @@ -import { Platform } from 'react-native'; +import { Platform } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const itemTheme = { - '.floatingLabel': { - 'NativeBase.Input': { + ".floatingLabel": { + "NativeBase.Input": { height: 60, - top: 8, + top: 8 }, - 'NativeBase.Label': { - top: 8, - }, - 'NativeBase.Icon': { - top: 6, + "NativeBase.Label": { + top: 8 }, + "NativeBase.Icon": { + top: 6 + } }, - '.fixedLabel': { - 'NativeBase.Label': { + ".fixedLabel": { + "NativeBase.Label": { position: null, top: null, left: null, @@ -25,36 +25,36 @@ export default (variables = variable) => { flex: 1, height: null, width: null, - fontSize: variables.inputFontSize, + fontSize: variables.inputFontSize }, - 'NativeBase.Input': { + "NativeBase.Input": { flex: 2, - fontSize: variables.inputFontSize, - }, + fontSize: variables.inputFontSize + } }, - '.stackedLabel': { - 'NativeBase.Label': { + ".stackedLabel": { + "NativeBase.Label": { position: null, top: null, left: null, right: null, paddingTop: 5, - alignSelf: 'flex-start', - fontSize: variables.inputFontSize - 2, + alignSelf: "flex-start", + fontSize: variables.inputFontSize - 2 }, - 'NativeBase.Icon': { - marginTop: 36, + "NativeBase.Icon": { + marginTop: 36 }, - 'NativeBase.Input': { - alignSelf: (Platform.OS === 'ios') ? 'stretch' : 'flex-start', + "NativeBase.Input": { + alignSelf: Platform.OS === "ios" ? "stretch" : "flex-start", flex: 1, - width: (Platform.OS === 'ios') ? null : variables.deviceWidth - 25, - fontSize: variables.inputFontSize, + width: Platform.OS === "ios" ? null : variables.deviceWidth - 25, + fontSize: variables.inputFontSize }, - flexDirection: null, + flexDirection: null }, - '.inlineLabel': { - 'NativeBase.Label': { + ".inlineLabel": { + "NativeBase.Label": { position: null, top: null, left: null, @@ -62,139 +62,139 @@ export default (variables = variable) => { paddingRight: 20, height: null, width: null, - fontSize: variables.inputFontSize, + fontSize: variables.inputFontSize }, - 'NativeBase.Input': { + "NativeBase.Input": { paddingLeft: 5, - fontSize: variables.inputFontSize, + fontSize: variables.inputFontSize }, - flexDirection: 'row', + flexDirection: "row" }, - 'NativeBase.Label': { + "NativeBase.Label": { fontSize: variables.inputFontSize, color: variables.inputColorPlaceholder, - paddingRight: 5, + paddingRight: 5 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { fontSize: 24, - paddingRight: 8, + paddingRight: 8 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { fontSize: 24, - paddingRight: 8, + paddingRight: 8 }, - 'NativeBase.Input': { + "NativeBase.Input": { height: variables.inputHeightBase, color: variables.inputColor, flex: 1, - top: (Platform.OS === 'ios') ? 1.5 : undefined, + top: Platform.OS === "ios" ? 1.5 : undefined, fontSize: variables.inputFontSize, - lineHeight: variables.inputLineHeight, + lineHeight: variables.inputLineHeight }, - '.underline': { - 'NativeBase.Input': { - paddingLeft: 15, + ".underline": { + "NativeBase.Input": { + paddingLeft: 15 }, - '.success': { - borderColor: variables.inputSuccessBorderColor, + ".success": { + borderColor: variables.inputSuccessBorderColor }, - '.error': { - borderColor: variables.inputErrorBorderColor, + ".error": { + borderColor: variables.inputErrorBorderColor }, borderWidth: variables.borderWidth * 2, borderTopWidth: 0, borderRightWidth: 0, borderLeftWidth: 0, - borderColor: variables.inputBorderColor, + borderColor: variables.inputBorderColor }, - '.regular': { - 'NativeBase.Input': { - paddingLeft: 8, + ".regular": { + "NativeBase.Input": { + paddingLeft: 8 }, - 'NativeBase.Icon': { - paddingLeft: 10, + "NativeBase.Icon": { + paddingLeft: 10 }, - '.success': { - borderColor: variables.inputSuccessBorderColor, + ".success": { + borderColor: variables.inputSuccessBorderColor }, - '.error': { - borderColor: variables.inputErrorBorderColor, + ".error": { + borderColor: variables.inputErrorBorderColor }, borderWidth: variables.borderWidth * 2, - borderColor: variables.inputBorderColor, + borderColor: variables.inputBorderColor }, - '.rounded': { - 'NativeBase.Input': { - paddingLeft: 8, + ".rounded": { + "NativeBase.Input": { + paddingLeft: 8 }, - 'NativeBase.Icon': { - paddingLeft: 10, + "NativeBase.Icon": { + paddingLeft: 10 }, - '.success': { - borderColor: variables.inputSuccessBorderColor, + ".success": { + borderColor: variables.inputSuccessBorderColor }, - '.error': { - borderColor: variables.inputErrorBorderColor, + ".error": { + borderColor: variables.inputErrorBorderColor }, borderWidth: variables.borderWidth * 2, borderRadius: 30, - borderColor: variables.inputBorderColor, + borderColor: variables.inputBorderColor }, - '.success': { - 'NativeBase.Icon': { - color: variables.inputSuccessBorderColor, + ".success": { + "NativeBase.Icon": { + color: variables.inputSuccessBorderColor }, - 'NativeBase.IconNB': { - color: variables.inputSuccessBorderColor, + "NativeBase.IconNB": { + color: variables.inputSuccessBorderColor }, - '.rounded': { + ".rounded": { borderRadius: 30, - borderColor: variables.inputSuccessBorderColor, + borderColor: variables.inputSuccessBorderColor }, - '.regular': { - borderColor: variables.inputSuccessBorderColor, + ".regular": { + borderColor: variables.inputSuccessBorderColor }, - '.underline': { + ".underline": { borderWidth: variables.borderWidth * 2, borderTopWidth: 0, borderRightWidth: 0, borderLeftWidth: 0, - borderColor: variables.inputSuccessBorderColor, + borderColor: variables.inputSuccessBorderColor }, - borderColor: variables.inputSuccessBorderColor, + borderColor: variables.inputSuccessBorderColor }, - '.error': { - 'NativeBase.Icon': { - color: variables.inputErrorBorderColor, + ".error": { + "NativeBase.Icon": { + color: variables.inputErrorBorderColor }, - 'NativeBase.IconNB': { - color: variables.inputErrorBorderColor, + "NativeBase.IconNB": { + color: variables.inputErrorBorderColor }, - '.rounded': { + ".rounded": { borderRadius: 30, - borderColor: variables.inputErrorBorderColor, + borderColor: variables.inputErrorBorderColor }, - '.regular': { - borderColor: variables.inputErrorBorderColor, + ".regular": { + borderColor: variables.inputErrorBorderColor }, - '.underline': { + ".underline": { borderWidth: variables.borderWidth * 2, borderTopWidth: 0, borderRightWidth: 0, borderLeftWidth: 0, - borderColor: variables.inputErrorBorderColor, + borderColor: variables.inputErrorBorderColor }, - borderColor: variables.inputErrorBorderColor, + borderColor: variables.inputErrorBorderColor }, - '.disabled': { - 'NativeBase.Icon': { - color: '#384850', - }, - 'NativeBase.IconNB': { - color: '#384850', + ".disabled": { + "NativeBase.Icon": { + color: "#384850" }, + "NativeBase.IconNB": { + color: "#384850" + } }, borderWidth: variables.borderWidth * 2, @@ -202,12 +202,11 @@ export default (variables = variable) => { borderRightWidth: 0, borderLeftWidth: 0, borderColor: variables.inputBorderColor, - backgroundColor: 'transparent', - flexDirection: 'row', - alignItems: 'center', - marginLeft: 2, + backgroundColor: "transparent", + flexDirection: "row", + alignItems: "center", + marginLeft: 2 }; - return itemTheme; }; diff --git a/src/theme/components/Label.js b/src/theme/components/Label.js index e3173a48d..2f21dcbe0 100644 --- a/src/theme/components/Label.js +++ b/src/theme/components/Label.js @@ -1,13 +1,12 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const labelTheme = { - '.focused': { - width: 0, - }, - fontSize: 17, + ".focused": { + width: 0 + }, + fontSize: 17 }; - return labelTheme; }; diff --git a/src/theme/components/ListItem.js b/src/theme/components/ListItem.js index f6e314316..b53cb200b 100644 --- a/src/theme/components/ListItem.js +++ b/src/theme/components/ListItem.js @@ -1,402 +1,406 @@ -import { Platform, PixelRatio } from 'react-native'; +import { Platform, PixelRatio } from "react-native"; -import pickerTheme from './Picker'; -import variable from './../variables/platform'; +import pickerTheme from "./Picker"; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const listItemTheme = { - 'NativeBase.InputGroup': { - 'NativeBase.Icon': { - paddingRight: 5, + "NativeBase.InputGroup": { + "NativeBase.Icon": { + paddingRight: 5 }, - 'NativeBase.IconNB': { - paddingRight: 5, + "NativeBase.IconNB": { + paddingRight: 5 }, - 'NativeBase.Input': { - paddingHorizontal: 5, + "NativeBase.Input": { + paddingHorizontal: 5 }, flex: 1, borderWidth: null, margin: -10, - borderBottomColor: 'transparent', + borderBottomColor: "transparent" }, - '.searchBar': { - 'NativeBase.Item': { - 'NativeBase.Icon': { - backgroundColor: 'transparent', + ".searchBar": { + "NativeBase.Item": { + "NativeBase.Icon": { + backgroundColor: "transparent", color: variables.dropdownLinkColor, - fontSize: (platform === 'ios') ? variables.iconFontSize - 10 : variables.iconFontSize - 5, - alignItems: 'center', + fontSize: platform === "ios" + ? variables.iconFontSize - 10 + : variables.iconFontSize - 5, + alignItems: "center", marginTop: 2, - paddingRight: 8, + paddingRight: 8 }, - 'NativeBase.IconNB': { - backgroundColor: 'transparent', + "NativeBase.IconNB": { + backgroundColor: "transparent", color: null, - alignSelf: 'center', + alignSelf: "center" }, - 'NativeBase.Input': { - alignSelf: 'center', + "NativeBase.Input": { + alignSelf: "center" }, - alignSelf: 'center', - alignItems: 'center', - justifyContent: 'flex-start', + alignSelf: "center", + alignItems: "center", + justifyContent: "flex-start", flex: 1, - height: (platform === 'ios') ? 30 : 40, - borderColor: 'transparent', - backgroundColor: '#fff', - borderRadius: 5, - }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { - fontWeight: '500', + height: platform === "ios" ? 30 : 40, + borderColor: "transparent", + backgroundColor: "#fff", + borderRadius: 5 + }, + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { + fontWeight: "500" }, paddingHorizontal: null, - paddingLeft: (platform === 'ios') ? 10 : null, + paddingLeft: platform === "ios" ? 10 : null }, - paddingHorizontal: (platform === 'ios') ? undefined : null, - width: (platform === 'ios') ? undefined : 0, - height: (platform === 'ios') ? undefined : 0, + paddingHorizontal: platform === "ios" ? undefined : null, + width: platform === "ios" ? undefined : 0, + height: platform === "ios" ? undefined : 0 }, backgroundColor: variables.toolbarInputColor, padding: 10, - marginLeft: null, + marginLeft: null }, - 'NativeBase.CheckBox': { - marginLeft: -10, + "NativeBase.CheckBox": { + marginLeft: -10 }, - '.first': { - '.itemHeader': { - paddingTop: variables.listItemPadding + 3, - }, + ".first": { + ".itemHeader": { + paddingTop: variables.listItemPadding + 3 + } }, - '.itemHeader': { - '.first': { - paddingTop: variables.listItemPadding + 3, + ".itemHeader": { + ".first": { + paddingTop: variables.listItemPadding + 3 }, - borderBottomWidth: (platform === 'ios') ? variables.borderWidth : null, + borderBottomWidth: platform === "ios" ? variables.borderWidth : null, marginLeft: null, padding: variables.listItemPadding, paddingLeft: variables.listItemPadding + 5, - paddingTop: (platform === 'ios') ? variables.listItemPadding + 25 : undefined, - paddingBottom: (platform === 'android') ? variables.listItemPadding + 20 : undefined, - flexDirection: 'row', + paddingTop: platform === "ios" + ? variables.listItemPadding + 25 + : undefined, + paddingBottom: platform === "android" + ? variables.listItemPadding + 20 + : undefined, + flexDirection: "row", borderColor: variables.listBorderColor, - 'NativeBase.Text': { + "NativeBase.Text": { fontSize: 14, - color: (platform === 'ios') ? undefined : variables.listNoteColor, - }, + color: platform === "ios" ? undefined : variables.listNoteColor + } }, - '.itemDivider': { + ".itemDivider": { borderBottomWidth: null, marginLeft: null, padding: variables.listItemPadding, paddingLeft: variables.listItemPadding + 5, backgroundColor: variables.listDividerBg, - flexDirection: 'row', - borderColor: variables.listBorderColor, + flexDirection: "row", + borderColor: variables.listBorderColor }, - '.selected': { - 'NativeBase.Left': { - 'NativeBase.Text': { + ".selected": { + "NativeBase.Left": { + "NativeBase.Text": { color: variables.brandPrimary } }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.brandPrimary - }, + } }, - 'NativeBase.Left': { - 'NativeBase.Body': { - 'NativeBase.Text': { - '.note': { + "NativeBase.Left": { + "NativeBase.Body": { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', + fontWeight: "200" }, - fontWeight: '600', + fontWeight: "600" }, marginLeft: 10, alignItems: null, - alignSelf: null, + alignSelf: null }, - 'NativeBase.Icon': { + "NativeBase.Icon": { width: variables.iconFontSize - 10, - fontSize: variables.iconFontSize - 10, + fontSize: variables.iconFontSize - 10 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { width: variables.iconFontSize - 10, - fontSize: variables.iconFontSize - 10, + fontSize: variables.iconFontSize - 10 }, - 'NativeBase.Text': { + "NativeBase.Text": { marginLeft: 10, - alignSelf: 'center', + alignSelf: "center" }, - flexDirection: 'row', + flexDirection: "row" }, - 'NativeBase.Body': { - 'NativeBase.Text': { + "NativeBase.Body": { + "NativeBase.Text": { marginHorizontal: variables.listItemPadding, - '.note': { + ".note": { color: variables.listNoteColor, - fontWeight: '200', - }, + fontWeight: "200" + } }, alignSelf: null, - alignItems: null, + alignItems: null }, - 'NativeBase.Right': { - 'NativeBase.Badge': { - alignSelf: null, + "NativeBase.Right": { + "NativeBase.Badge": { + alignSelf: null }, - 'NativeBase.PickerNB': { - 'NativeBase.Button': { + "NativeBase.PickerNB": { + "NativeBase.Button": { marginRight: -15, - 'NativeBase.Text': { - color: variables.topTabBarActiveTextColor, + "NativeBase.Text": { + color: variables.topTabBarActiveTextColor } } }, - 'NativeBase.Button': { + "NativeBase.Button": { alignSelf: null, - '.transparent': { - 'NativeBase.Text': { - color: variables.topTabBarActiveTextColor, - }, - }, + ".transparent": { + "NativeBase.Text": { + color: variables.topTabBarActiveTextColor + } + } }, - 'NativeBase.Icon': { + "NativeBase.Icon": { alignSelf: null, fontSize: variables.iconFontSize - 8, - color: '#c9c8cd', + color: "#c9c8cd" }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { alignSelf: null, fontSize: variables.iconFontSize - 8, - color: '#c9c8cd', + color: "#c9c8cd" }, - 'NativeBase.Text': { - '.note': { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', + fontWeight: "200" }, - alignSelf: null, + alignSelf: null }, - 'NativeBase.Thumbnail': { - alignSelf: null, + "NativeBase.Thumbnail": { + alignSelf: null }, - 'NativeBase.Image': { - alignSelf: null, + "NativeBase.Image": { + alignSelf: null }, - 'NativeBase.Radio': { - alignSelf: null, + "NativeBase.Radio": { + alignSelf: null }, - 'NativeBase.Checkbox': { - alignSelf: null, + "NativeBase.Checkbox": { + alignSelf: null }, - 'NativeBase.Switch': { - alignSelf: null, + "NativeBase.Switch": { + alignSelf: null }, padding: null, - flex: 0.28, + flex: 0.28 }, - 'NativeBase.Text': { - '.note': { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', + fontWeight: "200" }, - alignSelf: null, + alignSelf: null }, - '.last': { + ".last": { marginLeft: -(variables.listItemPadding + 5), paddingLeft: (variables.listItemPadding + 5) * 2, - top: 1, + top: 1 }, - '.avatar': { - 'NativeBase.Left': { - flex: 0, + ".avatar": { + "NativeBase.Left": { + flex: 0 }, - 'NativeBase.Body': { - 'NativeBase.Text': { - marginLeft: null, + "NativeBase.Body": { + "NativeBase.Text": { + marginLeft: null }, flex: 1, paddingVertical: variables.listItemPadding, borderBottomWidth: variables.borderWidth, borderColor: variables.listBorderColor, - marginLeft: variables.listItemPadding + 5, + marginLeft: variables.listItemPadding + 5 }, - 'NativeBase.Right': { - 'NativeBase.Text': { - '.note': { - fontSize: variables.noteFontSize - 2, - }, + "NativeBase.Right": { + "NativeBase.Text": { + ".note": { + fontSize: variables.noteFontSize - 2 + } }, flex: 0, paddingRight: variables.listItemPadding + 5, - alignSelf: 'stretch', + alignSelf: "stretch", paddingVertical: variables.listItemPadding, borderBottomWidth: variables.borderWidth, - borderColor: variables.listBorderColor, + borderColor: variables.listBorderColor }, borderBottomWidth: null, paddingVertical: null, - paddingRight: null, + paddingRight: null }, - - '.thumbnail': { - 'NativeBase.Left': { - flex: 0, + ".thumbnail": { + "NativeBase.Left": { + flex: 0 }, - 'NativeBase.Body': { - 'NativeBase.Text': { - marginLeft: null, + "NativeBase.Body": { + "NativeBase.Text": { + marginLeft: null }, flex: 1, paddingVertical: variables.listItemPadding + 5, borderBottomWidth: variables.borderWidth, borderColor: variables.listBorderColor, - marginLeft: variables.listItemPadding + 5, + marginLeft: variables.listItemPadding + 5 }, - 'NativeBase.Right': { - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { + "NativeBase.Right": { + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { fontSize: variables.listNoteSize, - color: variables.sTabBarActiveTextColor, - }, + color: variables.sTabBarActiveTextColor + } }, - height: null, + height: null }, flex: 0, - justifyContent: 'center', - alignSelf: 'stretch', + justifyContent: "center", + alignSelf: "stretch", paddingRight: variables.listItemPadding + 5, paddingVertical: variables.listItemPadding + 5, borderBottomWidth: variables.borderWidth, - borderColor: variables.listBorderColor, + borderColor: variables.listBorderColor }, borderBottomWidth: null, paddingVertical: null, - paddingRight: null, + paddingRight: null }, - '.icon': { - '.last': { - 'NativeBase.Body': { - borderBottomWidth: null, + ".icon": { + ".last": { + "NativeBase.Body": { + borderBottomWidth: null }, - 'NativeBase.Right': { - borderBottomWidth: null, + "NativeBase.Right": { + borderBottomWidth: null }, borderBottomWidth: variables.borderWidth, - borderColor: variables.listBorderColor, + borderColor: variables.listBorderColor }, - 'NativeBase.Left': { - 'NativeBase.Button': { - 'NativeBase.IconNB': { + "NativeBase.Left": { + "NativeBase.Button": { + "NativeBase.IconNB": { marginHorizontal: null, - fontSize: variables.iconFontSize - 5, + fontSize: variables.iconFontSize - 5 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { marginHorizontal: null, - fontSize: variables.iconFontSize - 8, + fontSize: variables.iconFontSize - 8 }, - alignSelf: 'center', + alignSelf: "center", height: 29, width: 29, borderRadius: 6, paddingVertical: null, paddingHorizontal: null, - alignItems: 'center', - justifyContent: 'center', + alignItems: "center", + justifyContent: "center" }, - 'NativeBase.Icon': { + "NativeBase.Icon": { width: variables.iconFontSize - 5, - fontSize: variables.iconFontSize - 2, + fontSize: variables.iconFontSize - 2 }, - 'NativeBase.IconNB': { + "NativeBase.IconNB": { width: variables.iconFontSize - 5, - fontSize: variables.iconFontSize - 2, + fontSize: variables.iconFontSize - 2 }, paddingRight: variables.listItemPadding + 5, flex: 0, height: 44, - justifyContent: 'center', - alignItems: 'center', + justifyContent: "center", + alignItems: "center" }, - 'NativeBase.Body': { - 'NativeBase.Text': { + "NativeBase.Body": { + "NativeBase.Text": { marginLeft: null, - fontSize: 17, + fontSize: 17 }, flex: 1, height: 44, - justifyContent: 'center', - borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), - borderColor: variables.listBorderColor, - }, - 'NativeBase.Right': { - 'NativeBase.Text': { - textAlign: 'center', - color: '#8F8E95', - fontSize: 17, + justifyContent: "center", + borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), + borderColor: variables.listBorderColor + }, + "NativeBase.Right": { + "NativeBase.Text": { + textAlign: "center", + color: "#8F8E95", + fontSize: 17 }, - 'NativeBase.IconNB': { - color: '#C8C7CC', + "NativeBase.IconNB": { + color: "#C8C7CC", fontSize: variables.iconFontSize - 10, - alignSelf: 'center', + alignSelf: "center", paddingLeft: 10, - paddingTop: 3, + paddingTop: 3 }, - 'NativeBase.Icon': { - color: '#C8C7CC', + "NativeBase.Icon": { + color: "#C8C7CC", fontSize: variables.iconFontSize - 10, - alignSelf: 'center', + alignSelf: "center", paddingLeft: 10, - paddingTop: 3, + paddingTop: 3 }, - 'NativeBase.Switch': { - marginRight: (Platform.OS === 'ios') ? undefined : -5, - alignSelf: null, + "NativeBase.Switch": { + marginRight: Platform.OS === "ios" ? undefined : -5, + alignSelf: null }, - 'NativeBase.PickerNB': { - ...pickerTheme(), + "NativeBase.PickerNB": { + ...pickerTheme() }, - flexDirection: 'row', - alignItems: 'center', + flexDirection: "row", + alignItems: "center", flex: 0, - alignSelf: 'stretch', + alignSelf: "stretch", height: 44, - justifyContent: 'flex-end', - borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), + justifyContent: "flex-end", + borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), borderColor: variables.listBorderColor, - paddingRight: variables.listItemPadding + 5, + paddingRight: variables.listItemPadding + 5 }, borderBottomWidth: null, paddingVertical: null, paddingRight: null, height: 44, - justifyContent: 'center', + justifyContent: "center" }, - '.noBorder': { - borderBottomWidth: null, + ".noBorder": { + borderBottomWidth: null }, - alignItems: 'center', - flexDirection: 'row', + alignItems: "center", + flexDirection: "row", paddingRight: variables.listItemPadding + 5, paddingVertical: variables.listItemPadding + 3, marginLeft: variables.listItemPadding + 5, - borderBottomWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), + borderBottomWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), backgroundColor: variables.listBg, - borderColor: variables.listBorderColor, + borderColor: variables.listBorderColor }; - return listItemTheme; }; diff --git a/src/theme/components/Picker.android.js b/src/theme/components/Picker.android.js index 3b39dd702..be22e10dc 100644 --- a/src/theme/components/Picker.android.js +++ b/src/theme/components/Picker.android.js @@ -1,14 +1,13 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const pickerTheme = { - '.note': { - color: '#8F8E95', + ".note": { + color: "#8F8E95" }, width: 90, - marginRight: -4, + marginRight: -4 }; - return pickerTheme; }; diff --git a/src/theme/components/Picker.ios.js b/src/theme/components/Picker.ios.js index 609c56118..81e3bfe07 100644 --- a/src/theme/components/Picker.ios.js +++ b/src/theme/components/Picker.ios.js @@ -1,9 +1,7 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { - const pickerTheme = { - }; - + const pickerTheme = {}; return pickerTheme; }; diff --git a/src/theme/components/Radio.js b/src/theme/components/Radio.js index cdce711b4..e0b0dc9d8 100644 --- a/src/theme/components/Radio.js +++ b/src/theme/components/Radio.js @@ -1,23 +1,26 @@ -import { Platform } from 'react-native'; +import { Platform } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const radioTheme = { - '.selected': { - 'NativeBase.IconNB': { - color: (Platform.OS === 'ios') ? variables.brandPrimary : variables.radioSelectedColorAndroid, - lineHeight: (Platform.OS === 'ios') ? 25 : variables.radioBtnLineHeight, - height: (Platform.OS === 'ios') ? 20 : undefined, - }, - }, - 'NativeBase.IconNB': { - color: (Platform.OS === 'ios') ? 'transparent' : undefined, - lineHeight: (Platform.OS === 'ios') ? undefined : variables.radioBtnLineHeight, - fontSize: (Platform.OS === 'ios') ? undefined : variables.radioBtnSize, - }, + ".selected": { + "NativeBase.IconNB": { + color: Platform.OS === "ios" + ? variables.brandPrimary + : variables.radioSelectedColorAndroid, + lineHeight: Platform.OS === "ios" ? 25 : variables.radioBtnLineHeight, + height: Platform.OS === "ios" ? 20 : undefined + } + }, + "NativeBase.IconNB": { + color: Platform.OS === "ios" ? "transparent" : undefined, + lineHeight: Platform.OS === "ios" + ? undefined + : variables.radioBtnLineHeight, + fontSize: Platform.OS === "ios" ? undefined : variables.radioBtnSize + } }; - return radioTheme; }; diff --git a/src/theme/components/Segment.js b/src/theme/components/Segment.js index c06ffca73..b9500e0d7 100644 --- a/src/theme/components/Segment.js +++ b/src/theme/components/Segment.js @@ -1,4 +1,4 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; @@ -6,41 +6,40 @@ export default (variables = variable) => { const segmentTheme = { height: 45, borderColor: variables.segmentBorderColorMain, - flexDirection: 'row', - justifyContent: 'center', + flexDirection: "row", + justifyContent: "center", backgroundColor: variables.segmentBackgroundColor, - 'NativeBase.Button': { - alignSelf: 'center', + "NativeBase.Button": { + alignSelf: "center", borderRadius: 0, paddingHorizontal: 20, height: 30, - backgroundColor: 'transparent', + backgroundColor: "transparent", borderWidth: 1, borderColor: variables.segmentBorderColor, elevation: 0, - '.active': { + ".active": { backgroundColor: variables.segmentActiveBackgroundColor, - 'NativeBase.Text': { - color: variables.segmentActiveTextColor, - }, + "NativeBase.Text": { + color: variables.segmentActiveTextColor + } }, - '.first': { - borderTopLeftRadius: (platform === 'ios') ? 5 : undefined, - borderBottomLeftRadius: (platform === 'ios') ? 5 : undefined, - borderRightWidth: 0, + ".first": { + borderTopLeftRadius: platform === "ios" ? 5 : undefined, + borderBottomLeftRadius: platform === "ios" ? 5 : undefined, + borderRightWidth: 0 }, - '.last': { - borderTopRightRadius: (platform === 'ios') ? 5 : undefined, - borderBottomRightRadius: (platform === 'ios') ? 5 : undefined, - borderLeftWidth: 0, + ".last": { + borderTopRightRadius: platform === "ios" ? 5 : undefined, + borderBottomRightRadius: platform === "ios" ? 5 : undefined, + borderLeftWidth: 0 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.segmentTextColor, - fontSize: 14, - }, - }, + fontSize: 14 + } + } }; - return segmentTheme; }; diff --git a/src/theme/components/Separator.js b/src/theme/components/Separator.js index 4827633fb..76076cc84 100644 --- a/src/theme/components/Separator.js +++ b/src/theme/components/Separator.js @@ -1,33 +1,33 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const theme = { - '.bordered': { - '.noTopBorder': { - borderTopWidth: 0, + ".bordered": { + ".noTopBorder": { + borderTopWidth: 0 }, - '.noBottomBorder': { - borderBottomWidth: 0, + ".noBottomBorder": { + borderBottomWidth: 0 }, height: 35, paddingVertical: variables.listItemPadding + 1, borderBottomWidth: variables.borderWidth, borderTopWidth: variables.borderWidth, - borderColor: variables.listBorderColor, + borderColor: variables.listBorderColor }, - 'NativeBase.Text': { - fontSize: variables.tabBarTextSize, + "NativeBase.Text": { + fontSize: variables.tabBarTextSize }, - '.noTopBorder': { - borderTopWidth: 0, + ".noTopBorder": { + borderTopWidth: 0 }, - '.noBottomBorder': { - borderBottomWidth: 0, + ".noBottomBorder": { + borderBottomWidth: 0 }, height: 38, - backgroundColor: '#F0EFF5', + backgroundColor: "#F0EFF5", flex: 1, - justifyContent: 'center', + justifyContent: "center", paddingLeft: variables.listItemPadding + 5 }; diff --git a/src/theme/components/Spinner.js b/src/theme/components/Spinner.js index 2eff6ef8e..af1683514 100644 --- a/src/theme/components/Spinner.js +++ b/src/theme/components/Spinner.js @@ -1,10 +1,9 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const spinnerTheme = { - height: 80, + height: 80 }; - return spinnerTheme; }; diff --git a/src/theme/components/Tab.js b/src/theme/components/Tab.js index 27d6a4268..543ea3800 100644 --- a/src/theme/components/Tab.js +++ b/src/theme/components/Tab.js @@ -1,12 +1,10 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { - const tabTheme = { flex: 1, - backgroundColor: '#FFF', + backgroundColor: "#FFF" }; - return tabTheme; }; diff --git a/src/theme/components/TabBar.js b/src/theme/components/TabBar.js index 187eee22f..858751414 100644 --- a/src/theme/components/TabBar.js +++ b/src/theme/components/TabBar.js @@ -1,56 +1,55 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const tabBarTheme = { - '.tabIcon': { - height: undefined, - }, - '.vertical': { - height: 60, - }, - 'NativeBase.Button': { - '.transparent': { - 'NativeBase.Text': { - fontSize: variables.tabFontSize, - color: variables.sTabBarActiveTextColor, - fontWeight: '400', - }, - 'NativeBase.IconNB': { - color: variables.sTabBarActiveTextColor, - }, - }, - 'NativeBase.IconNB': { - color: variables.sTabBarActiveTextColor, - }, - 'NativeBase.Text': { + ".tabIcon": { + height: undefined + }, + ".vertical": { + height: 60 + }, + "NativeBase.Button": { + ".transparent": { + "NativeBase.Text": { fontSize: variables.tabFontSize, color: variables.sTabBarActiveTextColor, - fontWeight: '400', + fontWeight: "400" }, - '.isTabActive': { - 'NativeBase.Text': { - fontWeight: '900', - }, - }, - flex: 1, - alignSelf: 'stretch', - alignItems: 'center', - justifyContent: 'center', - borderRadius: null, - borderBottomColor: 'transparent', - backgroundColor: variables.tabBgColor, + "NativeBase.IconNB": { + color: variables.sTabBarActiveTextColor + } + }, + "NativeBase.IconNB": { + color: variables.sTabBarActiveTextColor + }, + "NativeBase.Text": { + fontSize: variables.tabFontSize, + color: variables.sTabBarActiveTextColor, + fontWeight: "400" }, - height: 45, - flexDirection: 'row', - justifyContent: 'space-around', - borderWidth: 1, - borderTopWidth: 0, - borderLeftWidth: 0, - borderRightWidth: 0, - borderBottomColor: '#ccc', - backgroundColor: variables.tabBgColor, + ".isTabActive": { + "NativeBase.Text": { + fontWeight: "900" + } + }, + flex: 1, + alignSelf: "stretch", + alignItems: "center", + justifyContent: "center", + borderRadius: null, + borderBottomColor: "transparent", + backgroundColor: variables.tabBgColor + }, + height: 45, + flexDirection: "row", + justifyContent: "space-around", + borderWidth: 1, + borderTopWidth: 0, + borderLeftWidth: 0, + borderRightWidth: 0, + borderBottomColor: "#ccc", + backgroundColor: variables.tabBgColor }; - return tabBarTheme; }; diff --git a/src/theme/components/TabContainer.js b/src/theme/components/TabContainer.js index 66869c31a..bc6c334db 100644 --- a/src/theme/components/TabContainer.js +++ b/src/theme/components/TabContainer.js @@ -1,5 +1,5 @@ -import variable from './../variables/platform'; -import { Platform } from 'react-native'; +import variable from "./../variables/platform"; +import { Platform } from "react-native"; export default (variables = variable) => { const platformStyle = variables.platformStyle; @@ -8,16 +8,17 @@ export default (variables = variable) => { const tabContainerTheme = { elevation: 3, height: 50, - flexDirection: 'row', - shadowColor: (platformStyle === 'material') ? '#000' : undefined, - shadowOffset: (platformStyle === 'material') ? { width: 0, height: 2 } : undefined, - shadowOpacity: (platformStyle === 'material') ? 0.2 : undefined, - shadowRadius: (platformStyle === 'material') ? 1.2 : undefined, - justifyContent: 'space-around', - borderBottomWidth: (Platform.OS === 'ios') ? variables.borderWidth : 0, - borderColor: variables.topTabBarBorderColor, + flexDirection: "row", + shadowColor: platformStyle === "material" ? "#000" : undefined, + shadowOffset: platformStyle === "material" + ? { width: 0, height: 2 } + : undefined, + shadowOpacity: platformStyle === "material" ? 0.2 : undefined, + shadowRadius: platformStyle === "material" ? 1.2 : undefined, + justifyContent: "space-around", + borderBottomWidth: Platform.OS === "ios" ? variables.borderWidth : 0, + borderColor: variables.topTabBarBorderColor }; - return tabContainerTheme; }; diff --git a/src/theme/components/TabHeading.js b/src/theme/components/TabHeading.js index f448af935..c3cbb3256 100644 --- a/src/theme/components/TabHeading.js +++ b/src/theme/components/TabHeading.js @@ -1,38 +1,37 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const tabHeadingTheme = { - flexDirection: 'row', + flexDirection: "row", backgroundColor: variables.tabDefaultBg, flex: 1, - alignItems: 'center', - justifyContent: 'center', - '.scrollable': { + alignItems: "center", + justifyContent: "center", + ".scrollable": { paddingHorizontal: 20, - flex: (platform==='android') ? 0 : 1, - minWidth: (platform==='android') ? undefined : 60, + flex: platform === "android" ? 0 : 1, + minWidth: platform === "android" ? undefined : 60 }, - 'NativeBase.Text': { + "NativeBase.Text": { color: variables.topTabBarTextColor, marginHorizontal: 7 }, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.topTabBarTextColor, - fontSize: (platform==='ios') ? 26 : undefined + fontSize: platform === "ios" ? 26 : undefined }, - '.active': { - 'NativeBase.Text': { + ".active": { + "NativeBase.Text": { color: variables.topTabBarActiveTextColor, - fontWeight: '600' + fontWeight: "600" }, - 'NativeBase.Icon': { + "NativeBase.Icon": { color: variables.topTabBarActiveTextColor - }, + } } }; - return tabHeadingTheme; }; diff --git a/src/theme/components/Text.js b/src/theme/components/Text.js index 75296947c..1ce7810d2 100644 --- a/src/theme/components/Text.js +++ b/src/theme/components/Text.js @@ -1,14 +1,14 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const textTheme = { - fontSize: variables.DefaultFontSize - 1, - fontFamily: variables.fontFamily, - color: variables.textColor, - '.note': { - color: '#a7a7a7', - fontSize: variables.noteFontSize - } + fontSize: variables.DefaultFontSize - 1, + fontFamily: variables.fontFamily, + color: variables.textColor, + ".note": { + color: "#a7a7a7", + fontSize: variables.noteFontSize + } }; return textTheme; diff --git a/src/theme/components/Textarea.js b/src/theme/components/Textarea.js index c10f9bf44..085ce3fa3 100644 --- a/src/theme/components/Textarea.js +++ b/src/theme/components/Textarea.js @@ -1,24 +1,23 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const textAreaTheme = { - '.underline': { - borderBottomWidth: variables.borderWidth, - marginTop: 5, - borderColor: variables.inputBorderColor, - }, - '.bordered': { - borderWidth: 1, - marginTop: 5, - borderColor: variables.inputBorderColor, - }, - color: variables.textColor, - paddingLeft: 10, - paddingRight: 5, - fontSize: 15, - textAlignVertical: 'top', + ".underline": { + borderBottomWidth: variables.borderWidth, + marginTop: 5, + borderColor: variables.inputBorderColor + }, + ".bordered": { + borderWidth: 1, + marginTop: 5, + borderColor: variables.inputBorderColor + }, + color: variables.textColor, + paddingLeft: 10, + paddingRight: 5, + fontSize: 15, + textAlignVertical: "top" }; - return textAreaTheme; }; diff --git a/src/theme/components/Title.js b/src/theme/components/Title.js index a450cddd4..aedd402bc 100644 --- a/src/theme/components/Title.js +++ b/src/theme/components/Title.js @@ -1,16 +1,15 @@ -import { Platform } from 'react-native'; +import { Platform } from "react-native"; -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const titleTheme = { fontSize: variables.titleFontSize, fontFamily: variables.titleFontfamily, color: variables.titleFontColor, - fontWeight: (Platform.OS==='ios') ? '600' : undefined, - textAlign: 'center' + fontWeight: Platform.OS === "ios" ? "600" : undefined, + textAlign: "center" }; - return titleTheme; }; diff --git a/src/theme/components/Toast.js b/src/theme/components/Toast.js index 03c0372a4..275797566 100644 --- a/src/theme/components/Toast.js +++ b/src/theme/components/Toast.js @@ -1,39 +1,38 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const platform = variables.platform; const toastTheme = { - '.danger': { + ".danger": { backgroundColor: variables.brandDanger }, - '.warning': { + ".warning": { backgroundColor: variables.brandWarning }, - '.success': { + ".success": { backgroundColor: variables.brandSuccess }, - backgroundColor: 'rgba(0,0,0,0.8)', - borderRadius: (platform === 'ios') ? 5 : 0, - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', + backgroundColor: "rgba(0,0,0,0.8)", + borderRadius: platform === "ios" ? 5 : 0, + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", padding: 10, minHeight: 50, - 'NativeBase.Text': { - color: '#fff', - flex: 1, + "NativeBase.Text": { + color: "#fff", + flex: 1 }, - 'NativeBase.Button': { - backgroundColor: 'transparent', + "NativeBase.Button": { + backgroundColor: "transparent", height: 30, elevation: 0, - 'NativeBase.Text': { + "NativeBase.Text": { fontSize: 14 } } }; - return toastTheme; }; diff --git a/src/theme/components/View.js b/src/theme/components/View.js index 4bb7a7218..0af0e6d3b 100644 --- a/src/theme/components/View.js +++ b/src/theme/components/View.js @@ -1,12 +1,11 @@ -import variable from './../variables/platform'; +import variable from "./../variables/platform"; export default (variables = variable) => { const viewTheme = { - '.padder': { - padding: variables.contentPadding, - }, + ".padder": { + padding: variables.contentPadding + } }; - return viewTheme; }; diff --git a/src/theme/components/index.js b/src/theme/components/index.js index aab938a6f..d50b11afb 100644 --- a/src/theme/components/index.js +++ b/src/theme/components/index.js @@ -1,284 +1,285 @@ -import _ from 'lodash'; -import headerTheme from './Header'; -import containerTheme from './Container' -import contentTheme from './Content'; -import buttonTheme from './Button'; -import titleTheme from './Title'; -import inputGroupTheme from './InputGroup'; -import badgeTheme from './Badge'; -import checkBoxTheme from './CheckBox'; -import cardTheme from './Card'; -import radioTheme from './Radio'; -import h3Theme from './H3'; -import h2Theme from './H2'; -import h1Theme from './H1'; -import footerTheme from './Footer'; -import footerTabTheme from './FooterTab'; -import fabTheme from './Fab'; -import itemTheme from './Item'; -import labelTheme from './Label'; -import textAreaTheme from './Textarea'; -import textTheme from './Text'; -import toastTheme from './Toast'; -import tabTheme from './Tab'; -import tabBarTheme from './TabBar'; -import tabContainerTheme from './TabContainer'; -import viewTheme from './View'; -import tabHeadingTheme from './TabHeading'; -import iconTheme from './Icon'; -import inputTheme from './Input'; -import segmentTheme from './Segment'; -import spinnerTheme from './Spinner'; -import cardItemTheme from './CardItem'; -import listItemTheme from './ListItem'; -import formTheme from './Form'; -import separatorTheme from './Separator'; -import variable from './../variables/platform'; +import _ from "lodash"; +import headerTheme from "./Header"; +import containerTheme from "./Container"; +import contentTheme from "./Content"; +import buttonTheme from "./Button"; +import titleTheme from "./Title"; +import inputGroupTheme from "./InputGroup"; +import badgeTheme from "./Badge"; +import checkBoxTheme from "./CheckBox"; +import cardTheme from "./Card"; +import radioTheme from "./Radio"; +import h3Theme from "./H3"; +import h2Theme from "./H2"; +import h1Theme from "./H1"; +import footerTheme from "./Footer"; +import footerTabTheme from "./FooterTab"; +import fabTheme from "./Fab"; +import itemTheme from "./Item"; +import labelTheme from "./Label"; +import textAreaTheme from "./Textarea"; +import textTheme from "./Text"; +import toastTheme from "./Toast"; +import tabTheme from "./Tab"; +import tabBarTheme from "./TabBar"; +import tabContainerTheme from "./TabContainer"; +import viewTheme from "./View"; +import tabHeadingTheme from "./TabHeading"; +import iconTheme from "./Icon"; +import inputTheme from "./Input"; +import segmentTheme from "./Segment"; +import spinnerTheme from "./Spinner"; +import cardItemTheme from "./CardItem"; +import listItemTheme from "./ListItem"; +import formTheme from "./Form"; +import separatorTheme from "./Separator"; +import variable from "./../variables/platform"; export default (variables = variable) => { const theme = { variables, - 'NativeBase.Left': { + "NativeBase.Left": { flex: 1, - alignSelf: 'center', - alignItems: 'flex-start', + alignSelf: "center", + alignItems: "flex-start" }, - 'NativeBase.Right': { - 'NativeBase.Button': { - alignSelf: null, + "NativeBase.Right": { + "NativeBase.Button": { + alignSelf: null }, flex: 1, - alignSelf: 'center', - alignItems: 'flex-end', + alignSelf: "center", + alignItems: "flex-end" }, - 'NativeBase.Body': { + "NativeBase.Body": { flex: 1, - alignItems: 'center', - alignSelf: 'center', + alignItems: "center", + alignSelf: "center" }, - 'NativeBase.Header': { - ...headerTheme(variables), + "NativeBase.Header": { + ...headerTheme(variables) }, - 'NativeBase.Button': { - ...buttonTheme(variables), + "NativeBase.Button": { + ...buttonTheme(variables) }, - 'NativeBase.Title': { - ...titleTheme(variables), + "NativeBase.Title": { + ...titleTheme(variables) }, - 'NativeBase.Subtitle': { + "NativeBase.Subtitle": { fontSize: variables.subTitleFontSize, fontFamily: variables.titleFontfamily, color: variables.subtitleColor, - textAlign: 'center', + textAlign: "center" }, - 'NativeBase.InputGroup': { - ...inputGroupTheme(variables), + "NativeBase.InputGroup": { + ...inputGroupTheme(variables) }, - 'NativeBase.Input': { - ...inputTheme(variables), + "NativeBase.Input": { + ...inputTheme(variables) }, - 'NativeBase.Badge': { - ...badgeTheme(variables), + "NativeBase.Badge": { + ...badgeTheme(variables) }, - 'NativeBase.CheckBox': { - ...checkBoxTheme(variables), + "NativeBase.CheckBox": { + ...checkBoxTheme(variables) }, - 'NativeBase.Radio': { - ...radioTheme(variables), + "NativeBase.Radio": { + ...radioTheme(variables) }, - 'NativeBase.Card': { - ...cardTheme(), + "NativeBase.Card": { + ...cardTheme() }, - 'NativeBase.CardItem': { + "NativeBase.CardItem": { ...cardItemTheme(variables), - '.cardBody': { + ".cardBody": { padding: -5, - 'NativeBase.Text': { - marginTop: 5, - }, + "NativeBase.Text": { + marginTop: 5 + } }, - flexDirection: 'row', - alignItems: 'center', + flexDirection: "row", + alignItems: "center" }, - 'NativeBase.CardItem1': { - ...cardItemTheme(variables), + "NativeBase.CardItem1": { + ...cardItemTheme(variables) }, - 'NativeBase.Toast': { - ...toastTheme(variables), + "NativeBase.Toast": { + ...toastTheme(variables) }, - 'NativeBase.H1': { - ...h1Theme(variables), + "NativeBase.H1": { + ...h1Theme(variables) }, - 'NativeBase.H2': { - ...h2Theme(variables), + "NativeBase.H2": { + ...h2Theme(variables) }, - 'NativeBase.H3': { - ...h3Theme(variables), + "NativeBase.H3": { + ...h3Theme(variables) }, - 'NativeBase.Form': { - ...formTheme(variables), + "NativeBase.Form": { + ...formTheme(variables) }, - 'NativeBase.Container': { - ...containerTheme(variables), + "NativeBase.Container": { + ...containerTheme(variables) }, - 'NativeBase.Content': { - ...contentTheme(variables), + "NativeBase.Content": { + ...contentTheme(variables) }, - - 'NativeBase.Footer': { - ...footerTheme(variables), + "NativeBase.Footer": { + ...footerTheme(variables) }, - 'NativeBase.Tabs': { - flex: 1, + "NativeBase.Tabs": { + flex: 1 }, - 'NativeBase.FooterTab': { - ...footerTabTheme(variables), + "NativeBase.FooterTab": { + ...footerTabTheme(variables) }, - 'NativeBase.ListItem': { + "NativeBase.ListItem": { ...listItemTheme(variables), - 'NativeBase.CheckBox': { + "NativeBase.CheckBox": { marginLeft: -10, - marginRight: 10, + marginRight: 10 }, - 'NativeBase.Text': { - '.note': { + "NativeBase.Text": { + ".note": { color: variables.listNoteColor, - fontWeight: '200', + fontWeight: "200" }, - alignSelf: 'center', - }, + alignSelf: "center" + } }, - 'NativeBase.ListItem1': { - ...listItemTheme(variables), + "NativeBase.ListItem1": { + ...listItemTheme(variables) }, - 'NativeBase.Icon': { - ...iconTheme(variables), + "NativeBase.Icon": { + ...iconTheme(variables) }, - 'NativeBase.IconNB': { - ...iconTheme(variables), + "NativeBase.IconNB": { + ...iconTheme(variables) }, - 'NativeBase.Text': { - ...textTheme(variables), + "NativeBase.Text": { + ...textTheme(variables) }, - 'NativeBase.Spinner': { - ...spinnerTheme(variables), + "NativeBase.Spinner": { + ...spinnerTheme(variables) }, - 'NativeBase.Fab': { - ...fabTheme(variables), + "NativeBase.Fab": { + ...fabTheme(variables) }, - 'NativeBase.Item': { - ...itemTheme(variables), + "NativeBase.Item": { + ...itemTheme(variables) }, - 'NativeBase.Label': { - ...labelTheme(variables), + "NativeBase.Label": { + ...labelTheme(variables) }, - 'NativeBase.Textarea': { - ...textAreaTheme(variables), + "NativeBase.Textarea": { + ...textAreaTheme(variables) }, - 'NativeBase.PickerNB': { - 'NativeBase.Button': { - 'NativeBase.Text': { - }, - }, + "NativeBase.PickerNB": { + "NativeBase.Button": { + "NativeBase.Text": {} + } }, - 'NativeBase.Tab': { - ...tabTheme(variables), + "NativeBase.Tab": { + ...tabTheme(variables) }, - 'NativeBase.Segment': { - ...segmentTheme(variables), + "NativeBase.Segment": { + ...segmentTheme(variables) }, - 'NativeBase.STabs': { - flex: 1, + "NativeBase.STabs": { + flex: 1 }, - 'NativeBase.TabBar': { - ...tabBarTheme(variables), + "NativeBase.TabBar": { + ...tabBarTheme(variables) }, - 'NativeBase.ViewNB': { - ...viewTheme(variables), + "NativeBase.ViewNB": { + ...viewTheme(variables) }, - 'NativeBase.TabHeading': { - ...tabHeadingTheme(variables), + "NativeBase.TabHeading": { + ...tabHeadingTheme(variables) }, - 'NativeBase.TabContainer': { - ...tabContainerTheme(variables), + "NativeBase.TabContainer": { + ...tabContainerTheme(variables) }, - 'NativeBase.Switch': { - marginVertical: -5, + "NativeBase.Switch": { + marginVertical: -5 }, - 'NativeBase.Separator': { - ...separatorTheme(variables), + "NativeBase.Separator": { + ...separatorTheme(variables) }, - 'NativeBase.Thumbnail': { - '.square': { + "NativeBase.Thumbnail": { + ".square": { borderRadius: 0, - '.small': { + ".small": { width: 36, height: 36, - borderRadius: 0, + borderRadius: 0 }, - '.large': { + ".large": { width: 80, height: 80, - borderRadius: 0, - }, + borderRadius: 0 + } }, - '.small': { + ".small": { width: 36, height: 36, borderRadius: 18, - '.square': { - borderRadius: 0, - }, + ".square": { + borderRadius: 0 + } }, - '.large': { + ".large": { width: 80, height: 80, borderRadius: 40, - '.square': { - borderRadius: 0, - }, + ".square": { + borderRadius: 0 + } }, width: 56, height: 56, - borderRadius: 28, - }, - + borderRadius: 28 + } }; const cssifyTheme = (grandparent, parent, parentKey) => { _.forEach(parent, (style, styleName) => { // console.log('styleName', styleName); // console.log('parentKey', parentKey); - if (styleName.indexOf('.') === 0 && parentKey && parentKey.indexOf('.') === 0) { + if ( + styleName.indexOf(".") === 0 && + parentKey && + parentKey.indexOf(".") === 0 + ) { if (grandparent) { if (!grandparent[styleName]) { grandparent[styleName] = {}; @@ -287,7 +288,7 @@ export default (variables = variable) => { } } } - if (style && typeof style === 'object') { + if (style && typeof style === "object") { cssifyTheme(parent, style, styleName); } }); diff --git a/src/theme/variables/commonColor.js b/src/theme/variables/commonColor.js index 06011e8db..911766cf4 100644 --- a/src/theme/variables/commonColor.js +++ b/src/theme/variables/commonColor.js @@ -1,9 +1,9 @@ -import color from 'color'; +import color from "color"; -import { Platform, Dimensions, PixelRatio } from 'react-native'; +import { Platform, Dimensions, PixelRatio } from "react-native"; -const deviceHeight = Dimensions.get('window').height; -const deviceWidth = Dimensions.get('window').width; +const deviceHeight = Dimensions.get("window").height; +const deviceWidth = Dimensions.get("window").width; const platform = Platform.OS; const platformStyle = undefined; @@ -12,47 +12,46 @@ export default { platform, // AndroidRipple androidRipple: true, - androidRippleColor: 'rgba(256, 256, 256, 0.3)', - androidRippleColorDark: 'rgba(0, 0, 0, 0.15)', + androidRippleColor: "rgba(256, 256, 256, 0.3)", + androidRippleColorDark: "rgba(0, 0, 0, 0.15)", // Badge - badgeBg: '#ED1727', - badgeColor: '#fff', + badgeBg: "#ED1727", + badgeColor: "#fff", // New Variable - badgePadding: (platform === 'ios') ? 3 : 0, + badgePadding: platform === "ios" ? 3 : 0, // Button - btnFontFamily: (platform === 'ios') ? 'System' : 'Roboto_medium', - btnDisabledBg: '#b5b5b5', - btnDisabledClr: '#f1f1f1', + btnFontFamily: platform === "ios" ? "System" : "Roboto_medium", + btnDisabledBg: "#b5b5b5", + btnDisabledClr: "#f1f1f1", // CheckBox - CheckboxRadius: (platform === 'ios') ? 13 : 0, - CheckboxBorderWidth: (platform === 'ios') ? 1 : 2, - CheckboxPaddingLeft: (platform === 'ios') ? 4 : 2, - CheckboxPaddingBottom: (platform === 'ios') ? 0 : 5, - CheckboxIconSize: (platform === 'ios') ? 21 : 14, - CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1, - CheckboxFontSize: (platform === 'ios') ? (23 / 0.9) : 18, + CheckboxRadius: platform === "ios" ? 13 : 0, + CheckboxBorderWidth: platform === "ios" ? 1 : 2, + CheckboxPaddingLeft: platform === "ios" ? 4 : 2, + CheckboxPaddingBottom: platform === "ios" ? 0 : 5, + CheckboxIconSize: platform === "ios" ? 21 : 14, + CheckboxIconMarginTop: platform === "ios" ? undefined : 1, + CheckboxFontSize: platform === "ios" ? 23 / 0.9 : 18, DefaultFontSize: 17, - checkboxBgColor: '#039BE5', + checkboxBgColor: "#039BE5", checkboxSize: 20, - checkboxTickColor: '#fff', + checkboxTickColor: "#fff", // Segment - segmentBackgroundColor: '#3F51B5', - segmentActiveBackgroundColor: '#fff', - segmentTextColor: '#fff', - segmentActiveTextColor: '#3F51B5', - segmentBorderColor: '#fff', - segmentBorderColorMain: '#3F51B5', - - // New Variable + segmentBackgroundColor: "#3F51B5", + segmentActiveBackgroundColor: "#fff", + segmentTextColor: "#fff", + segmentActiveTextColor: "#3F51B5", + segmentBorderColor: "#fff", + segmentBorderColorMain: "#3F51B5", + + // New Variable get defaultTextColor() { return this.textColor; }, - get btnPrimaryBg() { return this.brandPrimary; }, @@ -84,9 +83,7 @@ export default { return this.inverseTextColor; }, get btnTextSize() { - return (platform === 'ios') - ? this.fontSizeBase * 1.1 - : this.fontSizeBase - 1; + return platform === "ios" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1; }, get btnTextSizeLarge() { return this.fontSizeBase * 1.5; @@ -107,22 +104,19 @@ export default { return this.iconFontSize * 0.6; }, - // Card - cardDefaultBg: '#fff', - + cardDefaultBg: "#fff", // Color - brandPrimary: '#2874F0', - brandInfo: '#62B1F6', - brandSuccess: '#5cb85c', - brandDanger: '#d9534f', - brandWarning: '#f0ad4e', - brandSidebar: '#252932', - + brandPrimary: "#2874F0", + brandInfo: "#62B1F6", + brandSuccess: "#5cb85c", + brandDanger: "#d9534f", + brandWarning: "#f0ad4e", + brandSidebar: "#252932", // Font - fontFamily: (platform === 'ios') ? 'System' : 'Roboto', + fontFamily: platform === "ios" ? "System" : "Roboto", fontSizeBase: 15, get fontSizeH1() { @@ -135,64 +129,59 @@ export default { return this.fontSizeBase * 1.4; }, - // Footer footerHeight: 55, - footerDefaultBg: '#2874F0', - + footerDefaultBg: "#2874F0", // FooterTab - tabBarTextColor: '#8bb3f4', - tabBarTextSize: (platform === 'ios') ? 14 : 11, - activeTab: (platform === 'ios') ? '#007aff' : '#fff', - sTabBarActiveTextColor: '#007aff', - tabBarActiveTextColor: '#fff', - tabActiveBgColor: (platform === 'ios') ? '#1569f4' : undefined, + tabBarTextColor: "#8bb3f4", + tabBarTextSize: platform === "ios" ? 14 : 11, + activeTab: platform === "ios" ? "#007aff" : "#fff", + sTabBarActiveTextColor: "#007aff", + tabBarActiveTextColor: "#fff", + tabActiveBgColor: platform === "ios" ? "#1569f4" : undefined, // Tab - tabDefaultBg: '#2874F0', - topTabBarTextColor: '#b3c7f9', - topTabBarActiveTextColor: '#fff', - topTabActiveBgColor: (platform === 'ios') ? '#1569f4' : undefined, - topTabBarBorderColor: '#fff', - topTabBarActiveBorderColor: '#fff', - + tabDefaultBg: "#2874F0", + topTabBarTextColor: "#b3c7f9", + topTabBarActiveTextColor: "#fff", + topTabActiveBgColor: platform === "ios" ? "#1569f4" : undefined, + topTabBarBorderColor: "#fff", + topTabBarActiveBorderColor: "#fff", // Header - toolbarBtnColor: '#fff', - toolbarDefaultBg: '#2874F0', - toolbarHeight: (platform === 'ios') ? 64 : 56, - toolbarIconSize: (platform === 'ios') ? 20 : 22, - toolbarSearchIconSize: (platform === 'ios') ? 20 : 23, - toolbarInputColor: (platform === 'ios') ? '#CECDD2' : '#fff', - searchBarHeight: (platform === 'ios') ? 30 : 40, - toolbarInverseBg: '#222', - toolbarTextColor: '#fff', - iosStatusbar: 'light-content', - toolbarDefaultBorder: '#2874F0', + toolbarBtnColor: "#fff", + toolbarDefaultBg: "#2874F0", + toolbarHeight: platform === "ios" ? 64 : 56, + toolbarIconSize: platform === "ios" ? 20 : 22, + toolbarSearchIconSize: platform === "ios" ? 20 : 23, + toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff", + searchBarHeight: platform === "ios" ? 30 : 40, + toolbarInverseBg: "#222", + toolbarTextColor: "#fff", + iosStatusbar: "light-content", + toolbarDefaultBorder: "#2874F0", get statusBarColor() { return color(this.toolbarDefaultBg).darken(0.2).hex(); }, - // Icon - iconFamily: 'Ionicons', - iconFontSize: (platform === 'ios') ? 30 : 28, + iconFamily: "Ionicons", + iconFontSize: platform === "ios" ? 30 : 28, iconMargin: 7, - iconHeaderSize: (platform === 'ios') ? 33 : 24, - + iconHeaderSize: platform === "ios" ? 33 : 24, // InputGroup inputFontSize: 17, - inputBorderColor: '#D9D5DC', - inputSuccessBorderColor: '#2b8339', - inputErrorBorderColor: '#ed2f2f', + inputBorderColor: "#D9D5DC", + inputSuccessBorderColor: "#2b8339", + inputErrorBorderColor: "#ed2f2f", get inputColor() { return this.textColor; }, get inputColorPlaceholder() { - return '#575757'; + return "#575757"; }, inputGroupMarginBottom: 10, @@ -203,95 +192,86 @@ export default { return this.inputPaddingLeft * 8; }, - // Line Height btnLineHeight: 19, lineHeightH1: 32, lineHeightH2: 27, lineHeightH3: 22, - iconLineHeight: (platform === 'ios') ? 37 : 30, - lineHeight: (platform === 'ios') ? 20 : 24, - + iconLineHeight: platform === "ios" ? 37 : 30, + lineHeight: platform === "ios" ? 20 : 24, // List - listBorderColor: '#c9c9c9', - listDividerBg: '#f4f4f4', + listBorderColor: "#c9c9c9", + listDividerBg: "#f4f4f4", listItemHeight: 45, - listBtnUnderlayColor: '#DDD', + listBtnUnderlayColor: "#DDD", // Card - cardBorderColor: '#ccc', + cardBorderColor: "#ccc", // Changed Variable - listItemPadding: (platform === 'ios') ? 10 : 12, + listItemPadding: platform === "ios" ? 10 : 12, - listNoteColor: '#808080', + listNoteColor: "#808080", listNoteSize: 13, - // Progress Bar - defaultProgressColor: '#E4202D', - inverseProgressColor: '#1A191B', - + defaultProgressColor: "#E4202D", + inverseProgressColor: "#1A191B", // Radio Button - radioBtnSize: (platform === 'ios') ? 25 : 23, - radioSelectedColorAndroid: '#5067FF', + radioBtnSize: platform === "ios" ? 25 : 23, + radioSelectedColorAndroid: "#5067FF", // New Variable - radioBtnLineHeight: (platform === 'ios') ? 29 : 24, + radioBtnLineHeight: platform === "ios" ? 29 : 24, - radioColor: '#7e7e7e', + radioColor: "#7e7e7e", get radioSelectedColor() { return color(this.radioColor).darken(0.2).hex(); }, - // Spinner - defaultSpinnerColor: '#45D56E', - inverseSpinnerColor: '#1A191B', - + defaultSpinnerColor: "#45D56E", + inverseSpinnerColor: "#1A191B", // Tabs - tabBgColor: '#F8F8F8', + tabBgColor: "#F8F8F8", tabFontSize: 15, - tabTextColor: '#222222', - + tabTextColor: "#222222", // Text - textColor: '#000', - inverseTextColor: '#fff', + textColor: "#000", + inverseTextColor: "#fff", noteFontSize: 14, - // Title - titleFontfamily: (platform === 'ios') ? 'System' : 'Roboto_medium', - titleFontSize: (platform === 'ios') ? 17 : 19, - subTitleFontSize: (platform === 'ios') ? 12 : 14, - subtitleColor: '#FFF', + titleFontfamily: platform === "ios" ? "System" : "Roboto_medium", + titleFontSize: platform === "ios" ? 17 : 19, + subTitleFontSize: platform === "ios" ? 12 : 14, + subtitleColor: "#FFF", // New Variable - titleFontColor: '#FFF', - + titleFontColor: "#FFF", // Other - borderRadiusBase: (platform === 'ios') ? 5 : 2, - borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), + borderRadiusBase: platform === "ios" ? 5 : 2, + borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), contentPadding: 10, get darkenHeader() { return color(this.tabBgColor).darken(0.03).hex(); }, - dropdownBg: '#000', - dropdownLinkColor: '#414142', + dropdownBg: "#000", + dropdownLinkColor: "#414142", inputLineHeight: 24, - jumbotronBg: '#C9C9CE', + jumbotronBg: "#C9C9CE", jumbotronPadding: 30, deviceWidth, deviceHeight, // New Variable - inputGroupRoundedBorderRadius: 30, + inputGroupRoundedBorderRadius: 30 }; diff --git a/src/theme/variables/material.js b/src/theme/variables/material.js index d43bc4f67..0634d2d37 100644 --- a/src/theme/variables/material.js +++ b/src/theme/variables/material.js @@ -1,58 +1,57 @@ -import color from 'color'; +import color from "color"; -import { Platform, Dimensions, PixelRatio } from 'react-native'; +import { Platform, Dimensions, PixelRatio } from "react-native"; -const deviceHeight = Dimensions.get('window').height; -const deviceWidth = Dimensions.get('window').width; +const deviceHeight = Dimensions.get("window").height; +const deviceWidth = Dimensions.get("window").width; const platform = Platform.OS; -const platformStyle = 'material'; +const platformStyle = "material"; export default { platformStyle, platform, // AndroidRipple androidRipple: true, - androidRippleColor: 'rgba(256, 256, 256, 0.3)', - androidRippleColorDark: 'rgba(0, 0, 0, 0.15)', + androidRippleColor: "rgba(256, 256, 256, 0.3)", + androidRippleColorDark: "rgba(0, 0, 0, 0.15)", // Badge - badgeBg: '#ED1727', - badgeColor: '#fff', + badgeBg: "#ED1727", + badgeColor: "#fff", // New Variable - badgePadding: (platform === 'ios') ? 3 : 0, + badgePadding: platform === "ios" ? 3 : 0, // Button - btnFontFamily: (platform === 'ios') ? 'Roboto' : 'Roboto_medium', - btnDisabledBg: '#b5b5b5', - btnDisabledClr: '#f1f1f1', + btnFontFamily: platform === "ios" ? "Roboto" : "Roboto_medium", + btnDisabledBg: "#b5b5b5", + btnDisabledClr: "#f1f1f1", // CheckBox CheckboxRadius: 0, CheckboxBorderWidth: 2, CheckboxPaddingLeft: 2, - CheckboxPaddingBottom: (platform === 'ios') ? 0 : 5, - CheckboxIconSize: (platform === 'ios') ? 18 : 14, - CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1, - CheckboxFontSize: (platform === 'ios') ? 21 : 18, + CheckboxPaddingBottom: platform === "ios" ? 0 : 5, + CheckboxIconSize: platform === "ios" ? 18 : 14, + CheckboxIconMarginTop: platform === "ios" ? undefined : 1, + CheckboxFontSize: platform === "ios" ? 21 : 18, DefaultFontSize: 17, - checkboxBgColor: '#039BE5', + checkboxBgColor: "#039BE5", checkboxSize: 20, - checkboxTickColor: '#fff', + checkboxTickColor: "#fff", // Segment - segmentBackgroundColor: '#3F51B5', - segmentActiveBackgroundColor: '#fff', - segmentTextColor: '#fff', - segmentActiveTextColor: '#3F51B5', - segmentBorderColor: '#fff', - segmentBorderColorMain: '#3F51B5', + segmentBackgroundColor: "#3F51B5", + segmentActiveBackgroundColor: "#fff", + segmentTextColor: "#fff", + segmentActiveTextColor: "#3F51B5", + segmentBorderColor: "#fff", + segmentBorderColorMain: "#3F51B5", // New Variable get defaultTextColor() { return this.textColor; }, - get btnPrimaryBg() { return this.brandPrimary; }, @@ -84,9 +83,7 @@ export default { return this.inverseTextColor; }, get btnTextSize() { - return (platform === 'ios') - ? this.fontSizeBase * 1.1 - : this.fontSizeBase - 1; + return platform === "ios" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1; }, get btnTextSizeLarge() { return this.fontSizeBase * 1.5; @@ -107,22 +104,19 @@ export default { return this.iconFontSize * 0.6; }, - // Card - cardDefaultBg: '#fff', - + cardDefaultBg: "#fff", // Color - brandPrimary: '#3F51B5', - brandInfo: '#3F57D3', - brandSuccess: '#5cb85c', - brandDanger: '#d9534f', - brandWarning: '#f0ad4e', - brandSidebar: '#252932', - + brandPrimary: "#3F51B5", + brandInfo: "#3F57D3", + brandSuccess: "#5cb85c", + brandDanger: "#d9534f", + brandWarning: "#f0ad4e", + brandSidebar: "#252932", // Font - fontFamily: 'Roboto', + fontFamily: "Roboto", fontSizeBase: 15, get fontSizeH1() { @@ -135,64 +129,59 @@ export default { return this.fontSizeBase * 1.4; }, - // Footer footerHeight: 55, - footerDefaultBg: '#3F51B5', - + footerDefaultBg: "#3F51B5", // FooterTab - tabBarTextColor: '#b3c7f9', - tabBarTextSize: (platform === 'ios') ? 14 : 11, - activeTab: '#fff', - sTabBarActiveTextColor: '#007aff', - tabBarActiveTextColor: '#fff', + tabBarTextColor: "#b3c7f9", + tabBarTextSize: platform === "ios" ? 14 : 11, + activeTab: "#fff", + sTabBarActiveTextColor: "#007aff", + tabBarActiveTextColor: "#fff", tabActiveBgColor: undefined, // Tab - tabDefaultBg: '#3F51B5', - topTabBarTextColor: '#b3c7f9', - topTabBarActiveTextColor: '#fff', + tabDefaultBg: "#3F51B5", + topTabBarTextColor: "#b3c7f9", + topTabBarActiveTextColor: "#fff", topTabActiveBgColor: undefined, - topTabBarBorderColor: '#fff', - topTabBarActiveBorderColor: '#fff', - + topTabBarBorderColor: "#fff", + topTabBarActiveBorderColor: "#fff", // Header - toolbarBtnColor: '#fff', - toolbarDefaultBg: '#3F51B5', - toolbarHeight: (platform === 'ios') ? 76 : 56, - toolbarIconSize: (platform === 'ios') ? 20 : 22, - toolbarSearchIconSize: (platform === 'ios') ? 20 : 23, - toolbarInputColor: '#fff', - searchBarHeight: (platform === 'ios') ? 30 : 40, - toolbarInverseBg: '#222', - toolbarTextColor: '#fff', - toolbarDefaultBorder: '#3F51B5', - iosStatusbar: 'light-content', + toolbarBtnColor: "#fff", + toolbarDefaultBg: "#3F51B5", + toolbarHeight: platform === "ios" ? 76 : 56, + toolbarIconSize: platform === "ios" ? 20 : 22, + toolbarSearchIconSize: platform === "ios" ? 20 : 23, + toolbarInputColor: "#fff", + searchBarHeight: platform === "ios" ? 30 : 40, + toolbarInverseBg: "#222", + toolbarTextColor: "#fff", + toolbarDefaultBorder: "#3F51B5", + iosStatusbar: "light-content", get statusBarColor() { return color(this.toolbarDefaultBg).darken(0.2).hex(); }, - // Icon - iconFamily: 'Ionicons', - iconFontSize: (platform === 'ios') ? 30 : 28, + iconFamily: "Ionicons", + iconFontSize: platform === "ios" ? 30 : 28, iconMargin: 7, - iconHeaderSize: (platform === 'ios') ? 29 : 24, - + iconHeaderSize: platform === "ios" ? 29 : 24, // InputGroup inputFontSize: 17, - inputBorderColor: '#D9D5DC', - inputSuccessBorderColor: '#2b8339', - inputErrorBorderColor: '#ed2f2f', + inputBorderColor: "#D9D5DC", + inputSuccessBorderColor: "#2b8339", + inputErrorBorderColor: "#ed2f2f", get inputColor() { return this.textColor; }, get inputColorPlaceholder() { - return '#575757'; + return "#575757"; }, inputGroupMarginBottom: 10, @@ -203,95 +192,86 @@ export default { return this.inputPaddingLeft * 8; }, - // Line Height btnLineHeight: 19, lineHeightH1: 32, lineHeightH2: 27, lineHeightH3: 22, - iconLineHeight: (platform === 'ios') ? 37 : 30, - lineHeight: (platform === 'ios') ? 20 : 24, - + iconLineHeight: platform === "ios" ? 37 : 30, + lineHeight: platform === "ios" ? 20 : 24, // List - listBorderColor: '#c9c9c9', - listDividerBg: '#f4f4f4', + listBorderColor: "#c9c9c9", + listDividerBg: "#f4f4f4", listItemHeight: 45, - listBtnUnderlayColor: '#DDD', + listBtnUnderlayColor: "#DDD", // Card - cardBorderColor: '#ccc', + cardBorderColor: "#ccc", // Changed Variable - listItemPadding: (platform === 'ios') ? 10 : 12, + listItemPadding: platform === "ios" ? 10 : 12, - listNoteColor: '#808080', + listNoteColor: "#808080", listNoteSize: 13, - // Progress Bar - defaultProgressColor: '#E4202D', - inverseProgressColor: '#1A191B', - + defaultProgressColor: "#E4202D", + inverseProgressColor: "#1A191B", // Radio Button - radioBtnSize: (platform === 'ios') ? 25 : 23, - radioSelectedColorAndroid: '#5067FF', + radioBtnSize: platform === "ios" ? 25 : 23, + radioSelectedColorAndroid: "#5067FF", // New Variable - radioBtnLineHeight: (platform === 'ios') ? 29 : 24, + radioBtnLineHeight: platform === "ios" ? 29 : 24, - radioColor: '#7e7e7e', + radioColor: "#7e7e7e", get radioSelectedColor() { return color(this.radioColor).darken(0.2).hex(); }, - // Spinner - defaultSpinnerColor: '#45D56E', - inverseSpinnerColor: '#1A191B', - + defaultSpinnerColor: "#45D56E", + inverseSpinnerColor: "#1A191B", // Tabs - tabBgColor: '#F8F8F8', + tabBgColor: "#F8F8F8", tabFontSize: 15, - tabTextColor: '#222222', - + tabTextColor: "#222222", // Text - textColor: '#000', - inverseTextColor: '#fff', + textColor: "#000", + inverseTextColor: "#fff", noteFontSize: 14, - // Title - titleFontfamily: (platform === 'ios') ? 'Roboto' : 'Roboto_medium', + titleFontfamily: platform === "ios" ? "Roboto" : "Roboto_medium", titleFontSize: 19, subTitleFontSize: 14, - subtitleColor: '#FFF', + subtitleColor: "#FFF", // New Variable - titleFontColor: '#FFF', - + titleFontColor: "#FFF", // Other borderRadiusBase: 2, - borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), + borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), contentPadding: 10, get darkenHeader() { return color(this.tabBgColor).darken(0.03).hex(); }, - dropdownBg: '#000', - dropdownLinkColor: '#414142', + dropdownBg: "#000", + dropdownLinkColor: "#414142", inputLineHeight: 24, - jumbotronBg: '#C9C9CE', + jumbotronBg: "#C9C9CE", jumbotronPadding: 30, deviceWidth, deviceHeight, // New Variable - inputGroupRoundedBorderRadius: 30, + inputGroupRoundedBorderRadius: 30 }; diff --git a/src/theme/variables/platform.js b/src/theme/variables/platform.js index be3f1f764..8edd5d21c 100644 --- a/src/theme/variables/platform.js +++ b/src/theme/variables/platform.js @@ -1,9 +1,9 @@ -import color from 'color'; +import color from "color"; -import { Platform, Dimensions, PixelRatio } from 'react-native'; +import { Platform, Dimensions, PixelRatio } from "react-native"; -const deviceHeight = Dimensions.get('window').height; -const deviceWidth = Dimensions.get('window').width; +const deviceHeight = Dimensions.get("window").height; +const deviceWidth = Dimensions.get("window").width; const platform = Platform.OS; const platformStyle = undefined; @@ -12,47 +12,46 @@ export default { platform, // AndroidRipple androidRipple: true, - androidRippleColor: 'rgba(256, 256, 256, 0.3)', - androidRippleColorDark: 'rgba(0, 0, 0, 0.15)', + androidRippleColor: "rgba(256, 256, 256, 0.3)", + androidRippleColorDark: "rgba(0, 0, 0, 0.15)", // Badge - badgeBg: '#ED1727', - badgeColor: '#fff', + badgeBg: "#ED1727", + badgeColor: "#fff", // New Variable - badgePadding: (platform === 'ios') ? 3 : 0, + badgePadding: platform === "ios" ? 3 : 0, // Button - btnFontFamily: (platform === 'ios') ? 'System' : 'Roboto_medium', - btnDisabledBg: '#b5b5b5', - btnDisabledClr: '#f1f1f1', + btnFontFamily: platform === "ios" ? "System" : "Roboto_medium", + btnDisabledBg: "#b5b5b5", + btnDisabledClr: "#f1f1f1", // CheckBox - CheckboxRadius: (platform === 'ios') ? 13 : 0, - CheckboxBorderWidth: (platform === 'ios') ? 1 : 2, - CheckboxPaddingLeft: (platform === 'ios') ? 4 : 2, - CheckboxPaddingBottom: (platform === 'ios') ? 0 : 5, - CheckboxIconSize: (platform === 'ios') ? 21 : 14, - CheckboxIconMarginTop: (platform === 'ios') ? undefined : 1, - CheckboxFontSize: (platform === 'ios') ? (23 / 0.9) : 18, + CheckboxRadius: platform === "ios" ? 13 : 0, + CheckboxBorderWidth: platform === "ios" ? 1 : 2, + CheckboxPaddingLeft: platform === "ios" ? 4 : 2, + CheckboxPaddingBottom: platform === "ios" ? 0 : 5, + CheckboxIconSize: platform === "ios" ? 21 : 14, + CheckboxIconMarginTop: platform === "ios" ? undefined : 1, + CheckboxFontSize: platform === "ios" ? 23 / 0.9 : 18, DefaultFontSize: 17, - checkboxBgColor: '#039BE5', + checkboxBgColor: "#039BE5", checkboxSize: 20, - checkboxTickColor: '#fff', + checkboxTickColor: "#fff", // Segment - segmentBackgroundColor: (platform === 'ios') ? '#F8F8F8' : '#3F51B5', - segmentActiveBackgroundColor: (platform === 'ios') ? '#007aff' : '#fff', - segmentTextColor: (platform === 'ios') ? '#007aff' : '#fff', - segmentActiveTextColor: (platform === 'ios') ? '#fff' : '#3F51B5', - segmentBorderColor: (platform === 'ios') ? '#007aff' : '#fff', - segmentBorderColorMain: (platform === 'ios') ? '#a7a6ab' : '#3F51B5', + segmentBackgroundColor: platform === "ios" ? "#F8F8F8" : "#3F51B5", + segmentActiveBackgroundColor: platform === "ios" ? "#007aff" : "#fff", + segmentTextColor: platform === "ios" ? "#007aff" : "#fff", + segmentActiveTextColor: platform === "ios" ? "#fff" : "#3F51B5", + segmentBorderColor: platform === "ios" ? "#007aff" : "#fff", + segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5", // New Variable get defaultTextColor() { return this.textColor; }, - get btnPrimaryBg() { return this.brandPrimary; }, @@ -84,9 +83,7 @@ export default { return this.inverseTextColor; }, get btnTextSize() { - return (platform === 'ios') - ? this.fontSizeBase * 1.1 - : this.fontSizeBase - 1; + return platform === "ios" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1; }, get btnTextSizeLarge() { return this.fontSizeBase * 1.5; @@ -107,22 +104,19 @@ export default { return this.iconFontSize * 0.6; }, - // Card - cardDefaultBg: '#fff', - + cardDefaultBg: "#fff", // Color - brandPrimary: (platform === 'ios') ? '#007aff' : '#3F51B5', - brandInfo: '#62B1F6', - brandSuccess: '#5cb85c', - brandDanger: '#d9534f', - brandWarning: '#f0ad4e', - brandSidebar: '#252932', - + brandPrimary: platform === "ios" ? "#007aff" : "#3F51B5", + brandInfo: "#62B1F6", + brandSuccess: "#5cb85c", + brandDanger: "#d9534f", + brandWarning: "#f0ad4e", + brandSidebar: "#252932", // Font - fontFamily: (platform === 'ios') ? 'System' : 'Roboto', + fontFamily: platform === "ios" ? "System" : "Roboto", fontSizeBase: 15, get fontSizeH1() { @@ -135,64 +129,59 @@ export default { return this.fontSizeBase * 1.4; }, - // Footer footerHeight: 55, - footerDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#4179F7', - + footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#4179F7", // FooterTab - tabBarTextColor: (platform === 'ios') ? '#6b6b6b' : '#b3c7f9', - tabBarTextSize: (platform === 'ios') ? 14 : 11, - activeTab: (platform === 'ios') ? '#007aff' : '#fff', - sTabBarActiveTextColor: '#007aff', - tabBarActiveTextColor: (platform === 'ios') ? '#007aff' : '#fff', - tabActiveBgColor: (platform === 'ios') ? '#cde1f9' : '#3F51B5', + tabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9", + tabBarTextSize: platform === "ios" ? 14 : 11, + activeTab: platform === "ios" ? "#007aff" : "#fff", + sTabBarActiveTextColor: "#007aff", + tabBarActiveTextColor: platform === "ios" ? "#007aff" : "#fff", + tabActiveBgColor: platform === "ios" ? "#cde1f9" : "#3F51B5", // Tab - tabDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#3F51B5', - topTabBarTextColor: (platform === 'ios') ? '#6b6b6b' : '#b3c7f9', - topTabBarActiveTextColor: (platform === 'ios') ? '#007aff' : '#fff', - topTabActiveBgColor: (platform === 'ios') ? '#cde1f9' : undefined, - topTabBarBorderColor: (platform === 'ios') ? '#a7a6ab' : '#fff', - topTabBarActiveBorderColor: (platform === 'ios') ? '#007aff' : '#fff', - + tabDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5", + topTabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9", + topTabBarActiveTextColor: platform === "ios" ? "#007aff" : "#fff", + topTabActiveBgColor: platform === "ios" ? "#cde1f9" : undefined, + topTabBarBorderColor: platform === "ios" ? "#a7a6ab" : "#fff", + topTabBarActiveBorderColor: platform === "ios" ? "#007aff" : "#fff", // Header - toolbarBtnColor: (platform === 'ios') ? '#007aff' : '#fff', - toolbarDefaultBg: (platform === 'ios') ? '#F8F8F8' : '#3F51B5', - toolbarHeight: (platform === 'ios') ? 64 : 56, - toolbarIconSize: (platform === 'ios') ? 20 : 22, - toolbarSearchIconSize: (platform === 'ios') ? 20 : 23, - toolbarInputColor: (platform === 'ios') ? '#CECDD2' : '#fff', - searchBarHeight: (platform === 'ios') ? 30 : 40, - toolbarInverseBg: '#222', - toolbarTextColor: (platform === 'ios') ? '#000' : '#fff', - toolbarDefaultBorder: (platform === 'ios') ? '#a7a6ab' : '#3F51B5', - iosStatusbar: (platform === 'ios') ? 'dark-content' : 'light-content', + toolbarBtnColor: platform === "ios" ? "#007aff" : "#fff", + toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5", + toolbarHeight: platform === "ios" ? 64 : 56, + toolbarIconSize: platform === "ios" ? 20 : 22, + toolbarSearchIconSize: platform === "ios" ? 20 : 23, + toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff", + searchBarHeight: platform === "ios" ? 30 : 40, + toolbarInverseBg: "#222", + toolbarTextColor: platform === "ios" ? "#000" : "#fff", + toolbarDefaultBorder: platform === "ios" ? "#a7a6ab" : "#3F51B5", + iosStatusbar: platform === "ios" ? "dark-content" : "light-content", get statusBarColor() { return color(this.toolbarDefaultBg).darken(0.2).hex(); }, - // Icon - iconFamily: 'Ionicons', - iconFontSize: (platform === 'ios') ? 30 : 28, + iconFamily: "Ionicons", + iconFontSize: platform === "ios" ? 30 : 28, iconMargin: 7, - iconHeaderSize: (platform === 'ios') ? 33 : 24, - + iconHeaderSize: platform === "ios" ? 33 : 24, // InputGroup inputFontSize: 17, - inputBorderColor: '#D9D5DC', - inputSuccessBorderColor: '#2b8339', - inputErrorBorderColor: '#ed2f2f', + inputBorderColor: "#D9D5DC", + inputSuccessBorderColor: "#2b8339", + inputErrorBorderColor: "#ed2f2f", get inputColor() { return this.textColor; }, get inputColorPlaceholder() { - return '#575757'; + return "#575757"; }, inputGroupMarginBottom: 10, @@ -203,95 +192,86 @@ export default { return this.inputPaddingLeft * 8; }, - // Line Height btnLineHeight: 19, lineHeightH1: 32, lineHeightH2: 27, lineHeightH3: 22, - iconLineHeight: (platform === 'ios') ? 37 : 30, - lineHeight: (platform === 'ios') ? 20 : 24, - + iconLineHeight: platform === "ios" ? 37 : 30, + lineHeight: platform === "ios" ? 20 : 24, // List - listBorderColor: '#c9c9c9', - listDividerBg: '#f4f4f4', + listBorderColor: "#c9c9c9", + listDividerBg: "#f4f4f4", listItemHeight: 45, - listBtnUnderlayColor: '#DDD', + listBtnUnderlayColor: "#DDD", // Card - cardBorderColor: '#ccc', + cardBorderColor: "#ccc", // Changed Variable - listItemPadding: (platform === 'ios') ? 10 : 12, + listItemPadding: platform === "ios" ? 10 : 12, - listNoteColor: '#808080', + listNoteColor: "#808080", listNoteSize: 13, - // Progress Bar - defaultProgressColor: '#E4202D', - inverseProgressColor: '#1A191B', - + defaultProgressColor: "#E4202D", + inverseProgressColor: "#1A191B", // Radio Button - radioBtnSize: (platform === 'ios') ? 25 : 23, - radioSelectedColorAndroid: '#3F51B5', + radioBtnSize: platform === "ios" ? 25 : 23, + radioSelectedColorAndroid: "#3F51B5", // New Variable - radioBtnLineHeight: (platform === 'ios') ? 29 : 24, + radioBtnLineHeight: platform === "ios" ? 29 : 24, - radioColor: '#7e7e7e', + radioColor: "#7e7e7e", get radioSelectedColor() { return color(this.radioColor).darken(0.2).hex(); }, - // Spinner - defaultSpinnerColor: '#45D56E', - inverseSpinnerColor: '#1A191B', - + defaultSpinnerColor: "#45D56E", + inverseSpinnerColor: "#1A191B", // Tabs - tabBgColor: '#F8F8F8', + tabBgColor: "#F8F8F8", tabFontSize: 15, - tabTextColor: '#222222', - + tabTextColor: "#222222", // Text - textColor: '#000', - inverseTextColor: '#fff', + textColor: "#000", + inverseTextColor: "#fff", noteFontSize: 14, - // Title - titleFontfamily: (platform === 'ios') ? 'System' : 'Roboto_medium', - titleFontSize: (platform === 'ios') ? 17 : 19, - subTitleFontSize: (platform === 'ios') ? 12 : 14, - subtitleColor: (platform === 'ios') ? '#8e8e93' : '#FFF', + titleFontfamily: platform === "ios" ? "System" : "Roboto_medium", + titleFontSize: platform === "ios" ? 17 : 19, + subTitleFontSize: platform === "ios" ? 12 : 14, + subtitleColor: platform === "ios" ? "#8e8e93" : "#FFF", // New Variable - titleFontColor: (platform === 'ios') ? '#000' : '#FFF', - + titleFontColor: platform === "ios" ? "#000" : "#FFF", // Other - borderRadiusBase: (platform === 'ios') ? 5 : 2, - borderWidth: (1 / PixelRatio.getPixelSizeForLayoutSize(1)), + borderRadiusBase: platform === "ios" ? 5 : 2, + borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1), contentPadding: 10, get darkenHeader() { return color(this.tabBgColor).darken(0.03).hex(); }, - dropdownBg: '#000', - dropdownLinkColor: '#414142', + dropdownBg: "#000", + dropdownLinkColor: "#414142", inputLineHeight: 24, - jumbotronBg: '#C9C9CE', + jumbotronBg: "#C9C9CE", jumbotronPadding: 30, deviceWidth, deviceHeight, // New Variable - inputGroupRoundedBorderRadius: 30, + inputGroupRoundedBorderRadius: 30 }; diff --git a/src/ui/index.js b/src/ui/index.js index a924794c0..5c28b4c3d 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -1,13 +1,13 @@ -import { Content as TabContent } from '../basic/Content'; -import { STabs as Tabs } from '../smart/STabs'; -import { SButton as Button } from '../smart/SButton'; -import { SHeader as Header } from '../smart/SHeader'; +import { Content as TabContent } from "../basic/Content"; +import { STabs as Tabs } from "../smart/STabs"; +import { SButton as Button } from "../smart/SButton"; +import { SHeader as Header } from "../smart/SHeader"; module.exports = { - Tabs, - TabContent, - Button, - Header, + Tabs, + TabContent, + Button, + Header }; const mapPropsToStyleNames = (styleNames, props) => _.keys(props);