@idealyst/components 1.2.29 → 1.2.30

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 (131) hide show
  1. package/README.md +3 -3
  2. package/package.json +3 -3
  3. package/plugin/__tests__/web.test.ts +2 -2
  4. package/src/Accordion/Accordion.native.tsx +3 -2
  5. package/src/ActivityIndicator/ActivityIndicator.native.tsx +3 -2
  6. package/src/ActivityIndicator/ActivityIndicator.styles.tsx +25 -26
  7. package/src/ActivityIndicator/ActivityIndicator.web.tsx +2 -1
  8. package/src/Alert/Alert.native.tsx +20 -10
  9. package/src/Alert/Alert.styles.tsx +148 -86
  10. package/src/Alert/Alert.web.tsx +10 -5
  11. package/src/Alert/types.ts +53 -3
  12. package/src/Avatar/Avatar.native.tsx +3 -2
  13. package/src/Avatar/Avatar.web.tsx +2 -1
  14. package/src/Avatar/types.ts +1 -1
  15. package/src/Badge/Badge.native.tsx +18 -6
  16. package/src/Badge/Badge.styles.tsx +22 -5
  17. package/src/Badge/Badge.web.tsx +12 -4
  18. package/src/Badge/types.ts +14 -2
  19. package/src/Breadcrumb/Breadcrumb.native.tsx +3 -2
  20. package/src/Button/Button.native.tsx +16 -6
  21. package/src/Button/Button.styles.tsx +2 -2
  22. package/src/Button/Button.web.tsx +19 -15
  23. package/src/Button/types.ts +6 -10
  24. package/src/Card/Card.native.tsx +27 -3
  25. package/src/Card/Card.web.tsx +30 -4
  26. package/src/Card/types.ts +15 -0
  27. package/src/Checkbox/Checkbox.native.tsx +5 -4
  28. package/src/Checkbox/Checkbox.styles.tsx +62 -52
  29. package/src/Checkbox/Checkbox.web.tsx +4 -3
  30. package/src/Checkbox/types.ts +1 -1
  31. package/src/Chip/Chip.native.tsx +30 -7
  32. package/src/Chip/Chip.styles.tsx +142 -124
  33. package/src/Chip/Chip.web.tsx +28 -5
  34. package/src/Chip/types.ts +15 -0
  35. package/src/Dialog/Dialog.native.tsx +6 -6
  36. package/src/Dialog/Dialog.web.tsx +5 -5
  37. package/src/Dialog/types.ts +2 -2
  38. package/src/Divider/Divider.native.tsx +20 -17
  39. package/src/Divider/Divider.styles.tsx +51 -29
  40. package/src/Divider/Divider.web.tsx +5 -4
  41. package/src/Divider/types.ts +3 -3
  42. package/src/Icon/Icon.native.tsx +3 -2
  43. package/src/Icon/Icon.web.tsx +2 -1
  44. package/src/Icon/IconSvg/IconSvg.native.tsx +3 -2
  45. package/src/Image/Image.native.tsx +3 -2
  46. package/src/Input/Input.native.tsx +42 -290
  47. package/src/Input/Input.styles.tsx +1 -1
  48. package/src/Input/Input.web.tsx +37 -288
  49. package/src/Input/index.native.ts +9 -2
  50. package/src/Input/index.ts +8 -1
  51. package/src/Input/index.web.ts +8 -1
  52. package/src/Input/types.ts +1 -1
  53. package/src/List/List.native.tsx +3 -2
  54. package/src/List/ListItem.native.tsx +3 -2
  55. package/src/List/ListSection.native.tsx +3 -2
  56. package/src/Menu/Menu.native.tsx +2 -1
  57. package/src/Menu/Menu.styles.tsx +79 -29
  58. package/src/Menu/Menu.web.tsx +2 -1
  59. package/src/Menu/MenuItem.native.tsx +4 -3
  60. package/src/Menu/MenuItem.styles.tsx +81 -32
  61. package/src/Menu/MenuItem.web.tsx +2 -1
  62. package/src/Menu/docs.ts +1 -1
  63. package/src/Popover/Popover.native.tsx +2 -1
  64. package/src/Popover/Popover.web.tsx +2 -1
  65. package/src/Popover/types.ts +15 -4
  66. package/src/Pressable/Pressable.native.tsx +3 -2
  67. package/src/Pressable/Pressable.web.tsx +3 -5
  68. package/src/Progress/Progress.native.tsx +5 -4
  69. package/src/Progress/Progress.web.tsx +3 -3
  70. package/src/Progress/types.ts +3 -3
  71. package/src/RadioButton/RadioButton.native.tsx +4 -3
  72. package/src/RadioButton/RadioButton.styles.tsx +53 -33
  73. package/src/RadioButton/RadioGroup.native.tsx +3 -2
  74. package/src/SVGImage/SVGImage.native.tsx +5 -4
  75. package/src/SVGImage/SVGImage.styles.tsx +44 -10
  76. package/src/SVGImage/SVGImage.web.tsx +2 -1
  77. package/src/Screen/Screen.native.tsx +2 -1
  78. package/src/Screen/Screen.web.tsx +2 -1
  79. package/src/Select/Select.native.tsx +6 -5
  80. package/src/Select/Select.styles.tsx +1 -1
  81. package/src/Select/Select.web.tsx +4 -3
  82. package/src/Select/types.ts +1 -1
  83. package/src/Skeleton/Skeleton.native.tsx +2 -1
  84. package/src/Slider/Slider.native.tsx +9 -8
  85. package/src/Slider/Slider.web.tsx +10 -9
  86. package/src/Slider/types.ts +9 -2
  87. package/src/Switch/Switch.native.tsx +7 -6
  88. package/src/Switch/Switch.styles.tsx +35 -17
  89. package/src/Switch/Switch.web.tsx +8 -7
  90. package/src/Switch/types.ts +44 -4
  91. package/src/TabBar/TabBar.native.tsx +3 -2
  92. package/src/Text/Text.native.tsx +3 -2
  93. package/src/Text/Text.web.tsx +2 -1
  94. package/src/TextArea/TextArea.native.tsx +3 -2
  95. package/src/TextArea/TextArea.styles.tsx +2 -2
  96. package/src/TextArea/TextArea.web.tsx +2 -1
  97. package/src/TextInput/TextInput.native.tsx +300 -0
  98. package/src/TextInput/TextInput.styles.tsx +207 -0
  99. package/src/TextInput/TextInput.web.tsx +301 -0
  100. package/src/TextInput/index.native.ts +3 -0
  101. package/src/TextInput/index.ts +5 -0
  102. package/src/TextInput/index.web.ts +5 -0
  103. package/src/TextInput/types.ts +163 -0
  104. package/src/Tooltip/Tooltip.native.tsx +3 -2
  105. package/src/Video/Video.native.tsx +4 -3
  106. package/src/View/View.native.tsx +2 -1
  107. package/src/View/View.web.tsx +2 -1
  108. package/src/examples/AlertExamples.tsx +5 -5
  109. package/src/examples/ButtonExamples.tsx +12 -12
  110. package/src/examples/CardExamples.tsx +1 -1
  111. package/src/examples/CheckboxExamples.tsx +2 -2
  112. package/src/examples/ChipExamples.tsx +6 -6
  113. package/src/examples/DialogExamples.tsx +1 -1
  114. package/src/examples/DividerExamples.tsx +1 -1
  115. package/src/examples/InputExamples.tsx +1 -1
  116. package/src/examples/LinkExamples.tsx +1 -1
  117. package/src/examples/ListExamples.tsx +1 -1
  118. package/src/examples/MenuExamples.tsx +2 -2
  119. package/src/examples/ProgressExamples.tsx +1 -1
  120. package/src/examples/RadioButtonExamples.tsx +5 -5
  121. package/src/examples/SVGImageExamples.tsx +1 -1
  122. package/src/examples/SelectExamples.tsx +1 -1
  123. package/src/examples/SliderExamples.tsx +5 -5
  124. package/src/examples/SwitchExamples.tsx +2 -2
  125. package/src/examples/TableExamples.tsx +1 -1
  126. package/src/examples/TooltipExamples.tsx +2 -2
  127. package/src/extensions/index.ts +1 -0
  128. package/src/extensions/types.ts +10 -3
  129. package/src/index.ts +23 -2
  130. package/src/utils/index.ts +12 -0
  131. package/src/utils/refTypes.ts +50 -0
