@idealyst/mcp-server 1.0.84
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/README.md +202 -0
- package/dist/data/cli-commands.d.ts +2 -0
- package/dist/data/cli-commands.d.ts.map +1 -0
- package/dist/data/cli-commands.js +100 -0
- package/dist/data/cli-commands.js.map +1 -0
- package/dist/data/components/Accordion.d.ts +15 -0
- package/dist/data/components/Accordion.d.ts.map +1 -0
- package/dist/data/components/Accordion.js +112 -0
- package/dist/data/components/Accordion.js.map +1 -0
- package/dist/data/components/ActivityIndicator.d.ts +15 -0
- package/dist/data/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/data/components/ActivityIndicator.js +82 -0
- package/dist/data/components/ActivityIndicator.js.map +1 -0
- package/dist/data/components/Alert.d.ts +15 -0
- package/dist/data/components/Alert.d.ts.map +1 -0
- package/dist/data/components/Alert.js +132 -0
- package/dist/data/components/Alert.js.map +1 -0
- package/dist/data/components/Avatar.d.ts +15 -0
- package/dist/data/components/Avatar.d.ts.map +1 -0
- package/dist/data/components/Avatar.js +93 -0
- package/dist/data/components/Avatar.js.map +1 -0
- package/dist/data/components/Badge.d.ts +15 -0
- package/dist/data/components/Badge.d.ts.map +1 -0
- package/dist/data/components/Badge.js +64 -0
- package/dist/data/components/Badge.js.map +1 -0
- package/dist/data/components/Breadcrumb.d.ts +15 -0
- package/dist/data/components/Breadcrumb.d.ts.map +1 -0
- package/dist/data/components/Breadcrumb.js +96 -0
- package/dist/data/components/Breadcrumb.js.map +1 -0
- package/dist/data/components/Button.d.ts +15 -0
- package/dist/data/components/Button.d.ts.map +1 -0
- package/dist/data/components/Button.js +87 -0
- package/dist/data/components/Button.js.map +1 -0
- package/dist/data/components/Card.d.ts +15 -0
- package/dist/data/components/Card.d.ts.map +1 -0
- package/dist/data/components/Card.js +67 -0
- package/dist/data/components/Card.js.map +1 -0
- package/dist/data/components/Checkbox.d.ts +15 -0
- package/dist/data/components/Checkbox.d.ts.map +1 -0
- package/dist/data/components/Checkbox.js +118 -0
- package/dist/data/components/Checkbox.js.map +1 -0
- package/dist/data/components/Chip.d.ts +15 -0
- package/dist/data/components/Chip.d.ts.map +1 -0
- package/dist/data/components/Chip.js +76 -0
- package/dist/data/components/Chip.js.map +1 -0
- package/dist/data/components/Dialog.d.ts +15 -0
- package/dist/data/components/Dialog.d.ts.map +1 -0
- package/dist/data/components/Dialog.js +137 -0
- package/dist/data/components/Dialog.js.map +1 -0
- package/dist/data/components/Divider.d.ts +15 -0
- package/dist/data/components/Divider.d.ts.map +1 -0
- package/dist/data/components/Divider.js +71 -0
- package/dist/data/components/Divider.js.map +1 -0
- package/dist/data/components/Icon.d.ts +15 -0
- package/dist/data/components/Icon.d.ts.map +1 -0
- package/dist/data/components/Icon.js +70 -0
- package/dist/data/components/Icon.js.map +1 -0
- package/dist/data/components/Image.d.ts +15 -0
- package/dist/data/components/Image.d.ts.map +1 -0
- package/dist/data/components/Image.js +122 -0
- package/dist/data/components/Image.js.map +1 -0
- package/dist/data/components/Input.d.ts +15 -0
- package/dist/data/components/Input.d.ts.map +1 -0
- package/dist/data/components/Input.js +109 -0
- package/dist/data/components/Input.js.map +1 -0
- package/dist/data/components/List.d.ts +15 -0
- package/dist/data/components/List.d.ts.map +1 -0
- package/dist/data/components/List.js +113 -0
- package/dist/data/components/List.js.map +1 -0
- package/dist/data/components/Menu.d.ts +15 -0
- package/dist/data/components/Menu.d.ts.map +1 -0
- package/dist/data/components/Menu.js +132 -0
- package/dist/data/components/Menu.js.map +1 -0
- package/dist/data/components/Popover.d.ts +15 -0
- package/dist/data/components/Popover.d.ts.map +1 -0
- package/dist/data/components/Popover.js +159 -0
- package/dist/data/components/Popover.js.map +1 -0
- package/dist/data/components/Pressable.d.ts +15 -0
- package/dist/data/components/Pressable.d.ts.map +1 -0
- package/dist/data/components/Pressable.js +125 -0
- package/dist/data/components/Pressable.js.map +1 -0
- package/dist/data/components/Progress.d.ts +15 -0
- package/dist/data/components/Progress.d.ts.map +1 -0
- package/dist/data/components/Progress.js +95 -0
- package/dist/data/components/Progress.js.map +1 -0
- package/dist/data/components/RadioButton.d.ts +15 -0
- package/dist/data/components/RadioButton.d.ts.map +1 -0
- package/dist/data/components/RadioButton.js +140 -0
- package/dist/data/components/RadioButton.js.map +1 -0
- package/dist/data/components/SVGImage.d.ts +15 -0
- package/dist/data/components/SVGImage.d.ts.map +1 -0
- package/dist/data/components/SVGImage.js +112 -0
- package/dist/data/components/SVGImage.js.map +1 -0
- package/dist/data/components/Screen.d.ts +15 -0
- package/dist/data/components/Screen.d.ts.map +1 -0
- package/dist/data/components/Screen.js +99 -0
- package/dist/data/components/Screen.js.map +1 -0
- package/dist/data/components/Select.d.ts +15 -0
- package/dist/data/components/Select.d.ts.map +1 -0
- package/dist/data/components/Select.js +146 -0
- package/dist/data/components/Select.js.map +1 -0
- package/dist/data/components/Skeleton.d.ts +15 -0
- package/dist/data/components/Skeleton.d.ts.map +1 -0
- package/dist/data/components/Skeleton.js +110 -0
- package/dist/data/components/Skeleton.js.map +1 -0
- package/dist/data/components/Slider.d.ts +15 -0
- package/dist/data/components/Slider.d.ts.map +1 -0
- package/dist/data/components/Slider.js +129 -0
- package/dist/data/components/Slider.js.map +1 -0
- package/dist/data/components/Switch.d.ts +15 -0
- package/dist/data/components/Switch.d.ts.map +1 -0
- package/dist/data/components/Switch.js +127 -0
- package/dist/data/components/Switch.js.map +1 -0
- package/dist/data/components/TabBar.d.ts +15 -0
- package/dist/data/components/TabBar.d.ts.map +1 -0
- package/dist/data/components/TabBar.js +145 -0
- package/dist/data/components/TabBar.js.map +1 -0
- package/dist/data/components/Table.d.ts +15 -0
- package/dist/data/components/Table.d.ts.map +1 -0
- package/dist/data/components/Table.js +151 -0
- package/dist/data/components/Table.js.map +1 -0
- package/dist/data/components/Tabs.d.ts +15 -0
- package/dist/data/components/Tabs.d.ts.map +1 -0
- package/dist/data/components/Tabs.js +150 -0
- package/dist/data/components/Tabs.js.map +1 -0
- package/dist/data/components/Text.d.ts +15 -0
- package/dist/data/components/Text.d.ts.map +1 -0
- package/dist/data/components/Text.js +85 -0
- package/dist/data/components/Text.js.map +1 -0
- package/dist/data/components/TextArea.d.ts +15 -0
- package/dist/data/components/TextArea.d.ts.map +1 -0
- package/dist/data/components/TextArea.js +155 -0
- package/dist/data/components/TextArea.js.map +1 -0
- package/dist/data/components/Tooltip.d.ts +15 -0
- package/dist/data/components/Tooltip.d.ts.map +1 -0
- package/dist/data/components/Tooltip.js +105 -0
- package/dist/data/components/Tooltip.js.map +1 -0
- package/dist/data/components/Video.d.ts +15 -0
- package/dist/data/components/Video.d.ts.map +1 -0
- package/dist/data/components/Video.js +168 -0
- package/dist/data/components/Video.js.map +1 -0
- package/dist/data/components/View.d.ts +15 -0
- package/dist/data/components/View.d.ts.map +1 -0
- package/dist/data/components/View.js +126 -0
- package/dist/data/components/View.js.map +1 -0
- package/dist/data/components/index.d.ts +37 -0
- package/dist/data/components/index.d.ts.map +1 -0
- package/dist/data/components/index.js +110 -0
- package/dist/data/components/index.js.map +1 -0
- package/dist/data/framework-guides.d.ts +2 -0
- package/dist/data/framework-guides.d.ts.map +1 -0
- package/dist/data/framework-guides.js +589 -0
- package/dist/data/framework-guides.js.map +1 -0
- package/dist/data/icon-guide.d.ts +2 -0
- package/dist/data/icon-guide.d.ts.map +1 -0
- package/dist/data/icon-guide.js +285 -0
- package/dist/data/icon-guide.js.map +1 -0
- package/dist/data/icons.json +7452 -0
- package/dist/data/navigation-guides.d.ts +2 -0
- package/dist/data/navigation-guides.d.ts.map +1 -0
- package/dist/data/navigation-guides.js +1196 -0
- package/dist/data/navigation-guides.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +422 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
- package/src/data/cli-commands.ts +103 -0
- package/src/data/components/Accordion.ts +106 -0
- package/src/data/components/ActivityIndicator.ts +82 -0
- package/src/data/components/Alert.ts +132 -0
- package/src/data/components/Avatar.ts +93 -0
- package/src/data/components/Badge.ts +63 -0
- package/src/data/components/Breadcrumb.ts +94 -0
- package/src/data/components/Button.ts +86 -0
- package/src/data/components/Card.ts +67 -0
- package/src/data/components/Checkbox.ts +117 -0
- package/src/data/components/Chip.ts +93 -0
- package/src/data/components/Dialog.ts +136 -0
- package/src/data/components/Divider.ts +70 -0
- package/src/data/components/Icon.ts +70 -0
- package/src/data/components/Image.ts +121 -0
- package/src/data/components/Input.ts +150 -0
- package/src/data/components/List.ts +103 -0
- package/src/data/components/Menu.ts +125 -0
- package/src/data/components/Popover.ts +159 -0
- package/src/data/components/Pressable.ts +123 -0
- package/src/data/components/Progress.ts +95 -0
- package/src/data/components/RadioButton.ts +130 -0
- package/src/data/components/SVGImage.ts +114 -0
- package/src/data/components/Screen.ts +103 -0
- package/src/data/components/Select.ts +140 -0
- package/src/data/components/Skeleton.ts +102 -0
- package/src/data/components/Slider.ts +150 -0
- package/src/data/components/Switch.ts +127 -0
- package/src/data/components/TabBar.ts +142 -0
- package/src/data/components/Table.ts +153 -0
- package/src/data/components/Tabs.ts +152 -0
- package/src/data/components/Text.ts +85 -0
- package/src/data/components/TextArea.ts +155 -0
- package/src/data/components/Tooltip.ts +105 -0
- package/src/data/components/Video.ts +168 -0
- package/src/data/components/View.ts +126 -0
- package/src/data/components/index.ts +109 -0
- package/src/data/framework-guides.ts +593 -0
- package/src/data/icon-guide.ts +284 -0
- package/src/data/icons.json +7452 -0
- package/src/data/navigation-guides.ts +1199 -0
- package/src/index.ts +473 -0
- package/test-client.js +86 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export const Alert = {
|
|
2
|
+
category: "feedback",
|
|
3
|
+
description: "Message banner for displaying important information, warnings, errors, and success messages",
|
|
4
|
+
props: `
|
|
5
|
+
- \`title\`: string - Alert title/heading
|
|
6
|
+
- \`message\`: string - Alert message text
|
|
7
|
+
- \`children\`: ReactNode - Custom content (alternative to message)
|
|
8
|
+
- \`intent\`: 'success' | 'error' | 'warning' | 'info' | 'neutral' - Alert type/severity
|
|
9
|
+
- \`variant\`: 'filled' | 'outlined' | 'soft' - Visual style
|
|
10
|
+
- \`icon\`: ReactNode - Custom icon to display
|
|
11
|
+
- \`showIcon\`: boolean - Whether to show the default intent icon (default: true)
|
|
12
|
+
- \`dismissible\`: boolean - Whether the alert can be dismissed
|
|
13
|
+
- \`onDismiss\`: () => void - Dismiss handler callback
|
|
14
|
+
- \`actions\`: ReactNode - Action buttons or custom elements
|
|
15
|
+
- \`style\`: ViewStyle - Additional custom styles
|
|
16
|
+
- \`testID\`: string - Test identifier
|
|
17
|
+
`,
|
|
18
|
+
features: [
|
|
19
|
+
"Five intent types with semantic meaning",
|
|
20
|
+
"Three visual variants",
|
|
21
|
+
"Default icons for each intent",
|
|
22
|
+
"Custom icon support",
|
|
23
|
+
"Dismissible with close button",
|
|
24
|
+
"Action buttons support",
|
|
25
|
+
"Title and message or custom children",
|
|
26
|
+
],
|
|
27
|
+
bestPractices: [
|
|
28
|
+
"Use 'error' intent for critical errors requiring immediate attention",
|
|
29
|
+
"Use 'warning' intent for important but non-critical information",
|
|
30
|
+
"Use 'success' intent for positive confirmations",
|
|
31
|
+
"Use 'info' intent for general informational messages",
|
|
32
|
+
"Keep alert messages concise and actionable",
|
|
33
|
+
"Make alerts dismissible unless they require action",
|
|
34
|
+
],
|
|
35
|
+
usage: `
|
|
36
|
+
import { Alert } from '@idealyst/components';
|
|
37
|
+
|
|
38
|
+
<Alert
|
|
39
|
+
intent="error"
|
|
40
|
+
title="Error"
|
|
41
|
+
message="Failed to save changes. Please try again."
|
|
42
|
+
dismissible
|
|
43
|
+
onDismiss={() => setShowAlert(false)}
|
|
44
|
+
/>
|
|
45
|
+
`,
|
|
46
|
+
examples: {
|
|
47
|
+
basic: `import { Alert } from '@idealyst/components';
|
|
48
|
+
|
|
49
|
+
<Alert
|
|
50
|
+
intent="info"
|
|
51
|
+
message="This is an informational message"
|
|
52
|
+
/>`,
|
|
53
|
+
variants: `import { Alert, View } from '@idealyst/components';
|
|
54
|
+
|
|
55
|
+
<View spacing="md">
|
|
56
|
+
<Alert
|
|
57
|
+
intent="success"
|
|
58
|
+
variant="filled"
|
|
59
|
+
message="Success message"
|
|
60
|
+
/>
|
|
61
|
+
<Alert
|
|
62
|
+
intent="warning"
|
|
63
|
+
variant="outlined"
|
|
64
|
+
message="Warning message"
|
|
65
|
+
/>
|
|
66
|
+
<Alert
|
|
67
|
+
intent="error"
|
|
68
|
+
variant="soft"
|
|
69
|
+
message="Error message"
|
|
70
|
+
/>
|
|
71
|
+
</View>`,
|
|
72
|
+
"with-icons": `import { Alert, View } from '@idealyst/components';
|
|
73
|
+
|
|
74
|
+
<View spacing="md">
|
|
75
|
+
<Alert
|
|
76
|
+
intent="success"
|
|
77
|
+
title="Success!"
|
|
78
|
+
message="Your changes have been saved"
|
|
79
|
+
showIcon
|
|
80
|
+
/>
|
|
81
|
+
<Alert
|
|
82
|
+
intent="error"
|
|
83
|
+
title="Error"
|
|
84
|
+
message="Something went wrong"
|
|
85
|
+
showIcon
|
|
86
|
+
dismissible
|
|
87
|
+
/>
|
|
88
|
+
</View>`,
|
|
89
|
+
interactive: `import { Alert, Button, View } from '@idealyst/components';
|
|
90
|
+
import { useState } from 'react';
|
|
91
|
+
|
|
92
|
+
function Example() {
|
|
93
|
+
const [showAlert, setShowAlert] = useState(false);
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<View spacing="md">
|
|
97
|
+
<Button onPress={() => setShowAlert(true)}>
|
|
98
|
+
Show Alert
|
|
99
|
+
</Button>
|
|
100
|
+
|
|
101
|
+
{showAlert && (
|
|
102
|
+
<Alert
|
|
103
|
+
intent="warning"
|
|
104
|
+
title="Unsaved Changes"
|
|
105
|
+
message="You have unsaved changes that will be lost."
|
|
106
|
+
dismissible
|
|
107
|
+
onDismiss={() => setShowAlert(false)}
|
|
108
|
+
actions={
|
|
109
|
+
<View style={{ flexDirection: 'row', gap: 8 }}>
|
|
110
|
+
<Button size="small" onPress={() => setShowAlert(false)}>
|
|
111
|
+
Cancel
|
|
112
|
+
</Button>
|
|
113
|
+
<Button
|
|
114
|
+
size="small"
|
|
115
|
+
intent="warning"
|
|
116
|
+
onPress={() => {
|
|
117
|
+
handleSave();
|
|
118
|
+
setShowAlert(false);
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
Save
|
|
122
|
+
</Button>
|
|
123
|
+
</View>
|
|
124
|
+
}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</View>
|
|
128
|
+
);
|
|
129
|
+
}`,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/data/components/Alert.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,6FAA6F;IAC1G,KAAK,EAAE;;;;;;;;;;;;;CAaR;IACC,QAAQ,EAAE;QACR,yCAAyC;QACzC,uBAAuB;QACvB,+BAA+B;QAC/B,qBAAqB;QACrB,+BAA+B;QAC/B,wBAAwB;QACxB,sCAAsC;KACvC;IACD,aAAa,EAAE;QACb,sEAAsE;QACtE,iEAAiE;QACjE,iDAAiD;QACjD,sDAAsD;QACtD,4CAA4C;QAC5C,oDAAoD;KACrD;IACD,KAAK,EAAE;;;;;;;;;;CAUR;IACC,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;GAKR;QAEC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;QAkBN;QAEJ,YAAY,EAAE;;;;;;;;;;;;;;;;QAgBV;QAEJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCf;KACC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Avatar: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/data/components/Avatar.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CA8FlB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export const Avatar = {
|
|
2
|
+
category: "display",
|
|
3
|
+
description: "Profile picture or user avatar with fallback text support",
|
|
4
|
+
props: `
|
|
5
|
+
- \`src\`: string | any - Image source (URL or require())
|
|
6
|
+
- \`alt\`: string - Alt text for the image
|
|
7
|
+
- \`fallback\`: string - Fallback text displayed when no image (usually initials)
|
|
8
|
+
- \`size\`: 'small' | 'medium' | 'large' | 'xlarge' - Avatar size
|
|
9
|
+
- \`shape\`: 'circle' | 'square' - Avatar shape
|
|
10
|
+
- \`color\`: ColorVariant - Background color for fallback (from theme palette)
|
|
11
|
+
- \`style\`: any - Additional custom styles
|
|
12
|
+
- \`testID\`: string - Test identifier
|
|
13
|
+
`,
|
|
14
|
+
features: [
|
|
15
|
+
"Image display with automatic fallback",
|
|
16
|
+
"Fallback text (initials) support",
|
|
17
|
+
"Four size options",
|
|
18
|
+
"Circle and square shapes",
|
|
19
|
+
"Theme color variants for fallback backgrounds",
|
|
20
|
+
"Accessible with alt text",
|
|
21
|
+
],
|
|
22
|
+
bestPractices: [
|
|
23
|
+
"Always provide alt text for accessibility",
|
|
24
|
+
"Use initials (2 characters) for fallback text",
|
|
25
|
+
"Use 'circle' shape for user avatars",
|
|
26
|
+
"Use 'square' shape for brands or organizations",
|
|
27
|
+
"Choose contrasting colors for fallback backgrounds",
|
|
28
|
+
],
|
|
29
|
+
usage: `
|
|
30
|
+
import { Avatar } from '@idealyst/components';
|
|
31
|
+
|
|
32
|
+
<Avatar
|
|
33
|
+
src="https://example.com/avatar.jpg"
|
|
34
|
+
alt="John Doe"
|
|
35
|
+
fallback="JD"
|
|
36
|
+
size="large"
|
|
37
|
+
shape="circle"
|
|
38
|
+
/>
|
|
39
|
+
`,
|
|
40
|
+
examples: {
|
|
41
|
+
basic: `import { Avatar } from '@idealyst/components';
|
|
42
|
+
|
|
43
|
+
<Avatar
|
|
44
|
+
fallback="JD"
|
|
45
|
+
size="medium"
|
|
46
|
+
/>`,
|
|
47
|
+
variants: `import { Avatar, View } from '@idealyst/components';
|
|
48
|
+
|
|
49
|
+
<View style={{ flexDirection: 'row', gap: 8 }}>
|
|
50
|
+
<Avatar fallback="SM" size="small" />
|
|
51
|
+
<Avatar fallback="MD" size="medium" />
|
|
52
|
+
<Avatar fallback="LG" size="large" />
|
|
53
|
+
<Avatar fallback="XL" size="xlarge" />
|
|
54
|
+
</View>`,
|
|
55
|
+
"with-icons": `import { Avatar, View } from '@idealyst/components';
|
|
56
|
+
|
|
57
|
+
<View style={{ flexDirection: 'row', gap: 8 }}>
|
|
58
|
+
{/* Circle avatars */}
|
|
59
|
+
<Avatar
|
|
60
|
+
src="https://i.pravatar.cc/150?img=1"
|
|
61
|
+
alt="User 1"
|
|
62
|
+
fallback="U1"
|
|
63
|
+
shape="circle"
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
{/* Square avatars */}
|
|
67
|
+
<Avatar
|
|
68
|
+
src="https://i.pravatar.cc/150?img=2"
|
|
69
|
+
alt="User 2"
|
|
70
|
+
fallback="U2"
|
|
71
|
+
shape="square"
|
|
72
|
+
/>
|
|
73
|
+
</View>`,
|
|
74
|
+
interactive: `import { Avatar, View, Text } from '@idealyst/components';
|
|
75
|
+
|
|
76
|
+
function UserProfile({ user }) {
|
|
77
|
+
return (
|
|
78
|
+
<View spacing="sm" style={{ alignItems: 'center' }}>
|
|
79
|
+
<Avatar
|
|
80
|
+
src={user.avatar}
|
|
81
|
+
alt={user.name}
|
|
82
|
+
fallback={user.initials}
|
|
83
|
+
size="xlarge"
|
|
84
|
+
color="primary"
|
|
85
|
+
/>
|
|
86
|
+
<Text weight="bold">{user.name}</Text>
|
|
87
|
+
<Text size="small" color="secondary">{user.email}</Text>
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
}`,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../src/data/components/Avatar.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,2DAA2D;IACxE,KAAK,EAAE;;;;;;;;;CASR;IACC,QAAQ,EAAE;QACR,uCAAuC;QACvC,kCAAkC;QAClC,mBAAmB;QACnB,0BAA0B;QAC1B,+CAA+C;QAC/C,0BAA0B;KAC3B;IACD,aAAa,EAAE;QACb,2CAA2C;QAC3C,+CAA+C;QAC/C,qCAAqC;QACrC,gDAAgD;QAChD,oDAAoD;KACrD;IACD,KAAK,EAAE;;;;;;;;;;CAUR;IACC,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;GAKR;QAEC,QAAQ,EAAE;;;;;;;QAON;QAEJ,YAAY,EAAE;;;;;;;;;;;;;;;;;;QAkBV;QAEJ,WAAW,EAAE;;;;;;;;;;;;;;;;EAgBf;KACC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Badge: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/data/components/Badge.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;;;;;;;CA8DjB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const Badge = {
|
|
2
|
+
category: "display",
|
|
3
|
+
description: "Small status indicator with various styles and colors",
|
|
4
|
+
props: `
|
|
5
|
+
- \`variant\`: 'filled' | 'outlined' | 'dot' - Visual style
|
|
6
|
+
- \`color\`: string - Badge color from theme palette
|
|
7
|
+
- \`size\`: 'small' | 'medium' | 'large' - Badge size
|
|
8
|
+
- \`icon\`: string | ReactNode - Icon to display
|
|
9
|
+
- \`children\`: ReactNode - Badge content (text/number)
|
|
10
|
+
`,
|
|
11
|
+
features: [
|
|
12
|
+
"Three visual variants",
|
|
13
|
+
"Theme palette color support",
|
|
14
|
+
"Three sizes",
|
|
15
|
+
"Icon support",
|
|
16
|
+
"Dot variant for minimal indicators",
|
|
17
|
+
],
|
|
18
|
+
bestPractices: [
|
|
19
|
+
"Use 'dot' variant for minimal status indicators",
|
|
20
|
+
"Use 'filled' variant for prominent badges",
|
|
21
|
+
"Keep badge content short (numbers or 1-2 words)",
|
|
22
|
+
"Use appropriate colors for semantic meaning",
|
|
23
|
+
],
|
|
24
|
+
usage: `
|
|
25
|
+
import { Badge } from '@idealyst/components';
|
|
26
|
+
|
|
27
|
+
<Badge variant="filled" color="red">
|
|
28
|
+
3
|
|
29
|
+
</Badge>
|
|
30
|
+
`,
|
|
31
|
+
examples: {
|
|
32
|
+
basic: `import { Badge } from '@idealyst/components';
|
|
33
|
+
|
|
34
|
+
<Badge>New</Badge>`,
|
|
35
|
+
variants: `import { Badge } from '@idealyst/components';
|
|
36
|
+
|
|
37
|
+
<Badge variant="filled" color="blue">5</Badge>
|
|
38
|
+
<Badge variant="outlined" color="green">Active</Badge>
|
|
39
|
+
<Badge variant="dot" color="red" />`,
|
|
40
|
+
"with-icons": `import { Badge } from '@idealyst/components';
|
|
41
|
+
|
|
42
|
+
<Badge icon="star" color="yellow">
|
|
43
|
+
Featured
|
|
44
|
+
</Badge>`,
|
|
45
|
+
interactive: `import { Badge, Button, View } from '@idealyst/components';
|
|
46
|
+
import { useState } from 'react';
|
|
47
|
+
|
|
48
|
+
function Example() {
|
|
49
|
+
const [count, setCount] = useState(0);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<View spacing="sm">
|
|
53
|
+
<Badge variant="filled" color="red">
|
|
54
|
+
{count}
|
|
55
|
+
</Badge>
|
|
56
|
+
<Button onPress={() => setCount(count + 1)}>
|
|
57
|
+
Increment
|
|
58
|
+
</Button>
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
}`,
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/data/components/Badge.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACrB,QAAQ,EAAE,SAAS;IACf,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;;;;;;CAMV;IACG,QAAQ,EAAE;QACR,uBAAuB;QACvB,6BAA6B;QAC7B,aAAa;QACb,cAAc;QACd,oCAAoC;KACrC;IACD,aAAa,EAAE;QACb,iDAAiD;QACjD,2CAA2C;QAC3C,iDAAiD;QACjD,6CAA6C;KAC9C;IACD,KAAK,EAAE;;;;;;CAMV;IACG,QAAQ,EAAE;QACR,KAAK,EAAE;;mBAEM;QACb,QAAQ,EAAE;;;;oCAIoB;QAC9B,YAAY,EAAE;;;;SAIX;QACH,WAAW,EAAE;;;;;;;;;;;;;;;;EAgBjB;KACG;CACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Breadcrumb: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/data/components/Breadcrumb.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAiGtB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export const Breadcrumb = {
|
|
2
|
+
category: "navigation",
|
|
3
|
+
description: "Navigation aid showing the current location within a hierarchy",
|
|
4
|
+
props: `
|
|
5
|
+
- \`items\`: BreadcrumbItem[] - Array of breadcrumb items
|
|
6
|
+
- \`label\`: string - Label text for the breadcrumb item
|
|
7
|
+
- \`icon\`: IconName | ReactNode - Optional icon (icon name string or custom component)
|
|
8
|
+
- \`onPress\`: () => void - Click handler for the breadcrumb item
|
|
9
|
+
- \`disabled\`: boolean - Whether this item is disabled
|
|
10
|
+
- \`separator\`: ReactNode - Custom separator between items (default: '/')
|
|
11
|
+
- \`maxItems\`: number - Maximum number of items before truncating
|
|
12
|
+
- \`intent\`: 'primary' | 'neutral' - Intent color for links
|
|
13
|
+
- \`size\`: 'small' | 'medium' | 'large' - Size of breadcrumb text
|
|
14
|
+
- \`style\`: StyleProp<ViewStyle> - Custom container style
|
|
15
|
+
- \`itemStyle\`: StyleProp<ViewStyle> - Custom item style
|
|
16
|
+
- \`separatorStyle\`: StyleProp<TextStyle> - Custom separator style
|
|
17
|
+
- \`testID\`: string - Test identifier
|
|
18
|
+
`,
|
|
19
|
+
features: [
|
|
20
|
+
"Icon support with string names or custom components",
|
|
21
|
+
"Custom separators",
|
|
22
|
+
"Truncation with maxItems",
|
|
23
|
+
"Two intent colors",
|
|
24
|
+
"Three sizes",
|
|
25
|
+
"Disabled items",
|
|
26
|
+
"Click handlers for navigation",
|
|
27
|
+
],
|
|
28
|
+
bestPractices: [
|
|
29
|
+
"Keep breadcrumb labels short and clear",
|
|
30
|
+
"Last item should represent current page (typically not clickable)",
|
|
31
|
+
"Use icons sparingly for visual clarity",
|
|
32
|
+
"Set maxItems for deep hierarchies to avoid overflow",
|
|
33
|
+
"Use 'neutral' intent for subtle breadcrumbs",
|
|
34
|
+
],
|
|
35
|
+
usage: `
|
|
36
|
+
import { Breadcrumb } from '@idealyst/components';
|
|
37
|
+
|
|
38
|
+
const items = [
|
|
39
|
+
{ label: 'Home', icon: 'home', onPress: () => navigate('/') },
|
|
40
|
+
{ label: 'Products', onPress: () => navigate('/products') },
|
|
41
|
+
{ label: 'Electronics', onPress: () => navigate('/products/electronics') },
|
|
42
|
+
{ label: 'Laptop' }, // Current page, no onPress
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
<Breadcrumb items={items} intent="primary" />
|
|
46
|
+
`,
|
|
47
|
+
examples: {
|
|
48
|
+
basic: `import { Breadcrumb } from '@idealyst/components';
|
|
49
|
+
|
|
50
|
+
const items = [
|
|
51
|
+
{ label: 'Home', onPress: () => console.log('Home') },
|
|
52
|
+
{ label: 'Products', onPress: () => console.log('Products') },
|
|
53
|
+
{ label: 'Item' },
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
<Breadcrumb items={items} />`,
|
|
57
|
+
variants: `import { Breadcrumb, View } from '@idealyst/components';
|
|
58
|
+
|
|
59
|
+
const items = [
|
|
60
|
+
{ label: 'Home', onPress: () => {} },
|
|
61
|
+
{ label: 'Category', onPress: () => {} },
|
|
62
|
+
{ label: 'Item' },
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
<View spacing="md">
|
|
66
|
+
<Breadcrumb items={items} size="small" />
|
|
67
|
+
<Breadcrumb items={items} size="medium" />
|
|
68
|
+
<Breadcrumb items={items} size="large" />
|
|
69
|
+
</View>`,
|
|
70
|
+
"with-icons": `import { Breadcrumb } from '@idealyst/components';
|
|
71
|
+
|
|
72
|
+
const items = [
|
|
73
|
+
{ label: 'Home', icon: 'home', onPress: () => navigate('/') },
|
|
74
|
+
{ label: 'Settings', icon: 'cog', onPress: () => navigate('/settings') },
|
|
75
|
+
{ label: 'Profile', icon: 'account' },
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
<Breadcrumb items={items} intent="primary" />`,
|
|
79
|
+
interactive: `import { Breadcrumb } from '@idealyst/components';
|
|
80
|
+
import { useState } from 'react';
|
|
81
|
+
|
|
82
|
+
function Example() {
|
|
83
|
+
const [path, setPath] = useState(['Home', 'Products', 'Electronics']);
|
|
84
|
+
|
|
85
|
+
const items = path.map((label, index) => ({
|
|
86
|
+
label,
|
|
87
|
+
onPress: index < path.length - 1
|
|
88
|
+
? () => setPath(path.slice(0, index + 1))
|
|
89
|
+
: undefined,
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
return <Breadcrumb items={items} maxItems={4} />;
|
|
93
|
+
}`,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../../src/data/components/Breadcrumb.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,gEAAgE;IAC7E,KAAK,EAAE;;;;;;;;;;;;;;CAcR;IACC,QAAQ,EAAE;QACR,qDAAqD;QACrD,mBAAmB;QACnB,0BAA0B;QAC1B,mBAAmB;QACnB,aAAa;QACb,gBAAgB;QAChB,+BAA+B;KAChC;IACD,aAAa,EAAE;QACb,wCAAwC;QACxC,mEAAmE;QACnE,wCAAwC;QACxC,qDAAqD;QACrD,6CAA6C;KAC9C;IACD,KAAK,EAAE;;;;;;;;;;;CAWR;IACC,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;;;;6BAQkB;QAEzB,QAAQ,EAAE;;;;;;;;;;;;QAYN;QAEJ,YAAY,EAAE;;;;;;;;8CAQ4B;QAE1C,WAAW,EAAE;;;;;;;;;;;;;;EAcf;KACC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Button: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAqFlB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const Button = {
|
|
2
|
+
category: "form",
|
|
3
|
+
description: "Interactive button component with multiple variants, sizes, and icon support",
|
|
4
|
+
props: `
|
|
5
|
+
- \`variant\`: 'contained' | 'outlined' | 'text' - Visual style variant
|
|
6
|
+
- \`intent\`: 'primary' | 'neutral' | 'success' | 'error' | 'warning' - Color scheme
|
|
7
|
+
- \`size\`: 'small' | 'medium' | 'large' - Button size
|
|
8
|
+
- \`icon\`: string | ReactNode - Icon name (MDI) or custom React element
|
|
9
|
+
- \`iconPosition\`: 'left' | 'right' - Position of icon relative to label
|
|
10
|
+
- \`disabled\`: boolean - Disable button interaction
|
|
11
|
+
- \`loading\`: boolean - Show loading state
|
|
12
|
+
- \`fullWidth\`: boolean - Expand button to full container width
|
|
13
|
+
- \`onPress\`: () => void - Press handler
|
|
14
|
+
`,
|
|
15
|
+
features: [
|
|
16
|
+
"Three variants: contained, outlined, text",
|
|
17
|
+
"Five intent colors for semantic meaning",
|
|
18
|
+
"Three sizes: small, medium, large",
|
|
19
|
+
"Icon support with string names or custom React elements",
|
|
20
|
+
"Loading and disabled states",
|
|
21
|
+
"Full width option",
|
|
22
|
+
"Cross-platform (React & React Native)",
|
|
23
|
+
],
|
|
24
|
+
bestPractices: [
|
|
25
|
+
"Use 'primary' intent for main actions",
|
|
26
|
+
"Use 'contained' variant for prominent actions",
|
|
27
|
+
"Use icon names (strings) for consistency with design system",
|
|
28
|
+
"Keep button labels concise and action-oriented",
|
|
29
|
+
],
|
|
30
|
+
usage: `
|
|
31
|
+
import { Button } from '@idealyst/components';
|
|
32
|
+
|
|
33
|
+
<Button
|
|
34
|
+
variant="contained"
|
|
35
|
+
intent="primary"
|
|
36
|
+
icon="check"
|
|
37
|
+
onPress={() => console.log('Pressed')}
|
|
38
|
+
>
|
|
39
|
+
Save Changes
|
|
40
|
+
</Button>
|
|
41
|
+
`,
|
|
42
|
+
examples: {
|
|
43
|
+
basic: `import { Button } from '@idealyst/components';
|
|
44
|
+
|
|
45
|
+
// Basic button
|
|
46
|
+
<Button onPress={() => console.log('Clicked')}>
|
|
47
|
+
Click Me
|
|
48
|
+
</Button>`,
|
|
49
|
+
variants: `import { Button } from '@idealyst/components';
|
|
50
|
+
|
|
51
|
+
// Different variants
|
|
52
|
+
<Button variant="contained" intent="primary">Contained</Button>
|
|
53
|
+
<Button variant="outlined" intent="primary">Outlined</Button>
|
|
54
|
+
<Button variant="text" intent="primary">Text</Button>`,
|
|
55
|
+
"with-icons": `import { Button } from '@idealyst/components';
|
|
56
|
+
|
|
57
|
+
// Button with icon
|
|
58
|
+
<Button icon="check" iconPosition="left">
|
|
59
|
+
Confirm
|
|
60
|
+
</Button>
|
|
61
|
+
|
|
62
|
+
// Icon-only button
|
|
63
|
+
<Button icon="close" />`,
|
|
64
|
+
interactive: `import { Button } from '@idealyst/components';
|
|
65
|
+
import { useState } from 'react';
|
|
66
|
+
|
|
67
|
+
function Example() {
|
|
68
|
+
const [loading, setLoading] = useState(false);
|
|
69
|
+
|
|
70
|
+
const handlePress = async () => {
|
|
71
|
+
setLoading(true);
|
|
72
|
+
await someAsyncOperation();
|
|
73
|
+
setLoading(false);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<Button
|
|
78
|
+
loading={loading}
|
|
79
|
+
onPress={handlePress}
|
|
80
|
+
>
|
|
81
|
+
Save
|
|
82
|
+
</Button>
|
|
83
|
+
);
|
|
84
|
+
}`,
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACtB,QAAQ,EAAE,MAAM;IACZ,WAAW,EAAE,8EAA8E;IAC3F,KAAK,EAAE;;;;;;;;;;CAUV;IACG,QAAQ,EAAE;QACR,2CAA2C;QAC3C,yCAAyC;QACzC,mCAAmC;QACnC,yDAAyD;QACzD,6BAA6B;QAC7B,mBAAmB;QACnB,uCAAuC;KACxC;IACD,aAAa,EAAE;QACb,uCAAuC;QACvC,+CAA+C;QAC/C,6DAA6D;QAC7D,gDAAgD;KACjD;IACD,KAAK,EAAE;;;;;;;;;;;CAWV;IACG,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;UAKH;QACJ,QAAQ,EAAE;;;;;sDAKsC;QAChD,YAAY,EAAE;;;;;;;;wBAQI;QAClB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;EAoBjB;KACG;CACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Card: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/data/components/Card.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAiEhB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const Card = {
|
|
2
|
+
category: "display",
|
|
3
|
+
description: "Container component for grouping related content with various visual styles",
|
|
4
|
+
props: `
|
|
5
|
+
- \`variant\`: 'default' | 'outlined' | 'elevated' | 'filled' - Visual style
|
|
6
|
+
- \`intent\`: 'primary' | 'neutral' | 'success' | 'error' | 'warning' - Color scheme
|
|
7
|
+
- \`padding\`: 'none' | 'small' | 'medium' | 'large' - Internal padding
|
|
8
|
+
- \`radius\`: 'none' | 'small' | 'medium' | 'large' - Border radius
|
|
9
|
+
- \`clickable\`: boolean - Make card interactive
|
|
10
|
+
- \`onPress\`: () => void - Press handler (when clickable)
|
|
11
|
+
- \`children\`: ReactNode - Card content
|
|
12
|
+
`,
|
|
13
|
+
features: [
|
|
14
|
+
"Four visual variants",
|
|
15
|
+
"Intent-based color schemes",
|
|
16
|
+
"Configurable padding and border radius",
|
|
17
|
+
"Clickable with press handler",
|
|
18
|
+
"Flexible content container",
|
|
19
|
+
],
|
|
20
|
+
bestPractices: [
|
|
21
|
+
"Use 'elevated' variant for prominent content",
|
|
22
|
+
"Group related content within cards",
|
|
23
|
+
"Use appropriate padding for content density",
|
|
24
|
+
"Make cards clickable only when they represent an action",
|
|
25
|
+
],
|
|
26
|
+
usage: `
|
|
27
|
+
import { Card, Text, View } from '@idealyst/components';
|
|
28
|
+
|
|
29
|
+
<Card variant="elevated" padding="medium">
|
|
30
|
+
<View spacing="sm">
|
|
31
|
+
<Text weight="bold">Card Title</Text>
|
|
32
|
+
<Text size="small">Card content goes here</Text>
|
|
33
|
+
</View>
|
|
34
|
+
</Card>
|
|
35
|
+
`,
|
|
36
|
+
examples: {
|
|
37
|
+
basic: `import { Card, Text } from '@idealyst/components';
|
|
38
|
+
|
|
39
|
+
<Card>
|
|
40
|
+
<Text>Simple card content</Text>
|
|
41
|
+
</Card>`,
|
|
42
|
+
variants: `import { Card, Text } from '@idealyst/components';
|
|
43
|
+
|
|
44
|
+
<Card variant="default"><Text>Default</Text></Card>
|
|
45
|
+
<Card variant="outlined"><Text>Outlined</Text></Card>
|
|
46
|
+
<Card variant="elevated"><Text>Elevated</Text></Card>
|
|
47
|
+
<Card variant="filled"><Text>Filled</Text></Card>`,
|
|
48
|
+
"with-icons": `import { Card, View, Text, Icon } from '@idealyst/components';
|
|
49
|
+
|
|
50
|
+
<Card variant="outlined">
|
|
51
|
+
<View spacing="sm">
|
|
52
|
+
<Icon name="information" size="lg" />
|
|
53
|
+
<Text>Card with icon header</Text>
|
|
54
|
+
</View>
|
|
55
|
+
</Card>`,
|
|
56
|
+
interactive: `import { Card, Text } from '@idealyst/components';
|
|
57
|
+
|
|
58
|
+
<Card
|
|
59
|
+
clickable
|
|
60
|
+
onPress={() => console.log('Card clicked')}
|
|
61
|
+
variant="outlined"
|
|
62
|
+
>
|
|
63
|
+
<Text>Click this card</Text>
|
|
64
|
+
</Card>`,
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/data/components/Card.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;IACpB,QAAQ,EAAE,SAAS;IACf,WAAW,EAAE,6EAA6E;IAC1F,KAAK,EAAE;;;;;;;;CAQV;IACG,QAAQ,EAAE;QACR,sBAAsB;QACtB,4BAA4B;QAC5B,wCAAwC;QACxC,8BAA8B;QAC9B,4BAA4B;KAC7B;IACD,aAAa,EAAE;QACb,8CAA8C;QAC9C,oCAAoC;QACpC,6CAA6C;QAC7C,yDAAyD;KAC1D;IACD,KAAK,EAAE;;;;;;;;;CASV;IACG,QAAQ,EAAE;QACR,KAAK,EAAE;;;;QAIL;QACF,QAAQ,EAAE;;;;;kDAKkC;QAC5C,YAAY,EAAE;;;;;;;QAOZ;QACF,WAAW,EAAE;;;;;;;;QAQX;KACH;CACJ,CAAC"}
|