/
index.ts
166 lines (139 loc) · 3.94 KB
/
index.ts
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
162
163
164
165
166
import { anatomy } from "@chakra-ui/theme-tools"
/**
* **Accordion anatomy**
* - Root: the root container of the accordion
* - Container: the accordion item contains the button and panel
* - Button: the button is the trigger for the panel
* - Panel: the panel is the content of the accordion item
* - Icon: the expanded/collapsed icon
*/
export const accordionAnatomy = anatomy("accordion")
.parts("root", "container", "button", "panel")
.extend("icon")
/**
* **Alert anatomy**
* - Title: the alert's title
* - Description: the alert's description
* - Icon: the alert's icon
*/
export const alertAnatomy = anatomy("alert")
.parts("title", "description", "container")
.extend("icon")
/**
* **Avatar anatomy**
* - Container: the container for the avatar
* - Label: the avatar initials text
* - Excess Label: the label or text that represents excess avatar count.
* Typically used in avatar groups.
* - Group: the container for the avatar group
*/
export const avatarAnatomy = anatomy("avatar")
.parts("label", "badge", "container")
.extend("excessLabel", "group")
/**
* **Breadcrumb anatomy**
* - Item: the container for a breadcrumb item
* - Link: the element that represents the breadcrumb link
* - Container: the container for the breadcrumb items
* - Separator: the separator between breadcrumb items
*/
export const breadcrumbAnatomy = anatomy("breadcrumb")
.parts("link", "item", "container")
.extend("separator")
export const buttonAnatomy = anatomy("button").parts()
export const checkboxAnatomy = anatomy("checkbox")
.parts("control", "icon", "container")
.extend("label")
export const circularProgressAnatomy = anatomy("progress")
.parts("track", "filledTrack")
.extend("label")
export const drawerAnatomy = anatomy("drawer")
.parts("overlay", "dialogContainer", "dialog")
.extend("header", "closeButton", "body", "footer")
export const editableAnatomy = anatomy("editable").parts(
"preview",
"input",
"textarea",
)
export const formAnatomy = anatomy("form").parts(
"container",
"requiredIndicator",
"helperText",
)
export const formErrorAnatomy = anatomy("formError").parts("text", "icon")
export const inputAnatomy = anatomy("input").parts("addon", "field", "element")
export const listAnatomy = anatomy("list").parts("container", "item", "icon")
export const menuAnatomy = anatomy("menu")
.parts("button", "list", "item")
.extend("groupTitle", "command", "divider")
export const modalAnatomy = anatomy("modal")
.parts("overlay", "dialogContainer", "dialog")
.extend("header", "closeButton", "body", "footer")
export const numberInputAnatomy = anatomy("numberinput").parts(
"root",
"field",
"stepperGroup",
"stepper",
)
export const pinInputAnatomy = anatomy("pininput").parts("field")
export const popoverAnatomy = anatomy("popover")
.parts("content", "header", "body", "footer")
.extend("popper", "arrow", "closeButton")
export const progressAnatomy = anatomy("progress").parts(
"label",
"filledTrack",
"track",
)
export const radioAnatomy = anatomy("radio").parts(
"container",
"control",
"label",
)
export const selectAnatomy = anatomy("select").parts("field", "icon")
export const sliderAnatomy = anatomy("slider").parts(
"container",
"track",
"thumb",
"filledTrack",
)
export const statAnatomy = anatomy("stat").parts(
"container",
"label",
"helpText",
"number",
"icon",
)
export const switchAnatomy = anatomy("switch").parts(
"container",
"track",
"thumb",
)
export const tableAnatomy = anatomy("table").parts(
"table",
"thead",
"tbody",
"tr",
"th",
"td",
"tfoot",
"caption",
)
export const tabsAnatomy = anatomy("tabs").parts(
"root",
"tab",
"tablist",
"tabpanel",
"tabpanels",
"indicator",
)
/**
* **Tag anatomy**
* - Container: the container for the tag
* - Label: the text content of the tag
* - closeButton: the close button for the tag
*/
export const tagAnatomy = anatomy("tag").parts(
"container",
"label",
"closeButton",
)