rbro-tat-uds 1.6.26 → 1.6.27
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/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -1429,7 +1429,8 @@ See https://s-c.sh/2BAXzed for more info.`),window[g2]+=1);const U5=t=>e.createE
|
|
1429
1429
|
}
|
1430
1430
|
`,Q0=({id:t,name:i,value:a=0,setValue:n,min:r=0,max:c=100,showSteppers:o=!1,stepSize:C=1,disabled:s=!1,height:h=32,wrapperWidth:m,...p})=>{const g=u.useRef(null),[M,E]=u.useState(!1),v=u.useCallback(Z=>{var j,z;const A=(j=g.current)==null?void 0:j.getBoundingClientRect();if(A){let x;if("touches"in Z?x=(z=Z.touches[0])==null?void 0:z.clientX:"clientX"in Z&&(x=Z.clientX),x!==void 0){const S=x-A.left,b=A.width,y=S/b*(c-r)+r;let F=Math.round(y/C)*C;F=Math.max(r,F),F=Math.min(c,F),n&&n(F)}}},[c,r,n,C]),V=Z=>{if(Z==="minus"){if(a===r)return;if(a-C<r){n&&n(r);return}n&&n(a-C)}else{if(a===c)return;if(a+C>c){n&&n(c);return}n&&n(a+C)}},$=u.useCallback(()=>{n&&n(a),E(!1)},[a,n]),R=u.useCallback(Z=>{M&&v(Z)},[M,v]),k=Z=>{s||(v(Z),E(!0))},_=Z=>{E(!0),v(Z)},w=u.useCallback(Z=>{v(Z)},[v]),H=u.useCallback(()=>{n&&n(a),E(!1)},[a,n]);return u.useEffect(()=>{if(!s)return M&&(window.addEventListener("mousemove",R),window.addEventListener("mouseup",$),window.addEventListener("touchmove",w,{passive:!0}),window.addEventListener("touchend",H)),()=>{window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",$),window.removeEventListener("touchmove",w),window.removeEventListener("touchend",H)}},[M,R,$,H,w,s]),L.jsxs(K0,{$height:h,$showSteppers:o,$disabled:s,$wrapperWidth:m,children:[o&&L.jsx(x1,{disabled:s,icon:"minus",intent:"info",variant:"secondaryOutlined",size:"small",shape:"circle",onClick:()=>V("minus")}),L.jsx(J0,{$disabled:s,ref:g,role:"slider",id:t,"aria-label":i,tabIndex:0,"aria-valuemin":r,"aria-valuemax":c,"aria-valuenow":a,onMouseDown:k,onTouchStart:_,...p,children:L.jsx("div",{children:L.jsx("div",{style:{width:`${(a-r)/(c-r)*100}%`},children:L.jsx("span",{style:{cursor:s?"default":M?"grabbing":"grab",right:`${(a-r)/(c-r)*100*.32-32}px`}})})})}),o&&L.jsx(x1,{disabled:s,icon:"add",intent:"info",variant:"secondaryOutlined",size:"small",shape:"circle",onClick:()=>V("add")})]})},ee=B.div`
|
1431
1431
|
border-radius: 8px;
|
1432
|
-
border: 1px solid
|
1432
|
+
border: 1px solid
|
1433
|
+
${({$featured:t})=>t?l.accent_600:l.gray_200};
|
1433
1434
|
overflow: hidden;
|
1434
1435
|
min-height: 274px;
|
1435
1436
|
box-sizing: border-box;
|
@@ -1459,7 +1460,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[g2]+=1);const U5=t=>e.createE
|
|
1459
1460
|
}
|
1460
1461
|
}
|
1461
1462
|
`:d`
|
1462
|
-
outline: ${t.$featured?`3px solid ${l.
|
1463
|
+
outline: ${t.$featured?`3px solid ${l.accent_300}`:"none"};
|
1463
1464
|
|
1464
1465
|
& > div:first-of-type {
|
1465
1466
|
& > div:first-child {
|