@idealyst/components 1.0.83 → 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/CLAUDE.md +199 -232
- package/README.md +5 -5
- package/package.json +20 -2
- package/plugin/README.md +272 -0
- package/plugin/test-cases.jsx +112 -0
- package/plugin/web-legacy.js +320 -0
- package/plugin/web.js +422 -124
- package/src/Accordion/Accordion.native.tsx +182 -0
- package/src/Accordion/Accordion.styles.tsx +260 -0
- package/src/Accordion/Accordion.web.tsx +147 -0
- package/src/Accordion/index.native.tsx +3 -0
- package/src/Accordion/index.ts +3 -0
- package/src/Accordion/index.web.tsx +3 -0
- package/src/Accordion/types.ts +23 -0
- package/src/ActivityIndicator/ActivityIndicator.native.tsx +17 -12
- package/src/ActivityIndicator/ActivityIndicator.styles.tsx +83 -109
- package/src/ActivityIndicator/ActivityIndicator.web.tsx +23 -17
- package/src/ActivityIndicator/index.ts +5 -2
- package/src/ActivityIndicator/index.web.ts +5 -2
- package/src/ActivityIndicator/types.ts +15 -10
- package/src/Alert/Alert.native.tsx +113 -0
- package/src/Alert/Alert.styles.tsx +304 -0
- package/src/Alert/Alert.web.tsx +123 -0
- package/src/Alert/index.native.ts +5 -0
- package/src/Alert/index.ts +5 -0
- package/src/Alert/index.web.ts +5 -0
- package/src/Alert/types.ts +21 -0
- package/src/Avatar/Avatar.native.tsx +8 -6
- package/src/Avatar/Avatar.styles.tsx +64 -58
- package/src/Avatar/Avatar.web.tsx +13 -8
- package/src/Avatar/index.ts +5 -2
- package/src/Avatar/index.web.ts +5 -2
- package/src/Avatar/types.ts +19 -13
- package/src/Badge/Badge.native.tsx +59 -14
- package/src/Badge/Badge.styles.tsx +125 -139
- package/src/Badge/Badge.web.tsx +72 -16
- package/src/Badge/index.ts +5 -2
- package/src/Badge/index.web.ts +5 -2
- package/src/Badge/types.ts +23 -11
- package/src/Breadcrumb/Breadcrumb.native.tsx +225 -0
- package/src/Breadcrumb/Breadcrumb.styles.tsx +234 -0
- package/src/Breadcrumb/Breadcrumb.web.tsx +268 -0
- package/src/Breadcrumb/index.native.ts +5 -0
- package/src/Breadcrumb/index.ts +5 -0
- package/src/Breadcrumb/index.web.ts +5 -0
- package/src/Breadcrumb/types.ts +56 -0
- package/src/Button/Button.native.tsx +75 -24
- package/src/Button/Button.styles.tsx +248 -205
- package/src/Button/Button.web.tsx +82 -25
- package/src/Button/index.ts +5 -5
- package/src/Button/index.web.ts +5 -3
- package/src/Button/types.ts +32 -15
- package/src/Card/Card.native.tsx +14 -11
- package/src/Card/Card.styles.tsx +146 -220
- package/src/Card/Card.web.tsx +20 -21
- package/src/Card/index.ts +5 -5
- package/src/Card/index.web.ts +5 -3
- package/src/Card/types.ts +24 -17
- package/src/Checkbox/Checkbox.native.tsx +24 -34
- package/src/Checkbox/Checkbox.styles.tsx +223 -275
- package/src/Checkbox/Checkbox.web.tsx +30 -37
- package/src/Checkbox/index.ts +5 -5
- package/src/Checkbox/index.web.ts +5 -3
- package/src/Checkbox/types.ts +26 -20
- package/src/Chip/Chip.native.tsx +126 -0
- package/src/Chip/Chip.styles.tsx +138 -0
- package/src/Chip/Chip.web.tsx +154 -0
- package/src/Chip/index.native.ts +5 -0
- package/src/Chip/index.ts +5 -0
- package/src/Chip/index.web.ts +5 -0
- package/src/Chip/types.ts +51 -0
- package/src/Dialog/Dialog.native.tsx +65 -12
- package/src/Dialog/Dialog.styles.tsx +154 -136
- package/src/Dialog/Dialog.web.tsx +16 -11
- package/src/Dialog/index.ts +5 -2
- package/src/Dialog/index.web.ts +5 -2
- package/src/Dialog/types.ts +22 -16
- package/src/Divider/Divider.native.tsx +19 -14
- package/src/Divider/Divider.styles.tsx +273 -595
- package/src/Divider/Divider.web.tsx +19 -12
- package/src/Divider/index.ts +5 -5
- package/src/Divider/index.web.ts +5 -3
- package/src/Divider/types.ts +28 -19
- package/src/Icon/Icon.native.tsx +17 -24
- package/src/Icon/Icon.styles.tsx +64 -48
- package/src/Icon/Icon.web.tsx +14 -11
- package/src/Icon/IconSvg/IconSvg.native.tsx +42 -0
- package/src/Icon/IconSvg/IconSvg.web.tsx +40 -0
- package/src/Icon/IconSvg/index.native.ts +1 -0
- package/src/Icon/IconSvg/index.ts +1 -0
- package/src/Icon/icon-resolver.native.ts +27 -0
- package/src/Icon/icon-resolver.ts +70 -0
- package/src/Icon/index.ts +5 -5
- package/src/Icon/index.web.ts +5 -3
- package/src/Icon/types.ts +17 -11
- package/src/Image/Image.native.tsx +86 -0
- package/src/Image/Image.styles.tsx +57 -0
- package/src/Image/Image.web.tsx +92 -0
- package/src/Image/index.native.ts +5 -0
- package/src/Image/index.ts +5 -0
- package/src/Image/types.ts +21 -0
- package/src/Input/Input.native.tsx +103 -26
- package/src/Input/Input.styles.tsx +240 -177
- package/src/Input/Input.web.tsx +141 -38
- package/src/Input/index.ts +5 -5
- package/src/Input/index.web.ts +5 -3
- package/src/Input/types.ts +43 -20
- package/src/List/List.native.tsx +56 -0
- package/src/List/List.styles.tsx +257 -0
- package/src/List/List.web.tsx +43 -0
- package/src/List/ListContext.tsx +16 -0
- package/src/List/ListItem.native.tsx +111 -0
- package/src/List/ListItem.web.tsx +110 -0
- package/src/List/ListSection.native.tsx +31 -0
- package/src/List/ListSection.web.tsx +33 -0
- package/src/List/index.native.tsx +5 -0
- package/src/List/index.ts +5 -0
- package/src/List/index.web.tsx +5 -0
- package/src/List/types.ts +42 -0
- package/src/Menu/Menu.native.tsx +150 -0
- package/src/Menu/Menu.styles.tsx +185 -0
- package/src/Menu/Menu.web.tsx +99 -0
- package/src/Menu/MenuItem.native.tsx +66 -0
- package/src/Menu/MenuItem.styles.tsx +119 -0
- package/src/Menu/MenuItem.web.tsx +67 -0
- package/src/Menu/index.native.ts +3 -0
- package/src/Menu/index.ts +3 -0
- package/src/Menu/index.web.ts +3 -0
- package/src/Menu/types.ts +30 -0
- package/src/Popover/Popover.native.tsx +102 -32
- package/src/Popover/Popover.styles.tsx +100 -67
- package/src/Popover/Popover.web.tsx +36 -260
- package/src/Popover/index.ts +5 -2
- package/src/Popover/index.web.ts +5 -2
- package/src/Popover/types.ts +14 -13
- package/src/Pressable/Pressable.native.tsx +7 -6
- package/src/Pressable/Pressable.web.tsx +8 -6
- package/src/Pressable/index.ts +5 -2
- package/src/Pressable/index.web.ts +5 -2
- package/src/Pressable/types.ts +11 -10
- package/src/Progress/Progress.native.tsx +179 -0
- package/src/Progress/Progress.styles.tsx +164 -0
- package/src/Progress/Progress.web.tsx +144 -0
- package/src/Progress/index.native.ts +1 -0
- package/src/Progress/index.ts +5 -0
- package/src/Progress/index.web.ts +5 -0
- package/src/Progress/types.ts +21 -0
- package/src/RadioButton/RadioButton.native.tsx +88 -0
- package/src/RadioButton/RadioButton.styles.tsx +163 -0
- package/src/RadioButton/RadioButton.web.tsx +85 -0
- package/src/RadioButton/RadioGroup.native.tsx +43 -0
- package/src/RadioButton/RadioGroup.web.tsx +49 -0
- package/src/RadioButton/index.native.ts +2 -0
- package/src/RadioButton/index.ts +2 -0
- package/src/RadioButton/index.web.ts +2 -0
- package/src/RadioButton/types.ts +29 -0
- package/src/SVGImage/SVGImage.native.tsx +9 -7
- package/src/SVGImage/SVGImage.styles.tsx +63 -55
- package/src/SVGImage/SVGImage.web.tsx +16 -13
- package/src/SVGImage/index.ts +5 -5
- package/src/SVGImage/index.web.ts +5 -2
- package/src/SVGImage/types.ts +7 -3
- package/src/Screen/Screen.native.tsx +43 -17
- package/src/Screen/Screen.styles.tsx +58 -54
- package/src/Screen/Screen.web.tsx +11 -5
- package/src/Screen/index.ts +5 -2
- package/src/Screen/index.web.ts +5 -2
- package/src/Screen/types.ts +23 -9
- package/src/Select/Select.native.tsx +140 -63
- package/src/Select/Select.styles.tsx +312 -302
- package/src/Select/Select.web.tsx +156 -316
- package/src/Select/index.ts +5 -2
- package/src/Select/index.web.ts +5 -2
- package/src/Select/types.ts +13 -7
- package/src/Skeleton/Skeleton.native.tsx +139 -0
- package/src/Skeleton/Skeleton.styles.tsx +59 -0
- package/src/Skeleton/Skeleton.web.tsx +112 -0
- package/src/Skeleton/index.native.ts +4 -0
- package/src/Skeleton/index.ts +5 -0
- package/src/Skeleton/index.web.ts +5 -0
- package/src/Skeleton/types.ts +75 -0
- package/src/Slider/Slider.native.tsx +248 -0
- package/src/Slider/Slider.styles.tsx +241 -0
- package/src/Slider/Slider.web.tsx +226 -0
- package/src/Slider/index.native.ts +3 -0
- package/src/Slider/index.ts +5 -0
- package/src/Slider/index.web.ts +5 -0
- package/src/Slider/types.ts +31 -0
- package/src/Switch/Switch.native.tsx +131 -0
- package/src/Switch/Switch.styles.tsx +169 -0
- package/src/Switch/Switch.web.tsx +121 -0
- package/src/Switch/index.native.ts +3 -0
- package/src/Switch/index.ts +5 -0
- package/src/Switch/index.web.ts +5 -0
- package/src/Switch/types.ts +21 -0
- package/src/TabBar/TabBar.native.tsx +142 -0
- package/src/TabBar/TabBar.styles.tsx +399 -0
- package/src/TabBar/TabBar.web.tsx +205 -0
- package/src/TabBar/index.native.tsx +3 -0
- package/src/TabBar/index.ts +3 -0
- package/src/TabBar/index.web.tsx +3 -0
- package/src/TabBar/types.ts +26 -0
- package/src/Table/Table.native.tsx +122 -0
- package/src/Table/Table.styles.tsx +283 -0
- package/src/Table/Table.web.tsx +112 -0
- package/src/Table/index.native.tsx +3 -0
- package/src/Table/index.ts +3 -0
- package/src/Table/index.web.tsx +3 -0
- package/src/Table/types.ts +28 -0
- package/src/Text/Text.native.tsx +12 -11
- package/src/Text/Text.styles.tsx +76 -64
- package/src/Text/Text.web.tsx +14 -9
- package/src/Text/index.ts +5 -5
- package/src/Text/index.web.ts +5 -3
- package/src/Text/types.ts +20 -13
- package/src/TextArea/TextArea.native.tsx +134 -0
- package/src/TextArea/TextArea.styles.tsx +175 -0
- package/src/TextArea/TextArea.web.tsx +156 -0
- package/src/TextArea/index.native.ts +3 -0
- package/src/TextArea/index.ts +3 -0
- package/src/TextArea/index.web.ts +3 -0
- package/src/TextArea/types.ts +30 -0
- package/src/Tooltip/Tooltip.native.tsx +165 -0
- package/src/Tooltip/Tooltip.styles.tsx +73 -0
- package/src/Tooltip/Tooltip.web.tsx +87 -0
- package/src/Tooltip/index.native.ts +3 -0
- package/src/Tooltip/index.ts +3 -0
- package/src/Tooltip/types.ts +18 -0
- package/src/Video/Video.native.tsx +105 -0
- package/src/Video/Video.styles.tsx +39 -0
- package/src/Video/Video.web.tsx +115 -0
- package/src/Video/index.native.ts +5 -0
- package/src/Video/index.ts +5 -0
- package/src/Video/types.ts +29 -0
- package/src/View/View.native.tsx +9 -14
- package/src/View/View.styles.tsx +101 -93
- package/src/View/View.web.tsx +16 -17
- package/src/View/index.ts +5 -5
- package/src/View/index.web.ts +5 -3
- package/src/View/types.ts +29 -21
- package/src/examples/AccordionExamples.tsx +126 -0
- package/src/examples/AlertExamples.tsx +280 -0
- package/src/examples/AvatarExamples.tsx +23 -23
- package/src/examples/BadgeExamples.tsx +109 -41
- package/src/examples/BreadcrumbExamples.tsx +312 -0
- package/src/examples/ButtonExamples.tsx +160 -33
- package/src/examples/CardExamples.tsx +40 -40
- package/src/examples/CheckboxExamples.tsx +12 -12
- package/src/examples/ChipExamples.tsx +197 -0
- package/src/examples/DialogExamples.tsx +22 -22
- package/src/examples/DividerExamples.tsx +49 -49
- package/src/examples/IconExamples.tsx +270 -54
- package/src/examples/ImageExamples.tsx +174 -0
- package/src/examples/InputExamples.tsx +75 -17
- package/src/examples/ListExamples.tsx +288 -0
- package/src/examples/MenuExamples.tsx +144 -0
- package/src/examples/PopoverExamples.tsx +69 -73
- package/src/examples/ProgressExamples.tsx +137 -0
- package/src/examples/RadioButtonExamples.tsx +161 -0
- package/src/examples/SVGImageExamples.tsx +19 -17
- package/src/examples/ScreenExamples.tsx +31 -31
- package/src/examples/SelectExamples.tsx +67 -67
- package/src/examples/SkeletonExamples.tsx +206 -0
- package/src/examples/SliderExamples.tsx +200 -0
- package/src/examples/SwitchExamples.tsx +182 -0
- package/src/examples/TabBarExamples.tsx +143 -0
- package/src/examples/TableExamples.tsx +280 -0
- package/src/examples/TextAreaExamples.tsx +173 -0
- package/src/examples/TextExamples.tsx +28 -32
- package/src/examples/ThemeExtensionExamples.tsx +10 -10
- package/src/examples/TooltipExamples.tsx +126 -0
- package/src/examples/VideoExamples.tsx +144 -0
- package/src/examples/ViewExamples.tsx +64 -56
- package/src/examples/index.ts +17 -3
- package/src/hooks/useMergeRefs.ts +16 -0
- package/src/hooks/useSmartPosition.native.ts +169 -0
- package/src/index.native.ts +80 -9
- package/src/index.ts +71 -1
- package/src/internal/BoundedModalContent.native.tsx +58 -0
- package/src/internal/PositionedPortal.tsx +254 -0
- package/src/internal/SafeAreaDebugOverlay.native.tsx +173 -0
- package/src/unistyles.d.ts +6 -0
- package/src/utils/buildSizeVariants.ts +16 -0
- package/src/utils/deepMerge.ts +43 -0
- package/src/utils/positionUtils.native.ts +280 -0
- package/src/utils/styleHelpers.ts +48 -0
- package/LLM-ACCESS-GUIDE.md +0 -143
- package/src/ActivityIndicator/README.md +0 -132
- package/src/Avatar/README.md +0 -139
- package/src/Badge/README.md +0 -170
- package/src/Button/Button.types.ts +0 -12
- package/src/Button/README.md +0 -262
- package/src/Card/README.md +0 -258
- package/src/Checkbox/README.md +0 -102
- package/src/Dialog/README.md +0 -210
- package/src/Divider/README.md +0 -108
- package/src/Icon/README.md +0 -81
- package/src/Input/README.md +0 -100
- package/src/SVGImage/README.md +0 -209
- package/src/Screen/README.md +0 -86
- package/src/Select/README.md +0 -166
- package/src/Text/README.md +0 -94
- package/src/View/README.md +0 -107
- package/src/examples/AllExamples.tsx +0 -88
- package/src/examples/README.md +0 -136
- package/src/examples/ValidationExamples.tsx +0 -95
- package/src/examples/extendedTheme.ts +0 -329
- package/src/theme/breakpoints.ts +0 -8
- package/src/theme/colorResolver.ts +0 -218
- package/src/theme/colors.ts +0 -315
- package/src/theme/defaultThemes.ts +0 -326
- package/src/theme/index.ts +0 -188
- package/src/theme/themeBuilder.ts +0 -602
- package/src/theme/unistyles.d.ts +0 -6
- package/src/theme/variantHelpers.ts +0 -584
- package/src/theme/variants.ts +0 -56
package/src/Icon/README.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Icon Component
|
|
2
|
-
|
|
3
|
-
A versatile icon component with extensive icon library and theming support.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- ✅ Cross-platform (React & React Native)
|
|
8
|
-
- ✅ Extensive icon library
|
|
9
|
-
- ✅ Multiple sizes and color options
|
|
10
|
-
- ✅ Intent-based color schemes
|
|
11
|
-
- ✅ TypeScript support with icon name validation
|
|
12
|
-
|
|
13
|
-
## Basic Usage
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { Icon } from '@idealyst/components';
|
|
17
|
-
|
|
18
|
-
// Basic icon
|
|
19
|
-
<Icon name="heart" />
|
|
20
|
-
|
|
21
|
-
// Sized and colored icon
|
|
22
|
-
<Icon
|
|
23
|
-
name="star"
|
|
24
|
-
size={24}
|
|
25
|
-
color="primary"
|
|
26
|
-
/>
|
|
27
|
-
|
|
28
|
-
// Icon with intent color
|
|
29
|
-
<Icon
|
|
30
|
-
name="check-circle"
|
|
31
|
-
size="large"
|
|
32
|
-
intent="success"
|
|
33
|
-
/>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Props
|
|
37
|
-
|
|
38
|
-
| Prop | Type | Default | Description |
|
|
39
|
-
|------|------|---------|-------------|
|
|
40
|
-
| `name` | `IconName` | **Required** | Name of the icon to display |
|
|
41
|
-
| `size` | `number \| 'small' \| 'medium' \| 'large' \| 'xlarge'` | `'medium'` | Size of the icon |
|
|
42
|
-
| `color` | `string \| ColorVariant` | - | Color of the icon |
|
|
43
|
-
| `intent` | `IntentVariant` | - | Intent-based color scheme |
|
|
44
|
-
| `style` | `ViewStyle` | - | Additional custom styles |
|
|
45
|
-
| `testID` | `string` | - | Test identifier for testing |
|
|
46
|
-
|
|
47
|
-
## Size Options
|
|
48
|
-
|
|
49
|
-
| Size | Value | Use Case |
|
|
50
|
-
|------|-------|----------|
|
|
51
|
-
| `small` | 16px | Inline text, compact UI |
|
|
52
|
-
| `medium` | 20px | Standard buttons, form elements |
|
|
53
|
-
| `large` | 24px | Section headers, prominent actions |
|
|
54
|
-
| `xlarge` | 32px | Feature highlights, empty states |
|
|
55
|
-
|
|
56
|
-
## Common Icons
|
|
57
|
-
|
|
58
|
-
Popular icon names include:
|
|
59
|
-
- `heart`, `star`, `bookmark`
|
|
60
|
-
- `check`, `x`, `plus`, `minus`
|
|
61
|
-
- `chevron-left`, `chevron-right`, `chevron-up`, `chevron-down`
|
|
62
|
-
- `home`, `user`, `settings`, `search`
|
|
63
|
-
- `bell`, `mail`, `calendar`, `file`
|
|
64
|
-
- `edit`, `delete`, `copy`, `share`
|
|
65
|
-
|
|
66
|
-
## Examples
|
|
67
|
-
|
|
68
|
-
### Button Icons
|
|
69
|
-
```tsx
|
|
70
|
-
<Button>
|
|
71
|
-
<Icon name="plus" size="small" color="white" />
|
|
72
|
-
Add Item
|
|
73
|
-
</Button>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Status Icons
|
|
77
|
-
```tsx
|
|
78
|
-
<Icon name="check-circle" intent="success" size="large" />
|
|
79
|
-
<Icon name="x-circle" intent="error" size="large" />
|
|
80
|
-
<Icon name="alert-triangle" intent="warning" size="large" />
|
|
81
|
-
```
|
package/src/Input/README.md
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Input Component
|
|
2
|
-
|
|
3
|
-
A text input component with consistent styling and form integration.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- ✅ Cross-platform (React & React Native)
|
|
8
|
-
- ✅ Multiple sizes and variants
|
|
9
|
-
- ✅ Label and helper text support
|
|
10
|
-
- ✅ Error state handling
|
|
11
|
-
- ✅ Placeholder and validation
|
|
12
|
-
- ✅ TypeScript support
|
|
13
|
-
|
|
14
|
-
## Basic Usage
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Input } from '@idealyst/components';
|
|
18
|
-
|
|
19
|
-
// Basic input
|
|
20
|
-
<Input
|
|
21
|
-
value={value}
|
|
22
|
-
onChangeText={setValue}
|
|
23
|
-
placeholder="Enter text..."
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
// Input with label
|
|
27
|
-
<Input
|
|
28
|
-
label="Email Address"
|
|
29
|
-
value={email}
|
|
30
|
-
onChangeText={setEmail}
|
|
31
|
-
placeholder="you@example.com"
|
|
32
|
-
keyboardType="email-address"
|
|
33
|
-
/>
|
|
34
|
-
|
|
35
|
-
// Input with error
|
|
36
|
-
<Input
|
|
37
|
-
label="Password"
|
|
38
|
-
value={password}
|
|
39
|
-
onChangeText={setPassword}
|
|
40
|
-
error={passwordError}
|
|
41
|
-
secureTextEntry
|
|
42
|
-
/>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Props
|
|
46
|
-
|
|
47
|
-
| Prop | Type | Default | Description |
|
|
48
|
-
|------|------|---------|-------------|
|
|
49
|
-
| `value` | `string` | **Required** | Current input value |
|
|
50
|
-
| `onChangeText` | `(text: string) => void` | **Required** | Called when text changes |
|
|
51
|
-
| `label` | `string` | - | Label text to display above input |
|
|
52
|
-
| `placeholder` | `string` | - | Placeholder text |
|
|
53
|
-
| `error` | `string` | - | Error message to display |
|
|
54
|
-
| `helperText` | `string` | - | Helper text below input |
|
|
55
|
-
| `disabled` | `boolean` | `false` | Whether input is disabled |
|
|
56
|
-
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size of the input |
|
|
57
|
-
| `variant` | `'outlined' \| 'filled'` | `'outlined'` | Visual style variant |
|
|
58
|
-
| `required` | `boolean` | `false` | Whether input is required |
|
|
59
|
-
| `multiline` | `boolean` | `false` | Allow multiple lines |
|
|
60
|
-
| `style` | `ViewStyle` | - | Additional custom styles |
|
|
61
|
-
|
|
62
|
-
## Examples
|
|
63
|
-
|
|
64
|
-
### Form Inputs
|
|
65
|
-
```tsx
|
|
66
|
-
<View style={{ gap: 16 }}>
|
|
67
|
-
<Input
|
|
68
|
-
label="Full Name"
|
|
69
|
-
value={name}
|
|
70
|
-
onChangeText={setName}
|
|
71
|
-
required
|
|
72
|
-
/>
|
|
73
|
-
<Input
|
|
74
|
-
label="Email"
|
|
75
|
-
value={email}
|
|
76
|
-
onChangeText={setEmail}
|
|
77
|
-
keyboardType="email-address"
|
|
78
|
-
error={emailError}
|
|
79
|
-
/>
|
|
80
|
-
<Input
|
|
81
|
-
label="Password"
|
|
82
|
-
value={password}
|
|
83
|
-
onChangeText={setPassword}
|
|
84
|
-
secureTextEntry
|
|
85
|
-
helperText="Must be at least 8 characters"
|
|
86
|
-
/>
|
|
87
|
-
</View>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Multiline Input
|
|
91
|
-
```tsx
|
|
92
|
-
<Input
|
|
93
|
-
label="Description"
|
|
94
|
-
value={description}
|
|
95
|
-
onChangeText={setDescription}
|
|
96
|
-
multiline
|
|
97
|
-
numberOfLines={4}
|
|
98
|
-
placeholder="Enter description..."
|
|
99
|
-
/>
|
|
100
|
-
```
|
package/src/SVGImage/README.md
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# SVGImage Component
|
|
2
|
-
|
|
3
|
-
A cross-platform React/React Native component for rendering SVG images with theme support and consistent styling.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
The SVGImage component provides a unified way to display SVG images across web and React Native platforms. It supports both imported SVG files (as React components) and remote SVG URLs, with built-in theming and styling capabilities.
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
The SVGImage component is part of the `@idealyst/components` package:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
yarn add @idealyst/components
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
For React Native projects, you also need:
|
|
18
|
-
```bash
|
|
19
|
-
yarn add react-native-svg react-native-svg-transformer
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Basic Usage
|
|
23
|
-
|
|
24
|
-
### Imported SVG Files (Recommended)
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
import { SVGImage } from '@idealyst/components';
|
|
28
|
-
import MyLogo from './assets/logo.svg';
|
|
29
|
-
|
|
30
|
-
function MyComponent() {
|
|
31
|
-
return (
|
|
32
|
-
<SVGImage
|
|
33
|
-
source={MyLogo}
|
|
34
|
-
width={100}
|
|
35
|
-
height={50}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Remote SVG URLs
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
import { SVGImage } from '@idealyst/components';
|
|
45
|
-
|
|
46
|
-
function MyComponent() {
|
|
47
|
-
return (
|
|
48
|
-
<SVGImage
|
|
49
|
-
source={{ uri: "https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/react.svg" }}
|
|
50
|
-
width={60}
|
|
51
|
-
height={60}
|
|
52
|
-
color="#61dafb"
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Props
|
|
59
|
-
|
|
60
|
-
| Prop | Type | Default | Description |
|
|
61
|
-
|------|------|---------|-------------|
|
|
62
|
-
| `source` | `string \| { uri: string } \| React.FC<SvgProps>` | **Required** | SVG source - can be imported component, URL string, or URI object |
|
|
63
|
-
| `width` | `number \| string` | `24` | Width of the SVG |
|
|
64
|
-
| `height` | `number \| string` | `24` | Height of the SVG |
|
|
65
|
-
| `size` | `number \| string` | - | Sets both width and height (overrides individual width/height) |
|
|
66
|
-
| `color` | `string` | - | Fill color for the SVG |
|
|
67
|
-
| `intent` | `'primary' \| 'success' \| 'error' \| 'warning' \| 'neutral'` | - | Theme-based color intent |
|
|
68
|
-
| `style` | `ViewStyle` | - | Additional container styles |
|
|
69
|
-
| `testID` | `string` | - | Test identifier |
|
|
70
|
-
|
|
71
|
-
## Theme Integration
|
|
72
|
-
|
|
73
|
-
The SVGImage component integrates with the Idealyst theme system:
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
<SVGImage
|
|
77
|
-
source={MyIcon}
|
|
78
|
-
size={24}
|
|
79
|
-
intent="primary" // Uses theme's primary color
|
|
80
|
-
/>
|
|
81
|
-
|
|
82
|
-
<SVGImage
|
|
83
|
-
source={MyIcon}
|
|
84
|
-
size={24}
|
|
85
|
-
intent="success" // Uses theme's success color
|
|
86
|
-
/>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Platform Setup
|
|
90
|
-
|
|
91
|
-
### React Native Setup
|
|
92
|
-
|
|
93
|
-
1. **Install dependencies:**
|
|
94
|
-
```bash
|
|
95
|
-
yarn add react-native-svg react-native-svg-transformer
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
2. **Configure Metro bundler** (`metro.config.js`):
|
|
99
|
-
```javascript
|
|
100
|
-
const config = {
|
|
101
|
-
transformer: {
|
|
102
|
-
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
103
|
-
},
|
|
104
|
-
resolver: {
|
|
105
|
-
sourceExts: ['js', 'jsx', 'ts', 'tsx', 'svg'],
|
|
106
|
-
assetExts: ['png', 'jpg', 'jpeg', 'gif', 'webp'],
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
3. **Add TypeScript declarations** (`types/svg.d.ts`):
|
|
112
|
-
```typescript
|
|
113
|
-
declare module '*.svg' {
|
|
114
|
-
import React from 'react';
|
|
115
|
-
import { SvgProps } from 'react-native-svg';
|
|
116
|
-
const content: React.FC<SvgProps>;
|
|
117
|
-
export default content;
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
4. **iOS: Install pods:**
|
|
122
|
-
```bash
|
|
123
|
-
cd ios && pod install
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Web Setup
|
|
127
|
-
|
|
128
|
-
For web projects using Vite, SVG imports work out of the box. Add TypeScript declarations if needed:
|
|
129
|
-
|
|
130
|
-
```typescript
|
|
131
|
-
// types/svg.d.ts
|
|
132
|
-
declare module '*.svg' {
|
|
133
|
-
import React from 'react';
|
|
134
|
-
const content: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
135
|
-
export default content;
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Examples
|
|
140
|
-
|
|
141
|
-
### Basic Usage
|
|
142
|
-
```tsx
|
|
143
|
-
import { SVGImage } from '@idealyst/components';
|
|
144
|
-
import LogoIcon from './logo.svg';
|
|
145
|
-
|
|
146
|
-
<SVGImage source={LogoIcon} size={40} />
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### With Theme Colors
|
|
150
|
-
```tsx
|
|
151
|
-
<SVGImage
|
|
152
|
-
source={LogoIcon}
|
|
153
|
-
size={32}
|
|
154
|
-
intent="primary"
|
|
155
|
-
/>
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Remote SVG
|
|
159
|
-
```tsx
|
|
160
|
-
<SVGImage
|
|
161
|
-
source={{ uri: "https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/typescript.svg" }}
|
|
162
|
-
width={48}
|
|
163
|
-
height={48}
|
|
164
|
-
color="#3178c6"
|
|
165
|
-
/>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Custom Styling
|
|
169
|
-
```tsx
|
|
170
|
-
<SVGImage
|
|
171
|
-
source={LogoIcon}
|
|
172
|
-
size={60}
|
|
173
|
-
style={{
|
|
174
|
-
backgroundColor: '#f0f0f0',
|
|
175
|
-
borderRadius: 8,
|
|
176
|
-
padding: 8
|
|
177
|
-
}}
|
|
178
|
-
/>
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Best Practices
|
|
182
|
-
|
|
183
|
-
1. **Prefer imported SVGs over URLs** - Better performance and reliability
|
|
184
|
-
2. **Use theme intents** - Ensures consistency with your design system
|
|
185
|
-
3. **Provide dimensions** - Always specify width/height or size
|
|
186
|
-
4. **Test on both platforms** - Verify SVGs render correctly on web and mobile
|
|
187
|
-
5. **Use CDN URLs** - For remote SVGs, use reliable CDNs like jsDelivr
|
|
188
|
-
|
|
189
|
-
## Limitations
|
|
190
|
-
|
|
191
|
-
- **React Native**: Local SVG files must be imported as components (not file paths)
|
|
192
|
-
- **Remote URLs**: Some servers may block requests from mobile apps (403 errors)
|
|
193
|
-
- **Coloring**: Works best with single-color SVG icons
|
|
194
|
-
|
|
195
|
-
## Troubleshooting
|
|
196
|
-
|
|
197
|
-
### SVGs not showing on React Native
|
|
198
|
-
- Ensure `react-native-svg-transformer` is configured in Metro
|
|
199
|
-
- Check that SVGs are imported as components, not file paths
|
|
200
|
-
- Verify pods are installed on iOS
|
|
201
|
-
|
|
202
|
-
### Remote SVGs failing
|
|
203
|
-
- Use CDN URLs (e.g., jsDelivr, unpkg) instead of direct server URLs
|
|
204
|
-
- Check browser console for CORS or 403 errors
|
|
205
|
-
- Consider hosting SVGs on your own CDN
|
|
206
|
-
|
|
207
|
-
### TypeScript errors
|
|
208
|
-
- Add SVG type declarations to your project
|
|
209
|
-
- Ensure `react-native-svg` types are installed
|
package/src/Screen/README.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Screen Component
|
|
2
|
-
|
|
3
|
-
A full-screen container component designed for app screens with theme-based backgrounds and safe area handling.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- ✅ Cross-platform (React & React Native)
|
|
8
|
-
- ✅ Theme-based background colors
|
|
9
|
-
- ✅ Safe area support for mobile devices
|
|
10
|
-
- ✅ Configurable padding options
|
|
11
|
-
- ✅ Flexible content layout
|
|
12
|
-
- ✅ TypeScript support
|
|
13
|
-
|
|
14
|
-
## Basic Usage
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Screen, View, Text } from '@idealyst/components';
|
|
18
|
-
|
|
19
|
-
// Basic screen
|
|
20
|
-
<Screen>
|
|
21
|
-
<Text>Screen content</Text>
|
|
22
|
-
</Screen>
|
|
23
|
-
|
|
24
|
-
// Screen with background and padding
|
|
25
|
-
<Screen
|
|
26
|
-
background="primary"
|
|
27
|
-
padding="lg"
|
|
28
|
-
safeArea
|
|
29
|
-
>
|
|
30
|
-
<View spacing="md">
|
|
31
|
-
<Text size="large" weight="bold">Welcome</Text>
|
|
32
|
-
<Text>This is a screen with safe area support</Text>
|
|
33
|
-
</View>
|
|
34
|
-
</Screen>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Props
|
|
38
|
-
|
|
39
|
-
| Prop | Type | Default | Description |
|
|
40
|
-
|------|------|---------|-------------|
|
|
41
|
-
| `children` | `ReactNode` | - | Content to display in the screen |
|
|
42
|
-
| `background` | `'primary' \| 'secondary' \| 'tertiary' \| 'inverse'` | `'primary'` | Background color variant |
|
|
43
|
-
| `padding` | `'none' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Screen padding |
|
|
44
|
-
| `safeArea` | `boolean` | `false` | Enable safe area padding |
|
|
45
|
-
| `style` | `ViewStyle` | - | Additional custom styles |
|
|
46
|
-
| `testID` | `string` | - | Test identifier for testing |
|
|
47
|
-
|
|
48
|
-
## Background Variants
|
|
49
|
-
|
|
50
|
-
- `primary` - Main app background (usually light/dark based on theme)
|
|
51
|
-
- `secondary` - Secondary background color
|
|
52
|
-
- `tertiary` - Tertiary background for depth
|
|
53
|
-
- `inverse` - Contrasting background color
|
|
54
|
-
|
|
55
|
-
## Examples
|
|
56
|
-
|
|
57
|
-
### App Screens
|
|
58
|
-
```tsx
|
|
59
|
-
// Home screen
|
|
60
|
-
<Screen background="primary" safeArea>
|
|
61
|
-
<View spacing="lg">
|
|
62
|
-
<Text size="xlarge" weight="bold">Dashboard</Text>
|
|
63
|
-
{/* Screen content */}
|
|
64
|
-
</View>
|
|
65
|
-
</Screen>
|
|
66
|
-
|
|
67
|
-
// Settings screen
|
|
68
|
-
<Screen background="secondary" padding="lg">
|
|
69
|
-
<Text size="large" weight="bold">Settings</Text>
|
|
70
|
-
{/* Settings content */}
|
|
71
|
-
</Screen>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Modal Screens
|
|
75
|
-
```tsx
|
|
76
|
-
<Screen
|
|
77
|
-
background="inverse"
|
|
78
|
-
padding="xl"
|
|
79
|
-
style={{
|
|
80
|
-
borderTopLeftRadius: 16,
|
|
81
|
-
borderTopRightRadius: 16
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<Text size="large" weight="bold">Modal Content</Text>
|
|
85
|
-
</Screen>
|
|
86
|
-
```
|
package/src/Select/README.md
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Select Component
|
|
2
|
-
|
|
3
|
-
A cross-platform Select component for choosing from a list of options.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Cross-platform**: Works on both web and React Native
|
|
8
|
-
- **iOS ActionSheet support**: Native presentation mode on iOS
|
|
9
|
-
- **Searchable**: Optional search/filter functionality
|
|
10
|
-
- **Keyboard navigation**: Full keyboard support on web
|
|
11
|
-
- **Customizable styling**: Variants, intents, and sizes
|
|
12
|
-
- **Accessibility**: Proper ARIA attributes and screen reader support
|
|
13
|
-
|
|
14
|
-
## Basic Usage
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { Select } from '@idealyst/components';
|
|
18
|
-
|
|
19
|
-
const options = [
|
|
20
|
-
{ value: 'apple', label: 'Apple' },
|
|
21
|
-
{ value: 'banana', label: 'Banana' },
|
|
22
|
-
{ value: 'orange', label: 'Orange' },
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
function MyComponent() {
|
|
26
|
-
const [value, setValue] = useState('');
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Select
|
|
30
|
-
options={options}
|
|
31
|
-
value={value}
|
|
32
|
-
onValueChange={setValue}
|
|
33
|
-
placeholder="Choose a fruit"
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## With Icons
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
const options = [
|
|
43
|
-
{
|
|
44
|
-
value: 'user',
|
|
45
|
-
label: 'User Profile',
|
|
46
|
-
icon: <Icon name="user" />
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
value: 'settings',
|
|
50
|
-
label: 'Settings',
|
|
51
|
-
icon: <Icon name="settings" />
|
|
52
|
-
},
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
<Select
|
|
56
|
-
options={options}
|
|
57
|
-
value={value}
|
|
58
|
-
onValueChange={setValue}
|
|
59
|
-
placeholder="Choose an option"
|
|
60
|
-
/>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Searchable Select
|
|
64
|
-
|
|
65
|
-
```tsx
|
|
66
|
-
<Select
|
|
67
|
-
options={largeOptionsList}
|
|
68
|
-
value={value}
|
|
69
|
-
onValueChange={setValue}
|
|
70
|
-
searchable
|
|
71
|
-
placeholder="Search and select..."
|
|
72
|
-
/>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## iOS ActionSheet (Native only)
|
|
76
|
-
|
|
77
|
-
```tsx
|
|
78
|
-
<Select
|
|
79
|
-
options={options}
|
|
80
|
-
value={value}
|
|
81
|
-
onValueChange={setValue}
|
|
82
|
-
presentationMode="actionSheet" // iOS only
|
|
83
|
-
label="Choose an option"
|
|
84
|
-
/>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Form Integration
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
<View spacing="md">
|
|
91
|
-
<Select
|
|
92
|
-
label="Country"
|
|
93
|
-
options={countryOptions}
|
|
94
|
-
value={country}
|
|
95
|
-
onValueChange={setCountry}
|
|
96
|
-
error={!!errors.country}
|
|
97
|
-
helperText={errors.country || "Select your country"}
|
|
98
|
-
variant="outlined"
|
|
99
|
-
intent="primary"
|
|
100
|
-
/>
|
|
101
|
-
</View>
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## API Reference
|
|
105
|
-
|
|
106
|
-
### SelectProps
|
|
107
|
-
|
|
108
|
-
| Prop | Type | Default | Description |
|
|
109
|
-
|------|------|---------|-------------|
|
|
110
|
-
| `options` | `SelectOption[]` | - | Array of options to display |
|
|
111
|
-
| `value` | `string` | - | Currently selected value |
|
|
112
|
-
| `onValueChange` | `(value: string) => void` | - | Called when selection changes |
|
|
113
|
-
| `placeholder` | `string` | `"Select an option"` | Placeholder text |
|
|
114
|
-
| `disabled` | `boolean` | `false` | Whether the select is disabled |
|
|
115
|
-
| `error` | `boolean` | `false` | Whether to show error state |
|
|
116
|
-
| `helperText` | `string` | - | Helper text below select |
|
|
117
|
-
| `label` | `string` | - | Label text above select |
|
|
118
|
-
| `variant` | `'outlined' \| 'filled'` | `'outlined'` | Visual variant |
|
|
119
|
-
| `intent` | `IntentVariant` | `'neutral'` | Color scheme |
|
|
120
|
-
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Component size |
|
|
121
|
-
| `searchable` | `boolean` | `false` | Enable search functionality |
|
|
122
|
-
| `filterOption` | `(option, searchTerm) => boolean` | - | Custom filter function |
|
|
123
|
-
| `presentationMode` | `'dropdown' \| 'actionSheet'` | `'dropdown'` | Native presentation mode (iOS) |
|
|
124
|
-
| `maxHeight` | `number` | `240` | Max height for dropdown |
|
|
125
|
-
|
|
126
|
-
### SelectOption
|
|
127
|
-
|
|
128
|
-
| Prop | Type | Description |
|
|
129
|
-
|------|------|-------------|
|
|
130
|
-
| `value` | `string` | Unique value for the option |
|
|
131
|
-
| `label` | `string` | Display label |
|
|
132
|
-
| `disabled` | `boolean` | Whether option is disabled |
|
|
133
|
-
| `icon` | `ReactNode` | Optional icon or custom content |
|
|
134
|
-
|
|
135
|
-
## Platform Differences
|
|
136
|
-
|
|
137
|
-
### Web
|
|
138
|
-
- Uses a custom dropdown overlay
|
|
139
|
-
- Full keyboard navigation support
|
|
140
|
-
- Hover effects and focus states
|
|
141
|
-
- Searchable with text input
|
|
142
|
-
|
|
143
|
-
### React Native
|
|
144
|
-
- Modal-based dropdown by default
|
|
145
|
-
- iOS ActionSheet support via `presentationMode="actionSheet"`
|
|
146
|
-
- Touch-optimized interactions
|
|
147
|
-
- Native keyboard handling
|
|
148
|
-
|
|
149
|
-
## Styling
|
|
150
|
-
|
|
151
|
-
The Select component uses Unistyles v3 for cross-platform styling with support for:
|
|
152
|
-
|
|
153
|
-
- Variants (`outlined`, `filled`)
|
|
154
|
-
- Intents (`primary`, `neutral`, `success`, `error`, `warning`, `info`)
|
|
155
|
-
- Sizes (`small`, `medium`, `large`)
|
|
156
|
-
- Error states
|
|
157
|
-
- Disabled states
|
|
158
|
-
- Focus states
|
|
159
|
-
|
|
160
|
-
## Accessibility
|
|
161
|
-
|
|
162
|
-
- Proper ARIA roles and attributes
|
|
163
|
-
- Keyboard navigation (web)
|
|
164
|
-
- Screen reader support
|
|
165
|
-
- Focus management
|
|
166
|
-
- Touch target sizing (44px minimum)
|