@jamsrui/circular-progress 0.0.12 → 0.0.13
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/chunk-2XV2B6R3.mjs +1 -0
- package/dist/{chunk-BX7O4L5O.mjs → chunk-4MSHT72C.mjs} +1 -1
- package/dist/{chunk-S2GU4VPD.mjs → chunk-HJ5KJRUM.mjs} +1 -1
- package/dist/circular-progress.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/use-circular-progress.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-Q6AUZAGM.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as r}from"@jamsrui/utils";var e=r({slots:{root:"size-5",track:"stroke-background-secondary",progress:"stroke-success",label:"fill-foreground text-xs"},variants:{isIntermediate:{true:{root:"animate-spin"}},color:{current:{progress:"stroke-current"},default:{progress:"stroke-background-tertiary"},primary:{progress:"stroke-primary"},danger:{progress:"stroke-danger"},success:{progress:"stroke-success"},secondary:{progress:"stroke-secondary"},warning:{progress:"stroke-warning"}}},defaultVariants:{color:"primary",isIntermediate:!0}});export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
1
|
+
import{a as g}from"./chunk-2XV2B6R3.mjs";import{useCallback as i,useMemo as v}from"react";import{cn as p,dataAttrDev as l,mapPropsVariants as L,mergeProps as b}from"@jamsrui/utils";var w=V=>{let[y,W]=L(V,g.variantKeys),{value:n=40,size:r=40,classNames:o,strokeWidth:d,progressWidth:m=d??3,trackWidth:P=d??3,showLabel:k=!1,labelFormatter:f=s=>`${s}%`,slotProps:e,...u}=y,t=(r-Math.max(P,m))/2,c=2*Math.PI*t,C=c-n/100*c,a=g(W),N=i(()=>({width:r,height:r,viewBox:`0 0 ${r} ${r}`,...u,"data-component":l("circular-progress"),"data-slot":l("root"),className:a.root({className:p(o?.root,u.className)})}),[o?.root,u,r,a]),h=i(s=>({cx:r/2,cy:r/2,r:t,fill:"none",stroke:"currentColor",strokeWidth:P,...b(e?.track,s),"data-slot":l("track"),className:a.track({className:p(e?.track?.className,o?.track,s.className)})}),[o?.track,t,r,e?.track,P,a]),x=i(s=>({cx:r/2,cy:r/2,r:t,fill:"none",stroke:"currentColor",strokeWidth:m,strokeDasharray:c,strokeDashoffset:C,strokeLinecap:"round",transform:`rotate(-90) ${r/2} ${r/2}`,...b(e?.progress,s),"data-slot":l("progress"),className:a.progress({className:p(e?.progress?.className,o?.progress,s.className)})}),[c,o?.progress,C,m,t,r,e?.progress,a]),G=i(s=>({x:"50%",y:"50%",textAnchor:"middle",dy:"0.3em",fontSize:"18",...b(e?.label,s),"data-slot":l("label"),className:a.label({className:p(e?.label?.className,o?.label,s.className)})}),[o?.label,e?.label,a]),S=f?f(n):n;return v(()=>({getRootProps:N,getProgressProps:x,getTrackProps:h,getLabelProps:G,showLabel:k,label:S}),[G,x,N,h,S,k])};export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s}from"./chunk-Q2GZXDOX.mjs";import{a as e}from"./chunk-
|
|
1
|
+
import{b as s}from"./chunk-Q2GZXDOX.mjs";import{a as e}from"./chunk-4MSHT72C.mjs";import{mergeConfigProps as u}from"@jamsrui/utils";import{jsx as r,jsxs as m}from"react/jsx-runtime";var b=t=>{let o=s(),c=u(o,o,t),g=e(c),{showLabel:p,getRootProps:P,getTrackProps:i,getLabelProps:a,getProgressProps:l,label:n}=g;return m("svg",{...P({}),children:[r("circle",{...i({})}),r("circle",{...l({})}),!!p&&r("text",{...a({}),children:n})]})};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-HJ5KJRUM.mjs";import"./chunk-Q2GZXDOX.mjs";import"./chunk-4MSHT72C.mjs";import"./chunk-2XV2B6R3.mjs";export{a as CircularProgress};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as e}from"./chunk-
|
|
1
|
+
"use client";import{a as e}from"./chunk-HJ5KJRUM.mjs";import{a as r,b as o}from"./chunk-Q2GZXDOX.mjs";import"./chunk-4MSHT72C.mjs";import"./chunk-2XV2B6R3.mjs";export{e as CircularProgress,r as CircularProgressConfig,o as useCircularProgressConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-2XV2B6R3.mjs";export{a as circularProgressVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-4MSHT72C.mjs";import"./chunk-2XV2B6R3.mjs";export{a as useCircularProgress};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/circular-progress",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/core": "^0.0.
|
|
10
|
-
"@jamsrui/
|
|
8
|
+
"@jamsrui/hooks": "^0.0.13",
|
|
9
|
+
"@jamsrui/core": "^0.0.11",
|
|
10
|
+
"@jamsrui/utils": "^0.0.13"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
package/dist/chunk-Q6AUZAGM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tv as r}from"@jamsrui/utils";var e=r({slots:{root:"",track:"stroke-background-secondary",progress:"stroke-success",label:"fill-foreground text-xs"},variants:{isIntermediate:{true:{root:"animate-spin"}},color:{current:{progress:"stroke-current"},default:{progress:"stroke-background-tertiary"},primary:{progress:"stroke-primary"},danger:{progress:"stroke-danger"},success:{progress:"stroke-success"},secondary:{progress:"stroke-secondary"},warning:{progress:"stroke-warning"}}},defaultVariants:{color:"primary",isIntermediate:!0}});export{e as a};
|