@dloizides/ui-forms 1.42.3 → 1.43.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
@@ -1888,6 +1888,61 @@ var FormCheckbox = ({
1888
1888
  }
1889
1889
  );
1890
1890
  };
1891
+ var NATIVE_SELECT_BOX = {
1892
+ borderStyle: "solid",
1893
+ boxSizing: "border-box",
1894
+ fontFamily: "inherit",
1895
+ width: "100%"
1896
+ };
1897
+ function nativeSelectStyle(borderColor, backgroundColor, color) {
1898
+ const trigger = StyleSheet.flatten(controlStyles.selectTrigger);
1899
+ const text = StyleSheet.flatten(controlStyles.selectTriggerText);
1900
+ return {
1901
+ ...NATIVE_SELECT_BOX,
1902
+ minHeight: trigger.minHeight,
1903
+ borderWidth: trigger.borderWidth,
1904
+ borderRadius: trigger.borderRadius,
1905
+ fontSize: text.fontSize,
1906
+ paddingBlock: trigger.paddingVertical,
1907
+ paddingInline: trigger.paddingHorizontal,
1908
+ borderColor,
1909
+ backgroundColor,
1910
+ color
1911
+ };
1912
+ }
1913
+ function NativeSelect({
1914
+ options,
1915
+ value,
1916
+ onChange,
1917
+ placeholder = "",
1918
+ accessibilityLabel,
1919
+ accessibilityHint,
1920
+ labelledById,
1921
+ style,
1922
+ testID
1923
+ }) {
1924
+ const { theme } = useUi();
1925
+ const { colors } = theme;
1926
+ const hasMatch = options.some((o) => o.value === value);
1927
+ const textColor = hasMatch ? colors.text : colors.textSecondary;
1928
+ const handleChange = (event) => onChange(event.target.value);
1929
+ return /* @__PURE__ */ jsx(View, { style: [controlStyles.anchor, style], children: /* @__PURE__ */ jsxs(
1930
+ "select",
1931
+ {
1932
+ "aria-label": accessibilityLabel,
1933
+ "aria-labelledby": labelledById,
1934
+ "data-testid": `${testID}-trigger`,
1935
+ style: nativeSelectStyle(colors.border, colors.surfaceElevated, textColor),
1936
+ title: accessibilityHint,
1937
+ value,
1938
+ onChange: handleChange,
1939
+ children: [
1940
+ hasMatch ? null : /* @__PURE__ */ jsx("option", { disabled: true, value, children: placeholder }),
1941
+ options.map((o) => /* @__PURE__ */ jsx("option", { value: o.value, children: o.label }, o.value))
1942
+ ]
1943
+ }
1944
+ ) });
1945
+ }
1891
1946
 
1892
1947
  // src/controls/nextHighlight.ts
1893
1948
  var NO_HIGHLIGHT = -1;
@@ -1920,6 +1975,7 @@ function useSelectListbox({ options, isOpen, open, toggle: toggle2, select }) {
1920
1975
  };
1921
1976
  return { highlighted, onKeyDown };
1922
1977
  }
1978
+ var IS_WEB7 = Platform.OS === "web";
1923
1979
  var CHEVRON_DOWN = "\u25BE";
1924
1980
  var CHEVRON_UP = "\u25B4";
1925
1981
  function listboxTriggerAria(testID, hasList, highlighted) {
@@ -1929,7 +1985,10 @@ function listboxTriggerAria(testID, hasList, highlighted) {
1929
1985
  "aria-activedescendant": highlighted !== void 0 ? optionDomId(testID, highlighted.value) : void 0
1930
1986
  };
1931
1987
  }
1932
- function SelectControl({
1988
+ function SelectControl(props) {
1989
+ return props.native === true && IS_WEB7 ? /* @__PURE__ */ jsx(NativeSelect, { ...props }) : /* @__PURE__ */ jsx(MenuSelectControl, { ...props });
1990
+ }
1991
+ function MenuSelectControl({
1933
1992
  options,
1934
1993
  value,
1935
1994
  onChange,
@@ -3140,11 +3199,11 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
3140
3199
  open ? /* @__PURE__ */ jsx(PickerSurface, { anchorRef, label: labels.dialog, minWidth: SINGLE_PICKER_WIDTH, phone, testID: `${testID}-picker`, onDismiss: close, children: /* @__PURE__ */ jsx(SingleCalendar, { bounds, testID: `${testID}-picker`, value, onCommit: commit }) }) : null
3141
3200
  ] });
3142
3201
  }
