@dloizides/ui-forms 1.24.0 → 1.25.1
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 +6 -0
- package/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -856,9 +856,11 @@ function useThemedInput(options = {}) {
|
|
|
856
856
|
const style = useMemo(() => {
|
|
857
857
|
const restBorder = hasError ? errorColor : colors.border;
|
|
858
858
|
const focusBorder = hasError ? errorColor : primary;
|
|
859
|
-
const
|
|
859
|
+
const editableBorder = isFocused ? focusBorder : isHovered ? withAlpha(colors.text, HOVER_BORDER_ALPHA) : restBorder;
|
|
860
|
+
const readOnlyBorder = hasError ? errorColor : colors.surface;
|
|
861
|
+
const borderColor = editable ? editableBorder : readOnlyBorder;
|
|
860
862
|
const editableFill = isFocused ? colors.surface : colors.surfaceElevated;
|
|
861
|
-
const backgroundColor = editable ? editableFill : colors.
|
|
863
|
+
const backgroundColor = editable ? editableFill : colors.surface;
|
|
862
864
|
const base = { color: editable ? colors.text : colors.textSecondary, borderColor, backgroundColor };
|
|
863
865
|
if (!IS_WEB5) return base;
|
|
864
866
|
const ringColor = hasError ? errorColor : themeFocusRingColor(theme);
|
|
@@ -1759,6 +1761,28 @@ function SelectControl({
|
|
|
1759
1761
|
) : null
|
|
1760
1762
|
] });
|
|
1761
1763
|
}
|
|
1764
|
+
var SelectField = ({
|
|
1765
|
+
label,
|
|
1766
|
+
accessibilityHint,
|
|
1767
|
+
value,
|
|
1768
|
+
options,
|
|
1769
|
+
onChange,
|
|
1770
|
+
testID
|
|
1771
|
+
}) => {
|
|
1772
|
+
const selected = options.find((option) => option.value === value)?.label ?? "";
|
|
1773
|
+
return /* @__PURE__ */ jsx(Field, { label, children: ({ labelId }) => /* @__PURE__ */ jsx(
|
|
1774
|
+
SelectControl,
|
|
1775
|
+
{
|
|
1776
|
+
accessibilityHint,
|
|
1777
|
+
accessibilityLabel: `${label}: ${selected}`,
|
|
1778
|
+
labelledById: labelId,
|
|
1779
|
+
options,
|
|
1780
|
+
testID,
|
|
1781
|
+
value,
|
|
1782
|
+
onChange
|
|
1783
|
+
}
|
|
1784
|
+
) });
|
|
1785
|
+
};
|
|
1762
1786
|
var CLOSE_DELAY_MS2 = 140;
|
|
1763
1787
|
function useDelayedBlurClose(open, close) {
|
|
1764
1788
|
const timerRef = useRef(null);
|
|
@@ -2327,6 +2351,6 @@ var UploadWithLinkField = ({
|
|
|
2327
2351
|
] });
|
|
2328
2352
|
};
|
|
2329
2353
|
|
|
2330
|
-
export { AlignToControl, AnchoredMenu, ChipSelector, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateRangeControl, Field, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStatusLine, FormSwitch, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, SelectControl, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
|
2354
|
+
export { AlignToControl, AnchoredMenu, ChipSelector, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateRangeControl, Field, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStatusLine, FormSwitch, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, SelectControl, SelectField, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
|
2331
2355
|
//# sourceMappingURL=index.mjs.map
|
|
2332
2356
|
//# sourceMappingURL=index.mjs.map
|