@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
@@ -7,7 +7,7 @@ import { getNativeInteractiveAccessibilityProps } from '../utils/accessibility';
7
7
 
8
8
  const Dialog = forwardRef<View, DialogProps>(({
9
9
  open,
10
- onOpenChange,
10
+ onClose,
11
11
  title,
12
12
  children,
13
13
  size = 'md',
@@ -76,22 +76,22 @@ const Dialog = forwardRef<View, DialogProps>(({
76
76
  if (!open) return;
77
77
 
78
78
  const handleBackPress = () => {
79
- onOpenChange(false);
79
+ onClose();
80
80
  return true; // Prevent default back behavior
81
81
  };
82
82
 
83
83
  const backHandler = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
84
84
  return () => backHandler.remove();
85
- }, [open, onOpenChange]);
85
+ }, [open, onClose]);
86
86
 
87
87
  const handleBackdropPress = () => {
88
88
  if (closeOnBackdropClick) {
89
- onOpenChange(false);
89
+ onClose();
90
90
  }
91
91
  };
92
92
 
93
93
  const handleClosePress = () => {
94
- onOpenChange(false);
94
+ onClose();
95
95
  };
96
96
 
97
97
  // Apply variants
@@ -129,7 +129,7 @@ const Dialog = forwardRef<View, DialogProps>(({
129
129
  visible={open}
130
130
  transparent
131
131
  animationType="none"
132
- onRequestClose={() => onOpenChange(false)}
132
+ onRequestClose={() => onClose()}
133
133
  statusBarTranslucent
134
134
  testID={testID}
135
135
  >
@@ -13,7 +13,7 @@ import { getWebInteractiveAriaProps, generateAccessibilityId } from '../utils/ac
13
13
  */
14
14
  const Dialog = forwardRef<HTMLDivElement, DialogProps>(({
15
15
  open,
16
- onOpenChange,
16
+ onClose,
17
17
  title,
18
18
  children,
19
19
  size = 'md',
@@ -81,13 +81,13 @@ const Dialog = forwardRef<HTMLDivElement, DialogProps>(({
81
81
 
82
82
  const handleEscape = (event: KeyboardEvent) => {
83
83
  if (event.key === 'Escape') {
84
- onOpenChange(false);
84
+ onClose();
85
85
  }
86
86
  };
87
87
 
88
88
  document.addEventListener('keydown', handleEscape);
89
89
  return () => document.removeEventListener('keydown', handleEscape);
90
- }, [open, closeOnEscapeKey, onOpenChange]);
90
+ }, [open, closeOnEscapeKey, onClose]);
91
91
 
92
92
  // Handle focus management
93
93
  useEffect(() => {
@@ -122,12 +122,12 @@ const Dialog = forwardRef<HTMLDivElement, DialogProps>(({
122
122
 
123
123
  const handleBackdropClick = (event: React.MouseEvent) => {
124
124
  if (closeOnBackdropClick && event.target === event.currentTarget) {
125
- onOpenChange(false);
125
+ onClose();
126
126
  }
127
127
  };
128
128
 
129
129
  const handleCloseClick = () => {
130
- onOpenChange(false);
130
+ onClose();
131
131
  };
132
132
 
133
133
  // Apply variants
@@ -19,9 +19,9 @@ export interface DialogProps extends BaseProps, InteractiveAccessibilityProps {
19
19
  open: boolean;
20
20
 
21
21
  /**
22
- * Called when the dialog should be opened or closed
22
+ * Called when the dialog should be closed
23
23
  */
24
- onOpenChange: (open: boolean) => void;
24
+ onClose: () => void;
25
25
 
26
26
  /**
27
27
  * Optional title for the dialog
@@ -2,11 +2,12 @@ import { forwardRef } from 'react';
2
2
  import { View, Text } from 'react-native';
3
3
  import { DividerProps } from './types';
4
4
  import { dividerStyles } from './Divider.styles';
5
+ import type { IdealystElement } from '../utils/refTypes';
5
6
 
6
- const Divider = forwardRef<View, DividerProps>(({
7
+ const Divider = forwardRef<IdealystElement, DividerProps>(({
7
8
  orientation = 'horizontal',
8
9
  type = 'solid',
9
- thickness = 'thin',
10
+ size = 'sm',
10
11
  intent = 'neutral',
11
12
  length = 'full',
12
13
  spacing = 'md',
@@ -26,7 +27,7 @@ const Divider = forwardRef<View, DividerProps>(({
26
27
  // Get dynamic divider style
27
28
  const dividerStyle = (dividerStyles.divider as any)({
28
29
  orientation,
29
- thickness,
30
+ size,
30
31
  type,
31
32
  intent,
32
33
  spacing,
@@ -35,15 +36,17 @@ const Divider = forwardRef<View, DividerProps>(({
35
36
  // Get dynamic line style
36
37
  const lineStyle = (dividerStyles.line as any)({
37
38
  orientation,
38
- thickness,
39
+ size,
39
40
  });
40
41
 
41
- // Get thickness value for dashed/dotted border handling on native
42
- const getThicknessValue = () => {
43
- switch (thickness) {
44
- case 'thin': return 1;
42
+ // Get size value for dashed/dotted border handling on native
43
+ const getSizeValue = () => {
44
+ switch (size) {
45
+ case 'xs': return 1;
46
+ case 'sm': return 1;
45
47
  case 'md': return 2;
46
- case 'thick': return 4;
48
+ case 'lg': return 3;
49
+ case 'xl': return 4;
47
50
  default: return 1;
48
51
  }
49
52
  };
@@ -51,19 +54,19 @@ const Divider = forwardRef<View, DividerProps>(({
51
54
  // For dashed/dotted variants on native, we need to use border instead of background
52
55
  const getNativeDashedStyle = () => {
53
56
  if (type === 'dashed' || type === 'dotted') {
54
- const actualThickness = getThicknessValue();
57
+ const actualSize = getSizeValue();
55
58
 
56
59
  return {
57
60
  backgroundColor: 'transparent',
58
61
  borderStyle: type,
59
62
  borderColor: dividerStyle.backgroundColor,
60
63
  ...(orientation === 'horizontal' ? {
61
- borderTopWidth: actualThickness,
64
+ borderTopWidth: actualSize,
62
65
  borderBottomWidth: 0,
63
66
  borderLeftWidth: 0,
64
67
  borderRightWidth: 0,
65
68
  } : {
66
- borderLeftWidth: actualThickness,
69
+ borderLeftWidth: actualSize,
67
70
  borderTopWidth: 0,
68
71
  borderBottomWidth: 0,
69
72
  borderRightWidth: 0,
@@ -77,7 +80,7 @@ const Divider = forwardRef<View, DividerProps>(({
77
80
  if (!children) {
78
81
  return (
79
82
  <View
80
- ref={ref}
83
+ ref={ref as any}
81
84
  nativeID={id}
82
85
  style={[dividerStyle, getNativeDashedStyle(), style]}
83
86
  testID={testID}
@@ -89,7 +92,7 @@ const Divider = forwardRef<View, DividerProps>(({
89
92
  // For lines with content, create line segments
90
93
  const renderLineSegment = () => {
91
94
  if (type === 'dashed' || type === 'dotted') {
92
- const actualThickness = getThicknessValue();
95
+ const actualSize = getSizeValue();
93
96
 
94
97
  return (
95
98
  <View
@@ -100,12 +103,12 @@ const Divider = forwardRef<View, DividerProps>(({
100
103
  borderStyle: type,
101
104
  borderColor: lineStyle.backgroundColor,
102
105
  ...(orientation === 'horizontal' ? {
103
- borderTopWidth: actualThickness,
106
+ borderTopWidth: actualSize,
104
107
  borderBottomWidth: 0,
105
108
  borderLeftWidth: 0,
106
109
  borderRightWidth: 0,
107
110
  } : {
108
- borderLeftWidth: actualThickness,
111
+ borderLeftWidth: actualSize,
109
112
  borderTopWidth: 0,
110
113
  borderBottomWidth: 0,
111
114
  borderRightWidth: 0,
@@ -121,7 +124,7 @@ const Divider = forwardRef<View, DividerProps>(({
121
124
 
122
125
  return (
123
126
  <View
124
- ref={ref}
127
+ ref={ref as any}
125
128
  nativeID={id}
126
129
  style={dividerStyles.container}
127
130
  testID={testID}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { StyleSheet } from 'react-native-unistyles';
5
5
  import { defineStyle, ThemeStyleWrapper } from '@idealyst/theme';
6
- import type { Theme as BaseTheme, Intent } from '@idealyst/theme';
6
+ import type { Theme as BaseTheme, Intent, Size } from '@idealyst/theme';
7
7
 
8
8
  // Required: Unistyles must see StyleSheet usage in original source to process this file
9
9
  void StyleSheet;
@@ -12,14 +12,14 @@ void StyleSheet;
12
12
  type Theme = ThemeStyleWrapper<BaseTheme>;
13
13
 
14
14
  type DividerOrientation = 'horizontal' | 'vertical';
15
- type DividerThickness = 'thin' | 'md' | 'thick';
15
+ type DividerSize = Size;
16
16
  type DividerType = 'solid' | 'dashed' | 'dotted';
17
17
  type DividerIntent = Intent | 'secondary' | 'neutral' | 'info';
18
18
  type DividerSpacing = 'none' | 'sm' | 'md' | 'lg';
19
19
 
20
20
  export type DividerDynamicProps = {
21
21
  orientation?: DividerOrientation;
22
- thickness?: DividerThickness;
22
+ size?: DividerSize;
23
23
  type?: DividerType;
24
24
  intent?: DividerIntent;
25
25
  spacing?: DividerSpacing;
@@ -27,14 +27,20 @@ export type DividerDynamicProps = {
27
27
 
28
28
  export type LineDynamicProps = {
29
29
  orientation?: DividerOrientation;
30
- thickness?: DividerThickness;
30
+ size?: DividerSize;
31
31
  };
32
32
 
33
- function getThicknessValue(thickness: DividerThickness): number {
34
- switch (thickness) {
35
- case 'thin': return 1;
33
+ /**
34
+ * Maps Size to thickness value in pixels.
35
+ * xs=1, sm=1, md=2, lg=3, xl=4
36
+ */
37
+ function getSizeValue(size: DividerSize): number {
38
+ switch (size) {
39
+ case 'xs': return 1;
40
+ case 'sm': return 1;
36
41
  case 'md': return 2;
37
- case 'thick': return 4;
42
+ case 'lg': return 3;
43
+ case 'xl': return 4;
38
44
  default: return 1;
39
45
  }
40
46
  }
@@ -50,17 +56,17 @@ function getSpacingValue(spacing: DividerSpacing): number {
50
56
  }
51
57
 
52
58
  /**
53
- * Divider styles with dynamic functions for orientation/thickness/intent combinations.
59
+ * Divider styles with dynamic functions for orientation/size/intent combinations.
54
60
  */
55
61
  export const dividerStyles = defineStyle('Divider', (theme: Theme) => ({
56
62
  divider: ({
57
63
  orientation = 'horizontal',
58
- thickness = 'thin',
64
+ size = 'sm',
59
65
  type = 'solid',
60
66
  intent = 'neutral',
61
67
  spacing = 'md'
62
68
  }: DividerDynamicProps) => {
63
- const thicknessValue = getThicknessValue(thickness);
69
+ const sizeValue = getSizeValue(size);
64
70
  const spacingValue = getSpacingValue(spacing);
65
71
  const isHorizontal = orientation === 'horizontal';
66
72
  const isDashedOrDotted = type === 'dashed' || type === 'dotted';
@@ -72,11 +78,11 @@ export const dividerStyles = defineStyle('Divider', (theme: Theme) => ({
72
78
  ? theme.colors.border.secondary
73
79
  : intent === 'info'
74
80
  ? theme.intents.primary.primary
75
- : theme.intents[intent as Intent].primary;
81
+ : (theme.intents[intent as Intent]?.primary ?? theme.colors.border.primary);
76
82
 
77
83
  const dimensionStyles = isHorizontal
78
- ? { width: '100%', height: thicknessValue, flexDirection: 'row' as const }
79
- : { width: thicknessValue, height: '100%', flexDirection: 'column' as const };
84
+ ? { width: '100%', height: sizeValue, flexDirection: 'row' as const }
85
+ : { width: sizeValue, height: '100%', flexDirection: 'column' as const };
80
86
 
81
87
  const spacingStyles = isHorizontal
82
88
  ? { marginVertical: spacingValue }
@@ -86,8 +92,8 @@ export const dividerStyles = defineStyle('Divider', (theme: Theme) => ({
86
92
  border: 'none',
87
93
  backgroundColor: 'transparent',
88
94
  ...(isHorizontal
89
- ? { borderTop: `${thicknessValue}px ${type} ${color}` }
90
- : { borderLeft: `${thicknessValue}px ${type} ${color}` }
95
+ ? { borderTop: `${sizeValue}px ${type} ${color}` }
96
+ : { borderLeft: `${sizeValue}px ${type} ${color}` }
91
97
  ),
92
98
  } : {};
93
99
 
@@ -137,17 +143,33 @@ export const dividerStyles = defineStyle('Divider', (theme: Theme) => ({
137
143
  },
138
144
  }),
139
145
 
140
- line: ({ orientation = 'horizontal', thickness = 'thin' }: LineDynamicProps) => {
141
- const thicknessValue = getThicknessValue(thickness);
142
- const isHorizontal = orientation === 'horizontal';
143
-
144
- return {
145
- backgroundColor: theme.colors.border.secondary,
146
- flex: 1,
147
- ...(isHorizontal
148
- ? { height: thicknessValue }
149
- : { width: thicknessValue }
150
- ),
151
- } as const;
152
- },
146
+ line: (_props: LineDynamicProps) => ({
147
+ backgroundColor: theme.colors.border.secondary,
148
+ flex: 1,
149
+ variants: {
150
+ orientation: {
151
+ horizontal: {},
152
+ vertical: {},
153
+ },
154
+ size: {
155
+ xs: {},
156
+ sm: {},
157
+ md: {},
158
+ lg: {},
159
+ xl: {},
160
+ },
161
+ },
162
+ compoundVariants: [
163
+ { orientation: 'horizontal', size: 'xs', styles: { height: 1 } },
164
+ { orientation: 'horizontal', size: 'sm', styles: { height: 1 } },
165
+ { orientation: 'horizontal', size: 'md', styles: { height: 2 } },
166
+ { orientation: 'horizontal', size: 'lg', styles: { height: 3 } },
167
+ { orientation: 'horizontal', size: 'xl', styles: { height: 4 } },
168
+ { orientation: 'vertical', size: 'xs', styles: { width: 1 } },
169
+ { orientation: 'vertical', size: 'sm', styles: { width: 1 } },
170
+ { orientation: 'vertical', size: 'md', styles: { width: 2 } },
171
+ { orientation: 'vertical', size: 'lg', styles: { width: 3 } },
172
+ { orientation: 'vertical', size: 'xl', styles: { width: 4 } },
173
+ ],
174
+ }),
153
175
  }));
@@ -3,15 +3,16 @@ import { getWebProps } from 'react-native-unistyles/web';
3
3
  import { DividerProps } from './types';
4
4
  import { dividerStyles } from './Divider.styles';
5
5
  import useMergeRefs from '../hooks/useMergeRefs';
6
+ import type { IdealystElement } from '../utils/refTypes';
6
7
 
7
8
  /**
8
9
  * Visual separator for dividing content sections horizontally or vertically.
9
10
  * Supports solid, dashed, and dotted styles with optional text content.
10
11
  */
11
- const Divider = forwardRef<HTMLDivElement, DividerProps>(({
12
+ const Divider = forwardRef<IdealystElement, DividerProps>(({
12
13
  orientation = 'horizontal',
13
14
  type = 'solid',
14
- thickness = 'thin',
15
+ size = 'sm',
15
16
  intent = 'neutral',
16
17
  length = 'full',
17
18
  spacing = 'md',
@@ -31,7 +32,7 @@ const Divider = forwardRef<HTMLDivElement, DividerProps>(({
31
32
  // Get dynamic divider style
32
33
  const dividerStyle = (dividerStyles.divider as any)({
33
34
  orientation,
34
- thickness,
35
+ size,
35
36
  type,
36
37
  intent,
37
38
  spacing,
@@ -40,7 +41,7 @@ const Divider = forwardRef<HTMLDivElement, DividerProps>(({
40
41
  // Get dynamic line style
41
42
  const lineStyle = (dividerStyles.line as any)({
42
43
  orientation,
43
- thickness,
44
+ size,
44
45
  });
45
46
 
46
47
  // Generate web props
@@ -5,9 +5,9 @@ import { BaseProps } from '../utils/viewStyleProps';
5
5
 
6
6
  // Component-specific type aliases for future extensibility
7
7
  export type DividerIntentVariant = Intent;
8
+ export type DividerSizeVariant = Size;
8
9
  export type DividerOrientationVariant = 'horizontal' | 'vertical';
9
10
  export type DividerType = 'solid' | 'dashed' | 'dotted';
10
- export type DividerThicknessVariant = 'thin' | 'md' | 'thick';
11
11
  export type DividerLengthVariant = 'full' | 'auto' | number;
12
12
  export type DividerSpacingVariant = 'none' | Size;
13
13
 
@@ -27,9 +27,9 @@ export interface DividerProps extends BaseProps {
27
27
  type?: DividerType;
28
28
 
29
29
  /**
30
- * The thickness of the divider
30
+ * The size (thickness) of the divider
31
31
  */
32
- thickness?: DividerThicknessVariant;
32
+ size?: DividerSizeVariant;
33
33
 
34
34
  /**
35
35
  * The color intent of the divider
@@ -2,8 +2,9 @@ import { forwardRef, useMemo } from 'react';
2
2
  import MaterialDesignIcons from '@react-native-vector-icons/material-design-icons';
3
3
  import { IconProps } from './types';
4
4
  import { iconStyles } from './Icon.styles';
5
+ import type { IdealystElement } from '../utils/refTypes';
5
6
 
6
- const Icon = forwardRef<any, IconProps>(({
7
+ const Icon = forwardRef<IdealystElement, IconProps>(({
7
8
  name,
8
9
  size = 'md',
9
10
  color,
@@ -26,7 +27,7 @@ const Icon = forwardRef<any, IconProps>(({
26
27
 
27
28
  return (
28
29
  <MaterialDesignIcons
29
- ref={ref}
30
+ ref={ref as any}
30
31
  nativeID={id}
31
32
  size={iconSize}
32
33
  name={name}
@@ -7,12 +7,13 @@ import { useUnistyles } from 'react-native-unistyles';
7
7
  import useMergeRefs from '../hooks/useMergeRefs';
8
8
  import { getColorFromString, Intent, Color, Text } from '@idealyst/theme';
9
9
  import { IconRegistry } from './IconRegistry';
10
+ import type { IdealystElement } from '../utils/refTypes';
10
11
 
11
12
  /**
12
13
  * Vector icon display from the Material Design Icons library.
13
14
  * Supports intent-based coloring and theme-aware sizing.
14
15
  */
15
- const Icon = forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
16
+ const Icon = forwardRef<IdealystElement, IconProps>((props, ref) => {
16
17
  const {
17
18
  name,
18
19
  size = 'md',
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import Svg, { Path } from 'react-native-svg';
4
+ import type { IdealystElement } from '../../utils/refTypes';
4
5
 
5
6
  /**
6
7
  * Internal component for rendering SVG icons directly from MDI paths.
@@ -18,7 +19,7 @@ interface IconSvgProps {
18
19
  'data-testid'?: string;
19
20
  }
20
21
 
21
- export const IconSvg = React.forwardRef<View, IconSvgProps>(({
22
+ export const IconSvg = React.forwardRef<IdealystElement, IconSvgProps>(({
22
23
  path,
23
24
  size = 24,
24
25
  color = 'currentColor',
@@ -29,7 +30,7 @@ export const IconSvg = React.forwardRef<View, IconSvgProps>(({
29
30
  const sizeNum = typeof size === 'string' ? parseFloat(size) : size;
30
31
 
31
32
  return (
32
- <View ref={ref} style={[{ width: sizeNum, height: sizeNum }, style]} testID={testID}>
33
+ <View ref={ref as any} style={[{ width: sizeNum, height: sizeNum }, style]} testID={testID}>
33
34
  <Svg viewBox="0 0 24 24" width={sizeNum} height={sizeNum}>
34
35
  <Path d={path} fill={color} />
35
36
  </Svg>
@@ -3,8 +3,9 @@ import { Image as RNImage, View } from 'react-native';
3
3
  import { imageStyles } from './Image.styles';
4
4
  import type { ImageProps } from './types';
5
5
  import ActivityIndicator from '../ActivityIndicator';
6
+ import type { IdealystElement } from '../utils/refTypes';
6
7
 
7
- const Image = forwardRef<View, ImageProps>(({
8
+ const Image = forwardRef<IdealystElement, ImageProps>(({
8
9
  source,
9
10
  alt,
10
11
  width,
@@ -57,7 +58,7 @@ const Image = forwardRef<View, ImageProps>(({
57
58
  ];
58
59
 
59
60
  return (
60
- <View ref={ref} nativeID={id} style={containerStyle as any} testID={testID} accessibilityRole="image" accessibilityLabel={accessibilityLabel || alt}>
61
+ <View ref={ref as any} nativeID={id} style={containerStyle as any} testID={testID} accessibilityRole="image" accessibilityLabel={accessibilityLabel || alt}>
61
62
  <RNImage
62
63
  source={imageSource as any}
63
64
  style={[imageStyles.image, { borderRadius }]}