dhre-ui-kit 0.0.243 → 0.0.244

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/lib/index.d.ts CHANGED
@@ -612,6 +612,7 @@ interface CommonTextInputProps extends TextInputProps$1 {
612
612
  handlePress?: () => void;
613
613
  rightIcon?: () => React$1.ReactElement;
614
614
  onRightIconPress?: () => void;
615
+ onlyErrorBorderLabel?: boolean;
615
616
  }
616
617
  declare const CommonTextInput: (props: CommonTextInputProps) => React$1.JSX.Element;
617
618
 
package/lib/index.js CHANGED
@@ -3439,7 +3439,8 @@ const CommonTextInput = (props) => {
3439
3439
  multiline = false,
3440
3440
  // Default multiline to false
3441
3441
  rightIcon,
3442
- onRightIconPress
3442
+ onRightIconPress,
3443
+ onlyErrorBorderLabel
3443
3444
  } = props;
3444
3445
  return /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: handlePress, style: styles$9.container }, /* @__PURE__ */ React__default["default"].createElement(
3445
3446
  reactNativePaper.TextInput,
@@ -3451,7 +3452,7 @@ const CommonTextInput = (props) => {
3451
3452
  autoCorrect: false,
3452
3453
  outlineStyle: {
3453
3454
  ...styles$9.outlineStyle,
3454
- borderColor: errorMessage?.length ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : value?.length ? activeBorderColor : inactiveBorderColor
3455
+ borderColor: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : value?.length ? activeBorderColor : inactiveBorderColor
3455
3456
  },
3456
3457
  label,
3457
3458
  value,
@@ -3461,12 +3462,12 @@ const CommonTextInput = (props) => {
3461
3462
  theme: {
3462
3463
  colors: {
3463
3464
  onSurfaceVariant: value?.length ? activeBorderColor : inactiveBorderColor,
3464
- error: errorMessage?.length ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : DHRE_COLORS_TEXT.DH_BLACK,
3465
+ error: errorMessage?.length || onlyErrorBorderLabel ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : DHRE_COLORS_TEXT.DH_BLACK,
3465
3466
  primary: labelColor ? errorMessage?.length ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : labelColor : DHRE_COLORS_TEXT.DH_BLACK
3466
3467
  }
3467
3468
  },
3468
3469
  style: [
3469
- errorMessage ? styles$9.errorInput : styles$9.input,
3470
+ errorMessage || onlyErrorBorderLabel ? styles$9.errorInput : styles$9.input,
3470
3471
  inputStyle,
3471
3472
  multiline && styles$9.multilineInput
3472
3473
  // Apply multiline style if true
@@ -3476,7 +3477,7 @@ const CommonTextInput = (props) => {
3476
3477
  placeholder: placeholderText,
3477
3478
  editable,
3478
3479
  pointerEvents,
3479
- error: errorMessage?.length ? true : false,
3480
+ error: errorMessage?.length || onlyErrorBorderLabel ? true : false,
3480
3481
  multiline,
3481
3482
  numberOfLines: multiline ? 4 : 1,
3482
3483
  right: rightIcon ? /* @__PURE__ */ React__default["default"].createElement(