@corva/ui 0.40.0-3 → 0.40.0-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ColorPicker/ColorPicker.js +1 -1
- package/components/ColorPicker/PaletteChromePicker/ColorSquare/ColorSquare.js +1 -1
- package/components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js +1 -1
- package/components/Stepper/Step.css.js +1 -1
- package/components/Stepper/Step.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as t,useEffect as n}from"react";import a from"prop-types";import{withStyles as i,InputLabel as l,IconButton as c,Popover as p}from"@material-ui/core";import{ColorLens as s}from"@material-ui/icons";import b from"chroma-js";import g from"classnames";import u from"./PaletteChromePicker/PaletteChromePicker.js";import{jsxs as m,jsx as h}from"react/jsx-runtime";var f={root:{position:"relative",display:"flex"},topLabelRoot:{flexDirection:"column"},rightLabelRoot:{flexDirection:"row-reverse",justifyContent:"flex-end",alignItems:"center"},button:{width:"36px",height:"24px",boxShadow:"0px 3px 6px rgba(0, 0, 0, 0.161)",borderRadius:"5px"},buttonTransparrent:{position:"relative",backgroundImage:"url(".concat("/static/media/39f55985e0da1489ad22264208b0493d.svg",")"),backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",display:"block",width:"100%",height:"3px",background:"#FF0000",transform:"rotate(148deg)",borderRadius:"2px"}},colorLensIcon:{position:"relative",zIndex:2},popper:{zIndex:1500},topLabel:{marginBottom:"8px",fontSize:"15px",lineHeight:"17px",letterSpacing:"0.4px",color:"#BDBDBD",whiteSpace:"nowrap"},rightLabel:{marginLeft:"8px",fontSize:"16px"}},d={rgba:function(e){return"rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")")},rgb:function(e){return"rgb(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,")")},hex:function(e){return e.hex},rgba_rgb:function(e){return 1===e.rgb.a?d.rgb(e):d.rgba(e)},rgba_hex:function(e){return 1===e.rgb.a?d.hex(e):d.rgba(e)}},x=function(a){var i,u,f=a.label,x=a.value,v=a.converter,C=a.onChange,P=a.buttonClassName,k=a.popoverAnchorOrigin,L=a.popoverTransformOrigin,y=a.labelPosition,T=a.hideLabel,O=a.pickerComponent,R=a.classes,z=a.lensColor,S=a.enableTransparencyPalette,N=o(null),w=r(N,2),I=w[0],j=w[1],B=o(x),D=r(B,2),_=D[0],q=D[1],A=t();n((function(){q(x)}),[x]);return m("div",{className:g(R.root,(i={},e(i,R.topLabelRoot,"top"===y),e(i,R.rightLabelRoot,"right"===y),i)),children:[!T&&h(l,{className:g((u={},e(u,R.topLabel,"top"===y),e(u,R.rightLabel,"right"===y),u)),shrink:!0,children:f}),h(c,{"data-testid":"".concat("ColorPicker","_icon_").concat(f),className:g(R.button,P,e({},R.buttonTransparrent,0===b(_).alpha())),disableRipple:!0,style:{backgroundColor:_,color:z},onClick:function(e){j(e.currentTarget)},children:h(s,{fontSize:"small",className:R.colorLensIcon})}),h(p,{id:"colors-popper",action:A,open:Boolean(I),anchorEl:I,onClose:function(){j(null)},anchorOrigin:k,transformOrigin:L,children:h(O,{color:_,onChange:function(e){var r=d[v](e);q(r),C(r)},onSizeChange:function(){A.current&&A.current.updatePosition()},enableTransparencyPalette:S})})]})};x.propTypes={buttonClassName:a.string,label:a.string,value:a.string.isRequired,onChange:a.func.isRequired,converter:a.oneOf(Object.keys(d)),classes:a.shape({button:a.string.isRequired}).isRequired,pickerComponent:a.node,labelPosition:a.oneOf(["top","right"]),popoverAnchorOrigin:a.shape({}),popoverTransformOrigin:a.shape({}),hideLabel:a.bool,lensColor:a.string,enableTransparencyPalette:a.bool},x.defaultProps={label:"Color",buttonClassName:null,converter:"rgba_hex",pickerComponent:u,hideLabel:!1,popoverAnchorOrigin:{vertical:"bottom",horizontal:"left"},popoverTransformOrigin:{vertical:"top",horizontal:"left"},labelPosition:"top",lensColor:"#fff",enableTransparencyPalette:!1};var v=i(f)(x);export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import r from"prop-types";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"prop-types";import o from"@material-ui/icons/CheckRounded";import{makeStyles as i}from"@material-ui/core";import t from"classnames";import a from"chroma-js";import{jsx as n}from"react/jsx-runtime";var c=i({container:{position:"relative",cursor:"pointer",width:"16px",height:"16px",borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center","&:hover":{border:"1px solid white"}},containerSelected:{border:"1px solid white","& $squareCheck":{visibility:"visible"}},transparentContainer:{position:"relative",border:"1px solid #C4C4C4;",backgroundImage:"url(".concat("/static/media/39f55985e0da1489ad22264208b0493d.svg",")"),backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",display:"block",width:"100%",height:"2px",background:"#FF0000",transform:"rotate(135deg)",borderRadius:"2px"}},squareCheck:{width:"16px",height:"16px",color:"white",visibility:"hidden",zIndex:2}});function s(r){var i,s=r.color,d=r.isSelected,l=r.onClick,p=c();return n("div",{"data-testid":"".concat("ColorSquare","_color_").concat(s,"_selected_").concat(d),className:t(p.container,(i={},e(i,p.transparentContainer,0===a(s).alpha()),e(i,p.containerSelected,d),i)),style:{backgroundColor:s},onClick:l,children:n(o,{fontSize:"small",className:p.squareCheck})})}s.propTypes={color:r.string.isRequired,isSelected:r.bool.isRequired,onClick:r.func.isRequired};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{forwardRef as
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{forwardRef as t,useState as r,useLayoutEffect as i}from"react";import{ChromePicker as n}from"react-color";import a from"classnames";import l from"prop-types";import{makeStyles as c,Tooltip as p,IconButton as d}from"@material-ui/core";import s from"@material-ui/icons/Palette";import m from"@material-ui/icons/Colorize";import b from"./Palette/Palette.js";import{jsxs as f,jsx as u}from"react/jsx-runtime";var h="PALETTE",x="CHROME_PICKER",g={default:{picker:{width:"100%",boxShadow:"none"},body:{backgroundColor:"#3b3b3b",padding:"16px 16px 0"},color:{width:"32px",height:"32px",marginRight:"16px",borderRadius:"2px"},swatch:{marginTop:0,width:"100%",height:"100%",borderRadius:0,position:"relative",overflow:"hidden"},toggles:{display:"flex",flexDirection:"column",justifyContent:"space-between"},Alpha:{checkboard:{display:"none"},gradient:{borderRadius:"5px"}}}},C=c({container:{backgroundColor:"#3b3b3b",boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",width:"250px",paddingBottom:"8px",borderRadius:"4px","& input":{border:"1px solid #616161 !important",backgroundColor:"#3b3b3b",color:"#fff !important",boxShadow:"none !important",outline:"none"},"& svg:not(.MuiSvgIcon-root)":{fill:"#bdbdbd !important"}},chomePickerPalette:{margin:"0 8px",paddingTop:"8px"},buttonsContainer:{display:"flex",justifyContent:"center",marginTop:"8px"},iconButton:{padding:"8px","&:hover":{backgroundColor:"#333333"},"&:hover $icon":{color:"#fff"}},icon:{color:"#bdbdbd",fontSize:"24px"},iconActive:{color:"#fff"},tooltip:{background:"#414141",color:"#fff",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",borderRadius:"4px",opacity:1,fontSize:"11px"}}),P=t((function(t,l){var c=t.color,P=t.onChange,y=t.onSizeChange,k=t.enableTransparencyPalette,v=C(),w=r(h),R=e(w,2),S=R[0],T=R[1];return i(y,[S]),f("div",{className:v.container,ref:l,children:[S===h&&u(b,{className:v.chomePickerPalette,color:c,onChange:P,enableTransparencyPalette:k}),S===x&&u(n,{styles:g,color:c,onChange:P}),f("div",{className:v.buttonsContainer,children:[u(p,{title:"Palette",classes:{tooltip:v.tooltip},children:u(d,{"data-testid":"".concat("PaletteChromePicker","_palette"),className:v.iconButton,onClick:function(){return T(h)},children:u(s,{className:a(v.icon,o({},v.iconActive,S===h)),fontSize:"small"})})}),u(p,{title:"Pick your own",classes:{tooltip:v.tooltip},children:u(d,{"data-testid":"".concat("PaletteChromePicker","_pickOwn"),className:v.iconButton,onClick:function(){return T(x)},children:u(m,{className:a(v.icon,o({},v.iconActive,S===x)),fontSize:"small"})})})]})]})}));P.propTypes={color:l.string.isRequired,onChange:l.func.isRequired,onSizeChange:l.func.isRequired,enableTransparencyPalette:l.bool.isRequired};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={step:"Step_step__ZuzFg",stepCircle:"Step_stepCircle__0-Op3",medium:"Step_medium__Nnddy",large:"Step_large__tn1ui",active:"Step_active__70Ccj",checked:"Step_checked__SzfKc",error:"Step_error__EvYUU",disabled:"Step_disabled__H19rj"};e(".Step_step__ZuzFg{align-items:center;color:var(--palette-primary-text-6);display:inline-flex;flex-direction:row;margin:16px}.Step_stepCircle__0-Op3{align-items:center;border:1px solid var(--palette-primary-text-6);border-radius:50%;display:flex;justify-content:center;margin-right:8px;min-height:32px;min-width:32px;text-align:center}.Step_medium__Nnddy.Step_step__ZuzFg{font-size:14px}.Step_medium__Nnddy>.Step_stepCircle__0-Op3{height:32px;width:32px}.Step_large__tn1ui.Step_step__ZuzFg{font-size:16px}.Step_large__tn1ui>.Step_stepCircle__0-Op3{font-size:20px;height:40px;width:40px}.Step_step__ZuzFg.Step_active__70Ccj{color:var(--palette-primary-contrast-text)
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={step:"Step_step__ZuzFg",stepCircle:"Step_stepCircle__0-Op3",medium:"Step_medium__Nnddy",large:"Step_large__tn1ui",active:"Step_active__70Ccj",checked:"Step_checked__SzfKc",error:"Step_error__EvYUU",disabled:"Step_disabled__H19rj"};e(".Step_step__ZuzFg{align-items:center;color:var(--palette-primary-text-6);display:inline-flex;flex-direction:row;margin:16px}.Step_stepCircle__0-Op3{align-items:center;border:1px solid var(--palette-primary-text-6);border-radius:50%;display:flex;font-weight:500;justify-content:center;margin-right:8px;min-height:32px;min-width:32px;text-align:center}.Step_medium__Nnddy.Step_step__ZuzFg{font-size:14px}.Step_medium__Nnddy>.Step_stepCircle__0-Op3{height:32px;width:32px}.Step_large__tn1ui.Step_step__ZuzFg{font-size:16px}.Step_large__tn1ui>.Step_stepCircle__0-Op3{font-size:20px;height:40px;width:40px}.Step_step__ZuzFg.Step_active__70Ccj{color:var(--palette-primary-contrast-text)}.Step_active__70Ccj>.Step_stepCircle__0-Op3{background-color:var(--palette-primary-main);border:none}.Step_checked__SzfKc>.Step_stepCircle__0-Op3{background-color:var(--palette-primary-dark);border:none;color:var(--palette-primary-contrast-text);opacity:.6}.Step_step__ZuzFg.Step_error__EvYUU{color:#f44336}.Step_active__70Ccj.Step_error__EvYUU>.Step_stepCircle__0-Op3,.Step_error__EvYUU>.Step_stepCircle__0-Op3{background-color:transparent;border:1px solid var(--palette-error-main)}.Step_disabled__H19rj>.Step_stepCircle__0-Op3,.Step_step__ZuzFg.Step_disabled__H19rj{border-color:var(--palette-primary-text-8);color:var(--palette-primary-text-8)}");export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"classnames";import r from"prop-types";import{SIZES as a}from"./constants.js";import s from"./Step.css.js";import{
|
|
1
|
+
import e from"classnames";import r from"prop-types";import{SIZES as a}from"./constants.js";import s from"./Step.css.js";import{jsxs as i,jsx as o}from"react/jsx-runtime";var l=function(e){var r=e.size;return o("svg",{width:r,height:r,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{d:"M6.0001 10.7799L3.2201 7.9999L2.27344 8.9399L6.0001 12.6666L14.0001 4.66656L13.0601 3.72656L6.0001 10.7799Z",fill:"white"})})};function c(r){var c=r.value,t=r.checked,d=r.active,n=r.error,m=r.disabled,p=r.size,v=r.canGoBack,b=r.label,h=r.className;return i("div",{className:e(s.step,s[p],d&&s.active,n&&s.error,t&&!n&&s.checked,m&&s.disabled,h),children:[o("div",{className:s.stepCircle,children:!t||n||v?c:o(l,{size:p===a.large?24:16})}),b]})}c.propTypes={value:r.number.isRequired,label:r.node,checked:r.bool,active:r.bool,error:r.bool,disabled:r.bool,size:r.string,canGoBack:r.bool,className:r.string},c.defaultProps={checked:!1,active:!1,error:!1,disabled:!1,size:a.medium,canGoBack:!0,label:"",className:""};export{c as default};
|