@urbint/cl 1.0.1

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 (206) hide show
  1. package/.cursor/rules +313 -0
  2. package/.rnstorybook/index.ts +11 -0
  3. package/.rnstorybook/main.ts +8 -0
  4. package/.rnstorybook/preview.tsx +14 -0
  5. package/.rnstorybook/storybook.requires.ts +49 -0
  6. package/.storybook/main.ts +16 -0
  7. package/.storybook/preview.ts +32 -0
  8. package/.storybook/vitest.setup.ts +7 -0
  9. package/App.tsx +422 -0
  10. package/README.md +229 -0
  11. package/app.json +33 -0
  12. package/assets/adaptive-icon.png +0 -0
  13. package/assets/favicon.png +0 -0
  14. package/assets/icon.png +0 -0
  15. package/assets/splash-icon.png +0 -0
  16. package/babel.config.js +16 -0
  17. package/docs/components/CodeBlock.tsx +80 -0
  18. package/docs/components/PropTable.tsx +93 -0
  19. package/docs/components/Sidebar.tsx +199 -0
  20. package/docs/components/index.ts +8 -0
  21. package/docs/data/colorTokens.ts +70 -0
  22. package/docs/data/componentData.tsx +1685 -0
  23. package/docs/data/index.ts +7 -0
  24. package/docs/index.ts +19 -0
  25. package/docs/navigation.ts +94 -0
  26. package/docs/pages/ColorsPage.tsx +226 -0
  27. package/docs/pages/ComponentPage.tsx +235 -0
  28. package/docs/pages/InstallationPage.tsx +232 -0
  29. package/docs/pages/IntroductionPage.tsx +163 -0
  30. package/docs/pages/ThemingPage.tsx +251 -0
  31. package/docs/pages/index.ts +10 -0
  32. package/docs/theme.ts +64 -0
  33. package/docs/types.ts +54 -0
  34. package/index.ts +8 -0
  35. package/llms.txt +1893 -0
  36. package/mcp-config.example.json +10 -0
  37. package/mcp-server/README.md +192 -0
  38. package/mcp-server/package-lock.json +1707 -0
  39. package/mcp-server/package.json +38 -0
  40. package/mcp-server/src/index.ts +1136 -0
  41. package/mcp-server/src/registry/components.ts +1446 -0
  42. package/mcp-server/src/registry/index.ts +3 -0
  43. package/mcp-server/src/registry/tokens.ts +256 -0
  44. package/mcp-server/tsconfig.json +19 -0
  45. package/package.json +92 -0
  46. package/src/components/Accordion/Accordion.stories.tsx +226 -0
  47. package/src/components/Accordion/Accordion.tsx +255 -0
  48. package/src/components/Accordion/index.ts +12 -0
  49. package/src/components/ActionSheet/ActionSheet.stories.tsx +393 -0
  50. package/src/components/ActionSheet/ActionSheet.tsx +258 -0
  51. package/src/components/ActionSheet/index.ts +2 -0
  52. package/src/components/Alert/Alert.stories.tsx +165 -0
  53. package/src/components/Alert/Alert.tsx +164 -0
  54. package/src/components/Alert/index.ts +2 -0
  55. package/src/components/AlertDialog/AlertDialog.stories.tsx +330 -0
  56. package/src/components/AlertDialog/AlertDialog.tsx +234 -0
  57. package/src/components/AlertDialog/index.ts +2 -0
  58. package/src/components/Avatar/Avatar.stories.tsx +154 -0
  59. package/src/components/Avatar/Avatar.tsx +219 -0
  60. package/src/components/Avatar/index.ts +2 -0
  61. package/src/components/Badge/Badge.stories.tsx +146 -0
  62. package/src/components/Badge/Badge.tsx +125 -0
  63. package/src/components/Badge/index.ts +2 -0
  64. package/src/components/Box/Box.stories.tsx +192 -0
  65. package/src/components/Box/Box.tsx +184 -0
  66. package/src/components/Box/index.ts +2 -0
  67. package/src/components/Button/Button.stories.tsx +157 -0
  68. package/src/components/Button/Button.tsx +180 -0
  69. package/src/components/Button/index.ts +2 -0
  70. package/src/components/Card/Card.stories.tsx +145 -0
  71. package/src/components/Card/Card.tsx +169 -0
  72. package/src/components/Card/index.ts +11 -0
  73. package/src/components/Center/Center.stories.tsx +215 -0
  74. package/src/components/Center/Center.tsx +29 -0
  75. package/src/components/Center/index.ts +2 -0
  76. package/src/components/Checkbox/Checkbox.stories.tsx +94 -0
  77. package/src/components/Checkbox/Checkbox.tsx +242 -0
  78. package/src/components/Checkbox/index.ts +2 -0
  79. package/src/components/DatePicker/DatePicker.stories.tsx +623 -0
  80. package/src/components/DatePicker/DatePicker.tsx +1228 -0
  81. package/src/components/DatePicker/index.ts +8 -0
  82. package/src/components/Divider/Divider.stories.tsx +224 -0
  83. package/src/components/Divider/Divider.tsx +73 -0
  84. package/src/components/Divider/index.ts +2 -0
  85. package/src/components/Drawer/Drawer.stories.tsx +414 -0
  86. package/src/components/Drawer/Drawer.tsx +342 -0
  87. package/src/components/Drawer/index.ts +11 -0
  88. package/src/components/Fab/Fab.stories.tsx +360 -0
  89. package/src/components/Fab/Fab.tsx +185 -0
  90. package/src/components/Fab/index.ts +2 -0
  91. package/src/components/FormControl/FormControl.stories.tsx +276 -0
  92. package/src/components/FormControl/FormControl.tsx +185 -0
  93. package/src/components/FormControl/index.ts +12 -0
  94. package/src/components/Grid/Grid.stories.tsx +244 -0
  95. package/src/components/Grid/Grid.tsx +93 -0
  96. package/src/components/Grid/index.ts +2 -0
  97. package/src/components/HStack/HStack.stories.tsx +230 -0
  98. package/src/components/HStack/HStack.tsx +80 -0
  99. package/src/components/HStack/index.ts +2 -0
  100. package/src/components/Heading/Heading.stories.tsx +111 -0
  101. package/src/components/Heading/Heading.tsx +85 -0
  102. package/src/components/Heading/index.ts +2 -0
  103. package/src/components/Icon/Icon.stories.tsx +320 -0
  104. package/src/components/Icon/Icon.tsx +117 -0
  105. package/src/components/Icon/index.ts +2 -0
  106. package/src/components/Image/Image.stories.tsx +357 -0
  107. package/src/components/Image/Image.tsx +168 -0
  108. package/src/components/Image/index.ts +2 -0
  109. package/src/components/Input/Input.stories.tsx +164 -0
  110. package/src/components/Input/Input.tsx +274 -0
  111. package/src/components/Input/index.ts +2 -0
  112. package/src/components/Link/Link.stories.tsx +187 -0
  113. package/src/components/Link/Link.tsx +104 -0
  114. package/src/components/Link/index.ts +2 -0
  115. package/src/components/Menu/Menu.stories.tsx +363 -0
  116. package/src/components/Menu/Menu.tsx +238 -0
  117. package/src/components/Menu/index.ts +2 -0
  118. package/src/components/Modal/Modal.stories.tsx +156 -0
  119. package/src/components/Modal/Modal.tsx +280 -0
  120. package/src/components/Modal/index.ts +11 -0
  121. package/src/components/Popover/Popover.stories.tsx +330 -0
  122. package/src/components/Popover/Popover.tsx +315 -0
  123. package/src/components/Popover/index.ts +11 -0
  124. package/src/components/Portal/Portal.stories.tsx +376 -0
  125. package/src/components/Portal/Portal.tsx +100 -0
  126. package/src/components/Portal/index.ts +2 -0
  127. package/src/components/Pressable/Pressable.stories.tsx +338 -0
  128. package/src/components/Pressable/Pressable.tsx +71 -0
  129. package/src/components/Pressable/index.ts +2 -0
  130. package/src/components/Progress/Progress.stories.tsx +131 -0
  131. package/src/components/Progress/Progress.tsx +219 -0
  132. package/src/components/Progress/index.ts +2 -0
  133. package/src/components/Radio/Radio.stories.tsx +101 -0
  134. package/src/components/Radio/Radio.tsx +234 -0
  135. package/src/components/Radio/index.ts +2 -0
  136. package/src/components/Select/Select.stories.tsx +908 -0
  137. package/src/components/Select/Select.tsx +659 -0
  138. package/src/components/Select/index.ts +8 -0
  139. package/src/components/Skeleton/Skeleton.stories.tsx +154 -0
  140. package/src/components/Skeleton/Skeleton.tsx +192 -0
  141. package/src/components/Skeleton/index.ts +8 -0
  142. package/src/components/Slider/Slider.stories.tsx +363 -0
  143. package/src/components/Slider/Slider.tsx +209 -0
  144. package/src/components/Slider/index.ts +2 -0
  145. package/src/components/Spinner/Spinner.stories.tsx +108 -0
  146. package/src/components/Spinner/Spinner.tsx +121 -0
  147. package/src/components/Spinner/index.ts +2 -0
  148. package/src/components/Switch/Switch.stories.tsx +116 -0
  149. package/src/components/Switch/Switch.tsx +172 -0
  150. package/src/components/Switch/index.ts +2 -0
  151. package/src/components/Table/Table.stories.tsx +417 -0
  152. package/src/components/Table/Table.tsx +233 -0
  153. package/src/components/Table/index.ts +2 -0
  154. package/src/components/Text/Text.stories.tsx +93 -0
  155. package/src/components/Text/Text.tsx +119 -0
  156. package/src/components/Text/index.ts +2 -0
  157. package/src/components/Textarea/Textarea.stories.tsx +280 -0
  158. package/src/components/Textarea/Textarea.tsx +212 -0
  159. package/src/components/Textarea/index.ts +2 -0
  160. package/src/components/Toast/Toast.stories.tsx +446 -0
  161. package/src/components/Toast/Toast.tsx +221 -0
  162. package/src/components/Toast/index.ts +2 -0
  163. package/src/components/Tooltip/Tooltip.stories.tsx +354 -0
  164. package/src/components/Tooltip/Tooltip.tsx +261 -0
  165. package/src/components/Tooltip/index.ts +2 -0
  166. package/src/components/VStack/VStack.stories.tsx +183 -0
  167. package/src/components/VStack/VStack.tsx +76 -0
  168. package/src/components/VStack/index.ts +2 -0
  169. package/src/components/index.ts +62 -0
  170. package/src/hooks/index.ts +7 -0
  171. package/src/hooks/useControllableState.ts +41 -0
  172. package/src/hooks/useDisclosure.ts +51 -0
  173. package/src/index.ts +22 -0
  174. package/src/stories/Button.stories.tsx +53 -0
  175. package/src/stories/Button.tsx +101 -0
  176. package/src/stories/Configure.mdx +364 -0
  177. package/src/stories/Header.stories.tsx +33 -0
  178. package/src/stories/Header.tsx +75 -0
  179. package/src/stories/Page.stories.tsx +25 -0
  180. package/src/stories/Page.tsx +154 -0
  181. package/src/stories/assets/accessibility.png +0 -0
  182. package/src/stories/assets/accessibility.svg +1 -0
  183. package/src/stories/assets/addon-library.png +0 -0
  184. package/src/stories/assets/assets.png +0 -0
  185. package/src/stories/assets/avif-test-image.avif +0 -0
  186. package/src/stories/assets/context.png +0 -0
  187. package/src/stories/assets/discord.svg +1 -0
  188. package/src/stories/assets/docs.png +0 -0
  189. package/src/stories/assets/figma-plugin.png +0 -0
  190. package/src/stories/assets/github.svg +1 -0
  191. package/src/stories/assets/share.png +0 -0
  192. package/src/stories/assets/styling.png +0 -0
  193. package/src/stories/assets/testing.png +0 -0
  194. package/src/stories/assets/theming.png +0 -0
  195. package/src/stories/assets/tutorials.svg +1 -0
  196. package/src/stories/assets/youtube.svg +1 -0
  197. package/src/styles/index.ts +7 -0
  198. package/src/styles/tokens.ts +318 -0
  199. package/src/styles/unistyles.ts +254 -0
  200. package/src/utils/createContext.tsx +25 -0
  201. package/src/utils/index.ts +7 -0
  202. package/src/utils/mergeRefs.ts +21 -0
  203. package/tsconfig.json +26 -0
  204. package/urbint-cl-1.0.0.tgz +0 -0
  205. package/vitest.config.ts +37 -0
  206. package/vitest.shims.d.ts +1 -0
