@corva/ui 0.87.0-15 → 0.87.0-16

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/defineProperty"),i=require("react"),n=require("re-resizable"),a=require("react-sizeme"),r=require("classnames"),o=require("lodash"),l=require("../shared/useThrottledCallback.js"),d=require("./Handle.js"),s=require("./icons/HandleIcon.js"),u=require("./utils.js"),h=require("./styles/sliderStyles.js");require("./styles/handleStyles.js");var c=require("./constants.js"),m=require("react/jsx-runtime");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=f(e),p=f(t),b=f(r);function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){p.default(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w="twoValuesSliderDefault",O=function(e){var t,a,r=e.min,o=e.max,f=e.value,g=e.size,O=e.orientation,j=e.valueFormatter,I=e.displayFormatter,R=e.editableHandles,x=e.onChange,H=e.onStop,A=e.reversed,N=e.handlePosition,T=e.handleClasses,_=e.minimal,P=e.dimension,M=h.useSliderStyles(),z=i.useRef(null),C=i.useRef(null),E=O===c.HORIZONTAL_ORIENTATION,S=O===c.VERTICAL_ORIENTATION,q=_?g:y(y({},g),{},{width:E?g.width-2*c.INPUT_WIDTH:g.width,height:S?g.height-2*c.INPUT_HEIGHT:g.height}),L=i.useState([j(null==f?void 0:f.at(0)),j(null==f?void 0:f.at(1))]),W=v.default(L,2),k=W[0],G=W[1],D=i.useRef(null),B=i.useState(!1),F=v.default(B,2),V=F[0],X=F[1],Y=v.default(k,2),Z=Y[0],U=Y[1],J=u.getSizedControls({isHorizontalOrientation:E,size:q,max:o,min:r,tail:U,head:Z}),K=J.headMaxWidth,Q=J.tailMaxWidth,$=J.headMaxHeight,ee=J.tailMaxHeight;i.useEffect((function(){if(!D.current){var e=[j(null==f?void 0:f.at(0)),j(null==f?void 0:f.at(1))],t=Math.min.apply(Math,e),i=Math.max.apply(Math,e);G([t,i])}}),[null==f?void 0:f.at(0),null==f?void 0:f.at(1)]),i.useEffect((function(){if(E){var e=q.width/(o-r)*(Z-r),t=q.width/(o-r)*(o-U);z.current.updateSize({width:A?t:e,height:q.height}),C.current.updateSize({width:A?e:t,height:q.height})}else if(S){var i=q.height/(o-r)*(Z-r),n=q.height/(o-r)*(o-U);z.current.updateSize({width:q.width,height:A?n:i}),C.current.updateSize({width:q.width,height:A?i:n})}}),[r,o,Z,U,q.width,q.height,O]),i.useEffect((function(){var e=function(){document.removeEventListener("mousemove",re),document.removeEventListener("mouseup",oe),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",de)};return V?(document.addEventListener("mousemove",re),document.addEventListener("mouseup",oe),document.addEventListener("touchmove",le),document.addEventListener("touchend",de)):(e(),H()),function(){e()}}),[V]);var te=l.useThrottledCallback((function(e,t,i){D.current="onResize Event";var n=i.clientWidth,a=i.clientHeight,l=Z,d=U;"right"===t?A?d=j(o-n/q.width*(o-r)):l=j(r+n/q.width*(o-r)):"left"===t?A?l=j(r+n/q.width*(o-r)):d=j(o-n/q.width*(o-r)):"bottom"===t?A?d=j(o-a/q.height*(o-r)):l=j(r+a/q.height*(o-r)):"top"===t&&(A?l=j(r+a/q.height*(o-r)):d=j(o-a/q.height*(o-r))),l=Math.min(l,U),d=Math.max(d,Z),G([l,d]),x([l,d])})),ie=l.useThrottledCallback((function(){D.current=null,H()})),ne=function(e,t){D.current={xPos:e,yPos:t,head:Z,tail:U}},ae=function(e,t){if(D.current){var i;E?i=(D.current.xPos-e)/q.width*(o-r):S&&(i=(D.current.yPos-t)/q.height*(o-r));var n,a,l=D.current.head-i*(A?-1:1),d=D.current.tail-i*(A?-1:1),s=D.current.tail-D.current.head;l<=r?(n=r,a=r+s):d>=o?(n=o-s,a=o):(n=l,a=d),n=j(n),a=j(a),G([n,a]),x([n,a])}},re=l.useThrottledCallback((function(e){ae(e.clientX,e.clientY)})),oe=l.useThrottledCallback((function(){D.current=null,X(!1)})),le=l.useThrottledCallback((function(e){ae(e.touches[0].pageX,e.touches[0].pageY)})),de=l.useThrottledCallback((function(){D.current=null,X(!1)})),se=l.useThrottledCallback((function(e){G([e,U]),x([e,U]),H()})),ue=l.useThrottledCallback((function(e){G([Z,e]),x([Z,e]),H()})),he=i.useMemo((function(){return(U-Z)/(o-r)*(S?q.height:q.width)<30}),[r,o,Z,U]),ce=i.useMemo((function(){return(U-Z)/(o-r)*(S?q.height:q.width)<c.INNER_GAP}),[r,o,Z,U]),me=function(e,t){return e/t*(S?q.height:q.width)},fe=i.useMemo((function(){if(_)return{};var e=E?c.HORIZONTAL_MIN_GAP:c.VERTICAL_MIN_GAP;return A?{isRightArrowInvisible:me(Z,o)<c.MIN_ARROW_GAP,isLeftArrowInvisible:me(o-U,o)<c.MIN_ARROW_GAP,distance:(U-Z)/(o-r)*(S?q.height:q.width)-e}:{isRightArrowInvisible:me(o-U,o)<c.MIN_ARROW_GAP,isLeftArrowInvisible:me(Z,o)<c.MIN_ARROW_GAP,distance:(U-Z)/(o-r)*(S?q.height:q.width)-e}}),[r,o,Z,U,A]),ve=function(e){var t={min:r,max:U,value:Z,onChange:se},i={min:Z,max:o,value:U,onChange:ue};return"head"===e?m.jsx(d.Handle,y({"data-testid":"".concat(w,"_handle_top"),placement:"head",readOnly:!R,isInsideArrowsVisible:ce,arrowsOutsideConfig:fe,displayFormatter:I,orientation:O,classes:T,minimal:_},A?i:t)):"tail"===e?m.jsx(d.Handle,y({"data-testid":"".concat(w,"_handle_bottom"),placement:"tail",readOnly:!R,isInsideArrowsVisible:ce,arrowsOutsideConfig:fe,displayFormatter:I,orientation:O,classes:T,minimal:_},A?t:i)):null};return m.jsx("div",{className:b.default(M.rootWrapper,M["".concat(O,"-").concat(P)],p.default({},M.rootMinimal,_)),children:m.jsxs("div",{className:b.default(M.root,(t={},p.default(t,M.horizontalRoot,E),p.default(t,M.verticalRoot,S),p.default(t,M.minimal,_),t)),children:[m.jsx(n.Resizable,{className:M.resizable,ref:z,minHeight:0,minWidth:0,maxWidth:A?Q:K,maxHeight:A?ee:$,enable:{right:E,bottom:S},handleComponent:{right:ve("head"),bottom:ve("head")},onResize:te,onResizeStop:ie}),m.jsx("div",{className:M.body,"data-testid":"slider-body",onMouseDown:function(e){ne(e.clientX,e.clientY),X(!0)},onTouchStart:function(e){ne(e.touches[0].pageX,e.touches[0].pageY),X(!0)},children:he?m.jsx("div",{className:b.default((a={},p.default(a,M.horizontalBodyHandle,E),p.default(a,M.verticalBodyHandle,S),p.default(a,M.leftBodyHandle,"left"===N),p.default(a,M.rightBodyHandle,"right"===N),p.default(a,M.topBodyHandle,"top"===N),p.default(a,M.bottomBodyHandle,"bottom"===N),a)),children:m.jsx("div",{className:M.bodyHandle,"data-testid":"".concat(w,"_handle"),children:m.jsx(s.HandleIcon,{orientation:"vertical",minimal:_})})}):m.jsx("div",{className:M.bodyHandleIcon,"data-testid":"".concat(w,"_handle"),children:m.jsx(s.HandleIcon,{orientation:O,minimal:_})})}),m.jsx(n.Resizable,{className:M.resizable,ref:C,minHeight:0,minWidth:0,enable:{left:E,top:S},handleComponent:{left:ve("tail"),top:ve("tail")},onResize:te,onResizeStop:ie})]})})};O.defaultProps={orientation:c.HORIZONTAL_ORIENTATION,valueFormatter:Math.floor,displayFormatter:function(e){return e},onChange:o.noop,onStop:o.noop,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1,dimension:"small"};var j=a.withSize({monitorWidth:!0,monitorHeight:!0})(O);exports.AdvancedSlider=O,exports.default=j;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/defineProperty"),i=require("react"),n=require("re-resizable"),a=require("react-sizeme"),r=require("classnames"),o=require("lodash"),l=require("../shared/useThrottledCallback.js"),d=require("./Handle.js"),s=require("./icons/HandleIcon.js"),u=require("./utils.js"),h=require("./styles/sliderStyles.js");require("./styles/handleStyles.js");var c=require("./constants.js"),m=require("react/jsx-runtime");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=f(e),p=f(t),b=f(r);function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){p.default(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w="twoValuesSliderDefault",O=function(e){var t,a,r=e.min,o=e.max,f=e.value,g=e.size,O=e.orientation,j=e.valueFormatter,I=e.displayFormatter,R=e.editableHandles,x=e.onChange,H=e.onStop,A=e.reversed,N=e.handlePosition,T=e.handleClasses,_=e.minimal,P=e.dimension,M=h.useSliderStyles(),z=i.useRef(null),C=i.useRef(null),E=O===c.HORIZONTAL_ORIENTATION,S=O===c.VERTICAL_ORIENTATION,q=_?g:y(y({},g),{},{width:E?g.width-2*c.INPUT_WIDTH:g.width,height:S?g.height-2*c.INPUT_HEIGHT:g.height}),L=i.useState([j(null==f?void 0:f.at(0)),j(null==f?void 0:f.at(1))]),W=v.default(L,2),k=W[0],G=W[1],D=i.useRef(null),B=i.useState(!1),F=v.default(B,2),V=F[0],X=F[1],Y=v.default(k,2),Z=Y[0],U=Y[1],J=u.getSizedControls({isHorizontalOrientation:E,size:q,max:o,min:r,tail:U,head:Z}),K=J.headMaxWidth,Q=J.tailMaxWidth,$=J.headMaxHeight,ee=J.tailMaxHeight;i.useEffect((function(){if(!D.current){var e=[j(null==f?void 0:f.at(0)),j(null==f?void 0:f.at(1))],t=Math.min.apply(Math,e),i=Math.max.apply(Math,e);G([t,i])}}),[null==f?void 0:f.at(0),null==f?void 0:f.at(1)]),i.useEffect((function(){if(E){var e=q.width/(o-r)*(Z-r),t=q.width/(o-r)*(o-U);z.current.updateSize({width:A?t:e,height:q.height}),C.current.updateSize({width:A?e:t,height:q.height})}else if(S){var i=q.height/(o-r)*(Z-r),n=q.height/(o-r)*(o-U);z.current.updateSize({width:q.width,height:A?n:i}),C.current.updateSize({width:q.width,height:A?i:n})}}),[r,o,Z,U,q.width,q.height,O]),i.useEffect((function(){var e=function(){document.removeEventListener("mousemove",re),document.removeEventListener("mouseup",oe),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",de)};return V?(document.addEventListener("mousemove",re),document.addEventListener("mouseup",oe),document.addEventListener("touchmove",le),document.addEventListener("touchend",de)):(e(),H()),function(){e()}}),[V]);var te=l.useThrottledCallback((function(e,t,i){D.current="onResize Event";var n=i.clientWidth,a=i.clientHeight,l=Z,d=U;"right"===t?A?d=j(o-n/q.width*(o-r)):l=j(r+n/q.width*(o-r)):"left"===t?A?l=j(r+n/q.width*(o-r)):d=j(o-n/q.width*(o-r)):"bottom"===t?A?d=j(o-a/q.height*(o-r)):l=j(r+a/q.height*(o-r)):"top"===t&&(A?l=j(r+a/q.height*(o-r)):d=j(o-a/q.height*(o-r))),l=Math.min(l,U),d=Math.max(d,Z),G([l,d]),x([l,d])})),ie=l.useThrottledCallback((function(){D.current=null,H()})),ne=function(e,t){D.current={xPos:e,yPos:t,head:Z,tail:U}},ae=function(e,t){if(D.current){var i;E?i=(D.current.xPos-e)/q.width*(o-r):S&&(i=(D.current.yPos-t)/q.height*(o-r));var n,a,l=D.current.head-i*(A?-1:1),d=D.current.tail-i*(A?-1:1),s=D.current.tail-D.current.head;l<=r?(n=r,a=r+s):d>=o?(n=o-s,a=o):(n=l,a=d),n=j(n),a=j(a),G([n,a]),x([n,a])}},re=l.useThrottledCallback((function(e){ae(e.clientX,e.clientY)})),oe=l.useThrottledCallback((function(){D.current=null,X(!1)})),le=l.useThrottledCallback((function(e){ae(e.touches[0].pageX,e.touches[0].pageY)})),de=l.useThrottledCallback((function(){D.current=null,X(!1)})),se=l.useThrottledCallback((function(e){G([e,U]),x([e,U]),H()})),ue=l.useThrottledCallback((function(e){G([Z,e]),x([Z,e]),H()})),he=i.useMemo((function(){return(U-Z)/(o-r)*(S?q.height:q.width)<30}),[r,o,Z,U]),ce=i.useMemo((function(){return(U-Z)/(o-r)*(S?q.height:q.width)<c.INNER_GAP}),[r,o,Z,U]),me=function(e,t){return e/t*(S?q.height:q.width)},fe=i.useMemo((function(){var e=E?c.HORIZONTAL_MIN_GAP:c.VERTICAL_MIN_GAP;return A?{isRightArrowInvisible:me(Z,o)<c.MIN_ARROW_GAP,isLeftArrowInvisible:me(o-U,o)<c.MIN_ARROW_GAP,distance:(U-Z)/(o-r)*(S?q.height:q.width)-e}:{isRightArrowInvisible:me(o-U,o)<c.MIN_ARROW_GAP,isLeftArrowInvisible:me(Z,o)<c.MIN_ARROW_GAP,distance:(U-Z)/(o-r)*(S?q.height:q.width)-e}}),[r,o,Z,U,A]),ve=function(e){var t={min:r,max:U,value:Z,onChange:se},i={min:Z,max:o,value:U,onChange:ue};return"head"===e?m.jsx(d.Handle,y({"data-testid":"".concat(w,"_handle_top"),placement:"head",dimension:P,readOnly:!R,isInsideArrowsVisible:ce,arrowsOutsideConfig:fe,displayFormatter:I,orientation:O,classes:T,minimal:_},A?i:t)):"tail"===e?m.jsx(d.Handle,y({"data-testid":"".concat(w,"_handle_bottom"),placement:"tail",dimension:P,readOnly:!R,isInsideArrowsVisible:ce,arrowsOutsideConfig:fe,displayFormatter:I,orientation:O,classes:T,minimal:_},A?t:i)):null};return m.jsx("div",{className:b.default(M.rootWrapper,M["".concat(O,"-").concat(P)],p.default({},M.rootMinimal,_)),children:m.jsxs("div",{className:b.default(M.root,(t={},p.default(t,M.horizontalRoot,E),p.default(t,M.verticalRoot,S),p.default(t,M.minimal,_),t)),children:[m.jsx(n.Resizable,{className:M.resizable,ref:z,minHeight:0,minWidth:0,maxWidth:A?Q:K,maxHeight:A?ee:$,enable:{right:E,bottom:S},handleComponent:{right:ve("head"),bottom:ve("head")},onResize:te,onResizeStop:ie}),m.jsx("div",{className:M.body,"data-testid":"slider-body",onMouseDown:function(e){ne(e.clientX,e.clientY),X(!0)},onTouchStart:function(e){ne(e.touches[0].pageX,e.touches[0].pageY),X(!0)},children:he?m.jsx("div",{className:b.default((a={},p.default(a,M.horizontalBodyHandle,E),p.default(a,M.verticalBodyHandle,S),p.default(a,M.leftBodyHandle,"left"===N),p.default(a,M.rightBodyHandle,"right"===N),p.default(a,M.topBodyHandle,"top"===N),p.default(a,M.bottomBodyHandle,"bottom"===N),a)),children:m.jsx("div",{className:M.bodyHandle,"data-testid":"".concat(w,"_handle"),children:m.jsx(s.HandleIcon,{orientation:"vertical",minimal:_})})}):m.jsx("div",{className:M.bodyHandleIcon,"data-testid":"".concat(w,"_handle"),children:m.jsx(s.HandleIcon,{orientation:O,minimal:_})})}),m.jsx(n.Resizable,{className:M.resizable,ref:C,minHeight:0,minWidth:0,enable:{left:E,top:S},handleComponent:{left:ve("tail"),top:ve("tail")},onResize:te,onResizeStop:ie})]})})};O.defaultProps={orientation:c.HORIZONTAL_ORIENTATION,valueFormatter:Math.floor,displayFormatter:function(e){return e},onChange:o.noop,onStop:o.noop,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1,dimension:"small"};var j=a.withSize({monitorWidth:!0,monitorHeight:!0})(O);exports.AdvancedSlider=O,exports.default=j;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),s=require("react"),t=require("@material-ui/core"),r=require("classnames"),a=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("./styles/sliderStyles.js");var n=require("./styles/handleStyles.js"),l=require("./utils.js"),o=require("./constants.js"),u=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(e),f=c(i),m=c(r);exports.Handle=function(e){var i,r,c,v,I=e.value,h=e.orientation,j=e.placement,q=e.readOnly,p=e.onChange,R=e.min,A=e.max,b=e.displayFormatter,H=e.isInsideArrowsVisible,y=e.arrowsOutsideConfig,g=e.classes,O=e.minimal,N=e["data-testid"],T=s.useState(!1),w=f.default(T,2),E=w[0],x=w[1],C=s.useState(I),L=f.default(C,2),V=L[0],z=L[1],S=s.useRef(null),P=h===o.HORIZONTAL_ORIENTATION,_=h===o.VERTICAL_ORIENTATION,F=j===o.HEAD_PLACEMENT,M=n.useHandleStyles({distance:null==y?void 0:y.distance,minimal:O}),k=function(e){if(!q){var i=Number(e);l.getIsInputValueValid(i)?p(l.getValidatedValue(i,R,A)):x(!0)}};return s.useEffect((function(){z(I),E&&x(!1)}),[I]),u.jsxs("div",{className:m.default(M.root,g.handleRoot,(i={},d.default(i,M.horizontalHeadRoot,P&&F),d.default(i,M.horizontalTailRoot,P&&!F),d.default(i,M.verticalHeadRoot,_&&F),d.default(i,M.verticalTailRoot,_&&!F),d.default(i,M.minimalHandleRoot,O),i)),children:[!O&&u.jsx(a.LeftIcon,{size:16,className:m.default(M.leftArrow,(r={},d.default(r,M.reversedLeftArrow,_),d.default(r,M.isInvisible,H&&!F||F&&(null==y?void 0:y.isLeftArrowInvisible)),r)),fill:"white"}),u.jsx("div",{className:m.default(M.handle,g.handle,(c={},d.default(c,M.horizontalHeadHandle,P&&F),d.default(c,M.horizontalTailHandle,P&&!F),d.default(c,M.verticalHeadHandle,_&&F),d.default(c,M.verticalTailHandle,_&&!F),d.default(c,M.minimalHandle,O),d.default(c,M.minimalVerticalHandle,O&&_),c)),"data-testid":N,children:!O&&u.jsx(t.Input,{inputProps:{"data-testid":"handle-input"},readOnly:q,inputRef:S,onKeyDown:function(e){var i=e.keyCode,s=e.target;13===i&&k(s.value)},onBlur:function(e){var i=e.target;k(i.value)},classes:{root:m.default(M.inputRoot,E&&M.hasError)},value:q?b(V):V,onChange:function(e){var i=e.target.value;z(i),E&&x(!1)},disableUnderline:!0,error:!(Number.isFinite(+V)&&+V>=R&&+V<=A)})}),!O&&u.jsx(a.RightIcon,{size:16,className:m.default(M.rightArrow,(v={},d.default(v,M.reversedRightArrow,_),d.default(v,M.isInvisible,H&&F||!F&&(null==y?void 0:y.isRightArrowInvisible)),v)),fill:"white"})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),s=require("react"),r=require("@material-ui/core"),t=require("classnames"),a=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("./styles/sliderStyles.js");var n=require("./styles/handleStyles.js"),l=require("./utils.js"),o=require("./constants.js"),u=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(e),f=d(i),m=d(t);exports.Handle=function(e){var i,t,d,I,v=e.value,R=e.orientation,h=e.placement,A=e.dimension,H=e.readOnly,j=e.onChange,q=e.min,E=e.max,p=e.displayFormatter,O=e.isInsideArrowsVisible,_=e.arrowsOutsideConfig,N=e.classes,T=e.minimal,b=e["data-testid"],g=s.useState(!1),y=f.default(g,2),w=y[0],V=y[1],x=s.useState(v),C=f.default(x,2),S=C[0],L=C[1],z=s.useRef(null),D=R===o.HORIZONTAL_ORIENTATION,M=R===o.VERTICAL_ORIENTATION,P=h===o.HEAD_PLACEMENT,F=n.useHandleStyles({distance:null==_?void 0:_.distance,minimal:T,hoverAreaHeight:D?o.HOVER_ARREA_WIDTH_BY_DIMENSION[A]:o.HOVER_ARREA_HEIGHT,hoverAreaWidth:D?o.HOVER_ARREA_HEIGHT:o.HOVER_ARREA_WIDTH_BY_DIMENSION[A]}),W=function(e){if(!H){var i=Number(e);l.getIsInputValueValid(i)?j(l.getValidatedValue(i,q,E)):V(!0)}};return s.useEffect((function(){L(v),w&&V(!1)}),[v]),u.jsxs("div",{className:m.default(F.root,N.handleRoot,F[A],(i={},c.default(i,F.horizontalHeadRoot,D&&P),c.default(i,F.horizontalTailRoot,D&&!P),c.default(i,F.verticalHeadRoot,M&&P),c.default(i,F.verticalTailRoot,M&&!P),c.default(i,F.minimalHandleRoot,T),i)),children:[u.jsx(a.LeftIcon,{size:16,className:m.default(F.leftArrow,(t={},c.default(t,F.reversedLeftArrow,M),c.default(t,F.isInvisible,O&&!P||P&&(null==_?void 0:_.isLeftArrowInvisible)),t)),fill:"white"}),u.jsx("div",{className:m.default(F.handle,N.handle,(d={},c.default(d,F.horizontalHeadHandle,D&&P),c.default(d,F.horizontalTailHandle,D&&!P),c.default(d,F.verticalHeadHandle,M&&P),c.default(d,F.verticalTailHandle,M&&!P),c.default(d,F.minimalHandle,T),c.default(d,F.minimalVerticalHandle,T&&M),d)),"data-testid":b,children:!T&&u.jsx(r.Input,{inputProps:{"data-testid":"handle-input"},readOnly:H,inputRef:z,onKeyDown:function(e){var i=e.keyCode,s=e.target;13===i&&W(s.value)},onBlur:function(e){var i=e.target;W(i.value)},classes:{root:m.default(F.inputRoot,w&&F.hasError)},value:H?p(S):S,onChange:function(e){var i=e.target.value;L(i),w&&V(!1)},disableUnderline:!0,error:!(Number.isFinite(+S)&&+S>=q&&+S<=E)})}),u.jsx(a.RightIcon,{size:16,className:m.default(F.rightArrow,(I={},c.default(I,F.reversedRightArrow,M),c.default(I,F.isInvisible,O&&P||!P&&(null==_?void 0:_.isRightArrowInvisible)),I)),fill:"white"})]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.HEAD_PLACEMENT="head",exports.HORIZONTAL_MIN_GAP=48,exports.HORIZONTAL_ORIENTATION="horizontal",exports.HOVER_AREA_HEIGHT=64,exports.HOVER_ARREA_WIDTH=72,exports.INNER_GAP=24,exports.INPUT_HEIGHT=20,exports.INPUT_VALUE_REGEX=/^[0-9.-]*$/,exports.INPUT_WIDTH=47,exports.MIN_ARROW_GAP=12,exports.VERTICAL_MIN_GAP=90,exports.VERTICAL_ORIENTATION="vertical";
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r,t=e(require("@babel/runtime/helpers/defineProperty")),I={small:"small",medium:"medium",large:"large"},o=(r={},t.default(r,I.small,40),t.default(r,I.medium,64),t.default(r,I.large,120),r);exports.DIMENSION=I,exports.HEAD_PLACEMENT="head",exports.HORIZONTAL_MIN_GAP=48,exports.HORIZONTAL_ORIENTATION="horizontal",exports.HOVER_ARREA_HEIGHT=40,exports.HOVER_ARREA_WIDTH_BY_DIMENSION=o,exports.INNER_GAP=24,exports.INPUT_HEIGHT=20,exports.INPUT_VALUE_REGEX=/^[0-9.-]*$/,exports.INPUT_WIDTH=47,exports.MIN_ARROW_GAP=12,exports.VERTICAL_MIN_GAP=90,exports.VERTICAL_ORIENTATION="vertical";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),t=require("@material-ui/core"),e=require("../constants.js"),i=require("../utils.js");function o(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var n=o(r);function a(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,i)}return e}function d(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?a(Object(e),!0).forEach((function(t){n.default(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var l={minWidth:47,height:20,borderRadius:4},p=t.makeStyles((function(r){var t=r.isLightTheme,o=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:o.primary.main},"&:active":{borderColor:o.primary.main},"&:hover $handle":{borderColor:o.primary.main},"&:active $handle":{background:o.primary.dark,borderColor:o.primary.main},"&:hover $inputRoot:not($hasError)":{background:o.primary.dark,border:"1px solid ".concat(o.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(o.background.b6," !important"),border:"1px solid ".concat(o.primary.main)},"&:active $inputRoot":{background:o.primary.dark,border:"1px solid ".concat(o.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(o.error.main," !important"),"&.Mui-focused":{background:"".concat(o.background.b6," !important")},"&:hover":{background:o.background.b6},"&:hover $inputRoot":{background:o.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var t=r.distance;return i.getHoverAreaSize({inititalSize:e.HOVER_AREA_HEIGHT,distance:t})},width:function(r){var t=r.distance;return i.getHoverAreaSize({distance:t,inititalSize:e.HOVER_ARREA_WIDTH})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?d(d({},l),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):l},horizontalTailHandle:function(r){return r.minimal?d(d({},l),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):l},verticalHeadHandle:function(r){return r.minimal?d(d({},l),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):l},verticalTailHandle:function(r){return r.minimal?d(d({},l),{},{borderRadius:"none",borderBottomRightRadius:2,borderBottomLeftRadius:2}):l},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(o.primary.text9),"&:hover":{border:"1px solid ".concat(o.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:o.primary.dark,border:"1px solid ".concat(o.primary.main)}},minimalHandle:{background:o.primary.text9,width:"8px !important",minWidth:"8px !important",minHeight:18,height:"18px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"},"& $horizontalHeadHandle":{borderRadius:"0px !important"}},minimalVerticalHandle:{width:18,minWidth:"18px !important",minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:o.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));exports.useHandleStyles=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),t=require("@material-ui/core"),e=require("../utils.js");function i(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var o=i(r);function n(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,i)}return e}function a(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?n(Object(e),!0).forEach((function(t){o.default(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}var d={minWidth:47,height:20,borderRadius:4},l=t.makeStyles((function(r){var t=r.isLightTheme,i=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:i.primary.main},"&:active":{borderColor:i.primary.main},"&:hover $handle":{borderColor:i.primary.main},"&:active $handle":{background:i.primary.dark,borderColor:i.primary.main},"&:hover $inputRoot:not($hasError)":{background:i.primary.dark,border:"1px solid ".concat(i.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(i.background.b6," !important"),border:"1px solid ".concat(i.primary.main)},"&:active $inputRoot":{background:i.primary.dark,border:"1px solid ".concat(i.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(i.error.main," !important"),"&.Mui-focused":{background:"".concat(i.background.b6," !important")},"&:hover":{background:i.background.b6},"&:hover $inputRoot":{background:i.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var t=r.distance,i=r.hoverAreaHeight;return e.getHoverAreaSize({inititalSize:i,distance:t})},width:function(r){var t=r.distance,i=r.hoverAreaWidth;return e.getHoverAreaSize({distance:t,inititalSize:i})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):d},horizontalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):d},verticalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):d},verticalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"none",borderBottomRightRadius:2,borderBottomLeftRadius:2}):d},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(i.primary.text9),"&:hover":{border:"1px solid ".concat(i.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:i.primary.dark,border:"1px solid ".concat(i.primary.main)}},minimalHandle:{background:i.primary.text9,width:"8px !important",minWidth:"8px !important",minHeight:18,height:"18px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"},"& $horizontalHeadHandle":{borderRadius:"0px !important"}},medium:{"& $minimalHandle":{minHeight:"24px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"24px !important"}},large:{"& $minimalHandle":{minHeight:"48px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"48px !important"}},minimalVerticalHandle:{width:18,minWidth:"18px !important",minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:i.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));exports.useHandleStyles=l;
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import{useRef as i,useState as n,useEffect as o,useMemo as r}from"react";import{Resizable as a}from"re-resizable";import{withSize as l}from"react-sizeme";import d from"classnames";import{noop as h}from"lodash";import{useThrottledCallback as s}from"../shared/useThrottledCallback.js";import{Handle as c}from"./Handle.js";import{HandleIcon as m}from"./icons/HandleIcon.js";import{getSizedControls as u}from"./utils.js";import{useSliderStyles as f}from"./styles/sliderStyles.js";import"./styles/handleStyles.js";import{HORIZONTAL_ORIENTATION as p,INPUT_WIDTH as v,INPUT_HEIGHT as g,INNER_GAP as b,MIN_ARROW_GAP as w,VERTICAL_ORIENTATION as y,HORIZONTAL_MIN_GAP as O,VERTICAL_MIN_GAP as H}from"./constants.js";import{jsx as j,jsxs as z}from"react/jsx-runtime";function x(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?x(Object(n),!0).forEach((function(i){e(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S="twoValuesSliderDefault",M=function(l){var h,x,M=l.min,C=l.max,E=l.value,L=l.size,R=l.orientation,I=l.valueFormatter,N=l.displayFormatter,W=l.editableHandles,A=l.onChange,B=l.onStop,D=l.reversed,F=l.handlePosition,_=l.handleClasses,X=l.minimal,Y=l.dimension,T=f(),V=i(null),k=i(null),q=R===p,G=R===y,J=X?L:P(P({},L),{},{width:q?L.width-2*v:L.width,height:G?L.height-2*g:L.height}),K=n([I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))]),Q=t(K,2),U=Q[0],Z=Q[1],$=i(null),tt=n(!1),et=t(tt,2),it=et[0],nt=et[1],ot=t(U,2),rt=ot[0],at=ot[1],lt=u({isHorizontalOrientation:q,size:J,max:C,min:M,tail:at,head:rt}),dt=lt.headMaxWidth,ht=lt.tailMaxWidth,st=lt.headMaxHeight,ct=lt.tailMaxHeight;o((function(){if(!$.current){var t=[I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))],e=Math.min.apply(Math,t),i=Math.max.apply(Math,t);Z([e,i])}}),[null==E?void 0:E.at(0),null==E?void 0:E.at(1)]),o((function(){if(q){var t=J.width/(C-M)*(rt-M),e=J.width/(C-M)*(C-at);V.current.updateSize({width:D?e:t,height:J.height}),k.current.updateSize({width:D?t:e,height:J.height})}else if(G){var i=J.height/(C-M)*(rt-M),n=J.height/(C-M)*(C-at);V.current.updateSize({width:J.width,height:D?n:i}),k.current.updateSize({width:J.width,height:D?i:n})}}),[M,C,rt,at,J.width,J.height,R]),o((function(){var t=function(){document.removeEventListener("mousemove",vt),document.removeEventListener("mouseup",gt),document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",wt)};return it?(document.addEventListener("mousemove",vt),document.addEventListener("mouseup",gt),document.addEventListener("touchmove",bt),document.addEventListener("touchend",wt)):(t(),B()),function(){t()}}),[it]);var mt=s((function(t,e,i){$.current="onResize Event";var n=i.clientWidth,o=i.clientHeight,r=rt,a=at;"right"===e?D?a=I(C-n/J.width*(C-M)):r=I(M+n/J.width*(C-M)):"left"===e?D?r=I(M+n/J.width*(C-M)):a=I(C-n/J.width*(C-M)):"bottom"===e?D?a=I(C-o/J.height*(C-M)):r=I(M+o/J.height*(C-M)):"top"===e&&(D?r=I(M+o/J.height*(C-M)):a=I(C-o/J.height*(C-M))),r=Math.min(r,at),a=Math.max(a,rt),Z([r,a]),A([r,a])})),ut=s((function(){$.current=null,B()})),ft=function(t,e){$.current={xPos:t,yPos:e,head:rt,tail:at}},pt=function(t,e){if($.current){var i;q?i=($.current.xPos-t)/J.width*(C-M):G&&(i=($.current.yPos-e)/J.height*(C-M));var n,o,r=$.current.head-i*(D?-1:1),a=$.current.tail-i*(D?-1:1),l=$.current.tail-$.current.head;r<=M?(n=M,o=M+l):a>=C?(n=C-l,o=C):(n=r,o=a),n=I(n),o=I(o),Z([n,o]),A([n,o])}},vt=s((function(t){pt(t.clientX,t.clientY)})),gt=s((function(){$.current=null,nt(!1)})),bt=s((function(t){pt(t.touches[0].pageX,t.touches[0].pageY)})),wt=s((function(){$.current=null,nt(!1)})),yt=s((function(t){Z([t,at]),A([t,at]),B()})),Ot=s((function(t){Z([rt,t]),A([rt,t]),B()})),Ht=r((function(){return(at-rt)/(C-M)*(G?J.height:J.width)<30}),[M,C,rt,at]),jt=r((function(){return(at-rt)/(C-M)*(G?J.height:J.width)<b}),[M,C,rt,at]),zt=function(t,e){return t/e*(G?J.height:J.width)},xt=r((function(){if(X)return{};var t=q?O:H;return D?{isRightArrowInvisible:zt(rt,C)<w,isLeftArrowInvisible:zt(C-at,C)<w,distance:(at-rt)/(C-M)*(G?J.height:J.width)-t}:{isRightArrowInvisible:zt(C-at,C)<w,isLeftArrowInvisible:zt(rt,C)<w,distance:(at-rt)/(C-M)*(G?J.height:J.width)-t}}),[M,C,rt,at,D]),Pt=function(t){var e={min:M,max:at,value:rt,onChange:yt},i={min:rt,max:C,value:at,onChange:Ot};return"head"===t?j(c,P({"data-testid":"".concat(S,"_handle_top"),placement:"head",readOnly:!W,isInsideArrowsVisible:jt,arrowsOutsideConfig:xt,displayFormatter:N,orientation:R,classes:_,minimal:X},D?i:e)):"tail"===t?j(c,P({"data-testid":"".concat(S,"_handle_bottom"),placement:"tail",readOnly:!W,isInsideArrowsVisible:jt,arrowsOutsideConfig:xt,displayFormatter:N,orientation:R,classes:_,minimal:X},D?e:i)):null};return j("div",{className:d(T.rootWrapper,T["".concat(R,"-").concat(Y)],e({},T.rootMinimal,X)),children:z("div",{className:d(T.root,(h={},e(h,T.horizontalRoot,q),e(h,T.verticalRoot,G),e(h,T.minimal,X),h)),children:[j(a,{className:T.resizable,ref:V,minHeight:0,minWidth:0,maxWidth:D?ht:dt,maxHeight:D?ct:st,enable:{right:q,bottom:G},handleComponent:{right:Pt("head"),bottom:Pt("head")},onResize:mt,onResizeStop:ut}),j("div",{className:T.body,"data-testid":"slider-body",onMouseDown:function(t){ft(t.clientX,t.clientY),nt(!0)},onTouchStart:function(t){ft(t.touches[0].pageX,t.touches[0].pageY),nt(!0)},children:j("div",Ht?{className:d((x={},e(x,T.horizontalBodyHandle,q),e(x,T.verticalBodyHandle,G),e(x,T.leftBodyHandle,"left"===F),e(x,T.rightBodyHandle,"right"===F),e(x,T.topBodyHandle,"top"===F),e(x,T.bottomBodyHandle,"bottom"===F),x)),children:j("div",{className:T.bodyHandle,"data-testid":"".concat(S,"_handle"),children:j(m,{orientation:"vertical",minimal:X})})}:{className:T.bodyHandleIcon,"data-testid":"".concat(S,"_handle"),children:j(m,{orientation:R,minimal:X})})}),j(a,{className:T.resizable,ref:k,minHeight:0,minWidth:0,enable:{left:q,top:G},handleComponent:{left:Pt("tail"),top:Pt("tail")},onResize:mt,onResizeStop:ut})]})})};M.defaultProps={orientation:p,valueFormatter:Math.floor,displayFormatter:function(t){return t},onChange:h,onStop:h,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1,dimension:"small"};var C=l({monitorWidth:!0,monitorHeight:!0})(M);export{M as AdvancedSlider,C as default};
1
+ import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import{useRef as i,useState as n,useEffect as o,useMemo as r}from"react";import{Resizable as a}from"re-resizable";import{withSize as l}from"react-sizeme";import d from"classnames";import{noop as s}from"lodash";import{useThrottledCallback as h}from"../shared/useThrottledCallback.js";import{Handle as c}from"./Handle.js";import{HandleIcon as m}from"./icons/HandleIcon.js";import{getSizedControls as u}from"./utils.js";import{useSliderStyles as f}from"./styles/sliderStyles.js";import"./styles/handleStyles.js";import{HORIZONTAL_ORIENTATION as p,INPUT_WIDTH as v,INPUT_HEIGHT as g,INNER_GAP as b,MIN_ARROW_GAP as w,VERTICAL_ORIENTATION as y,HORIZONTAL_MIN_GAP as O,VERTICAL_MIN_GAP as H}from"./constants.js";import{jsx as j,jsxs as z}from"react/jsx-runtime";function x(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?x(Object(n),!0).forEach((function(i){e(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S="twoValuesSliderDefault",M=function(l){var s,x,M=l.min,C=l.max,E=l.value,L=l.size,R=l.orientation,I=l.valueFormatter,N=l.displayFormatter,W=l.editableHandles,A=l.onChange,B=l.onStop,D=l.reversed,F=l.handlePosition,_=l.handleClasses,X=l.minimal,Y=l.dimension,T=f(),V=i(null),k=i(null),q=R===p,G=R===y,J=X?L:P(P({},L),{},{width:q?L.width-2*v:L.width,height:G?L.height-2*g:L.height}),K=n([I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))]),Q=t(K,2),U=Q[0],Z=Q[1],$=i(null),tt=n(!1),et=t(tt,2),it=et[0],nt=et[1],ot=t(U,2),rt=ot[0],at=ot[1],lt=u({isHorizontalOrientation:q,size:J,max:C,min:M,tail:at,head:rt}),dt=lt.headMaxWidth,st=lt.tailMaxWidth,ht=lt.headMaxHeight,ct=lt.tailMaxHeight;o((function(){if(!$.current){var t=[I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))],e=Math.min.apply(Math,t),i=Math.max.apply(Math,t);Z([e,i])}}),[null==E?void 0:E.at(0),null==E?void 0:E.at(1)]),o((function(){if(q){var t=J.width/(C-M)*(rt-M),e=J.width/(C-M)*(C-at);V.current.updateSize({width:D?e:t,height:J.height}),k.current.updateSize({width:D?t:e,height:J.height})}else if(G){var i=J.height/(C-M)*(rt-M),n=J.height/(C-M)*(C-at);V.current.updateSize({width:J.width,height:D?n:i}),k.current.updateSize({width:J.width,height:D?i:n})}}),[M,C,rt,at,J.width,J.height,R]),o((function(){var t=function(){document.removeEventListener("mousemove",vt),document.removeEventListener("mouseup",gt),document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",wt)};return it?(document.addEventListener("mousemove",vt),document.addEventListener("mouseup",gt),document.addEventListener("touchmove",bt),document.addEventListener("touchend",wt)):(t(),B()),function(){t()}}),[it]);var mt=h((function(t,e,i){$.current="onResize Event";var n=i.clientWidth,o=i.clientHeight,r=rt,a=at;"right"===e?D?a=I(C-n/J.width*(C-M)):r=I(M+n/J.width*(C-M)):"left"===e?D?r=I(M+n/J.width*(C-M)):a=I(C-n/J.width*(C-M)):"bottom"===e?D?a=I(C-o/J.height*(C-M)):r=I(M+o/J.height*(C-M)):"top"===e&&(D?r=I(M+o/J.height*(C-M)):a=I(C-o/J.height*(C-M))),r=Math.min(r,at),a=Math.max(a,rt),Z([r,a]),A([r,a])})),ut=h((function(){$.current=null,B()})),ft=function(t,e){$.current={xPos:t,yPos:e,head:rt,tail:at}},pt=function(t,e){if($.current){var i;q?i=($.current.xPos-t)/J.width*(C-M):G&&(i=($.current.yPos-e)/J.height*(C-M));var n,o,r=$.current.head-i*(D?-1:1),a=$.current.tail-i*(D?-1:1),l=$.current.tail-$.current.head;r<=M?(n=M,o=M+l):a>=C?(n=C-l,o=C):(n=r,o=a),n=I(n),o=I(o),Z([n,o]),A([n,o])}},vt=h((function(t){pt(t.clientX,t.clientY)})),gt=h((function(){$.current=null,nt(!1)})),bt=h((function(t){pt(t.touches[0].pageX,t.touches[0].pageY)})),wt=h((function(){$.current=null,nt(!1)})),yt=h((function(t){Z([t,at]),A([t,at]),B()})),Ot=h((function(t){Z([rt,t]),A([rt,t]),B()})),Ht=r((function(){return(at-rt)/(C-M)*(G?J.height:J.width)<30}),[M,C,rt,at]),jt=r((function(){return(at-rt)/(C-M)*(G?J.height:J.width)<b}),[M,C,rt,at]),zt=function(t,e){return t/e*(G?J.height:J.width)},xt=r((function(){var t=q?O:H;return D?{isRightArrowInvisible:zt(rt,C)<w,isLeftArrowInvisible:zt(C-at,C)<w,distance:(at-rt)/(C-M)*(G?J.height:J.width)-t}:{isRightArrowInvisible:zt(C-at,C)<w,isLeftArrowInvisible:zt(rt,C)<w,distance:(at-rt)/(C-M)*(G?J.height:J.width)-t}}),[M,C,rt,at,D]),Pt=function(t){var e={min:M,max:at,value:rt,onChange:yt},i={min:rt,max:C,value:at,onChange:Ot};return"head"===t?j(c,P({"data-testid":"".concat(S,"_handle_top"),placement:"head",dimension:Y,readOnly:!W,isInsideArrowsVisible:jt,arrowsOutsideConfig:xt,displayFormatter:N,orientation:R,classes:_,minimal:X},D?i:e)):"tail"===t?j(c,P({"data-testid":"".concat(S,"_handle_bottom"),placement:"tail",dimension:Y,readOnly:!W,isInsideArrowsVisible:jt,arrowsOutsideConfig:xt,displayFormatter:N,orientation:R,classes:_,minimal:X},D?e:i)):null};return j("div",{className:d(T.rootWrapper,T["".concat(R,"-").concat(Y)],e({},T.rootMinimal,X)),children:z("div",{className:d(T.root,(s={},e(s,T.horizontalRoot,q),e(s,T.verticalRoot,G),e(s,T.minimal,X),s)),children:[j(a,{className:T.resizable,ref:V,minHeight:0,minWidth:0,maxWidth:D?st:dt,maxHeight:D?ct:ht,enable:{right:q,bottom:G},handleComponent:{right:Pt("head"),bottom:Pt("head")},onResize:mt,onResizeStop:ut}),j("div",{className:T.body,"data-testid":"slider-body",onMouseDown:function(t){ft(t.clientX,t.clientY),nt(!0)},onTouchStart:function(t){ft(t.touches[0].pageX,t.touches[0].pageY),nt(!0)},children:j("div",Ht?{className:d((x={},e(x,T.horizontalBodyHandle,q),e(x,T.verticalBodyHandle,G),e(x,T.leftBodyHandle,"left"===F),e(x,T.rightBodyHandle,"right"===F),e(x,T.topBodyHandle,"top"===F),e(x,T.bottomBodyHandle,"bottom"===F),x)),children:j("div",{className:T.bodyHandle,"data-testid":"".concat(S,"_handle"),children:j(m,{orientation:"vertical",minimal:X})})}:{className:T.bodyHandleIcon,"data-testid":"".concat(S,"_handle"),children:j(m,{orientation:R,minimal:X})})}),j(a,{className:T.resizable,ref:k,minHeight:0,minWidth:0,enable:{left:q,top:G},handleComponent:{left:Pt("tail"),top:Pt("tail")},onResize:mt,onResizeStop:ut})]})})};M.defaultProps={orientation:p,valueFormatter:Math.floor,displayFormatter:function(t){return t},onChange:s,onStop:s,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1,dimension:"small"};var C=l({monitorWidth:!0,monitorHeight:!0})(M);export{M as AdvancedSlider,C as default};
@@ -1,7 +1,8 @@
1
- export function Handle({ value, orientation, placement, readOnly, onChange, min, max, displayFormatter, isInsideArrowsVisible, arrowsOutsideConfig, classes, minimal, "data-testid": dataTestId, }: {
1
+ export function Handle({ value, orientation, placement, dimension, readOnly, onChange, min, max, displayFormatter, isInsideArrowsVisible, arrowsOutsideConfig, classes, minimal, "data-testid": dataTestId, }: {
2
2
  value: any;
3
3
  orientation: any;
4
4
  placement: any;
5
+ dimension: any;
5
6
  readOnly: any;
6
7
  onChange: any;
7
8
  min: any;
@@ -1 +1 @@
1
- {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/Handle.js"],"names":[],"mappings":"AAoBO;;;;;;;;;;;;;;gBAgIN"}
1
+ {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/Handle.js"],"names":[],"mappings":"AA0BO;;;;;;;;;;;;;;;gBAqIN"}
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{useState as s,useRef as e,useEffect as r}from"react";import{Input as n}from"@material-ui/core";import t from"classnames";import{LeftIcon as a,RightIcon as l}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"./styles/sliderStyles.js";import{useHandleStyles as c}from"./styles/handleStyles.js";import{getIsInputValueValid as m,getValidatedValue as d}from"./utils.js";import{HORIZONTAL_ORIENTATION as u,VERTICAL_ORIENTATION as p,HEAD_PLACEMENT as v}from"./constants.js";import{jsxs as f,jsx as h}from"react/jsx-runtime";var j=function(j){var I,b,w,y,H=j.value,R=j.orientation,g=j.placement,A=j.readOnly,z=j.onChange,C=j.min,N=j.max,O=j.displayFormatter,T=j.isInsideArrowsVisible,x=j.arrowsOutsideConfig,E=j.classes,F=j.minimal,L=j["data-testid"],P=s(!1),S=i(P,2),k=S[0],q=S[1],M=s(H),V=i(M,2),B=V[0],D=V[1],G=e(null),K=R===u,U=R===p,W=g===v,J=c({distance:null==x?void 0:x.distance,minimal:F}),Q=function(o){if(!A){var i=Number(o);m(i)?z(d(i,C,N)):q(!0)}};return r((function(){D(H),k&&q(!1)}),[H]),f("div",{className:t(J.root,E.handleRoot,(I={},o(I,J.horizontalHeadRoot,K&&W),o(I,J.horizontalTailRoot,K&&!W),o(I,J.verticalHeadRoot,U&&W),o(I,J.verticalTailRoot,U&&!W),o(I,J.minimalHandleRoot,F),I)),children:[!F&&h(a,{size:16,className:t(J.leftArrow,(b={},o(b,J.reversedLeftArrow,U),o(b,J.isInvisible,T&&!W||W&&(null==x?void 0:x.isLeftArrowInvisible)),b)),fill:"white"}),h("div",{className:t(J.handle,E.handle,(w={},o(w,J.horizontalHeadHandle,K&&W),o(w,J.horizontalTailHandle,K&&!W),o(w,J.verticalHeadHandle,U&&W),o(w,J.verticalTailHandle,U&&!W),o(w,J.minimalHandle,F),o(w,J.minimalVerticalHandle,F&&U),w)),"data-testid":L,children:!F&&h(n,{inputProps:{"data-testid":"handle-input"},readOnly:A,inputRef:G,onKeyDown:function(o){var i=o.keyCode,s=o.target;13===i&&Q(s.value)},onBlur:function(o){var i=o.target;Q(i.value)},classes:{root:t(J.inputRoot,k&&J.hasError)},value:A?O(B):B,onChange:function(o){var i=o.target.value;D(i),k&&q(!1)},disableUnderline:!0,error:!(Number.isFinite(+B)&&+B>=C&&+B<=N)})}),!F&&h(l,{size:16,className:t(J.rightArrow,(y={},o(y,J.reversedRightArrow,U),o(y,J.isInvisible,T&&W||!W&&(null==x?void 0:x.isRightArrowInvisible)),y)),fill:"white"})]})};export{j as Handle};
1
+ import o from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{useState as s,useRef as e,useEffect as r}from"react";import{Input as n}from"@material-ui/core";import t from"classnames";import{LeftIcon as a,RightIcon as l}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"./styles/sliderStyles.js";import{useHandleStyles as c}from"./styles/handleStyles.js";import{getIsInputValueValid as m,getValidatedValue as d}from"./utils.js";import{HOVER_ARREA_WIDTH_BY_DIMENSION as u,HOVER_ARREA_HEIGHT as p,HORIZONTAL_ORIENTATION as v,VERTICAL_ORIENTATION as h,HEAD_PLACEMENT as f}from"./constants.js";import{jsxs as j,jsx as I}from"react/jsx-runtime";var b=function(b){var A,H,g,w,y=b.value,R=b.orientation,z=b.placement,C=b.dimension,N=b.readOnly,O=b.onChange,T=b.min,x=b.max,E=b.displayFormatter,F=b.isInsideArrowsVisible,L=b.arrowsOutsideConfig,P=b.classes,S=b.minimal,k=b["data-testid"],q=s(!1),M=i(q,2),V=M[0],W=M[1],B=s(y),D=i(B,2),G=D[0],K=D[1],U=e(null),J=R===v,Q=R===h,X=z===f,Y=c({distance:null==L?void 0:L.distance,minimal:S,hoverAreaHeight:J?u[C]:p,hoverAreaWidth:J?p:u[C]}),Z=function(o){if(!N){var i=Number(o);m(i)?O(d(i,T,x)):W(!0)}};return r((function(){K(y),V&&W(!1)}),[y]),j("div",{className:t(Y.root,P.handleRoot,Y[C],(A={},o(A,Y.horizontalHeadRoot,J&&X),o(A,Y.horizontalTailRoot,J&&!X),o(A,Y.verticalHeadRoot,Q&&X),o(A,Y.verticalTailRoot,Q&&!X),o(A,Y.minimalHandleRoot,S),A)),children:[I(a,{size:16,className:t(Y.leftArrow,(H={},o(H,Y.reversedLeftArrow,Q),o(H,Y.isInvisible,F&&!X||X&&(null==L?void 0:L.isLeftArrowInvisible)),H)),fill:"white"}),I("div",{className:t(Y.handle,P.handle,(g={},o(g,Y.horizontalHeadHandle,J&&X),o(g,Y.horizontalTailHandle,J&&!X),o(g,Y.verticalHeadHandle,Q&&X),o(g,Y.verticalTailHandle,Q&&!X),o(g,Y.minimalHandle,S),o(g,Y.minimalVerticalHandle,S&&Q),g)),"data-testid":k,children:!S&&I(n,{inputProps:{"data-testid":"handle-input"},readOnly:N,inputRef:U,onKeyDown:function(o){var i=o.keyCode,s=o.target;13===i&&Z(s.value)},onBlur:function(o){var i=o.target;Z(i.value)},classes:{root:t(Y.inputRoot,V&&Y.hasError)},value:N?E(G):G,onChange:function(o){var i=o.target.value;K(i),V&&W(!1)},disableUnderline:!0,error:!(Number.isFinite(+G)&&+G>=T&&+G<=x)})}),I(l,{size:16,className:t(Y.rightArrow,(w={},o(w,Y.reversedRightArrow,Q),o(w,Y.isInvisible,F&&X||!X&&(null==L?void 0:L.isRightArrowInvisible)),w)),fill:"white"})]})};export{b as Handle};
@@ -0,0 +1,39 @@
1
+ export namespace chartOptions {
2
+ namespace chart {
3
+ const type: string;
4
+ const height: number;
5
+ const width: number;
6
+ const backgroundColor: string;
7
+ }
8
+ namespace title {
9
+ const text: any;
10
+ }
11
+ namespace credits {
12
+ const enabled: boolean;
13
+ }
14
+ namespace xAxis {
15
+ const visible: boolean;
16
+ }
17
+ namespace yAxis {
18
+ const visible_1: boolean;
19
+ export { visible_1 as visible };
20
+ }
21
+ const series: {
22
+ name: string;
23
+ data: number[];
24
+ }[];
25
+ namespace legend {
26
+ const enabled_1: boolean;
27
+ export { enabled_1 as enabled };
28
+ }
29
+ namespace plotOptions {
30
+ export namespace series_1 {
31
+ namespace marker {
32
+ const enabled_2: boolean;
33
+ export { enabled_2 as enabled };
34
+ }
35
+ }
36
+ export { series_1 as series };
37
+ }
38
+ }
39
+ //# sourceMappingURL=chartOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartOptions.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/chartOptions.js"],"names":[],"mappings":""}
@@ -8,6 +8,13 @@ export const MIN_ARROW_GAP: 12;
8
8
  export const INNER_GAP: 24;
9
9
  export const VERTICAL_MIN_GAP: 90;
10
10
  export const HORIZONTAL_MIN_GAP: 48;
11
- export const HOVER_ARREA_WIDTH: 72;
12
- export const HOVER_AREA_HEIGHT: 64;
11
+ export namespace DIMENSION {
12
+ const small: string;
13
+ const medium: string;
14
+ const large: string;
15
+ }
16
+ export const HOVER_ARREA_WIDTH_BY_DIMENSION: {
17
+ [x: string]: number;
18
+ };
19
+ export const HOVER_ARREA_HEIGHT: 40;
13
20
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/constants.js"],"names":[],"mappings":"AAAA,uCAA8C;AAE9C,8CAA+C;AAC/C,kDAAmD;AACnD,oCAAqC;AAErC,6BAA8B;AAC9B,8BAA+B;AAC/B,+BAAgC;AAChC,2BAA4B;AAE5B,kCAAmC;AACnC,oCAAqC;AAErC,mCAAoC;AACpC,mCAAoC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/constants.js"],"names":[],"mappings":"AAAA,uCAA8C;AAE9C,8CAA+C;AAC/C,kDAAmD;AACnD,oCAAqC;AAErC,6BAA8B;AAC9B,8BAA+B;AAC/B,+BAAgC;AAChC,2BAA4B;AAE5B,kCAAmC;AACnC,oCAAqC;;;;;;AAQrC;;EAIE;AAEF,oCAAqC"}
@@ -1 +1 @@
1
- var a=/^[0-9.-]*$/,r="vertical",e="horizontal",o="head",t=47,h=20,i=12,l=24,v=90,c=48,d=72,n=64;export{o as HEAD_PLACEMENT,c as HORIZONTAL_MIN_GAP,e as HORIZONTAL_ORIENTATION,n as HOVER_AREA_HEIGHT,d as HOVER_ARREA_WIDTH,l as INNER_GAP,h as INPUT_HEIGHT,a as INPUT_VALUE_REGEX,t as INPUT_WIDTH,i as MIN_ARROW_GAP,v as VERTICAL_MIN_GAP,r as VERTICAL_ORIENTATION};
1
+ import e from"@babel/runtime/helpers/defineProperty";var l,r=/^[0-9.-]*$/,m="vertical",a="horizontal",i="head",o=47,t=20,d=12,p=24,s=90,u=48,g={small:"small",medium:"medium",large:"large"},h=(e(l={},g.small,40),e(l,g.medium,64),e(l,g.large,120),l),n=40;export{g as DIMENSION,i as HEAD_PLACEMENT,u as HORIZONTAL_MIN_GAP,a as HORIZONTAL_ORIENTATION,n as HOVER_ARREA_HEIGHT,h as HOVER_ARREA_WIDTH_BY_DIMENSION,p as INNER_GAP,t as INPUT_HEIGHT,r as INPUT_VALUE_REGEX,o as INPUT_WIDTH,d as MIN_ARROW_GAP,s as VERTICAL_MIN_GAP,m as VERTICAL_ORIENTATION};
@@ -1,2 +1,2 @@
1
- export const useHandleStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"handle" | "root" | "inputRoot" | "hasError" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "minimalHandle" | "minimalVerticalHandle" | "minimalHandleRoot" | "leftArrow" | "rightArrow" | "reversedLeftArrow" | "reversedRightArrow" | "isInvisible">;
1
+ export const useHandleStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"large" | "medium" | "handle" | "root" | "inputRoot" | "hasError" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "minimalHandle" | "minimalVerticalHandle" | "minimalHandleRoot" | "leftArrow" | "rightArrow" | "reversedLeftArrow" | "reversedRightArrow" | "isInvisible">;
2
2
  //# sourceMappingURL=handleStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handleStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/handleStyles.js"],"names":[],"mappings":"AAaA,4dAsNI"}
1
+ {"version":3,"file":"handleStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/handleStyles.js"],"names":[],"mappings":"AAYA,ifA0OI"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as t}from"@material-ui/core";import{HOVER_AREA_HEIGHT as e,HOVER_ARREA_WIDTH as o}from"../constants.js";import{getHoverAreaSize as i}from"../utils.js";function n(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,o)}return e}function a(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}var d={minWidth:47,height:20,borderRadius:4},p=t((function(r){var t=r.isLightTheme,n=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:n.primary.main},"&:active":{borderColor:n.primary.main},"&:hover $handle":{borderColor:n.primary.main},"&:active $handle":{background:n.primary.dark,borderColor:n.primary.main},"&:hover $inputRoot:not($hasError)":{background:n.primary.dark,border:"1px solid ".concat(n.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(n.background.b6," !important"),border:"1px solid ".concat(n.primary.main)},"&:active $inputRoot":{background:n.primary.dark,border:"1px solid ".concat(n.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(n.error.main," !important"),"&.Mui-focused":{background:"".concat(n.background.b6," !important")},"&:hover":{background:n.background.b6},"&:hover $inputRoot":{background:n.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var t=r.distance;return i({inititalSize:e,distance:t})},width:function(r){var t=r.distance;return i({distance:t,inititalSize:o})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):d},horizontalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):d},verticalHeadHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):d},verticalTailHandle:function(r){return r.minimal?a(a({},d),{},{borderRadius:"none",borderBottomRightRadius:2,borderBottomLeftRadius:2}):d},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(n.primary.text9),"&:hover":{border:"1px solid ".concat(n.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:n.primary.dark,border:"1px solid ".concat(n.primary.main)}},minimalHandle:{background:n.primary.text9,width:"8px !important",minWidth:"8px !important",minHeight:18,height:"18px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"},"& $horizontalHeadHandle":{borderRadius:"0px !important"}},minimalVerticalHandle:{width:18,minWidth:"18px !important",minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:n.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));export{p as useHandleStyles};
1
+ import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as t}from"@material-ui/core";import{getHoverAreaSize as i}from"../utils.js";function e(r,t){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),i.push.apply(i,e)}return i}function o(t){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?e(Object(o),!0).forEach((function(i){r(t,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}var n={minWidth:47,height:20,borderRadius:4},a=t((function(r){var t=r.isLightTheme,e=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:e.primary.main},"&:active":{borderColor:e.primary.main},"&:hover $handle":{borderColor:e.primary.main},"&:active $handle":{background:e.primary.dark,borderColor:e.primary.main},"&:hover $inputRoot:not($hasError)":{background:e.primary.dark,border:"1px solid ".concat(e.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(e.background.b6," !important"),border:"1px solid ".concat(e.primary.main)},"&:active $inputRoot":{background:e.primary.dark,border:"1px solid ".concat(e.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(e.error.main," !important"),"&.Mui-focused":{background:"".concat(e.background.b6," !important")},"&:hover":{background:e.background.b6},"&:hover $inputRoot":{background:e.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var t=r.distance,e=r.hoverAreaHeight;return i({inititalSize:e,distance:t})},width:function(r){var t=r.distance,e=r.hoverAreaWidth;return i({distance:t,inititalSize:e})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopLeftRadius:2,borderBottomLeftRadius:2}):n},horizontalTailHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopRightRadius:2,borderBottomRightRadius:2}):n},verticalHeadHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"unset",borderTopLeftRadius:2,borderTopRightRadius:2}):n},verticalTailHandle:function(r){return r.minimal?o(o({},n),{},{borderRadius:"none",borderBottomRightRadius:2,borderBottomLeftRadius:2}):n},inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(e.primary.text9),"&:hover":{border:"1px solid ".concat(e.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:e.primary.dark,border:"1px solid ".concat(e.primary.main)}},minimalHandle:{background:e.primary.text9,width:"8px !important",minWidth:"8px !important",minHeight:18,height:"18px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"},"& $horizontalHeadHandle":{borderRadius:"0px !important"}},medium:{"& $minimalHandle":{minHeight:"24px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"24px !important"}},large:{"& $minimalHandle":{minHeight:"48px !important"},"& $minimalVerticalHandle":{minHeight:"8px !important",minWidth:"48px !important"}},minimalVerticalHandle:{width:18,minWidth:"18px !important",minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:e.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));export{a as useHandleStyles};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.87.0-15",
3
+ "version": "0.87.0-16",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"