@hoddy-ui/next 2.5.92 → 2.5.94

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/index.d.mts CHANGED
@@ -226,8 +226,7 @@ interface TextFieldProps extends TextInputProps {
226
226
  onFocus?: () => void;
227
227
  onBlur?: () => void;
228
228
  selectMenuProps?: Partial<SelectMenuProps>;
229
- /** When true (default), floating label is in open state when placeholder is set. When false, label only opens on focus or when value is set. */
230
- openLabelWithPlaceholder?: boolean;
229
+ labelAlwaysOpen?: boolean;
231
230
  }
232
231
  interface TypographyProps extends TextProps {
233
232
  children: ReactNode;
package/dist/index.d.ts CHANGED
@@ -226,8 +226,7 @@ interface TextFieldProps extends TextInputProps {
226
226
  onFocus?: () => void;
227
227
  onBlur?: () => void;
228
228
  selectMenuProps?: Partial<SelectMenuProps>;
229
- /** When true (default), floating label is in open state when placeholder is set. When false, label only opens on focus or when value is set. */
230
- openLabelWithPlaceholder?: boolean;
229
+ labelAlwaysOpen?: boolean;
231
230
  }
232
231
  interface TypographyProps extends TextProps {
233
232
  children: ReactNode;
package/dist/index.js CHANGED
@@ -1625,7 +1625,7 @@ var TextFieldBase = import_react16.default.forwardRef(
1625
1625
  options,
1626
1626
  multiline,
1627
1627
  selectMenuProps,
1628
- openLabelWithPlaceholder = true,
1628
+ labelAlwaysOpen,
1629
1629
  ...props
1630
1630
  }, ref) => {
1631
1631
  const colors2 = useColors();
@@ -1643,8 +1643,7 @@ var TextFieldBase = import_react16.default.forwardRef(
1643
1643
  }
1644
1644
  };
1645
1645
  const isFloating = labelVariant === "floating";
1646
- const hasPlaceholder = placeholder != null && String(placeholder).trim() !== "";
1647
- const labelOpen = focused || value || isFloating && hasPlaceholder && openLabelWithPlaceholder;
1646
+ const labelOpen = labelAlwaysOpen || focused || value;
1648
1647
  const baseHeight = (0, import_react_native_size_matters13.moderateScale)(
1649
1648
  multiline ? 50 + (props.numberOfLines || 1) * 18 : 50
1650
1649
  );
@@ -1875,7 +1874,7 @@ var TextFieldBase = import_react16.default.forwardRef(
1875
1874
  keyboardType,
1876
1875
  placeholderTextColor: colors2.textSecondary.light,
1877
1876
  editable: !disabled,
1878
- placeholder,
1877
+ placeholder: labelOpen ? placeholder : "",
1879
1878
  selectTextOnFocus: !disabled,
1880
1879
  onSubmitEditing,
1881
1880
  multiline,