@dloizides/ui-forms 1.47.0 → 1.49.0
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 +14 -0
- package/dist/index.d.mts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +525 -376
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +337 -188
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Platform, StyleSheet, TextInput, View, Text, Pressable, useWindowDimensions, ScrollView, Animated, Easing, AccessibilityInfo,
|
|
1
|
+
import React39, { forwardRef, createContext, useRef, useImperativeHandle, useState, useCallback, useMemo, useEffect, useLayoutEffect, useContext } from 'react';
|
|
2
|
+
import { Platform, StyleSheet, TextInput, View, Text, Pressable, useWindowDimensions, ScrollView, Animated, Easing, AccessibilityInfo, Image, TouchableOpacity, Switch, Modal } from 'react-native';
|
|
3
3
|
import { useUi } from '@dloizides/ui-feedback';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { Z_INDEX, focusRingOutline, readableScaleInk, resolveOnBrand } from '@dloizides/design-tokens';
|
|
6
6
|
import { themeFocusRingColor, Button, useFocusRing, IconButton } from '@dloizides/ui-buttons';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
8
|
import { MIN_TOUCH_TARGET_PX } from '@dloizides/a11y';
|
|
9
|
+
import { SvgIcon } from '@dloizides/ui-icons';
|
|
9
10
|
import { parseFieldErrors } from '@dloizides/api-client-base';
|
|
10
11
|
import Svg, { Rect, Circle, Polygon } from 'react-native-svg';
|
|
11
|
-
import { SvgIcon } from '@dloizides/ui-icons';
|
|
12
12
|
|
|
13
13
|
// src/Field/Field.tsx
|
|
14
14
|
function attachControlId(child, candidateId, describedById) {
|
|
15
|
-
if (!
|
|
15
|
+
if (!React39.isValidElement(child) || child.type === React39.Fragment) {
|
|
16
16
|
return { node: child };
|
|
17
17
|
}
|
|
18
18
|
const props = child.props;
|
|
@@ -23,7 +23,7 @@ function attachControlId(child, candidateId, describedById) {
|
|
|
23
23
|
if (describedById !== void 0 && props.describedById === void 0) {
|
|
24
24
|
injected.describedById = describedById;
|
|
25
25
|
}
|
|
26
|
-
return { node:
|
|
26
|
+
return { node: React39.cloneElement(element, injected), controlId };
|
|
27
27
|
}
|
|
28
28
|
var IS_WEB = Platform.OS === "web";
|
|
29
29
|
function isAttributeHost(node) {
|
|
@@ -141,15 +141,15 @@ var labelVariantStyles = StyleSheet.create({
|
|
|
141
141
|
function resolveLabelVariantStyle(variant) {
|
|
142
142
|
return labelVariantStyles[variant ?? "field"] ?? labelVariantStyles.field;
|
|
143
143
|
}
|
|
144
|
-
var FormGridContext =
|
|
145
|
-
var GapOwnedContext =
|
|
144
|
+
var FormGridContext = React39.createContext(null);
|
|
145
|
+
var GapOwnedContext = React39.createContext(false);
|
|
146
146
|
var FormGridProvider = FormGridContext.Provider;
|
|
147
147
|
var GapOwnedProvider = GapOwnedContext.Provider;
|
|
148
148
|
function useFormGridMetrics() {
|
|
149
|
-
return
|
|
149
|
+
return React39.useContext(FormGridContext);
|
|
150
150
|
}
|
|
151
151
|
function useIsGapOwned() {
|
|
152
|
-
return
|
|
152
|
+
return React39.useContext(GapOwnedContext);
|
|
153
153
|
}
|
|
154
154
|
var ERROR_LIGHT_STEPS = ["500", "600", "700"];
|
|
155
155
|
var ERROR_DARK_STEPS = ["300", "200", "400", "100", "500"];
|
|
@@ -172,7 +172,7 @@ var styles = StyleSheet.create({
|
|
|
172
172
|
});
|
|
173
173
|
var fieldSeq = 0;
|
|
174
174
|
function useFieldIds() {
|
|
175
|
-
const [ids] =
|
|
175
|
+
const [ids] = React39.useState(() => {
|
|
176
176
|
fieldSeq += 1;
|
|
177
177
|
const seq = String(fieldSeq);
|
|
178
178
|
return {
|
|
@@ -219,7 +219,7 @@ var Field = ({
|
|
|
219
219
|
const hasLabel = labelText !== "";
|
|
220
220
|
const marker = resolveFieldMarker(required, optional);
|
|
221
221
|
const { hintId, errorId, controlId, labelId } = useFieldIds();
|
|
222
|
-
const themeStyles =
|
|
222
|
+
const themeStyles = React39.useMemo(
|
|
223
223
|
() => ({
|
|
224
224
|
label: { color: colors.textSecondary },
|
|
225
225
|
requiredMark: { color: errorColor },
|
|
@@ -271,7 +271,7 @@ var FormGrid = ({
|
|
|
271
271
|
style,
|
|
272
272
|
testID
|
|
273
273
|
}) => {
|
|
274
|
-
const metrics =
|
|
274
|
+
const metrics = React39.useMemo(() => ({ minWidth, basis }), [minWidth, basis]);
|
|
275
275
|
return /* @__PURE__ */ jsx(FormGridProvider, { value: metrics, children: /* @__PURE__ */ jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsx(View, { style: [styles2.grid, { gap }, style], testID, children }) }) });
|
|
276
276
|
};
|
|
277
277
|
var LABEL_LINE_PLACEHOLDER = "\xA0";
|
|
@@ -538,7 +538,7 @@ var styles9 = StyleSheet.create({
|
|
|
538
538
|
});
|
|
539
539
|
var sectionSeq = 0;
|
|
540
540
|
function useSectionLegendId() {
|
|
541
|
-
const [id] =
|
|
541
|
+
const [id] = React39.useState(() => {
|
|
542
542
|
sectionSeq += 1;
|
|
543
543
|
return `form-section-legend-${String(sectionSeq)}`;
|
|
544
544
|
});
|
|
@@ -932,7 +932,7 @@ function AnchoredMenu({
|
|
|
932
932
|
listbox,
|
|
933
933
|
placement
|
|
934
934
|
}) {
|
|
935
|
-
const menuRef =
|
|
935
|
+
const menuRef = React39.useRef(null);
|
|
936
936
|
useDismiss(anchorRef, menuRef, onDismiss);
|
|
937
937
|
useKeepHighlightInView(testID, listbox?.highlightedValue);
|
|
938
938
|
const rect2 = useAnchorRect(placement?.positionRef ?? anchorRef, usePortal);
|
|
@@ -1092,7 +1092,7 @@ var boxStyles = StyleSheet.create({
|
|
|
1092
1092
|
textAlignVertical: "top"
|
|
1093
1093
|
}
|
|
1094
1094
|
});
|
|
1095
|
-
var ThemedTextInput =
|
|
1095
|
+
var ThemedTextInput = React39.forwardRef(function ThemedTextInput2({
|
|
1096
1096
|
hasError = false,
|
|
1097
1097
|
describedById,
|
|
1098
1098
|
requiredField = false,
|
|
@@ -1410,19 +1410,57 @@ function chipLabelLayout(labelWrap) {
|
|
|
1410
1410
|
return { boxStyle: CAPPED_BOX, textStyle: SHRINKING_TEXT, numberOfLines: SINGLE_LINE };
|
|
1411
1411
|
return { boxStyle: void 0, textStyle: void 0, numberOfLines: void 0 };
|
|
1412
1412
|
}
|
|
1413
|
+
var MIN_TARGET_PX = 44;
|
|
1414
|
+
var COMPACT_PAD_V = 4;
|
|
1415
|
+
var COMPACT_PAD_H = 10;
|
|
1416
|
+
var COMPACT_FONT_SIZE = 12;
|
|
1417
|
+
var COMPACT_LINE_HEIGHT = 18;
|
|
1418
|
+
var CHIP_BORDER = 1;
|
|
1419
|
+
var chipSizeStyles = StyleSheet.create({
|
|
1420
|
+
compactHitBox: {
|
|
1421
|
+
minHeight: MIN_TARGET_PX,
|
|
1422
|
+
minWidth: MIN_TARGET_PX,
|
|
1423
|
+
justifyContent: "center",
|
|
1424
|
+
alignItems: "center"
|
|
1425
|
+
},
|
|
1426
|
+
compactVisual: {
|
|
1427
|
+
paddingVertical: COMPACT_PAD_V,
|
|
1428
|
+
paddingHorizontal: COMPACT_PAD_H,
|
|
1429
|
+
minHeight: 0,
|
|
1430
|
+
minWidth: 0,
|
|
1431
|
+
borderWidth: CHIP_BORDER
|
|
1432
|
+
},
|
|
1433
|
+
compactText: {
|
|
1434
|
+
fontSize: COMPACT_FONT_SIZE,
|
|
1435
|
+
fontWeight: "600",
|
|
1436
|
+
lineHeight: COMPACT_LINE_HEIGHT
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
|
|
1440
|
+
// src/ChipSelector/utils/chipLook.ts
|
|
1441
|
+
function chipFill({ selected, selectedFill, ink, rest }) {
|
|
1442
|
+
if (!selected || selectedFill === void 0)
|
|
1443
|
+
return { ...rest, checkColor: void 0 };
|
|
1444
|
+
return { backgroundColor: selectedFill, textColor: ink, checkColor: ink };
|
|
1445
|
+
}
|
|
1446
|
+
function chipSizeLook(size) {
|
|
1447
|
+
if (size !== "compact")
|
|
1448
|
+
return { hitBox: void 0, visual: void 0, text: void 0 };
|
|
1449
|
+
return { hitBox: chipSizeStyles.compactHitBox, visual: chipSizeStyles.compactVisual, text: chipSizeStyles.compactText };
|
|
1450
|
+
}
|
|
1413
1451
|
var SOLID_RADIUS = 20;
|
|
1414
1452
|
var OUTLINE_RADIUS = 999;
|
|
1415
1453
|
var OUTLINE_PAD_H = 12;
|
|
1416
1454
|
var OUTLINE_PAD_V = 5;
|
|
1417
1455
|
var OUTLINE_FONT_SIZE = 13;
|
|
1418
1456
|
var CHIP_ICON_GAP = 6;
|
|
1419
|
-
var
|
|
1457
|
+
var MIN_TARGET_PX2 = 44;
|
|
1420
1458
|
var chipStyles = StyleSheet.create({
|
|
1421
1459
|
chip: {
|
|
1422
1460
|
paddingHorizontal: 12,
|
|
1423
1461
|
paddingVertical: 6,
|
|
1424
|
-
minHeight:
|
|
1425
|
-
minWidth:
|
|
1462
|
+
minHeight: MIN_TARGET_PX2,
|
|
1463
|
+
minWidth: MIN_TARGET_PX2,
|
|
1426
1464
|
justifyContent: "center",
|
|
1427
1465
|
borderRadius: SOLID_RADIUS,
|
|
1428
1466
|
backgroundColor: TRANSPARENT_COLOR,
|
|
@@ -1431,8 +1469,8 @@ var chipStyles = StyleSheet.create({
|
|
|
1431
1469
|
chipOutline: {
|
|
1432
1470
|
paddingHorizontal: OUTLINE_PAD_H,
|
|
1433
1471
|
paddingVertical: OUTLINE_PAD_V,
|
|
1434
|
-
minHeight:
|
|
1435
|
-
minWidth:
|
|
1472
|
+
minHeight: MIN_TARGET_PX2,
|
|
1473
|
+
minWidth: MIN_TARGET_PX2,
|
|
1436
1474
|
justifyContent: "center",
|
|
1437
1475
|
borderRadius: OUTLINE_RADIUS,
|
|
1438
1476
|
borderWidth: 1
|
|
@@ -1441,22 +1479,31 @@ var chipStyles = StyleSheet.create({
|
|
|
1441
1479
|
chipText: {},
|
|
1442
1480
|
chipTextOutline: { fontSize: OUTLINE_FONT_SIZE }
|
|
1443
1481
|
});
|
|
1444
|
-
|
|
1482
|
+
var CHECK_SIZE = 12;
|
|
1483
|
+
function ChipContent(props) {
|
|
1484
|
+
const { icon, label, textStyle, numberOfLines, checkColor } = props;
|
|
1445
1485
|
const text = /* @__PURE__ */ jsx(Text, { numberOfLines, style: textStyle, children: label });
|
|
1446
|
-
|
|
1486
|
+
const hasIcon = icon !== void 0 && icon !== null;
|
|
1487
|
+
if (!hasIcon && checkColor === void 0)
|
|
1447
1488
|
return text;
|
|
1448
1489
|
return /* @__PURE__ */ jsxs(View, { style: chipStyles.chipContent, children: [
|
|
1449
|
-
/* @__PURE__ */ jsx(View, { "aria-hidden": true, children:
|
|
1490
|
+
checkColor === void 0 ? null : /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: props.checkTestID, children: /* @__PURE__ */ jsx(SvgIcon, { color: checkColor, name: "check", size: CHECK_SIZE }) }),
|
|
1491
|
+
hasIcon ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, children: icon }) : null,
|
|
1450
1492
|
text
|
|
1451
1493
|
] });
|
|
1452
1494
|
}
|
|
1453
1495
|
function OutlineChip(props) {
|
|
1454
1496
|
const { option, selected, disabled, colors, testID, accessibilityHint, onPress } = props;
|
|
1455
|
-
const [hovered, setHovered] =
|
|
1497
|
+
const [hovered, setHovered] = React39.useState(false);
|
|
1456
1498
|
const active = selected || hovered;
|
|
1457
1499
|
const borderColor = active ? colors.primary : colors.border;
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1500
|
+
const fill = chipFill({
|
|
1501
|
+
selected,
|
|
1502
|
+
selectedFill: props.selectedFill,
|
|
1503
|
+
ink: colors.textStrong,
|
|
1504
|
+
rest: { backgroundColor: selected ? colors.tint : colors.muted, textColor: active ? colors.primary : colors.textMuted }
|
|
1505
|
+
});
|
|
1506
|
+
const sized = chipSizeLook(props.size);
|
|
1460
1507
|
const layout = chipLabelLayout(option.labelWrap);
|
|
1461
1508
|
return /* @__PURE__ */ jsx(
|
|
1462
1509
|
Pressable,
|
|
@@ -1470,19 +1517,21 @@ function OutlineChip(props) {
|
|
|
1470
1517
|
"aria-pressed": props.ariaPressed,
|
|
1471
1518
|
disabled,
|
|
1472
1519
|
hitSlop: CHIP_HIT_SLOP,
|
|
1473
|
-
style: layout.boxStyle,
|
|
1520
|
+
style: [sized.hitBox, layout.boxStyle],
|
|
1474
1521
|
tabIndex: props.tabIndex,
|
|
1475
1522
|
testID,
|
|
1476
1523
|
onHoverIn: () => setHovered(true),
|
|
1477
1524
|
onHoverOut: () => setHovered(false),
|
|
1478
1525
|
onPress,
|
|
1479
|
-
children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chipOutline, { borderColor, backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
|
|
1526
|
+
children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chipOutline, sized.visual, { borderColor, backgroundColor: fill.backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
|
|
1480
1527
|
ChipContent,
|
|
1481
1528
|
{
|
|
1529
|
+
checkColor: fill.checkColor,
|
|
1530
|
+
checkTestID: `${testID}-check`,
|
|
1482
1531
|
icon: option.icon,
|
|
1483
1532
|
label: option.label,
|
|
1484
1533
|
numberOfLines: layout.numberOfLines,
|
|
1485
|
-
textStyle: [chipStyles.chipText, chipStyles.chipTextOutline, { color: textColor }, layout.textStyle]
|
|
1534
|
+
textStyle: [chipStyles.chipText, chipStyles.chipTextOutline, sized.text, { color: fill.textColor }, layout.textStyle]
|
|
1486
1535
|
}
|
|
1487
1536
|
) })
|
|
1488
1537
|
}
|
|
@@ -1490,8 +1539,13 @@ function OutlineChip(props) {
|
|
|
1490
1539
|
}
|
|
1491
1540
|
function SolidChip(props) {
|
|
1492
1541
|
const { option, selected, disabled, colors, testID, accessibilityHint, onPress } = props;
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1542
|
+
const fill = chipFill({
|
|
1543
|
+
selected,
|
|
1544
|
+
selectedFill: props.selectedFill,
|
|
1545
|
+
ink: colors.textStrong,
|
|
1546
|
+
rest: { backgroundColor: selected ? colors.primary : TRANSPARENT_COLOR, textColor: selected ? colors.onPrimary : colors.textStrong }
|
|
1547
|
+
});
|
|
1548
|
+
const sized = chipSizeLook(props.size);
|
|
1495
1549
|
const layout = chipLabelLayout(option.labelWrap);
|
|
1496
1550
|
const rovingTabStop = { tabIndex: props.tabIndex };
|
|
1497
1551
|
return /* @__PURE__ */ jsx(
|
|
@@ -1506,17 +1560,19 @@ function SolidChip(props) {
|
|
|
1506
1560
|
"aria-pressed": props.ariaPressed,
|
|
1507
1561
|
disabled,
|
|
1508
1562
|
hitSlop: CHIP_HIT_SLOP,
|
|
1509
|
-
style: layout.boxStyle,
|
|
1563
|
+
style: [sized.hitBox, layout.boxStyle],
|
|
1510
1564
|
testID,
|
|
1511
1565
|
onPress,
|
|
1512
1566
|
...rovingTabStop,
|
|
1513
|
-
children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chip, { borderColor: colors.border, backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
|
|
1567
|
+
children: /* @__PURE__ */ jsx(View, { style: [chipStyles.chip, sized.visual, { borderColor: colors.border, backgroundColor: fill.backgroundColor }, layout.boxStyle], children: /* @__PURE__ */ jsx(
|
|
1514
1568
|
ChipContent,
|
|
1515
1569
|
{
|
|
1570
|
+
checkColor: fill.checkColor,
|
|
1571
|
+
checkTestID: `${testID}-check`,
|
|
1516
1572
|
icon: option.icon,
|
|
1517
1573
|
label: option.label,
|
|
1518
1574
|
numberOfLines: layout.numberOfLines,
|
|
1519
|
-
textStyle: [chipStyles.chipText, { color: textColor }, layout.textStyle]
|
|
1575
|
+
textStyle: [chipStyles.chipText, sized.text, { color: fill.textColor }, layout.textStyle]
|
|
1520
1576
|
}
|
|
1521
1577
|
) })
|
|
1522
1578
|
}
|
|
@@ -1552,8 +1608,8 @@ function radioTabIndex(index, selectedIndex, disabled) {
|
|
|
1552
1608
|
var NO_GROUP_PROPS = {};
|
|
1553
1609
|
function useRadioKeyboard(config) {
|
|
1554
1610
|
const { enabled, disabled, values, selectedIndex, onChange } = config;
|
|
1555
|
-
const nodes =
|
|
1556
|
-
const chipRef =
|
|
1611
|
+
const nodes = React39.useRef([]);
|
|
1612
|
+
const chipRef = React39.useCallback((index) => (node) => {
|
|
1557
1613
|
nodes.current[index] = node;
|
|
1558
1614
|
}, []);
|
|
1559
1615
|
const onKeyDown = (event) => {
|
|
@@ -1661,12 +1717,14 @@ var ChipSelector = ({
|
|
|
1661
1717
|
testID,
|
|
1662
1718
|
chipTestIDPrefix = DEFAULT_CHIP_TESTID_PREFIX,
|
|
1663
1719
|
optionAccessibilityHint,
|
|
1664
|
-
singleSelectRole = "button"
|
|
1720
|
+
singleSelectRole = "button",
|
|
1721
|
+
size = "default",
|
|
1722
|
+
selectedFill
|
|
1665
1723
|
}) => {
|
|
1666
1724
|
const isRadioGroup = !multiple && singleSelectRole === "radio";
|
|
1667
1725
|
const { theme } = useUi();
|
|
1668
1726
|
const { colors, palette } = theme;
|
|
1669
|
-
const chipColors =
|
|
1727
|
+
const chipColors = React39.useMemo(() => buildChipColors(colors, palette), [colors, palette]);
|
|
1670
1728
|
function isSelected(optionValue) {
|
|
1671
1729
|
if (multiple && Array.isArray(value))
|
|
1672
1730
|
return value.includes(optionValue);
|
|
@@ -1686,6 +1744,8 @@ var ChipSelector = ({
|
|
|
1686
1744
|
disabled,
|
|
1687
1745
|
option,
|
|
1688
1746
|
selected,
|
|
1747
|
+
size,
|
|
1748
|
+
selectedFill,
|
|
1689
1749
|
...chipIdentity(option, selected, {
|
|
1690
1750
|
prefix: chipTestIDPrefix,
|
|
1691
1751
|
hint: optionAccessibilityHint,
|
|
@@ -1723,8 +1783,95 @@ var ChipSelector = ({
|
|
|
1723
1783
|
}
|
|
1724
1784
|
);
|
|
1725
1785
|
};
|
|
1726
|
-
var
|
|
1786
|
+
var BOX_SLOT_PAD_H = 10;
|
|
1727
1787
|
var styles14 = StyleSheet.create({
|
|
1788
|
+
row: {
|
|
1789
|
+
minWidth: MIN_TOUCH_TARGET_PX,
|
|
1790
|
+
minHeight: MIN_TOUCH_TARGET_PX,
|
|
1791
|
+
alignItems: "center",
|
|
1792
|
+
justifyContent: "center"
|
|
1793
|
+
},
|
|
1794
|
+
box: {
|
|
1795
|
+
alignSelf: "stretch",
|
|
1796
|
+
alignItems: "center",
|
|
1797
|
+
justifyContent: "center",
|
|
1798
|
+
paddingHorizontal: BOX_SLOT_PAD_H
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
var SwitchSlot = ({
|
|
1802
|
+
label,
|
|
1803
|
+
value,
|
|
1804
|
+
onValueChange,
|
|
1805
|
+
disabled,
|
|
1806
|
+
testID,
|
|
1807
|
+
accessibilityHint,
|
|
1808
|
+
activeTrackColor,
|
|
1809
|
+
inBox = false
|
|
1810
|
+
}) => /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: inBox ? styles14.box : styles14.row, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsx(
|
|
1811
|
+
Switch,
|
|
1812
|
+
{
|
|
1813
|
+
accessibilityHint: accessibilityHint ?? label,
|
|
1814
|
+
accessibilityLabel: label,
|
|
1815
|
+
accessibilityState: { checked: value, disabled },
|
|
1816
|
+
disabled,
|
|
1817
|
+
testID: `${testID}-switch`,
|
|
1818
|
+
trackColor: activeTrackColor === void 0 ? void 0 : { true: activeTrackColor },
|
|
1819
|
+
value,
|
|
1820
|
+
onValueChange
|
|
1821
|
+
}
|
|
1822
|
+
) });
|
|
1823
|
+
var BOX_RADIUS = 8;
|
|
1824
|
+
var BOX_PAD_LEFT = 10;
|
|
1825
|
+
var BOX_BORDER = 1;
|
|
1826
|
+
var STATE_FONT_SIZE = 13;
|
|
1827
|
+
var styles15 = StyleSheet.create({
|
|
1828
|
+
box: {
|
|
1829
|
+
flexDirection: "row",
|
|
1830
|
+
alignItems: "center",
|
|
1831
|
+
justifyContent: "space-between",
|
|
1832
|
+
minHeight: MIN_TOUCH_TARGET_PX,
|
|
1833
|
+
borderWidth: BOX_BORDER,
|
|
1834
|
+
borderRadius: BOX_RADIUS,
|
|
1835
|
+
paddingLeft: BOX_PAD_LEFT
|
|
1836
|
+
},
|
|
1837
|
+
state: {
|
|
1838
|
+
flex: 1,
|
|
1839
|
+
fontSize: STATE_FONT_SIZE
|
|
1840
|
+
}
|
|
1841
|
+
});
|
|
1842
|
+
var FormSwitchBox = ({
|
|
1843
|
+
stateLabel,
|
|
1844
|
+
description,
|
|
1845
|
+
containerStyle,
|
|
1846
|
+
...slot
|
|
1847
|
+
}) => {
|
|
1848
|
+
const { colors } = useUi().theme;
|
|
1849
|
+
const { disabled, onValueChange, value } = slot;
|
|
1850
|
+
const toggle2 = React39.useCallback(() => {
|
|
1851
|
+
if (!disabled) onValueChange(!value);
|
|
1852
|
+
}, [disabled, onValueChange, value]);
|
|
1853
|
+
const boxColors = React39.useMemo(
|
|
1854
|
+
() => ({ borderColor: colors.border, backgroundColor: colors.surface }),
|
|
1855
|
+
[colors.border, colors.surface]
|
|
1856
|
+
);
|
|
1857
|
+
return /* @__PURE__ */ jsx(Field, { containerStyle, hint: description, label: slot.label, labelVariant: "control", children: () => /* @__PURE__ */ jsxs(
|
|
1858
|
+
Pressable,
|
|
1859
|
+
{
|
|
1860
|
+
accessible: false,
|
|
1861
|
+
disabled,
|
|
1862
|
+
style: [styles15.box, boxColors],
|
|
1863
|
+
tabIndex: -1,
|
|
1864
|
+
testID: slot.testID,
|
|
1865
|
+
onPress: toggle2,
|
|
1866
|
+
children: [
|
|
1867
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles15.state, { color: colors.text }], children: stateLabel ?? "" }),
|
|
1868
|
+
/* @__PURE__ */ jsx(SwitchSlot, { ...slot, inBox: true })
|
|
1869
|
+
]
|
|
1870
|
+
}
|
|
1871
|
+
) });
|
|
1872
|
+
};
|
|
1873
|
+
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1874
|
+
var styles16 = StyleSheet.create({
|
|
1728
1875
|
container: {
|
|
1729
1876
|
flexDirection: "row",
|
|
1730
1877
|
justifyContent: "space-between",
|
|
@@ -1734,12 +1881,6 @@ var styles14 = StyleSheet.create({
|
|
|
1734
1881
|
// `hitSlop`, so a pointer target smaller than the floor cannot be widened any other way.
|
|
1735
1882
|
minHeight: MIN_TOUCH_TARGET_PX
|
|
1736
1883
|
},
|
|
1737
|
-
switchSlot: {
|
|
1738
|
-
minWidth: MIN_TOUCH_TARGET_PX,
|
|
1739
|
-
minHeight: MIN_TOUCH_TARGET_PX,
|
|
1740
|
-
alignItems: "center",
|
|
1741
|
-
justifyContent: "center"
|
|
1742
|
-
},
|
|
1743
1884
|
textColumn: {
|
|
1744
1885
|
flex: 1
|
|
1745
1886
|
},
|
|
@@ -1751,23 +1892,24 @@ var styles14 = StyleSheet.create({
|
|
|
1751
1892
|
marginTop: 2
|
|
1752
1893
|
}
|
|
1753
1894
|
});
|
|
1754
|
-
var
|
|
1895
|
+
var FormSwitchRow = ({
|
|
1755
1896
|
label,
|
|
1756
1897
|
value,
|
|
1757
1898
|
onValueChange,
|
|
1758
1899
|
disabled = false,
|
|
1759
1900
|
description,
|
|
1760
1901
|
containerStyle,
|
|
1761
|
-
testID
|
|
1762
|
-
accessibilityHint
|
|
1902
|
+
testID,
|
|
1903
|
+
accessibilityHint,
|
|
1904
|
+
activeTrackColor
|
|
1763
1905
|
}) => {
|
|
1764
1906
|
const { theme } = useUi();
|
|
1765
|
-
const toggle2 =
|
|
1907
|
+
const toggle2 = React39.useCallback(() => {
|
|
1766
1908
|
if (!disabled) onValueChange(!value);
|
|
1767
1909
|
}, [disabled, onValueChange, value]);
|
|
1768
1910
|
const { colors } = theme;
|
|
1769
1911
|
const hasDescription = typeof description === "string" && description !== "";
|
|
1770
|
-
const themeStyles =
|
|
1912
|
+
const themeStyles = React39.useMemo(() => {
|
|
1771
1913
|
const labelStyle = { color: colors.text };
|
|
1772
1914
|
const descriptionStyle = { color: colors.textSecondary };
|
|
1773
1915
|
return { label: labelStyle, description: descriptionStyle };
|
|
@@ -1785,38 +1927,45 @@ var FormSwitch = ({
|
|
|
1785
1927
|
accessible: false,
|
|
1786
1928
|
disabled,
|
|
1787
1929
|
onPress: toggle2,
|
|
1788
|
-
style: [
|
|
1930
|
+
style: [styles16.container, containerStyle],
|
|
1789
1931
|
tabIndex: -1,
|
|
1790
1932
|
testID,
|
|
1791
1933
|
children: [
|
|
1792
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1793
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1794
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1934
|
+
/* @__PURE__ */ jsxs(View, { style: styles16.textColumn, children: [
|
|
1935
|
+
/* @__PURE__ */ jsx(Text, { style: [styles16.label, themeStyles.label], children: label }),
|
|
1936
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles16.description, themeStyles.description], children: description }) : null
|
|
1795
1937
|
] }),
|
|
1796
|
-
/* @__PURE__ */ jsx(
|
|
1797
|
-
|
|
1938
|
+
/* @__PURE__ */ jsx(
|
|
1939
|
+
SwitchSlot,
|
|
1798
1940
|
{
|
|
1799
|
-
accessibilityHint
|
|
1800
|
-
|
|
1801
|
-
accessibilityState: { checked: value, disabled },
|
|
1941
|
+
accessibilityHint,
|
|
1942
|
+
activeTrackColor,
|
|
1802
1943
|
disabled,
|
|
1803
|
-
|
|
1944
|
+
label,
|
|
1945
|
+
testID,
|
|
1804
1946
|
value,
|
|
1805
1947
|
onValueChange
|
|
1806
1948
|
}
|
|
1807
|
-
)
|
|
1949
|
+
)
|
|
1808
1950
|
]
|
|
1809
1951
|
}
|
|
1810
1952
|
)
|
|
1811
1953
|
);
|
|
1812
1954
|
};
|
|
1955
|
+
var FormSwitch = ({
|
|
1956
|
+
variant = "row",
|
|
1957
|
+
stateLabel,
|
|
1958
|
+
testID = "form-switch",
|
|
1959
|
+
disabled = false,
|
|
1960
|
+
...props
|
|
1961
|
+
}) => variant === "box" ? /* @__PURE__ */ jsx(FormSwitchBox, { ...props, disabled, stateLabel, testID }) : /* @__PURE__ */ jsx(FormSwitchRow, { ...props, disabled, testID });
|
|
1813
1962
|
|
|
1814
1963
|
// src/FormCheckbox/checkboxColors.ts
|
|
1815
1964
|
var checkboxBoxColors = (colors, brand, checked) => checked ? { backgroundColor: brand, borderColor: brand } : { backgroundColor: "transparent", borderColor: colors.textSecondary };
|
|
1816
1965
|
var ACTIVATION_KEYS = ["Enter", " ", "Spacebar"];
|
|
1817
1966
|
var HINT_FONT_SIZE2 = 12;
|
|
1818
1967
|
var BOX_SIZE = 20;
|
|
1819
|
-
var
|
|
1968
|
+
var BOX_RADIUS2 = 5;
|
|
1820
1969
|
var TICK_WIDTH = 6;
|
|
1821
1970
|
var TICK_HEIGHT = 10;
|
|
1822
1971
|
var TICK_STROKE = 2;
|
|
@@ -1825,7 +1974,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1825
1974
|
var FOCUS_RING_WIDTH = 2;
|
|
1826
1975
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1827
1976
|
var FOCUS_RING_INSET = -6;
|
|
1828
|
-
var
|
|
1977
|
+
var styles17 = StyleSheet.create({
|
|
1829
1978
|
container: {
|
|
1830
1979
|
flexDirection: "row",
|
|
1831
1980
|
alignItems: "flex-start",
|
|
@@ -1842,7 +1991,7 @@ var styles15 = StyleSheet.create({
|
|
|
1842
1991
|
box: {
|
|
1843
1992
|
width: BOX_SIZE,
|
|
1844
1993
|
height: BOX_SIZE,
|
|
1845
|
-
borderRadius:
|
|
1994
|
+
borderRadius: BOX_RADIUS2,
|
|
1846
1995
|
borderWidth: 2,
|
|
1847
1996
|
alignItems: "center",
|
|
1848
1997
|
justifyContent: "center",
|
|
@@ -1856,7 +2005,7 @@ var styles15 = StyleSheet.create({
|
|
|
1856
2005
|
right: FOCUS_RING_INSET,
|
|
1857
2006
|
bottom: FOCUS_RING_INSET,
|
|
1858
2007
|
borderWidth: FOCUS_RING_WIDTH,
|
|
1859
|
-
borderRadius:
|
|
2008
|
+
borderRadius: BOX_RADIUS2 - FOCUS_RING_INSET
|
|
1860
2009
|
},
|
|
1861
2010
|
tick: {
|
|
1862
2011
|
width: TICK_WIDTH,
|
|
@@ -1896,8 +2045,8 @@ var FormCheckbox = ({
|
|
|
1896
2045
|
const hintText = typeof hint === "string" && hint !== "" ? hint : description;
|
|
1897
2046
|
const hasHint = typeof hintText === "string" && hintText !== "";
|
|
1898
2047
|
const { hintId } = useFieldIds();
|
|
1899
|
-
const [focused, setFocused] =
|
|
1900
|
-
const themeStyles =
|
|
2048
|
+
const [focused, setFocused] = React39.useState(false);
|
|
2049
|
+
const themeStyles = React39.useMemo(() => {
|
|
1901
2050
|
const boxOn = checkboxBoxColors(colors, brand, true);
|
|
1902
2051
|
const boxOff = checkboxBoxColors(colors, brand, false);
|
|
1903
2052
|
const ring = { borderColor: brand };
|
|
@@ -1933,8 +2082,8 @@ var FormCheckbox = ({
|
|
|
1933
2082
|
onPress: toggle2,
|
|
1934
2083
|
role: "checkbox",
|
|
1935
2084
|
style: [
|
|
1936
|
-
|
|
1937
|
-
hasHint ? null :
|
|
2085
|
+
styles17.container,
|
|
2086
|
+
hasHint ? null : styles17.centered,
|
|
1938
2087
|
containerStyle,
|
|
1939
2088
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1940
2089
|
Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1942,13 +2091,13 @@ var FormCheckbox = ({
|
|
|
1942
2091
|
testID,
|
|
1943
2092
|
...keyboardProps,
|
|
1944
2093
|
children: [
|
|
1945
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
1946
|
-
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [
|
|
1947
|
-
value ? /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [
|
|
2094
|
+
/* @__PURE__ */ jsxs(View, { style: [styles17.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
2095
|
+
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles17.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
2096
|
+
value ? /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [styles17.tick, { borderColor: colors.surface }], testID: `${testID}-tick` }) : null
|
|
1948
2097
|
] }),
|
|
1949
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1950
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1951
|
-
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [
|
|
2098
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.textColumn, children: [
|
|
2099
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.label, themeStyles.label], children: label }),
|
|
2100
|
+
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [styles17.hint, themeStyles.hint], children: hintText }) : null
|
|
1952
2101
|
] })
|
|
1953
2102
|
]
|
|
1954
2103
|
}
|
|
@@ -2164,7 +2313,7 @@ var CHIP_PAD_H = 8;
|
|
|
2164
2313
|
var CHIP_PAD_V = 4;
|
|
2165
2314
|
var CHIP_RADIUS = 999;
|
|
2166
2315
|
var CHIP_FONT = 13;
|
|
2167
|
-
var
|
|
2316
|
+
var styles18 = StyleSheet.create({
|
|
2168
2317
|
chip: {
|
|
2169
2318
|
flexDirection: "row",
|
|
2170
2319
|
alignItems: "center",
|
|
@@ -2185,12 +2334,12 @@ function SelectedChip({ option, colors, removeLabel, removeHint, onRemove, testI
|
|
|
2185
2334
|
accessibilityLabel: removeLabel,
|
|
2186
2335
|
accessibilityRole: "button",
|
|
2187
2336
|
hitSlop: CHIP_HIT_SLOP,
|
|
2188
|
-
style: [
|
|
2337
|
+
style: [styles18.chip, { borderColor: colors.border, backgroundColor: colors.surface }],
|
|
2189
2338
|
testID,
|
|
2190
2339
|
onPress: () => onRemove(option.value),
|
|
2191
2340
|
children: [
|
|
2192
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
2193
|
-
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [
|
|
2341
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles18.text, { color: colors.text }], children: option.label }),
|
|
2342
|
+
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles18.text, { color: colors.text }], children: REMOVE_GLYPH })
|
|
2194
2343
|
]
|
|
2195
2344
|
}
|
|
2196
2345
|
);
|
|
@@ -2213,7 +2362,7 @@ var CHEVRON_DOWN2 = "\u25BE";
|
|
|
2213
2362
|
var CHEVRON_UP2 = "\u25B4";
|
|
2214
2363
|
var BOX_GAP = 6;
|
|
2215
2364
|
var TRIGGER_MIN_WIDTH = 96;
|
|
2216
|
-
var
|
|
2365
|
+
var styles19 = StyleSheet.create({
|
|
2217
2366
|
box: { flexWrap: "wrap", justifyContent: "flex-start", gap: BOX_GAP },
|
|
2218
2367
|
trigger: {
|
|
2219
2368
|
flexGrow: 1,
|
|
@@ -2247,7 +2396,7 @@ function MultiSelectBox(props) {
|
|
|
2247
2396
|
const chipColors = { text: colors.text, border: colors.border, surface: colors.surface };
|
|
2248
2397
|
const summary = chosen.map((option) => option.label).join(", ");
|
|
2249
2398
|
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: controlStyles.anchor, children: [
|
|
2250
|
-
/* @__PURE__ */ jsxs(View, { style: [controlStyles.selectTrigger,
|
|
2399
|
+
/* @__PURE__ */ jsxs(View, { style: [controlStyles.selectTrigger, styles19.box, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }], testID: `${testID}-box`, children: [
|
|
2251
2400
|
chosen.map((option) => /* @__PURE__ */ jsx(
|
|
2252
2401
|
SelectedChip,
|
|
2253
2402
|
{
|
|
@@ -2271,7 +2420,7 @@ function MultiSelectBox(props) {
|
|
|
2271
2420
|
"aria-haspopup": "menu",
|
|
2272
2421
|
"aria-labelledby": labelId,
|
|
2273
2422
|
disabled: remaining.length === 0,
|
|
2274
|
-
style:
|
|
2423
|
+
style: styles19.trigger,
|
|
2275
2424
|
testID: `${testID}-trigger`,
|
|
2276
2425
|
onPress: toggle2,
|
|
2277
2426
|
children: [
|
|
@@ -2709,20 +2858,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
2709
2858
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
2710
2859
|
return /* @__PURE__ */ jsxs(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
2711
2860
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2712
|
-
frame !== null ? /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
2861
|
+
frame !== null ? /* @__PURE__ */ jsx(Animated.View, { style: [styles20.dropdown, place, { opacity: progress, transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, scale === void 0 ? null : styles20.growFromField], testID: `${testID}-dropdown-${frame.placement}`, onLayout, children }) : null
|
|
2713
2862
|
] });
|
|
2714
2863
|
}
|
|
2715
|
-
var
|
|
2864
|
+
var styles20 = StyleSheet.create({
|
|
2716
2865
|
dropdown: { position: "absolute" },
|
|
2717
2866
|
growFromField: { transformOrigin: "top left" }
|
|
2718
2867
|
});
|
|
2719
2868
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children, progress, scale, accessibilityLabel }) {
|
|
2720
|
-
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style:
|
|
2869
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style: styles21.backdrop, children: [
|
|
2721
2870
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2722
|
-
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [
|
|
2871
|
+
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [styles21.sheet, { transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, progress === void 0 ? null : { opacity: progress }], children })
|
|
2723
2872
|
] }) });
|
|
2724
2873
|
}
|
|
2725
|
-
var
|
|
2874
|
+
var styles21 = StyleSheet.create({
|
|
2726
2875
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
2727
2876
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
2728
2877
|
});
|
|
@@ -3762,7 +3911,7 @@ var ROW_GAP = 4;
|
|
|
3762
3911
|
var TAB_PADDING = 4;
|
|
3763
3912
|
var INDICATOR_WIDTH = 2;
|
|
3764
3913
|
var TAB_FONT_SIZE = 12;
|
|
3765
|
-
var
|
|
3914
|
+
var styles22 = StyleSheet.create({
|
|
3766
3915
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
3767
3916
|
tab: {
|
|
3768
3917
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -3802,13 +3951,13 @@ var StepperTab = ({
|
|
|
3802
3951
|
accessibilityRole: "tab",
|
|
3803
3952
|
accessibilityState: { selected },
|
|
3804
3953
|
"aria-selected": selected,
|
|
3805
|
-
style: [
|
|
3954
|
+
style: [styles22.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
3806
3955
|
testID,
|
|
3807
3956
|
onBlur: ring.onBlur,
|
|
3808
3957
|
onFocus: ring.onFocus,
|
|
3809
3958
|
onPress: () => onStep(step.key),
|
|
3810
3959
|
...webKeyProps,
|
|
3811
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3960
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles22.text, { color: theme.colors.text }, selected ? styles22.textSelected : void 0], children: step.label })
|
|
3812
3961
|
}
|
|
3813
3962
|
);
|
|
3814
3963
|
};
|
|
@@ -3818,7 +3967,7 @@ var StepperTabs = ({
|
|
|
3818
3967
|
onStep,
|
|
3819
3968
|
stepHint,
|
|
3820
3969
|
testID
|
|
3821
|
-
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style:
|
|
3970
|
+
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style: styles22.row, testID, children: steps.map((step) => /* @__PURE__ */ jsx(
|
|
3822
3971
|
StepperTab,
|
|
3823
3972
|
{
|
|
3824
3973
|
hint: stepHint,
|
|
@@ -3837,7 +3986,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
3837
3986
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
3838
3987
|
}
|
|
3839
3988
|
var ROW_GAP2 = 8;
|
|
3840
|
-
var
|
|
3989
|
+
var styles23 = StyleSheet.create({
|
|
3841
3990
|
cell: { flex: 1, minWidth: 0 },
|
|
3842
3991
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
3843
3992
|
});
|
|
@@ -3849,8 +3998,8 @@ var StepperNav = ({
|
|
|
3849
3998
|
testID
|
|
3850
3999
|
}) => {
|
|
3851
4000
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
3852
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3853
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4001
|
+
return /* @__PURE__ */ jsxs(View, { style: styles23.row, testID, children: [
|
|
4002
|
+
/* @__PURE__ */ jsx(View, { style: styles23.cell, children: /* @__PURE__ */ jsx(
|
|
3854
4003
|
Button,
|
|
3855
4004
|
{
|
|
3856
4005
|
fullWidth: true,
|
|
@@ -3866,7 +4015,7 @@ var StepperNav = ({
|
|
|
3866
4015
|
}
|
|
3867
4016
|
}
|
|
3868
4017
|
) }),
|
|
3869
|
-
next === null ? null : /* @__PURE__ */ jsx(View, { style:
|
|
4018
|
+
next === null ? null : /* @__PURE__ */ jsx(View, { style: styles23.cell, children: /* @__PURE__ */ jsx(
|
|
3870
4019
|
Button,
|
|
3871
4020
|
{
|
|
3872
4021
|
fullWidth: true,
|
|
@@ -3881,13 +4030,13 @@ var StepperNav = ({
|
|
|
3881
4030
|
] });
|
|
3882
4031
|
};
|
|
3883
4032
|
var STATUS_FONT = 16;
|
|
3884
|
-
var
|
|
4033
|
+
var styles24 = StyleSheet.create({
|
|
3885
4034
|
line: { fontSize: STATUS_FONT }
|
|
3886
4035
|
});
|
|
3887
4036
|
function FormStatusLine({ message, testID, style }) {
|
|
3888
4037
|
const { theme } = useUi();
|
|
3889
4038
|
if (message === null || message === void 0 || message === "") return null;
|
|
3890
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
4039
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles24.line, { color: theme.colors.text }, style], testID, children: message });
|
|
3891
4040
|
}
|
|
3892
4041
|
function useFocusFirstInvalid(refs) {
|
|
3893
4042
|
const latest = useRef(refs);
|
|
@@ -3976,7 +4125,7 @@ function useKeepInView(trigger) {
|
|
|
3976
4125
|
}
|
|
3977
4126
|
var IS_WEB10 = Platform.OS === "web";
|
|
3978
4127
|
var INPUT_FONT2 = 14;
|
|
3979
|
-
var
|
|
4128
|
+
var styles25 = StyleSheet.create({
|
|
3980
4129
|
nativeButton: { minHeight: MIN_TOUCH_TARGET_PX, minWidth: MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
3981
4130
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
3982
4131
|
});
|
|
@@ -4004,10 +4153,10 @@ function FileInput({
|
|
|
4004
4153
|
accessibilityRole: "button",
|
|
4005
4154
|
accessibilityState: { disabled },
|
|
4006
4155
|
disabled,
|
|
4007
|
-
style:
|
|
4156
|
+
style: styles25.nativeButton,
|
|
4008
4157
|
testID,
|
|
4009
4158
|
onPress: onNativePick,
|
|
4010
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
4159
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles25.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
4011
4160
|
}
|
|
4012
4161
|
);
|
|
4013
4162
|
}
|
|
@@ -4037,7 +4186,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
4037
4186
|
var GAP6 = 8;
|
|
4038
4187
|
var TITLE_FONT_SIZE = 14;
|
|
4039
4188
|
var HELP_FONT_SIZE = 13;
|
|
4040
|
-
var
|
|
4189
|
+
var styles26 = StyleSheet.create({
|
|
4041
4190
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
4042
4191
|
root: { gap: GAP6 },
|
|
4043
4192
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -4059,11 +4208,11 @@ var UploadWithLinkField = ({
|
|
|
4059
4208
|
const url = value ?? "";
|
|
4060
4209
|
const [pasting, setPasting] = useState(url !== "");
|
|
4061
4210
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
4062
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4063
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4064
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4211
|
+
return /* @__PURE__ */ jsxs(View, { style: styles26.root, children: [
|
|
4212
|
+
/* @__PURE__ */ jsx(Text, { style: [styles26.title, { color: theme.colors.text }], children: labels.title }),
|
|
4213
|
+
/* @__PURE__ */ jsxs(View, { style: styles26.tile, children: [
|
|
4065
4214
|
url === "" ? /* @__PURE__ */ jsx(View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsx(Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
|
|
4066
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [
|
|
4215
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles26.help, { color: theme.colors.text }], children: labels.help })
|
|
4067
4216
|
] }),
|
|
4068
4217
|
uploadControl,
|
|
4069
4218
|
/* @__PURE__ */ jsx(
|
|
@@ -4074,12 +4223,12 @@ var UploadWithLinkField = ({
|
|
|
4074
4223
|
accessibilityRole: "button",
|
|
4075
4224
|
accessibilityState: { expanded: pasting },
|
|
4076
4225
|
"aria-expanded": pasting,
|
|
4077
|
-
style: [
|
|
4226
|
+
style: [styles26.toggle, ring.ringStyle],
|
|
4078
4227
|
testID: `${testID}-paste`,
|
|
4079
4228
|
onBlur: ring.onBlur,
|
|
4080
4229
|
onFocus: ring.onFocus,
|
|
4081
4230
|
onPress: () => setPasting(!pasting),
|
|
4082
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
4231
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles26.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
4083
4232
|
}
|
|
4084
4233
|
),
|
|
4085
4234
|
pasting ? /* @__PURE__ */ jsx(
|
|
@@ -4098,7 +4247,7 @@ var UploadWithLinkField = ({
|
|
|
4098
4247
|
};
|
|
4099
4248
|
var ACTION_GAP = 8;
|
|
4100
4249
|
var GROUP_GAP = 16;
|
|
4101
|
-
var
|
|
4250
|
+
var styles27 = StyleSheet.create({
|
|
4102
4251
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
4103
4252
|
group: { marginBottom: GROUP_GAP }
|
|
4104
4253
|
});
|
|
@@ -4121,7 +4270,7 @@ var AddOnRequest = ({
|
|
|
4121
4270
|
onRemove();
|
|
4122
4271
|
};
|
|
4123
4272
|
if (!isAddOnOpen(hasValue, requested))
|
|
4124
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
4273
|
+
return /* @__PURE__ */ jsx(View, { style: [styles27.action, style], children: /* @__PURE__ */ jsx(
|
|
4125
4274
|
Button,
|
|
4126
4275
|
{
|
|
4127
4276
|
accessibilityHint: addHint,
|
|
@@ -4133,9 +4282,9 @@ var AddOnRequest = ({
|
|
|
4133
4282
|
onPress: () => setRequested(true)
|
|
4134
4283
|
}
|
|
4135
4284
|
) });
|
|
4136
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
4285
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles27.group, style], testID, children: [
|
|
4137
4286
|
children,
|
|
4138
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4287
|
+
/* @__PURE__ */ jsx(View, { style: styles27.action, children: /* @__PURE__ */ jsx(
|
|
4139
4288
|
Button,
|
|
4140
4289
|
{
|
|
4141
4290
|
accessibilityHint: removeHint,
|
|
@@ -4152,7 +4301,7 @@ var AddOnRequest = ({
|
|
|
4152
4301
|
var ROW_GAP3 = 8;
|
|
4153
4302
|
var TEXT_SIZE = 13;
|
|
4154
4303
|
var TEXT_LINE = 18;
|
|
4155
|
-
var
|
|
4304
|
+
var styles28 = StyleSheet.create({
|
|
4156
4305
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
4157
4306
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
4158
4307
|
});
|
|
@@ -4160,8 +4309,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
4160
4309
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
4161
4310
|
const { theme } = useUi();
|
|
4162
4311
|
if (!isFixBarVisible(count)) return null;
|
|
4163
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
4164
|
-
/* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
4312
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles28.row, style], testID, children: [
|
|
4313
|
+
/* @__PURE__ */ jsx(Text, { role: "alert", style: [styles28.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
4165
4314
|
/* @__PURE__ */ jsx(
|
|
4166
4315
|
Button,
|
|
4167
4316
|
{
|
|
@@ -4199,21 +4348,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
4199
4348
|
accessibilityLabel: option.label,
|
|
4200
4349
|
accessibilityRole: "button",
|
|
4201
4350
|
accessibilityState: { selected: active, checked: current },
|
|
4202
|
-
style: [
|
|
4351
|
+
style: [styles29.row, active ? { backgroundColor: colors.surface } : null],
|
|
4203
4352
|
testID: `${testID}-option-${option.value}`,
|
|
4204
4353
|
onPress: () => onPick(option),
|
|
4205
4354
|
children: [
|
|
4206
4355
|
renderLeading?.(option),
|
|
4207
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4208
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4209
|
-
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4356
|
+
/* @__PURE__ */ jsxs(View, { style: styles29.label, children: [
|
|
4357
|
+
/* @__PURE__ */ jsx(Text, { style: [styles29.primary, { color: colors.text }], children: option.label }),
|
|
4358
|
+
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles29.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
4210
4359
|
] }),
|
|
4211
4360
|
renderDetail?.(option)
|
|
4212
4361
|
]
|
|
4213
4362
|
}
|
|
4214
4363
|
);
|
|
4215
4364
|
}
|
|
4216
|
-
var
|
|
4365
|
+
var styles29 = StyleSheet.create({
|
|
4217
4366
|
row: { minHeight: MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
4218
4367
|
label: { flex: 1 },
|
|
4219
4368
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -4227,11 +4376,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
4227
4376
|
const { colors } = theme;
|
|
4228
4377
|
if (options.length === 0) return null;
|
|
4229
4378
|
return /* @__PURE__ */ jsxs(View, { children: [
|
|
4230
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
4379
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles30.header, { color: colors.textSecondary }], children: title }),
|
|
4231
4380
|
options.map((option, index) => /* @__PURE__ */ jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
4232
4381
|
] });
|
|
4233
4382
|
}
|
|
4234
|
-
var
|
|
4383
|
+
var styles30 = StyleSheet.create({
|
|
4235
4384
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
4236
4385
|
});
|
|
4237
4386
|
var KEY_ESCAPE = "Escape";
|
|
@@ -4261,7 +4410,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4261
4410
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
4262
4411
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
4263
4412
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
4264
|
-
const list = /* @__PURE__ */ jsxs(View, { style: [
|
|
4413
|
+
const list = /* @__PURE__ */ jsxs(View, { style: [styles31.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
4265
4414
|
/* @__PURE__ */ jsx(
|
|
4266
4415
|
TextInput,
|
|
4267
4416
|
{
|
|
@@ -4278,16 +4427,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4278
4427
|
onSubmitEditing: submit
|
|
4279
4428
|
}
|
|
4280
4429
|
),
|
|
4281
|
-
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4430
|
+
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles31.sheetList : styles31.dropList, children: [
|
|
4282
4431
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4283
4432
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4284
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4433
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles31.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4285
4434
|
] })
|
|
4286
4435
|
] });
|
|
4287
4436
|
if (!isSheet) return /* @__PURE__ */ jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4288
4437
|
return /* @__PURE__ */ jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4289
4438
|
}
|
|
4290
|
-
var
|
|
4439
|
+
var styles31 = StyleSheet.create({
|
|
4291
4440
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4292
4441
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4293
4442
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4397,7 +4546,7 @@ function SearchSelect(props) {
|
|
|
4397
4546
|
const onTriggerBlur = useCallback(() => {
|
|
4398
4547
|
if (!openRef.current) onBlur?.();
|
|
4399
4548
|
}, [onBlur]);
|
|
4400
|
-
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style:
|
|
4549
|
+
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles32.anchor, children: [
|
|
4401
4550
|
/* @__PURE__ */ jsx(
|
|
4402
4551
|
Pressable,
|
|
4403
4552
|
{
|
|
@@ -4406,7 +4555,7 @@ function SearchSelect(props) {
|
|
|
4406
4555
|
accessibilityLabel,
|
|
4407
4556
|
accessibilityRole: "button",
|
|
4408
4557
|
accessibilityState: { expanded: state.open },
|
|
4409
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4558
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles32.customTrigger,
|
|
4410
4559
|
testID,
|
|
4411
4560
|
onBlur: onTriggerBlur,
|
|
4412
4561
|
onPress,
|
|
@@ -4418,7 +4567,7 @@ function SearchSelect(props) {
|
|
|
4418
4567
|
}
|
|
4419
4568
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4420
4569
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4421
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4570
|
+
/* @__PURE__ */ jsxs(View, { style: styles32.value, children: [
|
|
4422
4571
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4423
4572
|
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4424
4573
|
selected !== null ? /* @__PURE__ */ jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4431,7 +4580,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4431
4580
|
if (option.detail === void 0) return null;
|
|
4432
4581
|
return /* @__PURE__ */ jsx(Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4433
4582
|
}
|
|
4434
|
-
var
|
|
4583
|
+
var styles32 = StyleSheet.create({
|
|
4435
4584
|
anchor: { position: "relative" },
|
|
4436
4585
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4437
4586
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -5208,7 +5357,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5208
5357
|
const { theme } = useUi();
|
|
5209
5358
|
const { textSecondary } = theme.colors;
|
|
5210
5359
|
const options = useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
5211
|
-
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [
|
|
5360
|
+
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles33.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
5212
5361
|
return /* @__PURE__ */ jsx(
|
|
5213
5362
|
SearchSelect,
|
|
5214
5363
|
{
|
|
@@ -5226,7 +5375,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5226
5375
|
}
|
|
5227
5376
|
);
|
|
5228
5377
|
}
|
|
5229
|
-
var
|
|
5378
|
+
var styles33 = StyleSheet.create({
|
|
5230
5379
|
code: { fontSize: CODE_FONT }
|
|
5231
5380
|
});
|
|
5232
5381
|
function useBlurVerdict(validate) {
|
|
@@ -5482,9 +5631,9 @@ var LINE_GAP = 4;
|
|
|
5482
5631
|
function RejectionLine({ message, testID }) {
|
|
5483
5632
|
const { theme } = useUi();
|
|
5484
5633
|
if (message === null) return null;
|
|
5485
|
-
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [
|
|
5634
|
+
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles34.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5486
5635
|
}
|
|
5487
|
-
var
|
|
5636
|
+
var styles34 = StyleSheet.create({
|
|
5488
5637
|
line: { marginTop: LINE_GAP }
|
|
5489
5638
|
});
|
|
5490
5639
|
|
|
@@ -5631,7 +5780,7 @@ var PAD_V = 10;
|
|
|
5631
5780
|
var PAD_H = 16;
|
|
5632
5781
|
var TEXT_SIZE2 = 13;
|
|
5633
5782
|
var TEXT_LINE2 = 18;
|
|
5634
|
-
var
|
|
5783
|
+
var styles35 = StyleSheet.create({
|
|
5635
5784
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
5636
5785
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
5637
5786
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -5643,9 +5792,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5643
5792
|
const { colors } = theme;
|
|
5644
5793
|
const pinned = actionBarPosition(sticky, Platform.OS) === "sticky" ? PINNED : null;
|
|
5645
5794
|
const hasMessage = message !== void 0 && message !== "";
|
|
5646
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5647
|
-
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [
|
|
5648
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
5795
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles35.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
5796
|
+
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles35.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
5797
|
+
/* @__PURE__ */ jsx(View, { style: styles35.actions, children })
|
|
5649
5798
|
] });
|
|
5650
5799
|
};
|
|
5651
5800
|
|
|
@@ -5653,14 +5802,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5653
5802
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
5654
5803
|
var TITLE_SIZE = 13;
|
|
5655
5804
|
var TITLE_GAP = 6;
|
|
5656
|
-
var
|
|
5805
|
+
var styles36 = StyleSheet.create({
|
|
5657
5806
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
5658
5807
|
});
|
|
5659
5808
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
5660
5809
|
const { theme } = useUi();
|
|
5661
5810
|
const complete = isChecklistComplete(items, checked);
|
|
5662
5811
|
return /* @__PURE__ */ jsxs(View, { testID, children: [
|
|
5663
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
5812
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles36.title, { color: theme.colors.text }], children: title }),
|
|
5664
5813
|
items.map((item) => /* @__PURE__ */ jsx(
|
|
5665
5814
|
FormCheckbox,
|
|
5666
5815
|
{
|
|
@@ -5676,7 +5825,7 @@ var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = fals
|
|
|
5676
5825
|
children?.(complete)
|
|
5677
5826
|
] });
|
|
5678
5827
|
};
|
|
5679
|
-
var
|
|
5828
|
+
var MIN_TARGET_PX3 = 44;
|
|
5680
5829
|
var DOT_SIZE = 18;
|
|
5681
5830
|
var DOT_INNER = 8;
|
|
5682
5831
|
var ROW_GAP6 = 10;
|
|
@@ -5686,14 +5835,14 @@ var RADIUS2 = 8;
|
|
|
5686
5835
|
var LABEL_SIZE = 14;
|
|
5687
5836
|
var DESCRIPTION_SIZE = 12;
|
|
5688
5837
|
var DESCRIPTION_LINE = 16;
|
|
5689
|
-
var
|
|
5838
|
+
var styles37 = StyleSheet.create({
|
|
5690
5839
|
row: {
|
|
5691
5840
|
alignItems: "center",
|
|
5692
5841
|
borderRadius: RADIUS2,
|
|
5693
5842
|
borderWidth: 1,
|
|
5694
5843
|
columnGap: ROW_GAP6,
|
|
5695
5844
|
flexDirection: "row",
|
|
5696
|
-
minHeight:
|
|
5845
|
+
minHeight: MIN_TARGET_PX3,
|
|
5697
5846
|
paddingHorizontal: PAD_H2,
|
|
5698
5847
|
paddingVertical: PAD_V2
|
|
5699
5848
|
},
|
|
@@ -5717,15 +5866,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
5717
5866
|
accessibilityState: identity.accessibilityState,
|
|
5718
5867
|
"aria-checked": checked,
|
|
5719
5868
|
disabled,
|
|
5720
|
-
style: [
|
|
5869
|
+
style: [styles37.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
5721
5870
|
tabIndex,
|
|
5722
5871
|
testID: identity.testID,
|
|
5723
5872
|
onPress,
|
|
5724
5873
|
children: [
|
|
5725
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
5726
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5727
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5728
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
5874
|
+
/* @__PURE__ */ jsx(View, { style: [styles37.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles37.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
5875
|
+
/* @__PURE__ */ jsxs(View, { style: styles37.text, children: [
|
|
5876
|
+
/* @__PURE__ */ jsx(Text, { style: [styles37.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
5877
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles37.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
5729
5878
|
] })
|
|
5730
5879
|
]
|
|
5731
5880
|
}
|
|
@@ -5742,20 +5891,20 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
5742
5891
|
};
|
|
5743
5892
|
};
|
|
5744
5893
|
var ROW_GAP7 = 8;
|
|
5745
|
-
var
|
|
5894
|
+
var styles38 = StyleSheet.create({
|
|
5746
5895
|
list: { rowGap: ROW_GAP7 }
|
|
5747
5896
|
});
|
|
5748
5897
|
function RadioList(props) {
|
|
5749
5898
|
const { options, value, onChange, optionTestIDPrefix, label, error, required = false, disabled = false, testID } = props;
|
|
5750
5899
|
const { theme } = useUi();
|
|
5751
|
-
const colors =
|
|
5900
|
+
const colors = React39.useMemo(() => buildChipColors(theme.colors, theme.palette), [theme.colors, theme.palette]);
|
|
5752
5901
|
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
5753
5902
|
const radio = useRadioKeyboard({ enabled: true, disabled, values: options.map((option) => option.value), selectedIndex, onChange });
|
|
5754
5903
|
return /* @__PURE__ */ jsx(Field, { error, label, required, testID, children: ({ describedById, hasError }) => /* @__PURE__ */ jsx(
|
|
5755
5904
|
View,
|
|
5756
5905
|
{
|
|
5757
5906
|
accessibilityRole: "radiogroup",
|
|
5758
|
-
style:
|
|
5907
|
+
style: styles38.list,
|
|
5759
5908
|
...webFieldA11y({ describedById, hasError }),
|
|
5760
5909
|
...radio.groupProps,
|
|
5761
5910
|
children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
@@ -5809,11 +5958,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
5809
5958
|
);
|
|
5810
5959
|
}
|
|
5811
5960
|
var BUTTON_BASIS = "40%";
|
|
5812
|
-
var
|
|
5961
|
+
var styles39 = StyleSheet.create({
|
|
5813
5962
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
5814
5963
|
});
|
|
5815
5964
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
5816
|
-
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style:
|
|
5965
|
+
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles39.cell, children: /* @__PURE__ */ jsx(
|
|
5817
5966
|
Button,
|
|
5818
5967
|
{
|
|
5819
5968
|
fullWidth: true,
|
|
@@ -5894,21 +6043,21 @@ function StickyBarDecision(props) {
|
|
|
5894
6043
|
}
|
|
5895
6044
|
var TEXT_SIZE3 = 13;
|
|
5896
6045
|
var TEXT_LINE3 = 18;
|
|
5897
|
-
var
|
|
6046
|
+
var styles40 = StyleSheet.create({
|
|
5898
6047
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
5899
6048
|
});
|
|
5900
6049
|
var SubmitError = ({ message, testID }) => {
|
|
5901
6050
|
const { theme } = useUi();
|
|
5902
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
6051
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles40.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
5903
6052
|
};
|
|
5904
6053
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
5905
6054
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
5906
|
-
const [outcome, setOutcome] =
|
|
5907
|
-
const [note, setNote] =
|
|
5908
|
-
const [reasons, setReasons] =
|
|
5909
|
-
const [checked, setChecked] =
|
|
5910
|
-
const [error, setError] =
|
|
5911
|
-
const [pending, setPending] =
|
|
6055
|
+
const [outcome, setOutcome] = React39.useState("");
|
|
6056
|
+
const [note, setNote] = React39.useState("");
|
|
6057
|
+
const [reasons, setReasons] = React39.useState([]);
|
|
6058
|
+
const [checked, setChecked] = React39.useState([]);
|
|
6059
|
+
const [error, setError] = React39.useState(null);
|
|
6060
|
+
const [pending, setPending] = React39.useState(null);
|
|
5912
6061
|
const submit = async (override) => {
|
|
5913
6062
|
const target = override ?? outcome;
|
|
5914
6063
|
const problem = validateDecision(outcomes, target, note);
|
|
@@ -5942,7 +6091,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
5942
6091
|
}
|
|
5943
6092
|
var TITLE_SIZE2 = 15;
|
|
5944
6093
|
var PANEL_GAP = 12;
|
|
5945
|
-
var
|
|
6094
|
+
var styles41 = StyleSheet.create({
|
|
5946
6095
|
panel: { rowGap: PANEL_GAP },
|
|
5947
6096
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
5948
6097
|
});
|
|
@@ -5956,8 +6105,8 @@ function DecisionPanel(props) {
|
|
|
5956
6105
|
const { theme } = useUi();
|
|
5957
6106
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
5958
6107
|
const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
|
|
5959
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5960
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
6108
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles41.panel, style], testID, children: [
|
|
6109
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles41.title, { color: theme.colors.text }], children: labels.title }),
|
|
5961
6110
|
checklist !== void 0 ? /* @__PURE__ */ jsx(GatedChecklist, { checked: state.checked, items: checklist.items, testID: `${testID}-checklist`, title: checklist.title, onToggle: state.toggleCheck, children: (complete) => body(!complete) }) : body(false),
|
|
5962
6111
|
state.error === "submit" ? /* @__PURE__ */ jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
5963
6112
|
] });
|
|
@@ -5984,13 +6133,13 @@ function ruleTone(met, flagUnmet) {
|
|
|
5984
6133
|
return flagUnmet ? "refused" /* Refused */ : "unmet" /* Unmet */;
|
|
5985
6134
|
}
|
|
5986
6135
|
var MARK_SIZE = 16;
|
|
5987
|
-
var
|
|
6136
|
+
var CHECK_SIZE2 = 12;
|
|
5988
6137
|
var RING_WIDTH = 1.5;
|
|
5989
6138
|
var POP_FROM = 0.6;
|
|
5990
6139
|
var POP_PEAK = 1.12;
|
|
5991
6140
|
var POP_UP_MS = 160;
|
|
5992
6141
|
var POP_SETTLE_MS = 100;
|
|
5993
|
-
var
|
|
6142
|
+
var styles42 = StyleSheet.create({
|
|
5994
6143
|
mark: { width: MARK_SIZE, height: MARK_SIZE, borderRadius: MARK_SIZE / 2, alignItems: "center", justifyContent: "center" },
|
|
5995
6144
|
ring: { borderWidth: RING_WIDTH }
|
|
5996
6145
|
});
|
|
@@ -6010,8 +6159,8 @@ function RuleMark({ tone, colors }) {
|
|
|
6010
6159
|
]).start();
|
|
6011
6160
|
}, [met, reduced, scale]);
|
|
6012
6161
|
const color = colors.mark[tone];
|
|
6013
|
-
const shape = met ? { backgroundColor: color } : [
|
|
6014
|
-
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsx(View, { style: [
|
|
6162
|
+
const shape = met ? { backgroundColor: color } : [styles42.ring, { borderColor: color }];
|
|
6163
|
+
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsx(View, { style: [styles42.mark, shape], children: met ? /* @__PURE__ */ jsx(SvgIcon, { color: colors.onMark, name: "check", size: CHECK_SIZE2 }) : null }) });
|
|
6015
6164
|
}
|
|
6016
6165
|
var GAP8 = 6;
|
|
6017
6166
|
var ROW_GAP8 = 8;
|
|
@@ -6021,9 +6170,9 @@ var METER_HEIGHT = 4;
|
|
|
6021
6170
|
var RADIUS3 = 999;
|
|
6022
6171
|
var CHIP_PAD_V2 = 4;
|
|
6023
6172
|
var CHIP_PAD_H2 = 10;
|
|
6024
|
-
var
|
|
6173
|
+
var CHIP_BORDER2 = 1;
|
|
6025
6174
|
var HALF4 = "50%";
|
|
6026
|
-
var
|
|
6175
|
+
var styles43 = StyleSheet.create({
|
|
6027
6176
|
column: { gap: GAP8 },
|
|
6028
6177
|
row: { flexDirection: "row", alignItems: "center", gap: ROW_GAP8 },
|
|
6029
6178
|
text: { fontSize: FONT5, lineHeight: LINE, flexShrink: 1 },
|
|
@@ -6032,38 +6181,38 @@ var styles41 = StyleSheet.create({
|
|
|
6032
6181
|
grid: { flexDirection: "row", flexWrap: "wrap", rowGap: GAP8 },
|
|
6033
6182
|
cell: { flexBasis: HALF4, maxWidth: HALF4, paddingRight: GAP8 },
|
|
6034
6183
|
chips: { flexDirection: "row", flexWrap: "wrap", gap: GAP8 },
|
|
6035
|
-
chip: { borderRadius: RADIUS3, borderWidth:
|
|
6184
|
+
chip: { borderRadius: RADIUS3, borderWidth: CHIP_BORDER2, paddingVertical: CHIP_PAD_V2, paddingHorizontal: CHIP_PAD_H2 },
|
|
6036
6185
|
metPhrase: { fontWeight: "700", textDecorationLine: "underline" }
|
|
6037
6186
|
});
|
|
6038
6187
|
function RuleList({ rules, flagUnmet, colors, testID, listStyle, itemStyle, outlined = false }) {
|
|
6039
6188
|
return /* @__PURE__ */ jsx(View, { role: "list", style: listStyle, testID, children: rules.map((rule) => {
|
|
6040
6189
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6041
6190
|
const outline = outlined ? { borderColor: colors.mark[tone] } : null;
|
|
6042
|
-
return /* @__PURE__ */ jsxs(View, { role: "listitem", style: [
|
|
6191
|
+
return /* @__PURE__ */ jsxs(View, { role: "listitem", style: [styles43.row, itemStyle, outline], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6043
6192
|
/* @__PURE__ */ jsx(RuleMark, { colors, tone }),
|
|
6044
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
6193
|
+
/* @__PURE__ */ jsx(Text, { style: [styles43.text, { color: colors.text[tone] }], children: rule.label })
|
|
6045
6194
|
] }, rule.id);
|
|
6046
6195
|
}) });
|
|
6047
6196
|
}
|
|
6048
6197
|
function RulesChecklist(props) {
|
|
6049
|
-
return /* @__PURE__ */ jsx(RuleList, { ...props, listStyle:
|
|
6198
|
+
return /* @__PURE__ */ jsx(RuleList, { ...props, listStyle: styles43.column });
|
|
6050
6199
|
}
|
|
6051
6200
|
function RulesChips(props) {
|
|
6052
|
-
return /* @__PURE__ */ jsx(RuleList, { ...props, outlined: true, itemStyle:
|
|
6201
|
+
return /* @__PURE__ */ jsx(RuleList, { ...props, outlined: true, itemStyle: styles43.chip, listStyle: styles43.chips });
|
|
6053
6202
|
}
|
|
6054
6203
|
function RulesMeterGrid(props) {
|
|
6055
6204
|
const { rules, flagUnmet, colors, testID } = props;
|
|
6056
6205
|
const metCount = rules.filter((rule) => rule.met).length;
|
|
6057
6206
|
const unfilled = flagUnmet ? colors.mark.refused : colors.track;
|
|
6058
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
6059
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6060
|
-
/* @__PURE__ */ jsx(RuleList, { ...props, itemStyle:
|
|
6207
|
+
return /* @__PURE__ */ jsxs(View, { style: styles43.column, children: [
|
|
6208
|
+
/* @__PURE__ */ jsx(View, { style: styles43.meter, testID: `${testID}-meter`, children: rules.map((rule, index) => /* @__PURE__ */ jsx(View, { style: [styles43.segment, { backgroundColor: index < metCount ? colors.mark.met : unfilled }] }, rule.id)) }),
|
|
6209
|
+
/* @__PURE__ */ jsx(RuleList, { ...props, itemStyle: styles43.cell, listStyle: styles43.grid })
|
|
6061
6210
|
] });
|
|
6062
6211
|
}
|
|
6063
6212
|
function RulesSentence({ rules, flagUnmet, colors, testID }) {
|
|
6064
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
6213
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles43.text, { color: colors.text.unmet }], testID, children: rules.map((rule, index) => {
|
|
6065
6214
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6066
|
-
return /* @__PURE__ */ jsxs(Text, { style: [{ color: colors.text[tone] }, rule.met ?
|
|
6215
|
+
return /* @__PURE__ */ jsxs(Text, { style: [{ color: colors.text[tone] }, rule.met ? styles43.metPhrase : null], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6067
6216
|
index > 0 ? ", " : "",
|
|
6068
6217
|
rule.label
|
|
6069
6218
|
] }, rule.id);
|
|
@@ -6082,7 +6231,7 @@ function PasswordRules({ display, ...variant }) {
|
|
|
6082
6231
|
}
|
|
6083
6232
|
}
|
|
6084
6233
|
var ICON_SIZE = 20;
|
|
6085
|
-
var
|
|
6234
|
+
var styles44 = StyleSheet.create({
|
|
6086
6235
|
button: { width: MIN_TOUCH_TARGET_PX, height: MIN_TOUCH_TARGET_PX, alignItems: "center", justifyContent: "center" }
|
|
6087
6236
|
});
|
|
6088
6237
|
function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, color, testID }) {
|
|
@@ -6094,7 +6243,7 @@ function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, col
|
|
|
6094
6243
|
accessibilityLabel: label,
|
|
6095
6244
|
accessibilityRole: "button",
|
|
6096
6245
|
"aria-pressed": revealed,
|
|
6097
|
-
style:
|
|
6246
|
+
style: styles44.button,
|
|
6098
6247
|
testID,
|
|
6099
6248
|
onPress: onToggle,
|
|
6100
6249
|
onPressIn,
|
|
@@ -6148,7 +6297,7 @@ function useRuleColors(override) {
|
|
|
6148
6297
|
var RULES_GAP = 8;
|
|
6149
6298
|
var TOGGLE_INSET = 48;
|
|
6150
6299
|
var NO_RULES = [];
|
|
6151
|
-
var
|
|
6300
|
+
var styles45 = StyleSheet.create({
|
|
6152
6301
|
inputRow: { position: "relative", justifyContent: "center" },
|
|
6153
6302
|
input: { paddingRight: TOGGLE_INSET },
|
|
6154
6303
|
toggle: { position: "absolute", right: 0, top: 0, bottom: 0, justifyContent: "center" },
|
|
@@ -6181,7 +6330,7 @@ function useCaretKeepingToggle(inputRef, initialLength) {
|
|
|
6181
6330
|
}, [inputRef]);
|
|
6182
6331
|
return { revealed, onPressIn, onToggle, onSelectionChange };
|
|
6183
6332
|
}
|
|
6184
|
-
var PasswordField =
|
|
6333
|
+
var PasswordField = React39.forwardRef(function PasswordField2({ label, value, onChangeText, labels, testID, rules = NO_RULES, rulesDisplay = "meterGrid" /* MeterGrid */, flagUnmet = false, error, colors: colorOverride, inputProps }, ref) {
|
|
6185
6334
|
const inputRef = useRef(null);
|
|
6186
6335
|
useImperativeHandle(ref, () => inputRef.current);
|
|
6187
6336
|
const toggle2 = useCaretKeepingToggle(inputRef, value.length);
|
|
@@ -6190,7 +6339,7 @@ var PasswordField = React38.forwardRef(function PasswordField2({ label, value, o
|
|
|
6190
6339
|
const rulesId = `${testID}-rules`;
|
|
6191
6340
|
const hasRules = rules.length > 0;
|
|
6192
6341
|
return /* @__PURE__ */ jsx(Field, { error, label, testID: `${testID}-field`, children: (context) => /* @__PURE__ */ jsxs(View, { children: [
|
|
6193
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6342
|
+
/* @__PURE__ */ jsxs(View, { style: styles45.inputRow, children: [
|
|
6194
6343
|
/* @__PURE__ */ jsx(
|
|
6195
6344
|
ThemedTextInput,
|
|
6196
6345
|
{
|
|
@@ -6202,18 +6351,18 @@ var PasswordField = React38.forwardRef(function PasswordField2({ label, value, o
|
|
|
6202
6351
|
hasError: context.hasError || flagUnmet && rules.some((rule) => !rule.met),
|
|
6203
6352
|
id: context.controlId,
|
|
6204
6353
|
secureTextEntry: !toggle2.revealed,
|
|
6205
|
-
style: [
|
|
6354
|
+
style: [styles45.input, inputProps?.style],
|
|
6206
6355
|
testID,
|
|
6207
6356
|
value,
|
|
6208
6357
|
onChangeText,
|
|
6209
6358
|
onSelectionChange: toggle2.onSelectionChange
|
|
6210
6359
|
}
|
|
6211
6360
|
),
|
|
6212
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6361
|
+
/* @__PURE__ */ jsx(View, { style: styles45.toggle, children: /* @__PURE__ */ jsx(RevealToggle, { color: colors.text.unmet, hideLabel: labels.hide, revealed: toggle2.revealed, showLabel: labels.show, testID: `${testID}-reveal`, onPressIn: toggle2.onPressIn, onToggle: toggle2.onToggle }) })
|
|
6213
6362
|
] }),
|
|
6214
|
-
hasRules ? /* @__PURE__ */ jsxs(View, { nativeID: rulesId, style:
|
|
6363
|
+
hasRules ? /* @__PURE__ */ jsxs(View, { nativeID: rulesId, style: styles45.rules, children: [
|
|
6215
6364
|
/* @__PURE__ */ jsx(PasswordRules, { colors, display: rulesDisplay, flagUnmet, rules, testID: rulesId }),
|
|
6216
|
-
/* @__PURE__ */ jsx(Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style:
|
|
6365
|
+
/* @__PURE__ */ jsx(Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style: styles45.live, testID: `${testID}-announce`, children: announcement })
|
|
6217
6366
|
] }) : null
|
|
6218
6367
|
] }) });
|
|
6219
6368
|
});
|