@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.
Files changed (211) hide show
  1. package/README.md +202 -0
  2. package/dist/data/cli-commands.d.ts +2 -0
  3. package/dist/data/cli-commands.d.ts.map +1 -0
  4. package/dist/data/cli-commands.js +100 -0
  5. package/dist/data/cli-commands.js.map +1 -0
  6. package/dist/data/components/Accordion.d.ts +15 -0
  7. package/dist/data/components/Accordion.d.ts.map +1 -0
  8. package/dist/data/components/Accordion.js +112 -0
  9. package/dist/data/components/Accordion.js.map +1 -0
  10. package/dist/data/components/ActivityIndicator.d.ts +15 -0
  11. package/dist/data/components/ActivityIndicator.d.ts.map +1 -0
  12. package/dist/data/components/ActivityIndicator.js +82 -0
  13. package/dist/data/components/ActivityIndicator.js.map +1 -0
  14. package/dist/data/components/Alert.d.ts +15 -0
  15. package/dist/data/components/Alert.d.ts.map +1 -0
  16. package/dist/data/components/Alert.js +132 -0
  17. package/dist/data/components/Alert.js.map +1 -0
  18. package/dist/data/components/Avatar.d.ts +15 -0
  19. package/dist/data/components/Avatar.d.ts.map +1 -0
  20. package/dist/data/components/Avatar.js +93 -0
  21. package/dist/data/components/Avatar.js.map +1 -0
  22. package/dist/data/components/Badge.d.ts +15 -0
  23. package/dist/data/components/Badge.d.ts.map +1 -0
  24. package/dist/data/components/Badge.js +64 -0
  25. package/dist/data/components/Badge.js.map +1 -0
  26. package/dist/data/components/Breadcrumb.d.ts +15 -0
  27. package/dist/data/components/Breadcrumb.d.ts.map +1 -0
  28. package/dist/data/components/Breadcrumb.js +96 -0
  29. package/dist/data/components/Breadcrumb.js.map +1 -0
  30. package/dist/data/components/Button.d.ts +15 -0
  31. package/dist/data/components/Button.d.ts.map +1 -0
  32. package/dist/data/components/Button.js +87 -0
  33. package/dist/data/components/Button.js.map +1 -0
  34. package/dist/data/components/Card.d.ts +15 -0
  35. package/dist/data/components/Card.d.ts.map +1 -0
  36. package/dist/data/components/Card.js +67 -0
  37. package/dist/data/components/Card.js.map +1 -0
  38. package/dist/data/components/Checkbox.d.ts +15 -0
  39. package/dist/data/components/Checkbox.d.ts.map +1 -0
  40. package/dist/data/components/Checkbox.js +118 -0
  41. package/dist/data/components/Checkbox.js.map +1 -0
  42. package/dist/data/components/Chip.d.ts +15 -0
  43. package/dist/data/components/Chip.d.ts.map +1 -0
  44. package/dist/data/components/Chip.js +76 -0
  45. package/dist/data/components/Chip.js.map +1 -0
  46. package/dist/data/components/Dialog.d.ts +15 -0
  47. package/dist/data/components/Dialog.d.ts.map +1 -0
  48. package/dist/data/components/Dialog.js +137 -0
  49. package/dist/data/components/Dialog.js.map +1 -0
  50. package/dist/data/components/Divider.d.ts +15 -0
  51. package/dist/data/components/Divider.d.ts.map +1 -0
  52. package/dist/data/components/Divider.js +71 -0
  53. package/dist/data/components/Divider.js.map +1 -0
  54. package/dist/data/components/Icon.d.ts +15 -0
  55. package/dist/data/components/Icon.d.ts.map +1 -0
  56. package/dist/data/components/Icon.js +70 -0
  57. package/dist/data/components/Icon.js.map +1 -0
  58. package/dist/data/components/Image.d.ts +15 -0
  59. package/dist/data/components/Image.d.ts.map +1 -0
  60. package/dist/data/components/Image.js +122 -0
  61. package/dist/data/components/Image.js.map +1 -0
  62. package/dist/data/components/Input.d.ts +15 -0
  63. package/dist/data/components/Input.d.ts.map +1 -0
  64. package/dist/data/components/Input.js +109 -0
  65. package/dist/data/components/Input.js.map +1 -0
  66. package/dist/data/components/List.d.ts +15 -0
  67. package/dist/data/components/List.d.ts.map +1 -0
  68. package/dist/data/components/List.js +113 -0
  69. package/dist/data/components/List.js.map +1 -0
  70. package/dist/data/components/Menu.d.ts +15 -0
  71. package/dist/data/components/Menu.d.ts.map +1 -0
  72. package/dist/data/components/Menu.js +132 -0
  73. package/dist/data/components/Menu.js.map +1 -0
  74. package/dist/data/components/Popover.d.ts +15 -0
  75. package/dist/data/components/Popover.d.ts.map +1 -0
  76. package/dist/data/components/Popover.js +159 -0
  77. package/dist/data/components/Popover.js.map +1 -0
  78. package/dist/data/components/Pressable.d.ts +15 -0
  79. package/dist/data/components/Pressable.d.ts.map +1 -0
  80. package/dist/data/components/Pressable.js +125 -0
  81. package/dist/data/components/Pressable.js.map +1 -0
  82. package/dist/data/components/Progress.d.ts +15 -0
  83. package/dist/data/components/Progress.d.ts.map +1 -0
  84. package/dist/data/components/Progress.js +95 -0
  85. package/dist/data/components/Progress.js.map +1 -0
  86. package/dist/data/components/RadioButton.d.ts +15 -0
  87. package/dist/data/components/RadioButton.d.ts.map +1 -0
  88. package/dist/data/components/RadioButton.js +140 -0
  89. package/dist/data/components/RadioButton.js.map +1 -0
  90. package/dist/data/components/SVGImage.d.ts +15 -0
  91. package/dist/data/components/SVGImage.d.ts.map +1 -0
  92. package/dist/data/components/SVGImage.js +112 -0
  93. package/dist/data/components/SVGImage.js.map +1 -0
  94. package/dist/data/components/Screen.d.ts +15 -0
  95. package/dist/data/components/Screen.d.ts.map +1 -0
  96. package/dist/data/components/Screen.js +99 -0
  97. package/dist/data/components/Screen.js.map +1 -0
  98. package/dist/data/components/Select.d.ts +15 -0
  99. package/dist/data/components/Select.d.ts.map +1 -0
  100. package/dist/data/components/Select.js +146 -0
  101. package/dist/data/components/Select.js.map +1 -0
  102. package/dist/data/components/Skeleton.d.ts +15 -0
  103. package/dist/data/components/Skeleton.d.ts.map +1 -0
  104. package/dist/data/components/Skeleton.js +110 -0
  105. package/dist/data/components/Skeleton.js.map +1 -0
  106. package/dist/data/components/Slider.d.ts +15 -0
  107. package/dist/data/components/Slider.d.ts.map +1 -0
  108. package/dist/data/components/Slider.js +129 -0
  109. package/dist/data/components/Slider.js.map +1 -0
  110. package/dist/data/components/Switch.d.ts +15 -0
  111. package/dist/data/components/Switch.d.ts.map +1 -0
  112. package/dist/data/components/Switch.js +127 -0
  113. package/dist/data/components/Switch.js.map +1 -0
  114. package/dist/data/components/TabBar.d.ts +15 -0
  115. package/dist/data/components/TabBar.d.ts.map +1 -0
  116. package/dist/data/components/TabBar.js +145 -0
  117. package/dist/data/components/TabBar.js.map +1 -0
  118. package/dist/data/components/Table.d.ts +15 -0
  119. package/dist/data/components/Table.d.ts.map +1 -0
  120. package/dist/data/components/Table.js +151 -0
  121. package/dist/data/components/Table.js.map +1 -0
  122. package/dist/data/components/Tabs.d.ts +15 -0
  123. package/dist/data/components/Tabs.d.ts.map +1 -0
  124. package/dist/data/components/Tabs.js +150 -0
  125. package/dist/data/components/Tabs.js.map +1 -0
  126. package/dist/data/components/Text.d.ts +15 -0
  127. package/dist/data/components/Text.d.ts.map +1 -0
  128. package/dist/data/components/Text.js +85 -0
  129. package/dist/data/components/Text.js.map +1 -0
  130. package/dist/data/components/TextArea.d.ts +15 -0
  131. package/dist/data/components/TextArea.d.ts.map +1 -0
  132. package/dist/data/components/TextArea.js +155 -0
  133. package/dist/data/components/TextArea.js.map +1 -0
  134. package/dist/data/components/Tooltip.d.ts +15 -0
  135. package/dist/data/components/Tooltip.d.ts.map +1 -0
  136. package/dist/data/components/Tooltip.js +105 -0
  137. package/dist/data/components/Tooltip.js.map +1 -0
  138. package/dist/data/components/Video.d.ts +15 -0
  139. package/dist/data/components/Video.d.ts.map +1 -0
  140. package/dist/data/components/Video.js +168 -0
  141. package/dist/data/components/Video.js.map +1 -0
  142. package/dist/data/components/View.d.ts +15 -0
  143. package/dist/data/components/View.d.ts.map +1 -0
  144. package/dist/data/components/View.js +126 -0
  145. package/dist/data/components/View.js.map +1 -0
  146. package/dist/data/components/index.d.ts +37 -0
  147. package/dist/data/components/index.d.ts.map +1 -0
  148. package/dist/data/components/index.js +110 -0
  149. package/dist/data/components/index.js.map +1 -0
  150. package/dist/data/framework-guides.d.ts +2 -0
  151. package/dist/data/framework-guides.d.ts.map +1 -0
  152. package/dist/data/framework-guides.js +589 -0
  153. package/dist/data/framework-guides.js.map +1 -0
  154. package/dist/data/icon-guide.d.ts +2 -0
  155. package/dist/data/icon-guide.d.ts.map +1 -0
  156. package/dist/data/icon-guide.js +285 -0
  157. package/dist/data/icon-guide.js.map +1 -0
  158. package/dist/data/icons.json +7452 -0
  159. package/dist/data/navigation-guides.d.ts +2 -0
  160. package/dist/data/navigation-guides.d.ts.map +1 -0
  161. package/dist/data/navigation-guides.js +1196 -0
  162. package/dist/data/navigation-guides.js.map +1 -0
  163. package/dist/index.d.ts +3 -0
  164. package/dist/index.d.ts.map +1 -0
  165. package/dist/index.js +422 -0
  166. package/dist/index.js.map +1 -0
  167. package/package.json +34 -0
  168. package/src/data/cli-commands.ts +103 -0
  169. package/src/data/components/Accordion.ts +106 -0
  170. package/src/data/components/ActivityIndicator.ts +82 -0
  171. package/src/data/components/Alert.ts +132 -0
  172. package/src/data/components/Avatar.ts +93 -0
  173. package/src/data/components/Badge.ts +63 -0
  174. package/src/data/components/Breadcrumb.ts +94 -0
  175. package/src/data/components/Button.ts +86 -0
  176. package/src/data/components/Card.ts +67 -0
  177. package/src/data/components/Checkbox.ts +117 -0
  178. package/src/data/components/Chip.ts +93 -0
  179. package/src/data/components/Dialog.ts +136 -0
  180. package/src/data/components/Divider.ts +70 -0
  181. package/src/data/components/Icon.ts +70 -0
  182. package/src/data/components/Image.ts +121 -0
  183. package/src/data/components/Input.ts +150 -0
  184. package/src/data/components/List.ts +103 -0
  185. package/src/data/components/Menu.ts +125 -0
  186. package/src/data/components/Popover.ts +159 -0
  187. package/src/data/components/Pressable.ts +123 -0
  188. package/src/data/components/Progress.ts +95 -0
  189. package/src/data/components/RadioButton.ts +130 -0
  190. package/src/data/components/SVGImage.ts +114 -0
  191. package/src/data/components/Screen.ts +103 -0
  192. package/src/data/components/Select.ts +140 -0
  193. package/src/data/components/Skeleton.ts +102 -0
  194. package/src/data/components/Slider.ts +150 -0
  195. package/src/data/components/Switch.ts +127 -0
  196. package/src/data/components/TabBar.ts +142 -0
  197. package/src/data/components/Table.ts +153 -0
  198. package/src/data/components/Tabs.ts +152 -0
  199. package/src/data/components/Text.ts +85 -0
  200. package/src/data/components/TextArea.ts +155 -0
  201. package/src/data/components/Tooltip.ts +105 -0
  202. package/src/data/components/Video.ts +168 -0
  203. package/src/data/components/View.ts +126 -0
  204. package/src/data/components/index.ts +109 -0
  205. package/src/data/framework-guides.ts +593 -0
  206. package/src/data/icon-guide.ts +284 -0
  207. package/src/data/icons.json +7452 -0
  208. package/src/data/navigation-guides.ts +1199 -0
  209. package/src/index.ts +473 -0
  210. package/test-client.js +86 -0
  211. package/tsconfig.json +20 -0