@@ -0,0 +1,280 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { View, StyleSheet } from 'react-native';
3
+ import { Textarea } from './Textarea';
4
+ import { VStack } from '../VStack';
5
+ import { Text } from '../Text';
6
+ import { colors, spacing, borderRadius } from '../../styles/tokens';
7
+
8
+ /**
9
+ * Story container with design system tokens
10
+ */
11
+ const StoryContainer: React.FC<{ children: React.ReactNode }> = ({ children }) => (
12
+ <View style={styles.container}>{children}</View>
13
+ );
14
+
15
+ const meta: Meta<typeof Textarea> = {
16
+ title: 'Forms/Textarea',
17
+ component: Textarea,
18
+ decorators: [
19
+ (Story) => (
20
+ <StoryContainer>
21
+ <Story />
22
+ </StoryContainer>
23
+ ),
24
+ ],
25
+ argTypes: {
26
+ variant: {
27
+ control: 'select',
28
+ options: ['outline', 'filled'],
29
+ },
30
+ size: {
31
+ control: 'select',
32
+ options: ['sm', 'md', 'lg'],
33
+ },
34
+ isInvalid: { control: 'boolean' },
35
+ isDisabled: { control: 'boolean' },
36
+ isReadOnly: { control: 'boolean' },
37
+ isRequired: { control: 'boolean' },
38
+ showCount: { control: 'boolean' },
39
+ rows: { control: 'number' },
40
+ },
41
+ args: {
42
+ placeholder: 'Enter your text here...',
43
+ variant: 'outline',
44
+ size: 'md',
45
+ rows: 4,
46
+ },
47
+ };
48
+
49
+ export default meta;
50
+
51
+ type Story = StoryObj<typeof Textarea>;
52
+
53
+ export const Default: Story = {
54
+ render: (args) => <Textarea {...args} />,
55
+ };
56
+
57
+ export const WithLabel: Story = {
58
+ render: () => (
59
+ <VStack space={spacing.lg}>
60
+ <Textarea
61
+ label="Description"
62
+ placeholder="Enter a description..."
63
+ />
64
+ <Textarea
65
+ label="Comments"
66
+ placeholder="Leave a comment..."
67
+ helperText="Share your thoughts"
68
+ />
69
+ </VStack>
70
+ ),
71
+ };
72
+
73
+ export const Variants: Story = {
74
+ render: () => (
75
+ <VStack space={spacing.lg}>
76
+ <Text weight="semiBold">Textarea Variants</Text>
77
+ <Textarea
78
+ label="Outline"
79
+ variant="outline"
80
+ placeholder="Outline variant..."
81
+ />
82
+ <Textarea
83
+ label="Filled"
84
+ variant="filled"
85
+ placeholder="Filled variant..."
86
+ />
87
+ </VStack>
88
+ ),
89
+ };
90
+
91
+ export const Sizes: Story = {
92
+ render: () => (
93
+ <VStack space={spacing.lg}>
94
+ <Text weight="semiBold">Textarea Sizes</Text>
95
+ <Textarea
96
+ label="Small"
97
+ size="sm"
98
+ placeholder="Small textarea..."
99
+ rows={3}
100
+ />
101
+ <Textarea
102
+ label="Medium"
103
+ size="md"
104
+ placeholder="Medium textarea..."
105
+ rows={3}
106
+ />
107
+ <Textarea
108
+ label="Large"
109
+ size="lg"
110
+ placeholder="Large textarea..."
111
+ rows={3}
112
+ />
113
+ </VStack>
114
+ ),
115
+ };
116
+
117
+ export const States: Story = {
118
+ render: () => (
119
+ <VStack space={spacing.lg}>
120
+ <Text weight="semiBold">Textarea States</Text>
121
+ <Textarea
122
+ label="Normal"
123
+ placeholder="Normal state..."
124
+ />
125
+ <Textarea
126
+ label="Disabled"
127
+ placeholder="Disabled state..."
128
+ isDisabled
129
+ value="This textarea is disabled"
130
+ />
131
+ <Textarea
132
+ label="Read Only"
133
+ placeholder="Read only state..."
134
+ isReadOnly
135
+ value="This content is read-only"
136
+ />
137
+ <Textarea
138
+ label="Required"
139
+ placeholder="Required field..."
140
+ isRequired
141
+ />
142
+ </VStack>
143
+ ),
144
+ };
145
+
146
+ export const Validation: Story = {
147
+ render: () => (
148
+ <VStack space={spacing.lg}>
149
+ <Text weight="semiBold">Validation States</Text>
150
+ <Textarea
151
+ label="Valid Input"
152
+ placeholder="Enter text..."
153
+ value="This is valid content"
154
+ helperText="Looking good!"
155
+ />
156
+ <Textarea
157
+ label="Invalid Input"
158
+ placeholder="Enter text..."
159
+ isInvalid
160
+ errorMessage="This field is required"
161
+ />
162
+ <Textarea
163
+ label="With Error Message"
164
+ placeholder="Enter text..."
165
+ isInvalid
166
+ value="Too short"
167
+ errorMessage="Description must be at least 50 characters"
168
+ />
169
+ </VStack>
170
+ ),
171
+ };
172
+
173
+ export const CharacterCount: Story = {
174
+ render: () => (
175
+ <VStack space={spacing.lg}>
176
+ <Text weight="semiBold">Character Count</Text>
177
+ <Textarea
178
+ label="Bio"
179
+ placeholder="Tell us about yourself..."
180
+ showCount
181
+ maxLength={200}
182
+ helperText="Maximum 200 characters"
183
+ />
184
+ <Textarea
185
+ label="Tweet"
186
+ placeholder="What's happening?"
187
+ showCount
188
+ maxLength={280}
189
+ rows={3}
190
+ />
191
+ </VStack>
192
+ ),
193
+ };
194
+
195
+ export const DifferentRows: Story = {
196
+ render: () => (
197
+ <VStack space={spacing.lg}>
198
+ <Text weight="semiBold">Different Row Heights</Text>
199
+ <Textarea
200
+ label="2 Rows"
201
+ placeholder="Short text area..."
202
+ rows={2}
203
+ />
204
+ <Textarea
205
+ label="4 Rows"
206
+ placeholder="Medium text area..."
207
+ rows={4}
208
+ />
209
+ <Textarea
210
+ label="6 Rows"
211
+ placeholder="Large text area..."
212
+ rows={6}
213
+ />
214
+ <Textarea
215
+ label="8 Rows"
216
+ placeholder="Extra large text area..."
217
+ rows={8}
218
+ />
219
+ </VStack>
220
+ ),
221
+ };
222
+
223
+ export const FormExample: Story = {
224
+ render: () => (
225
+ <VStack space={spacing.lg}>
226
+ <Text weight="semiBold">Feedback Form</Text>
227
+ <VStack space={spacing.md}>
228
+ <Textarea
229
+ label="Subject"
230
+ placeholder="Brief summary..."
231
+ rows={2}
232
+ isRequired
233
+ />
234
+ <Textarea
235
+ label="Description"
236
+ placeholder="Please provide details..."
237
+ rows={5}
238
+ isRequired
239
+ helperText="Be as specific as possible"
240
+ />
241
+ <Textarea
242
+ label="Additional Notes"
243
+ placeholder="Any other information..."
244
+ rows={3}
245
+ showCount
246
+ maxLength={500}
247
+ />
248
+ </VStack>
249
+ </VStack>
250
+ ),
251
+ };
252
+
253
+ export const ContactForm: Story = {
254
+ render: () => (
255
+ <VStack space={spacing.lg}>
256
+ <Text weight="semiBold">Contact Form Message</Text>
257
+ <Textarea
258
+ label="Your Message"
259
+ placeholder="How can we help you today?"
260
+ rows={6}
261
+ isRequired
262
+ showCount
263
+ maxLength={1000}
264
+ helperText="We typically respond within 24 hours"
265
+ />
266
+ </VStack>
267
+ ),
268
+ };
269
+
270
+ /**
271
+ * Styles using design system tokens
272
+ */
273
+ const styles = StyleSheet.create({
274
+ container: {
275
+ padding: spacing.lg,
276
+ backgroundColor: colors.background.default,
277
+ borderRadius: borderRadius.lg,
278
+ },
279
+ });
280
+
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Textarea Component
3
+ * Multi-line text input
4
+ */
5
+
6
+ import React, { forwardRef, useState } from 'react';
7
+ import { View, TextInput, TextInputProps, Text, StyleSheet } from 'react-native';
8
+ import { colors, spacing, borderRadius, typography } from '../../styles/tokens';
9
+
10
+ export interface TextareaProps extends Omit<TextInputProps, 'style'> {
11
+ /** Textarea variant */
12
+ variant?: 'outline' | 'filled';
13
+ /** Textarea size */
14
+ size?: 'sm' | 'md' | 'lg';
15
+ /** Label text */
16
+ label?: string;
17
+ /** Helper text */
18
+ helperText?: string;
19
+ /** Error message */
20
+ errorMessage?: string;
21
+ /** Is invalid */
22
+ isInvalid?: boolean;
23
+ /** Is disabled */
24
+ isDisabled?: boolean;
25
+ /** Is read only */
26
+ isReadOnly?: boolean;
27
+ /** Is required */
28
+ isRequired?: boolean;
29
+ /** Number of rows */
30
+ rows?: number;
31
+ /** Show character count */
32
+ showCount?: boolean;
33
+ }
34
+
35
+ export const Textarea = forwardRef<TextInput, TextareaProps>(
36
+ (
37
+ {
38
+ variant = 'outline',
39
+ size = 'md',
40
+ label,
41
+ helperText,
42
+ errorMessage,
43
+ isInvalid = false,
44
+ isDisabled = false,
45
+ isReadOnly = false,
46
+ isRequired = false,
47
+ rows = 4,
48
+ showCount = false,
49
+ maxLength,
50
+ value = '',
51
+ onFocus,
52
+ onBlur,
53
+ ...props
54
+ },
55
+ ref
56
+ ) => {
57
+ const [isFocused, setIsFocused] = useState(false);
58
+ const [internalValue, setInternalValue] = useState(value);
59
+
60
+ const handleFocus = (e: any) => {
61
+ setIsFocused(true);
62
+ onFocus?.(e);
63
+ };
64
+
65
+ const handleBlur = (e: any) => {
66
+ setIsFocused(false);
67
+ onBlur?.(e);
68
+ };
69
+
70
+ const handleChange = (text: string) => {
71
+ setInternalValue(text);
72
+ props.onChangeText?.(text);
73
+ };
74
+
75
+ const hasError = isInvalid || !!errorMessage;
76
+ const currentLength = (value || internalValue).length;
77
+
78
+ return (
79
+ <View style={styles.container}>
80
+ {label && (
81
+ <Text style={[styles.label, isDisabled && styles.labelDisabled]}>
82
+ {label}
83
+ {isRequired && <Text style={styles.required}> *</Text>}
84
+ </Text>
85
+ )}
86
+ <View
87
+ style={[
88
+ styles.textareaWrapper,
89
+ styles[variant],
90
+ styles[size],
91
+ isFocused && styles.focused,
92
+ hasError && styles.error,
93
+ isDisabled && styles.disabled,
94
+ { minHeight: rows * 24 },
95
+ ]}
96
+ >
97
+ <TextInput
98
+ ref={ref}
99
+ style={[styles.textarea, styles[`${size}Textarea` as keyof typeof styles], isDisabled && styles.disabledText]}
100
+ editable={!isDisabled && !isReadOnly}
101
+ placeholderTextColor={colors.text.disabled}
102
+ multiline
103
+ numberOfLines={rows}
104
+ textAlignVertical="top"
105
+ maxLength={maxLength}
106
+ value={value || internalValue}
107
+ onFocus={handleFocus}
108
+ onBlur={handleBlur}
109
+ onChangeText={handleChange}
110
+ {...props}
111
+ />
112
+ </View>
113
+ <View style={styles.footer}>
114
+ {(helperText || errorMessage) && (
115
+ <Text style={[styles.helperText, hasError && styles.errorText]}>
116
+ {errorMessage || helperText}
117
+ </Text>
118
+ )}
119
+ {showCount && maxLength && (
120
+ <Text style={styles.charCount}>
121
+ {currentLength}/{maxLength}
122
+ </Text>
123
+ )}
124
+ </View>
125
+ </View>
126
+ );
127
+ }
128
+ );
129
+
130
+ Textarea.displayName = 'Textarea';
131
+
132
+ const styles = StyleSheet.create({
133
+ container: {
134
+ width: '100%',
135
+ },
136
+ label: {
137
+ fontSize: typography.fontSize.componentLabel,
138
+ fontWeight: typography.fontWeight.semiBold,
139
+ color: colors.text.default,
140
+ marginBottom: spacing.base,
141
+ },
142
+ labelDisabled: {
143
+ color: colors.text.disabled,
144
+ },
145
+ required: {
146
+ color: colors.feedback.error.content,
147
+ },
148
+ textareaWrapper: {
149
+ borderRadius: borderRadius.md,
150
+ },
151
+ outline: {
152
+ borderWidth: 1,
153
+ borderColor: colors.border.default,
154
+ backgroundColor: colors.background.default,
155
+ },
156
+ filled: {
157
+ backgroundColor: colors.background.secondary,
158
+ },
159
+ sm: {
160
+ padding: spacing['2x'],
161
+ },
162
+ md: {
163
+ padding: spacing['3x'],
164
+ },
165
+ lg: {
166
+ padding: spacing['4x'],
167
+ },
168
+ focused: {
169
+ borderColor: colors.border.active,
170
+ },
171
+ error: {
172
+ borderColor: colors.border.danger,
173
+ },
174
+ disabled: {
175
+ backgroundColor: colors.background.secondary,
176
+ borderColor: colors.border.disabled,
177
+ },
178
+ textarea: {
179
+ color: colors.text.default,
180
+ },
181
+ smTextarea: {
182
+ fontSize: typography.fontSize.small,
183
+ },
184
+ mdTextarea: {
185
+ fontSize: typography.fontSize.body,
186
+ },
187
+ lgTextarea: {
188
+ fontSize: typography.fontSize.body,
189
+ },
190
+ disabledText: {
191
+ color: colors.text.disabled,
192
+ },
193
+ footer: {
194
+ flexDirection: 'row',
195
+ justifyContent: 'space-between',
196
+ alignItems: 'center',
197
+ marginTop: spacing.base,
198
+ },
199
+ helperText: {
200
+ fontSize: typography.fontSize.caption,
201
+ color: colors.text.secondary,
202
+ flex: 1,
203
+ },
204
+ errorText: {
205
+ color: colors.feedback.error.content,
206
+ },
207
+ charCount: {
208
+ fontSize: typography.fontSize.caption,
209
+ color: colors.text.secondary,
210
+ marginLeft: spacing['2x'],
211
+ },
212
+ });
@@ -0,0 +1,2 @@
1
+ export { Textarea, type TextareaProps } from './Textarea';
2
+