@idealyst/components 1.2.29 → 1.2.31

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 (143) hide show
  1. package/README.md +3 -3
  2. package/package.json +4 -4
  3. package/plugin/__tests__/web.test.ts +2 -2
  4. package/plugin/web.js +2 -0
  5. package/src/Accordion/Accordion.native.tsx +3 -2
  6. package/src/ActivityIndicator/ActivityIndicator.native.tsx +4 -2
  7. package/src/ActivityIndicator/ActivityIndicator.styles.tsx +22 -27
  8. package/src/ActivityIndicator/ActivityIndicator.web.tsx +17 -29
  9. package/src/Alert/Alert.native.tsx +20 -10
  10. package/src/Alert/Alert.styles.tsx +173 -86
  11. package/src/Alert/Alert.web.tsx +34 -30
  12. package/src/Alert/types.ts +53 -3
  13. package/src/Avatar/Avatar.native.tsx +3 -2
  14. package/src/Avatar/Avatar.web.tsx +2 -1
  15. package/src/Avatar/types.ts +1 -1
  16. package/src/Badge/Badge.native.tsx +18 -6
  17. package/src/Badge/Badge.styles.tsx +22 -5
  18. package/src/Badge/Badge.web.tsx +12 -4
  19. package/src/Badge/types.ts +14 -2
  20. package/src/Breadcrumb/Breadcrumb.native.tsx +3 -2
  21. package/src/Button/Button.native.tsx +16 -6
  22. package/src/Button/Button.styles.tsx +2 -2
  23. package/src/Button/Button.web.tsx +19 -15
  24. package/src/Button/types.ts +6 -10
  25. package/src/Card/Card.native.tsx +27 -3
  26. package/src/Card/Card.web.tsx +30 -4
  27. package/src/Card/types.ts +15 -0
  28. package/src/Checkbox/Checkbox.native.tsx +5 -4
  29. package/src/Checkbox/Checkbox.styles.tsx +62 -52
  30. package/src/Checkbox/Checkbox.web.tsx +4 -3
  31. package/src/Checkbox/types.ts +1 -1
  32. package/src/Chip/Chip.native.tsx +30 -7
  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/IconButton/IconButton.native.tsx +219 -0
  46. package/src/IconButton/IconButton.styles.tsx +127 -0
  47. package/src/IconButton/IconButton.web.tsx +198 -0
  48. package/src/IconButton/index.native.ts +5 -0
  49. package/src/IconButton/index.ts +5 -0
  50. package/src/IconButton/index.web.ts +5 -0
  51. package/src/IconButton/types.ts +84 -0
  52. package/src/Image/Image.native.tsx +3 -2
  53. package/src/Input/Input.native.tsx +42 -290
  54. package/src/Input/Input.styles.tsx +1 -1
  55. package/src/Input/Input.web.tsx +37 -288
  56. package/src/Input/index.native.ts +9 -2
  57. package/src/Input/index.ts +8 -1
  58. package/src/Input/index.web.ts +8 -1
  59. package/src/Input/types.ts +1 -1
  60. package/src/List/List.native.tsx +3 -2
  61. package/src/List/ListItem.native.tsx +3 -2
  62. package/src/List/ListSection.native.tsx +3 -2
  63. package/src/Menu/Menu.native.tsx +2 -1
  64. package/src/Menu/Menu.styles.tsx +79 -29
  65. package/src/Menu/Menu.web.tsx +2 -1
  66. package/src/Menu/MenuItem.native.tsx +4 -3
  67. package/src/Menu/MenuItem.styles.tsx +81 -32
  68. package/src/Menu/MenuItem.web.tsx +2 -1
  69. package/src/Menu/docs.ts +1 -1
  70. package/src/Popover/Popover.native.tsx +2 -1
  71. package/src/Popover/Popover.web.tsx +2 -1
  72. package/src/Popover/types.ts +15 -4
  73. package/src/Pressable/Pressable.native.tsx +3 -2
  74. package/src/Pressable/Pressable.web.tsx +3 -5
  75. package/src/Progress/Progress.native.tsx +5 -4
  76. package/src/Progress/Progress.web.tsx +3 -3
  77. package/src/Progress/types.ts +3 -3
  78. package/src/RadioButton/RadioButton.native.tsx +4 -3
  79. package/src/RadioButton/RadioButton.styles.tsx +53 -33
  80. package/src/RadioButton/RadioGroup.native.tsx +3 -2
  81. package/src/SVGImage/SVGImage.native.tsx +5 -4
  82. package/src/SVGImage/SVGImage.styles.tsx +44 -10
  83. package/src/SVGImage/SVGImage.web.tsx +2 -1
  84. package/src/Screen/Screen.native.tsx +2 -1
  85. package/src/Screen/Screen.web.tsx +2 -1
  86. package/src/Select/Select.native.tsx +6 -5
  87. package/src/Select/Select.styles.tsx +1 -1
  88. package/src/Select/Select.web.tsx +4 -3
  89. package/src/Select/types.ts +1 -1
  90. package/src/Skeleton/Skeleton.native.tsx +2 -1
  91. package/src/Skeleton/Skeleton.web.tsx +1 -1
  92. package/src/Slider/Slider.native.tsx +9 -8
  93. package/src/Slider/Slider.web.tsx +10 -9
  94. package/src/Slider/types.ts +9 -2
  95. package/src/Switch/Switch.native.tsx +7 -6
  96. package/src/Switch/Switch.styles.tsx +52 -17
  97. package/src/Switch/Switch.web.tsx +15 -16
  98. package/src/Switch/types.ts +44 -4
  99. package/src/TabBar/TabBar.native.tsx +3 -2
  100. package/src/Text/Text.native.tsx +3 -2
  101. package/src/Text/Text.web.tsx +2 -1
  102. package/src/TextArea/TextArea.native.tsx +3 -2
  103. package/src/TextArea/TextArea.styles.tsx +2 -2
  104. package/src/TextArea/TextArea.web.tsx +2 -1
  105. package/src/TextInput/TextInput.native.tsx +300 -0
  106. package/src/TextInput/TextInput.styles.tsx +207 -0
  107. package/src/TextInput/TextInput.web.tsx +301 -0
  108. package/src/TextInput/index.native.ts +3 -0
  109. package/src/TextInput/index.ts +5 -0
  110. package/src/TextInput/index.web.ts +5 -0
  111. package/src/TextInput/types.ts +163 -0
  112. package/src/Tooltip/Tooltip.native.tsx +3 -2
  113. package/src/Video/Video.native.tsx +4 -3
  114. package/src/View/View.native.tsx +2 -1
  115. package/src/View/View.styles.tsx +1 -0
  116. package/src/View/View.web.tsx +9 -2
  117. package/src/examples/ActivityIndicatorExamples.tsx +177 -0
  118. package/src/examples/AlertExamples.tsx +5 -5
  119. package/src/examples/ButtonExamples.tsx +12 -12
  120. package/src/examples/CardExamples.tsx +1 -1
  121. package/src/examples/CheckboxExamples.tsx +2 -2
  122. package/src/examples/ChipExamples.tsx +6 -6
  123. package/src/examples/DialogExamples.tsx +1 -1
  124. package/src/examples/DividerExamples.tsx +1 -1
  125. package/src/examples/InputExamples.tsx +1 -1
  126. package/src/examples/LinkExamples.tsx +1 -1
  127. package/src/examples/ListExamples.tsx +1 -1
  128. package/src/examples/MenuExamples.tsx +2 -2
  129. package/src/examples/ProgressExamples.tsx +1 -1
  130. package/src/examples/RadioButtonExamples.tsx +5 -5
  131. package/src/examples/SVGImageExamples.tsx +1 -1
  132. package/src/examples/SelectExamples.tsx +1 -1
  133. package/src/examples/SliderExamples.tsx +5 -5
  134. package/src/examples/SwitchExamples.tsx +26 -26
  135. package/src/examples/TableExamples.tsx +1 -1
  136. package/src/examples/TooltipExamples.tsx +2 -2
  137. package/src/examples/index.ts +1 -0
  138. package/src/extensions/index.ts +1 -0
  139. package/src/extensions/types.ts +22 -3
  140. package/src/index.native.ts +4 -0
  141. package/src/index.ts +27 -2
  142. package/src/utils/index.ts +12 -0
  143. 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',