@@ -0,0 +1,95 @@
1
+ export const Progress = {
2
+ category: "feedback",
3
+ description: "Progress indicator showing completion status of tasks or operations",
4
+ props: `
5
+ - \`value\`: number - The current progress value (0 to max)
6
+ - \`max\`: number - The maximum value representing 100% completion
7
+ - \`variant\`: ProgressVariant - The visual variant (linear or circular)
8
+ - \`intent\`: ProgressIntentVariant - The intent/color scheme of the progress bar
9
+ - \`size\`: ProgressSizeVariant - The size variant of the progress indicator
10
+ - \`indeterminate\`: boolean - Whether to show indeterminate/loading animation
11
+ - \`showLabel\`: boolean - Whether to display the percentage label
12
+ - \`label\`: string - Custom label text (overrides percentage)
13
+ - \`rounded\`: boolean - Whether to use rounded ends for linear progress
14
+ `,
15
+ features: [
16
+ "Linear and circular variants",
17
+ "Determinate and indeterminate modes",
18
+ "Five intent colors",
19
+ "Three sizes",
20
+ "Percentage label support",
21
+ "Custom label text",
22
+ "Rounded ends option",
23
+ ],
24
+ bestPractices: [
25
+ "Use determinate progress when percentage is known",
26
+ "Use indeterminate progress for unknown duration",
27
+ "Show label for user feedback",
28
+ "Use circular variant for compact spaces",
29
+ "Match intent to operation context",
30
+ ],
31
+ usage: `
32
+ import { Progress } from '@idealyst/components';
33
+
34
+ <Progress
35
+ value={65}
36
+ type="linear"
37
+ intent="primary"
38
+ showLabel
39
+ />
40
+ `,
41
+ examples: {
42
+ basic: `import { Progress } from '@idealyst/components';
43
+
44
+ <Progress value={50} />`,
45
+
46
+ variants: `import { Progress, View } from '@idealyst/components';
47
+
48
+ <View spacing="md">
49
+ <Progress value={30} type="linear" intent="primary" />
50
+ <Progress value={60} type="linear" intent="success" />
51
+ <Progress value={value} type="circular" size="lg" showLabel />
52
+ </View>`,
53
+
54
+ "with-icons": `import { Progress, View, Text } from '@idealyst/components';
55
+
56
+ <View spacing="sm">
57
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
58
+ <Text>Uploading...</Text>
59
+ <Text>{progress}%</Text>
60
+ </View>
61
+ <Progress value={progress} intent="primary" />
62
+ </View>`,
63
+
64
+ interactive: `import { Progress, Button, View, Text } from '@idealyst/components';
65
+ import { useState, useEffect } from 'react';
66
+
67
+ function Example() {
68
+ const [progress, setProgress] = useState(0);
69
+ const [running, setRunning] = useState(false);
70
+
71
+ useEffect(() => {
72
+ if (running && progress < 100) {
73
+ const timer = setTimeout(() => setProgress(progress + 10), 500);
74
+ return () => clearTimeout(timer);
75
+ } else if (progress >= 100) {
76
+ setRunning(false);
77
+ }
78
+ }, [progress, running]);
79
+
80
+ const handleStart = () => {
81
+ setProgress(0);
82
+ setRunning(true);
83
+ };
84
+
85
+ return (
86
+ <View spacing="md">
87
+ <Progress value={progress} intent="success" showLabel />
88
+ <Button onPress={handleStart} disabled={running}>
89
+ Start
90
+ </Button>
91
+ </View>
92
+ );
93
+ }`,
94
+ },
95
+ };
@@ -0,0 +1,130 @@
1
+ export const RadioButton = {
2
+ category: "form",
3
+ description: "Radio button for single-choice selection within a group",
4
+ props: `
5
+ - \`value\`: string - The value of this radio button option
6
+ - \`checked\`: boolean - Whether this radio button is selected
7
+ - \`onPress\`: function - Called when the radio button is pressed
8
+ - \`disabled\`: boolean - Whether the radio button is disabled
9
+ - \`label\`: string - Label text to display next to the radio button
10
+ - \`size\`: RadioButtonSizeVariant - The size variant of the radio button
11
+ - \`intent\`: RadioButtonIntentVariant - The intent/color scheme of the radio button
12
+ `,
13
+ features: [
14
+ "Single selection within group",
15
+ "Horizontal and vertical layouts",
16
+ "Label support",
17
+ "Three sizes",
18
+ "Five intent colors",
19
+ "Disabled state (individual or group)",
20
+ "Controlled component",
21
+ ],
22
+ bestPractices: [
23
+ "Use RadioGroup to manage selection state",
24
+ "Always provide labels for accessibility",
25
+ "Use for mutually exclusive options (3-5 choices)",
26
+ "For 2 options, consider Switch or Checkbox",
27
+ "For many options (>5), consider Select",
28
+ "Group related options visually",
29
+ ],
30
+ usage: `
31
+ import { RadioGroup, RadioButton } from '@idealyst/components';
32
+ import { useState } from 'react';
33
+
34
+ function Example() {
35
+ const [value, setValue] = useState('option1');
36
+
37
+ return (
38
+ <RadioGroup value={value} onValueChange={setValue}>
39
+ <RadioButton value="option1" label="Option 1" />
40
+ <RadioButton value="option2" label="Option 2" />
41
+ <RadioButton value="option3" label="Option 3" />
42
+ </RadioGroup>
43
+ );
44
+ }
45
+ `,
46
+ examples: {
47
+ basic: `import { RadioGroup, RadioButton } from '@idealyst/components';
48
+
49
+ <RadioGroup value={selected} onValueChange={setSelected}>
50
+ <RadioButton value="a" label="Choice A" />
51
+ <RadioButton value="b" label="Choice B" />
52
+ </RadioGroup>`,
53
+
54
+ variants: `import { RadioGroup, RadioButton, View } from '@idealyst/components';
55
+
56
+ <View spacing="md">
57
+ {/* Vertical (default) */}
58
+ <RadioGroup value={value} onValueChange={setValue}>
59
+ <RadioButton value="1" label="Option 1" />
60
+ <RadioButton value="2" label="Option 2" />
61
+ </RadioGroup>
62
+
63
+ {/* Horizontal */}
64
+ <RadioGroup value={value} onValueChange={setValue} orientation="horizontal">
65
+ <RadioButton value="1" label="Small" size="sm" />
66
+ <RadioButton value="2" label="Medium" size="md" />
67
+ <RadioButton value="3" label="Large" size="lg" />
68
+ </RadioGroup>
69
+ </View>`,
70
+
71
+ "with-icons": `import { RadioGroup, RadioButton } from '@idealyst/components';
72
+
73
+ <RadioGroup value={plan} onValueChange={setPlan}>
74
+ <RadioButton
75
+ value="free"
76
+ label="Free Plan"
77
+ intent="neutral"
78
+ />
79
+ <RadioButton
80
+ value="pro"
81
+ label="Pro Plan"
82
+ intent="primary"
83
+ />
84
+ <RadioButton
85
+ value="enterprise"
86
+ label="Enterprise Plan"
87
+ intent="success"
88
+ />
89
+ </RadioGroup>`,
90
+
91
+ interactive: `import { RadioGroup, RadioButton, View, Text, Card } from '@idealyst/components';
92
+ import { useState } from 'react';
93
+
94
+ function Example() {
95
+ const [shipping, setShipping] = useState('standard');
96
+
97
+ const options = [
98
+ { value: 'standard', label: 'Standard (5-7 days)', price: 'Free' },
99
+ { value: 'express', label: 'Express (2-3 days)', price: '$10' },
100
+ { value: 'overnight', label: 'Overnight', price: '$25' },
101
+ ];
102
+
103
+ return (
104
+ <View spacing="md">
105
+ <Text weight="bold">Select Shipping Method</Text>
106
+ <RadioGroup value={shipping} onValueChange={setShipping}>
107
+ {options.map((option) => (
108
+ <Card
109
+ key={option.value}
110
+ variant={shipping === option.value ? 'outlined' : 'default'}
111
+ padding="sm"
112
+ clickable
113
+ onPress={() => setShipping(option.value)}
114
+ >
115
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
116
+ <RadioButton
117
+ value={option.value}
118
+ label={option.label}
119
+ checked={shipping === option.value}
120
+ />
121
+ <Text weight="bold">{option.price}</Text>
122
+ </View>
123
+ </Card>
124
+ ))}
125
+ </RadioGroup>
126
+ </View>
127
+ );
128
+ }`,
129
+ },
130
+ };
@@ -0,0 +1,114 @@
1
+ export const SVGImage = {
2
+ category: "media",
3
+ description: "SVG image component with color, size, and intent support",
4
+ props: `
5
+ - \`source\`: string | { uri: string } | React.FC<SvgProps> - SVG source (local file, URL, or component)
6
+ - \`width\`: number | string - Image width
7
+ - \`height\`: number | string - Image height
8
+ - \`size\`: number | string - Sets both width and height
9
+ - \`color\`: string - Custom color override
10
+ - \`intent\`: IntentNames - Theme intent color
11
+ - \`resizeMode\`: 'contain' | 'cover' | 'stretch' - How SVG fits container
12
+ - \`style\`: ViewProps - Additional styles
13
+ `,
14
+ features: [
15
+ "Multiple source types (file, URL, component)",
16
+ "Size and dimension control",
17
+ "Color customization",
18
+ "Theme intent colors",
19
+ "Resize modes",
20
+ "Cross-platform support",
21
+ ],
22
+ bestPractices: [
23
+ "Use local SVG files for icons and logos",
24
+ "Use remote URLs for dynamic SVGs",
25
+ "Set explicit size for consistent rendering",
26
+ "Use intent colors for theme consistency",
27
+ "Prefer 'contain' resizeMode to preserve aspect ratio",
28
+ "Optimize SVG files for web performance",
29
+ ],
30
+ usage: `
31
+ import { SVGImage } from '@idealyst/components';
32
+ import LogoIcon from './assets/logo.svg';
33
+
34
+ // Local SVG file
35
+ <SVGImage source={LogoIcon} size={48} intent="primary" />
36
+
37
+ // Remote SVG
38
+ <SVGImage
39
+ source={{ uri: 'https://cdn.example.com/icon.svg' }}
40
+ width={32}
41
+ height={32}
42
+ color="#FF0000"
43
+ />
44
+ `,
45
+ examples: {
46
+ basic: `import { SVGImage } from '@idealyst/components';
47
+ import Icon from './icon.svg';
48
+
49
+ <SVGImage source={Icon} size={24} />`,
50
+
51
+ variants: `import { SVGImage, View } from '@idealyst/components';
52
+ import Logo from './logo.svg';
53
+
54
+ <View style={{ flexDirection: 'row', gap: 16, alignItems: 'center' }}>
55
+ <SVGImage source={Logo} size={24} />
56
+ <SVGImage source={Logo} size={32} />
57
+ <SVGImage source={Logo} size={48} />
58
+ <SVGImage source={Logo} size={64} />
59
+ </View>`,
60
+
61
+ "with-icons": `import { SVGImage, View, Text } from '@idealyst/components';
62
+ import ReactLogo from './react-logo.svg';
63
+
64
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>
65
+ <SVGImage source={ReactLogo} size={32} color="#61dafb" />
66
+ <View spacing="xs">
67
+ <Text weight="bold">React Application</Text>
68
+ <Text size="sm">Built with React & React Native</Text>
69
+ </View>
70
+ </View>`,
71
+
72
+ interactive: `import { SVGImage, View, Button, Text } from '@idealyst/components';
73
+ import { useState } from 'react';
74
+ import AppIcon from './app-icon.svg';
75
+
76
+ function Example() {
77
+ const [size, setSize] = useState(48);
78
+ const [intent, setIntent] = useState('primary');
79
+
80
+ const intents = ['primary', 'neutral', 'success', 'error', 'warning'];
81
+
82
+ return (
83
+ <View spacing="md" style={{ alignItems: 'center' }}>
84
+ <SVGImage source={AppIcon} size={size} intent={intent} />
85
+
86
+ <View style={{ flexDirection: 'row', gap: 8 }}>
87
+ <Button size="sm" onPress={() => setSize(Math.max(24, size - 12))}>
88
+ Smaller
89
+ </Button>
90
+ <Button size="sm" onPress={() => setSize(Math.min(96, size + 12))}>
91
+ Larger
92
+ </Button>
93
+ </View>
94
+
95
+ <View spacing="xs">
96
+ <Text size="sm">Intent:</Text>
97
+ <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
98
+ {intents.map((i) => (
99
+ <Button
100
+ key={i}
101
+ size="sm"
102
+ variant={intent === i ? 'contained' : 'outlined'}
103
+ onPress={() => setIntent(i)}
104
+ >
105
+ {i}
106
+ </Button>
107
+ ))}
108
+ </View>
109
+ </View>
110
+ </View>
111
+ );
112
+ }`,
113
+ },
114
+ };
@@ -0,0 +1,103 @@
1
+ export const Screen = {
2
+ category: "layout",
3
+ description: "Full-screen container component with background variants, padding, and safe area support",
4
+ props: `
5
+ - \`children\`: React.ReactNode - The content to display inside the screen
6
+ - \`background\`: Surface | 'transparent' - Background variant - controls the background color
7
+ - \`padding\`: Size | 'none' - Screen padding variant
8
+ - \`safeArea\`: boolean - Safe area padding for mobile devices
9
+ - \`top\`: number - Content inset padding for scrollable content (mobile only) Adds padding to the scroll view's content container Useful for adding safe area insets or additional spacing
10
+ - \`bottom\`: number - Bottom content inset padding for scrollable content
11
+ - \`left\`: number - Left content inset padding for scrollable content
12
+ - \`right\`: number - Right content inset padding for scrollable content
13
+ - \`scrollable\`: boolean - Whether the screen content is scrollable
14
+ `,
15
+ features: [
16
+ "Four background color variants",
17
+ "Five padding options",
18
+ "Safe area support for notches/home indicators",
19
+ "Optional scrollable content",
20
+ "Full-screen container",
21
+ "Cross-platform support",
22
+ ],
23
+ bestPractices: [
24
+ "Use as root container for app screens",
25
+ "Enable safeArea for mobile apps",
26
+ "Use 'primary' background for main content",
27
+ "Use 'inverse' background for dark mode or special screens",
28
+ "Combine with View for internal spacing",
29
+ "Enable scrollable for long content",
30
+ ],
31
+ usage: `
32
+ import { Screen, View, Text } from '@idealyst/components';
33
+
34
+ <Screen background="primary" padding="md" safeArea>
35
+ <View spacing="lg">
36
+ <Text size="xl" weight="bold">Screen Title</Text>
37
+ <Text>Screen content goes here</Text>
38
+ </View>
39
+ </Screen>
40
+ `,
41
+ examples: {
42
+ basic: `import { Screen, Text } from '@idealyst/components';
43
+
44
+ <Screen background="primary" padding="md">
45
+ <Text>Basic screen content</Text>
46
+ </Screen>`,
47
+
48
+ variants: `import { Screen, Text } from '@idealyst/components';
49
+
50
+ // Different backgrounds
51
+ <Screen background="primary"><Text>Primary</Text></Screen>
52
+ <Screen background="secondary"><Text>Secondary</Text></Screen>
53
+ <Screen background="tertiary"><Text>Tertiary</Text></Screen>
54
+ <Screen background="inverse"><Text>Inverse</Text></Screen>`,
55
+
56
+ "with-icons": `import { Screen, View, Icon, Text } from '@idealyst/components';
57
+
58
+ <Screen background="primary" padding="lg" safeArea>
59
+ <View spacing="md">
60
+ <View style={{ alignItems: 'center' }}>
61
+ <Icon name="check-circle" size="xl" color="success" />
62
+ </View>
63
+ <Text align="center" size="xl" weight="bold">
64
+ Success!
65
+ </Text>
66
+ <Text align="center">
67
+ Your action was completed successfully
68
+ </Text>
69
+ </View>
70
+ </Screen>`,
71
+
72
+ interactive: `import { Screen, View, Text, Button } from '@idealyst/components';
73
+ import { useState } from 'react';
74
+
75
+ function Example() {
76
+ const [darkMode, setDarkMode] = useState(false);
77
+
78
+ return (
79
+ <Screen
80
+ background={darkMode ? 'inverse' : 'primary'}
81
+ padding="md"
82
+ safeArea
83
+ scrollable
84
+ >
85
+ <View spacing="lg">
86
+ <Text size="xl" weight="bold">
87
+ Settings
88
+ </Text>
89
+ <Button
90
+ onPress={() => setDarkMode(!darkMode)}
91
+ type="outlined"
92
+ >
93
+ Toggle {darkMode ? 'Light' : 'Dark'} Mode
94
+ </Button>
95
+ <Text>
96
+ Current theme: {darkMode ? 'Dark' : 'Light'}
97
+ </Text>
98
+ </View>
99
+ </Screen>
100
+ );
101
+ }`,
102
+ },
103
+ };
@@ -0,0 +1,140 @@
1
+ export const Select = {
2
+ category: "form",
3
+ description: "Dropdown select component for choosing from a list of options",
4
+ props: `
5
+ - \`options\`: SelectOption[] - Array of options to display in the select
6
+ - \`value\`: string - The currently selected value
7
+ - \`onValueChange\`: function - Called when the selected value changes
8
+ - \`placeholder\`: string - Placeholder text when no value is selected
9
+ - \`disabled\`: boolean - Whether the select is disabled
10
+ - \`error\`: boolean - Whether the select shows an error state
11
+ - \`helperText\`: string - Helper text to display below the select
12
+ - \`label\`: string - Label text to display above the select
13
+ - \`intent\`: SelectIntentVariant - The visual type of the select The intent/color scheme of the select
14
+ - \`size\`: SelectSizeVariant - The size of the select
15
+ - \`searchable\`: boolean - Whether to show a search/filter input (web only)
16
+ - \`filterOption\`: (option: SelectOption, searchTerm: string) => boolean - Custom search filter function (used with searchable)
17
+ - \`presentationMode\`: 'dropdown' | 'actionSheet' - Native iOS presentation mode (native only) 'dropdown' uses a standard dropdown overlay 'actionSheet' uses iOS ActionSheet for selection
18
+ - \`maxHeight\`: number - Maximum height for the dropdown content
19
+ `,
20
+ features: [
21
+ "Single selection from options",
22
+ "Searchable dropdown (web)",
23
+ "Icon support for options",
24
+ "Two visual variants",
25
+ "Label and helper text",
26
+ "Error state",
27
+ "Disabled options",
28
+ "Custom filtering",
29
+ "Platform-specific presentation modes",
30
+ ],
31
+ bestPractices: [
32
+ "Use for 5+ options (use RadioGroup for fewer)",
33
+ "Enable searchable for long option lists",
34
+ "Provide clear placeholder text",
35
+ "Group related options visually",
36
+ "Show error states inline with helperText",
37
+ "Consider icons for visual categorization",
38
+ ],
39
+ usage: `
40
+ import { Select } from '@idealyst/components';
41
+ import { useState } from 'react';
42
+
43
+ function Example() {
44
+ const [value, setValue] = useState('');
45
+
46
+ const options = [
47
+ { value: 'us', label: 'United States' },
48
+ { value: 'ca', label: 'Canada' },
49
+ { value: 'uk', label: 'United Kingdom' },
50
+ ];
51
+
52
+ return (
53
+ <Select
54
+ label="Country"
55
+ options={options}
56
+ value={value}
57
+ onValueChange={setValue}
58
+ placeholder="Select a country"
59
+ />
60
+ );
61
+ }
62
+ `,
63
+ examples: {
64
+ basic: `import { Select } from '@idealyst/components';
65
+
66
+ const options = [
67
+ { value: '1', label: 'Option 1' },
68
+ { value: '2', label: 'Option 2' },
69
+ ];
70
+
71
+ <Select options={options} placeholder="Choose..." />`,
72
+
73
+ variants: `import { Select, View } from '@idealyst/components';
74
+
75
+ const options = [{ value: '1', label: 'Option' }];
76
+
77
+ <View spacing="md">
78
+ <Select options={options} type="outlined" size="sm" />
79
+ <Select options={options} type="filled" size="md" />
80
+ <Select options={options} type="outlined" size="lg" />
81
+ </View>`,
82
+
83
+ "with-icons": `import { Select } from '@idealyst/components';
84
+
85
+ const options = [
86
+ { value: 'light', label: 'Light Mode', icon: <Icon name="white-balance-sunny" /> },
87
+ { value: 'dark', label: 'Dark Mode', icon: <Icon name="weather-night" /> },
88
+ { value: 'auto', label: 'Auto', icon: <Icon name="brightness-auto" /> },
89
+ ];
90
+
91
+ <Select
92
+ label="Theme"
93
+ options={options}
94
+ value={theme}
95
+ onValueChange={setTheme}
96
+ />`,
97
+
98
+ interactive: `import { Select, View, Text } from '@idealyst/components';
99
+ import { useState } from 'react';
100
+
101
+ function Example() {
102
+ const [country, setCountry] = useState('');
103
+ const [error, setError] = useState('');
104
+
105
+ const countries = [
106
+ { value: 'us', label: 'United States' },
107
+ { value: 'ca', label: 'Canada' },
108
+ { value: 'uk', label: 'United Kingdom' },
109
+ { value: 'au', label: 'Australia' },
110
+ ];
111
+
112
+ const handleChange = (value: string) => {
113
+ setCountry(value);
114
+ setError('');
115
+ };
116
+
117
+ const handleSubmit = () => {
118
+ if (!country) {
119
+ setError('Please select a country');
120
+ }
121
+ };
122
+
123
+ return (
124
+ <View spacing="md">
125
+ <Select
126
+ label="Country"
127
+ options={countries}
128
+ value={country}
129
+ onValueChange={handleChange}
130
+ placeholder="Select your country"
131
+ error={!!error}
132
+ helperText={error || 'Choose your country of residence'}
133
+ searchable
134
+ />
135
+ <Button onPress={handleSubmit}>Submit</Button>
136
+ </View>
137
+ );
138
+ }`,
139
+ },
140
+ };
@@ -0,0 +1,102 @@
1
+ export const Skeleton = {
2
+ category: "feedback",
3
+ description: "Loading placeholder that mimics content structure while data loads",
4
+ props: `
5
+ - \`width\`: number | string - Width of the skeleton (number in pixels or string with units)
6
+ - \`height\`: number | string - Height of the skeleton (number in pixels or string with units)
7
+ - \`shape\`: SkeletonShape - Shape of the skeleton
8
+ - \`borderRadius\`: number - Border radius for 'rounded' shape (in pixels)
9
+ - \`animation\`: SkeletonAnimation - Animation type
10
+ `,
11
+ features: [
12
+ "Three shapes: rectangle, circle, rounded",
13
+ "Three animation types",
14
+ "Configurable dimensions",
15
+ "Group component for multiple skeletons",
16
+ "Customizable spacing",
17
+ "Mimics content structure",
18
+ ],
19
+ bestPractices: [
20
+ "Match skeleton shape to actual content",
21
+ "Use pulse animation for general loading",
22
+ "Use wave animation for feed-like content",
23
+ "Show skeleton while data is loading",
24
+ "Replace skeleton with actual content smoothly",
25
+ "Use SkeletonGroup for consistent layouts",
26
+ ],
27
+ usage: `
28
+ import { Skeleton, SkeletonGroup } from '@idealyst/components';
29
+
30
+ // Single skeleton
31
+ <Skeleton width={200} height={20} shape="rounded" />
32
+
33
+ // Multiple skeletons
34
+ <SkeletonGroup
35
+ count={3}
36
+ spacing={16}
37
+ skeletonProps={{ width: '100%', height: 60, shape: 'rounded' }}
38
+ />
39
+ `,
40
+ examples: {
41
+ basic: `import { Skeleton } from '@idealyst/components';
42
+
43
+ <Skeleton width={150} height={20} />`,
44
+
45
+ variants: `import { Skeleton, View } from '@idealyst/components';
46
+
47
+ <View spacing="md">
48
+ <Skeleton width="100%" height={20} shape="rectangle" />
49
+ <Skeleton width={100} height={100} shape="circle" />
50
+ <Skeleton width={200} height={40} shape="rounded" />
51
+ </View>`,
52
+
53
+ "with-icons": `import { Skeleton, View } from '@idealyst/components';
54
+
55
+ // Mimicking a user card
56
+ <View style={{ flexDirection: 'row', gap: 12, alignItems: 'center' }}>
57
+ <Skeleton width={48} height={48} shape="circle" />
58
+ <View spacing="sm" style={{ flex: 1 }}>
59
+ <Skeleton width="60%" height={16} />
60
+ <Skeleton width="40%" height={14} />
61
+ </View>
62
+ </View>`,
63
+
64
+ interactive: `import { Skeleton, SkeletonGroup, View, Card, Text, Button } from '@idealyst/components';
65
+ import { useState, useEffect } from 'react';
66
+
67
+ function Example() {
68
+ const [loading, setLoading] = useState(true);
69
+ const [data, setData] = useState(null);
70
+
71
+ useEffect(() => {
72
+ setTimeout(() => {
73
+ setData({ title: 'Article Title', content: 'Article content...' });
74
+ setLoading(false);
75
+ }, 2000);
76
+ }, []);
77
+
78
+ if (loading) {
79
+ return (
80
+ <Card padding="md">
81
+ <View spacing="md">
82
+ <Skeleton width="80%" height={24} shape="rounded" />
83
+ <SkeletonGroup
84
+ count={3}
85
+ skeletonProps={{ width: '100%', height: 16 }}
86
+ />
87
+ </View>
88
+ </Card>
89
+ );
90
+ }
91
+
92
+ return (
93
+ <Card padding="md">
94
+ <View spacing="md">
95
+ <Text size="lg" weight="bold">{data.title}</Text>
96
+ <Text>{data.content}</Text>
97
+ </View>
98
+ </Card>
99
+ );
100
+ }`,
101
+ },
102
+ };