diff --git a/README.md b/README.md index 213f2882..51038078 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ npm run dev var colors = { hex: '#194d33', + hex8: '#194D33A8', hsl: { h: 150, s: 0.5, l: 0.2, a: 1 }, hsv: { h: 150, s: 0.66, v: 0.30, a: 1 }, rgba: { r: 25, g: 77, b: 51, a: 1 }, @@ -68,6 +69,8 @@ var colors = { } // or var colors = '#194d33' +// or +var colors = '#194D33A8' // or var colors = { h: 150, s: 0.66, v: 0.30 } // or @@ -113,6 +116,26 @@ OR ``` +In some cases you can give the component a predefined set of colors with the property `presetColors` (for `Sketch` only) or `palette` (for `Compact` and `Grayscale`), by simply passing it an array with the color values as strings in any css compatible format. + +```html + + + +``` + ## License vue-color is licensed under [The MIT License](LICENSE). diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 5cb03bb7..06e415f0 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -69,5 +69,10 @@ module.exports = { /handsontable\.(full\.)?js/, /plotly\.js/ ] + }, + + node: { + // prevent webpack from injecting an global polyfill that includes Function(return this) and eval(this) + global: false } } diff --git a/build/webpack.release.js b/build/webpack.release.js index 61e3331c..b9a5804b 100644 --- a/build/webpack.release.js +++ b/build/webpack.release.js @@ -28,5 +28,10 @@ module.exports = { exclude: /node_modules/ } ] + }, + + node: { + // prevent webpack from injecting an global polyfill that includes Function(return this) and eval(this) + global: false } } diff --git a/dist/vue-color.js b/dist/vue-color.js index 3bed766f..2ebe8595 100644 --- a/dist/vue-color.js +++ b/dist/vue-color.js @@ -7,7 +7,7 @@ exports["VueColor"] = factory(); else root["VueColor"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 9); +/******/ return __webpack_require__(__webpack_require__.s = 60); /******/ }) /************************************************************************/ /******/ ([ @@ -175,7 +175,7 @@ if (typeof DEBUG !== 'undefined' && DEBUG) { ) } } -var listToStyles = __webpack_require__(13) +var listToStyles = __webpack_require__(64) /* type StyleObject = { @@ -203,14 +203,18 @@ var singletonElement = null var singletonCounter = 0 var isProduction = false var noop = function () {} +var options = null +var ssrIdKey = 'data-vue-ssr-id' // Force single-tag solution on IE6-9, which has a hard limit on the # of diff --git a/src/components/common/Alpha.vue b/src/components/common/Alpha.vue index 939630f3..4fd1754f 100644 --- a/src/components/common/Alpha.vue +++ b/src/components/common/Alpha.vue @@ -1,5 +1,5 @@