@@ -3,6 +3,7 @@ import { View } from 'react-native';
3
3
  import { videoStyles } from './Video.styles';
4
4
  import type { VideoProps } from './types';
5
5
  import { getNativeAccessibilityProps } from '../utils/accessibility';
6
+ import type { IdealystElement } from '../utils/refTypes';
6
7
 
7
8
  // Import react-native-video - it's a peer dependency
8
9
  let RNVideo: any;
@@ -14,7 +15,7 @@ try {
14
15
  console.warn('react-native-video not installed. Video component will not work on native.');
15
16
  }
16
17
 
17
- const Video = React.forwardRef<View, VideoProps>(({
18
+ const Video = React.forwardRef<IdealystElement, VideoProps>(({
18
19
  source,
19
20
  poster,
20
21
  width: _width,
@@ -52,7 +53,7 @@ const Video = React.forwardRef<View, VideoProps>(({
52
53
 
53
54
  if (!RNVideo) {
54
55
  return (
55
- <View ref={ref} nativeID={id} style={[videoStyles.container, { aspectRatio, borderRadius }, style]} testID={testID} {...nativeA11yProps}>
56
+ <View ref={ref as any} nativeID={id} style={[videoStyles.container, { aspectRatio, borderRadius }, style]} testID={testID} {...nativeA11yProps}>
56
57
  <View style={videoStyles.fallback}>
57
58
  {/* Fallback when react-native-video is not installed */}
58
59
  </View>
@@ -95,7 +96,7 @@ const Video = React.forwardRef<View, VideoProps>(({
95
96
  };
96
97
 
97
98
  return (
98
- <View ref={ref} nativeID={id} style={containerStyle} testID={testID} {...nativeA11yProps}>
99
+ <View ref={ref as any} nativeID={id} style={containerStyle} testID={testID} {...nativeA11yProps}>
99
100
  <RNVideo
100
101
  source={videoSource}
101
102
  poster={poster}
@@ -3,6 +3,7 @@ import { View as RNView, ScrollView as RNScrollView, ViewStyle, StyleSheet } fro
3
3
  import { useResponsiveStyle, ResponsiveStyle } from '@idealyst/theme';
4
4
  import { ViewProps } from './types';
5
5
  import { viewStyles } from './View.styles';
6
+ import type { IdealystElement } from '../utils/refTypes';
6
7
 
7
8
  /**
8
9
  * Check if a style object contains any responsive values
@@ -22,7 +23,7 @@ function hasResponsiveValues(style: any): style is ResponsiveStyle {
22
23
  return false;
23
24
  }
24
25
 
25
- const View = forwardRef<RNView | RNScrollView, ViewProps>(({
26
+ const View = forwardRef<IdealystElement, ViewProps>(({
26
27
  children,
27
28
  background = 'transparent',
28
29
  radius = 'none',
@@ -3,12 +3,13 @@ import { getWebProps } from 'react-native-unistyles/web';
3
3
  import { ViewProps } from './types';
4
4
  import { viewStyles } from './View.styles';
5
5
  import useMergeRefs from '../hooks/useMergeRefs';
6
+ import type { IdealystElement } from '../utils/refTypes';
6
7
 
7
8
  /**
8
9
  * Fundamental layout container with background, border, and spacing options.
9
10
  * The base building block for composing UI layouts.
10
11
  */
11
- const View = forwardRef<HTMLDivElement, ViewProps>(({
12
+ const View = forwardRef<IdealystElement, ViewProps>(({
12
13
  children,
13
14
  background = 'transparent',
14
15
  radius = 'none',
@@ -26,7 +26,7 @@ export const AlertExamples = () => {
26
26
  />
27
27
 
28
28
  <Alert
29
- intent="error"
29
+ intent="danger"
30
30
  title="Error"
31
31
  message="There was an error processing your request."
32
32
  />
@@ -139,7 +139,7 @@ export const AlertExamples = () => {
139
139
  {errorVisible && (
140
140
  <Alert
141
141
  type="outlined"
142
- intent="error"
142
+ intent="danger"
143
143
  title="Dismissible Error"
144
144
  message="This outlined alert can also be dismissed."
145
145
  dismissible
@@ -234,7 +234,7 @@ export const AlertExamples = () => {
234
234
  <Text typography="h5">All Intent Colors (Soft Variant)</Text>
235
235
 
236
236
  <View gap="sm">
237
- {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
237
+ {(['primary', 'success', 'danger', 'warning', 'info', 'neutral'] as const).map((intent) => (
238
238
  <Alert
239
239
  key={intent}
240
240
  type="soft"
@@ -249,7 +249,7 @@ export const AlertExamples = () => {
249
249
  <Text typography="h5">All Intent Colors (Outlined Variant)</Text>
250
250
 
251
251
  <View gap="sm">
252
- {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
252
+ {(['primary', 'success', 'danger', 'warning', 'info', 'neutral'] as const).map((intent) => (
253
253
  <Alert
254
254
  key={intent}
255
255
  type="outlined"
@@ -264,7 +264,7 @@ export const AlertExamples = () => {
264
264
  <Text typography="h5">All Intent Colors (Filled Variant)</Text>
265
265
 
266
266
  <View gap="sm">
267
- {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
267
+ {(['primary', 'success', 'danger', 'warning', 'info', 'neutral'] as const).map((intent) => (
268
268
  <Alert
269
269
  key={intent}
270
270
  type="filled"
@@ -117,12 +117,12 @@ export const ButtonExamples = () => {
117
117
  >
118
118
  Success
119
119
  </Button>
120
- <Button
121
- intent="error"
120
+ <Button
121
+ intent="danger"
122
122
  type="contained"
123
- onPress={() => handlePress('error')}
123
+ onPress={() => handlePress('danger')}
124
124
  >
125
- Error
125
+ Danger
126
126
  </Button>
127
127
  <Button
128
128
  intent="warning"
@@ -187,7 +187,7 @@ export const ButtonExamples = () => {
187
187
  </Button>
188
188
  <Button
189
189
  type="contained"
190
- intent="error"
190
+ intent="danger"
191
191
  leftIcon="delete"
192
192
  rightIcon="alert"
193
193
  onPress={() => handlePress('icon-both')}
@@ -246,7 +246,7 @@ export const ButtonExamples = () => {
246
246
  />
247
247
  <Button
248
248
  type="text"
249
- intent="error"
249
+ intent="danger"
250
250
  leftIcon="close-circle"
251
251
  onPress={() => handlePress('icon-only-text')}
252
252
  />
@@ -283,11 +283,11 @@ export const ButtonExamples = () => {
283
283
  </Button>
284
284
  <Button
285
285
  type="contained"
286
- intent="error"
286
+ intent="danger"
287
287
  leftIcon="alert-circle"
288
- onPress={() => handlePress('error')}
288
+ onPress={() => handlePress('danger')}
289
289
  >
290
- Error
290
+ Danger
291
291
  </Button>
292
292
  </View>
293
293
  </View>
@@ -344,7 +344,7 @@ export const ButtonExamples = () => {
344
344
  </Button>
345
345
  <Button
346
346
  type="contained"
347
- intent="error"
347
+ intent="danger"
348
348
  gradient="darken"
349
349
  onPress={() => handlePress('gradient-error')}
350
350
  >
@@ -394,7 +394,7 @@ export const ButtonExamples = () => {
394
394
  </Button>
395
395
  <Button
396
396
  type="contained"
397
- intent="error"
397
+ intent="danger"
398
398
  gradient="darken"
399
399
  leftIcon="delete"
400
400
  onPress={() => handlePress('gradient-icon-delete')}
@@ -457,7 +457,7 @@ export const ButtonExamples = () => {
457
457
  </Button>
458
458
  <Button
459
459
  type="contained"
460
- intent="error"
460
+ intent="danger"
461
461
  loading
462
462
  onPress={() => handlePress('loading-error')}
463
463
  >
@@ -56,7 +56,7 @@ export const CardExamples = () => {
56
56
  <Text>Success Card</Text>
57
57
  </Card>
58
58
 
59
- <Card intent="error" padding="md" type="outlined">
59
+ <Card intent="danger" padding="md" type="outlined">
60
60
  <Text>Error Card</Text>
61
61
  </Card>
62
62
 
@@ -85,7 +85,7 @@ export const CheckboxExamples = () => {
85
85
  label="Success checkbox"
86
86
  />
87
87
  <Checkbox
88
- intent="error"
88
+ intent="danger"
89
89
  checked={errorChecked}
90
90
  onCheckedChange={setErrorChecked}
91
91
  label="Error checkbox"
@@ -200,7 +200,7 @@ export const CheckboxExamples = () => {
200
200
  onCheckedChange={() => {}}
201
201
  label="Checkbox with error"
202
202
  error="This field is required"
203
- intent="error"
203
+ intent="danger"
204
204
  />
205
205
  <Checkbox
206
206
  checked={false}
@@ -31,7 +31,7 @@ export const ChipExamples = () => {
31
31
  <Chip label="Default" />
32
32
  <Chip label="Primary" intent="primary" />
33
33
  <Chip label="Success" intent="success" />
34
- <Chip label="Error" intent="error" />
34
+ <Chip label="Error" intent="danger" />
35
35
  <Chip label="Warning" intent="warning" />
36
36
  <Chip label="Neutral" intent="neutral" />
37
37
  </View>
@@ -43,21 +43,21 @@ export const ChipExamples = () => {
43
43
  <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
44
44
  <Chip label="Filled Primary" type="filled" intent="primary" />
45
45
  <Chip label="Filled Success" type="filled" intent="success" />
46
- <Chip label="Filled Error" type="filled" intent="error" />
46
+ <Chip label="Filled Error" type="filled" intent="danger" />
47
47
  </View>
48
48
 
49
49
  <Text typography="subtitle1">Outlined</Text>
50
50
  <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
51
51
  <Chip label="Outlined Primary" type="outlined" intent="primary" />
52
52
  <Chip label="Outlined Success" type="outlined" intent="success" />
53
- <Chip label="Outlined Error" type="outlined" intent="error" />
53
+ <Chip label="Outlined Error" type="outlined" intent="danger" />
54
54
  </View>
55
55
 
56
56
  <Text typography="subtitle1">Soft</Text>
57
57
  <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
58
58
  <Chip label="Soft Primary" type="soft" intent="primary" />
59
59
  <Chip label="Soft Success" type="soft" intent="success" />
60
- <Chip label="Soft Error" type="soft" intent="error" />
60
+ <Chip label="Soft Error" type="soft" intent="danger" />
61
61
  </View>
62
62
 
63
63
  <Divider spacing="md" />
@@ -74,7 +74,7 @@ export const ChipExamples = () => {
74
74
 
75
75
  <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
76
76
  <Chip label="Star" icon="star" />
77
- <Chip label="Heart" icon="heart" intent="error" />
77
+ <Chip label="Heart" icon="heart" intent="danger" />
78
78
  <Chip label="Check" icon="check" intent="success" />
79
79
  <Chip label="Info" icon="information" type="outlined" />
80
80
  </View>
@@ -188,7 +188,7 @@ export const ChipExamples = () => {
188
188
  <Chip label="Design" type="soft" intent="primary" size="sm" />
189
189
  <Chip label="Development" type="soft" intent="success" size="sm" />
190
190
  <Chip label="Marketing" type="soft" intent="warning" size="sm" />
191
- <Chip label="Sales" type="soft" intent="error" size="sm" />
191
+ <Chip label="Sales" type="soft" intent="danger" size="sm" />
192
192
  <Chip label="Support" type="soft" intent="neutral" size="sm" />
193
193
  </View>
194
194
  </View>
@@ -88,7 +88,7 @@ export const DialogExamples = () => {
88
88
  </Button>
89
89
  <Button
90
90
  type="contained"
91
- intent="error"
91
+ intent="danger"
92
92
  onPress={() => setConfirmationOpen(false)}
93
93
  >
94
94
  Delete
@@ -104,7 +104,7 @@ export const DividerExamples = () => {
104
104
 
105
105
  <Card type="outlined" padding="md">
106
106
  <Text>Error divider</Text>
107
- <Divider intent="error" />
107
+ <Divider intent="danger" />
108
108
  <Text>Content below</Text>
109
109
  </Card>
110
110
 
@@ -221,7 +221,7 @@ export const InputExamples = () => {
221
221
  <Text
222
222
  id="password-helper"
223
223
  typography="caption"
224
- color={passwordValue.length > 0 && passwordValue.length < 8 ? 'error' : 'muted'}
224
+ color={passwordValue.length > 0 && passwordValue.length < 8 ? 'danger' : 'muted'}
225
225
  >
226
226
  {passwordValue.length > 0 && passwordValue.length < 8
227
227
  ? 'Password must be at least 8 characters'
@@ -96,7 +96,7 @@ export const LinkExamples = () => {
96
96
  </Link>
97
97
  <Link to="/favorites" onPress={() => handlePress('favorites')}>
98
98
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
99
- <Icon name="heart" size={20} intent="error" />
99
+ <Icon name="heart" size={20} intent="danger" />
100
100
  <Text color="primary">Favorites</Text>
101
101
  </View>
102
102
  </Link>
@@ -155,7 +155,7 @@ export const ListExamples: React.FC = () => {
155
155
  label="Error Color"
156
156
  leading="alert-circle"
157
157
  trailing="chevron-right"
158
- iconColor="error"
158
+ iconColor="danger"
159
159
  onPress={() => {}}
160
160
  />
161
161
  <ListItem
@@ -21,13 +21,13 @@ export const MenuExamples: React.FC = () => {
21
21
  { id: 'edit', label: 'Edit', icon: 'pencil', onClick: () => setSelectedAction('Edit') },
22
22
  { id: 'copy', label: 'Copy', icon: 'content-copy', onClick: () => setSelectedAction('Copy') },
23
23
  { id: 'share', label: 'Share', icon: 'share-variant', onClick: () => setSelectedAction('Share'), intent: 'primary' },
24
- { id: 'delete', label: 'Delete', icon: 'delete', onClick: () => setSelectedAction('Delete'), intent: 'error' },
24
+ { id: 'delete', label: 'Delete', icon: 'delete', onClick: () => setSelectedAction('Delete'), intent: 'danger' },
25
25
  ];
26
26
 
27
27
  const intentItems: MenuItem[] = [
28
28
  { id: 'save', label: 'Save', intent: 'success', onClick: () => setSelectedAction('Save') },
29
29
  { id: 'cancel', label: 'Cancel', intent: 'neutral', onClick: () => setSelectedAction('Cancel') },
30
- { id: 'delete', label: 'Delete', intent: 'error', onClick: () => setSelectedAction('Delete') },
30
+ { id: 'delete', label: 'Delete', intent: 'danger', onClick: () => setSelectedAction('Delete') },
31
31
  { id: 'warn', label: 'Warning Action', intent: 'warning', onClick: () => setSelectedAction('Warning') },
32
32
  ];
33
33
 
@@ -43,7 +43,7 @@ export const ProgressExamples: React.FC = () => {
43
43
  <Progress value={70} intent="primary" />
44
44
  <Progress value={70} intent="success" />
45
45
  <Progress value={70} intent="warning" />
46
- <Progress value={70} intent="error" />
46
+ <Progress value={70} intent="danger" />
47
47
  <Progress value={70} intent="neutral" />
48
48
  </View>
49
49
  </View>
@@ -101,11 +101,11 @@ export const RadioButtonExamples: React.FC = () => {
101
101
  onPress={() => setSelectedIntent('success')}
102
102
  />
103
103
  <RadioButton
104
- value="error"
105
- label="Error"
106
- intent="error"
107
- checked={selectedIntent === 'error'}
108
- onPress={() => setSelectedIntent('error')}
104
+ value="danger"
105
+ label="Danger"
106
+ intent="danger"
107
+ checked={selectedIntent === 'danger'}
108
+ onPress={() => setSelectedIntent('danger')}
109
109
  />
110
110
  <RadioButton
111
111
  value="warning"
@@ -63,7 +63,7 @@ export const SVGImageExamples = () => {
63
63
  source={testLogo}
64
64
  width={102}
65
65
  height={30}
66
- intent="error"
66
+ intent="danger"
67
67
  />
68
68
  <SVGImage
69
69
  source={testLogo}
@@ -329,7 +329,7 @@ export const SelectExamples = () => {
329
329
  value={errorSelect}
330
330
  onValueChange={setErrorSelect}
331
331
  placeholder="Error intent"
332
- intent="error"
332
+ intent="danger"
333
333
  type="outlined"
334
334
  />
335
335
  </View>
@@ -16,7 +16,7 @@ export const SliderExamples: React.FC = () => {
16
16
  <Text typography="h5">Basic Slider</Text>
17
17
  <Slider
18
18
  value={basicValue}
19
- onValueChange={setBasicValue}
19
+ onChange={setBasicValue}
20
20
  showValue
21
21
  />
22
22
  <Text typography="caption" color="secondary">Value: {basicValue}</Text>
@@ -53,7 +53,7 @@ export const SliderExamples: React.FC = () => {
53
53
  </View>
54
54
  <View gap="xs">
55
55
  <Text typography="body2">Error</Text>
56
- <Slider defaultValue={60} intent="error" />
56
+ <Slider defaultValue={60} intent="danger" />
57
57
  </View>
58
58
  <View gap="xs">
59
59
  <Text typography="body2">Warning</Text>
@@ -122,7 +122,7 @@ export const SliderExamples: React.FC = () => {
122
122
  <Text typography="h5">Volume Control</Text>
123
123
  <Slider
124
124
  value={volumeValue}
125
- onValueChange={setVolumeValue}
125
+ onChange={setVolumeValue}
126
126
  min={0}
127
127
  max={100}
128
128
  showValue
@@ -163,7 +163,7 @@ export const SliderExamples: React.FC = () => {
163
163
  min={10}
164
164
  max={30}
165
165
  icon="thermometer"
166
- intent="error"
166
+ intent="danger"
167
167
  showMinMax
168
168
  />
169
169
  </View>
@@ -174,7 +174,7 @@ export const SliderExamples: React.FC = () => {
174
174
  <Text typography="h5">Temperature Control</Text>
175
175
  <Slider
176
176
  value={temperatureValue}
177
- onValueChange={setTemperatureValue}
177
+ onChange={setTemperatureValue}
178
178
  min={10}
179
179
  max={30}
180
180
  step={0.5}
@@ -94,7 +94,7 @@ export const SwitchExamples: React.FC = () => {
94
94
  <Switch
95
95
  checked={intentChecked.error}
96
96
  onCheckedChange={(checked) => setIntentChecked(prev => ({ ...prev, error: checked }))}
97
- intent="error"
97
+ intent="danger"
98
98
  label="Error"
99
99
  />
100
100
  <Switch
@@ -152,7 +152,7 @@ export const SwitchExamples: React.FC = () => {
152
152
  onCheckedChange={(checked) => setIconChecked(prev => ({ ...prev, wifi: checked }))}
153
153
  enabledIcon="wifi"
154
154
  disabledIcon="wifi-off"
155
- intent="error"
155
+ intent="danger"
156
156
  label="WiFi Connection"
157
157
  size="sm"
158
158
  />
@@ -126,7 +126,7 @@ export const TableExamples: React.FC = () => {
126
126
  <Button size="sm" type="outlined" onPress={() => console.log('Edit', user.id)}>
127
127
  Edit
128
128
  </Button>
129
- <Button size="sm" type="outlined" intent="error" onPress={() => console.log('Delete', user.id)}>
129
+ <Button size="sm" type="outlined" intent="danger" onPress={() => console.log('Delete', user.id)}>
130
130
  Delete
131
131
  </Button>
132
132
  </View>
@@ -62,8 +62,8 @@ export const TooltipExamples: React.FC = () => {
62
62
  <Tooltip content="Warning tooltip" intent="warning">
63
63
  <Button type="contained" intent="warning">Warning</Button>
64
64
  </Tooltip>
65
- <Tooltip content="Error tooltip" intent="error">
66
- <Button type="contained" intent="error">Error</Button>
65
+ <Tooltip content="Error tooltip" intent="danger">
66
+ <Button type="contained" intent="danger">Error</Button>
67
67
  </Tooltip>
68
68
  <Tooltip content="Neutral tooltip" intent="neutral">
69
69
  <Button type="contained" intent="neutral">Neutral</Button>
@@ -61,6 +61,7 @@ export type {
61
61
  // Individual component styleable elements
62
62
  ButtonStyleableElements,
63
63
  CardStyleableElements,
64
+ TextInputStyleableElements,
64
65
  InputStyleableElements,
65
66
  ChipStyleableElements,
66
67
  AlertStyleableElements,
@@ -48,10 +48,10 @@ export type CardStyleableElements = {
48
48
  };
49
49
 
50
50
  /**
51
- * Input styleable elements.
52
- * @see InputStylesheet in @idealyst/theme/components/input
51
+ * TextInput styleable elements.
52
+ * @see TextInputStylesheet in @idealyst/theme/components/text-input
53
53
  */
54
- export type InputStyleableElements = {
54
+ export type TextInputStyleableElements = {
55
55
  container: Styles;
56
56
  leftIconContainer: Styles;
57
57
  rightIconContainer: Styles;
@@ -62,6 +62,11 @@ export type InputStyleableElements = {
62
62
  input: Styles;
63
63
  };
64
64
 
65
+ /**
66
+ * @deprecated Use TextInputStyleableElements instead
67
+ */
68
+ export type InputStyleableElements = TextInputStyleableElements;
69
+
65
70
  /**
66
71
  * Chip styleable elements.
67
72
  * @see ChipStylesheet in @idealyst/theme/components/chip
@@ -452,6 +457,8 @@ export interface ComponentStyleExtensions {}
452
457
  interface BuiltInComponentStyleElements {
453
458
  Button: ButtonStyleableElements;
454
459
  Card: CardStyleableElements;
460
+ TextInput: TextInputStyleableElements;
461
+ /** @deprecated Use TextInput instead */
455
462
  Input: InputStyleableElements;
456
463
  Chip: ChipStyleableElements;
457
464
  Alert: AlertStyleableElements;
package/src/index.ts CHANGED
@@ -18,8 +18,14 @@ export * from './Pressable/types';
18
18
  export { default as Link } from './Link';
19
19
  export * from './Link/types';
20
20
 
21
+ // TextInput (primary text input component)
22
+ export { default as TextInput } from './TextInput';
23
+ export * from './TextInput/types';
24
+
25
+ /**
26
+ * @deprecated Use TextInput instead. Input is maintained for backwards compatibility only.
27
+ */
21
28
  export { default as Input } from './Input';
22
- export * from './Input/types';
23
29
 
24
30
  // New primitive components
25
31
  export { default as Checkbox } from './Checkbox';
@@ -116,7 +122,9 @@ export type { ButtonProps } from './Button/types';
116
122
  export type { TextProps } from './Text/types';
117
123
  export type { ViewProps } from './View/types';
118
124
  export type { LinkProps } from './Link/types';
119
- export type { InputProps } from './Input/types';
125
+ export type { TextInputProps } from './TextInput/types';
126
+ /** @deprecated Use TextInputProps instead */
127
+ export type { InputProps } from './TextInput/types';
120
128
  export type { CheckboxProps } from './Checkbox/types';
121
129
  export type { CardProps } from './Card/types';
122
130
  export type { DividerProps } from './Divider/types';
@@ -156,6 +164,18 @@ export * from './utils/events';
156
164
  export * from './utils/viewStyleProps';
157
165
  export * from './utils/buildViewStyleVariants';
158
166
 
167
+ // Cross-platform ref types
168
+ export type {
169
+ IdealystElement,
170
+ AnchorElement,
171
+ AnchorRef,
172
+ ComponentElement,
173
+ WebElement,
174
+ NativeElement,
175
+ CrossPlatformElement,
176
+ CrossPlatformRef,
177
+ } from './utils/refTypes';
178
+
159
179
  // Component style extensions
160
180
  export {
161
181
  extendComponent,
@@ -174,6 +194,7 @@ export type {
174
194
  Styles,
175
195
  ButtonStyleableElements,
176
196
  CardStyleableElements,
197
+ TextInputStyleableElements,
177
198
  InputStyleableElements,
178
199
  ChipStyleableElements,
179
200
  AlertStyleableElements,
@@ -18,3 +18,15 @@ export { deepMerge, isPlainObject } from './styleHelpers';
18
18
 
19
19
  // Accessibility utilities
20
20
  export * from './accessibility';
21
+
22
+ // Cross-platform ref types
23
+ export type {
24
+ IdealystElement,
25
+ AnchorElement,
26
+ AnchorRef,
27
+ ComponentElement,
28
+ WebElement,
29
+ NativeElement,
30
+ CrossPlatformElement,
31
+ CrossPlatformRef,
32
+ } from './refTypes';
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Cross-platform ref types for use with refs across web and React Native.
3
+ *
4
+ * These types provide a unified way to work with refs in a cross-platform manner,
5
+ * especially useful for components like Popover that need to anchor to other elements.
6
+ */
7
+
8
+ /**
9
+ * Universal element type for cross-platform refs.
10
+ * Works seamlessly in both React web and React Native contexts.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const anchorRef = React.useRef<IdealystElement>(null);
15
+ *
16
+ * <Button ref={anchorRef} onPress={() => setOpen(true)}>
17
+ * Open Popover
18
+ * </Button>
19
+ * <Popover anchor={anchorRef} open={open} onOpenChange={setOpen}>
20
+ * <Text>Content</Text>
21
+ * </Popover>
22
+ * ```
23
+ */
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ export type IdealystElement = any;
26
+
27
+ /**
28
+ * @deprecated Use IdealystElement instead
29
+ */
30
+ export type AnchorElement = IdealystElement;
31
+
32
+ /**
33
+ * @deprecated Use React.RefObject<IdealystElement> instead
34
+ */
35
+ export type AnchorRef = React.RefObject<IdealystElement>;
36
+
37
+ /**
38
+ * @deprecated Use IdealystElement instead
39
+ */
40
+ export type CrossPlatformElement = IdealystElement;
41
+
42
+ /**
43
+ * @deprecated Use React.RefObject<IdealystElement> instead
44
+ */
45
+ export type CrossPlatformRef = React.RefObject<IdealystElement>;
46
+
47
+ // Legacy exports kept for backwards compatibility
48
+ export type WebElement = IdealystElement;
49
+ export type NativeElement = IdealystElement;
50
+ export type ComponentElement<T> = IdealystElement;