@hoddy-ui/next 2.5.91 → 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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -226,6 +226,7 @@ interface TextFieldProps extends TextInputProps {
|
|
|
226
226
|
onFocus?: () => void;
|
|
227
227
|
onBlur?: () => void;
|
|
228
228
|
selectMenuProps?: Partial<SelectMenuProps>;
|
|
229
|
+
labelAlwaysOpen?: boolean;
|
|
229
230
|
}
|
|
230
231
|
interface TypographyProps extends TextProps {
|
|
231
232
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ interface TextFieldProps extends TextInputProps {
|
|
|
226
226
|
onFocus?: () => void;
|
|
227
227
|
onBlur?: () => void;
|
|
228
228
|
selectMenuProps?: Partial<SelectMenuProps>;
|
|
229
|
+
labelAlwaysOpen?: boolean;
|
|
229
230
|
}
|
|
230
231
|
interface TypographyProps extends TextProps {
|
|
231
232
|
children: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -143,6 +143,30 @@ function colors(theme) {
|
|
|
143
143
|
text: "#ffffff",
|
|
144
144
|
...extraColors?.light?.primary,
|
|
145
145
|
...extraColors?.dark?.primary
|
|
146
|
+
},
|
|
147
|
+
error: {
|
|
148
|
+
...extraColors?.light?.error,
|
|
149
|
+
...extraColors?.dark?.error
|
|
150
|
+
},
|
|
151
|
+
secondary: {
|
|
152
|
+
...extraColors?.light?.secondary,
|
|
153
|
+
...extraColors?.dark?.secondary
|
|
154
|
+
},
|
|
155
|
+
warning: {
|
|
156
|
+
...extraColors?.light?.warning,
|
|
157
|
+
...extraColors?.dark?.warning
|
|
158
|
+
},
|
|
159
|
+
success: {
|
|
160
|
+
...extraColors?.light?.success,
|
|
161
|
+
...extraColors?.dark?.success
|
|
162
|
+
},
|
|
163
|
+
info: {
|
|
164
|
+
...extraColors?.light?.info,
|
|
165
|
+
...extraColors?.dark?.info
|
|
166
|
+
},
|
|
167
|
+
blue: {
|
|
168
|
+
...extraColors?.light?.blue,
|
|
169
|
+
...extraColors?.dark?.blue
|
|
146
170
|
}
|
|
147
171
|
};
|
|
148
172
|
const dynamicColors = theme === "dark" ? darkColors : lightColors;
|
|
@@ -1601,6 +1625,7 @@ var TextFieldBase = import_react16.default.forwardRef(
|
|
|
1601
1625
|
options,
|
|
1602
1626
|
multiline,
|
|
1603
1627
|
selectMenuProps,
|
|
1628
|
+
labelAlwaysOpen,
|
|
1604
1629
|
...props
|
|
1605
1630
|
}, ref) => {
|
|
1606
1631
|
const colors2 = useColors();
|
|
@@ -1619,7 +1644,7 @@ var TextFieldBase = import_react16.default.forwardRef(
|
|
|
1619
1644
|
};
|
|
1620
1645
|
const isFloating = labelVariant === "floating";
|
|
1621
1646
|
const hasPlaceholder = placeholder != null && String(placeholder).trim() !== "";
|
|
1622
|
-
const labelOpen = focused || value || isFloating && hasPlaceholder;
|
|
1647
|
+
const labelOpen = labelAlwaysOpen || focused || value || isFloating && hasPlaceholder;
|
|
1623
1648
|
const baseHeight = (0, import_react_native_size_matters13.moderateScale)(
|
|
1624
1649
|
multiline ? 50 + (props.numberOfLines || 1) * 18 : 50
|
|
1625
1650
|
);
|
|
@@ -1850,7 +1875,7 @@ var TextFieldBase = import_react16.default.forwardRef(
|
|
|
1850
1875
|
keyboardType,
|
|
1851
1876
|
placeholderTextColor: colors2.textSecondary.light,
|
|
1852
1877
|
editable: !disabled,
|
|
1853
|
-
placeholder,
|
|
1878
|
+
placeholder: labelOpen ? placeholder : "",
|
|
1854
1879
|
selectTextOnFocus: !disabled,
|
|
1855
1880
|
onSubmitEditing,
|
|
1856
1881
|
multiline,
|