@dloizides/ui-forms 1.25.0 → 1.26.0
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/CHANGELOG.md +9 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -807,7 +807,6 @@ var TRANSITION_DURATION = "0.14s";
|
|
|
807
807
|
var TRANSITION_TIMING = "ease";
|
|
808
808
|
var NO_RING = { outlineWidth: 0 };
|
|
809
809
|
var HOVER_BORDER_ALPHA = 0.22;
|
|
810
|
-
var PLACEHOLDER_ALPHA = 0.6;
|
|
811
810
|
var HEX_RADIX = 16;
|
|
812
811
|
var HEX_SHORT_LENGTH = 4;
|
|
813
812
|
var HEX_FULL_LENGTH = 7;
|
|
@@ -856,9 +855,10 @@ function useThemedInput(options = {}) {
|
|
|
856
855
|
const style = useMemo(() => {
|
|
857
856
|
const restBorder = hasError ? errorColor : colors.border;
|
|
858
857
|
const focusBorder = hasError ? errorColor : primary;
|
|
859
|
-
const
|
|
858
|
+
const editableBorder = isFocused ? focusBorder : isHovered ? withAlpha(colors.text, HOVER_BORDER_ALPHA) : restBorder;
|
|
859
|
+
const borderColor = editable ? editableBorder : restBorder;
|
|
860
860
|
const editableFill = isFocused ? colors.surface : colors.surfaceElevated;
|
|
861
|
-
const backgroundColor = editable ? editableFill : colors.
|
|
861
|
+
const backgroundColor = editable ? editableFill : colors.surface;
|
|
862
862
|
const base = { color: editable ? colors.text : colors.textSecondary, borderColor, backgroundColor };
|
|
863
863
|
if (!IS_WEB5) return base;
|
|
864
864
|
const ringColor = hasError ? errorColor : themeFocusRingColor(theme);
|
|
@@ -893,7 +893,7 @@ function useThemedInput(options = {}) {
|
|
|
893
893
|
);
|
|
894
894
|
return {
|
|
895
895
|
style,
|
|
896
|
-
placeholderTextColor:
|
|
896
|
+
placeholderTextColor: colors.textSecondary,
|
|
897
897
|
isFocused,
|
|
898
898
|
isHovered,
|
|
899
899
|
focusBind,
|
|
@@ -1136,6 +1136,7 @@ var FormField = ({
|
|
|
1136
1136
|
containerStyle,
|
|
1137
1137
|
recentKey,
|
|
1138
1138
|
recentMax,
|
|
1139
|
+
inputRef,
|
|
1139
1140
|
...textInputProps
|
|
1140
1141
|
}) => /* @__PURE__ */ jsx(
|
|
1141
1142
|
Field,
|
|
@@ -1155,7 +1156,7 @@ var FormField = ({
|
|
|
1155
1156
|
testID: "form-field-input",
|
|
1156
1157
|
...textInputProps
|
|
1157
1158
|
};
|
|
1158
|
-
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : /* @__PURE__ */ jsx(ThemedTextInput, { ...inputProps });
|
|
1159
|
+
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : /* @__PURE__ */ jsx(ThemedTextInput, { ref: inputRef, ...inputProps });
|
|
1159
1160
|
}
|
|
1160
1161
|
}
|
|
1161
1162
|
);
|
|
@@ -1736,7 +1737,7 @@ function SelectControl({
|
|
|
1736
1737
|
"aria-expanded": isOpen,
|
|
1737
1738
|
"aria-labelledby": labelledById,
|
|
1738
1739
|
onPress: toggle,
|
|
1739
|
-
style: [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.
|
|
1740
|
+
style: [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }],
|
|
1740
1741
|
testID: `${testID}-trigger`,
|
|
1741
1742
|
children: [
|
|
1742
1743
|
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: value === "" ? colors.textSecondary : colors.text }], children: selectedLabel }),
|