@corva/ui 0.87.0-15 → 0.87.0-17
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/cjs-bundle/components/AdvancedSlider/AdvancedSlider.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/Handle.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/constants.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/styles/handleStyles.js +1 -1
- package/cjs-bundle/components/Tabs/Tabs.js +1 -1
- package/components/AdvancedSlider/AdvancedSlider.js +1 -1
- package/components/AdvancedSlider/Handle.d.ts +2 -1
- package/components/AdvancedSlider/Handle.d.ts.map +1 -1
- package/components/AdvancedSlider/Handle.js +1 -1
- package/components/AdvancedSlider/chartOptions.d.ts +39 -0
- package/components/AdvancedSlider/chartOptions.d.ts.map +1 -0
- package/components/AdvancedSlider/constants.d.ts +9 -2
- package/components/AdvancedSlider/constants.d.ts.map +1 -1
- package/components/AdvancedSlider/constants.js +1 -1
- package/components/AdvancedSlider/styles/handleStyles.d.ts +1 -1
- package/components/AdvancedSlider/styles/handleStyles.d.ts.map +1 -1
- package/components/AdvancedSlider/styles/handleStyles.js +1 -1
- package/components/Tabs/Tabs.js +1 -1
- package/package.json +1 -1
|
@@ -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(){
|
|
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"),
|
|
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.
|
|
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("../
|
|
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
|
-
"use strict";var t=require('./../../ext-esm/tslib/tslib.es6.js'),o=require("react/jsx-runtime"),r=require("@material-ui/core"),e=require("classnames"),a=require("prop-types");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=i(e),n=i(a),p=r.makeStyles((function(t){return{root:{"& .MuiTab-root":{minHeight:40,paddingLeft:16,paddingRight:16,borderRadius:8,minWidth:0,fontSize:16,marginRight:8,"&.Mui-disabled":{opacity:.4,color:t.palette.primary.text6}},"& .MuiTab-wrapper":{flexDirection:"row",justifyContent:"initial"},"& .MuiTab-wrapper > .i-icon":{marginBottom:"0px !important",marginRight:8},"&.MuiTabs-vertical":{"& .MuiTab-root":{marginRight:0,minHeight:"unset","&:not(:last-child)":{marginBottom:8}}}},rootCompact:{height:32,minHeight:"32px !important","& .MuiTab-root":{minWidth:0,fontSize:16,padding:"6px 10px",height:32,minHeight:"32px !important"},"&.MuiTabs-vertical":{height:"unset",minHeight:"unset"},"& .MuiTab-wrapper > .i-icon, & .MuiTab-wrapper > .i-icon > svg":{width:20,height:20}},root_filled:{minHeight:40,backgroundColor:t.palette.background.b9,boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.2)","& .MuiTab-root":{color:t.palette.primary.text6,"&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main}},"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.05)",color:t.palette.primary.contrastText,opacity:1}}},root_default:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main,backgroundColor:"transparent"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.
|
|
1
|
+
"use strict";var t=require('./../../ext-esm/tslib/tslib.es6.js'),o=require("react/jsx-runtime"),r=require("@material-ui/core"),e=require("classnames"),a=require("prop-types");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=i(e),n=i(a),p=r.makeStyles((function(t){return{root:{"& .MuiTab-root":{minHeight:40,paddingLeft:16,paddingRight:16,borderRadius:8,minWidth:0,fontSize:16,marginRight:8,"&.Mui-disabled":{opacity:.4,color:t.palette.primary.text6}},"& .MuiTab-wrapper":{flexDirection:"row",justifyContent:"initial"},"& .MuiTab-wrapper > .i-icon":{marginBottom:"0px !important",marginRight:8},"&.MuiTabs-vertical":{"& .MuiTab-root":{marginRight:0,minHeight:"unset","&:not(:last-child)":{marginBottom:8}}}},rootCompact:{height:32,minHeight:"32px !important","& .MuiTab-root":{minWidth:0,fontSize:16,padding:"6px 10px",height:32,minHeight:"32px !important"},"&.MuiTabs-vertical":{height:"unset",minHeight:"unset"},"& .MuiTab-wrapper > .i-icon, & .MuiTab-wrapper > .i-icon > svg":{width:20,height:20}},root_filled:{minHeight:40,backgroundColor:t.palette.background.b9,boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.2)","& .MuiTab-root":{color:t.palette.primary.text6,"&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main}},"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.05)",color:t.palette.primary.contrastText,opacity:1}}},root_default:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main,backgroundColor:"transparent"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.08)"}}},root_filledTab:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,fontSize:16,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,backgroundColor:"rgba(3, 188, 212, 0.10)","&:hover":{color:t.palette.primary.main,backgroundColor:"rgba(3, 188, 212, 0.10)"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.08)"},"&.Mui-disabled":{color:t.palette.primary.text9}}},tabIndicatorRoot:{height:4,borderRadius:4},tabIndicatorFilledTab:{display:"none"},scrollButtonsRoot:{backgroundColor:t.palette.background.b9,height:40,zIndex:1,"&:first-of-type":{"&::after":{background:"linear-gradient(to right, rgba(60, 59, 59, 0.8) 39.13%, rgba(58, 58, 58, 0) 100%)",content:'""',display:"block",height:"100%",left:40,position:"absolute",width:16,zIndex:1}},"&:last-of-type":{"&::before":{background:"linear-gradient(to left, rgba(60, 59, 59, 0.8) 39.13%, rgba(58, 58, 58, 0) 100%)",content:'""',display:"block",height:"100%",position:"absolute",right:40,width:16,zIndex:1}},"& .MuiSvgIcon-root":{color:t.palette.primary.text6}}}})),c=function(e){var a,i,n,c=e.compact,s=e.type,d=t.__rest(e,["compact","type"]),u=p(),g=d.classes,b=d.TabIndicatorProps;return o.jsx(r.Tabs,t.__assign({},d,{classes:t.__assign(t.__assign({},g),{root:l.default(null==g?void 0:g.root,u.root,u["root_".concat(s)],(a={},a[u.rootCompact]=c,a)),scrollButtons:l.default(null==g?void 0:g.scrollButtons,u.scrollButtonsRoot)}),indicatorColor:"primary",TabIndicatorProps:t.__assign(t.__assign({},b),{classes:{root:l.default(null===(n=null==b?void 0:b.classes)||void 0===n?void 0:n.root,u.tabIndicatorRoot,(i={},i[u.tabIndicatorFilledTab]="filledTab"===s,i))}})}))};c.propTypes={type:n.default.oneOf(["default","filled","filledTab"]),compact:n.default.bool},c.defaultProps={type:"default",compact:!1},module.exports=c;
|
|
@@ -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
|
|
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":"
|
|
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{
|
|
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
|
|
12
|
-
|
|
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;
|
|
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
|
|
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":"
|
|
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{
|
|
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/components/Tabs/Tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as t,__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{makeStyles as a,Tabs as i}from"@material-ui/core";import e from"classnames";import l from"prop-types";var n=a((function(t){return{root:{"& .MuiTab-root":{minHeight:40,paddingLeft:16,paddingRight:16,borderRadius:8,minWidth:0,fontSize:16,marginRight:8,"&.Mui-disabled":{opacity:.4,color:t.palette.primary.text6}},"& .MuiTab-wrapper":{flexDirection:"row",justifyContent:"initial"},"& .MuiTab-wrapper > .i-icon":{marginBottom:"0px !important",marginRight:8},"&.MuiTabs-vertical":{"& .MuiTab-root":{marginRight:0,minHeight:"unset","&:not(:last-child)":{marginBottom:8}}}},rootCompact:{height:32,minHeight:"32px !important","& .MuiTab-root":{minWidth:0,fontSize:16,padding:"6px 10px",height:32,minHeight:"32px !important"},"&.MuiTabs-vertical":{height:"unset",minHeight:"unset"},"& .MuiTab-wrapper > .i-icon, & .MuiTab-wrapper > .i-icon > svg":{width:20,height:20}},root_filled:{minHeight:40,backgroundColor:t.palette.background.b9,boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.2)","& .MuiTab-root":{color:t.palette.primary.text6,"&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main}},"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.05)",color:t.palette.primary.contrastText,opacity:1}}},root_default:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main,backgroundColor:"transparent"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.
|
|
1
|
+
import{__rest as t,__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{makeStyles as a,Tabs as i}from"@material-ui/core";import e from"classnames";import l from"prop-types";var n=a((function(t){return{root:{"& .MuiTab-root":{minHeight:40,paddingLeft:16,paddingRight:16,borderRadius:8,minWidth:0,fontSize:16,marginRight:8,"&.Mui-disabled":{opacity:.4,color:t.palette.primary.text6}},"& .MuiTab-wrapper":{flexDirection:"row",justifyContent:"initial"},"& .MuiTab-wrapper > .i-icon":{marginBottom:"0px !important",marginRight:8},"&.MuiTabs-vertical":{"& .MuiTab-root":{marginRight:0,minHeight:"unset","&:not(:last-child)":{marginBottom:8}}}},rootCompact:{height:32,minHeight:"32px !important","& .MuiTab-root":{minWidth:0,fontSize:16,padding:"6px 10px",height:32,minHeight:"32px !important"},"&.MuiTabs-vertical":{height:"unset",minHeight:"unset"},"& .MuiTab-wrapper > .i-icon, & .MuiTab-wrapper > .i-icon > svg":{width:20,height:20}},root_filled:{minHeight:40,backgroundColor:t.palette.background.b9,boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.2)","& .MuiTab-root":{color:t.palette.primary.text6,"&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main}},"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.05)",color:t.palette.primary.contrastText,opacity:1}}},root_default:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,"&:hover":{color:t.palette.primary.main,backgroundColor:"transparent"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.08)"}}},root_filledTab:{minHeight:40,"& .MuiTab-root":{color:t.palette.primary.text6,fontSize:16,minHeight:40,opacity:1,textTransform:"none","&.Mui-selected":{color:t.palette.primary.main,backgroundColor:"rgba(3, 188, 212, 0.10)","&:hover":{color:t.palette.primary.main,backgroundColor:"rgba(3, 188, 212, 0.10)"}},"&:hover":{color:t.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.08)"},"&.Mui-disabled":{color:t.palette.primary.text9}}},tabIndicatorRoot:{height:4,borderRadius:4},tabIndicatorFilledTab:{display:"none"},scrollButtonsRoot:{backgroundColor:t.palette.background.b9,height:40,zIndex:1,"&:first-of-type":{"&::after":{background:"linear-gradient(to right, rgba(60, 59, 59, 0.8) 39.13%, rgba(58, 58, 58, 0) 100%)",content:'""',display:"block",height:"100%",left:40,position:"absolute",width:16,zIndex:1}},"&:last-of-type":{"&::before":{background:"linear-gradient(to left, rgba(60, 59, 59, 0.8) 39.13%, rgba(58, 58, 58, 0) 100%)",content:'""',display:"block",height:"100%",position:"absolute",right:40,width:16,zIndex:1}},"& .MuiSvgIcon-root":{color:t.palette.primary.text6}}}})),p=function(a){var l,p,c,d=a.compact,s=a.type,m=t(a,["compact","type"]),b=n(),g=m.classes,u=m.TabIndicatorProps;return r(i,o({},m,{classes:o(o({},g),{root:e(null==g?void 0:g.root,b.root,b["root_".concat(s)],(l={},l[b.rootCompact]=d,l)),scrollButtons:e(null==g?void 0:g.scrollButtons,b.scrollButtonsRoot)}),indicatorColor:"primary",TabIndicatorProps:o(o({},u),{classes:{root:e(null===(c=null==u?void 0:u.classes)||void 0===c?void 0:c.root,b.tabIndicatorRoot,(p={},p[b.tabIndicatorFilledTab]="filledTab"===s,p))}})}))};p.propTypes={type:l.oneOf(["default","filled","filledTab"]),compact:l.bool},p.defaultProps={type:"default",compact:!1};export{p as default};
|