@dloizides/ui-forms 1.18.2 → 1.18.4

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
@@ -865,8 +865,11 @@ function RecentInputField({
865
865
  );
866
866
  const handleBlur = useCallback(
867
867
  (event) => {
868
- if (latestText.current.trim() !== "") remember(latestText.current);
869
- setTimeout(() => setIsOpen(false), CLOSE_DELAY_MS);
868
+ const blurredText = latestText.current;
869
+ setTimeout(() => {
870
+ setIsOpen(false);
871
+ if (blurredText.trim() !== "") remember(blurredText);
872
+ }, CLOSE_DELAY_MS);
870
873
  onBlur?.(event);
871
874
  },
872
875
  [remember, onBlur]
@@ -1407,6 +1410,7 @@ var FormCheckbox = ({
1407
1410
  const brand = palette.primary["500"];
1408
1411
  const hintText = typeof hint === "string" && hint !== "" ? hint : description;
1409
1412
  const hasHint = typeof hintText === "string" && hintText !== "";
1413
+ const { hintId } = useFieldIds();
1410
1414
  const themeStyles = React2.useMemo(() => {
1411
1415
  const boxOn = { backgroundColor: brand, borderColor: brand };
1412
1416
  const boxOff = { backgroundColor: "transparent", borderColor: colors.border };
@@ -1435,6 +1439,7 @@ var FormCheckbox = ({
1435
1439
  accessibilityRole: "checkbox",
1436
1440
  accessibilityState: { checked: value, disabled },
1437
1441
  "aria-checked": value,
1442
+ "aria-describedby": hasHint ? hintId : void 0,
1438
1443
  disabled,
1439
1444
  onPress: toggle,
1440
1445
  role: "checkbox",
@@ -1450,7 +1455,7 @@ var FormCheckbox = ({
1450
1455
  /* @__PURE__ */ jsx(View, { style: [styles7.box, value ? themeStyles.boxOn : themeStyles.boxOff], children: value ? /* @__PURE__ */ jsx(Text, { style: [styles7.check, { color: colors.surface }], accessibilityElementsHidden: true, children: "\u2713" }) : null }),
1451
1456
  /* @__PURE__ */ jsxs(View, { style: styles7.textColumn, children: [
1452
1457
  /* @__PURE__ */ jsx(Text, { style: [styles7.label, themeStyles.label], children: label }),
1453
- hasHint ? /* @__PURE__ */ jsx(Text, { style: [styles7.hint, themeStyles.hint], children: hintText }) : null
1458
+ hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [styles7.hint, themeStyles.hint], children: hintText }) : null
1454
1459
  ] })
1455
1460
  ]
1456
1461
  }