@dloizides/ui-forms 1.18.0 → 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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
5
5
|
import { Button } from '@dloizides/ui-buttons';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { MIN_TOUCH_TARGET_PX } from '@dloizides/a11y';
|
|
8
|
+
import { Z_INDEX } from '@dloizides/design-tokens';
|
|
8
9
|
|
|
9
10
|
// src/Field/Field.tsx
|
|
10
11
|
function attachControlId(child, candidateId, describedById) {
|
|
@@ -392,7 +393,6 @@ var MENU_OPT_PAD_H = 12;
|
|
|
392
393
|
var MENU_OPT_PAD_V = 8;
|
|
393
394
|
var MENU_MIN_WIDTH = 160;
|
|
394
395
|
var MENU_MAX_HEIGHT = 260;
|
|
395
|
-
var MENU_Z = 1e3;
|
|
396
396
|
var MENU_ELEVATION = 8;
|
|
397
397
|
var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
|
|
398
398
|
var OPTION_FONT = 14;
|
|
@@ -449,7 +449,7 @@ var controlStyles = StyleSheet.create({
|
|
|
449
449
|
borderWidth: INPUT_BORDER,
|
|
450
450
|
borderRadius: MENU_RADIUS,
|
|
451
451
|
paddingVertical: MENU_PAD_V,
|
|
452
|
-
zIndex:
|
|
452
|
+
zIndex: Z_INDEX.dropdown,
|
|
453
453
|
boxShadow: MENU_BOX_SHADOW,
|
|
454
454
|
elevation: MENU_ELEVATION,
|
|
455
455
|
overflow: "hidden"
|
|
@@ -465,7 +465,7 @@ var controlStyles = StyleSheet.create({
|
|
|
465
465
|
error: { fontSize: ERROR_FONT, marginTop: ERROR_GAP }
|
|
466
466
|
});
|
|
467
467
|
var IS_WEB3 = Platform.OS === "web";
|
|
468
|
-
var MENU_PORTAL_Z_INDEX =
|
|
468
|
+
var MENU_PORTAL_Z_INDEX = Z_INDEX.popover;
|
|
469
469
|
var MENU_TOP_GAP2 = 4;
|
|
470
470
|
function toDomNode(ref) {
|
|
471
471
|
const node = ref.current;
|
|
@@ -1267,6 +1267,12 @@ var styles6 = StyleSheet.create({
|
|
|
1267
1267
|
// `hitSlop`, so a pointer target smaller than the floor cannot be widened any other way.
|
|
1268
1268
|
minHeight: MIN_TOUCH_TARGET_PX
|
|
1269
1269
|
},
|
|
1270
|
+
switchSlot: {
|
|
1271
|
+
minWidth: MIN_TOUCH_TARGET_PX,
|
|
1272
|
+
minHeight: MIN_TOUCH_TARGET_PX,
|
|
1273
|
+
alignItems: "center",
|
|
1274
|
+
justifyContent: "center"
|
|
1275
|
+
},
|
|
1270
1276
|
textColumn: {
|
|
1271
1277
|
flex: 1
|
|
1272
1278
|
},
|
|
@@ -1320,7 +1326,7 @@ var FormSwitch = ({
|
|
|
1320
1326
|
/* @__PURE__ */ jsx(Text, { style: [styles6.label, themeStyles.label], children: label }),
|
|
1321
1327
|
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles6.description, themeStyles.description], children: description }) : null
|
|
1322
1328
|
] }),
|
|
1323
|
-
/* @__PURE__ */ jsx(View, { pointerEvents: "none", children: /* @__PURE__ */ jsx(
|
|
1329
|
+
/* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles6.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsx(
|
|
1324
1330
|
Switch,
|
|
1325
1331
|
{
|
|
1326
1332
|
accessibilityHint: accessibilityHint ?? label,
|