banhatten-ui 0.1.2 → 0.2.0
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/CURSOR_RULE.md +106 -0
- package/dist/specs/accordion.json +115 -0
- package/dist/specs/alert.json +178 -0
- package/dist/specs/avatar-group.json +91 -0
- package/dist/specs/avatar-profile.json +65 -0
- package/dist/specs/avatar.json +87 -0
- package/dist/specs/badge.json +142 -0
- package/dist/specs/breadcrumb.json +160 -0
- package/dist/specs/button-group.json +91 -0
- package/dist/specs/button.json +110 -0
- package/dist/specs/checkbox-card.json +120 -0
- package/dist/specs/checkbox.json +69 -0
- package/dist/specs/close-button.json +64 -0
- package/dist/specs/divider.json +32 -0
- package/dist/specs/dropdown-input.json +87 -0
- package/dist/specs/dropdown.json +71 -0
- package/dist/specs/featured-icon.json +80 -0
- package/dist/specs/icon.json +48 -0
- package/dist/specs/input.json +81 -0
- package/dist/specs/menu.json +135 -0
- package/dist/specs/progress-bar.json +104 -0
- package/dist/specs/radio-card.json +111 -0
- package/dist/specs/radio.json +64 -0
- package/dist/specs/sidebar.json +254 -0
- package/dist/specs/slider.json +91 -0
- package/dist/specs/tag.json +104 -0
- package/dist/specs/textarea.json +63 -0
- package/dist/specs/toggle.json +79 -0
- package/dist/specs/tooltip.json +78 -0
- package/package.json +4 -2
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Badge",
|
|
3
|
+
"description": "Compact label for status, category, or count. Supports filled, light, and outlined styles across 6 semantic colors.",
|
|
4
|
+
|
|
5
|
+
"base": {
|
|
6
|
+
"display": "inline-flex",
|
|
7
|
+
"alignItems": "center",
|
|
8
|
+
"justifyContent": "center",
|
|
9
|
+
"borderRadius": "{radius.full}",
|
|
10
|
+
"fontWeight": 500,
|
|
11
|
+
"flexShrink": 0,
|
|
12
|
+
"gap": "4px"
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"variants": {
|
|
16
|
+
"filled": {},
|
|
17
|
+
"light": {
|
|
18
|
+
"border": { "width": "1px" }
|
|
19
|
+
},
|
|
20
|
+
"outlined": {
|
|
21
|
+
"bg": "transparent",
|
|
22
|
+
"border": { "width": "1px" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
"sizes": {
|
|
27
|
+
"sm": { "height": "24px", "paddingX": "{spacing.sm}", "fontSize": "12px", "lineHeight": "16px" },
|
|
28
|
+
"lg": { "height": "28px", "paddingX": "{spacing.md}", "fontSize": "14px", "lineHeight": "20px" }
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"compoundVariants": [
|
|
32
|
+
{
|
|
33
|
+
"when": { "variant": "filled", "color": "brand" },
|
|
34
|
+
"apply": { "bg": "{alias.bg-brand}", "text": "{alias.text-on-color}" }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"when": { "variant": "filled", "color": "neutral" },
|
|
38
|
+
"apply": { "bg": "{brand.neutral-700}", "text": "{alias.text-on-color}" }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"when": { "variant": "filled", "color": "success" },
|
|
42
|
+
"apply": { "bg": "{alias.bg-success}", "text": "{alias.text-on-color}" }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"when": { "variant": "filled", "color": "warning" },
|
|
46
|
+
"apply": { "bg": "{alias.bg-warning}", "text": "{alias.text-on-color}" }
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"when": { "variant": "filled", "color": "danger" },
|
|
50
|
+
"apply": { "bg": "{alias.bg-danger}", "text": "{alias.text-on-color}" }
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"when": { "variant": "filled", "color": "info" },
|
|
54
|
+
"apply": { "bg": "{alias.bg-info}", "text": "{alias.text-on-color}" }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"when": { "variant": "light", "color": "brand" },
|
|
58
|
+
"apply": { "bg": "{alias.bg-brand-tertiary}", "border": { "color": "{alias.border-brand-secondary}" }, "text": "{alias.text-brand}" }
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"when": { "variant": "light", "color": "neutral" },
|
|
62
|
+
"apply": { "bg": "{alias.bg-secondary}", "border": { "color": "{alias.border-strong}" }, "text": "{alias.text-primary}" }
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"when": { "variant": "light", "color": "success" },
|
|
66
|
+
"apply": { "bg": "{alias.bg-success-tertiary}", "border": { "color": "{alias.border-success-secondary}" }, "text": "{alias.text-success-strong}" }
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"when": { "variant": "light", "color": "warning" },
|
|
70
|
+
"apply": { "bg": "{alias.bg-warning-tertiary}", "border": { "color": "{alias.border-warning-secondary}" }, "text": "{alias.text-warning-strong}" }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"when": { "variant": "light", "color": "danger" },
|
|
74
|
+
"apply": { "bg": "{alias.bg-danger-tertiary}", "border": { "color": "{alias.border-danger-secondary}" }, "text": "{alias.text-danger-strong}" }
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"when": { "variant": "light", "color": "info" },
|
|
78
|
+
"apply": { "bg": "{alias.bg-info-tertiary}", "border": { "color": "{alias.border-info-subtle}" }, "text": "{alias.text-info-strong}" }
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"when": { "variant": "outlined", "color": "brand" },
|
|
82
|
+
"apply": { "border": { "color": "{alias.border-brand}" }, "text": "{alias.text-brand}" }
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"when": { "variant": "outlined", "color": "neutral" },
|
|
86
|
+
"apply": { "border": { "color": "{alias.border-strong}" }, "text": "{alias.text-primary}" }
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"when": { "variant": "outlined", "color": "success" },
|
|
90
|
+
"apply": { "border": { "color": "{alias.border-success}" }, "text": "{alias.text-success}" }
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"when": { "variant": "outlined", "color": "warning" },
|
|
94
|
+
"apply": { "border": { "color": "{alias.border-warning}" }, "text": "{alias.text-warning-strong}" }
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"when": { "variant": "outlined", "color": "danger" },
|
|
98
|
+
"apply": { "border": { "color": "{alias.border-danger}" }, "text": "{alias.text-danger}" }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"when": { "variant": "outlined", "color": "info" },
|
|
102
|
+
"apply": { "border": { "color": "{alias.border-info}" }, "text": "{alias.text-info}" }
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
|
|
106
|
+
"props": {
|
|
107
|
+
"variant": { "type": "enum", "values": ["filled", "light", "outlined"], "default": "light" },
|
|
108
|
+
"color": { "type": "enum", "values": ["brand", "neutral", "success", "warning", "danger", "info"], "default": "brand" },
|
|
109
|
+
"size": { "type": "enum", "values": ["sm", "lg"], "default": "sm" },
|
|
110
|
+
"withDot": { "type": "boolean", "default": false, "description": "Render a small status dot before the badge content." },
|
|
111
|
+
"leftIcon": { "type": "string", "description": "Material Symbol name for leading icon." },
|
|
112
|
+
"rightIcon": { "type": "string", "description": "Material Symbol name for trailing icon." },
|
|
113
|
+
"iconVariant": { "type": "enum", "values": ["outlined", "rounded", "sharp"], "default": "outlined" },
|
|
114
|
+
"iconFilled": { "type": "boolean", "default": false }
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
"slots": {
|
|
118
|
+
"dot": {
|
|
119
|
+
"position": "start",
|
|
120
|
+
"size": "6px",
|
|
121
|
+
"borderRadius": "{radius.full}",
|
|
122
|
+
"bg": "currentColor"
|
|
123
|
+
},
|
|
124
|
+
"leftIcon": {
|
|
125
|
+
"position": "start",
|
|
126
|
+
"element": "Icon",
|
|
127
|
+
"iconSizeByBadgeSize": { "sm": "xs", "lg": "sm" }
|
|
128
|
+
},
|
|
129
|
+
"rightIcon": {
|
|
130
|
+
"position": "end",
|
|
131
|
+
"element": "Icon",
|
|
132
|
+
"iconSizeByBadgeSize": { "sm": "xs", "lg": "sm" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
"defaults": { "variant": "light", "color": "brand", "size": "sm" },
|
|
137
|
+
|
|
138
|
+
"accessibility": {
|
|
139
|
+
"role": "status",
|
|
140
|
+
"notes": "Rendered as a <span>. Dot element is aria-hidden. Icon elements are aria-hidden."
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Breadcrumb",
|
|
3
|
+
"description": "Navigation component showing hierarchical path. Composed of Breadcrumb (nav), BreadcrumbList, BreadcrumbItem, and BreadcrumbSeparator.",
|
|
4
|
+
|
|
5
|
+
"base": {
|
|
6
|
+
"display": "block"
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
"props": {
|
|
10
|
+
"aria-label": { "type": "string", "default": "Breadcrumb", "description": "Accessible label for nav." }
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
"subComponents": {
|
|
14
|
+
"BreadcrumbList": {
|
|
15
|
+
"description": "Ordered list container for breadcrumb items. Wraps items with optional background.",
|
|
16
|
+
"element": "ol",
|
|
17
|
+
"base": {
|
|
18
|
+
"display": "flex",
|
|
19
|
+
"flexWrap": "wrap",
|
|
20
|
+
"alignItems": "center",
|
|
21
|
+
"gap": "{spacing.xs}"
|
|
22
|
+
},
|
|
23
|
+
"variants": {
|
|
24
|
+
"containerStyle": {
|
|
25
|
+
"default": {},
|
|
26
|
+
"withBackground": {
|
|
27
|
+
"borderRadius": "{radius.sm}",
|
|
28
|
+
"border": { "width": "1px", "color": "{alias.border-default}" },
|
|
29
|
+
"bg": "{alias.bg-primary}",
|
|
30
|
+
"padding": "{spacing.md}"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"props": {
|
|
35
|
+
"containerStyle": { "type": "enum", "values": ["default", "withBackground"], "default": "default" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"BreadcrumbListItem": {
|
|
40
|
+
"description": "List item wrapper for a single breadcrumb item and optional separator.",
|
|
41
|
+
"element": "li",
|
|
42
|
+
"base": {
|
|
43
|
+
"display": "inline-flex",
|
|
44
|
+
"alignItems": "center",
|
|
45
|
+
"gap": "{spacing.xs}"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
"BreadcrumbSeparator": {
|
|
50
|
+
"description": "Visual separator between items. Slash character or chevron icon.",
|
|
51
|
+
"element": "span",
|
|
52
|
+
"base": {
|
|
53
|
+
"display": "flex",
|
|
54
|
+
"alignItems": "center",
|
|
55
|
+
"flexShrink": 0,
|
|
56
|
+
"color": "{alias.text-inactive}"
|
|
57
|
+
},
|
|
58
|
+
"variants": {
|
|
59
|
+
"separator": {
|
|
60
|
+
"slash": {
|
|
61
|
+
"paddingX": "{spacing.xs}",
|
|
62
|
+
"fontSize": "14px",
|
|
63
|
+
"fontWeight": 400
|
|
64
|
+
},
|
|
65
|
+
"chevron": {
|
|
66
|
+
"iconColor": "{alias.icon-inactive}",
|
|
67
|
+
"icon": "chevron_right",
|
|
68
|
+
"iconSize": "sm"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"props": {
|
|
73
|
+
"separator": { "type": "enum", "values": ["slash", "chevron"], "default": "chevron" }
|
|
74
|
+
},
|
|
75
|
+
"accessibility": {
|
|
76
|
+
"role": "presentation",
|
|
77
|
+
"ariaHidden": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"BreadcrumbItem": {
|
|
82
|
+
"description": "Individual breadcrumb link or span. Renders <a> when href provided, else <span>. Supports icon+text, icon-only, or overflow (ellipsis) variants.",
|
|
83
|
+
"element": "a | span",
|
|
84
|
+
"base": {
|
|
85
|
+
"display": "inline-flex",
|
|
86
|
+
"alignItems": "center",
|
|
87
|
+
"fontSize": "14px",
|
|
88
|
+
"gap": "{spacing.xs}",
|
|
89
|
+
"borderRadius": "{radius.sm}",
|
|
90
|
+
"transition": "color",
|
|
91
|
+
"focusRing": { "width": "2px", "color": "{alias.border-brand}", "offset": "2px" }
|
|
92
|
+
},
|
|
93
|
+
"variants": {
|
|
94
|
+
"variant": {
|
|
95
|
+
"iconText": { "minWidth": 0 },
|
|
96
|
+
"iconOnly": {},
|
|
97
|
+
"overflow": { "minWidth": 0 }
|
|
98
|
+
},
|
|
99
|
+
"state": {
|
|
100
|
+
"default": {
|
|
101
|
+
"text": "{alias.text-secondary}",
|
|
102
|
+
"iconColor": "{alias.icon-secondary}",
|
|
103
|
+
"hover": { "text": "{alias.text-tertiary-hover}", "iconColor": "{alias.icon-tertiary-hover}" }
|
|
104
|
+
},
|
|
105
|
+
"active": {
|
|
106
|
+
"text": "{alias.text-primary}",
|
|
107
|
+
"fontWeight": 500,
|
|
108
|
+
"iconColor": "{alias.icon-primary}"
|
|
109
|
+
},
|
|
110
|
+
"disabled": {
|
|
111
|
+
"text": "{alias.text-inactive}",
|
|
112
|
+
"iconColor": "{alias.icon-inactive-subtle}",
|
|
113
|
+
"cursor": "default",
|
|
114
|
+
"pointerEvents": "none"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"overflowHover": {
|
|
118
|
+
"true": { "hover": { "bg": "{alias.bg-tertiary}" } },
|
|
119
|
+
"false": {}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"compoundVariants": [
|
|
123
|
+
{
|
|
124
|
+
"when": { "variant": "overflow", "overflowHover": true, "state": "default" },
|
|
125
|
+
"apply": {
|
|
126
|
+
"hover": {
|
|
127
|
+
"bg": "{alias.bg-tertiary}",
|
|
128
|
+
"text": "{alias.text-secondary-hover}",
|
|
129
|
+
"iconColor": "{alias.icon-secondary-hover}"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"props": {
|
|
135
|
+
"variant": { "type": "enum", "values": ["iconText", "iconOnly", "overflow"], "default": "iconText" },
|
|
136
|
+
"active": { "type": "boolean", "default": false, "description": "Current page. Renders span with aria-current=\"page\"." },
|
|
137
|
+
"disabled": { "type": "boolean", "default": false, "description": "Disabled state. Renders span with aria-disabled=\"true\"." },
|
|
138
|
+
"icon": { "type": "string", "description": "Material Symbol name (e.g. home, folder). Ignored when variant=overflow; overflow uses more_horiz." },
|
|
139
|
+
"href": { "type": "string", "description": "When provided, renders <a>. Omit for current page or overflow trigger." },
|
|
140
|
+
"overflowHover": { "type": "boolean", "description": "Show hover bg for overflow variant. Defaults to true when variant=overflow and state=default." }
|
|
141
|
+
},
|
|
142
|
+
"slots": {
|
|
143
|
+
"icon": {
|
|
144
|
+
"element": "Icon",
|
|
145
|
+
"size": "sm",
|
|
146
|
+
"className": "breadcrumb-icon",
|
|
147
|
+
"shrink": 0
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"accessibility": {
|
|
151
|
+
"notes": "active sets aria-current=\"page\"; disabled sets aria-disabled=\"true\". Icon-only and overflow require sr-only label for screen readers."
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
"accessibility": {
|
|
157
|
+
"role": "navigation",
|
|
158
|
+
"ariaLabel": "Breadcrumb"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ButtonGroup",
|
|
3
|
+
"description": "Horizontal container grouping ButtonGroupItem components. Items share size and have position-based rounding and dividers.",
|
|
4
|
+
|
|
5
|
+
"base": {
|
|
6
|
+
"display": "inline-flex",
|
|
7
|
+
"flexDirection": "row",
|
|
8
|
+
"alignItems": "stretch",
|
|
9
|
+
"borderRadius": "{radius.sm}",
|
|
10
|
+
"border": { "width": "1px", "color": "{alias.border-strong}" },
|
|
11
|
+
"bg": "{alias.bg-primary}",
|
|
12
|
+
"overflow": "hidden"
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"props": {
|
|
16
|
+
"size": { "type": "enum", "values": ["small", "medium"], "default": "medium", "description": "Passed to each ButtonGroupItem. All items share the same size." },
|
|
17
|
+
"children": { "type": "ReactNode", "description": "ButtonGroupItem components." }
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
"subComponents": {
|
|
21
|
+
"ButtonGroupItem": {
|
|
22
|
+
"description": "Individual selectable item within the button group. Supports text, text+icon, or icon-only.",
|
|
23
|
+
"base": {
|
|
24
|
+
"display": "inline-flex",
|
|
25
|
+
"alignItems": "center",
|
|
26
|
+
"justifyContent": "center",
|
|
27
|
+
"flexShrink": 0,
|
|
28
|
+
"transition": "background-color, color",
|
|
29
|
+
"focusVisible": { "outline": "none", "ring": "2px", "ringColor": "{alias.border-brand}", "ringOffset": "2px" },
|
|
30
|
+
"disabled": { "pointerEvents": "none" }
|
|
31
|
+
},
|
|
32
|
+
"sizes": {
|
|
33
|
+
"small": { "height": "36px", "paddingX": "{spacing.md}", "gap": "2px", "fontSize": "14px" },
|
|
34
|
+
"medium": { "height": "40px", "paddingX": "{spacing.lg}", "gap": "4px", "fontSize": "14px" }
|
|
35
|
+
},
|
|
36
|
+
"types": {
|
|
37
|
+
"textAndIcon": {},
|
|
38
|
+
"textOnly": {},
|
|
39
|
+
"iconOnly": {}
|
|
40
|
+
},
|
|
41
|
+
"states": {
|
|
42
|
+
"selected": {
|
|
43
|
+
"true": { "bg": "{alias.bg-brand-tertiary}", "text": "{alias.text-brand}", "fontWeight": 500 },
|
|
44
|
+
"false": {
|
|
45
|
+
"bg": "transparent",
|
|
46
|
+
"text": "{alias.text-primary}",
|
|
47
|
+
"hover": { "bg": "{alias.bg-tertiary}" },
|
|
48
|
+
"disabled": { "text": "{alias.text-inactive}", "bg": "{alias.bg-inactive}" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"positions": {
|
|
53
|
+
"first": { "borderRadius": "{radius.sm} 0 0 {radius.sm}", "borderRight": "none" },
|
|
54
|
+
"middle": { "borderRadius": "0", "borderLeft": { "width": "1px", "color": "{alias.border-strong}" } },
|
|
55
|
+
"last": { "borderRadius": "0 {radius.sm} {radius.sm} 0", "borderLeft": { "width": "1px", "color": "{alias.border-strong}" } },
|
|
56
|
+
"only": { "borderRadius": "{radius.sm}" }
|
|
57
|
+
},
|
|
58
|
+
"compoundVariants": [
|
|
59
|
+
{ "when": { "type": "iconOnly", "size": "small" }, "apply": { "width": "36px", "paddingX": "0" } },
|
|
60
|
+
{ "when": { "type": "iconOnly", "size": "medium" }, "apply": { "width": "40px", "paddingX": "0" } }
|
|
61
|
+
],
|
|
62
|
+
"props": {
|
|
63
|
+
"size": { "type": "enum", "values": ["small", "medium"], "default": "medium" },
|
|
64
|
+
"type": { "type": "enum", "values": ["textAndIcon", "textOnly", "iconOnly"], "default": "textAndIcon" },
|
|
65
|
+
"selected": { "type": "boolean", "default": false, "description": "Shows selected state. Sets aria-current='true'." },
|
|
66
|
+
"position": { "type": "enum", "values": ["first", "middle", "last", "only"], "description": "Set by ButtonGroup automatically." },
|
|
67
|
+
"leftIcon": { "type": "string", "description": "Material Symbol name. Used when type is textAndIcon." },
|
|
68
|
+
"rightIcon": { "type": "string", "description": "Material Symbol name. Used when type is textAndIcon." },
|
|
69
|
+
"icon": { "type": "string", "description": "Material Symbol name for icon-only. Requires aria-label." },
|
|
70
|
+
"disabled": { "type": "boolean", "default": false }
|
|
71
|
+
},
|
|
72
|
+
"slots": {
|
|
73
|
+
"leftIcon": { "element": "Icon", "iconSizeBySize": { "small": "sm", "medium": "md" } },
|
|
74
|
+
"rightIcon": { "element": "Icon", "iconSizeBySize": { "small": "sm", "medium": "md" } },
|
|
75
|
+
"icon": { "element": "Icon", "iconSizeBySize": { "small": "sm", "medium": "md" } }
|
|
76
|
+
},
|
|
77
|
+
"iconColorByState": {
|
|
78
|
+
"selected": "{alias.icon-brand}",
|
|
79
|
+
"disabled": "{alias.icon-inactive}",
|
|
80
|
+
"default": "{alias.icon-primary}"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
"defaults": { "size": "medium" },
|
|
86
|
+
|
|
87
|
+
"accessibility": {
|
|
88
|
+
"role": "group",
|
|
89
|
+
"notes": "ButtonGroupItem icon-only mode requires aria-label."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Button",
|
|
3
|
+
"description": "Primary interactive element for actions. Supports text, text with icons, and icon-only modes.",
|
|
4
|
+
|
|
5
|
+
"base": {
|
|
6
|
+
"display": "inline-flex",
|
|
7
|
+
"alignItems": "center",
|
|
8
|
+
"justifyContent": "center",
|
|
9
|
+
"fontWeight": 500,
|
|
10
|
+
"flexShrink": 0,
|
|
11
|
+
"transition": "background-color, color"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"variants": {
|
|
15
|
+
"primary": {
|
|
16
|
+
"bg": "{alias.component-button-brand-bg}",
|
|
17
|
+
"text": "{alias.text-on-color}",
|
|
18
|
+
"hover": { "bg": "{alias.component-button-brand-bg-hover}" },
|
|
19
|
+
"active": { "bg": "{alias.bg-brand-strong}" }
|
|
20
|
+
},
|
|
21
|
+
"secondary": {
|
|
22
|
+
"bg": "{alias.component-button-secondary-bg}",
|
|
23
|
+
"text": "{alias.component-button-secondary-fg}",
|
|
24
|
+
"border": { "width": "1px", "color": "{alias.border-strong}" },
|
|
25
|
+
"shadow": "{shadow.xs}",
|
|
26
|
+
"hover": { "bg": "{alias.component-button-secondary-bg-hover}" },
|
|
27
|
+
"active": { "bg": "{alias.bg-quarterary}" }
|
|
28
|
+
},
|
|
29
|
+
"tertiary": {
|
|
30
|
+
"bg": "transparent",
|
|
31
|
+
"text": "{alias.component-button-tertiary-color-fg}",
|
|
32
|
+
"hover": { "bg": "{alias.component-button-tertiary-bg-hover}" },
|
|
33
|
+
"active": { "bg": "{alias.bg-quarterary}" }
|
|
34
|
+
},
|
|
35
|
+
"danger": {
|
|
36
|
+
"bg": "{alias.component-button-danger-bg}",
|
|
37
|
+
"text": "{alias.text-on-color}",
|
|
38
|
+
"hover": { "bg": "{alias.component-button-danger-bg-hover}" },
|
|
39
|
+
"active": { "bg": "{alias.bg-danger-strong}" }
|
|
40
|
+
},
|
|
41
|
+
"link": {
|
|
42
|
+
"bg": "transparent",
|
|
43
|
+
"text": "{alias.component-button-tertiary-color-fg}",
|
|
44
|
+
"textDecoration": { "underlineOffset": "4px" },
|
|
45
|
+
"hover": { "textDecoration": "underline" }
|
|
46
|
+
},
|
|
47
|
+
"link-brand": {
|
|
48
|
+
"bg": "transparent",
|
|
49
|
+
"text": "{alias.component-button-link-color-fg}",
|
|
50
|
+
"textDecoration": { "underlineOffset": "4px" },
|
|
51
|
+
"hover": { "text": "{alias.component-button-link-color-fg-hover}" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"sizes": {
|
|
56
|
+
"xs": { "height": "36px", "paddingX": "{spacing.md}", "gap": "2px", "fontSize": "14px", "borderRadius": "{radius.sm}" },
|
|
57
|
+
"md": { "height": "40px", "paddingX": "{spacing.lg}", "gap": "4px", "fontSize": "14px", "borderRadius": "{radius.sm}" },
|
|
58
|
+
"lg": { "height": "44px", "paddingX": "{spacing.xl}", "gap": "4px", "fontSize": "16px", "borderRadius": "{radius.sm}" },
|
|
59
|
+
"xl": { "height": "48px", "paddingX": "{spacing.2xl}", "gap": "4px", "fontSize": "16px", "borderRadius": "{radius.sm}" },
|
|
60
|
+
"2xl": { "height": "56px", "paddingX": "{spacing.2xl}", "gap": "8px", "fontSize": "16px", "borderRadius": "{radius.md}" }
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
"states": {
|
|
64
|
+
"disabled": { "opacity": 0.5, "pointerEvents": "none" },
|
|
65
|
+
"focus": { "outline": "none", "ring": "2px", "ringColor": "{alias.border-brand}", "ringOffset": "2px" }
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
"compoundVariants": [
|
|
69
|
+
{
|
|
70
|
+
"when": { "variant": ["link", "link-brand"] },
|
|
71
|
+
"apply": { "height": "auto", "paddingX": "0", "paddingY": "0", "borderRadius": "6px" }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"when": { "iconOnly": true },
|
|
75
|
+
"apply": { "width": "=height", "paddingX": "0" }
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
|
|
79
|
+
"props": {
|
|
80
|
+
"variant": { "type": "enum", "values": ["primary", "secondary", "tertiary", "danger", "link", "link-brand"], "default": "primary" },
|
|
81
|
+
"size": { "type": "enum", "values": ["xs", "md", "lg", "xl", "2xl"], "default": "md" },
|
|
82
|
+
"icon": { "type": "string", "description": "Material Symbol name for icon-only mode. Renders a square button." },
|
|
83
|
+
"leftIcon": { "type": "string", "description": "Material Symbol name for leading icon." },
|
|
84
|
+
"rightIcon": { "type": "string", "description": "Material Symbol name for trailing icon." },
|
|
85
|
+
"iconVariant": { "type": "enum", "values": ["outlined", "rounded", "sharp"], "default": "outlined" },
|
|
86
|
+
"iconFilled": { "type": "boolean", "default": false },
|
|
87
|
+
"asChild": { "type": "boolean", "default": false, "description": "Render as child element (polymorphic). Useful for links styled as buttons." },
|
|
88
|
+
"disabled": { "type": "boolean", "default": false }
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
"slots": {
|
|
92
|
+
"leftIcon": {
|
|
93
|
+
"position": "start",
|
|
94
|
+
"element": "Icon",
|
|
95
|
+
"iconSizeByButtonSize": { "xs": "md", "md": "md", "lg": "md", "xl": "lg", "2xl": "lg" }
|
|
96
|
+
},
|
|
97
|
+
"rightIcon": {
|
|
98
|
+
"position": "end",
|
|
99
|
+
"element": "Icon",
|
|
100
|
+
"iconSizeByButtonSize": { "xs": "md", "md": "md", "lg": "md", "xl": "lg", "2xl": "lg" }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
"defaults": { "variant": "primary", "size": "md" },
|
|
105
|
+
|
|
106
|
+
"accessibility": {
|
|
107
|
+
"role": "button",
|
|
108
|
+
"notes": "Icon-only mode (icon prop or single icon without children) requires aria-label."
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "CheckboxCard",
|
|
3
|
+
"description": "Card-style checkbox with optional icon, label, and description. Supports checked, unchecked, indeterminate, disabled, and focused states.",
|
|
4
|
+
|
|
5
|
+
"base": {
|
|
6
|
+
"display": "flex",
|
|
7
|
+
"position": "relative",
|
|
8
|
+
"borderRadius": "{radius.md}",
|
|
9
|
+
"padding": "{spacing.lg}",
|
|
10
|
+
"border": { "width": "1px" },
|
|
11
|
+
"transition": "background-color, border-color"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"states": {
|
|
15
|
+
"unchecked": {
|
|
16
|
+
"bg": "{alias.bg-primary}",
|
|
17
|
+
"borderColor": "{alias.border-default}",
|
|
18
|
+
"cursor": "pointer",
|
|
19
|
+
"hover": { "bg": "{alias.highlight-hover}" }
|
|
20
|
+
},
|
|
21
|
+
"checked": {
|
|
22
|
+
"bg": "{alias.bg-primary}",
|
|
23
|
+
"borderColor": "{alias.border-brand}",
|
|
24
|
+
"cursor": "pointer"
|
|
25
|
+
},
|
|
26
|
+
"indeterminate": {
|
|
27
|
+
"bg": "{alias.bg-primary}",
|
|
28
|
+
"borderColor": "{alias.border-brand}",
|
|
29
|
+
"cursor": "pointer"
|
|
30
|
+
},
|
|
31
|
+
"disabled": {
|
|
32
|
+
"bg": "{alias.bg-inactive-subtle}",
|
|
33
|
+
"borderColor": "{alias.border-inactive-subtle}",
|
|
34
|
+
"cursor": "default"
|
|
35
|
+
},
|
|
36
|
+
"focused": {
|
|
37
|
+
"overlay": {
|
|
38
|
+
"position": "absolute",
|
|
39
|
+
"inset": "-1px",
|
|
40
|
+
"borderRadius": "{radius.md}",
|
|
41
|
+
"border": { "width": "2px", "color": "{alias.border-focused}" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"layout": {
|
|
47
|
+
"leading": { "gap": "{spacing.md}", "alignItems": "center (no description) / start (with description)" },
|
|
48
|
+
"trailing": { "gap": "{spacing.lg}", "alignItems": "start" }
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
"subComponents": {
|
|
52
|
+
"CheckboxIndicator": {
|
|
53
|
+
"description": "16×16 checkbox square inside a 20×20 hit area.",
|
|
54
|
+
"outerSize": "20px",
|
|
55
|
+
"innerSize": "16px",
|
|
56
|
+
"borderRadius": "{radius.xs}",
|
|
57
|
+
"unchecked": {
|
|
58
|
+
"bg": "{alias.bg-primary}",
|
|
59
|
+
"border": { "width": "1px", "color": "{alias.border-strong}" }
|
|
60
|
+
},
|
|
61
|
+
"checked": {
|
|
62
|
+
"bg": "{alias.bg-brand}",
|
|
63
|
+
"iconColor": "{alias.icon-primary-inverse}",
|
|
64
|
+
"icon": "check (12×12 SVG)"
|
|
65
|
+
},
|
|
66
|
+
"indeterminate": {
|
|
67
|
+
"bg": "{alias.bg-brand}",
|
|
68
|
+
"iconColor": "{alias.icon-primary-inverse}",
|
|
69
|
+
"icon": "minus (12×12 SVG)"
|
|
70
|
+
},
|
|
71
|
+
"disabled": {
|
|
72
|
+
"bg": "{alias.bg-inactive-subtle}",
|
|
73
|
+
"border": { "width": "1px", "color": "{alias.border-inactive}" },
|
|
74
|
+
"iconColor": "{alias.icon-inactive-subtle}"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"slots": {
|
|
80
|
+
"icon": {
|
|
81
|
+
"element": "Icon",
|
|
82
|
+
"size": "lg",
|
|
83
|
+
"color": "{alias.icon-secondary}",
|
|
84
|
+
"disabledColor": "{alias.icon-inactive}"
|
|
85
|
+
},
|
|
86
|
+
"label": {
|
|
87
|
+
"fontWeight": 500,
|
|
88
|
+
"withDescription": { "fontSize": "14px", "lineHeight": "16px" },
|
|
89
|
+
"withoutDescription": { "fontSize": "16px", "lineHeight": "20px" },
|
|
90
|
+
"color": "{alias.text-primary}",
|
|
91
|
+
"disabledColor": "{alias.text-inactive}"
|
|
92
|
+
},
|
|
93
|
+
"description": {
|
|
94
|
+
"fontSize": "14px",
|
|
95
|
+
"lineHeight": "20px",
|
|
96
|
+
"color": "{alias.text-secondary}",
|
|
97
|
+
"disabledColor": "{alias.text-inactive}",
|
|
98
|
+
"gap": "{spacing.xs}"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
"props": {
|
|
103
|
+
"label": { "type": "string", "description": "Label text displayed in the card." },
|
|
104
|
+
"description": { "type": "string", "description": "Description text below the label." },
|
|
105
|
+
"icon": { "type": "string", "description": "Material Symbol name for the card icon." },
|
|
106
|
+
"iconVariant": { "type": "enum", "values": ["outlined", "rounded", "sharp"], "default": "outlined" },
|
|
107
|
+
"iconFilled": { "type": "boolean", "default": false },
|
|
108
|
+
"checkboxPosition": { "type": "enum", "values": ["leading", "trailing"], "default": "trailing" },
|
|
109
|
+
"indeterminate": { "type": "boolean", "default": false },
|
|
110
|
+
"checked": { "type": "boolean" },
|
|
111
|
+
"disabled": { "type": "boolean", "default": false }
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
"defaults": { "checkboxPosition": "trailing", "indeterminate": false },
|
|
115
|
+
|
|
116
|
+
"accessibility": {
|
|
117
|
+
"role": "checkbox",
|
|
118
|
+
"notes": "Hidden native input (sr-only) inside a <label>. aria-checked set to 'mixed' when indeterminate. Focus/selection ring overlay shown when checked, indeterminate, or focused (not disabled)."
|
|
119
|
+
}
|
|
120
|
+
}
|