@dloizides/ui-forms 1.18.6 → 1.18.7

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 CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## 1.18.5
3
+ ## 1.18.7
4
+
5
+ - Focused inputs draw the fleet focus ring (`@dloizides/design-tokens` 1.14 `FOCUS_RING`: 2 px solid outline, 2 px offset, contrast-checked colour; error colour when errored) instead of the 3 px 16% box-shadow halo (FOCUS-RING-1 "One focus ring across the shared kit").
6
+
7
+ ## 1.18.6
4
8
 
5
9
  **ChipSelector: a short chip (e.g. "All") is at least 44 px wide, not only 44 px tall (KEFI-FIT-1 "kefi-web fit and hit-box fixes").**
6
10
 
package/dist/index.js CHANGED
@@ -610,8 +610,7 @@ var IS_WEB5 = reactNative.Platform.OS === "web";
610
610
  var TRANSITION_PROPERTY = "border-color, background-color, box-shadow";
611
611
  var TRANSITION_DURATION = "0.14s";
612
612
  var TRANSITION_TIMING = "ease";
613
- var FOCUS_RING_WIDTH = 3;
614
- var FOCUS_RING_ALPHA = 0.16;
613
+ var NO_RING = { outlineWidth: 0 };
615
614
  var HOVER_BORDER_ALPHA = 0.22;
616
615
  var PLACEHOLDER_ALPHA = 0.6;
617
616
  var HEX_RADIX = 16;
@@ -666,15 +665,14 @@ function useThemedInput(options = {}) {
666
665
  const backgroundColor = isFocused ? colors.surface : colors.surfaceElevated;
667
666
  const base = { color: colors.text, borderColor, backgroundColor };
668
667
  if (!IS_WEB5) return base;
669
- const ringColor = hasError ? errorColor : primary;
670
- const ring = isFocused ? `0 0 0 ${FOCUS_RING_WIDTH}px ${withAlpha(ringColor, FOCUS_RING_ALPHA)}` : "none";
668
+ const ringColor = hasError ? errorColor : uiButtons.themeFocusRingColor(theme);
669
+ const ring = isFocused ? designTokens.focusRingOutline(ringColor) : NO_RING;
671
670
  const webStyle = {
672
671
  transitionProperty: TRANSITION_PROPERTY,
673
672
  // Collapse the eased transition to instant when the user prefers reduced motion.
674
673
  transitionDuration: prefersReducedMotion() ? "0s" : TRANSITION_DURATION,
675
674
  transitionTimingFunction: TRANSITION_TIMING,
676
- boxShadow: ring,
677
- outlineStyle: "none"
675
+ ...ring
678
676
  };
679
677
  return { ...base, ...webStyle };
680
678
  }, [
@@ -686,7 +684,8 @@ function useThemedInput(options = {}) {
686
684
  colors.surface,
687
685
  colors.surfaceElevated,
688
686
  primary,
689
- errorColor
687
+ errorColor,
688
+ theme
690
689
  ]);
691
690
  const focusBind = React2.useMemo(() => ({ onFocus: handleFocus, onBlur: handleBlur }), [handleFocus, handleBlur]);
692
691
  const hoverBind = React2.useMemo(