@@ -90,6 +90,7 @@ export const viewStyles = defineStyle('View', (theme: Theme) => ({
90
90
  display: 'flex',
91
91
  flexDirection: 'column',
92
92
  boxSizing: 'border-box',
93
+ borderStyle: 'solid',
93
94
  },
94
95
  }),
95
96
  // Web-only: Wrapper for scrollable view
@@ -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',
@@ -72,6 +73,9 @@ const View = forwardRef<HTMLDivElement, ViewProps>(({
72
73
  flexShrink,
73
74
  flexBasis,
74
75
  alignSelf,
76
+ // Flex content alignment - goes to content (for aligning children)
77
+ alignItems,
78
+ justifyContent,
75
79
  // Margin - goes to wrapper (positioning in parent)
76
80
  margin,
77
81
  marginTop,
@@ -123,6 +127,9 @@ const View = forwardRef<HTMLDivElement, ViewProps>(({
123
127
  inset: 0,
124
128
  overflow: 'auto',
125
129
  boxSizing: 'border-box',
130
+ // Flex alignment for children
131
+ ...(alignItems !== undefined && { alignItems }),
132
+ ...(justifyContent !== undefined && { justifyContent }),
126
133
  // User's visual styles
127
134
  ...contentStyles,
128
135
  }}
@@ -138,8 +145,8 @@ const View = forwardRef<HTMLDivElement, ViewProps>(({
138
145
 
139
146
  return (
140
147
  <div
141
- style={style as any}
142
148
  {...webProps}
149
+ style={style as any}
143
150
  ref={mergedRef}
144
151
  id={id}
145
152
  data-testid={testID}
@@ -0,0 +1,177 @@
1
+ import React, { useState } from 'react';
2
+ import { Screen, View, Text, Button } from '@idealyst/components';
3
+ import ActivityIndicator from '../ActivityIndicator';
4
+
5
+ export const ActivityIndicatorExamples: React.FC = () => {
6
+ const [isAnimating, setIsAnimating] = useState(true);
7
+
8
+ return (
9
+ <Screen background="primary" padding="lg">
10
+ <View gap="lg">
11
+ <Text typography="h3">ActivityIndicator Examples</Text>
12
+
13
+ <View gap="md">
14
+ <Text typography="h5">Basic</Text>
15
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 16 }}>
16
+ <ActivityIndicator />
17
+ </View>
18
+ </View>
19
+
20
+ <View gap="md">
21
+ <Text typography="h5">Sizes</Text>
22
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>
23
+ <View style={{ alignItems: 'center', gap: 8 }}>
24
+ <ActivityIndicator size="xs" />
25
+ <Text typography="caption">xs</Text>
26
+ </View>
27
+ <View style={{ alignItems: 'center', gap: 8 }}>
28
+ <ActivityIndicator size="sm" />
29
+ <Text typography="caption">sm</Text>
30
+ </View>
31
+ <View style={{ alignItems: 'center', gap: 8 }}>
32
+ <ActivityIndicator size="md" />
33
+ <Text typography="caption">md</Text>
34
+ </View>
35
+ <View style={{ alignItems: 'center', gap: 8 }}>
36
+ <ActivityIndicator size="lg" />
37
+ <Text typography="caption">lg</Text>
38
+ </View>
39
+ <View style={{ alignItems: 'center', gap: 8 }}>
40
+ <ActivityIndicator size="xl" />
41
+ <Text typography="caption">xl</Text>
42
+ </View>
43
+ </View>
44
+ </View>
45
+
46
+ <View gap="md">
47
+ <Text typography="h5">Intent Colors</Text>
48
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>
49
+ <View style={{ alignItems: 'center', gap: 8 }}>
50
+ <ActivityIndicator intent="primary" />
51
+ <Text typography="caption">primary</Text>
52
+ </View>
53
+ <View style={{ alignItems: 'center', gap: 8 }}>
54
+ <ActivityIndicator intent="success" />
55
+ <Text typography="caption">success</Text>
56
+ </View>
57
+ <View style={{ alignItems: 'center', gap: 8 }}>
58
+ <ActivityIndicator intent="warning" />
59
+ <Text typography="caption">warning</Text>
60
+ </View>
61
+ <View style={{ alignItems: 'center', gap: 8 }}>
62
+ <ActivityIndicator intent="danger" />
63
+ <Text typography="caption">danger</Text>
64
+ </View>
65
+ <View style={{ alignItems: 'center', gap: 8 }}>
66
+ <ActivityIndicator intent="neutral" />
67
+ <Text typography="caption">neutral</Text>
68
+ </View>
69
+ </View>
70
+ </View>
71
+
72
+ <View gap="md">
73
+ <Text typography="h5">Custom Color</Text>
74
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>
75
+ <ActivityIndicator color="#9333ea" />
76
+ <ActivityIndicator color="#ec4899" />
77
+ <ActivityIndicator color="#06b6d4" />
78
+ <ActivityIndicator color="#f97316" />
79
+ </View>
80
+ </View>
81
+
82
+ <View gap="md">
83
+ <Text typography="h5">Toggle Animation</Text>
84
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 16 }}>
85
+ <ActivityIndicator animating={isAnimating} hidesWhenStopped={false} />
86
+ <Button size="sm" onPress={() => setIsAnimating(!isAnimating)}>
87
+ {isAnimating ? 'Stop' : 'Start'}
88
+ </Button>
89
+ </View>
90
+ <Text typography="caption" color="secondary">
91
+ hidesWhenStopped=false keeps the indicator visible when stopped
92
+ </Text>
93
+ </View>
94
+
95
+ <View gap="md">
96
+ <Text typography="h5">Hides When Stopped (default)</Text>
97
+ <View gap="sm" style={{ flexDirection: 'row', alignItems: 'center', gap: 16 }}>
98
+ <View style={{ width: 32, height: 32, alignItems: 'center', justifyContent: 'center' }}>
99
+ <ActivityIndicator animating={isAnimating} />
100
+ </View>
101
+ <Text typography="body2">
102
+ {isAnimating ? 'Visible (animating)' : 'Hidden (stopped)'}
103
+ </Text>
104
+ </View>
105
+ </View>
106
+
107
+ <View gap="md">
108
+ <Text typography="h5">Loading States</Text>
109
+ <View gap="sm">
110
+ <View
111
+ style={{
112
+ flexDirection: 'row',
113
+ alignItems: 'center',
114
+ gap: 12,
115
+ padding: 16,
116
+ backgroundColor: 'rgba(0,0,0,0.05)',
117
+ borderRadius: 8,
118
+ }}
119
+ >
120
+ <ActivityIndicator size="sm" />
121
+ <Text>Loading data...</Text>
122
+ </View>
123
+ <View
124
+ style={{
125
+ alignItems: 'center',
126
+ justifyContent: 'center',
127
+ padding: 32,
128
+ backgroundColor: 'rgba(0,0,0,0.05)',
129
+ borderRadius: 8,
130
+ }}
131
+ >
132
+ <ActivityIndicator size="lg" />
133
+ <Text typography="body2" color="secondary" style={{ marginTop: 12 }}>
134
+ Please wait...
135
+ </Text>
136
+ </View>
137
+ </View>
138
+ </View>
139
+
140
+ <View gap="md">
141
+ <Text typography="h5">Inline with Text</Text>
142
+ <View gap="sm">
143
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
144
+ <Text>Saving</Text>
145
+ <ActivityIndicator size="xs" />
146
+ </View>
147
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
148
+ <Text>Processing request</Text>
149
+ <ActivityIndicator size="sm" intent="success" />
150
+ </View>
151
+ </View>
152
+ </View>
153
+
154
+ <View gap="md">
155
+ <Text typography="h5">On Dark Background</Text>
156
+ <View
157
+ style={{
158
+ flexDirection: 'row',
159
+ alignItems: 'center',
160
+ gap: 24,
161
+ padding: 24,
162
+ backgroundColor: '#1f2937',
163
+ borderRadius: 8,
164
+ }}
165
+ >
166
+ <ActivityIndicator color="#ffffff" />
167
+ <ActivityIndicator color="#60a5fa" />
168
+ <ActivityIndicator color="#34d399" />
169
+ <ActivityIndicator color="#fbbf24" />
170
+ </View>
171
+ </View>
172
+ </View>
173
+ </Screen>
174
+ );
175
+ };
176
+
177
+ export default ActivityIndicatorExamples;
@@ -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}