@hoddy-ui/next 2.5.92 → 2.5.93

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();
@@ -1644,7 +1644,7 @@ var TextFieldBase = import_react16.default.forwardRef(
1644
1644
  };
1645
1645
  const isFloating = labelVariant === "floating";
1646
1646
  const hasPlaceholder = placeholder != null && String(placeholder).trim() !== "";
1647
- const labelOpen = focused || value || isFloating && hasPlaceholder && openLabelWithPlaceholder;
1647
+ const labelOpen = labelAlwaysOpen || focused || value || isFloating && hasPlaceholder;
1648
1648
  const baseHeight = (0, import_react_native_size_matters13.moderateScale)(
1649
1649
  multiline ? 50 + (props.numberOfLines || 1) * 18 : 50
1650
1650
  );
@@ -1875,7 +1875,7 @@ var TextFieldBase = import_react16.default.forwardRef(
1875
1875
  keyboardType,
1876
1876
  placeholderTextColor: colors2.textSecondary.light,
1877
1877
  editable: !disabled,
1878
- placeholder,
1878
+ placeholder: labelOpen ? placeholder : "",
1879
1879
  selectTextOnFocus: !disabled,
1880
1880
  onSubmitEditing,
1881
1881
  multiline,