@rdna/radiants 0.1.0 → 0.1.2
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/components/core/Accordion/Accordion.dna.json +16 -0
- package/components/core/Accordion/Accordion.schema.json +48 -0
- package/components/core/Alert/Alert.dna.json +56 -0
- package/components/core/Alert/Alert.schema.json +66 -0
- package/components/core/Badge/Badge.dna.json +48 -0
- package/components/core/Badge/Badge.schema.json +49 -0
- package/components/core/Breadcrumbs/Breadcrumbs.dna.json +29 -0
- package/components/core/Breadcrumbs/Breadcrumbs.schema.json +39 -0
- package/components/core/Button/Button.dna.json +58 -0
- package/components/core/Button/Button.schema.json +84 -0
- package/components/core/Card/Card.dna.json +21 -0
- package/components/core/Card/Card.schema.json +23 -0
- package/components/core/Checkbox/Checkbox.dna.json +38 -0
- package/components/core/Checkbox/Checkbox.schema.json +55 -0
- package/components/core/ContextMenu/ContextMenu.dna.json +25 -0
- package/components/core/ContextMenu/ContextMenu.schema.json +30 -0
- package/components/core/CountdownTimer/CountdownTimer.dna.json +79 -0
- package/components/core/CountdownTimer/CountdownTimer.schema.json +71 -0
- package/components/core/Dialog/Dialog.dna.json +28 -0
- package/components/core/Dialog/Dialog.schema.json +40 -0
- package/components/core/Divider/Divider.dna.json +16 -0
- package/components/core/Divider/Divider.schema.json +41 -0
- package/components/core/DropdownMenu/DropdownMenu.dna.json +28 -0
- package/components/core/DropdownMenu/DropdownMenu.schema.json +55 -0
- package/components/core/HelpPanel/HelpPanel.dna.json +24 -0
- package/components/core/HelpPanel/HelpPanel.schema.json +47 -0
- package/components/core/Input/Input.dna.json +33 -0
- package/components/core/Input/Input.schema.json +33 -0
- package/components/core/MockStatesPopover/MockStatesPopover.dna.json +33 -0
- package/components/core/MockStatesPopover/MockStatesPopover.schema.json +80 -0
- package/components/core/Popover/Popover.dna.json +10 -0
- package/components/core/Popover/Popover.schema.json +46 -0
- package/components/core/Progress/Progress.dna.json +29 -0
- package/components/core/Progress/Progress.schema.json +57 -0
- package/components/core/Select/Select.dna.json +42 -0
- package/components/core/Select/Select.schema.json +66 -0
- package/components/core/Sheet/Sheet.dna.json +28 -0
- package/components/core/Sheet/Sheet.schema.json +53 -0
- package/components/core/Slider/Slider.dna.json +49 -0
- package/components/core/Slider/Slider.schema.json +70 -0
- package/components/core/Switch/Switch.dna.json +47 -0
- package/components/core/Switch/Switch.schema.json +64 -0
- package/components/core/Tabs/Tabs.dna.json +39 -0
- package/components/core/Tabs/Tabs.schema.json +62 -0
- package/components/core/Toast/Toast.dna.json +31 -0
- package/components/core/Toast/Toast.schema.json +57 -0
- package/components/core/Tooltip/Tooltip.dna.json +46 -0
- package/components/core/Tooltip/Tooltip.schema.json +58 -0
- package/components/core/Web3ActionBar/Web3ActionBar.dna.json +23 -0
- package/components/core/Web3ActionBar/Web3ActionBar.schema.json +50 -0
- package/dist/schemas/index.d.mts +6446 -0
- package/dist/schemas/index.mjs +2386 -0
- package/dist/schemas/index.mjs.map +1 -0
- package/package.json +11 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Accordion",
|
|
3
|
+
"tokenBindings": {
|
|
4
|
+
"item": {
|
|
5
|
+
"background": "surface-primary",
|
|
6
|
+
"border": "edge-primary"
|
|
7
|
+
},
|
|
8
|
+
"trigger": {
|
|
9
|
+
"text": "content-primary",
|
|
10
|
+
"hoverBackground": "content-primary/5"
|
|
11
|
+
},
|
|
12
|
+
"content": {
|
|
13
|
+
"text": "content-primary"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Accordion",
|
|
3
|
+
"description": "Collapsible content sections with smooth expand/collapse animations. Supports single or multiple expanded items.",
|
|
4
|
+
"subcomponents": ["AccordionItem", "AccordionTrigger", "AccordionContent"],
|
|
5
|
+
"props": {
|
|
6
|
+
"type": {
|
|
7
|
+
"type": "enum",
|
|
8
|
+
"values": ["single", "multiple"],
|
|
9
|
+
"default": "single",
|
|
10
|
+
"description": "Allow single or multiple items to be expanded at once"
|
|
11
|
+
},
|
|
12
|
+
"defaultValue": {
|
|
13
|
+
"type": "string | string[]",
|
|
14
|
+
"description": "Default expanded item(s) - string for single, array for multiple"
|
|
15
|
+
},
|
|
16
|
+
"value": {
|
|
17
|
+
"type": "string | string[]",
|
|
18
|
+
"description": "Controlled expanded value(s)"
|
|
19
|
+
},
|
|
20
|
+
"onValueChange": {
|
|
21
|
+
"type": "function",
|
|
22
|
+
"description": "Callback when expanded items change"
|
|
23
|
+
},
|
|
24
|
+
"className": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Additional CSS classes to apply"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"slots": {
|
|
30
|
+
"children": {
|
|
31
|
+
"description": "AccordionItem components"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"examples": [
|
|
35
|
+
{
|
|
36
|
+
"name": "Single accordion",
|
|
37
|
+
"code": "<Accordion>\n <AccordionItem value=\"item-1\">\n <AccordionTrigger>Section 1</AccordionTrigger>\n <AccordionContent>Content for section 1</AccordionContent>\n </AccordionItem>\n <AccordionItem value=\"item-2\">\n <AccordionTrigger>Section 2</AccordionTrigger>\n <AccordionContent>Content for section 2</AccordionContent>\n </AccordionItem>\n</Accordion>"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Multiple expanded",
|
|
41
|
+
"code": "<Accordion type=\"multiple\" defaultValue={[\"item-1\", \"item-2\"]}>\n <AccordionItem value=\"item-1\">\n <AccordionTrigger>FAQ 1</AccordionTrigger>\n <AccordionContent>Answer 1</AccordionContent>\n </AccordionItem>\n <AccordionItem value=\"item-2\">\n <AccordionTrigger>FAQ 2</AccordionTrigger>\n <AccordionContent>Answer 2</AccordionContent>\n </AccordionItem>\n</Accordion>"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Controlled accordion",
|
|
45
|
+
"code": "<Accordion value={expanded} onValueChange={setExpanded}>\n <AccordionItem value=\"settings\">\n <AccordionTrigger>Settings</AccordionTrigger>\n <AccordionContent>Settings content</AccordionContent>\n </AccordionItem>\n</Accordion>"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Alert",
|
|
3
|
+
"description": "Token bindings for Alert component variants",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"base": {
|
|
6
|
+
"padding": "spacing-md",
|
|
7
|
+
"gap": "spacing-sm",
|
|
8
|
+
"font": "body",
|
|
9
|
+
"titleFont": "heading",
|
|
10
|
+
"borderWidth": "2px",
|
|
11
|
+
"borderRadius": "sm"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"background": "surface-primary",
|
|
15
|
+
"text": "content-primary",
|
|
16
|
+
"border": "edge-primary"
|
|
17
|
+
},
|
|
18
|
+
"success": {
|
|
19
|
+
"background": "status-success/10",
|
|
20
|
+
"text": "content-primary",
|
|
21
|
+
"border": "status-success"
|
|
22
|
+
},
|
|
23
|
+
"warning": {
|
|
24
|
+
"background": "status-warning/10",
|
|
25
|
+
"text": "content-primary",
|
|
26
|
+
"border": "status-warning"
|
|
27
|
+
},
|
|
28
|
+
"error": {
|
|
29
|
+
"background": "status-error/10",
|
|
30
|
+
"text": "content-primary",
|
|
31
|
+
"border": "status-error"
|
|
32
|
+
},
|
|
33
|
+
"info": {
|
|
34
|
+
"background": "status-info/10",
|
|
35
|
+
"text": "content-primary",
|
|
36
|
+
"border": "status-info"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"elements": {
|
|
40
|
+
"title": {
|
|
41
|
+
"font": "heading",
|
|
42
|
+
"fontSize": "xs",
|
|
43
|
+
"textTransform": "uppercase",
|
|
44
|
+
"marginBottom": "spacing-xs"
|
|
45
|
+
},
|
|
46
|
+
"content": {
|
|
47
|
+
"font": "body",
|
|
48
|
+
"fontSize": "base",
|
|
49
|
+
"textOpacity": "80%"
|
|
50
|
+
},
|
|
51
|
+
"closeButton": {
|
|
52
|
+
"textOpacity": "50%",
|
|
53
|
+
"textHoverOpacity": "100%"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Alert",
|
|
3
|
+
"description": "Static alert banners for important messages. Supports multiple semantic variants with optional icons and close button.",
|
|
4
|
+
"props": {
|
|
5
|
+
"variant": {
|
|
6
|
+
"type": "enum",
|
|
7
|
+
"values": ["default", "success", "warning", "error", "info"],
|
|
8
|
+
"default": "default",
|
|
9
|
+
"description": "Visual variant determining background and border colors for status indication"
|
|
10
|
+
},
|
|
11
|
+
"title": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Optional alert title displayed above the content"
|
|
14
|
+
},
|
|
15
|
+
"closable": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": false,
|
|
18
|
+
"description": "Show close button to dismiss the alert"
|
|
19
|
+
},
|
|
20
|
+
"onClose": {
|
|
21
|
+
"type": "function",
|
|
22
|
+
"description": "Callback when close button is clicked"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"slots": {
|
|
26
|
+
"children": {
|
|
27
|
+
"description": "Alert message content"
|
|
28
|
+
},
|
|
29
|
+
"icon": {
|
|
30
|
+
"description": "Icon component rendered before the content"
|
|
31
|
+
},
|
|
32
|
+
"closeIcon": {
|
|
33
|
+
"description": "Custom close icon component (replaces default X icon)"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"name": "Default alert",
|
|
39
|
+
"code": "<Alert>This is a default alert message.</Alert>"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "Alert with title",
|
|
43
|
+
"code": "<Alert title=\"Notice\">Important information here.</Alert>"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "Success alert",
|
|
47
|
+
"code": "<Alert variant=\"success\" title=\"Success\">Operation completed successfully.</Alert>"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "Warning alert",
|
|
51
|
+
"code": "<Alert variant=\"warning\">Please review before continuing.</Alert>"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "Error alert",
|
|
55
|
+
"code": "<Alert variant=\"error\" title=\"Error\">Something went wrong.</Alert>"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "Info alert with icon",
|
|
59
|
+
"code": "<Alert variant=\"info\" icon={<InfoIcon />}>Additional details here.</Alert>"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "Closable alert",
|
|
63
|
+
"code": "<Alert closable onClose={() => setVisible(false)}>Dismissible message.</Alert>"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Badge",
|
|
3
|
+
"description": "Token bindings for Badge component variants",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"base": {
|
|
6
|
+
"font": "heading",
|
|
7
|
+
"border": "edge-primary",
|
|
8
|
+
"text": "content-primary"
|
|
9
|
+
},
|
|
10
|
+
"default": {
|
|
11
|
+
"background": "surface-primary",
|
|
12
|
+
"text": "content-primary",
|
|
13
|
+
"border": "edge-primary"
|
|
14
|
+
},
|
|
15
|
+
"success": {
|
|
16
|
+
"background": "status-success",
|
|
17
|
+
"text": "content-primary",
|
|
18
|
+
"border": "edge-primary"
|
|
19
|
+
},
|
|
20
|
+
"warning": {
|
|
21
|
+
"background": "status-warning",
|
|
22
|
+
"text": "content-primary",
|
|
23
|
+
"border": "edge-primary"
|
|
24
|
+
},
|
|
25
|
+
"error": {
|
|
26
|
+
"background": "status-error",
|
|
27
|
+
"text": "content-primary",
|
|
28
|
+
"border": "edge-primary"
|
|
29
|
+
},
|
|
30
|
+
"info": {
|
|
31
|
+
"background": "status-info",
|
|
32
|
+
"text": "content-primary",
|
|
33
|
+
"border": "edge-primary"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"sizes": {
|
|
37
|
+
"sm": {
|
|
38
|
+
"paddingX": "spacing-sm",
|
|
39
|
+
"paddingY": "spacing-xs",
|
|
40
|
+
"fontSize": "2xs"
|
|
41
|
+
},
|
|
42
|
+
"md": {
|
|
43
|
+
"paddingX": "spacing-sm",
|
|
44
|
+
"paddingY": "spacing-xs",
|
|
45
|
+
"fontSize": "xs"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Badge",
|
|
3
|
+
"description": "Status indicator and label component with semantic color variants.",
|
|
4
|
+
"props": {
|
|
5
|
+
"variant": {
|
|
6
|
+
"type": "enum",
|
|
7
|
+
"values": ["default", "success", "warning", "error", "info"],
|
|
8
|
+
"default": "default",
|
|
9
|
+
"description": "Visual variant determining background color for status indication"
|
|
10
|
+
},
|
|
11
|
+
"size": {
|
|
12
|
+
"type": "enum",
|
|
13
|
+
"values": ["sm", "md"],
|
|
14
|
+
"default": "md",
|
|
15
|
+
"description": "Size preset controlling padding and text size"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"slots": {
|
|
19
|
+
"children": {
|
|
20
|
+
"description": "Badge label text or content"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"examples": [
|
|
24
|
+
{
|
|
25
|
+
"name": "Default badge",
|
|
26
|
+
"code": "<Badge>Label</Badge>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Success status",
|
|
30
|
+
"code": "<Badge variant=\"success\">Active</Badge>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "Warning status",
|
|
34
|
+
"code": "<Badge variant=\"warning\">Pending</Badge>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Error status",
|
|
38
|
+
"code": "<Badge variant=\"error\">Failed</Badge>"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "Info status",
|
|
42
|
+
"code": "<Badge variant=\"info\">New</Badge>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "Small badge",
|
|
46
|
+
"code": "<Badge size=\"sm\">Tiny</Badge>"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Breadcrumbs",
|
|
3
|
+
"description": "Token bindings for Breadcrumbs navigation component",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"base": {
|
|
6
|
+
"font": "heading",
|
|
7
|
+
"gap": "spacing-sm"
|
|
8
|
+
},
|
|
9
|
+
"separator": {
|
|
10
|
+
"text": "content-primary/40"
|
|
11
|
+
},
|
|
12
|
+
"link": {
|
|
13
|
+
"text": "content-primary/60",
|
|
14
|
+
"textHover": "content-primary"
|
|
15
|
+
},
|
|
16
|
+
"current": {
|
|
17
|
+
"text": "content-primary",
|
|
18
|
+
"fontWeight": "semibold"
|
|
19
|
+
},
|
|
20
|
+
"inactive": {
|
|
21
|
+
"text": "content-primary/60"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"states": {
|
|
25
|
+
"hover": {
|
|
26
|
+
"textDecoration": "underline"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Breadcrumbs",
|
|
3
|
+
"description": "Navigation hierarchy component showing the current page location within a site structure.",
|
|
4
|
+
"props": {
|
|
5
|
+
"items": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"required": true,
|
|
8
|
+
"description": "Array of breadcrumb items with label and optional href"
|
|
9
|
+
},
|
|
10
|
+
"separator": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"default": "/",
|
|
13
|
+
"description": "Character or string used as separator between items"
|
|
14
|
+
},
|
|
15
|
+
"className": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Additional CSS classes for the nav container"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"slots": {
|
|
21
|
+
"items": {
|
|
22
|
+
"description": "Breadcrumb items rendered as list elements with links or text"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"examples": [
|
|
26
|
+
{
|
|
27
|
+
"name": "Basic breadcrumbs",
|
|
28
|
+
"code": "<Breadcrumbs items={[{ label: 'Home', href: '/' }, { label: 'Products', href: '/products' }, { label: 'Details' }]} />"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Custom separator",
|
|
32
|
+
"code": "<Breadcrumbs items={[{ label: 'Dashboard', href: '/dashboard' }, { label: 'Settings' }]} separator=\">\" />"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Single item",
|
|
36
|
+
"code": "<Breadcrumbs items={[{ label: 'Home' }]} />"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Button",
|
|
3
|
+
"description": "Token bindings for Button component variants",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"base": {
|
|
6
|
+
"border": "edge-primary",
|
|
7
|
+
"font": "heading",
|
|
8
|
+
"focusRing": "edge-focus",
|
|
9
|
+
"shadow": "btn",
|
|
10
|
+
"shadowHover": "btn-hover"
|
|
11
|
+
},
|
|
12
|
+
"primary": {
|
|
13
|
+
"background": "action-primary",
|
|
14
|
+
"text": "content-primary",
|
|
15
|
+
"border": "edge-primary",
|
|
16
|
+
"backgroundHover": "action-primary",
|
|
17
|
+
"backgroundActive": "action-primary"
|
|
18
|
+
},
|
|
19
|
+
"secondary": {
|
|
20
|
+
"background": "surface-secondary",
|
|
21
|
+
"text": "content-inverted",
|
|
22
|
+
"border": "edge-primary",
|
|
23
|
+
"backgroundHover": "surface-primary",
|
|
24
|
+
"textHover": "content-primary",
|
|
25
|
+
"backgroundActive": "action-primary",
|
|
26
|
+
"textActive": "content-primary"
|
|
27
|
+
},
|
|
28
|
+
"outline": {
|
|
29
|
+
"background": "transparent",
|
|
30
|
+
"text": "content-primary",
|
|
31
|
+
"border": "edge-primary",
|
|
32
|
+
"backgroundHover": "content-primary/5",
|
|
33
|
+
"backgroundActive": "action-primary"
|
|
34
|
+
},
|
|
35
|
+
"ghost": {
|
|
36
|
+
"background": "transparent",
|
|
37
|
+
"text": "content-primary",
|
|
38
|
+
"border": "transparent",
|
|
39
|
+
"borderHover": "edge-primary",
|
|
40
|
+
"backgroundActive": "action-primary",
|
|
41
|
+
"borderActive": "edge-primary"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"states": {
|
|
45
|
+
"disabled": {
|
|
46
|
+
"opacity": "50%",
|
|
47
|
+
"cursor": "not-allowed"
|
|
48
|
+
},
|
|
49
|
+
"hover": {
|
|
50
|
+
"transform": "translateY(-0.125rem)",
|
|
51
|
+
"shadow": "btn-hover"
|
|
52
|
+
},
|
|
53
|
+
"active": {
|
|
54
|
+
"transform": "translateY(0.125rem)",
|
|
55
|
+
"shadow": "none"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Button",
|
|
3
|
+
"description": "Primary action trigger with retro lift effect. Supports button and link behaviors with customizable variants and sizes.",
|
|
4
|
+
"props": {
|
|
5
|
+
"variant": {
|
|
6
|
+
"type": "enum",
|
|
7
|
+
"values": ["primary", "secondary", "outline", "ghost"],
|
|
8
|
+
"default": "primary",
|
|
9
|
+
"description": "Visual variant determining colors and hover states"
|
|
10
|
+
},
|
|
11
|
+
"size": {
|
|
12
|
+
"type": "enum",
|
|
13
|
+
"values": ["sm", "md", "lg"],
|
|
14
|
+
"default": "md",
|
|
15
|
+
"description": "Size preset controlling height, padding, and text size"
|
|
16
|
+
},
|
|
17
|
+
"fullWidth": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false,
|
|
20
|
+
"description": "Expand button to fill container width"
|
|
21
|
+
},
|
|
22
|
+
"iconOnly": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false,
|
|
25
|
+
"description": "Square button with icon only (no text)"
|
|
26
|
+
},
|
|
27
|
+
"loading": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false,
|
|
30
|
+
"description": "Show loading state (replaces icon with loadingIndicator slot)"
|
|
31
|
+
},
|
|
32
|
+
"disabled": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": false,
|
|
35
|
+
"description": "Disable button interactions"
|
|
36
|
+
},
|
|
37
|
+
"href": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "URL for link navigation. When provided, button renders as anchor or opens via window.open"
|
|
40
|
+
},
|
|
41
|
+
"asLink": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true,
|
|
44
|
+
"description": "When href is provided: true renders as <a>, false uses window.open"
|
|
45
|
+
},
|
|
46
|
+
"target": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Link target (e.g., '_blank' for new tab)"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"slots": {
|
|
52
|
+
"children": {
|
|
53
|
+
"description": "Button label text"
|
|
54
|
+
},
|
|
55
|
+
"icon": {
|
|
56
|
+
"description": "Icon component rendered on the right side of the button"
|
|
57
|
+
},
|
|
58
|
+
"loadingIndicator": {
|
|
59
|
+
"description": "Spinner component shown when loading is true (replaces icon)"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"examples": [
|
|
63
|
+
{
|
|
64
|
+
"name": "Primary button",
|
|
65
|
+
"code": "<Button>Click me</Button>"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "Secondary with icon",
|
|
69
|
+
"code": "<Button variant=\"secondary\" icon={<ArrowIcon />}>Next</Button>"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "Icon-only button",
|
|
73
|
+
"code": "<Button iconOnly icon={<MenuIcon />} aria-label=\"Open menu\" />"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "Link button",
|
|
77
|
+
"code": "<Button href=\"/dashboard\">Go to Dashboard</Button>"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "Loading state",
|
|
81
|
+
"code": "<Button loading loadingIndicator={<Spinner />} icon={<SendIcon />}>Submit</Button>"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Card",
|
|
3
|
+
"tokenBindings": {
|
|
4
|
+
"default": {
|
|
5
|
+
"background": "surface-primary",
|
|
6
|
+
"text": "content-primary",
|
|
7
|
+
"border": "edge-primary"
|
|
8
|
+
},
|
|
9
|
+
"dark": {
|
|
10
|
+
"background": "surface-secondary",
|
|
11
|
+
"text": "content-inverted",
|
|
12
|
+
"border": "edge-primary"
|
|
13
|
+
},
|
|
14
|
+
"raised": {
|
|
15
|
+
"background": "surface-primary",
|
|
16
|
+
"text": "content-primary",
|
|
17
|
+
"border": "edge-primary",
|
|
18
|
+
"shadow": "shadow-card"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Card",
|
|
3
|
+
"description": "Container with header, body, and footer sections",
|
|
4
|
+
"props": {
|
|
5
|
+
"variant": {
|
|
6
|
+
"type": "enum",
|
|
7
|
+
"values": ["default", "dark", "raised"],
|
|
8
|
+
"default": "default",
|
|
9
|
+
"description": "Visual variant controlling background and text colors"
|
|
10
|
+
},
|
|
11
|
+
"noPadding": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"default": false,
|
|
14
|
+
"description": "Remove default padding from the card container"
|
|
15
|
+
},
|
|
16
|
+
"className": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Additional CSS classes to apply"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"slots": ["children"],
|
|
22
|
+
"subcomponents": ["CardHeader", "CardBody", "CardFooter"]
|
|
23
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "Checkbox",
|
|
3
|
+
"description": "Token bindings for Checkbox and Radio components",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"container": {
|
|
6
|
+
"gap": "spacing-xs"
|
|
7
|
+
},
|
|
8
|
+
"input": {
|
|
9
|
+
"background": "surface-primary",
|
|
10
|
+
"border": "edge-primary",
|
|
11
|
+
"backgroundChecked": "action-primary",
|
|
12
|
+
"focusRing": "edge-focus"
|
|
13
|
+
},
|
|
14
|
+
"checkmark": {
|
|
15
|
+
"color": "content-primary"
|
|
16
|
+
},
|
|
17
|
+
"radioDot": {
|
|
18
|
+
"background": "content-primary"
|
|
19
|
+
},
|
|
20
|
+
"label": {
|
|
21
|
+
"text": "content-primary",
|
|
22
|
+
"font": "mondwest"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"states": {
|
|
26
|
+
"disabled": {
|
|
27
|
+
"opacity": "50%",
|
|
28
|
+
"cursor": "not-allowed"
|
|
29
|
+
},
|
|
30
|
+
"checked": {
|
|
31
|
+
"background": "action-primary"
|
|
32
|
+
},
|
|
33
|
+
"focus": {
|
|
34
|
+
"ring": "edge-focus",
|
|
35
|
+
"ringOffset": "1px"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Checkbox",
|
|
3
|
+
"description": "Retro-styled checkbox and radio components for form selections. Provides accessible input controls with visual feedback states.",
|
|
4
|
+
"subcomponents": ["Checkbox", "Radio"],
|
|
5
|
+
"props": {
|
|
6
|
+
"label": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Label text displayed next to the input"
|
|
9
|
+
},
|
|
10
|
+
"disabled": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"default": false,
|
|
13
|
+
"description": "Disable input interactions"
|
|
14
|
+
},
|
|
15
|
+
"checked": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Controlled checked state (native HTML attribute)"
|
|
18
|
+
},
|
|
19
|
+
"defaultChecked": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Initial checked state for uncontrolled usage"
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Input name for form submission"
|
|
26
|
+
},
|
|
27
|
+
"value": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Input value for form submission"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"slots": {},
|
|
33
|
+
"examples": [
|
|
34
|
+
{
|
|
35
|
+
"name": "Basic checkbox",
|
|
36
|
+
"code": "<Checkbox label=\"Accept terms\" />"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Checked checkbox",
|
|
40
|
+
"code": "<Checkbox label=\"Subscribe to newsletter\" defaultChecked />"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Disabled checkbox",
|
|
44
|
+
"code": "<Checkbox label=\"Locked option\" disabled />"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "Basic radio",
|
|
48
|
+
"code": "<Radio label=\"Option A\" name=\"choice\" value=\"a\" />"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "Radio group",
|
|
52
|
+
"code": "<>\n <Radio label=\"Small\" name=\"size\" value=\"sm\" />\n <Radio label=\"Medium\" name=\"size\" value=\"md\" defaultChecked />\n <Radio label=\"Large\" name=\"size\" value=\"lg\" />\n</>"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "ContextMenu",
|
|
3
|
+
"description": "Token bindings for ContextMenu component",
|
|
4
|
+
"tokenBindings": {
|
|
5
|
+
"content": {
|
|
6
|
+
"background": "surface-primary",
|
|
7
|
+
"border": "edge-primary",
|
|
8
|
+
"shadow": "edge-primary"
|
|
9
|
+
},
|
|
10
|
+
"item": {
|
|
11
|
+
"text": "content-primary",
|
|
12
|
+
"textDestructive": "status-error",
|
|
13
|
+
"backgroundHover": "action-primary"
|
|
14
|
+
},
|
|
15
|
+
"separator": {
|
|
16
|
+
"border": "edge-primary/20"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"states": {
|
|
20
|
+
"disabled": {
|
|
21
|
+
"opacity": "50%",
|
|
22
|
+
"cursor": "not-allowed"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|