@dloizides/ui-forms 1.24.0 → 1.25.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/dist/index.mjs CHANGED
@@ -1759,6 +1759,28 @@ function SelectControl({
1759
1759
  ) : null
1760
1760
  ] });
1761
1761
  }
1762
+ var SelectField = ({
1763
+ label,
1764
+ accessibilityHint,
1765
+ value,
1766
+ options,
1767
+ onChange,
1768
+ testID
1769
+ }) => {
1770
+ const selected = options.find((option) => option.value === value)?.label ?? "";
1771
+ return /* @__PURE__ */ jsx(Field, { label, children: ({ labelId }) => /* @__PURE__ */ jsx(
1772
+ SelectControl,
1773
+ {
1774
+ accessibilityHint,
1775
+ accessibilityLabel: `${label}: ${selected}`,
1776
+ labelledById: labelId,
1777
+ options,
1778
+ testID,
1779
+ value,
1780
+ onChange
1781
+ }
1782
+ ) });
1783
+ };
1762
1784
  var CLOSE_DELAY_MS2 = 140;
1763
1785
  function useDelayedBlurClose(open, close) {
1764
1786
  const timerRef = useRef(null);
@@ -2327,6 +2349,6 @@ var UploadWithLinkField = ({
2327
2349
  ] });
2328
2350
  };
2329
2351
 
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 };
2352
+ 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
2353
  //# sourceMappingURL=index.mjs.map
2332
2354
  //# sourceMappingURL=index.mjs.map