File size: 1,593 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
import { defineSlotRecipe } from "../def"

export const statSlotRecipe = defineSlotRecipe({
  className: "stat",
  slots: ["root", "label", "helpText", "valueText", "valueUnit", "indicator"],
  base: {
    root: {
      display: "flex",
      flexDirection: "column",
      gap: "1",
      position: "relative",
      flex: "1",
    },
    label: {
      display: "inline-flex",
      gap: "1.5",
      alignItems: "center",
      color: "fg.muted",
      textStyle: "sm",
    },
    helpText: {
      color: "fg.muted",
      textStyle: "xs",
    },
    valueUnit: {
      color: "fg.muted",
      textStyle: "xs",
      fontWeight: "initial",
      letterSpacing: "initial",
    },
    valueText: {
      verticalAlign: "baseline",
      fontWeight: "semibold",
      letterSpacing: "tight",
      fontFeatureSettings: "pnum",
      fontVariantNumeric: "proportional-nums",
      display: "inline-flex",
      gap: "1",
    },
    indicator: {
      display: "inline-flex",
      alignItems: "center",
      justifyContent: "center",
      marginEnd: 1,
      "& :where(svg)": {
        w: "1em",
        h: "1em",
      },
      "&[data-type=up]": {
        color: "fg.success",
      },
      "&[data-type=down]": {
        color: "fg.error",
      },
    },
  },
  variants: {
    size: {
      sm: {
        valueText: {
          textStyle: "xl",
        },
      },
      md: {
        valueText: {
          textStyle: "2xl",
        },
      },
      lg: {
        valueText: {
          textStyle: "3xl",
        },
      },
    },
  },
  defaultVariants: {
    size: "md",
  },
})