nuke-switch
Advanced tools
Comparing version 2.0.9 to 2.0.10
# Changelog | ||
## 2.0.10 / 2018-07-24 | ||
* [[a87edef](http://gitlab.alibaba-inc.com/nuke/switch/commit/a87edef60eb89de3d49c81433d8b073e86809453)] - `fix` fix switch config issues for web | ||
@@ -4,0 +6,0 @@ ## 2.0.9 / 2018-04-16 |
@@ -42,3 +42,2 @@ 'use strict'; | ||
backgroundColor: Variables['c-bg-color-android'], | ||
boxShadow: Variables['c-boxshadow-color-android'] + ' 0 0 0 16px inset', | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s, background-color 1s' | ||
@@ -49,3 +48,2 @@ }, | ||
backgroundColor: Variables['unc-bg-color-android'], | ||
boxShadow: Variables['unc-boxshadow-color-android'] + ' 0 0 0 0 inset', // #dfdfdf | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s' | ||
@@ -59,6 +57,6 @@ }, | ||
borderColor: rgba(Variables['dis-c-border-color-android'], 0.5), | ||
backgroundColor: Variables['dis-c-bg-color-android'] | ||
backgroundColor: rgba(Variables['dis-c-bg-color-android'], 0.26) | ||
}, | ||
disabledUnCheckedWrap: { | ||
backgroundColor: Variables['dis-unc-bg-color-android'] | ||
backgroundColor: rgba(Variables['dis-unc-bg-color-android'], 0.26) | ||
// borderColor: Variables['unc-border-color'] | ||
@@ -85,3 +83,3 @@ }, | ||
disabledDot: { | ||
backgroundColor: Variables['dot-disabled-bg-color-android'] | ||
backgroundColor: rgba(Variables['dot-disabled-bg-color-android'], 0.5) | ||
}, | ||
@@ -109,3 +107,2 @@ wrapIOS: { | ||
backgroundColor: Variables['c-bg-color-ios'], | ||
boxShadow: Variables['c-boxshadow-color-ios'] + ' 0 0 0 16px inset', | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s, background-color 1s' | ||
@@ -116,3 +113,2 @@ }, | ||
backgroundColor: Variables['unc-bg-color-ios'], | ||
boxShadow: Variables['unc-boxshadow-color-ios'] + ' 0 0 0 0 inset', // #dfdfdf | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s' | ||
@@ -123,3 +119,3 @@ }, | ||
borderColor: rgba(Variables['dis-c-border-color-ios'], 0.5), | ||
backgroundColor: Variables['dis-c-bg-color-ios'] | ||
backgroundColor: rgba(Variables['dis-c-bg-color-ios'], 0.5) | ||
}, | ||
@@ -126,0 +122,0 @@ disabledUnCheckedWrapIOS: { |
@@ -79,14 +79,5 @@ 'use strict'; | ||
*/ | ||
'c-border-color-android': 'transparent', | ||
'c-border-color-android': Core['color-transparent'], | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'c-boxshadow-color-ios': '#00e158', | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'c-boxshadow-color-android': '#4FCEDB', | ||
/** | ||
* border | ||
@@ -106,12 +97,8 @@ * @property namespace statement | ||
'unc-bg-color-android': '#B1B1B1', | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'unc-boxshadow-color': '#dfdfdf', | ||
/** | ||
* background | ||
* @property namespace statement | ||
*/ | ||
'dis-c-bg-color-ios': 'rgba(0,225,88,0.5)', | ||
'dis-c-bg-color-ios': '#00FF58', | ||
/** | ||
@@ -121,3 +108,3 @@ * background | ||
*/ | ||
'dis-c-bg-color-android': 'rgba(34,31,31,0.26)', | ||
'dis-c-bg-color-android': '#221F1F', | ||
/** | ||
@@ -132,3 +119,3 @@ * background | ||
*/ | ||
'dis-unc-bg-color-android': 'rgba(34,31,31,0.26)', | ||
'dis-unc-bg-color-android': '#221F1F', | ||
/** | ||
@@ -214,3 +201,3 @@ * border | ||
*/ | ||
'dot-disabled-bg-color-android': 'rgba(255,255,255,0.5)' | ||
'dot-disabled-bg-color-android': Core['color-white'] | ||
}; | ||
@@ -217,0 +204,0 @@ |
@@ -31,3 +31,2 @@ 'use strict'; | ||
// import styleEqual from 'style-equal'; | ||
@@ -34,0 +33,0 @@ var Switch = function (_Component) { |
{ | ||
"name": "nuke-switch", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "开关", | ||
@@ -50,4 +50,3 @@ "main": "lib/index", | ||
"nuke-helper": "2.x.x", | ||
"nuke-theme-provider": "^2.x.x", | ||
"style-equal": "^1.0.0" | ||
"nuke-theme-provider": "^2.x.x" | ||
}, | ||
@@ -67,5 +66,5 @@ "devDependencies": { | ||
"publishConfig": { | ||
"registry": "http://registry.npmjs.org" | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"license": "Apache" | ||
} | ||
} |
@@ -27,3 +27,2 @@ import { hex } from 'nuke-helper'; | ||
backgroundColor: Variables['c-bg-color-android'], | ||
boxShadow: `${Variables['c-boxshadow-color-android']} 0 0 0 16px inset`, | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s, background-color 1s', | ||
@@ -34,3 +33,2 @@ }, | ||
backgroundColor: Variables['unc-bg-color-android'], | ||
boxShadow: `${Variables['unc-boxshadow-color-android']} 0 0 0 0 inset`, // #dfdfdf | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s', | ||
@@ -44,6 +42,6 @@ }, | ||
borderColor: rgba(Variables['dis-c-border-color-android'], 0.5), | ||
backgroundColor: Variables['dis-c-bg-color-android'], | ||
backgroundColor: rgba(Variables['dis-c-bg-color-android'], 0.26), | ||
}, | ||
disabledUnCheckedWrap: { | ||
backgroundColor: Variables['dis-unc-bg-color-android'], | ||
backgroundColor: rgba(Variables['dis-unc-bg-color-android'], 0.26), | ||
// borderColor: Variables['unc-border-color'] | ||
@@ -70,3 +68,3 @@ }, | ||
disabledDot: { | ||
backgroundColor: Variables['dot-disabled-bg-color-android'], | ||
backgroundColor: rgba(Variables['dot-disabled-bg-color-android'], 0.5), | ||
}, | ||
@@ -94,3 +92,2 @@ wrapIOS: { | ||
backgroundColor: Variables['c-bg-color-ios'], | ||
boxShadow: `${Variables['c-boxshadow-color-ios']} 0 0 0 16px inset`, | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s, background-color 1s', | ||
@@ -101,3 +98,2 @@ }, | ||
backgroundColor: Variables['unc-bg-color-ios'], | ||
boxShadow: `${Variables['unc-boxshadow-color-ios']} 0 0 0 0 inset`, // #dfdfdf | ||
WebkitTransition: 'border 0.2s, box-shadow 0.2s', | ||
@@ -108,3 +104,3 @@ }, | ||
borderColor: rgba(Variables['dis-c-border-color-ios'], 0.5), | ||
backgroundColor: Variables['dis-c-bg-color-ios'], | ||
backgroundColor: rgba(Variables['dis-c-bg-color-ios'], 0.5), | ||
}, | ||
@@ -111,0 +107,0 @@ disabledUnCheckedWrapIOS: { |
@@ -79,14 +79,5 @@ 'use strict'; | ||
*/ | ||
'c-border-color-android': 'transparent', | ||
'c-border-color-android': Core['color-transparent'], | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'c-boxshadow-color-ios': '#00e158', | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'c-boxshadow-color-android': '#4FCEDB', | ||
/** | ||
* border | ||
@@ -106,12 +97,8 @@ * @property namespace statement | ||
'unc-bg-color-android': '#B1B1B1', | ||
/** | ||
* boxShadowColor | ||
* @property namespace statement | ||
*/ | ||
'unc-boxshadow-color': '#dfdfdf', | ||
/** | ||
* background | ||
* @property namespace statement | ||
*/ | ||
'dis-c-bg-color-ios': 'rgba(0,225,88,0.5)', | ||
'dis-c-bg-color-ios': '#00FF58', | ||
/** | ||
@@ -121,3 +108,3 @@ * background | ||
*/ | ||
'dis-c-bg-color-android': 'rgba(34,31,31,0.26)', | ||
'dis-c-bg-color-android': '#221F1F', | ||
/** | ||
@@ -132,3 +119,3 @@ * background | ||
*/ | ||
'dis-unc-bg-color-android': 'rgba(34,31,31,0.26)', | ||
'dis-unc-bg-color-android': '#221F1F', | ||
/** | ||
@@ -214,3 +201,3 @@ * border | ||
*/ | ||
'dot-disabled-bg-color-android': 'rgba(255,255,255,0.5)', | ||
'dot-disabled-bg-color-android': Core['color-white'], | ||
}; | ||
@@ -217,0 +204,0 @@ |
@@ -5,3 +5,2 @@ /* @jsx createElement */ | ||
import { connectStyle } from 'nuke-theme-provider'; | ||
// import styleEqual from 'style-equal'; | ||
@@ -8,0 +7,0 @@ import stylesProvider from '../styles'; |
@@ -34,7 +34,3 @@ /* @jsx createElement */ | ||
}; | ||
changeNotice = (item, value) => { | ||
const obj = {}; | ||
obj[item] = value; | ||
this.setState(obj); | ||
}; | ||
render() { | ||
@@ -51,4 +47,3 @@ return ( | ||
key="switch1" | ||
checked={this.state.switch1} | ||
onValueChange={this.change.bind(this, 'switch1')} | ||
defaultChecked={true} | ||
/> | ||
@@ -60,6 +55,20 @@ | ||
key="switch2" | ||
checked={this.state.switch2} | ||
onValueChange={this.change.bind(this, 'switch2')} | ||
/> | ||
</DemoItem> | ||
<DemoItem direction="column"> | ||
<Switch | ||
type="iOS" | ||
style={styles.item} | ||
key="switch3" | ||
disabled | ||
defaultChecked={true} | ||
/> | ||
<Switch | ||
type="iOS" | ||
style={styles.item} | ||
key="switch4" | ||
disabled | ||
/> | ||
</DemoItem> | ||
</Demo> | ||
@@ -73,5 +82,4 @@ </DemoSection> | ||
style={styles.item} | ||
key="switch1" | ||
checked={this.state.switch3} | ||
onValueChange={this.change.bind(this, 'switch3')} | ||
key="switch5" | ||
defaultChecked={true} | ||
/> | ||
@@ -82,7 +90,21 @@ | ||
style={styles.item} | ||
key="switch2" | ||
checked={this.state.switch4} | ||
onValueChange={this.change.bind(this, 'switch4')} | ||
key="switch6" | ||
/> | ||
</DemoItem> | ||
<DemoItem direction="column"> | ||
<Switch | ||
type="android" | ||
style={styles.item} | ||
key="switch7" | ||
disabled | ||
defaultChecked={true} | ||
/> | ||
<Switch | ||
type="android" | ||
style={styles.item} | ||
disabled | ||
key="switch8" | ||
/> | ||
</DemoItem> | ||
</Demo> | ||
@@ -89,0 +111,0 @@ </DemoSection> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51061
3
15
1052
- Removedstyle-equal@^1.0.0
- Removedstyle-equal@1.0.0(transitive)