Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-material-design

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-material-design - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

3

lib/Avatar.js

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Image, Text } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Image, Text} from "react-native";
import Icon from './Icon';

@@ -3,0 +4,0 @@ import { getColor } from './helpers';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Text, TouchableNativeFeedback, Platform} from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Text, TouchableNativeFeedback, Platform} from "react-native";
import Ripple from './polyfill/Ripple';

@@ -3,0 +4,0 @@ import { TYPO, PRIMARY, THEME_NAME, PRIMARY_COLORS } from './config';

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, View} from "react-native";

@@ -3,0 +4,0 @@ export default class Actions extends Component {

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, View} from "react-native";

@@ -3,0 +4,0 @@ export default class Body extends Component {

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, TouchableNativeFeedback } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, TouchableNativeFeedback} from "react-native";
import Ripple from '../polyfill/Ripple';

@@ -3,0 +4,0 @@ import { getColor, isCompatible } from '../helpers';

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, Image, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, Image, View} from "react-native";

@@ -3,0 +4,0 @@ export default class Media extends Component {

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, Text, View, TouchableHighlight } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, Text, View, TouchableHighlight} from "react-native";
import { TYPO, PRIMARY, COLOR, PRIMARY_COLORS, THEME_NAME } from './config';

@@ -3,0 +4,0 @@ import Icon from './Icon';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View} from "react-native";
import Checkbox from './Checkbox';

@@ -3,0 +4,0 @@ import { THEME_NAME, PRIMARY, PRIMARY_COLORS } from './config';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View} from "react-native";
import { THEME_NAME } from './config';

@@ -3,0 +4,0 @@

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Image } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Image} from "react-native";

@@ -3,0 +4,0 @@ export default class Header extends Component {

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, ScrollView } from 'react-native';
import React, {Component, PropTypes} from "react";
import {ScrollView} from "react-native";
import { THEME_NAME, PRIMARY_COLORS } from '../config';

@@ -3,0 +4,0 @@ import { getColor } from '../helpers';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Text, TouchableNativeFeedback } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Text, TouchableNativeFeedback} from "react-native";
import Icon from '../Icon';

@@ -3,0 +4,0 @@ import Ripple from '../polyfill/Ripple';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View} from 'react-native';
import React, {Component, PropTypes} from "react";
import {View} from "react-native";
import { default as VectorIcon } from 'react-native-vector-icons/MaterialIcons';

@@ -11,3 +12,4 @@ import { getColor } from './helpers';

size: PropTypes.number,
color: PropTypes.string
color: PropTypes.string,
allowFontScaling: PropTypes.bool
};

@@ -17,7 +19,8 @@

size: 30,
color: '#757575'
color: '#757575',
allowFontScaling: true
};
render() {
const { name, style, size, color } = this.props;
const { name, style, size, color, allowFontScaling} = this.props;

@@ -30,2 +33,3 @@ return (

style={style}
allowFontScaling={allowFontScaling}
/>

@@ -32,0 +36,0 @@ );

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, Text, View, Animated } from 'react-native';
import React, {Component, PropTypes} from "react";
import {Text, View, Animated} from "react-native";
import { getColor } from './helpers';

@@ -3,0 +4,0 @@

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, View, Text, TouchableWithoutFeedback } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, View, Text, TouchableWithoutFeedback} from "react-native";
import { TYPO } from './config';

@@ -3,0 +4,0 @@

@@ -1,2 +0,4 @@

import React, { Component, PropTypes, View, Animated, TouchableOpacity } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Animated, TouchableOpacity, Platform} from "react-native";
import elevationPolyfill from './Elevation';

@@ -38,6 +40,29 @@

