@rehagro/ui 1.0.42 → 1.0.43

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/dist/native.d.mts CHANGED
@@ -159,7 +159,7 @@ declare const IconButton: React__default.ForwardRefExoticComponent<Omit<Pressabl
159
159
  } & React__default.RefAttributes<View>>;
160
160
 
161
161
  type TextInputStatus = "default" | "error";
162
- type TextInputSize = "sm" | "md" | "lg";
162
+ type TextInputSize = "sm" | "md" | "lg" | "xl";
163
163
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
164
164
  type TextInputProps = Omit<TextInputProps$1, "style"> & {
165
165
  /** Label text displayed above the input */
@@ -182,6 +182,13 @@ type TextInputProps = Omit<TextInputProps$1, "style"> & {
182
182
  wrapperStyle?: StyleProp<ViewStyle>;
183
183
  /** Custom style for the input container */
184
184
  style?: StyleProp<ViewStyle>;
185
+ /**
186
+ * Custom border color for the input container. When provided,
187
+ * overrides the resting border color from `status`/`focused`.
188
+ * Mirrors the web `TextInput#borderColor` prop. Useful for
189
+ * highlighting cells in tables or custom themed states.
190
+ */
191
+ borderColor?: string;
185
192
  };
186
193
  declare const TextInput: React__default.ForwardRefExoticComponent<Omit<TextInputProps$1, "style"> & {
187
194
  /** Label text displayed above the input */
@@ -204,6 +211,13 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<TextInput
204
211
  wrapperStyle?: StyleProp<ViewStyle>;
205
212
  /** Custom style for the input container */
206
213
  style?: StyleProp<ViewStyle>;
214
+ /**
215
+ * Custom border color for the input container. When provided,
216
+ * overrides the resting border color from `status`/`focused`.
217
+ * Mirrors the web `TextInput#borderColor` prop. Useful for
218
+ * highlighting cells in tables or custom themed states.
219
+ */
220
+ borderColor?: string;
207
221
  } & React__default.RefAttributes<TextInput$1>>;
208
222
 
209
223
  type CheckboxSize = "sm" | "md" | "lg";
package/dist/native.d.ts CHANGED
@@ -159,7 +159,7 @@ declare const IconButton: React__default.ForwardRefExoticComponent<Omit<Pressabl
159
159
  } & React__default.RefAttributes<View>>;
160
160
 
161
161
  type TextInputStatus = "default" | "error";
162
- type TextInputSize = "sm" | "md" | "lg";
162
+ type TextInputSize = "sm" | "md" | "lg" | "xl";
163
163
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
164
164
  type TextInputProps = Omit<TextInputProps$1, "style"> & {
165
165
  /** Label text displayed above the input */
@@ -182,6 +182,13 @@ type TextInputProps = Omit<TextInputProps$1, "style"> & {
182
182
  wrapperStyle?: StyleProp<ViewStyle>;
183
183
  /** Custom style for the input container */
184
184
  style?: StyleProp<ViewStyle>;
185
+ /**
186
+ * Custom border color for the input container. When provided,
187
+ * overrides the resting border color from `status`/`focused`.
188
+ * Mirrors the web `TextInput#borderColor` prop. Useful for
189
+ * highlighting cells in tables or custom themed states.
190
+ */
191
+ borderColor?: string;
185
192
  };
186
193
  declare const TextInput: React__default.ForwardRefExoticComponent<Omit<TextInputProps$1, "style"> & {
187
194
  /** Label text displayed above the input */
@@ -204,6 +211,13 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<TextInput
204
211
  wrapperStyle?: StyleProp<ViewStyle>;
205
212
  /** Custom style for the input container */
206
213
  style?: StyleProp<ViewStyle>;
214
+ /**
215
+ * Custom border color for the input container. When provided,
216
+ * overrides the resting border color from `status`/`focused`.
217
+ * Mirrors the web `TextInput#borderColor` prop. Useful for
218
+ * highlighting cells in tables or custom themed states.
219
+ */
220
+ borderColor?: string;
207
221
  } & React__default.RefAttributes<TextInput$1>>;
208
222
 
209
223
  type CheckboxSize = "sm" | "md" | "lg";
package/dist/native.js CHANGED
@@ -326,6 +326,7 @@ var TextInput = react.forwardRef(function TextInput2({
326
326
  editable = true,
327
327
  wrapperStyle,
328
328
  style,
329
+ borderColor,
329
330
  accessibilityLabel,
330
331
  ...rest
331
332
  }, ref) {
@@ -335,17 +336,23 @@ var TextInput = react.forwardRef(function TextInput2({
335
336
  const heightMap = {
336
337
  sm: theme.inputHeightSm ?? 36,
337
338
  md: theme.inputHeightMd ?? 44,
338
- lg: theme.inputHeightLg ?? 52
339
+ lg: theme.inputHeightLg ?? 52,
340
+ // `xl` (44) sits between md/lg — same height as web. Native
341
+ // theme doesn't expose a token for it, so we fall back to a
342
+ // hard-coded value matching the CSS `--rh-input-height-xl`.
343
+ xl: 44
339
344
  };
340
345
  const paddingMap2 = {
341
346
  sm: 12,
342
347
  md: 14,
343
- lg: 16
348
+ lg: 16,
349
+ xl: 14
344
350
  };
345
351
  const fontSizeMap = {
346
352
  sm: 14,
347
353
  md: 14,
348
- lg: 16
354
+ lg: 16,
355
+ xl: 14
349
356
  };
350
357
  const radiusMap2 = {
351
358
  none: 0,
@@ -358,13 +365,13 @@ var TextInput = react.forwardRef(function TextInput2({
358
365
  full: 9999
359
366
  };
360
367
  const hasError = status === "error" || !!helperText;
361
- const borderColor = hasError ? theme.danger : focused ? theme.primary : theme.border;
368
+ const effectiveBorderColor = hasError ? theme.danger : focused ? theme.primary : borderColor ?? theme.border;
362
369
  const containerStyle = {
363
370
  height: heightMap[size],
364
371
  paddingHorizontal: paddingMap2[size],
365
372
  borderRadius: radiusMap2[radius],
366
373
  borderWidth: theme.borderWidthSm,
367
- borderColor,
374
+ borderColor: effectiveBorderColor,
368
375
  backgroundColor: isDisabled ? theme.background : theme.surface,
369
376
  flexDirection: "row",
370
377
  alignItems: "center",
@@ -375,7 +382,19 @@ var TextInput = react.forwardRef(function TextInput2({
375
382
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [{ gap: 4 }, wrapperStyle], children: [
376
383
  label && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "row", alignItems: "baseline", gap: 4 }, children: [
377
384
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { fontSize: 14, fontWeight: "500", color: theme.text }, children: label }),
378
- subtitle && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { fontSize: 14, color: theme.textMuted }, children: subtitle })
385
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx(
386
+ reactNative.Text,
387
+ {
388
+ style: {
389
+ fontSize: 14,
390
+ // Required-marker convention (matches web): a lone
391
+ // `*` is rendered in danger color; any other text
392
+ // stays muted.
393
+ color: subtitle.trim() === "*" ? theme.danger : theme.textMuted
394
+ },
395
+ children: subtitle
396
+ }
397
+ )
379
398
  ] }),
380
399
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [containerStyle, style], children: [
381
400
  leftIcon && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityElementsHidden: true, children: leftIcon }),