File size: 3,112 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import { defineSlotRecipe } from "../def"

export const alertSlotRecipe = defineSlotRecipe({
  slots: ["title", "description", "root", "indicator", "content"],
  className: "alert",
  base: {
    root: {
      width: "full",
      display: "flex",
      alignItems: "flex-start",
      position: "relative",
      borderRadius: "l3",
    },
    title: {
      fontWeight: "medium",
    },
    description: {
      display: "inline",
    },
    indicator: {
      display: "inline-flex",
      alignItems: "center",
      justifyContent: "center",
      flexShrink: "0",
      width: "1em",
      height: "1em",
      _icon: {
        boxSize: "full",
      },
    },
    content: {
      display: "flex",
      flex: "1",
      gap: "1",
    },
  },
  variants: {
    status: {
      info: {
        root: {
          colorPalette: "blue",
        },
      },
      warning: {
        root: {
          colorPalette: "orange",
        },
      },
      success: {
        root: {
          colorPalette: "green",
        },
      },
      error: {
        root: {
          colorPalette: "red",
        },
      },
      neutral: {
        root: {
          colorPalette: "gray",
        },
      },
    },
    inline: {
      true: {
        content: {
          display: "inline-flex",
          flexDirection: "row",
          alignItems: "center",
        },
      },
      false: {
        content: {
          display: "flex",
          flexDirection: "column",
        },
      },
    },
    variant: {
      subtle: {
        root: {
          bg: "colorPalette.subtle",
          color: "colorPalette.fg",
        },
      },
      surface: {
        root: {
          bg: "colorPalette.subtle",
          color: "colorPalette.fg",
          shadow: "inset 0 0 0px 1px var(--shadow-color)",
          shadowColor: "colorPalette.muted",
        },
        indicator: {
          color: "colorPalette.fg",
        },
      },
      outline: {
        root: {
          color: "colorPalette.fg",
          shadow: "inset 0 0 0px 1px var(--shadow-color)",
          shadowColor: "colorPalette.muted",
        },
        indicator: {
          color: "colorPalette.fg",
        },
      },
      solid: {
        root: {
          bg: "colorPalette.solid",
          color: "colorPalette.contrast",
        },
        indicator: {
          color: "colorPalette.contrast",
        },
      },
    },
    size: {
      sm: {
        root: {
          gap: "2",
          px: "3",
          py: "3",
          textStyle: "xs",
        },
        indicator: {
          textStyle: "lg",
        },
      },
      md: {
        root: {
          gap: "3",
          px: "4",
          py: "4",
          textStyle: "sm",
        },
        indicator: {
          textStyle: "xl",
        },
      },
      lg: {
        root: {
          gap: "3",
          px: "4",
          py: "4",
          textStyle: "md",
        },
        indicator: {
          textStyle: "2xl",
        },
      },
    },
  },
  defaultVariants: {
    status: "info",
    variant: "subtle",
    size: "md",
    inline: false,
  },
})