const { fadeValue ,size, pageX, pageY, rippling, scaleValue, location, elevation } = this.state;
let outerStyle = {}, innerStyle = style;
// Extract padding, margin from style since IOS overflow: hidden has issues with the shadow
if(Platform.OS == 'ios') {
({outerStyle, innerStyle} = (style instanceof Array ? style : [style]).reduce((obj, styles) => {
if (styles instanceof Object) {
Object.entries(styles).forEach(
([name, value]) =>
[
'marginLeft',
'marginRight',
'marginTop',
'marginBottom',
'marginHorizontal',
'marginVertical',
'margin',
'borderRadius',
'backgroundColor'
].indexOf(name) !== -1 ? obj.outerStyle[name] = value : obj.innerStyle[name] = value
)
}
return obj
}, {outerStyle: {}, innerStyle: {}}));
}
return (
<TouchableOpacity
ref='container'
activeOpacity={1}

@@ -50,26 +75,29 @@ onPress={onPress}

<View
style={[style || {}, elevationPolyfill(elevation ? elevation : 0)]}
style={[elevationPolyfill(elevation ? elevation : 0), outerStyle]}
>
<Animated.View style={[
styles.background, {
backgroundColor: rippling ? rippleColor : 'transparent',
opacity: fadeValue
}
]}/>
<Animated.View style={[
styles.ripple,
location &&
<View ref="container" style={[styles.container, innerStyle]}>
{children}
<Animated.View style={[
styles.background, {
backgroundColor: rippling ? rippleColor : 'transparent',
opacity: fadeValue
}
]}/>
<Animated.View style={[
styles.ripple,
location &&
{
backgroundColor: rippleColor,
width: size,
height: size,
top: pageY - location.pageY - size / 2,
left: pageX - location.pageX - size / 2,
borderRadius: size / 2
},
{
backgroundColor: rippleColor,
width: size,
height: size,
top: pageY - location.pageY - size / 2,
left: pageX - location.pageX - size / 2,
borderRadius: size / 2
},
{
transform: [{ scale: scaleValue }]
}]}
/>
{children}
transform: [{ scale: scaleValue }]
}]}
/>
</View>
</View>

@@ -162,2 +190,2 @@ </TouchableOpacity>

}
};
};

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, Text, View, TouchableHighlight } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, Text, View, TouchableHighlight} from "react-native";
import Icon from './Icon';

@@ -3,0 +4,0 @@ import IconToggle from './IconToggle';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View} from "react-native";
import RadioButton from './RadioButton';

@@ -3,0 +4,0 @@ import { PRIMARY, PRIMARY_COLORS, THEME_NAME } from './config';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Text, TouchableNativeFeedback } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Text, TouchableNativeFeedback} from "react-native";
import { default as PolyfillRipple } from './polyfill/Ripple';

@@ -3,0 +4,0 @@ import { isCompatible } from './helpers';

@@ -1,2 +0,3 @@

import React, { Component, StyleSheet, PropTypes, View, Text } from 'react-native';
import React, {Component, PropTypes} from "react";
import {StyleSheet, View, Text} from "react-native";
import { TYPO, THEME_NAME } from './config';

@@ -3,0 +4,0 @@ import { getColor } from './helpers';

@@ -1,2 +0,3 @@

import React, { Component, PropTypes, View, Text } from 'react-native';
import React, {Component, PropTypes} from "react";
import {View, Text} from "react-native";
import { TYPO, PRIMARY, THEME_NAME, PRIMARY_COLORS } from './config';

@@ -84,12 +85,16 @@ import { getColor } from './helpers';

}
<Text
numberOfLines={1}
style={[styles.title, TYPO.paperFontTitle, {
color: styleMap.color,
marginLeft: icon ? styles.title.marginLeft : 16
}]}
>
{title}
</Text>
{
!title ? this.props.children : (
<Text
numberOfLines={1}
style={[styles.title, TYPO.paperFontTitle, {
color: styleMap.color,
marginLeft: icon ? styles.title.marginLeft : 16
}]}
>
{title}
</Text>
)
}
{
actions &&

@@ -96,0 +101,0 @@ actions.map(function (action, i) {

{
"name": "react-native-material-design",
"version": "0.3.5",
"version": "0.3.6",
"description": "React Native Material Design Components",

@@ -30,3 +30,3 @@ "main": "lib/index.js",

"react-native-material-design-styles": "https://github.com/react-native-material-design/react-native-material-design-styles.git",
"react-native-vector-icons": "^1.0.3"
"react-native-vector-icons": "^2.0.1"
},

@@ -33,0 +33,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc