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

q-colorize-mixin

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q-colorize-mixin - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

4

dist/index.common.js
/*!
* q-colorize-mixin v1.0.7
* q-colorize-mixin v1.0.8
* (c) 2020 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var version="1.0.7",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,r){return void 0===r&&(r="black"),void 0===e&&void 0!==r?this.calculateColor(r):this.isCssColor(e)?e:this.makeQuasarColorVar(e,r)},makeQuasarColorVar:function(e,r){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+r+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,r,o){return void 0===o&&(o={}),this.setTextColor(e,this.setBackgroundColor(r,o))},setBackgroundColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"background-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["bg-"+l]=!0,o))}return r},setTextColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{color:""+i,"caret-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["text-"+l]=!0,o))}return r},setBorderColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"border-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["border-"+l]=!0,o))}return r}}};QColorizeMixin.version=version;var index={QColorizeMixin:QColorizeMixin,version:version,install:function(e){e.component(QColorizeMixin.name,QColorizeMixin)}};exports.QColorizeMixin=QColorizeMixin,exports.default=index,exports.version=version;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var version="1.0.8",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,r){return void 0===r&&(r="black"),void 0===e&&void 0!==r?this.calculateColor(r):this.isCssColor(e)?e:this.makeQuasarColorVar(e,r)},makeQuasarColorVar:function(e,r){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+r+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,r,o){return void 0===o&&(o={}),this.setTextColor(e,this.setBackgroundColor(r,o))},setBackgroundColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"background-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["bg-"+l]=!0,o))}return r},setTextColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{color:""+i,"caret-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["text-"+l]=!0,o))}return r},setBorderColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"border-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["border-"+l]=!0,o))}return r}}};QColorizeMixin.version=version;var index={QColorizeMixin:QColorizeMixin,version:version,install:function(e){e.component(QColorizeMixin.name,QColorizeMixin)}};exports.QColorizeMixin=QColorizeMixin,exports.default=index,exports.version=version;
/*!
* q-colorize-mixin v1.0.7
* q-colorize-mixin v1.0.8
* (c) 2020 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var version="1.0.7",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,r){return void 0===r&&(r="black"),void 0===e&&void 0!==r?this.calculateColor(r):this.isCssColor(e)?e:this.makeQuasarColorVar(e,r)},makeQuasarColorVar:function(e,r){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+r+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,r,o){return void 0===o&&(o={}),this.setTextColor(e,this.setBackgroundColor(r,o))},setBackgroundColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"background-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["bg-"+l]=!0,o))}return r},setTextColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{color:""+i,"caret-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["text-"+l]=!0,o))}return r},setBorderColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"border-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["border-"+l]=!0,o))}return r}}};QColorizeMixin.version=version;var index={QColorizeMixin:QColorizeMixin,version:version,install:function(e){e.component(QColorizeMixin.name,QColorizeMixin)}};export default index;export{QColorizeMixin,version};
var version="1.0.8",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,r){return void 0===r&&(r="black"),void 0===e&&void 0!==r?this.calculateColor(r):this.isCssColor(e)?e:this.makeQuasarColorVar(e,r)},makeQuasarColorVar:function(e,r){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+r+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,r,o){return void 0===o&&(o={}),this.setTextColor(e,this.setBackgroundColor(r,o))},setBackgroundColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"background-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["bg-"+l]=!0,o))}return r},setTextColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{color:""+i,"caret-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["text-"+l]=!0,o))}return r},setBorderColor:function(e,r){var o;if(void 0===r&&(r={}),this.isValidCssColor(e)){var i=this.calculateColor(e);void 0===r.style&&(r.style={}),r.style=Object.assign({},r.style,{"border-color":""+i})}else if(e){var l=e.toString().trim();void 0===r.class&&(r.class={}),r.class=Object.assign({},r.class,((o={})["border-"+l]=!0,o))}return r}}};QColorizeMixin.version=version;var index={QColorizeMixin:QColorizeMixin,version:version,install:function(e){e.component(QColorizeMixin.name,QColorizeMixin)}};export default index;export{QColorizeMixin,version};
{
"name": "q-colorize-mixin",
"version": "1.0.7",
"version": "1.0.8",
"author": "Jeff Galbraith <jeff@quasar.dev>",

@@ -14,3 +14,6 @@ "description": "Quasar color mixin",

"build:css": "node build/script.css.js",
"build:api": "node build/build.api.js"
"build:api": "node build/build.api.js",
"lint": "eslint --ext .js,.vue src",
"lint-fix": "eslint --ext .js,.vue src --fix",
"test": "echo \"No test specified\" && exit 0"
},

@@ -32,2 +35,3 @@ "funding": {

"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"autoprefixer": "^9.8.6",

@@ -38,2 +42,7 @@ "chalk": "^4.1.0",

"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",

@@ -40,0 +49,0 @@ "node-sass": "^4.14.1",

@@ -83,3 +83,4 @@ // 'transparent' at beginning of array as it's not really a color,

}
} else if (color) {
}
else if (color) {
const colorName = color.toString().trim()

@@ -105,3 +106,4 @@ if (data.class === void 0) data.class = {}

}
} else if (color) {
}
else if (color) {
const colorName = color.toString().trim()

@@ -125,3 +127,4 @@ if (data.class === void 0) data.class = {}

}
} else if (color) {
}
else if (color) {
const colorName = color.toString().trim()

@@ -128,0 +131,0 @@ if (data.class === void 0) data.class = {}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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