@dloizides/ui-forms 1.13.1 → 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 +15 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
-
/**
|
|
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
|
-
/**
|
|
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,
|
|
@@ -1119,7 +1120,7 @@ function AnchoredMenu({
|
|
|
1119
1120
|
accessibilityRole: "menu",
|
|
1120
1121
|
style: [controlStyles.menu, { borderColor: colors.border, backgroundColor: colors.surface }, portalStyle],
|
|
1121
1122
|
testID: `${testID}-menu`,
|
|
1122
|
-
children: options.map((opt) => {
|
|
1123
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", nestedScrollEnabled: true, children: options.map((opt) => {
|
|
1123
1124
|
const active = opt.value === selectedValue;
|
|
1124
1125
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1125
1126
|
reactNative.Pressable,
|
|
@@ -1136,7 +1137,7 @@ function AnchoredMenu({
|
|
|
1136
1137
|
},
|
|
1137
1138
|
opt.value
|
|
1138
1139
|
);
|
|
1139
|
-
})
|
|
1140
|
+
}) })
|
|
1140
1141
|
}
|
|
1141
1142
|
);
|
|
1142
1143
|
if (usePortal && IS_WEB6) return reactDom.createPortal(menu, document.body);
|