@jamsrui/circular-progress 0.0.9 → 0.0.10
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-BX7O4L5O.mjs +1 -0
- package/dist/chunk-Q2GZXDOX.mjs +1 -0
- package/dist/chunk-Q6AUZAGM.mjs +1 -0
- package/dist/chunk-S2GU4VPD.mjs +1 -0
- package/dist/circular-progress-config.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 +5 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk-Q6AUZAGM.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as r}from"@jamsrui/utils";var[s,e]=r({displayName:"CircularProgressContext"});export{s as a,e as b};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s}from"./chunk-Q2GZXDOX.mjs";import{a as e}from"./chunk-BX7O4L5O.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{
|
|
1
|
+
import{a,b}from"./chunk-Q2GZXDOX.mjs";export{a as CircularProgressConfig,b as useCircularProgressConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-S2GU4VPD.mjs";import"./chunk-Q2GZXDOX.mjs";import"./chunk-BX7O4L5O.mjs";import"./chunk-Q6AUZAGM.mjs";export{a as CircularProgress};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{a as e}from"./chunk-S2GU4VPD.mjs";import{a as r,b as o}from"./chunk-Q2GZXDOX.mjs";import"./chunk-BX7O4L5O.mjs";import"./chunk-Q6AUZAGM.mjs";export{e as CircularProgress,r as CircularProgressConfig,o as useCircularProgressConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-Q6AUZAGM.mjs";export{a as circularProgressVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-BX7O4L5O.mjs";import"./chunk-Q6AUZAGM.mjs";export{a as useCircularProgress};
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/circular-progress",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/hooks": "^0.0.
|
|
9
|
-
"@jamsrui/core": "^0.0.
|
|
10
|
-
"@jamsrui/utils": "^0.0.
|
|
8
|
+
"@jamsrui/hooks": "^0.0.10",
|
|
9
|
+
"@jamsrui/core": "^0.0.9",
|
|
10
|
+
"@jamsrui/utils": "^0.0.10"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.mjs"
|
|
16
|
-
"require": "./dist/index.js"
|
|
15
|
+
"import": "./dist/index.mjs"
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
18
|
"description": "A modern and beautiful Next.js UI components library.",
|