@dloizides/ui-forms 1.18.1 → 1.18.2
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 +10 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.18.2
|
|
4
|
+
|
|
5
|
+
**FormSwitch: the switch now sits in a 44x44 (MIN_TOUCH_TARGET_PX) pressable slot on web.**
|
|
6
|
+
|
|
7
|
+
Visual QA on kefi-web Site settings (360 and 1280) measured the switch at 40x20: react-native-web sizes the
|
|
8
|
+
native input to the Switch root, and `hitSlop` is inert on web. The switch is now centred in a slot with
|
|
9
|
+
`minWidth`/`minHeight` MIN_TOUCH_TARGET_PX inside the pressable row, so the row stays at least 44 tall even when a
|
|
10
|
+
`containerStyle` overrides `minHeight`. The track and thumb are unchanged; the switch gains a few px of horizontal gutter.
|
|
11
|
+
New testID: `<testID>-hitbox`.
|
|
12
|
+
|
|
3
13
|
## 1.17.0
|
|
4
14
|
|
|
5
15
|
**Chips now have a 44px minimum touch target on web. `hitSlop` never did that — it is native-only.**
|
package/dist/index.js
CHANGED
|
@@ -1273,6 +1273,12 @@ var styles6 = reactNative.StyleSheet.create({
|
|
|
1273
1273
|
// `hitSlop`, so a pointer target smaller than the floor cannot be widened any other way.
|
|
1274
1274
|
minHeight: a11y.MIN_TOUCH_TARGET_PX
|
|
1275
1275
|
},
|
|
1276
|
+
switchSlot: {
|
|
1277
|
+
minWidth: a11y.MIN_TOUCH_TARGET_PX,
|
|
1278
|
+
minHeight: a11y.MIN_TOUCH_TARGET_PX,
|
|
1279
|
+
alignItems: "center",
|
|
1280
|
+
justifyContent: "center"
|
|
1281
|
+
},
|
|
1276
1282
|
textColumn: {
|
|
1277
1283
|
flex: 1
|
|
1278
1284
|
},
|
|
@@ -1326,7 +1332,7 @@ var FormSwitch = ({
|
|
|
1326
1332
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.label, themeStyles.label], children: label }),
|
|
1327
1333
|
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.description, themeStyles.description], children: description }) : null
|
|
1328
1334
|
] }),
|
|
1329
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1335
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles6.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1330
1336
|
reactNative.Switch,
|
|
1331
1337
|
{
|
|
1332
1338
|
accessibilityHint: accessibilityHint ?? label,
|