@dloizides/ui-forms 1.13.2 → 1.13.3

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,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.3
4
+
5
+ **Placeholder text was too dark — it read like an already-filled value.**
6
+
7
+ `useThemedInput` painted the placeholder with the theme's `textSecondary` — a deliberately
8
+ dark, accessible grey (design-tokens UX-11) that also renders readable secondary *copy*. At
9
+ full strength a placeholder (e.g. `follower` in a "Dance role" box) was hard to tell apart
10
+ from entered text. It is now `textSecondary` composited toward the field background at 0.6
11
+ alpha, so a hint reads clearly lighter than the solid entered text (`colors.text`) while
12
+ keeping the theme hue — and it works in dark mode too (it composites toward whatever the
13
+ field background is). The field's visible label still carries the accessible name, so this
14
+ is a usability win, not an a11y regression. Affects every `@dloizides/ui-forms`-driven input
15
+ (`FormField`, `Field`, `ThemedTextInput`, the `ui-tables` `Filters` search box) across all
16
+ seven portals.
17
+
3
18
  ## 1.12.0
4
19
 
5
20
  **`FormField` gained `labelHidden` — hide the visible label, keep the accessible name.**
package/dist/index.d.mts CHANGED
@@ -461,7 +461,11 @@ interface UseThemedInputOptions {
461
461
  interface ThemedInput {
462
462
  /** The themed input style for the current focus/hover state (memoised). Merge AFTER your box style. */
463
463
  style: TextStyle;
464
- /** A readable mid-grey placeholder colour from the theme. */
464
+ /**
465
+ * The placeholder colour: the theme's `textSecondary` composited toward the field
466
+ * background ({@link PLACEHOLDER_ALPHA}) so a placeholder reads as a faint hint, clearly
467
+ * lighter than the solid entered text rather than looking like an already-filled value.
468
+ */
465
469
  placeholderTextColor: string;
466
470
  isFocused: boolean;
467
471
  isHovered: boolean;
package/dist/index.d.ts CHANGED
@@ -461,7 +461,11 @@ interface UseThemedInputOptions {
461
461
  interface ThemedInput {
462
462
  /** The themed input style for the current focus/hover state (memoised). Merge AFTER your box style. */
463
463
  style: TextStyle;
464
- /** A readable mid-grey placeholder colour from the theme. */
464
+ /**
465
+ * The placeholder colour: the theme's `textSecondary` composited toward the field
466
+ * background ({@link PLACEHOLDER_ALPHA}) so a placeholder reads as a faint hint, clearly
467
+ * lighter than the solid entered text rather than looking like an already-filled value.
468
+ */
465
469
  placeholderTextColor: string;
466
470
  isFocused: boolean;
467
471
  isHovered: boolean;
package/dist/index.js CHANGED
@@ -471,6 +471,7 @@ var TRANSITION_TIMING = "ease";
471
471
  var FOCUS_RING_WIDTH = 3;
472
472
  var FOCUS_RING_ALPHA = 0.16;
473
473
  var HOVER_BORDER_ALPHA = 0.22;
474
+ var PLACEHOLDER_ALPHA = 0.6;
474
475
  var HEX_RADIX = 16;
475
476
  var HEX_SHORT_LENGTH = 4;
476
477
  var HEX_FULL_LENGTH = 7;
@@ -552,7 +553,7 @@ function useThemedInput(options = {}) {
552
553
  );
553
554
  return {
554
555
  style,
555
- placeholderTextColor: colors.textSecondary,
556
+ placeholderTextColor: withAlpha(colors.textSecondary, PLACEHOLDER_ALPHA),
556
557
  isFocused,
557
558
  isHovered,
558
559
  focusBind,