polythene-theme
Advanced tools
Comparing version 0.1.26 to 0.1.27
@@ -7,3 +7,16 @@ | ||
// Sizes | ||
const isDesktop = window.innerWidth > 800; | ||
const breakpoints = { | ||
// portrait | ||
'small_handset_portrait': 0, | ||
'medium_handset_portrait': 360, | ||
'large_handset_portrait': 400, | ||
'small_tablet_portrait': 600, | ||
'large_tablet_portrait': 720, | ||
// landscape | ||
'small_handset_landscape': 480, | ||
'medium_handset_landscape': 600, | ||
'large_handset_landscape': 720 | ||
}; | ||
const isTablet = window.innerWidth >= 600; | ||
const isDesktop = window.innerWidth >= 1024; | ||
const gridUnit = 4; | ||
@@ -24,3 +37,3 @@ const componentGridUnit = 8; | ||
const lightTextColor = rgba('0, 0, 0', .73); | ||
const lightButtonLabelColor = rgba('0, 0, 0', .69); | ||
//const lightButtonLabelColor = rgba('0, 0, 0', .69); | ||
const lightSecondaryTextAlpha = 0.54; | ||
@@ -30,3 +43,3 @@ const lightSecondaryTextColor = rgba('0, 0, 0', lightSecondaryTextAlpha); | ||
const lightDisabledTextColor = rgba('0, 0, 0', .26); | ||
const lightHintTextColor = lightDisabledTextColor; | ||
//const lightHintTextColor = lightDisabledTextColor; | ||
const lightBorderColor = rgba('0, 0, 0', .11); | ||
@@ -43,6 +56,6 @@ const lightHoverBackgroundAlpha = 0.08; | ||
const darkSecondaryTextColor = rgba('255, 255, 255', darkSecondaryTextAlpha); | ||
const darkButtonLabelColor = darkSecondaryTextColor; | ||
//const darkButtonLabelColor = darkSecondaryTextColor; | ||
const darkTertiaryTextColor = rgba('255, 255, 255', .4); | ||
const darkDisabledTextColor = rgba('255, 255, 255', .26); | ||
const darkHintTextColor = darkDisabledTextColor; | ||
//const darkHintTextColor = darkDisabledTextColor; | ||
const darkBorderColor = rgba('255, 255, 255', .1); | ||
@@ -133,2 +146,5 @@ const darkHoverBackgroundAlpha = 0.08; | ||
export default { | ||
breakpoints, | ||
isTablet, | ||
isDesktop, | ||
gridUnit, | ||
@@ -167,2 +183,3 @@ componentGridUnit, | ||
zIndexHeaderContainer: 999, | ||
zIndexSnackbar: 9998, | ||
zIndexDialog: 9999, | ||
@@ -201,14 +218,2 @@ | ||
}, | ||
list: { | ||
borderColor: lightBorderColor, | ||
backgroundSelected: lightSelectedBackgroundColor | ||
}, | ||
'list-tile': { | ||
header: lightPrimaryTextColor, | ||
secondaryTitle: lightSecondaryTextColor, | ||
info: lightTertiaryTextColor, | ||
subheader: lightTertiaryTextColor, | ||
backgroundSelected: lightSelectedBackgroundColor, | ||
disabled: lightDisabledTextColor | ||
}, | ||
dialog: { | ||
@@ -229,4 +234,20 @@ content: { | ||
}, | ||
list: { | ||
borderColor: lightBorderColor, | ||
backgroundSelected: lightSelectedBackgroundColor | ||
}, | ||
'list-tile': { | ||
header: lightPrimaryTextColor, | ||
secondaryTitle: lightSecondaryTextColor, | ||
info: lightTertiaryTextColor, | ||
subheader: lightTertiaryTextColor, | ||
backgroundSelected: lightSelectedBackgroundColor, | ||
disabled: lightDisabledTextColor | ||
}, | ||
menu: { | ||
background: lightBackgroundColor | ||
}, | ||
snackbar: { | ||
background: lightBackgroundColor, | ||
text: lightPrimaryTextColor | ||
} | ||
@@ -254,14 +275,2 @@ }, | ||
}, | ||
list: { | ||
borderColor: darkBorderColor, | ||
backgroundSelected: darkSelectedBackgroundColor | ||
}, | ||
'list-tile': { | ||
header: darkPrimaryTextColor, | ||
secondaryTitle: darkSecondaryTextColor, | ||
info: darkTertiaryTextColor, | ||
subheader: darkTertiaryTextColor, | ||
backgroundSelected: darkSelectedBackgroundColor, | ||
disabled: darkDisabledTextColor | ||
}, | ||
dialog: { | ||
@@ -282,4 +291,20 @@ content: { | ||
}, | ||
list: { | ||
borderColor: darkBorderColor, | ||
backgroundSelected: darkSelectedBackgroundColor | ||
}, | ||
'list-tile': { | ||
header: darkPrimaryTextColor, | ||
secondaryTitle: darkSecondaryTextColor, | ||
info: darkTertiaryTextColor, | ||
subheader: darkTertiaryTextColor, | ||
backgroundSelected: darkSelectedBackgroundColor, | ||
disabled: darkDisabledTextColor | ||
}, | ||
menu: { | ||
background: darkBackgroundColor | ||
}, | ||
snackbar: { | ||
background: '#323232', | ||
text: darkPrimaryTextColor | ||
} | ||
@@ -286,0 +311,0 @@ } |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});require("polythene-theme/common/object.assign");var rgba=function rgba(color,opacity){return"rgba("+color+","+opacity+")"};var isDesktop=window.innerWidth>800;var gridUnit=4;var componentGridUnit=8;var sidePadding=isDesktop?24:16;var buttonSize=6*componentGridUnit;var iconSize=3*componentGridUnit;var materialColorsBlue500="#2196f3";var materialColorsBlue600="#1e88e5";var materialColorsBlue700="#1976d2";var lightBackgroundColor="#fff";var lightPrimaryTextColor=rgba("0, 0, 0",.87);var lightTextColor=rgba("0, 0, 0",.73);var lightButtonLabelColor=rgba("0, 0, 0",.69);var lightSecondaryTextAlpha=.54;var lightSecondaryTextColor=rgba("0, 0, 0",lightSecondaryTextAlpha);var lightTertiaryTextColor=rgba("0, 0, 0",.4);var lightDisabledTextColor=rgba("0, 0, 0",.26);var lightHintTextColor=lightDisabledTextColor;var lightBorderColor=rgba("0, 0, 0",.11);var lightHoverBackgroundAlpha=.08;var lightSelectedBackgroundColor=rgba("0, 0, 0",lightHoverBackgroundAlpha);var lightActiveBackgroundAlpha=.14;var lightActiveBackgroundColor=rgba("0, 0, 0",lightActiveBackgroundAlpha);var darkBackgroundColor="#222";var darkPrimaryTextColor=rgba("255, 255, 255",1);var darkTextColor=darkPrimaryTextColor;var darkSecondaryTextAlpha=.7;var darkSecondaryTextColor=rgba("255, 255, 255",darkSecondaryTextAlpha);var darkButtonLabelColor=darkSecondaryTextColor;var darkTertiaryTextColor=rgba("255, 255, 255",.4);var darkDisabledTextColor=rgba("255, 255, 255",.26);var darkHintTextColor=darkDisabledTextColor;var darkBorderColor=rgba("255, 255, 255",.1);var darkHoverBackgroundAlpha=.08;var darkSelectedBackgroundColor=rgba("255, 255, 255",darkHoverBackgroundAlpha);var darkActiveBackgroundAlpha=.14;var darkActiveBackgroundColor=rgba("255, 255, 255",darkActiveBackgroundAlpha);var buttonLightConfig={flat:{normal:{background:"transparent",color:lightPrimaryTextColor},hover:{background:lightSelectedBackgroundColor},active:{background:lightActiveBackgroundColor},disabled:{background:"transparent",color:lightDisabledTextColor}},raised:{normal:{background:"#E0E0E0",color:lightPrimaryTextColor},hover:{background:"transparent"},active:{background:lightSelectedBackgroundColor},disabled:{background:rgba("0, 0, 0",.07),color:lightDisabledTextColor}}};var buttonDarkConfig={flat:{normal:{background:"transparent",color:"#fff"},hover:{background:darkSelectedBackgroundColor},active:{background:darkActiveBackgroundColor},disabled:{background:"transparent",color:rgba("255, 255, 255",.3)}},raised:{normal:{background:materialColorsBlue500,color:darkPrimaryTextColor},hover:{background:materialColorsBlue600},active:{background:materialColorsBlue700},disabled:{background:rgba("255, 255, 255",.12),color:rgba("255, 255, 255",.3)}}};var iconButtonLightConfig=JSON.parse(JSON.stringify(buttonLightConfig));iconButtonLightConfig.flat.normal.color=lightSecondaryTextColor;var iconButtonDarkConfig=JSON.parse(JSON.stringify(buttonDarkConfig));iconButtonDarkConfig.flat.normal.color=darkSecondaryTextColor;exports["default"]={gridUnit:gridUnit,componentGridUnit:componentGridUnit,sidePadding:sidePadding,screenSizeExtraLarge:1280,screenSizeLarge:960,screenSizeMedium:480,screenSizeSmall:320,buttonHeight:36,buttonTouchHeight:48,buttonBorderRadius:2,buttonFontSize:14,buttonFontWeight:500,surfaceReactionDuration:".2s",lineHeight:1.3,lineHeightEm:"1.3em",buttonSize:buttonSize,iconSizeLarge:5*componentGridUnit,iconSizeMedium:4*componentGridUnit,iconSize:iconSize,iconSizeSmall:2*componentGridUnit,iconButtonPadding:(buttonSize-iconSize)/2,indent:72,toolbarHeightDesktop:64,toolbarHeightMobilePortrait:56,toolbarHeightMobileLandscape:48,fontWeightNormal:400,fontWeightMedium:500,fontWeightBold:700,fontSizeTitle:20,menuSizeUnit:56,blockBorderRadius:2,zIndexMenu:99,zIndexHeaderContainer:999,zIndexDialog:9999,vendors:{animation:["o","moz","webkit"],background_size:["o","moz","webkit"],box_shadow:["moz","webkit"],keyframes:["o","moz","webkit"],transform:["o","moz","ms","webkit"],transition:["o","moz","webkit"],user_select:["moz","ms","webkit"]},color:{light:{button:buttonLightConfig,"icon-button":iconButtonLightConfig,card:{main:{backgroundColor:lightBackgroundColor},title:{color:lightPrimaryTextColor},subtitle:{color:lightSecondaryTextColor},text:{color:lightTextColor},actions:{borderColor:lightBorderColor}},list:{borderColor:lightBorderColor,backgroundSelected:lightSelectedBackgroundColor},"list-tile":{header:lightPrimaryTextColor,secondaryTitle:lightSecondaryTextColor,info:lightTertiaryTextColor,subheader:lightTertiaryTextColor,backgroundSelected:lightSelectedBackgroundColor,disabled:lightDisabledTextColor},dialog:{content:{background:lightBackgroundColor},title:{color:lightPrimaryTextColor},body:{color:lightTextColor,border:lightBorderColor},backdrop:{background:"rgba(0, 0, 0, .4)"}},menu:{background:lightBackgroundColor}},dark:{button:buttonDarkConfig,"icon-button":iconButtonDarkConfig,card:{main:{backgroundColor:darkBackgroundColor},title:{color:darkPrimaryTextColor},subtitle:{color:darkSecondaryTextColor},text:{color:darkSecondaryTextColor},actions:{borderColor:darkBorderColor}},list:{borderColor:darkBorderColor,backgroundSelected:darkSelectedBackgroundColor},"list-tile":{header:darkPrimaryTextColor,secondaryTitle:darkSecondaryTextColor,info:darkTertiaryTextColor,subheader:darkTertiaryTextColor,backgroundSelected:darkSelectedBackgroundColor,disabled:darkDisabledTextColor},dialog:{content:{background:darkBackgroundColor},title:{color:darkPrimaryTextColor},body:{color:darkTextColor,border:darkBorderColor},backdrop:{background:"rgba(0, 0, 0, .5)"}},menu:{background:darkBackgroundColor}}}};module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});require("polythene-theme/common/object.assign");var rgba=function rgba(color,opacity){return"rgba("+color+","+opacity+")"};var breakpoints={small_handset_portrait:0,medium_handset_portrait:360,large_handset_portrait:400,small_tablet_portrait:600,large_tablet_portrait:720,small_handset_landscape:480,medium_handset_landscape:600,large_handset_landscape:720};var isTablet=window.innerWidth>=600;var isDesktop=window.innerWidth>=1024;var gridUnit=4;var componentGridUnit=8;var sidePadding=isDesktop?24:16;var buttonSize=6*componentGridUnit;var iconSize=3*componentGridUnit;var materialColorsBlue500="#2196f3";var materialColorsBlue600="#1e88e5";var materialColorsBlue700="#1976d2";var lightBackgroundColor="#fff";var lightPrimaryTextColor=rgba("0, 0, 0",.87);var lightTextColor=rgba("0, 0, 0",.73);var lightSecondaryTextAlpha=.54;var lightSecondaryTextColor=rgba("0, 0, 0",lightSecondaryTextAlpha);var lightTertiaryTextColor=rgba("0, 0, 0",.4);var lightDisabledTextColor=rgba("0, 0, 0",.26);var lightBorderColor=rgba("0, 0, 0",.11);var lightHoverBackgroundAlpha=.08;var lightSelectedBackgroundColor=rgba("0, 0, 0",lightHoverBackgroundAlpha);var lightActiveBackgroundAlpha=.14;var lightActiveBackgroundColor=rgba("0, 0, 0",lightActiveBackgroundAlpha);var darkBackgroundColor="#222";var darkPrimaryTextColor=rgba("255, 255, 255",1);var darkTextColor=darkPrimaryTextColor;var darkSecondaryTextAlpha=.7;var darkSecondaryTextColor=rgba("255, 255, 255",darkSecondaryTextAlpha);var darkTertiaryTextColor=rgba("255, 255, 255",.4);var darkDisabledTextColor=rgba("255, 255, 255",.26);var darkBorderColor=rgba("255, 255, 255",.1);var darkHoverBackgroundAlpha=.08;var darkSelectedBackgroundColor=rgba("255, 255, 255",darkHoverBackgroundAlpha);var darkActiveBackgroundAlpha=.14;var darkActiveBackgroundColor=rgba("255, 255, 255",darkActiveBackgroundAlpha);var buttonLightConfig={flat:{normal:{background:"transparent",color:lightPrimaryTextColor},hover:{background:lightSelectedBackgroundColor},active:{background:lightActiveBackgroundColor},disabled:{background:"transparent",color:lightDisabledTextColor}},raised:{normal:{background:"#E0E0E0",color:lightPrimaryTextColor},hover:{background:"transparent"},active:{background:lightSelectedBackgroundColor},disabled:{background:rgba("0, 0, 0",.07),color:lightDisabledTextColor}}};var buttonDarkConfig={flat:{normal:{background:"transparent",color:"#fff"},hover:{background:darkSelectedBackgroundColor},active:{background:darkActiveBackgroundColor},disabled:{background:"transparent",color:rgba("255, 255, 255",.3)}},raised:{normal:{background:materialColorsBlue500,color:darkPrimaryTextColor},hover:{background:materialColorsBlue600},active:{background:materialColorsBlue700},disabled:{background:rgba("255, 255, 255",.12),color:rgba("255, 255, 255",.3)}}};var iconButtonLightConfig=JSON.parse(JSON.stringify(buttonLightConfig));iconButtonLightConfig.flat.normal.color=lightSecondaryTextColor;var iconButtonDarkConfig=JSON.parse(JSON.stringify(buttonDarkConfig));iconButtonDarkConfig.flat.normal.color=darkSecondaryTextColor;exports["default"]={breakpoints:breakpoints,isTablet:isTablet,isDesktop:isDesktop,gridUnit:gridUnit,componentGridUnit:componentGridUnit,sidePadding:sidePadding,screenSizeExtraLarge:1280,screenSizeLarge:960,screenSizeMedium:480,screenSizeSmall:320,buttonHeight:36,buttonTouchHeight:48,buttonBorderRadius:2,buttonFontSize:14,buttonFontWeight:500,surfaceReactionDuration:".2s",lineHeight:1.3,lineHeightEm:"1.3em",buttonSize:buttonSize,iconSizeLarge:5*componentGridUnit,iconSizeMedium:4*componentGridUnit,iconSize:iconSize,iconSizeSmall:2*componentGridUnit,iconButtonPadding:(buttonSize-iconSize)/2,indent:72,toolbarHeightDesktop:64,toolbarHeightMobilePortrait:56,toolbarHeightMobileLandscape:48,fontWeightNormal:400,fontWeightMedium:500,fontWeightBold:700,fontSizeTitle:20,menuSizeUnit:56,blockBorderRadius:2,zIndexMenu:99,zIndexHeaderContainer:999,zIndexSnackbar:9998,zIndexDialog:9999,vendors:{animation:["o","moz","webkit"],background_size:["o","moz","webkit"],box_shadow:["moz","webkit"],keyframes:["o","moz","webkit"],transform:["o","moz","ms","webkit"],transition:["o","moz","webkit"],user_select:["moz","ms","webkit"]},color:{light:{button:buttonLightConfig,"icon-button":iconButtonLightConfig,card:{main:{backgroundColor:lightBackgroundColor},title:{color:lightPrimaryTextColor},subtitle:{color:lightSecondaryTextColor},text:{color:lightTextColor},actions:{borderColor:lightBorderColor}},dialog:{content:{background:lightBackgroundColor},title:{color:lightPrimaryTextColor},body:{color:lightTextColor,border:lightBorderColor},backdrop:{background:"rgba(0, 0, 0, .4)"}},list:{borderColor:lightBorderColor,backgroundSelected:lightSelectedBackgroundColor},"list-tile":{header:lightPrimaryTextColor,secondaryTitle:lightSecondaryTextColor,info:lightTertiaryTextColor,subheader:lightTertiaryTextColor,backgroundSelected:lightSelectedBackgroundColor,disabled:lightDisabledTextColor},menu:{background:lightBackgroundColor},snackbar:{background:lightBackgroundColor,text:lightPrimaryTextColor}},dark:{button:buttonDarkConfig,"icon-button":iconButtonDarkConfig,card:{main:{backgroundColor:darkBackgroundColor},title:{color:darkPrimaryTextColor},subtitle:{color:darkSecondaryTextColor},text:{color:darkSecondaryTextColor},actions:{borderColor:darkBorderColor}},dialog:{content:{background:darkBackgroundColor},title:{color:darkPrimaryTextColor},body:{color:darkTextColor,border:darkBorderColor},backdrop:{background:"rgba(0, 0, 0, .5)"}},list:{borderColor:darkBorderColor,backgroundSelected:darkSelectedBackgroundColor},"list-tile":{header:darkPrimaryTextColor,secondaryTitle:darkSecondaryTextColor,info:darkTertiaryTextColor,subheader:darkTertiaryTextColor,backgroundSelected:darkSelectedBackgroundColor,disabled:darkDisabledTextColor},menu:{background:darkBackgroundColor},snackbar:{background:"#323232",text:darkPrimaryTextColor}}}};module.exports=exports["default"]; |
{ | ||
"name": "polythene-theme", | ||
"version": "0.1.26", | ||
"version": "0.1.27", | ||
"description": "Polythene default theme", | ||
@@ -53,2 +53,3 @@ "license": "MIT", | ||
"shadow", | ||
"snackbar", | ||
"svg", | ||
@@ -55,0 +56,0 @@ "tabs", |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances 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
181785
115
2786
51