@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.mjs
CHANGED
|
@@ -65,6 +65,30 @@ function colors(theme) {
|
|
|
65
65
|
text: "#ffffff",
|
|
66
66
|
...extraColors?.light?.primary,
|
|
67
67
|
...extraColors?.dark?.primary
|
|
68
|
+
},
|
|
69
|
+
error: {
|
|
70
|
+
...extraColors?.light?.error,
|
|
71
|
+
...extraColors?.dark?.error
|
|
72
|
+
},
|
|
73
|
+
secondary: {
|
|
74
|
+
...extraColors?.light?.secondary,
|
|
75
|
+
...extraColors?.dark?.secondary
|
|
76
|
+
},
|
|
77
|
+
warning: {
|
|
78
|
+
...extraColors?.light?.warning,
|
|
79
|
+
...extraColors?.dark?.warning
|
|
80
|
+
},
|
|
81
|
+
success: {
|
|
82
|
+
...extraColors?.light?.success,
|
|
83
|
+
...extraColors?.dark?.success
|
|
84
|
+
},
|
|
85
|
+
info: {
|
|
86
|
+
...extraColors?.light?.info,
|
|
87
|
+
...extraColors?.dark?.info
|
|
88
|
+
},
|
|
89
|
+
blue: {
|
|
90
|
+
...extraColors?.light?.blue,
|
|
91
|
+
...extraColors?.dark?.blue
|
|
68
92
|
}
|
|
69
93
|
};
|
|
70
94
|
const dynamicColors = theme === "dark" ? darkColors : lightColors;
|
|
@@ -1566,6 +1590,7 @@ var TextFieldBase = React15.forwardRef(
|
|
|
1566
1590
|
options,
|
|
1567
1591
|
multiline,
|
|
1568
1592
|
selectMenuProps,
|
|
1593
|
+
labelAlwaysOpen,
|
|
1569
1594
|
...props
|
|
1570
1595
|
}, ref) => {
|
|
1571
1596
|
const colors2 = useColors();
|
|
@@ -1584,7 +1609,7 @@ var TextFieldBase = React15.forwardRef(
|
|
|
1584
1609
|
};
|
|
1585
1610
|
const isFloating = labelVariant === "floating";
|
|
1586
1611
|
const hasPlaceholder = placeholder != null && String(placeholder).trim() !== "";
|
|
1587
|
-
const labelOpen = focused || value || isFloating && hasPlaceholder;
|
|
1612
|
+
const labelOpen = labelAlwaysOpen || focused || value || isFloating && hasPlaceholder;
|
|
1588
1613
|
const baseHeight = moderateScale2(
|
|
1589
1614
|
multiline ? 50 + (props.numberOfLines || 1) * 18 : 50
|
|
1590
1615
|
);
|
|
@@ -1815,7 +1840,7 @@ var TextFieldBase = React15.forwardRef(
|
|
|
1815
1840
|
keyboardType,
|
|
1816
1841
|
placeholderTextColor: colors2.textSecondary.light,
|
|
1817
1842
|
editable: !disabled,
|
|
1818
|
-
placeholder,
|
|
1843
|
+
placeholder: labelOpen ? placeholder : "",
|
|
1819
1844
|
selectTextOnFocus: !disabled,
|
|
1820
1845
|
onSubmitEditing,
|
|
1821
1846
|
multiline,
|