diff --git a/.eslintrc b/.eslintrc index b1b3668d..70e69b11 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,18 +1,17 @@ { - "parser": "babel-eslint", "extends": [ - "eslint:recommended", - "simon" + "eslint:recommended" ], "env": { "browser": true }, "parserOptions": { - "ecmaVersion": 2018, + "ecmaVersion": 2022, "sourceType": "module" }, "rules": { - "new-cap": "off" + "new-cap": "off", + "no-cond-assign": "off" }, "globals": { "VERSION": true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42a05a79..6b4e1a17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Use Node.js 14.x - uses: actions/setup-node@v1 + - name: Use Node.js 18 + uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18 - name: Install run: npm ci diff --git a/README.md b/README.md index 5e953bb6..ec3f6501 100644 --- a/README.md +++ b/README.md @@ -49,26 +49,6 @@
-------------- - -

- Get 700+ Material components for the latest Bootstrap 5 for free. -

-

- This component is also available as ready-to-use solution in MDB UI Kit. Learn more about Bootstrap Color Picker here. -

- -

- - - - - - -

- ----------------- - ### Features * Themes * Simple usage @@ -90,10 +70,7 @@ The reason behind this decision is the way this tool has been build (monolithic, > Personally I recommend building these UI-Related "widgets" directly into the app with the framework you're using which takes more time but in return gives you full power of how it should work and look like. Frameworks such as [(p)react](https://preactjs.com/), [vue](https://vuejs.org/) and [svelte](https://svelte.dev/) will make it a breeze to develop such things within a day. -##### Update - -This project will be archived at the end of 2021! -After this there will be no more bug / security fixes or feature requests. +**As of 2021, this project is no longer maintained!** ### Themes |Classic|Monolith|Nano| diff --git a/dist/pickr.es5.min.js b/dist/pickr.es5.min.js index b582a9ee..691eec09 100644 --- a/dist/pickr.es5.min.js +++ b/dist/pickr.es5.min.js @@ -1,4 +1,4 @@ /*! Pickr 1.8.2 MIT | https://github.com/Simonwep/pickr */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Pickr=e():t.Pickr=e()}(self,(function(){return(()=>{var t={3099:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:(t,e,r)=>{var n=r(111);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070),a=n("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},9670:(t,e,r)=>{var n=r(111);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},8533:(t,e,r)=>{"use strict";var n=r(2092).forEach,o=r(9341)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,r)=>{"use strict";var n=r(9974),o=r(7908),i=r(3411),a=r(7659),c=r(7466),s=r(6135),u=r(1246);t.exports=function(t){var e,r,l,p,f,v,h=o(t),d="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,b=void 0!==y,m=u(h),x=0;if(b&&(y=n(y,g>2?arguments[2]:void 0,2)),null==m||d==Array&&a(m))for(r=new d(e=c(h.length));e>x;x++)v=b?y(h[x],x):h[x],s(r,x,v);else for(f=(p=m.call(h)).next,r=new d;!(l=f.call(p)).done;x++)v=b?i(p,y,[l.value,x],!0):l.value,s(r,x,v);return r.length=x,r}},1318:(t,e,r)=>{var n=r(5656),o=r(7466),i=r(1400),a=function(t){return function(e,r,a){var c,s=n(e),u=o(s.length),l=i(a,u);if(t&&r!=r){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((t||l in s)&&s[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,r)=>{var n=r(9974),o=r(8361),i=r(7908),a=r(7466),c=r(5417),s=[].push,u=function(t){var e=1==t,r=2==t,u=3==t,l=4==t,p=6==t,f=7==t,v=5==t||p;return function(h,d,g,y){for(var b,m,x=i(h),w=o(x),S=n(d,g,3),O=a(w.length),_=0,A=y||c,j=e?A(h,O):r||f?A(h,0):void 0;O>_;_++)if((v||_ in w)&&(m=S(b=w[_],_,x),t))if(e)j[_]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return _;case 2:s.call(j,b)}else switch(t){case 4:return!1;case 7:s.call(j,b)}return p?-1:u||l?l:j}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},1194:(t,e,r)=>{var n=r(7293),o=r(5112),i=r(7392),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},5417:(t,e,r)=>{var n=r(111),o=r(3157),i=r(5112)("species");t.exports=function(t,e){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),o=r(9212);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){throw o(t),e}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,r)=>{var n=r(1694),o=r(4326),i=r(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},9920:(t,e,r)=>{var n=r(6656),o=r(3887),i=r(1236),a=r(3070);t.exports=function(t,e){for(var r=o(e),c=a.f,s=i.f,u=0;u{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),c=r(7497),s=function(){return this};t.exports=function(t,e,r){var u=e+" Iterator";return t.prototype=o(n,{next:i(1,r)}),a(t,u,!1,!0),c[u]=s,t}},8880:(t,e,r)=>{var n=r(9781),o=r(3070),i=r(9114);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(7593),o=r(3070),i=r(9114);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},654:(t,e,r)=>{"use strict";var n=r(2109),o=r(4994),i=r(9518),a=r(7674),c=r(8003),s=r(8880),u=r(1320),l=r(5112),p=r(1913),f=r(7497),v=r(3383),h=v.IteratorPrototype,d=v.BUGGY_SAFARI_ITERATORS,g=l("iterator"),y="keys",b="values",m="entries",x=function(){return this};t.exports=function(t,e,r,l,v,w,S){o(r,e,l);var O,_,A,j=function(t){if(t===v&&I)return I;if(!d&&t in k)return k[t];switch(t){case y:case b:case m:return function(){return new r(this,t)}}return function(){return new r(this)}},E=e+" Iterator",P=!1,k=t.prototype,C=k[g]||k["@@iterator"]||v&&k[v],I=!d&&C||j(v),T="Array"==e&&k.entries||C;if(T&&(O=i(T.call(new t)),h!==Object.prototype&&O.next&&(p||i(O)===h||(a?a(O,h):"function"!=typeof O[g]&&s(O,g,x)),c(O,E,!0,!0),p&&(f[E]=x))),v==b&&C&&C.name!==b&&(P=!0,I=function(){return C.call(this)}),p&&!S||k[g]===I||s(k,g,I),f[e]=I,v)if(_={values:j(b),keys:w?I:j(y),entries:j(m)},S)for(A in _)(d||P||!(A in k))&&u(k,A,_[A]);else n({target:e,proto:!0,forced:d||P},_);return _}},7235:(t,e,r)=>{var n=r(857),o=r(6656),i=r(6061),a=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,o,i=r(7854),a=r(8113),c=i.process,s=c&&c.versions,u=s&&s.v8;u?o=(n=u.split("."))[0]<4?1:n[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(1320),c=r(3505),s=r(9920),u=r(4705);t.exports=function(t,e){var r,l,p,f,v,h=t.target,d=t.global,g=t.stat;if(r=d?n:g?n[h]||c(h,{}):(n[h]||{}).prototype)for(l in e){if(f=e[l],p=t.noTargetGet?(v=o(r,l))&&v.value:r[l],!u(d?l:h+(g?".":"#")+l,t.forced)&&void 0!==p){if(typeof f==typeof p)continue;s(f,p)}(t.sham||p&&p.sham)&&i(f,"sham",!0),a(r,l,f,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1320),o=r(2261),i=r(7293),a=r(5112),c=r(8880),s=a("species"),u=RegExp.prototype;t.exports=function(t,e,r,l){var p=a(t),f=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),v=f&&!i((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!f||!v||r){var h=/./[p],d=e(p,""[t],(function(t,e,r,n,i){var a=e.exec;return a===o||a===u.exec?f&&!i?{done:!0,value:h.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));n(String.prototype,t,d[0]),n(u,p,d[1])}l&&c(u[p],"sham",!0)}},9974:(t,e,r)=>{var n=r(3099);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},5005:(t,e,r)=>{var n=r(857),o=r(7854),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},1246:(t,e,r)=>{var n=r(648),o=r(7497),i=r(5112)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},647:(t,e,r)=>{var n=r(7908),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,s,u,l){var p=r+t.length,f=s.length,v=c;return void 0!==u&&(u=n(u),v=a),i.call(l,v,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(p);case"<":a=u[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>f){var l=o(c/10);return 0===l?n:l<=f?void 0===s[l-1]?i.charAt(1):s[l-1]+i.charAt(1):n}a=s[c-1]}return void 0===a?"":a}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:(t,e,r)=>{var n=r(7908),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(n(t),e)}},3501:t=>{t.exports={}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(7293),o=r(4326),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},9587:(t,e,r)=>{var n=r(111),o=r(7674);t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},2788:(t,e,r)=>{var n=r(5465),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},9909:(t,e,r)=>{var n,o,i,a=r(8536),c=r(7854),s=r(111),u=r(8880),l=r(6656),p=r(5465),f=r(6200),v=r(3501),h="Object already initialized",d=c.WeakMap;if(a||p.state){var g=p.state||(p.state=new d),y=g.get,b=g.has,m=g.set;n=function(t,e){if(b.call(g,t))throw new TypeError(h);return e.facade=t,m.call(g,t,e),e},o=function(t){return y.call(g,t)||{}},i=function(t){return b.call(g,t)}}else{var x=f("state");v[x]=!0,n=function(t,e){if(l(t,x))throw new TypeError(h);return e.facade=t,u(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4705:(t,e,r)=>{var n=r(7293),o=/#|\.prototype\./,i=function(t,e){var r=c[a(t)];return r==u||r!=s&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},s=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},111:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},9212:(t,e,r)=>{var n=r(9670);t.exports=function(t){var e=t.return;if(void 0!==e)return n(e.call(t)).value}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),c=r(9518),s=r(8880),u=r(6656),l=r(5112),p=r(1913),f=l("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(n=o):v=!0);var h=null==n||a((function(){var t={};return n[f].call(t)!==t}));h&&(n={}),p&&!h||u(n,f)||s(n,f,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7497:t=>{t.exports={}},133:(t,e,r)=>{var n=r(7392),o=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(t,e,r)=>{var n=r(7854),o=r(2788),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},3929:(t,e,r)=>{var n=r(7850);t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},1574:(t,e,r)=>{"use strict";var n=r(9781),o=r(7293),i=r(1956),a=r(5181),c=r(5296),s=r(7908),u=r(8361),l=Object.assign,p=Object.defineProperty;t.exports=!l||o((function(){if(n&&1!==l({b:1},l(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[r]||i(l({},e)).join("")!=o}))?function(t,e){for(var r=s(t),o=arguments.length,l=1,p=a.f,f=c.f;o>l;)for(var v,h=u(arguments[l++]),d=p?i(h).concat(p(h)):i(h),g=d.length,y=0;g>y;)v=d[y++],n&&!f.call(h,v)||(r[v]=h[v]);return r}:l},30:(t,e,r)=>{var n,o=r(9670),i=r(6048),a=r(748),c=r(3501),s=r(490),u=r(317),l=r(6200),p=l("IE_PROTO"),f=function(){},v=function(t){return"