@idealyst/components 1.2.64 → 1.2.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/components",
3
- "version": "1.2.64",
3
+ "version": "1.2.66",
4
4
  "description": "Shared component library for React and React Native",
5
5
  "documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
6
6
  "readme": "README.md",
@@ -56,7 +56,7 @@
56
56
  "publish:npm": "npm publish"
57
57
  },
58
58
  "peerDependencies": {
59
- "@idealyst/theme": "^1.2.64",
59
+ "@idealyst/theme": "^1.2.66",
60
60
  "@mdi/js": ">=7.0.0",
61
61
  "@mdi/react": ">=1.0.0",
62
62
  "@react-native-vector-icons/common": ">=12.0.0",
@@ -107,7 +107,7 @@
107
107
  },
108
108
  "devDependencies": {
109
109
  "@idealyst/blur": "^1.2.40",
110
- "@idealyst/theme": "^1.2.64",
110
+ "@idealyst/theme": "^1.2.66",
111
111
  "@idealyst/tooling": "^1.2.30",
112
112
  "@mdi/react": "^1.6.1",
113
113
  "@types/react": "^19.1.0",
@@ -168,11 +168,15 @@ const TextArea = forwardRef<IdealystElement, TextAreaProps>(({
168
168
  style={[
169
169
  textareaStyleComputed,
170
170
  {
171
- textAlignVertical: 'top',
171
+ // Center text vertically when autoGrow (single-line behavior), top-align for multi-line
172
+ textAlignVertical: autoGrow ? 'center' : 'top',
172
173
  backgroundColor: 'transparent',
173
174
  },
174
- maxHeight && { maxHeight },
175
- { height: autoGrow ? contentHeight : rows * 24 },
175
+ // For autoGrow: don't set height, let it grow naturally with minHeight constraint
176
+ // For fixed height: use rows-based height
177
+ autoGrow
178
+ ? { minHeight: minHeight ?? 44, maxHeight: maxHeight }
179
+ : { height: rows * 24 },
176
180
  textareaStyle,
177
181
  ]}
178
182
  value={value}
@@ -183,7 +187,9 @@ const TextArea = forwardRef<IdealystElement, TextAreaProps>(({
183
187
  placeholder={placeholder}
184
188
  editable={!disabled}
185
189
  multiline
186
- numberOfLines={0}
190
+ // Disable internal scrolling when autoGrow - let the TextInput expand instead
191
+ scrollEnabled={!autoGrow || (maxHeight !== undefined && contentHeight !== undefined && contentHeight >= maxHeight)}
192
+ numberOfLines={autoGrow ? undefined : rows}
187
193
  maxLength={maxLength}
188
194
  placeholderTextColor="#999"
189
195
  />
@@ -127,14 +127,15 @@ export const textAreaStyles = defineStyle('TextArea', (theme: Theme) => ({
127
127
  fontSize: theme.sizes.$textarea.fontSize,
128
128
  padding: theme.sizes.$textarea.padding,
129
129
  lineHeight: theme.sizes.$textarea.lineHeight,
130
- minHeight: theme.sizes.$textarea.minHeight,
131
130
  },
132
131
  autoGrow: {
133
132
  true: {
134
133
  // Use input height as minHeight when autoGrow is enabled
135
134
  minHeight: theme.sizes.$input.height,
136
135
  },
137
- false: {},
136
+ false: {
137
+ // No minHeight - let rows attribute control height
138
+ },
138
139
  },
139
140
  disabled: {
140
141
  true: {