File size: 1,993 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import { defineSlotRecipe } from "../def"

export const progressCircleSlotRecipe = defineSlotRecipe({
  className: "progress-circle",
  slots: [
    "root",
    "label",
    "track",
    "range",
    "valueText",
    "view",
    "circle",
    "circleTrack",
    "circleRange",
  ],
  base: {
    root: {
      display: "inline-flex",
      textStyle: "sm",
      position: "relative",
    },
    circle: {
      _indeterminate: {
        animation: "spin 2s linear infinite",
      },
    },
    circleTrack: {
      "--track-color": "colors.colorPalette.muted",
      stroke: "var(--track-color)",
    },
    circleRange: {
      stroke: "colorPalette.solid",
      transitionProperty: "stroke-dashoffset, stroke-dasharray",
      transitionDuration: "0.6s",
      _indeterminate: {
        animation: "circular-progress 1.5s linear infinite",
      },
    },
    label: {
      display: "inline-flex",
    },
    valueText: {
      lineHeight: "1",
      fontWeight: "medium",
      letterSpacing: "tight",
      fontVariantNumeric: "tabular-nums",
    },
  },
  variants: {
    size: {
      xs: {
        circle: {
          "--size": "24px",
          "--thickness": "4px",
        },
        valueText: {
          textStyle: "2xs",
        },
      },
      sm: {
        circle: {
          "--size": "32px",
          "--thickness": "5px",
        },
        valueText: {
          textStyle: "2xs",
        },
      },
      md: {
        circle: {
          "--size": "40px",
          "--thickness": "6px",
        },
        valueText: {
          textStyle: "xs",
        },
      },
      lg: {
        circle: {
          "--size": "48px",
          "--thickness": "7px",
        },
        valueText: {
          textStyle: "sm",
        },
      },
      xl: {
        circle: {
          "--size": "64px",
          "--thickness": "8px",
        },
        valueText: {
          textStyle: "sm",
        },
      },
    },
  },
  defaultVariants: {
    size: "md",
  },
})