3143
- var IS_WEB7 = Platform.OS === "web";
3202
+ var IS_WEB8 = Platform.OS === "web";
3144
3203
  var DATE_TYPE = "date";
3145
3204
  function TemporalInput({ fieldProps, context, webInputType, onTypedError }) {
3146
- if (IS_WEB7 && webInputType === DATE_TYPE) return /* @__PURE__ */ jsx(DatePickerInput, { context, fieldProps, onTypedError });
3147
- if (IS_WEB7) return /* @__PURE__ */ jsx(WebDateInput, { context, fieldProps, webInputType });
3205
+ if (IS_WEB8 && webInputType === DATE_TYPE) return /* @__PURE__ */ jsx(DatePickerInput, { context, fieldProps, onTypedError });
3206
+ if (IS_WEB8) return /* @__PURE__ */ jsx(WebDateInput, { context, fieldProps, webInputType });
3148
3207
  return /* @__PURE__ */ jsx(
3149
3208
  ThemedTextInput,
3150
3209
  {
@@ -3434,7 +3493,7 @@ function WebDateRange({ value, onChange, onSubmit, fromLabel, toLabel, hint, tes
3434
3493
  ) }) : null
3435
3494
  ] });
3436
3495
  }
3437
- var IS_WEB8 = Platform.OS === "web";
3496
+ var IS_WEB9 = Platform.OS === "web";
3438
3497
  function DateRangeControl({
3439
3498
  value,
3440
3499
  onChange,
@@ -3448,7 +3507,7 @@ function DateRangeControl({
3448
3507
  const hint = accessibilityHint ?? `${fromLabel} \u2013 ${toLabel}`;
3449
3508
  const { labels } = useDatePickerConfig();
3450
3509
  const [typedError, setTypedError] = useState(void 0);
3451
- if (!IS_WEB8) {
3510
+ if (!IS_WEB9) {
3452
3511
  return /* @__PURE__ */ jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsx(NativeDateRange, { fromLabel, hint, style, testID, toLabel, value, onChange, onSubmit }) });
3453
3512
  }
3454
3513
  return /* @__PURE__ */ jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsx(View, { style, testID: `${testID}-range`, children: /* @__PURE__ */ jsx(Field, { error: typedError, label: `${fromLabel}${labels.rangeSeparator}${toLabel}`, children: (context) => /* @__PURE__ */ jsx(WebDateRange, { context, fromLabel, hint, testID, toLabel, value, onChange, onSubmit, onTypedError: setTypedError }) }) }) });
@@ -3634,12 +3693,70 @@ function useKeepInView(trigger) {
3634
3693
  }, [trigger]);
3635
3694
  return ref;
3636
3695
  }
