@jamsrui/circular-progress 0.0.8 → 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.d.mts +0 -1
- package/dist/circular-progress-config.mjs +1 -1
- package/dist/circular-progress.d.mts +0 -1
- package/dist/circular-progress.mjs +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.d.mts +4 -5
- package/dist/styles.mjs +1 -1
- package/dist/use-circular-progress.d.mts +0 -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};
|
|
@@ -3,7 +3,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
4
|
import '@jamsrui/utils';
|
|
5
5
|
import './styles.mjs';
|
|
6
|
-
import 'tailwind-variants';
|
|
7
6
|
|
|
8
7
|
declare const useCircularProgressConfig: () => CircularProgressConfig.Props;
|
|
9
8
|
declare const CircularProgressConfig: (props: Omit<Partial<CircularProgressConfig.Props>, "children"> & {
|
|
@@ -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.d.mts
CHANGED
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.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _jamsrui_utils from '@jamsrui/utils';
|
|
2
2
|
import { VariantProps } from '@jamsrui/utils';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
declare const circularProgressVariants: tailwind_variants.TVReturnType<{
|
|
4
|
+
declare const circularProgressVariants: _jamsrui_utils.TVReturnType<{
|
|
6
5
|
isIntermediate: {
|
|
7
6
|
true: {
|
|
8
7
|
root: string;
|
|
@@ -70,7 +69,7 @@ declare const circularProgressVariants: tailwind_variants.TVReturnType<{
|
|
|
70
69
|
track: string;
|
|
71
70
|
progress: string;
|
|
72
71
|
label: string;
|
|
73
|
-
},
|
|
72
|
+
}, _jamsrui_utils.TVReturnType<{
|
|
74
73
|
isIntermediate: {
|
|
75
74
|
true: {
|
|
76
75
|
root: string;
|
|
@@ -108,4 +107,4 @@ declare const circularProgressVariants: tailwind_variants.TVReturnType<{
|
|
|
108
107
|
type CircularProgressVariants = VariantProps<typeof circularProgressVariants>;
|
|
109
108
|
type CircularProgressSlots = keyof ReturnType<typeof circularProgressVariants>;
|
|
110
109
|
|
|
111
|
-
export { type CircularProgressSlots, type CircularProgressVariants, circularProgressVariants
|
|
110
|
+
export { type CircularProgressSlots, type CircularProgressVariants, circularProgressVariants };
|
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/
|
|
9
|
-
"@jamsrui/
|
|
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.",
|