@uiw/react-color
Advanced tools
Comparing version 1.0.10 to 1.0.11
/*! For license information please see color.min.js.LICENSE.txt */ | ||
!function(e,r){"object"===typeof exports&&"object"===typeof module?module.exports=r(require("react")):"function"===typeof define&&define.amd?define(["react"],r):"object"===typeof exports?exports["@uiw/react-color"]=r(require("react")):e["@uiw/react-color"]=r(e.React)}(self,(function(e){return(()=>{"use strict";var r={382:e=>{var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(a){return!1}}()?Object.assign:function(e,s){for(var n,l,i=a(e),d=1;d<arguments.length;d++){for(var p in n=Object(arguments[d]))t.call(n,p)&&(i[p]=n[p]);if(r){l=r(n);for(var c=0;c<l.length;c++)o.call(n,l[c])&&(i[l[c]]=n[l[c]])}}return i}},858:(e,r,t)=>{t(382);var o=t(787),a=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var s=Symbol.for;a=s("react.element"),s("react.fragment")}var n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,t){var o,s={},d=null,p=null;for(o in void 0!==t&&(d=""+t),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(p=r.ref),r)l.call(r,o)&&!i.hasOwnProperty(o)&&(s[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===s[o]&&(s[o]=r[o]);return{$$typeof:a,type:e,key:d,ref:p,props:s,_owner:n.current}}r.jsx=d,r.jsxs=d},664:(e,r,t)=>{e.exports=t(858)},787:r=>{r.exports=e}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var s=t[e]={exports:{}};return r[e](s,s.exports,o),s.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{function e(){return e=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},e.apply(this,arguments)}o.r(a),o.d(a,{Alpha:()=>re,BACKGROUND_IMG:()=>K,Block:()=>Oe,Chrome:()=>Le,ChromeInputType:()=>Pe,Circle:()=>$e,Colorful:()=>Ye,Compact:()=>We,EditableInput:()=>Ce,EditableInputHSLA:()=>Be,EditableInputRGBA:()=>Se,Github:()=>ce,GithubPlacement:()=>ne,Hue:()=>ve,Material:()=>rr,Saturation:()=>fe,ShadeSlider:()=>ar,Sketch:()=>hr,Slider:()=>lr,Swatch:()=>ae,Wheel:()=>Cr,color:()=>H,equalColorObjects:()=>r,equalColorString:()=>t,equalHex:()=>s,getContrastingColor:()=>l,hexToHsva:()=>k,hexToRgba:()=>A,hslStringToHsla:()=>f,hslStringToHsva:()=>x,hslaStringToHsva:()=>b,hslaToHsl:()=>F,hslaToHsva:()=>v,hsvStringToHsva:()=>j,hsvaStringToHsva:()=>m,hsvaToHex:()=>D,hsvaToHexa:()=>M,hsvaToHslString:()=>c,hsvaToHsla:()=>y,hsvaToHslaString:()=>u,hsvaToHsv:()=>O,hsvaToHsvString:()=>h,hsvaToHsvaString:()=>g,hsvaToRgbString:()=>T,hsvaToRgba:()=>P,hsvaToRgbaString:()=>E,parseHue:()=>w,rgbStringToHsva:()=>R,rgbaStringToHsva:()=>S,rgbaToHex:()=>N,rgbaToHexa:()=>B,rgbaToHsva:()=>p,rgbaToRgb:()=>L,validHex:()=>n});var r=(e,r)=>{if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},t=(e,r)=>e.replace(/\s/g,"")===r.replace(/\s/g,""),s=(e,t)=>e.toLowerCase()===t.toLowerCase()||r(A(e),A(t)),n=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),l=e=>{if(!e)return"#fff";var r=H(e);return(299*r.rgb.r+587*r.rgb.g+114*r.rgb.b)/1e3>=128?"#000":"#fff"},i=255,d=100,p=e=>{var{r:r,g:t,b:o,a:a}=e,s=Math.max(r,t,o),n=s-Math.min(r,t,o),l=n?s===r?(t-o)/n:s===t?2+(o-r)/n:4+(r-t)/n:0;return{h:60*(l<0?l+6:l),s:s?n/s*d:0,v:s/i*d,a:a}},c=e=>{var{h:r,s:t,l:o}=y(e);return"hsl("+r+", "+Math.round(t)+"%, "+Math.round(o)+"%)"},h=e=>{var{h:r,s:t,v:o}=e;return"hsv("+r+", "+t+"%, "+o+"%)"},g=e=>{var{h:r,s:t,v:o,a:a}=e;return"hsva("+r+", "+t+"%, "+o+"%, "+a+")"},u=e=>{var{h:r,s:t,l:o,a:a}=y(e);return"hsla("+r+", "+t+"%, "+o+"%, "+a+")"},f=e=>{var[r,t,o,a]=(e.match(/\d+/g)||[]).map(Number);return{h:r,s:t,l:o,a:a}},b=e=>{var r=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?v({h:w(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},x=b,v=e=>{var{h:r,s:t,l:o,a:a}=e;return{h:r,s:(t*=(o<50?o:d-o)/d)>0?2*t/(o+t)*d:0,v:o+t,a:a}},y=e=>{var{h:r,s:t,v:o,a:a}=e,s=(200-t)*o/d;return{h:r,s:s>0&&s<200?t*o/d/(s<=d?s:200-s)*d:0,l:s/2,a:a}},m=e=>{var r=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?{h:w(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?d:1)}:{h:0,s:0,v:0,a:1}},C={grad:.9,turn:360,rad:360/(2*Math.PI)},w=function(e,r){return void 0===r&&(r="deg"),Number(e)*(C[r]||1)},j=m,S=e=>{var r=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?p({r:Number(r[1])/(r[2]?d/i:1),g:Number(r[3])/(r[4]?d/i:1),b:Number(r[5])/(r[6]?d/i:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?d:1)}):{h:0,s:0,v:0,a:1}},R=S,N=e=>{var r,{r:t,g:o,b:a}=e;return"#"+(r=(t<<16|o<<8|a).toString(16),new Array(7-r.length).join("0")+r)},B=e=>{var{r:r,g:t,b:o,a:a}=e,s="number"===typeof a&&(255*a|256).toString(16).slice(1);return""+N({r:r,g:t,b:o,a:a})+(s||"")},k=e=>p(A(e)),A=e=>{var r=e.replace("#","");/^#?/.test(e)&&3===r.length&&(e="#"+r.charAt(0)+r.charAt(0)+r.charAt(1)+r.charAt(1)+r.charAt(2)+r.charAt(2));var t=new RegExp("[A-Za-z0-9]{2}","g"),[o,a,s=0,n]=e.match(t).map((e=>parseInt(e,16)));return{r:o,g:a,b:s,a:n?n/i:1}},P=r=>{var{h:t,s:o,v:a,a:s}=r,n=t/60,l=o/d,p=a/d,c=Math.floor(n)%6,h=n-Math.floor(n),g=i*p*(1-l),u=i*p*(1-l*h),f=i*p*(1-l*(1-h));p*=i;var b={};switch(c){case 0:b.r=p,b.g=f,b.b=g;break;case 1:b.r=u,b.g=p,b.b=g;break;case 2:b.r=g,b.g=p,b.b=f;break;case 3:b.r=g,b.g=u,b.b=p;break;case 4:b.r=f,b.g=g,b.b=p;break;case 5:b.r=p,b.g=g,b.b=u}return b.r=Math.round(b.r),b.g=Math.round(b.g),b.b=Math.round(b.b),e({},b,{a:s})},T=e=>{var{r:r,g:t,b:o}=P(e);return"rgb("+r+", "+t+", "+o+")"},E=e=>{var{r:r,g:t,b:o,a:a}=P(e);return"rgba("+r+", "+t+", "+o+", "+a+")"},L=e=>{var{r:r,g:t,b:o}=e;return{r:r,g:t,b:o}},F=e=>{var{h:r,s:t,l:o}=e;return{h:r,s:t,l:o}},D=e=>N(P(e)),M=e=>B(P(e)),O=e=>{var{h:r,s:t,v:o}=e;return{h:r,s:t,v:o}},H=e=>{var r,t,o,a,s,l,i,d;return"string"===typeof e&&n(e)?(l=k(e),i=e):"string"!==typeof e&&(l=e),l&&(o=O(l),s=y(l),a=P(l),d=B(a),i=D(l),t=F(s),r=L(a)),{rgb:r,hsl:t,hsv:o,rgba:a,hsla:s,hsva:l,hex:i,hexa:d}};function I(e,r){if(null==e)return{};var t,o,a={},s=Object.keys(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}var z=o(787),_=o.n(z);function W(e){var r=(0,z.useRef)(e);return(0,z.useEffect)((()=>{r.current=e})),(0,z.useCallback)(((e,t)=>r.current&&r.current(e,t)),[])}var G=e=>"touches"in e,U=e=>{!G(e)&&e.preventDefault&&e.preventDefault()},q=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},X=(e,r)=>{var t=e.getBoundingClientRect(),o=G(r)?r.touches[0]:r;return{left:q((o.pageX-(t.left+window.pageXOffset))/t.width),top:q((o.pageY-(t.top+window.pageYOffset))/t.height),width:t.width,height:t.height,x:o.pageX-(t.left+window.pageXOffset),y:o.pageY-(t.top+window.pageYOffset)}},Y=o(664),V=["prefixCls","className","onMove","onDown"],Q=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-interactive",className:a,onMove:s,onDown:n}=r,l=I(r,V),i=(0,z.useRef)(null),d=(0,z.useRef)(!1),[p,c]=(0,z.useState)(!1),h=W(s),g=W(n),u=(0,z.useCallback)((e=>{U(e),(G(e)?e.touches.length>0:e.buttons>0)&&i.current?h&&h(X(i.current,e),e):c(!1)}),[h]),f=(0,z.useCallback)((()=>c(!1)),[]),b=(0,z.useCallback)((e=>{var r=e?window.addEventListener:window.removeEventListener;r(d.current?"touchmove":"mousemove",u),r(d.current?"touchend":"mouseup",f)}),[]);(0,z.useEffect)((()=>(b(p),()=>{p&&b(!1)})),[p,b]);var x=(0,z.useCallback)((e=>{U(e.nativeEvent),(e=>!(d.current&&!G(e))&&(d.current=G(e),!0))(e.nativeEvent)&&(g&&g(X(i.current,e.nativeEvent),e.nativeEvent),c(!0))}),[g]);return(0,Y.jsx)("div",e({},l,{className:[o,a||""].filter(Boolean).join(" "),style:e({},l.style,{touchAction:"none"}),ref:i,tabIndex:0,onMouseDown:x,onTouchStart:x}))}));Q.displayName="Interactive";const Z=Q;var $=e=>{var{className:r,prefixCls:t,left:o,top:a}=e,s={position:"absolute",left:o,top:a};return(0,z.useMemo)((()=>(0,Y.jsx)("div",{className:t+"-pointer "+(r||""),style:s,children:(0,Y.jsx)("div",{className:t+"-fill",style:{width:18,height:18,transform:o?"translate(-9px, -1px)":"translate(-1px, -9px)",boxShadow:"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:"50%",backgroundColor:"rgb(248, 248, 248)"}})})),[r,o,a,t])},J=["prefixCls","className","hsva","background","bgProps","innerProps","radius","width","height","direction","style","onChange","pointer"],K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==",ee=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-alpha",className:a,hsva:s,background:n,bgProps:l={},innerProps:i={},radius:d=0,width:p,height:c=16,direction:h="horizontal",style:g,onChange:f,pointer:b}=r,x=I(r,J),v=(0,z.useCallback)((r=>{f&&f(e({},s,{a:"horizontal"===h?r.left:r.top}),r)}),[s]),y=u(Object.assign({},s,{a:1})),m="linear-gradient(to "+("horizontal"===h?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+y+" 100%)",C={};return"horizontal"===h?C.left=100*s.a+"%":C.top=100*s.a+"%",(0,Y.jsxs)("div",e({},x,{className:[o,o+"-"+h,a||""].filter(Boolean).join(" "),style:e({borderRadius:d,background:"url("+K+") left center",backgroundColor:"#fff"},g,{position:"relative"},{width:p,height:c}),ref:t,children:[(0,Y.jsx)("div",e({},l,{style:e({inset:0,position:"absolute",background:n||m,borderRadius:d},l.style)})),(0,Y.jsx)(Z,e({},i,{style:e({},i.style,{inset:0,zIndex:1,position:"absolute"}),onMove:v,onDown:v,children:_().createElement(b||$,e({prefixCls:o},C))}))]}))}));ee.displayName="Aplha";const re=ee;var te=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],oe=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-swatch",className:a,color:s,colors:n=[],style:l,rectProps:i={},onChange:d,addonAfter:p,addonBefore:c,rectRender:h}=r,g=I(r,te),u=e({background:"rgb(144, 19, 254)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},i.style),f=e=>{d&&d(k(e))};return(0,Y.jsxs)("div",e({ref:t},g,{className:[o,a||""].filter(Boolean).join(" "),style:e({display:"flex",flexWrap:"wrap",position:"relative"},l),children:[c&&_().isValidElement(c)&&c,n&&Array.isArray(n)&&n.map(((r,t)=>{var o="",a="";"string"===typeof r&&(o=r,a=r),"object"===typeof r&&r.color&&(o=r.title||r.color,a=r.color);var n=s&&s.toLocaleLowerCase()===a.toLocaleLowerCase();if(h)return h({key:t,title:o,color:a,checked:!!n,style:e({},u,{background:a}),onClick:()=>f(a)});var l=i.children&&_().isValidElement(i.children)?_().cloneElement(i.children,{color:a,checked:n}):null;return(0,Y.jsx)("div",e({tabIndex:0,title:o,onClick:()=>f(a)},i,{children:l,style:e({},u,{background:a})}),t)})),p&&_().isValidElement(p)&&p]}))}));oe.displayName="Swatch";const ae=oe;function se(r){var{style:t,title:o,checked:a,color:s,onClick:n,rectProps:l}=r,i=(0,z.useRef)(null),d=(0,z.useCallback)((()=>{i.current.style.zIndex="2",i.current.style.outline="#fff solid 2px",i.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"}),[]),p=(0,z.useCallback)((()=>{a||(i.current.style.zIndex="0",i.current.style.outline="initial",i.current.style.boxShadow="initial")}),[a]);return(0,Y.jsx)("div",e({ref:i,title:o},l,{onClick:n,onMouseEnter:d,onMouseLeave:p,style:e({},t,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},a?{zIndex:1,outline:"#fff solid 2px",boxShadow:"rgb(0 0 0 / 25%) 0 0 5px 2px"}:{zIndex:0},l.style)}))}var ne,le=["prefixCls","placement","className","style","color","colors","rectProps","onChange"],ie=["key"],de=["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"];!function(e){e.Left="L",e.LeftTop="LT",e.LeftBotton="LB",e.Right="R",e.RightTop="RT",e.RightBotton="RB",e.Top="T",e.TopRight="TR",e.TopLeft="TL",e.Botton="B",e.BottonLeft="BL",e.BottonRight="BR"}(ne||(ne={}));var pe=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-github",placement:a=ne.TopRight,className:s,style:l,color:i,colors:d=de,rectProps:p={},onChange:c}=r,h=I(r,le),g="string"===typeof i&&n(i)?k(i):i,u=i?D(g):"",f={borderStyle:"solid",position:"absolute"},b=e({},f),x=e({},f);return/^T/.test(a)&&(b.borderWidth="0 8px 8px",b.borderColor="transparent transparent rgba(0, 0, 0, 0.15)",x.borderWidth="0 7px 7px",x.borderColor="transparent transparent #fff"),a===ne.TopRight&&(b.top=-8,x.top=-7),a===ne.Top&&(b.top=-8,x.top=-7),a===ne.TopLeft&&(b.top=-8,x.top=-7),/^B/.test(a)&&(b.borderWidth="8px 8px 0 ",b.borderColor="rgba(0, 0, 0, 0.15) transparent transparent",x.borderWidth="7px 7px 0px",x.borderColor="#fff transparent transparent",a===ne.BottonRight&&(b.top="100%",x.top="100%"),a===ne.Botton&&(b.top="100%",x.top="100%"),a===ne.BottonLeft&&(b.top="100%",x.top="100%")),/^(B|T)/.test(a)&&(a!==ne.Top&&a!==ne.Botton||(b.left="50%",b.marginLeft=-8,x.left="50%",x.marginLeft=-7),a!==ne.TopRight&&a!==ne.BottonRight||(b.right=10,x.right=11),a!==ne.TopLeft&&a!==ne.BottonLeft||(b.left=7,x.left=8)),/^L/.test(a)&&(b.borderWidth="8px 8px 8px 0px",b.borderColor="transparent rgba(0, 0, 0, 0.15) transparent transparent",x.borderWidth="7px 7px 7px 0px",x.borderColor="transparent #fff transparent transparent",b.left=-8,x.left=-7),/^R/.test(a)&&(b.borderWidth="8px 0px 8px 8px",b.borderColor="transparent transparent transparent rgba(0, 0, 0, 0.15)",x.borderWidth="7px 0px 7px 7px",x.borderColor="transparent transparent transparent #fff",b.right=-8,x.right=-7),/^(L|R)/.test(a)&&(a!==ne.RightTop&&a!==ne.LeftTop||(b.top=5,x.top=6),a!==ne.Left&&a!==ne.Right||(b.top="50%",x.top="50%",b.marginTop=-8,x.marginTop=-7),a!==ne.LeftBotton&&a!==ne.RightBotton||(b.top="100%",x.top="100%",b.marginTop=-21,x.marginTop=-20)),(0,Y.jsx)(ae,e({ref:t,className:[o,s].filter(Boolean).join(" "),colors:d,color:u,rectRender:r=>{var{key:t}=r,o=I(r,ie);return(0,Y.jsx)(se,e({},o,{rectProps:p}),t)}},h,{onChange:e=>c&&c(H(e)),style:e({width:200,borderRadius:4,background:"#fff",boxShadow:"rgb(0 0 0 / 15%) 0px 3px 12px",border:"1px solid rgba(0, 0, 0, 0.2)",position:"relative",padding:5},l),rectProps:{style:{marginRight:0,marginBottom:0,borderRadius:0,height:25,width:25}},addonBefore:(0,Y.jsxs)(z.Fragment,{children:[(0,Y.jsx)("div",{style:b}),(0,Y.jsx)("div",{style:x})]})}))}));pe.displayName="Github";const ce=pe;var he=e=>{var{className:r,color:t,left:o,top:a,prefixCls:s}=e,n={position:"absolute",top:a,left:o};return(0,z.useMemo)((()=>(0,Y.jsx)("div",{className:s+"-pointer "+(r||""),style:n,children:(0,Y.jsx)("div",{className:s+"-fill",style:{width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:t}})})),[a,o,t,r,s])},ge=["prefixCls","radius","pointer","className","style","hsva","onChange"],ue=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-saturation",radius:a=0,pointer:s,className:n,style:l,hsva:i,onChange:d}=r,p=I(r,ge),c=e({width:200,height:200,borderRadius:a},l,{position:"relative"}),h=(e,r)=>{d&&d({h:i.h,s:100*e.left,v:100*(1-e.top),a:i.a})},g={top:100-i.v+"%",left:i.s+"%",color:u(i)};return(0,Y.jsx)(Z,e({className:[o,n||""].filter(Boolean).join(" ")},p,{style:e({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+i.h+", 100%, 50%))"},c),ref:t,onMove:h,onDown:h,children:_().createElement(s||he,e({prefixCls:o},g))}))}));ue.displayName="Saturation";const fe=ue;var be=["prefixCls","className","hue","onChange","direction"],xe=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-hue",className:a,hue:s=0,onChange:n,direction:l="horizontal"}=r,i=I(r,be);return(0,Y.jsx)(re,e({ref:t,className:o+" "+(a||"")},i,{direction:l,background:"linear-gradient(to "+("horizontal"===l?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:s,s:100,v:100,a:s/360},onChange:(e,r)=>{n&&n({h:"horizontal"===l?360*r.left:360*r.top})}}))}));xe.displayName="Hue";const ve=xe;var ye=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur"],me=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-editable-input",placement:a="bottom",label:s,value:n,className:l,style:i,labelStyle:d,inputStyle:p,onChange:c,onBlur:h}=r,g=I(r,ye),[u,f]=(0,z.useState)(n),b=(0,z.useRef)(!1);(0,z.useEffect)((()=>{r.value!==u&&(b.current||f(r.value))}),[r.value]);var x={};return"bottom"===a&&(x.flexDirection="column"),"top"===a&&(x.flexDirection="column-reverse"),"left"===a&&(x.flexDirection="row-reverse"),(0,Y.jsxs)("div",{className:[o,l||""].filter(Boolean).join(" "),style:e({position:"relative",alignItems:"center",display:"flex",fontSize:11},x,i),children:[(0,Y.jsx)("input",e({ref:t,value:u,onChange:function(e,r){var t=r||e.target.value;/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(t)&&c&&c(e,t);var o=(e=>Number(String(e).replace(/%/g,"")))(t);isNaN(o)||c&&c(e,o),f(t)},onBlur:function(e){b.current=!1,f(r.value),h&&h(e)},autoComplete:"off",onFocus:()=>b.current=!0},g,{style:e({width:"100%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,fontSize:11,boxSizing:"border-box",border:"none",boxShadow:"rgb(204 204 204) 0px 0px 0px 1px inset"},p)})),s&&(0,Y.jsx)("span",{style:e({color:"rgb(153, 153, 153)",textTransform:"capitalize"},d),children:s})]})}));me.displayName="EditableInput";const Ce=me;var we=["prefixCls","hsva","placement","rProps","gProps","bProps","aProps","className","style","onChange"],je=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-editable-input-rgba",hsva:a,placement:s="bottom",rProps:n={},gProps:l={},bProps:i={},aProps:d={},className:c,style:h,onChange:g}=r,u=I(r,we),f=a?P(a):{};function b(e){var r=Number(e.target.value);r&&r>255&&(e.target.value="255"),r&&r<0&&(e.target.value="0")}var x=(r,t,o)=>{"number"===typeof r&&("a"===t&&(r<0&&(r=0),r>100&&(r=100),g&&g(H(p(e({},f,{a:r/100}))))),r>255&&(r=255,o.target.value="255"),r<0&&(r=0,o.target.value="0"),"r"===t&&g&&g(H(p(e({},f,{r:r})))),"g"===t&&g&&g(H(p(e({},f,{g:r})))),"b"===t&&g&&g(H(p(e({},f,{b:r})))))};return(0,Y.jsxs)("div",e({ref:t,className:[o,c||""].filter(Boolean).join(" ")},u,{style:e({fontSize:11,display:"flex"},h),children:[(0,Y.jsx)(Ce,e({label:"R",value:f.r||0,onBlur:b,placement:s,onChange:(e,r)=>x(r,"r",e)},n,{style:e({},n.style)})),(0,Y.jsx)(Ce,e({label:"G",value:f.g||0,onBlur:b,placement:s,onChange:(e,r)=>x(r,"g",e)},l,{style:e({marginLeft:5},n.style)})),(0,Y.jsx)(Ce,e({label:"B",value:f.b||0,onBlur:b,placement:s,onChange:(e,r)=>x(r,"b",e)},i,{style:e({marginLeft:5},i.style)})),d&&(0,Y.jsx)(Ce,e({label:"A",value:f.a?parseInt(String(100*f.a),10):0,onBlur:b,placement:s,onChange:(e,r)=>x(r,"a",e)},d,{style:e({marginLeft:5},d.style)}))]}))}));je.displayName="EditableInputRGBA";const Se=je;var Re=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],Ne=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-editable-input-hsla",hsva:a,hProps:s={},sProps:n={},lProps:l={},aProps:i={},className:d,onChange:p}=r,c=I(r,Re),h=a?y(a):{h:0,s:0,l:0,a:0},g=(r,t,o)=>{"number"===typeof r&&("h"===t&&(r<0&&(r=0),r>360&&(r=360),p&&p(H(v(e({},h,{h:r}))))),"s"===t&&(r<0&&(r=0),r>100&&(r=100),p&&p(H(v(e({},h,{s:r}))))),"l"===t&&(r<0&&(r=0),r>100&&(r=100),p&&p(H(v(e({},h,{l:r}))))),"a"===t&&(r<0&&(r=0),r>1&&(r=1),p&&p(H(v(e({},h,{a:r}))))))};return(0,Y.jsx)(Se,e({ref:t,hsva:a,rProps:e({label:"H",value:Math.round(h.h)},s,{onChange:(e,r)=>g(r,"h")}),gProps:e({label:"S",value:Math.round(h.s)+"%"},n,{onChange:(e,r)=>g(r,"s")}),bProps:e({label:"L",value:Math.round(h.l)+"%"},l,{onChange:(e,r)=>g(r,"l")}),aProps:e({label:"A",value:Math.round(100*h.a)/100},i,{onChange:(e,r)=>g(r,"a")}),className:[o,d||""].filter(Boolean).join(" ")},c))}));Ne.displayName="EditableInputHSLA";const Be=Ne;var ke=["style"];function Ae(r){var{style:t}=r,o=I(r,ke),a=(0,z.useRef)(null),s=(0,z.useCallback)((e=>{a.current.style.backgroundColor="#e8e8e8"}),[]),n=(0,z.useCallback)((e=>{a.current.style.backgroundColor="transparent"}),[]);return(0,Y.jsx)("div",e({ref:a,style:e({marginLeft:5,cursor:"pointer",transition:"background-color .3s",borderRadius:2},t)},o,{onMouseEnter:s,onMouseLeave:n,children:(0,Y.jsx)("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",style:{display:"block"},children:(0,Y.jsx)("path",{d:"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z",fill:"#333"})})}))}var Pe,Te=["prefixCls","className","style","color","inputType","rectProps","onChange"];!function(e){e.HEXA="hexa",e.RGBA="rgba",e.HSLA="hsla"}(Pe||(Pe={}));var Ee=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-chrome",className:a,color:s,inputType:l=Pe.RGBA,rectProps:i={},onChange:d}=r,p=I(r,Te),c="string"===typeof s&&n(s)?k(s):s||{h:0,s:0,l:0,a:0},h=e=>d&&d(H(e)),[g,u]=(0,z.useState)(l),f={paddingTop:6},b={textAlign:"center",paddingTop:4,paddingBottom:4};return(0,Y.jsx)(ce,e({ref:t,color:c,style:{borderRadius:0,flexDirection:"column",width:230,padding:0},colors:void 0,className:[o,a].filter(Boolean).join(" "),placement:ne.TopLeft},p,{addonAfter:(0,Y.jsxs)(z.Fragment,{children:[(0,Y.jsx)(fe,{hsva:c,style:{width:"100%",height:130},onChange:r=>{h(e({},c,r,{a:c.a}))}}),(0,Y.jsxs)("div",{style:{padding:15,display:"flex",alignItems:"center"},children:[(0,Y.jsx)(re,{width:24,height:24,hsva:c,radius:2,style:{marginRight:15,borderRadius:"50%"},bgProps:{style:{background:"transparent"}},innerProps:{style:{borderRadius:"50%",background:E(c),boxShadow:"rgb(0 0 0 / 25%) 0px 0px 1px inset"}},pointer:()=>(0,Y.jsx)(z.Fragment,{})}),(0,Y.jsxs)("div",{style:{flex:1},children:[(0,Y.jsx)(ve,{hue:c.h,style:{width:"100%"},bgProps:{style:{borderRadius:2}},onChange:r=>{h(e({},c,r))}}),(0,Y.jsx)(re,{hsva:c,style:{marginTop:10},bgProps:{style:{borderRadius:2}},onChange:r=>{h(e({},c,r))}})]})]}),(0,Y.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",padding:"0 15px 15px 15px",userSelect:"none"},children:[(0,Y.jsxs)("div",{style:{flex:1},children:[g==Pe.RGBA&&(0,Y.jsx)(Se,{hsva:c,rProps:{labelStyle:f,inputStyle:b},gProps:{labelStyle:f,inputStyle:b},bProps:{labelStyle:f,inputStyle:b},aProps:{labelStyle:f,inputStyle:b},onChange:e=>h(e.hsva)}),g===Pe.HEXA&&(0,Y.jsx)(Ce,{label:"HEX",labelStyle:f,inputStyle:b,value:c.a>0&&c.a<1?M(c).toLocaleUpperCase():D(c).toLocaleUpperCase(),onChange:(e,r)=>{"string"===typeof r&&h(k(/^#/.test(r)?r:"#"+r))}}),g===Pe.HSLA&&(0,Y.jsx)(Be,{hsva:c,hProps:{labelStyle:f,inputStyle:b},sProps:{labelStyle:f,inputStyle:b},lProps:{labelStyle:f,inputStyle:b},aProps:{labelStyle:f,inputStyle:b},onChange:e=>h(e.hsva)})]}),(0,Y.jsx)(Ae,{onClick:()=>{g===Pe.RGBA&&u(Pe.HSLA),g===Pe.HSLA&&u(Pe.HEXA),g===Pe.HEXA&&u(Pe.RGBA)}})]})]}),rectRender:e=>{var{key:r}=e;return(0,Y.jsx)(z.Fragment,{},r)}}))}));Ee.displayName="Chrome";const Le=Ee;var Fe=["prefixCls","className","style","color","colors","onChange"],De=["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],Me=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-block",className:a,style:s,color:i,colors:d=De,onChange:p}=r,c=I(r,Fe),h="string"===typeof i&&n(i)?k(i):i,g=i?D(h):"",u=(e,r)=>{"string"===typeof e&&n(e)&&/(3|6)/.test(String(e.length))&&p&&p(H(k(e)))};return(0,Y.jsxs)("div",e({ref:t,className:[o,a].filter(Boolean).join(" "),style:e({width:170,borderRadius:6,background:"rgb(255, 255, 255)",boxShadow:"rgb(0 0 0 / 10%) 0 1px",position:"relative"},s)},c,{children:[(0,Y.jsx)("div",{style:{width:0,height:0,borderStyle:"solid",borderWidth:"0 10px 10px",borderColor:"transparent transparent "+g,position:"absolute",top:-10,left:"50%",marginLeft:-10}}),(0,Y.jsx)("div",{title:g,style:{backgroundColor:""+g,color:l(g),height:110,fontSize:18,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center"},children:g.toLocaleUpperCase()}),(0,Y.jsx)(ae,{colors:d,color:g,style:{paddingLeft:10,paddingTop:10},rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:4,height:22,width:22}},onChange:e=>{p&&p(H(e))}}),(0,Y.jsx)(Ce,{value:g.toLocaleUpperCase(),onChange:(e,r)=>u(r),onBlur:e=>{var r=e.target.value;e.target.value=r.slice(0,6),u(r.slice(0,6))},inputStyle:{height:22,outline:0,borderRadius:3,color:"#666",padding:"0 7px"},style:{padding:10,paddingTop:0,borderRadius:"0 0 6px 6px"}})]}))}));Me.displayName="Block";const Oe=Me;var He=["prefixCls","className","style","onChange","color","colors"],Ie=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];function ze(e){return e.checked?(0,Y.jsx)("div",{style:{height:5,width:5,borderRadius:"50%",backgroundColor:l(e.color)}}):null}var _e=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-compact",className:a,style:s,onChange:l,color:i,colors:d=Ie}=r,p=I(r,He),c="string"===typeof i&&n(i)?k(i):i,h=i?D(c).replace(/^#/,""):"",g=(0,z.useCallback)((e=>l&&l(H(e))),[]),u={style:{alignItems:"baseline"},inputStyle:{boxShadow:"none",backgroundColor:"transparent",outline:0}};return(0,Y.jsxs)("div",e({ref:t,style:e({background:"#f6f6f6",borderRadius:3,display:"flex",width:240,flexWrap:"wrap",paddingTop:5,paddingLeft:5},s),className:[o,a||""].filter(Boolean).join(" ")},p,{children:[(0,Y.jsx)(ae,{colors:d,color:i?D(c):void 0,rectProps:{children:(0,Y.jsx)(ze,{}),style:{display:"flex",alignItems:"center",justifyContent:"center"}},onChange:e=>g(e)}),(0,Y.jsxs)("div",{style:{display:"flex",margin:"0 4px 3px 0"},children:[(0,Y.jsx)(Ce,{onChange:(e,r)=>{var t;"string"===typeof(t=r)&&n(t)&&/(3|6)/.test(String(t.length))&&g(k(t))},labelStyle:{paddingRight:5,marginTop:-1},value:h.toLocaleUpperCase(),label:(0,Y.jsx)("div",{style:{width:8,height:8,backgroundColor:"#"+h}}),inputStyle:{outline:"none",boxShadow:"initial",background:"transparent"},style:{flexDirection:"row-reverse",flex:"1 1 0%",minWidth:80}}),(0,Y.jsx)(Se,{hsva:c,placement:"left",onChange:e=>g(e.hsva),aProps:!1,rProps:u,gProps:u,bProps:u})]})]}))}));_e.displayName="Compact";const We=_e;var Ge=["style","color"],Ue=["prefixCls","className","onChange","color","style"],qe=r=>{var{style:t,color:o}=r,a=I(r,Ge);return(0,Y.jsx)("div",e({},a,{style:e({height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+K+")",backgroundColor:"#fff",border:"2px solid #fff",zIndex:1},t),children:(0,Y.jsx)("div",{style:{backgroundColor:o,borderRadius:"50%",height:" 100%",width:"100%"}})}))},Xe=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-colorful",className:a,onChange:s,color:l,style:i}=r,d=I(r,Ue),p="string"===typeof l&&n(l)?k(l):l||{},c=e=>s&&s(H(e));return(0,Y.jsxs)("div",e({ref:t,style:e({width:200,position:"relative"},i)},d,{className:o+" "+(a||""),children:[(0,Y.jsx)(fe,{hsva:p,className:o,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:e=>{var{left:r,top:t,color:o}=e;return(0,Y.jsx)(qe,{style:{left:r,top:t,transform:"translate(-16px, -16px)"},color:D(p)})},onChange:r=>c(e({},p,r))}),(0,Y.jsx)(ve,{hue:p.h,height:24,className:o,onChange:r=>c(e({},p,r)),pointer:e=>{var{left:r}=e;return(0,Y.jsx)(qe,{style:{left:r},color:"hsl("+(p.h||0)+"deg 100% 50%)"})}}),(0,Y.jsx)(re,{hsva:p,height:24,className:o,radius:"0 0 8px 8px",pointer:e=>{var{left:r}=e;return(0,Y.jsx)(qe,{style:{left:r},color:E(p)})},onChange:r=>c(e({},p,r))})]}))}));Xe.displayName="Colorful";const Ye=Xe;function Ve(r){var{style:t,title:o,checked:a,color:s,onClick:n,rectProps:l}=r,i=(0,z.useRef)(null),d=(0,z.useCallback)((e=>{i.current.style.transform="scale(1.2)"}),[]),p=(0,z.useCallback)((e=>{i.current.style.transform="scale(1)"}),[]);return(0,Y.jsx)("div",{ref:i,onClick:n,onMouseEnter:d,onMouseLeave:p,title:o,style:e({},t,{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:3,borderRadius:"50%",marginRight:12,marginBottom:12,boxSizing:"border-box",transform:"scale(1)",boxShadow:s+" 0px 0px "+(a?5:0)+"px",transition:"transform 100ms ease 0s, box-shadow 100ms ease 0s"}),children:(0,Y.jsx)("div",e({},l,{style:e({height:a?"100%":0,width:a?"100%":0,borderRadius:"50%",backgroundColor:"#fff",boxSizing:"border-box",transition:"height 100ms ease 0s, width 100ms ease 0s"},l.style)}))})}var Qe=["prefixCls","className","color","colors","rectProps","onChange"],Ze=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-circle",className:a,color:s,colors:l=[],rectProps:i={},onChange:d}=r,p=I(r,Qe),c="string"===typeof s&&n(s)?k(s):s||{},h=s?D(c):"";return(0,Y.jsx)(ae,e({ref:t,colors:l,color:h},p,{className:[o,a].filter(Boolean).join(" "),rectRender:r=>{var t=e({},r);return(0,Y.jsx)(Ve,e({},t,{rectProps:i}))},onChange:e=>{d&&d(H(e))}}))}));Ze.displayName="Circle";const $e=Ze;var Je=["prefixCls","className","style","color","onChange"],Ke={boxShadow:"initial",borderWidth:"0 0 1px 0",borderBottomColor:"#eee",borderBottomStyle:"solid",height:30,outline:0,fontSize:15,padding:0},er=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-material",className:a,style:s,color:l,onChange:i}=r,d=I(r,Je),p="string"===typeof l&&n(l)?k(l):l,c=l?D(p).replace(/^#/,""):"",h=(e,r)=>{"string"===typeof e&&n(e)&&/(3|6)/.test(String(e.length))&&i&&i(H(k(e)))};return(0,Y.jsxs)("div",e({ref:t,className:[o,a||""].filter(Boolean).join(" "),style:e({padding:16,width:98,fontFamily:"Roboto",backgroundColor:"#fff"},s)},d,{children:[(0,Y.jsx)(Ce,{label:"Hex",value:c.toLocaleUpperCase(),onChange:(e,r)=>h(r),onBlur:e=>{var r=e.target.value;e.target.value=r.slice(0,6),h(r.slice(0,6))},inputStyle:{outline:0,border:0,height:30,fontSize:15,padding:0,boxShadow:"initial",borderWidth:"0 0 2px 0",borderBottomColor:c?"#"+c:"#eee",borderBottomStyle:"solid"},style:{flexDirection:"column-reverse",alignItems:"flex-start"}}),(0,Y.jsx)(Se,{hsva:p,placement:"top",style:{marginTop:11},rProps:{style:{alignItems:"flex-start"},inputStyle:e({},Ke)},gProps:{style:{alignItems:"flex-start"},inputStyle:e({},Ke)},bProps:{style:{alignItems:"flex-start"},inputStyle:e({},Ke)},aProps:!1,onChange:e=>{return r=e.hsva,void(i&&i(H(r)));var r}})]}))}));er.displayName="Material";const rr=er;var tr=["prefixCls","className","onChange","direction","hsva"],or=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-saturation",className:a,onChange:s,direction:n="horizontal",hsva:l}=r,i=I(r,tr),d=u(Object.assign({},l,{a:1,s:100,v:100}));return(0,Y.jsx)(re,e({ref:t},i,{className:o+" "+(a||""),hsva:{h:l.h,s:100,v:l.v,a:1-l.v/100},direction:n,background:"linear-gradient(to "+("horizontal"===n?"right":"bottom")+", "+d+", rgb(0, 0, 0))",onChange:(e,r)=>{s&&s({v:"horizontal"===n?100-100*r.left:100-100*r.top,s:100})}}))}));or.displayName="ShadeSlider";const ar=or;var sr=["prefixCls","className","style","onChange","color","lightness"],nr=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-slider",className:a,style:s,onChange:l,color:i,lightness:d=[80,65,50,35,20]}=r,p=I(r,sr),h="string"===typeof i&&n(i)?k(i):i||{};return(0,Y.jsx)("div",e({ref:t,style:e({display:"flex"},s),className:[o,a||""].filter(Boolean).join(" ")},p,{children:d.map(((r,t)=>{var o="hsl("+y(h).h+", 50%, "+r+"%)",a=o===c(h);return(0,Y.jsx)("div",{style:{paddingLeft:1,width:100/d.length+"%",boxSizing:"border-box"},children:(0,Y.jsx)("div",{onClick:e=>((e,r)=>{l&&l(H(x(e)),r)})(o,e),style:e({backgroundColor:o,height:12,cursor:"pointer"},a?{borderRadius:2,transform:"scale(1, 1.5)"}:{})})},t)}))}))}));nr.displayName="Slider";const lr=nr;var ir=["prefixCls","className","onChange","width","presetColors","color","editableDisable","style"],dr=["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],pr=e=>(0,Y.jsx)("div",{style:{boxShadow:"rgb(0 0 0 / 60%) 0px 0px 2px",width:4,top:1,bottom:1,left:e.left,borderRadius:1,position:"absolute",backgroundColor:"#fff"}}),cr=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-sketch",className:a,onChange:s,width:l=218,presetColors:i=dr,color:d,editableDisable:p=!0,style:c}=r,h=I(r,ir),[g,u]=(0,z.useState)({h:209,s:36,v:90,a:1});(0,z.useEffect)((()=>{"string"===typeof d&&n(d)&&u(k(d)),"object"===typeof d&&u(d)}),[d]);var f=(0,z.useCallback)((e=>{u(e),s&&s(H(e))}),[g]);return(0,Y.jsxs)("div",e({},h,{className:o+" "+(a||""),ref:t,style:e({background:"rgb(255, 255, 255)",borderRadius:4,boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px",width:l},c),children:[(0,Y.jsxs)("div",{style:{padding:"10px 10px 8px"},children:[(0,Y.jsx)(fe,{hsva:g,style:{width:"auto",height:150},onChange:r=>f(e({},g,r,{a:g.a}))}),(0,Y.jsxs)("div",{style:{display:"flex",marginTop:4},children:[(0,Y.jsxs)("div",{style:{flex:1},children:[(0,Y.jsx)(ve,{width:"auto",height:10,hue:g.h,pointer:pr,innerProps:{style:{marginLeft:1,marginRight:5}},onChange:r=>f(e({},g,r))}),(0,Y.jsx)(re,{width:"auto",height:10,hsva:g,pointer:pr,style:{marginTop:4},innerProps:{style:{marginLeft:1,marginRight:5}},onChange:r=>{f(e({},g,{a:r.a}))}})]}),(0,Y.jsx)(re,{width:24,height:24,hsva:g,radius:2,style:{marginLeft:4},bgProps:{style:{background:"transparent"}},innerProps:{style:{borderRadius:2,background:E(g),boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset, rgb(0 0 0 / 25%) 0px 0px 4px inset"}},pointer:()=>(0,Y.jsx)(z.Fragment,{})})]})]}),p&&(0,Y.jsxs)("div",{style:{display:"flex",margin:"0 10px 3px 10px"},children:[(0,Y.jsx)(Ce,{label:"Hex",value:D(g).replace(/^#/,"").toLocaleUpperCase(),onChange:(e,r)=>{var t;"string"===typeof(t=r)&&n(t)&&/(3|6)/.test(String(t.length))&&f(k(t))},style:{minWidth:58}}),(0,Y.jsx)(Se,{hsva:g,style:{marginLeft:6},onChange:e=>f(e.hsva)})]}),i&&i.length>0&&(0,Y.jsx)(ae,{style:{borderTop:"1px solid rgb(238, 238, 238)",paddingTop:10,paddingLeft:10},colors:i,color:D(g),onChange:e=>f(e),rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:3,boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset"}}})]}))}));cr.displayName="Sketch";const hr=cr;var gr=r=>{var{className:t,color:o,left:a,top:s,style:n,prefixCls:l}=r,i=e({},n,{position:"absolute",top:s,left:a});return(0,z.useMemo)((()=>(0,Y.jsx)("div",{className:l+"-pointer "+(t||""),style:i,children:(0,Y.jsx)("div",{className:l+"-fill",style:{width:10,height:10,transform:"translate(-5px, -5px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:"#fff"},children:(0,Y.jsx)("div",{style:{inset:0,borderRadius:"50%",position:"absolute",backgroundColor:o}})})})),[s,a,o,t,l])},ur=2*Math.PI,fr=(e,r)=>Math.sqrt(e*e+r*r);function br(e){var{width:r=0}=e,t=r/2;return{width:r,radius:t,cx:t,cy:t}}function xr(e){var{width:r=0}=e;return r/2}function vr(e,r,t){var o,a=e.angle||0,s=e.direction;return t&&"clockwise"===s?r=a+r:"clockwise"===s?r=360-a+r:t&&"anticlockwise"===s?r=a+180-r:"anticlockwise"===s&&(r=a-r),(r%(o=360)+o)%o}var yr=["prefixCls","radius","pointer","className","style","width","height","direction","angle","color","onChange"],mr=_().forwardRef(((r,t)=>{var{prefixCls:o="w-color-wheel",radius:a=0,pointer:s,className:l,style:i,width:d=200,height:p=200,direction:c="anticlockwise",angle:h=180,color:g,onChange:u}=r,f=I(r,yr),b="string"===typeof g&&n(g)?k(g):g||{},x=g?D(b):"",v=function(e,r){var{cx:t,cy:o}=br(e),a=xr(e),s=(180+vr(e,r.h,!0))*(ur/360),n=r.s/100*a,l="clockwise"===e.direction?-1:1;return{x:t+n*Math.cos(s)*l,y:o+n*Math.sin(s)*l}}({width:d},b),y={top:"0",left:"0",color:x},m=(e,r)=>{var t=function(e,r,t){var{cx:o,cy:a}=br(e),s=xr(e);r=o-r,t=a-t;var n=vr(e,Math.atan2(-t,-r)*(360/ur)),l=Math.min(fr(r,t),s);return{h:Math.round(n),s:Math.round(100/s*l)}}({width:d},d-e.x,p-e.y),o={h:t.h,s:t.s,v:b.v,a:b.a};u&&u(H(o))};return(0,Y.jsxs)(Z,e({className:[o,l||""].filter(Boolean).join(" ")},f,{style:e({},i,{position:"relative",width:d,height:p}),ref:t,onMove:m,onDown:m,children:[_().createElement(s||gr,e({prefixCls:o,style:{zIndex:1,transform:"translate("+v.x+"px, "+v.y+"px)"}},y)),(0,Y.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"anticlockwise"===c?"conic-gradient(red, yellow, lime, aqua, blue, magenta, red)":"conic-gradient(red, magenta, blue, aqua, lime, yellow, red)",transform:"rotateZ("+(h+90)+"deg)",inset:0}}),(0,Y.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"radial-gradient(circle closest-side, #fff, transparent)",inset:0}}),(0,Y.jsx)("div",{style:{backgroundColor:"#000",borderRadius:"50%",position:"absolute",inset:0,opacity:"number"===typeof b.v?1-b.v/100:0}})]}))}));mr.displayName="Wheel";const Cr=mr})(),a})()})); | ||
!function(e,r){"object"===typeof exports&&"object"===typeof module?module.exports=r(require("react")):"function"===typeof define&&define.amd?define(["react"],r):"object"===typeof exports?exports["@uiw/react-color"]=r(require("react")):e["@uiw/react-color"]=r(e.React)}(self,(e=>(()=>{"use strict";var r={382:e=>{var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(a){return!1}}()?Object.assign:function(e,n){for(var s,l,i=a(e),p=1;p<arguments.length;p++){for(var c in s=Object(arguments[p]))t.call(s,c)&&(i[c]=s[c]);if(r){l=r(s);for(var d=0;d<l.length;d++)o.call(s,l[d])&&(i[l[d]]=s[l[d]])}}return i}},858:(e,r,t)=>{t(382);var o=t(787),a=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var n=Symbol.for;a=n("react.element"),n("react.fragment")}var s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,t){var o,n={},p=null,c=null;for(o in void 0!==t&&(p=""+t),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(c=r.ref),r)l.call(r,o)&&!i.hasOwnProperty(o)&&(n[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===n[o]&&(n[o]=r[o]);return{$$typeof:a,type:e,key:p,ref:c,props:n,_owner:s.current}}r.jsx=p,r.jsxs=p},664:(e,r,t)=>{e.exports=t(858)},787:r=>{r.exports=e}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{function e(){return e=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},e.apply(this,arguments)}o.r(a),o.d(a,{Alpha:()=>te,BACKGROUND_IMG:()=>ee,Block:()=>Qe,Chrome:()=>Ue,ChromeInputType:()=>_e,Circle:()=>hr,Colorful:()=>ir,Compact:()=>rr,EditableInput:()=>Pe,EditableInputHSLA:()=>He,EditableInputRGBA:()=>Le,Github:()=>ve,GithubPlacement:()=>ue,Hue:()=>Re,Material:()=>xr,Saturation:()=>je,ShadeSlider:()=>jr,Sketch:()=>Tr,Slider:()=>Rr,Swatch:()=>ce,Wheel:()=>Wr,color:()=>H,equalColorObjects:()=>r,equalColorString:()=>t,equalHex:()=>n,getContrastingColor:()=>l,hexToHsva:()=>N,hexToRgba:()=>B,hslStringToHsla:()=>g,hslStringToHsva:()=>v,hslaStringToHsva:()=>b,hslaToHsl:()=>L,hslaToHsva:()=>x,hsvStringToHsva:()=>w,hsvaStringToHsva:()=>m,hsvaToHex:()=>F,hsvaToHexa:()=>D,hsvaToHslString:()=>d,hsvaToHsla:()=>y,hsvaToHslaString:()=>f,hsvaToHsv:()=>M,hsvaToHsvString:()=>u,hsvaToHsvaString:()=>h,hsvaToRgbString:()=>A,hsvaToRgba:()=>P,hsvaToRgbaString:()=>T,parseHue:()=>j,rgbStringToHsva:()=>S,rgbaStringToHsva:()=>O,rgbaToHex:()=>R,rgbaToHexa:()=>k,rgbaToHsva:()=>c,rgbaToRgb:()=>E,validHex:()=>s});var r=(e,r)=>{if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},t=(e,r)=>e.replace(/\s/g,"")===r.replace(/\s/g,""),n=(e,t)=>e.toLowerCase()===t.toLowerCase()||r(B(e),B(t)),s=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),l=e=>{if(!e)return"#fff";var r=H(e);return(299*r.rgb.r+587*r.rgb.g+114*r.rgb.b)/1e3>=128?"#000":"#fff"},i=255,p=100,c=e=>{var{r:r,g:t,b:o,a:a}=e,n=Math.max(r,t,o),s=n-Math.min(r,t,o),l=s?n===r?(t-o)/s:n===t?2+(o-r)/s:4+(r-t)/s:0;return{h:60*(l<0?l+6:l),s:n?s/n*p:0,v:n/i*p,a:a}},d=e=>{var{h:r,s:t,l:o}=y(e);return"hsl("+r+", "+Math.round(t)+"%, "+Math.round(o)+"%)"},u=e=>{var{h:r,s:t,v:o}=e;return"hsv("+r+", "+t+"%, "+o+"%)"},h=e=>{var{h:r,s:t,v:o,a:a}=e;return"hsva("+r+", "+t+"%, "+o+"%, "+a+")"},f=e=>{var{h:r,s:t,l:o,a:a}=y(e);return"hsla("+r+", "+t+"%, "+o+"%, "+a+")"},g=e=>{var[r,t,o,a]=(e.match(/\d+/g)||[]).map(Number);return{h:r,s:t,l:o,a:a}},b=e=>{var r=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?x({h:j(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},v=b,x=e=>{var{h:r,s:t,l:o,a:a}=e;return{h:r,s:(t*=(o<50?o:p-o)/p)>0?2*t/(o+t)*p:0,v:o+t,a:a}},y=e=>{var{h:r,s:t,v:o,a:a}=e,n=(200-t)*o/p;return{h:r,s:n>0&&n<200?t*o/p/(n<=p?n:200-n)*p:0,l:n/2,a:a}},m=e=>{var r=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?{h:j(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?p:1)}:{h:0,s:0,v:0,a:1}},C={grad:.9,turn:360,rad:360/(2*Math.PI)},j=function(e,r){return void 0===r&&(r="deg"),Number(e)*(C[r]||1)},w=m,O=e=>{var r=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?c({r:Number(r[1])/(r[2]?p/i:1),g:Number(r[3])/(r[4]?p/i:1),b:Number(r[5])/(r[6]?p/i:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?p:1)}):{h:0,s:0,v:0,a:1}},S=O,R=e=>{var r,{r:t,g:o,b:a}=e;return"#"+(r=(t<<16|o<<8|a).toString(16),new Array(7-r.length).join("0")+r)},k=e=>{var{r:r,g:t,b:o,a:a}=e,n="number"===typeof a&&(255*a|256).toString(16).slice(1);return""+R({r:r,g:t,b:o,a:a})+(n||"")},N=e=>c(B(e)),B=e=>{var r=e.replace("#","");/^#?/.test(e)&&3===r.length&&(e="#"+r.charAt(0)+r.charAt(0)+r.charAt(1)+r.charAt(1)+r.charAt(2)+r.charAt(2));var t=new RegExp("[A-Za-z0-9]{2}","g"),[o,a,n=0,s]=e.match(t).map((e=>parseInt(e,16)));return{r:o,g:a,b:n,a:s?s/i:1}},P=r=>{var{h:t,s:o,v:a,a:n}=r,s=t/60,l=o/p,c=a/p,d=Math.floor(s)%6,u=s-Math.floor(s),h=i*c*(1-l),f=i*c*(1-l*u),g=i*c*(1-l*(1-u));c*=i;var b={};switch(d){case 0:b.r=c,b.g=g,b.b=h;break;case 1:b.r=f,b.g=c,b.b=h;break;case 2:b.r=h,b.g=c,b.b=g;break;case 3:b.r=h,b.g=f,b.b=c;break;case 4:b.r=g,b.g=h,b.b=c;break;case 5:b.r=c,b.g=h,b.b=f}return b.r=Math.round(b.r),b.g=Math.round(b.g),b.b=Math.round(b.b),e({},b,{a:n})},A=e=>{var{r:r,g:t,b:o}=P(e);return"rgb("+r+", "+t+", "+o+")"},T=e=>{var{r:r,g:t,b:o,a:a}=P(e);return"rgba("+r+", "+t+", "+o+", "+a+")"},E=e=>{var{r:r,g:t,b:o}=e;return{r:r,g:t,b:o}},L=e=>{var{h:r,s:t,l:o}=e;return{h:r,s:t,l:o}},F=e=>R(P(e)),D=e=>k(P(e)),M=e=>{var{h:r,s:t,v:o}=e;return{h:r,s:t,v:o}},H=e=>{var r,t,o,a,n,l,i,p;return"string"===typeof e&&s(e)?(l=N(e),i=e):"string"!==typeof e&&(l=e),l&&(o=M(l),n=y(l),a=P(l),p=k(a),i=F(l),t=L(n),r=E(a)),{rgb:r,hsl:t,hsv:o,rgba:a,hsla:n,hsva:l,hex:i,hexa:p}};function I(){return I=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},I.apply(this,arguments)}var z=o(787),_=o.n(z);function W(){return W=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},W.apply(this,arguments)}function G(e){var r=(0,z.useRef)(e);return(0,z.useEffect)((()=>{r.current=e})),(0,z.useCallback)(((e,t)=>r.current&&r.current(e,t)),[])}var U=e=>"touches"in e,q=e=>{!U(e)&&e.preventDefault&&e.preventDefault()},X=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},Y=(e,r)=>{var t=e.getBoundingClientRect(),o=U(r)?r.touches[0]:r;return{left:X((o.pageX-(t.left+window.pageXOffset))/t.width),top:X((o.pageY-(t.top+window.pageYOffset))/t.height),width:t.width,height:t.height,x:o.pageX-(t.left+window.pageXOffset),y:o.pageY-(t.top+window.pageYOffset)}},V=o(664),Q=["prefixCls","className","onMove","onDown"],Z=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-interactive",className:o,onMove:a,onDown:n}=e,s=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Q),l=(0,z.useRef)(null),i=(0,z.useRef)(!1),[p,c]=(0,z.useState)(!1),d=G(a),u=G(n),h=(0,z.useCallback)((e=>{q(e),(U(e)?e.touches.length>0:e.buttons>0)&&l.current?d&&d(Y(l.current,e),e):c(!1)}),[d]),f=(0,z.useCallback)((()=>c(!1)),[]),g=(0,z.useCallback)((e=>{var r=e?window.addEventListener:window.removeEventListener;r(i.current?"touchmove":"mousemove",h),r(i.current?"touchend":"mouseup",f)}),[]);(0,z.useEffect)((()=>(g(p),()=>{p&&g(!1)})),[p,g]);var b=(0,z.useCallback)((e=>{q(e.nativeEvent),(e=>!(i.current&&!U(e))&&(i.current=U(e),!0))(e.nativeEvent)&&(u&&u(Y(l.current,e.nativeEvent),e.nativeEvent),c(!0))}),[u]);return(0,V.jsx)("div",W({},s,{className:[t,o||""].filter(Boolean).join(" "),style:W({},s.style,{touchAction:"none"}),ref:l,tabIndex:0,onMouseDown:b,onTouchStart:b}))}));Z.displayName="Interactive";const $=Z;var J=e=>{var{className:r,prefixCls:t,left:o,top:a}=e,n={position:"absolute",left:o,top:a};return(0,z.useMemo)((()=>(0,V.jsx)("div",{className:t+"-pointer "+(r||""),style:n,children:(0,V.jsx)("div",{className:t+"-fill",style:{width:18,height:18,transform:o?"translate(-9px, -1px)":"translate(-1px, -9px)",boxShadow:"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:"50%",backgroundColor:"rgb(248, 248, 248)"}})})),[r,o,a,t])},K=["prefixCls","className","hsva","background","bgProps","innerProps","radius","width","height","direction","style","onChange","pointer"],ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==",re=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-alpha",className:o,hsva:a,background:n,bgProps:s={},innerProps:l={},radius:i=0,width:p,height:c=16,direction:d="horizontal",style:u,onChange:h,pointer:g}=e,b=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,K),v=(0,z.useCallback)((e=>{h&&h(I({},a,{a:"horizontal"===d?e.left:e.top}),e)}),[a]),x=f(Object.assign({},a,{a:1})),y="linear-gradient(to "+("horizontal"===d?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+x+" 100%)",m={};return"horizontal"===d?m.left=100*a.a+"%":m.top=100*a.a+"%",(0,V.jsxs)("div",I({},b,{className:[t,t+"-"+d,o||""].filter(Boolean).join(" "),style:I({borderRadius:i,background:"url("+ee+") left center",backgroundColor:"#fff"},u,{position:"relative"},{width:p,height:c}),ref:r,children:[(0,V.jsx)("div",I({},s,{style:I({inset:0,position:"absolute",background:n||y,borderRadius:i},s.style)})),(0,V.jsx)($,I({},l,{style:I({},l.style,{inset:0,zIndex:1,position:"absolute"}),onMove:v,onDown:v,children:_().createElement(g||J,I({prefixCls:t},m))}))]}))}));re.displayName="Aplha";const te=re;function oe(){return oe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},oe.apply(this,arguments)}function ae(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}function ne(){return ne=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ne.apply(this,arguments)}function se(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}function le(){return le=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},le.apply(this,arguments)}var ie=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],pe=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-swatch",className:o,color:a,colors:n=[],style:s,rectProps:l={},onChange:i,addonAfter:p,addonBefore:c,rectRender:d}=e,u=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,ie),h=le({background:"rgb(144, 19, 254)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},l.style),f=e=>{i&&i(N(e))};return(0,V.jsxs)("div",le({ref:r},u,{className:[t,o||""].filter(Boolean).join(" "),style:le({display:"flex",flexWrap:"wrap",position:"relative"},s),children:[c&&_().isValidElement(c)&&c,n&&Array.isArray(n)&&n.map(((e,r)=>{var t="",o="";"string"===typeof e&&(t=e,o=e),"object"===typeof e&&e.color&&(t=e.title||e.color,o=e.color);var n=a&&a.toLocaleLowerCase()===o.toLocaleLowerCase();if(d)return d({key:r,title:t,color:o,checked:!!n,style:le({},h,{background:o}),onClick:()=>f(o)});var s=l.children&&_().isValidElement(l.children)?_().cloneElement(l.children,{color:o,checked:n}):null;return(0,V.jsx)("div",le({tabIndex:0,title:t,onClick:()=>f(o)},l,{children:s,style:le({},h,{background:o})}),r)})),p&&_().isValidElement(p)&&p]}))}));pe.displayName="Swatch";const ce=pe;function de(e){var{style:r,title:t,checked:o,color:a,onClick:n,rectProps:s}=e,l=(0,z.useRef)(null),i=(0,z.useCallback)((()=>{l.current.style.zIndex="2",l.current.style.outline="#fff solid 2px",l.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"}),[]),p=(0,z.useCallback)((()=>{o||(l.current.style.zIndex="0",l.current.style.outline="initial",l.current.style.boxShadow="initial")}),[o]);return(0,V.jsx)("div",ne({ref:l,title:t},s,{onClick:n,onMouseEnter:i,onMouseLeave:p,style:ne({},r,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},o?{zIndex:1,outline:"#fff solid 2px",boxShadow:"rgb(0 0 0 / 25%) 0 0 5px 2px"}:{zIndex:0},s.style)}))}var ue,he=["prefixCls","placement","className","style","color","colors","rectProps","onChange"],fe=["key"],ge=["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"];!function(e){e.Left="L",e.LeftTop="LT",e.LeftBotton="LB",e.Right="R",e.RightTop="RT",e.RightBotton="RB",e.Top="T",e.TopRight="TR",e.TopLeft="TL",e.Botton="B",e.BottonLeft="BL",e.BottonRight="BR"}(ue||(ue={}));var be=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-github",placement:o=ue.TopRight,className:a,style:n,color:l,colors:i=ge,rectProps:p={},onChange:c}=e,d=se(e,he),u="string"===typeof l&&s(l)?N(l):l,h=l?F(u):"",f={borderStyle:"solid",position:"absolute"},g=ne({},f),b=ne({},f);return/^T/.test(o)&&(g.borderWidth="0 8px 8px",g.borderColor="transparent transparent rgba(0, 0, 0, 0.15)",b.borderWidth="0 7px 7px",b.borderColor="transparent transparent #fff"),o===ue.TopRight&&(g.top=-8,b.top=-7),o===ue.Top&&(g.top=-8,b.top=-7),o===ue.TopLeft&&(g.top=-8,b.top=-7),/^B/.test(o)&&(g.borderWidth="8px 8px 0 ",g.borderColor="rgba(0, 0, 0, 0.15) transparent transparent",b.borderWidth="7px 7px 0px",b.borderColor="#fff transparent transparent",o===ue.BottonRight&&(g.top="100%",b.top="100%"),o===ue.Botton&&(g.top="100%",b.top="100%"),o===ue.BottonLeft&&(g.top="100%",b.top="100%")),/^(B|T)/.test(o)&&(o!==ue.Top&&o!==ue.Botton||(g.left="50%",g.marginLeft=-8,b.left="50%",b.marginLeft=-7),o!==ue.TopRight&&o!==ue.BottonRight||(g.right=10,b.right=11),o!==ue.TopLeft&&o!==ue.BottonLeft||(g.left=7,b.left=8)),/^L/.test(o)&&(g.borderWidth="8px 8px 8px 0px",g.borderColor="transparent rgba(0, 0, 0, 0.15) transparent transparent",b.borderWidth="7px 7px 7px 0px",b.borderColor="transparent #fff transparent transparent",g.left=-8,b.left=-7),/^R/.test(o)&&(g.borderWidth="8px 0px 8px 8px",g.borderColor="transparent transparent transparent rgba(0, 0, 0, 0.15)",b.borderWidth="7px 0px 7px 7px",b.borderColor="transparent transparent transparent #fff",g.right=-8,b.right=-7),/^(L|R)/.test(o)&&(o!==ue.RightTop&&o!==ue.LeftTop||(g.top=5,b.top=6),o!==ue.Left&&o!==ue.Right||(g.top="50%",b.top="50%",g.marginTop=-8,b.marginTop=-7),o!==ue.LeftBotton&&o!==ue.RightBotton||(g.top="100%",b.top="100%",g.marginTop=-21,b.marginTop=-20)),(0,V.jsx)(ce,ne({ref:r,className:[t,a].filter(Boolean).join(" "),colors:i,color:h,rectRender:e=>{var{key:r}=e,t=se(e,fe);return(0,V.jsx)(de,ne({},t,{rectProps:p}),r)}},d,{onChange:e=>c&&c(H(e)),style:ne({width:200,borderRadius:4,background:"#fff",boxShadow:"rgb(0 0 0 / 15%) 0px 3px 12px",border:"1px solid rgba(0, 0, 0, 0.2)",position:"relative",padding:5},n),rectProps:{style:{marginRight:0,marginBottom:0,borderRadius:0,height:25,width:25}},addonBefore:(0,V.jsxs)(z.Fragment,{children:[(0,V.jsx)("div",{style:g}),(0,V.jsx)("div",{style:b})]})}))}));be.displayName="Github";const ve=be;function xe(){return xe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},xe.apply(this,arguments)}var ye=e=>{var{className:r,color:t,left:o,top:a,prefixCls:n}=e,s={position:"absolute",top:a,left:o};return(0,z.useMemo)((()=>(0,V.jsx)("div",{className:n+"-pointer "+(r||""),style:s,children:(0,V.jsx)("div",{className:n+"-fill",style:{width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:t}})})),[a,o,t,r,n])},me=["prefixCls","radius","pointer","className","style","hsva","onChange"],Ce=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-saturation",radius:o=0,pointer:a,className:n,style:s,hsva:l,onChange:i}=e,p=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,me),c=xe({width:200,height:200,borderRadius:o},s,{position:"relative"}),d=(e,r)=>{i&&i({h:l.h,s:100*e.left,v:100*(1-e.top),a:l.a})},u={top:100-l.v+"%",left:l.s+"%",color:f(l)};return(0,V.jsx)($,xe({className:[t,n||""].filter(Boolean).join(" ")},p,{style:xe({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+l.h+", 100%, 50%))"},c),ref:r,onMove:d,onDown:d,children:_().createElement(a||ye,xe({prefixCls:t},u))}))}));Ce.displayName="Saturation";const je=Ce;function we(){return we=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},we.apply(this,arguments)}var Oe=["prefixCls","className","hue","onChange","direction"],Se=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-hue",className:o,hue:a=0,onChange:n,direction:s="horizontal"}=e,l=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Oe);return(0,V.jsx)(te,we({ref:r,className:t+" "+(o||"")},l,{direction:s,background:"linear-gradient(to "+("horizontal"===s?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:a,s:100,v:100,a:a/360},onChange:(e,r)=>{n&&n({h:"horizontal"===s?360*r.left:360*r.top})}}))}));Se.displayName="Hue";const Re=Se;function ke(){return ke=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ke.apply(this,arguments)}var Ne=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur"],Be=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-editable-input",placement:o="bottom",label:a,value:n,className:s,style:l,labelStyle:i,inputStyle:p,onChange:c,onBlur:d}=e,u=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Ne),[h,f]=(0,z.useState)(n),g=(0,z.useRef)(!1);(0,z.useEffect)((()=>{e.value!==h&&(g.current||f(e.value))}),[e.value]);var b={};return"bottom"===o&&(b.flexDirection="column"),"top"===o&&(b.flexDirection="column-reverse"),"left"===o&&(b.flexDirection="row-reverse"),(0,V.jsxs)("div",{className:[t,s||""].filter(Boolean).join(" "),style:ke({position:"relative",alignItems:"center",display:"flex",fontSize:11},b,l),children:[(0,V.jsx)("input",ke({ref:r,value:h,onChange:function(e,r){var t=r||e.target.value;/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(t)&&c&&c(e,t);var o=(e=>Number(String(e).replace(/%/g,"")))(t);isNaN(o)||c&&c(e,o),f(t)},onBlur:function(r){g.current=!1,f(e.value),d&&d(r)},autoComplete:"off",onFocus:()=>g.current=!0},u,{style:ke({width:"100%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,fontSize:11,boxSizing:"border-box",border:"none",boxShadow:"rgb(204 204 204) 0px 0px 0px 1px inset"},p)})),a&&(0,V.jsx)("span",{style:ke({color:"rgb(153, 153, 153)",textTransform:"capitalize"},i),children:a})]})}));Be.displayName="EditableInput";const Pe=Be;function Ae(){return Ae=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ae.apply(this,arguments)}var Te=["prefixCls","hsva","placement","rProps","gProps","bProps","aProps","className","style","onChange"],Ee=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-editable-input-rgba",hsva:o,placement:a="bottom",rProps:n={},gProps:s={},bProps:l={},aProps:i={},className:p,style:d,onChange:u}=e,h=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Te),f=o?P(o):{};function g(e){var r=Number(e.target.value);r&&r>255&&(e.target.value="255"),r&&r<0&&(e.target.value="0")}var b=(e,r,t)=>{"number"===typeof e&&("a"===r&&(e<0&&(e=0),e>100&&(e=100),u&&u(H(c(Ae({},f,{a:e/100}))))),e>255&&(e=255,t.target.value="255"),e<0&&(e=0,t.target.value="0"),"r"===r&&u&&u(H(c(Ae({},f,{r:e})))),"g"===r&&u&&u(H(c(Ae({},f,{g:e})))),"b"===r&&u&&u(H(c(Ae({},f,{b:e})))))};return(0,V.jsxs)("div",Ae({ref:r,className:[t,p||""].filter(Boolean).join(" ")},h,{style:Ae({fontSize:11,display:"flex"},d),children:[(0,V.jsx)(Pe,Ae({label:"R",value:f.r||0,onBlur:g,placement:a,onChange:(e,r)=>b(r,"r",e)},n,{style:Ae({},n.style)})),(0,V.jsx)(Pe,Ae({label:"G",value:f.g||0,onBlur:g,placement:a,onChange:(e,r)=>b(r,"g",e)},s,{style:Ae({marginLeft:5},n.style)})),(0,V.jsx)(Pe,Ae({label:"B",value:f.b||0,onBlur:g,placement:a,onChange:(e,r)=>b(r,"b",e)},l,{style:Ae({marginLeft:5},l.style)})),i&&(0,V.jsx)(Pe,Ae({label:"A",value:f.a?parseInt(String(100*f.a),10):0,onBlur:g,placement:a,onChange:(e,r)=>b(r,"a",e)},i,{style:Ae({marginLeft:5},i.style)}))]}))}));Ee.displayName="EditableInputRGBA";const Le=Ee;function Fe(){return Fe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Fe.apply(this,arguments)}var De=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],Me=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-editable-input-hsla",hsva:o,hProps:a={},sProps:n={},lProps:s={},aProps:l={},className:i,onChange:p}=e,c=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,De),d=o?y(o):{h:0,s:0,l:0,a:0},u=(e,r,t)=>{"number"===typeof e&&("h"===r&&(e<0&&(e=0),e>360&&(e=360),p&&p(H(x(Fe({},d,{h:e}))))),"s"===r&&(e<0&&(e=0),e>100&&(e=100),p&&p(H(x(Fe({},d,{s:e}))))),"l"===r&&(e<0&&(e=0),e>100&&(e=100),p&&p(H(x(Fe({},d,{l:e}))))),"a"===r&&(e<0&&(e=0),e>1&&(e=1),p&&p(H(x(Fe({},d,{a:e}))))))};return(0,V.jsx)(Le,Fe({ref:r,hsva:o,rProps:Fe({label:"H",value:Math.round(d.h)},a,{onChange:(e,r)=>u(r,"h")}),gProps:Fe({label:"S",value:Math.round(d.s)+"%"},n,{onChange:(e,r)=>u(r,"s")}),bProps:Fe({label:"L",value:Math.round(d.l)+"%"},s,{onChange:(e,r)=>u(r,"l")}),aProps:Fe({label:"A",value:Math.round(100*d.a)/100},l,{onChange:(e,r)=>u(r,"a")}),className:[t,i||""].filter(Boolean).join(" ")},c))}));Me.displayName="EditableInputHSLA";const He=Me;var Ie=["style"];function ze(e){var{style:r}=e,t=ae(e,Ie),o=(0,z.useRef)(null),a=(0,z.useCallback)((e=>{o.current.style.backgroundColor="#e8e8e8"}),[]),n=(0,z.useCallback)((e=>{o.current.style.backgroundColor="transparent"}),[]);return(0,V.jsx)("div",oe({ref:o,style:oe({marginLeft:5,cursor:"pointer",transition:"background-color .3s",borderRadius:2},r)},t,{onMouseEnter:a,onMouseLeave:n,children:(0,V.jsx)("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",style:{display:"block"},children:(0,V.jsx)("path",{d:"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z",fill:"#333"})})}))}var _e,We=["prefixCls","className","style","color","inputType","rectProps","onChange"];!function(e){e.HEXA="hexa",e.RGBA="rgba",e.HSLA="hsla"}(_e||(_e={}));var Ge=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-chrome",className:o,color:a,inputType:n=_e.RGBA,rectProps:l={},onChange:i}=e,p=ae(e,We),c="string"===typeof a&&s(a)?N(a):a||{h:0,s:0,l:0,a:0},d=e=>i&&i(H(e)),[u,h]=(0,z.useState)(n),f={paddingTop:6},g={textAlign:"center",paddingTop:4,paddingBottom:4};return(0,V.jsx)(ve,oe({ref:r,color:c,style:{borderRadius:0,flexDirection:"column",width:230,padding:0},colors:void 0,className:[t,o].filter(Boolean).join(" "),placement:ue.TopLeft},p,{addonAfter:(0,V.jsxs)(z.Fragment,{children:[(0,V.jsx)(je,{hsva:c,style:{width:"100%",height:130},onChange:e=>{d(oe({},c,e,{a:c.a}))}}),(0,V.jsxs)("div",{style:{padding:15,display:"flex",alignItems:"center"},children:[(0,V.jsx)(te,{width:24,height:24,hsva:c,radius:2,style:{marginRight:15,borderRadius:"50%"},bgProps:{style:{background:"transparent"}},innerProps:{style:{borderRadius:"50%",background:T(c),boxShadow:"rgb(0 0 0 / 25%) 0px 0px 1px inset"}},pointer:()=>(0,V.jsx)(z.Fragment,{})}),(0,V.jsxs)("div",{style:{flex:1},children:[(0,V.jsx)(Re,{hue:c.h,style:{width:"100%"},bgProps:{style:{borderRadius:2}},onChange:e=>{d(oe({},c,e))}}),(0,V.jsx)(te,{hsva:c,style:{marginTop:10},bgProps:{style:{borderRadius:2}},onChange:e=>{d(oe({},c,e))}})]})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",padding:"0 15px 15px 15px",userSelect:"none"},children:[(0,V.jsxs)("div",{style:{flex:1},children:[u==_e.RGBA&&(0,V.jsx)(Le,{hsva:c,rProps:{labelStyle:f,inputStyle:g},gProps:{labelStyle:f,inputStyle:g},bProps:{labelStyle:f,inputStyle:g},aProps:{labelStyle:f,inputStyle:g},onChange:e=>d(e.hsva)}),u===_e.HEXA&&(0,V.jsx)(Pe,{label:"HEX",labelStyle:f,inputStyle:g,value:c.a>0&&c.a<1?D(c).toLocaleUpperCase():F(c).toLocaleUpperCase(),onChange:(e,r)=>{"string"===typeof r&&d(N(/^#/.test(r)?r:"#"+r))}}),u===_e.HSLA&&(0,V.jsx)(He,{hsva:c,hProps:{labelStyle:f,inputStyle:g},sProps:{labelStyle:f,inputStyle:g},lProps:{labelStyle:f,inputStyle:g},aProps:{labelStyle:f,inputStyle:g},onChange:e=>d(e.hsva)})]}),(0,V.jsx)(ze,{onClick:()=>{u===_e.RGBA&&h(_e.HSLA),u===_e.HSLA&&h(_e.HEXA),u===_e.HEXA&&h(_e.RGBA)}})]})]}),rectRender:e=>{var{key:r}=e;return(0,V.jsx)(z.Fragment,{},r)}}))}));Ge.displayName="Chrome";const Ue=Ge;function qe(){return qe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},qe.apply(this,arguments)}var Xe=["prefixCls","className","style","color","colors","onChange"],Ye=["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],Ve=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-block",className:o,style:a,color:n,colors:i=Ye,onChange:p}=e,c=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Xe),d="string"===typeof n&&s(n)?N(n):n,u=n?F(d):"",h=(e,r)=>{"string"===typeof e&&s(e)&&/(3|6)/.test(String(e.replace(/^#/,"").length))&&p&&p(H(N(e)))};return(0,V.jsxs)("div",qe({ref:r,className:[t,o].filter(Boolean).join(" "),style:qe({width:170,borderRadius:6,background:"rgb(255, 255, 255)",boxShadow:"rgb(0 0 0 / 10%) 0 1px",position:"relative"},a)},c,{children:[(0,V.jsx)("div",{style:{width:0,height:0,borderStyle:"solid",borderWidth:"0 10px 10px",borderColor:"transparent transparent "+u,position:"absolute",top:-10,left:"50%",marginLeft:-10}}),(0,V.jsx)("div",{title:u,style:{backgroundColor:""+u,color:l(u),height:110,fontSize:18,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center"},children:u.toLocaleUpperCase()}),(0,V.jsx)(ce,{colors:i,color:u,style:{paddingLeft:10,paddingTop:10},rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:4,height:22,width:22}},onChange:e=>{p&&p(H(e))}}),(0,V.jsx)(Pe,{value:u.toLocaleUpperCase(),onChange:(e,r)=>h(r),onBlur:e=>{var r=e.target.value;e.target.value=r.slice(0,6),h(r.slice(0,6))},inputStyle:{height:22,outline:0,borderRadius:3,color:"#666",padding:"0 7px"},style:{padding:10,paddingTop:0,borderRadius:"0 0 6px 6px"}})]}))}));Ve.displayName="Block";const Qe=Ve;function Ze(){return Ze=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ze.apply(this,arguments)}var $e=["prefixCls","className","style","onChange","color","colors"],Je=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];function Ke(e){return e.checked?(0,V.jsx)("div",{style:{height:5,width:5,borderRadius:"50%",backgroundColor:l(e.color)}}):null}var er=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-compact",className:o,style:a,onChange:n,color:l,colors:i=Je}=e,p=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,$e),c="string"===typeof l&&s(l)?N(l):l,d=l?F(c).replace(/^#/,""):"",u=(0,z.useCallback)((e=>n&&n(H(e))),[]),h={style:{alignItems:"baseline"},inputStyle:{boxShadow:"none",backgroundColor:"transparent",outline:0}};return(0,V.jsxs)("div",Ze({ref:r,style:Ze({background:"#f6f6f6",borderRadius:3,display:"flex",width:240,flexWrap:"wrap",paddingTop:5,paddingLeft:5},a),className:[t,o||""].filter(Boolean).join(" ")},p,{children:[(0,V.jsx)(ce,{colors:i,color:l?F(c):void 0,rectProps:{children:(0,V.jsx)(Ke,{}),style:{display:"flex",alignItems:"center",justifyContent:"center"}},onChange:e=>u(e)}),(0,V.jsxs)("div",{style:{display:"flex",margin:"0 4px 3px 0"},children:[(0,V.jsx)(Pe,{onChange:(e,r)=>{var t;"string"===typeof(t=r)&&s(t)&&/(3|6)/.test(String(t.length))&&u(N(t))},labelStyle:{paddingRight:5,marginTop:-1},value:d.toLocaleUpperCase(),label:(0,V.jsx)("div",{style:{width:8,height:8,backgroundColor:"#"+d}}),inputStyle:{outline:"none",boxShadow:"initial",background:"transparent"},style:{flexDirection:"row-reverse",flex:"1 1 0%",minWidth:80}}),(0,V.jsx)(Le,{hsva:c,placement:"left",onChange:e=>u(e.hsva),aProps:!1,rProps:h,gProps:h,bProps:h})]})]}))}));er.displayName="Compact";const rr=er;function tr(){return tr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},tr.apply(this,arguments)}function or(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}var ar=["style","color"],nr=["prefixCls","className","onChange","color","style"],sr=e=>{var{style:r,color:t}=e,o=or(e,ar);return(0,V.jsx)("div",tr({},o,{style:tr({height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+ee+")",backgroundColor:"#fff",border:"2px solid #fff",zIndex:1},r),children:(0,V.jsx)("div",{style:{backgroundColor:t,borderRadius:"50%",height:" 100%",width:"100%"}})}))},lr=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-colorful",className:o,onChange:a,color:n,style:l}=e,i=or(e,nr),p="string"===typeof n&&s(n)?N(n):n||{},c=e=>a&&a(H(e));return(0,V.jsxs)("div",tr({ref:r,style:tr({width:200,position:"relative"},l)},i,{className:t+" "+(o||""),children:[(0,V.jsx)(je,{hsva:p,className:t,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:e=>{var{left:r,top:t,color:o}=e;return(0,V.jsx)(sr,{style:{left:r,top:t,transform:"translate(-16px, -16px)"},color:F(p)})},onChange:e=>c(tr({},p,e))}),(0,V.jsx)(Re,{hue:p.h,height:24,className:t,onChange:e=>c(tr({},p,e)),pointer:e=>{var{left:r}=e;return(0,V.jsx)(sr,{style:{left:r},color:"hsl("+(p.h||0)+"deg 100% 50%)"})}}),(0,V.jsx)(te,{hsva:p,height:24,className:t,radius:"0 0 8px 8px",pointer:e=>{var{left:r}=e;return(0,V.jsx)(sr,{style:{left:r},color:T(p)})},onChange:e=>c(tr({},p,e))})]}))}));lr.displayName="Colorful";const ir=lr;function pr(){return pr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},pr.apply(this,arguments)}function cr(e){var{style:r,title:t,checked:o,color:a,onClick:n,rectProps:s}=e,l=(0,z.useRef)(null),i=(0,z.useCallback)((e=>{l.current.style.transform="scale(1.2)"}),[]),p=(0,z.useCallback)((e=>{l.current.style.transform="scale(1)"}),[]);return(0,V.jsx)("div",{ref:l,onClick:n,onMouseEnter:i,onMouseLeave:p,title:t,style:pr({},r,{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:3,borderRadius:"50%",marginRight:12,marginBottom:12,boxSizing:"border-box",transform:"scale(1)",boxShadow:a+" 0px 0px "+(o?5:0)+"px",transition:"transform 100ms ease 0s, box-shadow 100ms ease 0s"}),children:(0,V.jsx)("div",pr({},s,{style:pr({height:o?"100%":0,width:o?"100%":0,borderRadius:"50%",backgroundColor:"#fff",boxSizing:"border-box",transition:"height 100ms ease 0s, width 100ms ease 0s"},s.style)}))})}var dr=["prefixCls","className","color","colors","rectProps","onChange"],ur=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-circle",className:o,color:a,colors:n=[],rectProps:l={},onChange:i}=e,p=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,dr),c="string"===typeof a&&s(a)?N(a):a||{},d=a?F(c):"";return(0,V.jsx)(ce,pr({ref:r,colors:n,color:d},p,{className:[t,o].filter(Boolean).join(" "),rectRender:e=>{var r=pr({},e);return(0,V.jsx)(cr,pr({},r,{rectProps:l}))},onChange:e=>{i&&i(H(e))}}))}));ur.displayName="Circle";const hr=ur;function fr(){return fr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},fr.apply(this,arguments)}var gr=["prefixCls","className","style","color","onChange"],br={boxShadow:"initial",borderWidth:"0 0 1px 0",borderBottomColor:"#eee",borderBottomStyle:"solid",height:30,outline:0,fontSize:15,padding:0},vr=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-material",className:o,style:a,color:n,onChange:l}=e,i=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,gr),p="string"===typeof n&&s(n)?N(n):n,c=n?F(p).replace(/^#/,""):"",d=(e,r)=>{"string"===typeof e&&s(e)&&/(3|6)/.test(String(e.length))&&l&&l(H(N(e)))};return(0,V.jsxs)("div",fr({ref:r,className:[t,o||""].filter(Boolean).join(" "),style:fr({padding:16,width:98,fontFamily:"Roboto",backgroundColor:"#fff"},a)},i,{children:[(0,V.jsx)(Pe,{label:"Hex",value:c.toLocaleUpperCase(),onChange:(e,r)=>d(r),onBlur:e=>{var r=e.target.value;e.target.value=r.slice(0,6),d(r.slice(0,6))},inputStyle:{outline:0,border:0,height:30,fontSize:15,padding:0,boxShadow:"initial",borderWidth:"0 0 2px 0",borderBottomColor:c?"#"+c:"#eee",borderBottomStyle:"solid"},style:{flexDirection:"column-reverse",alignItems:"flex-start"}}),(0,V.jsx)(Le,{hsva:p,placement:"top",style:{marginTop:11},rProps:{style:{alignItems:"flex-start"},inputStyle:fr({},br)},gProps:{style:{alignItems:"flex-start"},inputStyle:fr({},br)},bProps:{style:{alignItems:"flex-start"},inputStyle:fr({},br)},aProps:!1,onChange:e=>{return r=e.hsva,void(l&&l(H(r)));var r}})]}))}));vr.displayName="Material";const xr=vr;function yr(){return yr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},yr.apply(this,arguments)}var mr=["prefixCls","className","onChange","direction","hsva"],Cr=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-saturation",className:o,onChange:a,direction:n="horizontal",hsva:s}=e,l=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,mr),i=f(Object.assign({},s,{a:1,s:100,v:100}));return(0,V.jsx)(te,yr({ref:r},l,{className:t+" "+(o||""),hsva:{h:s.h,s:100,v:s.v,a:1-s.v/100},direction:n,background:"linear-gradient(to "+("horizontal"===n?"right":"bottom")+", "+i+", rgb(0, 0, 0))",onChange:(e,r)=>{a&&a({v:"horizontal"===n?100-100*r.left:100-100*r.top,s:100})}}))}));Cr.displayName="ShadeSlider";const jr=Cr;function wr(){return wr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},wr.apply(this,arguments)}var Or=["prefixCls","className","style","onChange","color","lightness"],Sr=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-slider",className:o,style:a,onChange:n,color:l,lightness:i=[80,65,50,35,20]}=e,p=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Or),c="string"===typeof l&&s(l)?N(l):l||{};return(0,V.jsx)("div",wr({ref:r,style:wr({display:"flex"},a),className:[t,o||""].filter(Boolean).join(" ")},p,{children:i.map(((e,r)=>{var t="hsl("+y(c).h+", 50%, "+e+"%)",o=t===d(c);return(0,V.jsx)("div",{style:{paddingLeft:1,width:100/i.length+"%",boxSizing:"border-box"},children:(0,V.jsx)("div",{onClick:e=>((e,r)=>{n&&n(H(v(e)),r)})(t,e),style:wr({backgroundColor:t,height:12,cursor:"pointer"},o?{borderRadius:2,transform:"scale(1, 1.5)"}:{})})},r)}))}))}));Sr.displayName="Slider";const Rr=Sr;function kr(){return kr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},kr.apply(this,arguments)}var Nr=["prefixCls","className","onChange","width","presetColors","color","editableDisable","style"],Br=["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],Pr=e=>(0,V.jsx)("div",{style:{boxShadow:"rgb(0 0 0 / 60%) 0px 0px 2px",width:4,top:1,bottom:1,left:e.left,borderRadius:1,position:"absolute",backgroundColor:"#fff"}}),Ar=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-sketch",className:o,onChange:a,width:n=218,presetColors:l=Br,color:i,editableDisable:p=!0,style:c}=e,d=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,Nr),[u,h]=(0,z.useState)({h:209,s:36,v:90,a:1});(0,z.useEffect)((()=>{"string"===typeof i&&s(i)&&h(N(i)),"object"===typeof i&&h(i)}),[i]);var f=(0,z.useCallback)((e=>{h(e),a&&a(H(e))}),[u]);return(0,V.jsxs)("div",kr({},d,{className:t+" "+(o||""),ref:r,style:kr({background:"rgb(255, 255, 255)",borderRadius:4,boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px",width:n},c),children:[(0,V.jsxs)("div",{style:{padding:"10px 10px 8px"},children:[(0,V.jsx)(je,{hsva:u,style:{width:"auto",height:150},onChange:e=>f(kr({},u,e,{a:u.a}))}),(0,V.jsxs)("div",{style:{display:"flex",marginTop:4},children:[(0,V.jsxs)("div",{style:{flex:1},children:[(0,V.jsx)(Re,{width:"auto",height:10,hue:u.h,pointer:Pr,innerProps:{style:{marginLeft:1,marginRight:5}},onChange:e=>f(kr({},u,e))}),(0,V.jsx)(te,{width:"auto",height:10,hsva:u,pointer:Pr,style:{marginTop:4},innerProps:{style:{marginLeft:1,marginRight:5}},onChange:e=>{f(kr({},u,{a:e.a}))}})]}),(0,V.jsx)(te,{width:24,height:24,hsva:u,radius:2,style:{marginLeft:4},bgProps:{style:{background:"transparent"}},innerProps:{style:{borderRadius:2,background:T(u),boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset, rgb(0 0 0 / 25%) 0px 0px 4px inset"}},pointer:()=>(0,V.jsx)(z.Fragment,{})})]})]}),p&&(0,V.jsxs)("div",{style:{display:"flex",margin:"0 10px 3px 10px"},children:[(0,V.jsx)(Pe,{label:"Hex",value:F(u).replace(/^#/,"").toLocaleUpperCase(),onChange:(e,r)=>{var t;"string"===typeof(t=r)&&s(t)&&/(3|6)/.test(String(t.length))&&f(N(t))},style:{minWidth:58}}),(0,V.jsx)(Le,{hsva:u,style:{marginLeft:6},onChange:e=>f(e.hsva)})]}),l&&l.length>0&&(0,V.jsx)(ce,{style:{borderTop:"1px solid rgb(238, 238, 238)",paddingTop:10,paddingLeft:10},colors:l,color:F(u),onChange:e=>f(e),rectProps:{style:{marginRight:10,marginBottom:10,borderRadius:3,boxShadow:"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset"}}})]}))}));Ar.displayName="Sketch";const Tr=Ar;function Er(){return Er=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Er.apply(this,arguments)}var Lr=e=>{var{className:r,color:t,left:o,top:a,style:n,prefixCls:s}=e,l=Er({},n,{position:"absolute",top:a,left:o});return(0,z.useMemo)((()=>(0,V.jsx)("div",{className:s+"-pointer "+(r||""),style:l,children:(0,V.jsx)("div",{className:s+"-fill",style:{width:10,height:10,transform:"translate(-5px, -5px)",boxShadow:"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",borderRadius:"50%",backgroundColor:"#fff"},children:(0,V.jsx)("div",{style:{inset:0,borderRadius:"50%",position:"absolute",backgroundColor:t}})})})),[a,o,t,r,s])},Fr=2*Math.PI,Dr=(e,r)=>Math.sqrt(e*e+r*r);function Mr(e){var{width:r=0}=e,t=r/2;return{width:r,radius:t,cx:t,cy:t}}function Hr(e){var{width:r=0}=e;return r/2}function Ir(e,r,t){var o,a=e.angle||0,n=e.direction;return t&&"clockwise"===n?r=a+r:"clockwise"===n?r=360-a+r:t&&"anticlockwise"===n?r=a+180-r:"anticlockwise"===n&&(r=a-r),(r%(o=360)+o)%o}var zr=["prefixCls","radius","pointer","className","style","width","height","direction","angle","color","onChange"],_r=_().forwardRef(((e,r)=>{var{prefixCls:t="w-color-wheel",radius:o=0,pointer:a,className:n,style:l,width:i=200,height:p=200,direction:c="anticlockwise",angle:d=180,color:u,onChange:h}=e,f=function(e,r){if(null==e)return{};var t,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,zr),g="string"===typeof u&&s(u)?N(u):u||{},b=u?F(g):"",v=function(e,r){var{cx:t,cy:o}=Mr(e),a=Hr(e),n=(180+Ir(e,r.h,!0))*(Fr/360),s=r.s/100*a,l="clockwise"===e.direction?-1:1;return{x:t+s*Math.cos(n)*l,y:o+s*Math.sin(n)*l}}({width:i},g),x={top:"0",left:"0",color:b},y=(e,r)=>{var t=function(e,r,t){var{cx:o,cy:a}=Mr(e),n=Hr(e);r=o-r,t=a-t;var s=Ir(e,Math.atan2(-t,-r)*(360/Fr)),l=Math.min(Dr(r,t),n);return{h:Math.round(s),s:Math.round(100/n*l)}}({width:i},i-e.x,p-e.y),o={h:t.h,s:t.s,v:g.v,a:g.a};h&&h(H(o))};return(0,V.jsxs)($,Er({className:[t,n||""].filter(Boolean).join(" ")},f,{style:Er({},l,{position:"relative",width:i,height:p}),ref:r,onMove:y,onDown:y,children:[_().createElement(a||Lr,Er({prefixCls:t,style:{zIndex:1,transform:"translate("+v.x+"px, "+v.y+"px)"}},x)),(0,V.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"anticlockwise"===c?"conic-gradient(red, yellow, lime, aqua, blue, magenta, red)":"conic-gradient(red, magenta, blue, aqua, lime, yellow, red)",transform:"rotateZ("+(d+90)+"deg)",inset:0}}),(0,V.jsx)("div",{style:{position:"absolute",borderRadius:"50%",background:"radial-gradient(circle closest-side, #fff, transparent)",inset:0}}),(0,V.jsx)("div",{style:{backgroundColor:"#000",borderRadius:"50%",position:"absolute",inset:0,opacity:"number"===typeof g.v?1-g.v/100:0}})]}))}));_r.displayName="Wheel";const Wr=_r})(),a})())); |
{ | ||
"name": "@uiw/react-color", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Color Picker component for React.", | ||
@@ -14,2 +14,6 @@ "homepage": "https://uiwjs.github.io/react-color", | ||
}, | ||
"scripts": { | ||
"build": "tsbb build", | ||
"watch": "tsbb watch" | ||
}, | ||
"keywords": [ | ||
@@ -46,22 +50,22 @@ "react", | ||
"dependencies": { | ||
"@uiw/color-convert": "1.0.10", | ||
"@uiw/react-color-alpha": "1.0.10", | ||
"@uiw/react-color-block": "1.0.10", | ||
"@uiw/react-color-chrome": "1.0.10", | ||
"@uiw/react-color-circle": "1.0.10", | ||
"@uiw/react-color-colorful": "1.0.10", | ||
"@uiw/react-color-compact": "1.0.10", | ||
"@uiw/react-color-editable-input": "1.0.10", | ||
"@uiw/react-color-editable-input-hsla": "1.0.10", | ||
"@uiw/react-color-editable-input-rgba": "1.0.10", | ||
"@uiw/react-color-github": "1.0.10", | ||
"@uiw/react-color-hue": "1.0.10", | ||
"@uiw/react-color-material": "1.0.10", | ||
"@uiw/react-color-saturation": "1.0.10", | ||
"@uiw/react-color-shade-slider": "1.0.10", | ||
"@uiw/react-color-sketch": "1.0.10", | ||
"@uiw/react-color-slider": "1.0.10", | ||
"@uiw/react-color-swatch": "1.0.10", | ||
"@uiw/react-color-wheel": "1.0.10" | ||
"@uiw/color-convert": "1.0.11", | ||
"@uiw/react-color-alpha": "1.0.11", | ||
"@uiw/react-color-block": "1.0.11", | ||
"@uiw/react-color-chrome": "1.0.11", | ||
"@uiw/react-color-circle": "1.0.11", | ||
"@uiw/react-color-colorful": "1.0.11", | ||
"@uiw/react-color-compact": "1.0.11", | ||
"@uiw/react-color-editable-input": "1.0.11", | ||
"@uiw/react-color-editable-input-hsla": "1.0.11", | ||
"@uiw/react-color-editable-input-rgba": "1.0.11", | ||
"@uiw/react-color-github": "1.0.11", | ||
"@uiw/react-color-hue": "1.0.11", | ||
"@uiw/react-color-material": "1.0.11", | ||
"@uiw/react-color-saturation": "1.0.11", | ||
"@uiw/react-color-shade-slider": "1.0.11", | ||
"@uiw/react-color-sketch": "1.0.11", | ||
"@uiw/react-color-slider": "1.0.11", | ||
"@uiw/react-color-swatch": "1.0.11", | ||
"@uiw/react-color-wheel": "1.0.11" | ||
} | ||
} |
@@ -94,13 +94,13 @@ <div align="center"> | ||
npm install # Installation dependencies | ||
npm run bootstrap # Install dependencies in sub-packages | ||
npm run hoist # Install dependencies in sub-packages | ||
npm run build # Compile all package | ||
``` | ||
```bash | ||
npm run build # Compile package | ||
cd packages/color-block | ||
# listen to the component compile and output the .js file | ||
# listen for compilation output type .d.ts file | ||
npm run watch:color # Monitor the compiled package `@uiw/react-color` | ||
npm run watch:alpha # Monitor the compiled package `@uiw/react-alpha` | ||
npm run watch # Monitor the compiled package `@uiw/react-block` | ||
``` | ||
```bash | ||
npm run start # development mode, listen to compile preview website instance | ||
@@ -107,0 +107,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
213524
3845
0
+ Added@uiw/color-convert@1.0.11(transitive)
+ Added@uiw/react-color-alpha@1.0.11(transitive)
+ Added@uiw/react-color-block@1.0.11(transitive)
+ Added@uiw/react-color-chrome@1.0.11(transitive)
+ Added@uiw/react-color-circle@1.0.11(transitive)
+ Added@uiw/react-color-colorful@1.0.11(transitive)
+ Added@uiw/react-color-compact@1.0.11(transitive)
+ Added@uiw/react-color-editable-input@1.0.11(transitive)
+ Added@uiw/react-color-editable-input-hsla@1.0.11(transitive)
+ Added@uiw/react-color-editable-input-rgba@1.0.11(transitive)
+ Added@uiw/react-color-github@1.0.11(transitive)
+ Added@uiw/react-color-hue@1.0.11(transitive)
+ Added@uiw/react-color-material@1.0.11(transitive)
+ Added@uiw/react-color-saturation@1.0.11(transitive)
+ Added@uiw/react-color-shade-slider@1.0.11(transitive)
+ Added@uiw/react-color-sketch@1.0.11(transitive)
+ Added@uiw/react-color-slider@1.0.11(transitive)
+ Added@uiw/react-color-swatch@1.0.11(transitive)
+ Added@uiw/react-color-wheel@1.0.11(transitive)
+ Added@uiw/react-drag-event-interactive@1.0.11(transitive)
- Removed@uiw/color-convert@1.0.10(transitive)
- Removed@uiw/react-color-alpha@1.0.10(transitive)
- Removed@uiw/react-color-block@1.0.10(transitive)
- Removed@uiw/react-color-chrome@1.0.10(transitive)
- Removed@uiw/react-color-circle@1.0.10(transitive)
- Removed@uiw/react-color-colorful@1.0.10(transitive)
- Removed@uiw/react-color-compact@1.0.10(transitive)
- Removed@uiw/react-color-editable-input@1.0.10(transitive)
- Removed@uiw/react-color-editable-input-hsla@1.0.10(transitive)
- Removed@uiw/react-color-editable-input-rgba@1.0.10(transitive)
- Removed@uiw/react-color-github@1.0.10(transitive)
- Removed@uiw/react-color-hue@1.0.10(transitive)
- Removed@uiw/react-color-material@1.0.10(transitive)
- Removed@uiw/react-color-saturation@1.0.10(transitive)
- Removed@uiw/react-color-shade-slider@1.0.10(transitive)
- Removed@uiw/react-color-sketch@1.0.10(transitive)
- Removed@uiw/react-color-slider@1.0.10(transitive)
- Removed@uiw/react-color-swatch@1.0.10(transitive)
- Removed@uiw/react-color-wheel@1.0.10(transitive)
- Removed@uiw/react-drag-event-interactive@1.0.10(transitive)
Updated@uiw/color-convert@1.0.11
Updated@uiw/react-color-hue@1.0.11