3696
+ var IS_WEB10 = Platform.OS === "web";
3697
+ var INPUT_FONT2 = 14;
3698
+ var styles20 = StyleSheet.create({
3699
+ nativeButton: { minHeight: MIN_TOUCH_TARGET_PX, minWidth: MIN_TOUCH_TARGET_PX, justifyContent: "center" },
3700
+ nativeText: { fontSize: INPUT_FONT2 }
3701
+ });
3702
+ function FileInput({
3703
+ accessibilityLabel,
3704
+ accessibilityHint,
3705
+ onFiles,
3706
+ accept,
3707
+ multiple = false,
3708
+ disabled = false,
3709
+ id,
3710
+ describedById,
3711
+ nativeLabel,
3712
+ onNativePick,
3713
+ testID
3714
+ }) {
3715
+ const { theme } = useUi();
3716
+ const { colors } = theme;
3717
+ if (!IS_WEB10) {
3718
+ return /* @__PURE__ */ jsx(
3719
+ Pressable,
3720
+ {
3721
+ accessibilityHint,
3722
+ accessibilityLabel,
3723
+ accessibilityRole: "button",
3724
+ accessibilityState: { disabled },
3725
+ disabled,
3726
+ style: styles20.nativeButton,
3727
+ testID,
3728
+ onPress: onNativePick,
3729
+ children: /* @__PURE__ */ jsx(Text, { style: [styles20.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
3730
+ }
3731
+ );
3732
+ }
3733
+ const handleChange = (event) => {
3734
+ const files = Array.from(event.target.files ?? []);
3735
+ if (files.length > 0) onFiles(files);
3736
+ };
3737
+ return /* @__PURE__ */ jsx(
3738
+ "input",
3739
+ {
3740
+ accept,
3741
+ "aria-describedby": describedById,
3742
+ "aria-label": accessibilityLabel,
3743
+ "data-testid": testID,
3744
+ disabled,
3745
+ id,
3746
+ multiple,
3747
+ style: { minHeight: MIN_TOUCH_TARGET_PX, color: colors.text, fontSize: INPUT_FONT2, fontFamily: "inherit" },
3748
+ title: accessibilityHint,
3749
+ type: "file",
3750
+ onChange: handleChange
3751
+ }
3752
+ );
3753
+ }
3637
3754
  var DEFAULT_PREVIEW_PX = 48;
3638
3755
  var PREVIEW_RADIUS = 8;
3639
3756
  var GAP6 = 8;
3640
3757
  var TITLE_FONT_SIZE = 14;
3641
3758
  var HELP_FONT_SIZE = 13;
3642
- var styles20 = StyleSheet.create({
3759
+ var styles21 = StyleSheet.create({
3643
3760
  help: { flex: 1, fontSize: HELP_FONT_SIZE },
3644
3761
  root: { gap: GAP6 },
3645
3762
  tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
@@ -3661,11 +3778,11 @@ var UploadWithLinkField = ({
3661
3778
  const url = value ?? "";
3662
3779
  const [pasting, setPasting] = useState(url !== "");
3663
3780
  const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
3664
- return /* @__PURE__ */ jsxs(View, { style: styles20.root, children: [
3665
- /* @__PURE__ */ jsx(Text, { style: [styles20.title, { color: theme.colors.text }], children: labels.title }),
3666
- /* @__PURE__ */ jsxs(View, { style: styles20.tile, children: [
3781
+ return /* @__PURE__ */ jsxs(View, { style: styles21.root, children: [
3782
+ /* @__PURE__ */ jsx(Text, { style: [styles21.title, { color: theme.colors.text }], children: labels.title }),
3783
+ /* @__PURE__ */ jsxs(View, { style: styles21.tile, children: [
3667
3784
  url === "" ? /* @__PURE__ */ jsx(View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsx(Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
3668
- labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles20.help, { color: theme.colors.text }], children: labels.help })
3785
+ labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles21.help, { color: theme.colors.text }], children: labels.help })
3669
3786
  ] }),
3670
3787
  uploadControl,
3671
3788
  /* @__PURE__ */ jsx(
@@ -3676,12 +3793,12 @@ var UploadWithLinkField = ({
3676
3793
  accessibilityRole: "button",
3677
3794
  accessibilityState: { expanded: pasting },
3678
3795
  "aria-expanded": pasting,
3679
- style: [styles20.toggle, ring.ringStyle],
3796
+ style: [styles21.toggle, ring.ringStyle],
3680
3797
  testID: `${testID}-paste`,
3681
3798
  onBlur: ring.onBlur,
3682
3799
  onFocus: ring.onFocus,
3683
3800
  onPress: () => setPasting(!pasting),
3684
- children: /* @__PURE__ */ jsx(Text, { style: [styles20.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
3801
+ children: /* @__PURE__ */ jsx(Text, { style: [styles21.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
3685
3802
  }
3686
3803
  ),
3687
3804
  pasting ? /* @__PURE__ */ jsx(
@@ -3700,7 +3817,7 @@ var UploadWithLinkField = ({
3700
3817
  };
3701
3818
  var ACTION_GAP = 8;
3702
3819
  var GROUP_GAP = 16;
3703
- var styles21 = StyleSheet.create({
3820
+ var styles22 = StyleSheet.create({
3704
3821
  action: { alignItems: "flex-start", marginTop: ACTION_GAP },
3705
3822
  group: { marginBottom: GROUP_GAP }
3706
3823
  });
@@ -3723,7 +3840,7 @@ var AddOnRequest = ({
3723
3840
  onRemove();
3724
3841
  };
3725
3842
  if (!isAddOnOpen(hasValue, requested))
3726
- return /* @__PURE__ */ jsx(View, { style: [styles21.action, style], children: /* @__PURE__ */ jsx(
3843
+ return /* @__PURE__ */ jsx(View, { style: [styles22.action, style], children: /* @__PURE__ */ jsx(
3727
3844
  Button,
3728
3845
  {
3729
3846
  accessibilityHint: addHint,
@@ -3735,9 +3852,9 @@ var AddOnRequest = ({
3735
3852
  onPress: () => setRequested(true)
3736
3853
  }
3737
3854
  ) });
3738
- return /* @__PURE__ */ jsxs(View, { style: [styles21.group, style], testID, children: [
3855
+ return /* @__PURE__ */ jsxs(View, { style: [styles22.group, style], testID, children: [
3739
3856
  children,
3740
- /* @__PURE__ */ jsx(View, { style: styles21.action, children: /* @__PURE__ */ jsx(
3857
+ /* @__PURE__ */ jsx(View, { style: styles22.action, children: /* @__PURE__ */ jsx(
3741
3858
  Button,
3742
3859
  {
3743
3860
  accessibilityHint: removeHint,
@@ -3754,7 +3871,7 @@ var AddOnRequest = ({
3754
3871
  var ROW_GAP3 = 8;
3755
3872
  var TEXT_SIZE = 13;
3756
3873
  var TEXT_LINE = 18;
3757
- var styles22 = StyleSheet.create({
3874
+ var styles23 = StyleSheet.create({
3758
3875
  row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
3759
3876
  text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
3760
3877
  });
@@ -3762,8 +3879,8 @@ var isFixBarVisible = (count) => count > 0;
3762
3879
  var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
3763
3880
  const { theme } = useUi();
3764
3881
  if (!isFixBarVisible(count)) return null;
3765
- return /* @__PURE__ */ jsxs(View, { style: [styles22.row, style], testID, children: [
3766
- /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles22.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
3882
+ return /* @__PURE__ */ jsxs(View, { style: [styles23.row, style], testID, children: [
3883
+ /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles23.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
3767
3884
  /* @__PURE__ */ jsx(
3768
3885
  Button,
3769
3886
  {
@@ -3801,21 +3918,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
3801
3918
  accessibilityLabel: option.label,
3802
3919
  accessibilityRole: "button",
3803
3920
  accessibilityState: { selected: active, checked: current },
3804
- style: [styles23.row, active ? { backgroundColor: colors.surface } : null],
3921
+ style: [styles24.row, active ? { backgroundColor: colors.surface } : null],
3805
3922
  testID: `${testID}-option-${option.value}`,
3806
3923
  onPress: () => onPick(option),
3807
3924
  children: [
3808
3925
  renderLeading?.(option),
3809
- /* @__PURE__ */ jsxs(View, { style: styles23.label, children: [
3810
- /* @__PURE__ */ jsx(Text, { style: [styles23.primary, { color: colors.text }], children: option.label }),
3811
- detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles23.secondary, { color: colors.textSecondary }], children: option.detail }) : null
3926
+ /* @__PURE__ */ jsxs(View, { style: styles24.label, children: [
3927
+ /* @__PURE__ */ jsx(Text, { style: [styles24.primary, { color: colors.text }], children: option.label }),
3928
+ detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles24.secondary, { color: colors.textSecondary }], children: option.detail }) : null
3812
3929
  ] }),
3813
3930
  renderDetail?.(option)
3814
3931
  ]
3815
3932
  }
3816
3933
  );
3817
3934
  }
3818
- var styles23 = StyleSheet.create({
3935
+ var styles24 = StyleSheet.create({
3819
3936
  row: { minHeight: MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
3820
3937
  label: { flex: 1 },
3821
3938
  primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
@@ -3829,11 +3946,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
3829
3946
  const { colors } = theme;
3830
3947
  if (options.length === 0) return null;
3831
3948
  return /* @__PURE__ */ jsxs(View, { children: [
3832
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles24.header, { color: colors.textSecondary }], children: title }),
3949
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles25.header, { color: colors.textSecondary }], children: title }),
3833
3950
  options.map((option, index) => /* @__PURE__ */ jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
3834
3951
  ] });
3835
3952
  }
3836
- var styles24 = StyleSheet.create({
3953
+ var styles25 = StyleSheet.create({
3837
3954
  header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
3838
3955
  });
3839
3956
  var KEY_ESCAPE = "Escape";
@@ -3863,7 +3980,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
3863
3980
  const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
3864
3981
  const isSheet = motion.surface === "sheet" /* Sheet */;
3865
3982
  const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
3866
- const list = /* @__PURE__ */ jsxs(View, { style: [styles25.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
3983
+ const list = /* @__PURE__ */ jsxs(View, { style: [styles26.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
3867
3984
  /* @__PURE__ */ jsx(
3868
3985
  TextInput,
3869
3986
  {
@@ -3880,16 +3997,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
3880
3997
  onSubmitEditing: submit
3881
3998
  }
3882
3999
  ),
3883
- /* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles25.sheetList : styles25.dropList, children: [
4000
+ /* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles26.sheetList : styles26.dropList, children: [
3884
4001
  /* @__PURE__ */ jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
3885
4002
  /* @__PURE__ */ jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
3886
- sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles25.empty, { color: colors.textSecondary }], children: labels.empty }) : null
4003
+ sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles26.empty, { color: colors.textSecondary }], children: labels.empty }) : null
3887
4004
  ] })
3888
4005
  ] });
3889
4006
  if (!isSheet) return /* @__PURE__ */ jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
3890
4007
  return /* @__PURE__ */ jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
3891
4008
  }
3892
- var styles25 = StyleSheet.create({
4009
+ var styles26 = StyleSheet.create({
3893
4010
  panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
3894
4011
  dropList: { maxHeight: MENU_MAX_HEIGHT },
3895
4012
  sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
@@ -3999,7 +4116,7 @@ function SearchSelect(props) {
3999
4116
  const onTriggerBlur = useCallback(() => {
4000
4117
  if (!openRef.current) onBlur?.();
4001
4118
  }, [onBlur]);
4002
- return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles26.anchor, children: [
4119
+ return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles27.anchor, children: [
4003
4120
  /* @__PURE__ */ jsx(
4004
4121
  Pressable,
4005
4122
  {
@@ -4008,7 +4125,7 @@ function SearchSelect(props) {
4008
4125
  accessibilityLabel,
4009
4126
  accessibilityRole: "button",
4010
4127
  accessibilityState: { expanded: state.open },
4011
- style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles26.customTrigger,
4128
+ style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles27.customTrigger,
4012
4129
  testID,
4013
4130
  onBlur: onTriggerBlur,
4014
4131
  onPress,
@@ -4020,7 +4137,7 @@ function SearchSelect(props) {
4020
4137
  }
4021
4138
  function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
4022
4139
  return /* @__PURE__ */ jsxs(Fragment, { children: [
4023
- /* @__PURE__ */ jsxs(View, { style: styles26.value, children: [
4140
+ /* @__PURE__ */ jsxs(View, { style: styles27.value, children: [
4024
4141
  selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
4025
4142
  /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
4026
4143
  selected !== null ? /* @__PURE__ */ jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
@@ -4033,7 +4150,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
4033
4150
  if (option.detail === void 0) return null;
4034
4151
  return /* @__PURE__ */ jsx(Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
4035
4152
  }
4036
- var styles26 = StyleSheet.create({
4153
+ var styles27 = StyleSheet.create({
4037
4154
  anchor: { position: "relative" },
4038
4155
  customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
4039
4156
  value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
@@ -4810,7 +4927,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
4810
4927
  const { theme } = useUi();
4811
4928
  const { textSecondary } = theme.colors;
4812
4929
  const options = useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
4813
- const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles27.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
4930
+ const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles28.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
4814
4931
  return /* @__PURE__ */ jsx(
4815
4932
  SearchSelect,
4816
4933
  {
@@ -4828,7 +4945,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
4828
4945
  }
4829
4946
  );
4830
4947
  }
4831
- var styles27 = StyleSheet.create({
4948
+ var styles28 = StyleSheet.create({
4832
4949
  code: { fontSize: CODE_FONT }
4833
4950
  });
4834
4951
  function useBlurVerdict(validate) {
@@ -5084,9 +5201,9 @@ var LINE_GAP = 4;
5084
5201
  function RejectionLine({ message, testID }) {
5085
5202
  const { theme } = useUi();
5086
5203
  if (message === null) return null;
5087
- return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles28.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
5204
+ return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles29.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
5088
5205
  }
5089
- var styles28 = StyleSheet.create({
5206
+ var styles29 = StyleSheet.create({
5090
5207
  line: { marginTop: LINE_GAP }
5091
5208
  });
5092
5209
 
@@ -5233,7 +5350,7 @@ var PAD_V = 10;
5233
5350
  var PAD_H = 16;
5234
5351
  var TEXT_SIZE2 = 13;
5235
5352
  var TEXT_LINE2 = 18;
5236
- var styles29 = StyleSheet.create({
5353
+ var styles30 = StyleSheet.create({
5237
5354
  bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
5238
5355
  actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
5239
5356
  message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
@@ -5245,9 +5362,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
5245
5362
  const { colors } = theme;
5246
5363
  const pinned = actionBarPosition(sticky, Platform.OS) === "sticky" ? PINNED : null;
5247
5364
  const hasMessage = message !== void 0 && message !== "";
5248
- return /* @__PURE__ */ jsxs(View, { style: [styles29.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
5249
- hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles29.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
5250
- /* @__PURE__ */ jsx(View, { style: styles29.actions, children })
5365
+ return /* @__PURE__ */ jsxs(View, { style: [styles30.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
5366
+ hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles30.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
5367
+ /* @__PURE__ */ jsx(View, { style: styles30.actions, children })
5251
5368
  ] });
5252
5369
  };
5253
5370
 
@@ -5255,14 +5372,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
5255
5372
  var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
5256
5373
  var TITLE_SIZE = 13;
5257
5374
  var TITLE_GAP = 6;
5258
- var styles30 = StyleSheet.create({
5375
+ var styles31 = StyleSheet.create({
5259
5376
  title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
5260
5377
  });
5261
5378
  var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
5262
5379
  const { theme } = useUi();
5263
5380
  const complete = isChecklistComplete(items, checked);
5264
5381
  return /* @__PURE__ */ jsxs(View, { testID, children: [
5265
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles30.title, { color: theme.colors.text }], children: title }),
5382
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles31.title, { color: theme.colors.text }], children: title }),
5266
5383
  items.map((item) => /* @__PURE__ */ jsx(
5267
5384
  FormCheckbox,
5268
5385
  {
@@ -5288,7 +5405,7 @@ var RADIUS2 = 8;
5288
5405
  var LABEL_SIZE = 14;
5289
5406
  var DESCRIPTION_SIZE = 12;
5290
5407
  var DESCRIPTION_LINE = 16;
5291
- var styles31 = StyleSheet.create({
5408
+ var styles32 = StyleSheet.create({
5292
5409
  row: {
5293
5410
  alignItems: "center",
5294
5411
  borderRadius: RADIUS2,
@@ -5319,15 +5436,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
5319
5436
  accessibilityState: identity.accessibilityState,
5320
5437
  "aria-checked": checked,
5321
5438
  disabled,
5322
- style: [styles31.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
5439
+ style: [styles32.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
5323
5440
  tabIndex,
5324
5441
  testID: identity.testID,
5325
5442
  onPress,
5326
5443
  children: [
5327
- /* @__PURE__ */ jsx(View, { style: [styles31.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles31.dotInner, { backgroundColor: colors.primary }] }) : null }),
5328
- /* @__PURE__ */ jsxs(View, { style: styles31.text, children: [
5329
- /* @__PURE__ */ jsx(Text, { style: [styles31.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
5330
- hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles31.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
5444
+ /* @__PURE__ */ jsx(View, { style: [styles32.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles32.dotInner, { backgroundColor: colors.primary }] }) : null }),
5445
+ /* @__PURE__ */ jsxs(View, { style: styles32.text, children: [
5446
+ /* @__PURE__ */ jsx(Text, { style: [styles32.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
5447
+ hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles32.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
5331
5448
  ] })
5332
5449
  ]
5333
5450
  }
@@ -5344,7 +5461,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
5344
5461
  };
5345
5462
  };
5346
5463
  var ROW_GAP7 = 8;
5347
- var styles32 = StyleSheet.create({
5464
+ var styles33 = StyleSheet.create({
5348
5465
  list: { rowGap: ROW_GAP7 }
5349
5466
  });
5350
5467
  function RadioList(props) {
@@ -5357,7 +5474,7 @@ function RadioList(props) {
5357
5474
  View,
5358
5475
  {
5359
5476
  accessibilityRole: "radiogroup",
5360
- style: styles32.list,
5477
+ style: styles33.list,
5361
5478
  ...webFieldA11y({ describedById, hasError }),
5362
5479
  ...radio.groupProps,
5363
5480
  children: options.map((option, index) => /* @__PURE__ */ jsx(
@@ -5411,11 +5528,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
5411
5528
  );
5412
5529
  }
5413
5530
  var BUTTON_BASIS = "40%";
5414
- var styles33 = StyleSheet.create({
5531
+ var styles34 = StyleSheet.create({
5415
5532
  cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
5416
5533
  });
5417
5534
  function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
5418
- return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles33.cell, children: /* @__PURE__ */ jsx(
5535
+ return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles34.cell, children: /* @__PURE__ */ jsx(
5419
5536
  Button,
5420
5537
  {
5421
5538
  fullWidth: true,
@@ -5496,12 +5613,12 @@ function StickyBarDecision(props) {
5496
5613
  }
5497
5614
  var TEXT_SIZE3 = 13;
5498
5615
  var TEXT_LINE3 = 18;
5499
- var styles34 = StyleSheet.create({
5616
+ var styles35 = StyleSheet.create({
5500
5617
  text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
5501
5618
  });
5502
5619
  var SubmitError = ({ message, testID }) => {
5503
5620
  const { theme } = useUi();
5504
- return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles34.text, { color: fieldErrorInk(theme) }], testID, children: message });
5621
+ return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles35.text, { color: fieldErrorInk(theme) }], testID, children: message });
5505
5622
  };
5506
5623
  var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
5507
5624
  function useDecisionPanel(outcomes, onSubmit) {
@@ -5544,7 +5661,7 @@ function useDecisionPanel(outcomes, onSubmit) {
5544
5661
  }
5545
5662
  var TITLE_SIZE2 = 15;
5546
5663
  var PANEL_GAP = 12;
5547
- var styles35 = StyleSheet.create({
5664
+ var styles36 = StyleSheet.create({
5548
5665
  panel: { rowGap: PANEL_GAP },
5549
5666
  title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
5550
5667
  });
@@ -5558,13 +5675,13 @@ function DecisionPanel(props) {
5558
5675
  const { theme } = useUi();
5559
5676
  const state = useDecisionPanel(outcomes, onSubmit);
5560
5677
  const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
5561
- return /* @__PURE__ */ jsxs(View, { style: [styles35.panel, style], testID, children: [
5562
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles35.title, { color: theme.colors.text }], children: labels.title }),
5678
+ return /* @__PURE__ */ jsxs(View, { style: [styles36.panel, style], testID, children: [
5679
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles36.title, { color: theme.colors.text }], children: labels.title }),
5563
5680
  checklist !== void 0 ? /* @__PURE__ */ jsx(GatedChecklist, { checked: state.checked, items: checklist.items, testID: `${testID}-checklist`, title: checklist.title, onToggle: state.toggleCheck, children: (complete) => body(!complete) }) : body(false),
5564
5681
  state.error === "submit" ? /* @__PURE__ */ jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
5565
5682
  ] });
5566
5683
  }
5567
5684
 
5568
- export { ActionBar, AddOnRequest, AlignToControl, AnchoredMenu, BicInput, BicRejection, COUNTRIES, ChipLabelWrap, ChipSelector, CountryField, CountryFlag, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, DateInput, DatePickerProvider, DateRangeControl, DateTimeField, DecisionPanel, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, FixBar, FlagShapeKind, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStack, FormStatusLine, FormSwitch, GatedChecklist, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, IbanInput, IbanRejection, InlineFieldRow, LINE_ITEMS_WIDE_MIN_WIDTH, LineItems, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, ResponsiveFormLayout, SearchSelect, SelectControl, SelectField, SelectSurface, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, suggestOptions, toCountryValue, toggleGroupSelection, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
5685
+ export { ActionBar, AddOnRequest, AlignToControl, AnchoredMenu, BicInput, BicRejection, COUNTRIES, ChipLabelWrap, ChipSelector, CountryField, CountryFlag, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, DateInput, DatePickerProvider, DateRangeControl, DateTimeField, DecisionPanel, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, FileInput, FixBar, FlagShapeKind, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStack, FormStatusLine, FormSwitch, GatedChecklist, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, IbanInput, IbanRejection, InlineFieldRow, LINE_ITEMS_WIDE_MIN_WIDTH, LineItems, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, ResponsiveFormLayout, SearchSelect, SelectControl, SelectField, SelectSurface, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, suggestOptions, toCountryValue, toggleGroupSelection, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
5569
5686
  //# sourceMappingURL=index.mjs.map
5570
5687
  //# sourceMappingURL=index.mjs.map