@dloizides/ui-forms 1.62.0 → 1.63.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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +148 -136
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -136
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -625,6 +625,16 @@ var FormActions = ({
|
|
|
625
625
|
}
|
|
626
626
|
)
|
|
627
627
|
] });
|
|
628
|
+
var ICON_INSET = 12;
|
|
629
|
+
var ICON_ROOM = 36;
|
|
630
|
+
var styles11 = StyleSheet.create({
|
|
631
|
+
box: { justifyContent: "center" },
|
|
632
|
+
icon: { position: "absolute", left: ICON_INSET, zIndex: 1 }
|
|
633
|
+
});
|
|
634
|
+
var FieldIcon = ({ icon, children }) => /* @__PURE__ */ jsxs(View, { style: styles11.box, children: [
|
|
635
|
+
/* @__PURE__ */ jsx(View, { "aria-hidden": true, pointerEvents: "none", style: styles11.icon, testID: "form-field-icon", children: icon }),
|
|
636
|
+
children
|
|
637
|
+
] });
|
|
628
638
|
var FIELD_GAP = 4;
|
|
629
639
|
var LABEL_FONT = 11;
|
|
630
640
|
var LABEL_LETTER_SPACING = 0.4;
|
|
@@ -719,7 +729,7 @@ var DETAIL_FONT = 12;
|
|
|
719
729
|
var DETAIL_GAP = 12;
|
|
720
730
|
var STACK_GAP = 2;
|
|
721
731
|
var DETAIL_BESIDE_MIN_MENU_WIDTH = 400;
|
|
722
|
-
var
|
|
732
|
+
var styles12 = StyleSheet.create({
|
|
723
733
|
beside: { alignItems: "baseline", flexDirection: "row", gap: DETAIL_GAP, justifyContent: "space-between" },
|
|
724
734
|
stacked: { gap: STACK_GAP },
|
|
725
735
|
shrink: { flexShrink: 1 },
|
|
@@ -754,9 +764,9 @@ function OptionRow({ option, isActive, isHighlighted, isListboxRow, menuWidth, h
|
|
|
754
764
|
onPress: () => onSelect(option.value),
|
|
755
765
|
style: [controlStyles.option, isHighlighted ? { backgroundColor: colors.text } : null],
|
|
756
766
|
testID: `${testID}-option-${option.value}`,
|
|
757
|
-
children: /* @__PURE__ */ jsxs(View, { style: isDetailBesideTitle(menuWidth) ?
|
|
758
|
-
/* @__PURE__ */ jsx(Text, { style: [controlStyles.optionText,
|
|
759
|
-
hasDetail ? /* @__PURE__ */ jsx(Text, { style: [
|
|
767
|
+
children: /* @__PURE__ */ jsxs(View, { style: isDetailBesideTitle(menuWidth) ? styles12.beside : styles12.stacked, children: [
|
|
768
|
+
/* @__PURE__ */ jsx(Text, { style: [controlStyles.optionText, styles12.shrink, { color: ink.title, fontWeight: isBold ? ACTIVE_WEIGHT : IDLE_WEIGHT }], children: option.label }),
|
|
769
|
+
hasDetail ? /* @__PURE__ */ jsx(Text, { style: [styles12.detail, { color: ink.detail }], children: option.detail }) : null
|
|
760
770
|
] })
|
|
761
771
|
}
|
|
762
772
|
);
|
|
@@ -1322,6 +1332,7 @@ function useAutoGrowRows(text, minRows) {
|
|
|
1322
1332
|
}, []);
|
|
1323
1333
|
return { numberOfLines: rowsForText(text, inputWidth, minRows), onLayout };
|
|
1324
1334
|
}
|
|
1335
|
+
var iconRoom = { paddingLeft: ICON_ROOM };
|
|
1325
1336
|
var PlainFormField = ({
|
|
1326
1337
|
label,
|
|
1327
1338
|
labelHidden = false,
|
|
@@ -1332,6 +1343,7 @@ var PlainFormField = ({
|
|
|
1332
1343
|
recentMax,
|
|
1333
1344
|
inputRef,
|
|
1334
1345
|
labelVariant,
|
|
1346
|
+
icon,
|
|
1335
1347
|
...textInputProps
|
|
1336
1348
|
}) => /* @__PURE__ */ jsx(
|
|
1337
1349
|
Field,
|
|
@@ -1352,7 +1364,7 @@ var PlainFormField = ({
|
|
|
1352
1364
|
testID: "form-field-input",
|
|
1353
1365
|
...textInputProps
|
|
1354
1366
|
};
|
|
1355
|
-
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : /* @__PURE__ */ jsx(ThemedTextInput, { ref: inputRef, ...inputProps });
|
|
1367
|
+
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : icon === void 0 ? /* @__PURE__ */ jsx(ThemedTextInput, { ref: inputRef, ...inputProps }) : /* @__PURE__ */ jsx(FieldIcon, { icon, children: /* @__PURE__ */ jsx(ThemedTextInput, { ref: inputRef, style: iconRoom, ...inputProps }) });
|
|
1356
1368
|
}
|
|
1357
1369
|
}
|
|
1358
1370
|
);
|
|
@@ -1373,7 +1385,7 @@ var AutoGrowFormField = ({
|
|
|
1373
1385
|
};
|
|
1374
1386
|
var FormField = ({ autoGrowMinRows, ...fieldProps }) => autoGrowMinRows === void 0 ? /* @__PURE__ */ jsx(PlainFormField, { ...fieldProps }) : /* @__PURE__ */ jsx(AutoGrowFormField, { ...fieldProps, minRows: autoGrowMinRows });
|
|
1375
1387
|
var TEXT_INPUT_HEIGHT = 48;
|
|
1376
|
-
var
|
|
1388
|
+
var styles13 = StyleSheet.create({
|
|
1377
1389
|
track: { padding: 0, borderWidth: 0 },
|
|
1378
1390
|
besideTextInput: {
|
|
1379
1391
|
padding: 0,
|
|
@@ -1382,8 +1394,8 @@ var styles12 = StyleSheet.create({
|
|
|
1382
1394
|
alignItems: "stretch"
|
|
1383
1395
|
}
|
|
1384
1396
|
});
|
|
1385
|
-
var SEGMENT_BESIDE_FIELD =
|
|
1386
|
-
var SEGMENT_BESIDE_TEXT_INPUT =
|
|
1397
|
+
var SEGMENT_BESIDE_FIELD = styles13.track;
|
|
1398
|
+
var SEGMENT_BESIDE_TEXT_INPUT = styles13.besideTextInput;
|
|
1387
1399
|
|
|
1388
1400
|
// src/ChipSelector/constants.ts
|
|
1389
1401
|
var TRANSPARENT_COLOR = "transparent";
|
|
@@ -1754,7 +1766,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1754
1766
|
ariaChecked: isRadio ? selected : void 0
|
|
1755
1767
|
};
|
|
1756
1768
|
}
|
|
1757
|
-
var
|
|
1769
|
+
var styles14 = StyleSheet.create({
|
|
1758
1770
|
chipContainer: {
|
|
1759
1771
|
flexDirection: "row",
|
|
1760
1772
|
flexWrap: "wrap",
|
|
@@ -1848,7 +1860,7 @@ var ChipSelector = ({
|
|
|
1848
1860
|
View,
|
|
1849
1861
|
{
|
|
1850
1862
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1851
|
-
style: [
|
|
1863
|
+
style: [styles14.chipContainer, chipRowGap(size)],
|
|
1852
1864
|
...webFieldA11y({ describedById, hasError }),
|
|
1853
1865
|
...radio.groupProps,
|
|
1854
1866
|
children: options.map(renderChip)
|
|
@@ -1858,7 +1870,7 @@ var ChipSelector = ({
|
|
|
1858
1870
|
);
|
|
1859
1871
|
};
|
|
1860
1872
|
var BOX_SLOT_PAD_H = 10;
|
|
1861
|
-
var
|
|
1873
|
+
var styles15 = StyleSheet.create({
|
|
1862
1874
|
row: {
|
|
1863
1875
|
minWidth: MIN_TOUCH_TARGET_PX,
|
|
1864
1876
|
minHeight: MIN_TOUCH_TARGET_PX,
|
|
@@ -1881,7 +1893,7 @@ var SwitchSlot = ({
|
|
|
1881
1893
|
accessibilityHint,
|
|
1882
1894
|
activeTrackColor,
|
|
1883
1895
|
inBox = false
|
|
1884
|
-
}) => /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: inBox ?
|
|
1896
|
+
}) => /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: inBox ? styles15.box : styles15.row, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsx(
|
|
1885
1897
|
Switch,
|
|
1886
1898
|
{
|
|
1887
1899
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1898,7 +1910,7 @@ var BOX_RADIUS = 8;
|
|
|
1898
1910
|
var BOX_PAD_LEFT = 10;
|
|
1899
1911
|
var BOX_BORDER = 1;
|
|
1900
1912
|
var STATE_FONT_SIZE = 13;
|
|
1901
|
-
var
|
|
1913
|
+
var styles16 = StyleSheet.create({
|
|
1902
1914
|
box: {
|
|
1903
1915
|
flexDirection: "row",
|
|
1904
1916
|
alignItems: "center",
|
|
@@ -1933,19 +1945,19 @@ var FormSwitchBox = ({
|
|
|
1933
1945
|
{
|
|
1934
1946
|
accessible: false,
|
|
1935
1947
|
disabled,
|
|
1936
|
-
style: [
|
|
1948
|
+
style: [styles16.box, boxColors],
|
|
1937
1949
|
tabIndex: -1,
|
|
1938
1950
|
testID: slot.testID,
|
|
1939
1951
|
onPress: toggle2,
|
|
1940
1952
|
children: [
|
|
1941
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1953
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles16.state, { color: colors.text }], children: stateLabel ?? "" }),
|
|
1942
1954
|
/* @__PURE__ */ jsx(SwitchSlot, { ...slot, inBox: true })
|
|
1943
1955
|
]
|
|
1944
1956
|
}
|
|
1945
1957
|
) });
|
|
1946
1958
|
};
|
|
1947
1959
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1948
|
-
var
|
|
1960
|
+
var styles17 = StyleSheet.create({
|
|
1949
1961
|
container: {
|
|
1950
1962
|
flexDirection: "row",
|
|
1951
1963
|
justifyContent: "space-between",
|
|
@@ -2001,13 +2013,13 @@ var FormSwitchRow = ({
|
|
|
2001
2013
|
accessible: false,
|
|
2002
2014
|
disabled,
|
|
2003
2015
|
onPress: toggle2,
|
|
2004
|
-
style: [
|
|
2016
|
+
style: [styles17.container, containerStyle],
|
|
2005
2017
|
tabIndex: -1,
|
|
2006
2018
|
testID,
|
|
2007
2019
|
children: [
|
|
2008
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2009
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2010
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2020
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.textColumn, children: [
|
|
2021
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.label, themeStyles.label], children: label }),
|
|
2022
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles17.description, themeStyles.description], children: description }) : null
|
|
2011
2023
|
] }),
|
|
2012
2024
|
/* @__PURE__ */ jsx(
|
|
2013
2025
|
SwitchSlot,
|
|
@@ -2058,7 +2070,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
2058
2070
|
var FOCUS_RING_WIDTH = 2;
|
|
2059
2071
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
2060
2072
|
var FOCUS_RING_INSET = -6;
|
|
2061
|
-
var
|
|
2073
|
+
var styles18 = StyleSheet.create({
|
|
2062
2074
|
container: {
|
|
2063
2075
|
flexDirection: "row",
|
|
2064
2076
|
alignItems: "flex-start",
|
|
@@ -2174,9 +2186,9 @@ var FormCheckbox = ({
|
|
|
2174
2186
|
onPress: toggle2,
|
|
2175
2187
|
role: "checkbox",
|
|
2176
2188
|
style: [
|
|
2177
|
-
|
|
2178
|
-
hasHint ? null :
|
|
2179
|
-
labelHidden ?
|
|
2189
|
+
styles18.container,
|
|
2190
|
+
hasHint ? null : styles18.centered,
|
|
2191
|
+
labelHidden ? styles18.boxOnly : null,
|
|
2180
2192
|
containerStyle,
|
|
2181
2193
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
2182
2194
|
Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -2184,13 +2196,13 @@ var FormCheckbox = ({
|
|
|
2184
2196
|
testID,
|
|
2185
2197
|
...keyboardProps,
|
|
2186
2198
|
children: [
|
|
2187
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2188
|
-
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [
|
|
2189
|
-
value ? /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [
|
|
2199
|
+
/* @__PURE__ */ jsxs(View, { style: [styles18.box, lookBox, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
2200
|
+
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles18.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
2201
|
+
value ? /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [styles18.tick, themeStyles.tick], testID: `${testID}-tick` }) : null
|
|
2190
2202
|
] }),
|
|
2191
|
-
labelHidden ? null : /* @__PURE__ */ jsxs(View, { style:
|
|
2192
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2193
|
-
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [
|
|
2203
|
+
labelHidden ? null : /* @__PURE__ */ jsxs(View, { style: styles18.textColumn, children: [
|
|
2204
|
+
/* @__PURE__ */ jsx(Text, { style: [styles18.label, themeStyles.label], children: label }),
|
|
2205
|
+
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [styles18.hint, themeStyles.hint], children: hintText }) : null
|
|
2194
2206
|
] })
|
|
2195
2207
|
]
|
|
2196
2208
|
}
|
|
@@ -2537,7 +2549,7 @@ var CHIP_PAD_H = 8;
|
|
|
2537
2549
|
var CHIP_PAD_V = 4;
|
|
2538
2550
|
var CHIP_RADIUS = 999;
|
|
2539
2551
|
var CHIP_FONT = 13;
|
|
2540
|
-
var
|
|
2552
|
+
var styles19 = StyleSheet.create({
|
|
2541
2553
|
chip: {
|
|
2542
2554
|
flexDirection: "row",
|
|
2543
2555
|
alignItems: "center",
|
|
@@ -2558,12 +2570,12 @@ function SelectedChip({ option, colors, removeLabel, removeHint, onRemove, testI
|
|
|
2558
2570
|
accessibilityLabel: removeLabel,
|
|
2559
2571
|
accessibilityRole: "button",
|
|
2560
2572
|
hitSlop: CHIP_HIT_SLOP,
|
|
2561
|
-
style: [
|
|
2573
|
+
style: [styles19.chip, { borderColor: colors.border, backgroundColor: colors.surface }],
|
|
2562
2574
|
testID,
|
|
2563
2575
|
onPress: () => onRemove(option.value),
|
|
2564
2576
|
children: [
|
|
2565
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
2566
|
-
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [
|
|
2577
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles19.text, { color: colors.text }], children: option.label }),
|
|
2578
|
+
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles19.text, { color: colors.text }], children: REMOVE_GLYPH })
|
|
2567
2579
|
]
|
|
2568
2580
|
}
|
|
2569
2581
|
);
|
|
@@ -2586,7 +2598,7 @@ var CHEVRON_DOWN2 = "\u25BE";
|
|
|
2586
2598
|
var CHEVRON_UP2 = "\u25B4";
|
|
2587
2599
|
var BOX_GAP = 6;
|
|
2588
2600
|
var TRIGGER_MIN_WIDTH = 96;
|
|
2589
|
-
var
|
|
2601
|
+
var styles20 = StyleSheet.create({
|
|
2590
2602
|
box: { flexWrap: "wrap", justifyContent: "flex-start", gap: BOX_GAP },
|
|
2591
2603
|
trigger: {
|
|
2592
2604
|
flexGrow: 1,
|
|
@@ -2620,7 +2632,7 @@ function MultiSelectBox(props) {
|
|
|
2620
2632
|
const chipColors = { text: colors.text, border: colors.border, surface: colors.surface };
|
|
2621
2633
|
const summary = chosen.map((option) => option.label).join(", ");
|
|
2622
2634
|
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: controlStyles.anchor, children: [
|
|
2623
|
-
/* @__PURE__ */ jsxs(View, { style: [controlStyles.selectTrigger,
|
|
2635
|
+
/* @__PURE__ */ jsxs(View, { style: [controlStyles.selectTrigger, styles20.box, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }], testID: `${testID}-box`, children: [
|
|
2624
2636
|
chosen.map((option) => /* @__PURE__ */ jsx(
|
|
2625
2637
|
SelectedChip,
|
|
2626
2638
|
{
|
|
@@ -2644,7 +2656,7 @@ function MultiSelectBox(props) {
|
|
|
2644
2656
|
"aria-haspopup": "menu",
|
|
2645
2657
|
"aria-labelledby": labelId,
|
|
2646
2658
|
disabled: remaining.length === 0,
|
|
2647
|
-
style:
|
|
2659
|
+
style: styles20.trigger,
|
|
2648
2660
|
testID: `${testID}-trigger`,
|
|
2649
2661
|
onPress: toggle2,
|
|
2650
2662
|
children: [
|
|
@@ -3084,20 +3096,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
3084
3096
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
3085
3097
|
return /* @__PURE__ */ jsxs(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
3086
3098
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
3087
|
-
frame !== null ? /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
3099
|
+
frame !== null ? /* @__PURE__ */ jsx(Animated.View, { style: [styles21.dropdown, place, { opacity: progress, transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, scale === void 0 ? null : styles21.growFromField], testID: `${testID}-dropdown-${frame.placement}`, onLayout, children }) : null
|
|
3088
3100
|
] });
|
|
3089
3101
|
}
|
|
3090
|
-
var
|
|
3102
|
+
var styles21 = StyleSheet.create({
|
|
3091
3103
|
dropdown: { position: "absolute" },
|
|
3092
3104
|
growFromField: { transformOrigin: "top left" }
|
|
3093
3105
|
});
|
|
3094
3106
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children, progress, scale, accessibilityLabel }) {
|
|
3095
|
-
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style:
|
|
3107
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style: styles22.backdrop, children: [
|
|
3096
3108
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
3097
|
-
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [
|
|
3109
|
+
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [styles22.sheet, { transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, progress === void 0 ? null : { opacity: progress }], children })
|
|
3098
3110
|
] }) });
|
|
3099
3111
|
}
|
|
3100
|
-
var
|
|
3112
|
+
var styles22 = StyleSheet.create({
|
|
3101
3113
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
3102
3114
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
3103
3115
|
});
|
|
@@ -3673,9 +3685,9 @@ var GLYPH_EM = 0.62;
|
|
|
3673
3685
|
var PAD_INLINE = 12;
|
|
3674
3686
|
var BORDER = 1;
|
|
3675
3687
|
var PLACEHOLDER_CHARS = 15;
|
|
3676
|
-
function closedFieldMinWidth(text,
|
|
3688
|
+
function closedFieldMinWidth(text, iconRoom2) {
|
|
3677
3689
|
const chars = Math.max(text.length, PLACEHOLDER_CHARS);
|
|
3678
|
-
return Math.ceil(chars * FONT_PX * GLYPH_EM) + PAD_INLINE +
|
|
3690
|
+
return Math.ceil(chars * FONT_PX * GLYPH_EM) + PAD_INLINE + iconRoom2 + BORDER + BORDER;
|
|
3679
3691
|
}
|
|
3680
3692
|
|
|
3681
3693
|
// src/DatePicker/utils/datePattern.ts
|
|
@@ -3731,7 +3743,7 @@ function typedEditBind(typed) {
|
|
|
3731
3743
|
};
|
|
3732
3744
|
}
|
|
3733
3745
|
var SINGLE_PICKER_WIDTH = 340;
|
|
3734
|
-
var
|
|
3746
|
+
var ICON_ROOM2 = 48;
|
|
3735
3747
|
var ICON_SLOT = { position: "absolute", right: 2, top: 0, bottom: 0, display: "flex", alignItems: "center" };
|
|
3736
3748
|
var anchorStyles = StyleSheet.create({ wrap: { position: "relative", width: "100%" } });
|
|
3737
3749
|
function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
@@ -3766,7 +3778,7 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3766
3778
|
event.preventDefault();
|
|
3767
3779
|
if (typed.isReady()) onSubmit();
|
|
3768
3780
|
};
|
|
3769
|
-
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: [anchorStyles.wrap, { minWidth: closedFieldMinWidth(typed.display,
|
|
3781
|
+
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: [anchorStyles.wrap, { minWidth: closedFieldMinWidth(typed.display, ICON_ROOM2) }], testID: `${testID}-anchor`, children: [
|
|
3770
3782
|
/* @__PURE__ */ jsx(
|
|
3771
3783
|
"input",
|
|
3772
3784
|
{
|
|
@@ -3779,7 +3791,7 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3779
3791
|
disabled,
|
|
3780
3792
|
id: context.controlId,
|
|
3781
3793
|
placeholder: labels.datePlaceholder !== "" ? labels.datePlaceholder : datePattern(locale),
|
|
3782
|
-
style: { ...buildNativeInputStyle(style, look), paddingInlineEnd:
|
|
3794
|
+
style: { ...buildNativeInputStyle(style, look), paddingInlineEnd: ICON_ROOM2 },
|
|
3783
3795
|
title: accessibilityHint,
|
|
3784
3796
|
type: "text",
|
|
3785
3797
|
value: typed.display,
|
|
@@ -4071,7 +4083,7 @@ function WebDateRange({ value, onChange, onSubmit, fromLabel, toLabel, hint, tes
|
|
|
4071
4083
|
);
|
|
4072
4084
|
};
|
|
4073
4085
|
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: anchorStyles.wrap, children: [
|
|
4074
|
-
/* @__PURE__ */ jsxs("div", { ...hoverBind, style: { ...buildNativeInputStyle(style), display: "flex", alignItems: "center", gap: GAP5, paddingInlineEnd:
|
|
4086
|
+
/* @__PURE__ */ jsxs("div", { ...hoverBind, style: { ...buildNativeInputStyle(style), display: "flex", alignItems: "center", gap: GAP5, paddingInlineEnd: ICON_ROOM2 }, children: [
|
|
4075
4087
|
segment("from" /* From */, from),
|
|
4076
4088
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2192" }),
|
|
4077
4089
|
segment("to" /* To */, to)
|
|
@@ -4149,7 +4161,7 @@ var ROW_GAP = 4;
|
|
|
4149
4161
|
var TAB_PADDING = 4;
|
|
4150
4162
|
var INDICATOR_WIDTH = 2;
|
|
4151
4163
|
var TAB_FONT_SIZE = 12;
|
|
4152
|
-
var
|
|
4164
|
+
var styles23 = StyleSheet.create({
|
|
4153
4165
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
4154
4166
|
tab: {
|
|
4155
4167
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -4189,13 +4201,13 @@ var StepperTab = ({
|
|
|
4189
4201
|
accessibilityRole: "tab",
|
|
4190
4202
|
accessibilityState: { selected },
|
|
4191
4203
|
"aria-selected": selected,
|
|
4192
|
-
style: [
|
|
4204
|
+
style: [styles23.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
4193
4205
|
testID,
|
|
4194
4206
|
onBlur: ring.onBlur,
|
|
4195
4207
|
onFocus: ring.onFocus,
|
|
4196
4208
|
onPress: () => onStep(step.key),
|
|
4197
4209
|
...webKeyProps,
|
|
4198
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
4210
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles23.text, { color: theme.colors.text }, selected ? styles23.textSelected : void 0], children: step.label })
|
|
4199
4211
|
}
|
|
4200
4212
|
);
|
|
4201
4213
|
};
|
|
@@ -4205,7 +4217,7 @@ var StepperTabs = ({
|
|
|
4205
4217
|
onStep,
|
|
4206
4218
|
stepHint,
|
|
4207
4219
|
testID
|
|
4208
|
-
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style:
|
|
4220
|
+
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style: styles23.row, testID, children: steps.map((step) => /* @__PURE__ */ jsx(
|
|
4209
4221
|
StepperTab,
|
|
4210
4222
|
{
|
|
4211
4223
|
hint: stepHint,
|
|
@@ -4224,7 +4236,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
4224
4236
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
4225
4237
|
}
|
|
4226
4238
|
var ROW_GAP2 = 8;
|
|
4227
|
-
var
|
|
4239
|
+
var styles24 = StyleSheet.create({
|
|
4228
4240
|
cell: { flex: 1, minWidth: 0 },
|
|
4229
4241
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
4230
4242
|
});
|
|
@@ -4236,8 +4248,8 @@ var StepperNav = ({
|
|
|
4236
4248
|
testID
|
|
4237
4249
|
}) => {
|
|
4238
4250
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
4239
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4240
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4251
|
+
return /* @__PURE__ */ jsxs(View, { style: styles24.row, testID, children: [
|
|
4252
|
+
/* @__PURE__ */ jsx(View, { style: styles24.cell, children: /* @__PURE__ */ jsx(
|
|
4241
4253
|
Button,
|
|
4242
4254
|
{
|
|
4243
4255
|
fullWidth: true,
|
|
@@ -4253,7 +4265,7 @@ var StepperNav = ({
|
|
|
4253
4265
|
}
|
|
4254
4266
|
}
|
|
4255
4267
|
) }),
|
|
4256
|
-
next === null ? null : /* @__PURE__ */ jsx(View, { style:
|
|
4268
|
+
next === null ? null : /* @__PURE__ */ jsx(View, { style: styles24.cell, children: /* @__PURE__ */ jsx(
|
|
4257
4269
|
Button,
|
|
4258
4270
|
{
|
|
4259
4271
|
fullWidth: true,
|
|
@@ -4268,13 +4280,13 @@ var StepperNav = ({
|
|
|
4268
4280
|
] });
|
|
4269
4281
|
};
|
|
4270
4282
|
var STATUS_FONT = 16;
|
|
4271
|
-
var
|
|
4283
|
+
var styles25 = StyleSheet.create({
|
|
4272
4284
|
line: { fontSize: STATUS_FONT }
|
|
4273
4285
|
});
|
|
4274
4286
|
function FormStatusLine({ message, testID, style }) {
|
|
4275
4287
|
const { theme } = useUi();
|
|
4276
4288
|
if (message === null || message === void 0 || message === "") return null;
|
|
4277
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
4289
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles25.line, { color: theme.colors.text }, style], testID, children: message });
|
|
4278
4290
|
}
|
|
4279
4291
|
function useFocusFirstInvalid(refs) {
|
|
4280
4292
|
const latest = useRef(refs);
|
|
@@ -4363,7 +4375,7 @@ function useKeepInView(trigger) {
|
|
|
4363
4375
|
}
|
|
4364
4376
|
var IS_WEB10 = Platform.OS === "web";
|
|
4365
4377
|
var INPUT_FONT2 = 14;
|
|
4366
|
-
var
|
|
4378
|
+
var styles26 = StyleSheet.create({
|
|
4367
4379
|
nativeButton: { minHeight: MIN_TOUCH_TARGET_PX, minWidth: MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
4368
4380
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
4369
4381
|
});
|
|
@@ -4391,10 +4403,10 @@ function FileInput({
|
|
|
4391
4403
|
accessibilityRole: "button",
|
|
4392
4404
|
accessibilityState: { disabled },
|
|
4393
4405
|
disabled,
|
|
4394
|
-
style:
|
|
4406
|
+
style: styles26.nativeButton,
|
|
4395
4407
|
testID,
|
|
4396
4408
|
onPress: onNativePick,
|
|
4397
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
4409
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles26.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
4398
4410
|
}
|
|
4399
4411
|
);
|
|
4400
4412
|
}
|
|
@@ -4424,7 +4436,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
4424
4436
|
var GAP6 = 8;
|
|
4425
4437
|
var TITLE_FONT_SIZE = 14;
|
|
4426
4438
|
var HELP_FONT_SIZE = 13;
|
|
4427
|
-
var
|
|
4439
|
+
var styles27 = StyleSheet.create({
|
|
4428
4440
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
4429
4441
|
root: { gap: GAP6 },
|
|
4430
4442
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -4446,11 +4458,11 @@ var UploadWithLinkField = ({
|
|
|
4446
4458
|
const url = value ?? "";
|
|
4447
4459
|
const [pasting, setPasting] = useState(url !== "");
|
|
4448
4460
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
4449
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4450
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4451
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4461
|
+
return /* @__PURE__ */ jsxs(View, { style: styles27.root, children: [
|
|
4462
|
+
/* @__PURE__ */ jsx(Text, { style: [styles27.title, { color: theme.colors.text }], children: labels.title }),
|
|
4463
|
+
/* @__PURE__ */ jsxs(View, { style: styles27.tile, children: [
|
|
4452
4464
|
url === "" ? /* @__PURE__ */ jsx(View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsx(Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
|
|
4453
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [
|
|
4465
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles27.help, { color: theme.colors.text }], children: labels.help })
|
|
4454
4466
|
] }),
|
|
4455
4467
|
uploadControl,
|
|
4456
4468
|
/* @__PURE__ */ jsx(
|
|
@@ -4461,12 +4473,12 @@ var UploadWithLinkField = ({
|
|
|
4461
4473
|
accessibilityRole: "button",
|
|
4462
4474
|
accessibilityState: { expanded: pasting },
|
|
4463
4475
|
"aria-expanded": pasting,
|
|
4464
|
-
style: [
|
|
4476
|
+
style: [styles27.toggle, ring.ringStyle],
|
|
4465
4477
|
testID: `${testID}-paste`,
|
|
4466
4478
|
onBlur: ring.onBlur,
|
|
4467
4479
|
onFocus: ring.onFocus,
|
|
4468
4480
|
onPress: () => setPasting(!pasting),
|
|
4469
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
4481
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles27.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
4470
4482
|
}
|
|
4471
4483
|
),
|
|
4472
4484
|
pasting ? /* @__PURE__ */ jsx(
|
|
@@ -4485,7 +4497,7 @@ var UploadWithLinkField = ({
|
|
|
4485
4497
|
};
|
|
4486
4498
|
var ACTION_GAP = 8;
|
|
4487
4499
|
var GROUP_GAP = 16;
|
|
4488
|
-
var
|
|
4500
|
+
var styles28 = StyleSheet.create({
|
|
4489
4501
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
4490
4502
|
group: { marginBottom: GROUP_GAP }
|
|
4491
4503
|
});
|
|
@@ -4508,7 +4520,7 @@ var AddOnRequest = ({
|
|
|
4508
4520
|
onRemove();
|
|
4509
4521
|
};
|
|
4510
4522
|
if (!isAddOnOpen(hasValue, requested))
|
|
4511
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
4523
|
+
return /* @__PURE__ */ jsx(View, { style: [styles28.action, style], children: /* @__PURE__ */ jsx(
|
|
4512
4524
|
Button,
|
|
4513
4525
|
{
|
|
4514
4526
|
accessibilityHint: addHint,
|
|
@@ -4520,9 +4532,9 @@ var AddOnRequest = ({
|
|
|
4520
4532
|
onPress: () => setRequested(true)
|
|
4521
4533
|
}
|
|
4522
4534
|
) });
|
|
4523
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
4535
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles28.group, style], testID, children: [
|
|
4524
4536
|
children,
|
|
4525
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4537
|
+
/* @__PURE__ */ jsx(View, { style: styles28.action, children: /* @__PURE__ */ jsx(
|
|
4526
4538
|
Button,
|
|
4527
4539
|
{
|
|
4528
4540
|
accessibilityHint: removeHint,
|
|
@@ -4539,7 +4551,7 @@ var AddOnRequest = ({
|
|
|
4539
4551
|
var ROW_GAP3 = 8;
|
|
4540
4552
|
var TEXT_SIZE = 13;
|
|
4541
4553
|
var TEXT_LINE = 18;
|
|
4542
|
-
var
|
|
4554
|
+
var styles29 = StyleSheet.create({
|
|
4543
4555
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
4544
4556
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
4545
4557
|
});
|
|
@@ -4547,8 +4559,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
4547
4559
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
4548
4560
|
const { theme } = useUi();
|
|
4549
4561
|
if (!isFixBarVisible(count)) return null;
|
|
4550
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
4551
|
-
/* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
4562
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles29.row, style], testID, children: [
|
|
4563
|
+
/* @__PURE__ */ jsx(Text, { role: "alert", style: [styles29.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
4552
4564
|
/* @__PURE__ */ jsx(
|
|
4553
4565
|
Button,
|
|
4554
4566
|
{
|
|
@@ -4579,21 +4591,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
4579
4591
|
accessibilityLabel: option.label,
|
|
4580
4592
|
accessibilityRole: "button",
|
|
4581
4593
|
accessibilityState: { selected: active, checked: current },
|
|
4582
|
-
style: [
|
|
4594
|
+
style: [styles30.row, active ? { backgroundColor: colors.surface } : null],
|
|
4583
4595
|
testID: `${testID}-option-${option.value}`,
|
|
4584
4596
|
onPress: () => onPick(option),
|
|
4585
4597
|
children: [
|
|
4586
4598
|
renderLeading?.(option),
|
|
4587
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4588
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4589
|
-
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4599
|
+
/* @__PURE__ */ jsxs(View, { style: styles30.label, children: [
|
|
4600
|
+
/* @__PURE__ */ jsx(Text, { style: [styles30.primary, { color: colors.text }], children: option.label }),
|
|
4601
|
+
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles30.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
4590
4602
|
] }),
|
|
4591
4603
|
renderDetail?.(option)
|
|
4592
4604
|
]
|
|
4593
4605
|
}
|
|
4594
4606
|
);
|
|
4595
4607
|
}
|
|
4596
|
-
var
|
|
4608
|
+
var styles30 = StyleSheet.create({
|
|
4597
4609
|
row: { minHeight: MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
4598
4610
|
label: { flex: 1 },
|
|
4599
4611
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -4607,11 +4619,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
4607
4619
|
const { colors } = theme;
|
|
4608
4620
|
if (options.length === 0) return null;
|
|
4609
4621
|
return /* @__PURE__ */ jsxs(View, { children: [
|
|
4610
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
4622
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles31.header, { color: colors.textSecondary }], children: title }),
|
|
4611
4623
|
options.map((option, index) => /* @__PURE__ */ jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
4612
4624
|
] });
|
|
4613
4625
|
}
|
|
4614
|
-
var
|
|
4626
|
+
var styles31 = StyleSheet.create({
|
|
4615
4627
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
4616
4628
|
});
|
|
4617
4629
|
var KEY_ESCAPE = "Escape";
|
|
@@ -4641,7 +4653,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4641
4653
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
4642
4654
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
4643
4655
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
4644
|
-
const list = /* @__PURE__ */ jsxs(View, { style: [
|
|
4656
|
+
const list = /* @__PURE__ */ jsxs(View, { style: [styles32.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
4645
4657
|
/* @__PURE__ */ jsx(
|
|
4646
4658
|
TextInput,
|
|
4647
4659
|
{
|
|
@@ -4658,16 +4670,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4658
4670
|
onSubmitEditing: submit
|
|
4659
4671
|
}
|
|
4660
4672
|
),
|
|
4661
|
-
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4673
|
+
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles32.sheetList : styles32.dropList, children: [
|
|
4662
4674
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4663
4675
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4664
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4676
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles32.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4665
4677
|
] })
|
|
4666
4678
|
] });
|
|
4667
4679
|
if (!isSheet) return /* @__PURE__ */ jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4668
4680
|
return /* @__PURE__ */ jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4669
4681
|
}
|
|
4670
|
-
var
|
|
4682
|
+
var styles32 = StyleSheet.create({
|
|
4671
4683
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4672
4684
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4673
4685
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4764,7 +4776,7 @@ function SearchSelect(props) {
|
|
|
4764
4776
|
const onTriggerBlur = useCallback(() => {
|
|
4765
4777
|
if (!openRef.current) onBlur?.();
|
|
4766
4778
|
}, [onBlur]);
|
|
4767
|
-
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style:
|
|
4779
|
+
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles33.anchor, children: [
|
|
4768
4780
|
/* @__PURE__ */ jsx(
|
|
4769
4781
|
Pressable,
|
|
4770
4782
|
{
|
|
@@ -4773,7 +4785,7 @@ function SearchSelect(props) {
|
|
|
4773
4785
|
accessibilityLabel,
|
|
4774
4786
|
accessibilityRole: "button",
|
|
4775
4787
|
accessibilityState: { expanded: state.open },
|
|
4776
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4788
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles33.customTrigger,
|
|
4777
4789
|
testID,
|
|
4778
4790
|
onBlur: onTriggerBlur,
|
|
4779
4791
|
onPress,
|
|
@@ -4785,7 +4797,7 @@ function SearchSelect(props) {
|
|
|
4785
4797
|
}
|
|
4786
4798
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4787
4799
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4788
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4800
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.value, children: [
|
|
4789
4801
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4790
4802
|
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4791
4803
|
selected !== null ? /* @__PURE__ */ jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4798,7 +4810,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4798
4810
|
if (option.detail === void 0) return null;
|
|
4799
4811
|
return /* @__PURE__ */ jsx(Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4800
4812
|
}
|
|
4801
|
-
var
|
|
4813
|
+
var styles33 = StyleSheet.create({
|
|
4802
4814
|
anchor: { position: "relative" },
|
|
4803
4815
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4804
4816
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -5575,7 +5587,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5575
5587
|
const { theme } = useUi();
|
|
5576
5588
|
const { textSecondary } = theme.colors;
|
|
5577
5589
|
const options = useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
5578
|
-
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [
|
|
5590
|
+
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles34.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
5579
5591
|
return /* @__PURE__ */ jsx(
|
|
5580
5592
|
SearchSelect,
|
|
5581
5593
|
{
|
|
@@ -5593,7 +5605,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5593
5605
|
}
|
|
5594
5606
|
);
|
|
5595
5607
|
}
|
|
5596
|
-
var
|
|
5608
|
+
var styles34 = StyleSheet.create({
|
|
5597
5609
|
code: { fontSize: CODE_FONT }
|
|
5598
5610
|
});
|
|
5599
5611
|
function useBlurVerdict(validate) {
|
|
@@ -5849,9 +5861,9 @@ var LINE_GAP = 4;
|
|
|
5849
5861
|
function RejectionLine({ message, testID }) {
|
|
5850
5862
|
const { theme } = useUi();
|
|
5851
5863
|
if (message === null) return null;
|
|
5852
|
-
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [
|
|
5864
|
+
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles35.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5853
5865
|
}
|
|
5854
|
-
var
|
|
5866
|
+
var styles35 = StyleSheet.create({
|
|
5855
5867
|
line: { marginTop: LINE_GAP }
|
|
5856
5868
|
});
|
|
5857
5869
|
|
|
@@ -5998,7 +6010,7 @@ var PAD_V = 10;
|
|
|
5998
6010
|
var PAD_H = 16;
|
|
5999
6011
|
var TEXT_SIZE2 = 13;
|
|
6000
6012
|
var TEXT_LINE2 = 18;
|
|
6001
|
-
var
|
|
6013
|
+
var styles36 = StyleSheet.create({
|
|
6002
6014
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
6003
6015
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
6004
6016
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -6010,9 +6022,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
6010
6022
|
const { colors } = theme;
|
|
6011
6023
|
const pinned = actionBarPosition(sticky, Platform.OS) === "sticky" ? PINNED : null;
|
|
6012
6024
|
const hasMessage = message !== void 0 && message !== "";
|
|
6013
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
6014
|
-
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [
|
|
6015
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6025
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles36.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
6026
|
+
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles36.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
6027
|
+
/* @__PURE__ */ jsx(View, { style: styles36.actions, children })
|
|
6016
6028
|
] });
|
|
6017
6029
|
};
|
|
6018
6030
|
|
|
@@ -6020,14 +6032,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
6020
6032
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
6021
6033
|
var TITLE_SIZE = 13;
|
|
6022
6034
|
var TITLE_GAP = 6;
|
|
6023
|
-
var
|
|
6035
|
+
var styles37 = StyleSheet.create({
|
|
6024
6036
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
6025
6037
|
});
|
|
6026
6038
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
6027
6039
|
const { theme } = useUi();
|
|
6028
6040
|
const complete = isChecklistComplete(items, checked);
|
|
6029
6041
|
return /* @__PURE__ */ jsxs(View, { testID, children: [
|
|
6030
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
6042
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles37.title, { color: theme.colors.text }], children: title }),
|
|
6031
6043
|
items.map((item) => /* @__PURE__ */ jsx(
|
|
6032
6044
|
FormCheckbox,
|
|
6033
6045
|
{
|
|
@@ -6053,7 +6065,7 @@ var RADIUS2 = 8;
|
|
|
6053
6065
|
var LABEL_SIZE = 14;
|
|
6054
6066
|
var DESCRIPTION_SIZE = 12;
|
|
6055
6067
|
var DESCRIPTION_LINE = 16;
|
|
6056
|
-
var
|
|
6068
|
+
var styles38 = StyleSheet.create({
|
|
6057
6069
|
row: {
|
|
6058
6070
|
alignItems: "center",
|
|
6059
6071
|
borderRadius: RADIUS2,
|
|
@@ -6084,15 +6096,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
6084
6096
|
accessibilityState: identity.accessibilityState,
|
|
6085
6097
|
"aria-checked": checked,
|
|
6086
6098
|
disabled,
|
|
6087
|
-
style: [
|
|
6099
|
+
style: [styles38.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
6088
6100
|
tabIndex,
|
|
6089
6101
|
testID: identity.testID,
|
|
6090
6102
|
onPress,
|
|
6091
6103
|
children: [
|
|
6092
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
6093
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6094
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
6095
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
6104
|
+
/* @__PURE__ */ jsx(View, { style: [styles38.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles38.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
6105
|
+
/* @__PURE__ */ jsxs(View, { style: styles38.text, children: [
|
|
6106
|
+
/* @__PURE__ */ jsx(Text, { style: [styles38.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
6107
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles38.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
6096
6108
|
] })
|
|
6097
6109
|
]
|
|
6098
6110
|
}
|
|
@@ -6109,7 +6121,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
6109
6121
|
};
|
|
6110
6122
|
};
|
|
6111
6123
|
var ROW_GAP7 = 8;
|
|
6112
|
-
var
|
|
6124
|
+
var styles39 = StyleSheet.create({
|
|
6113
6125
|
list: { rowGap: ROW_GAP7 }
|
|
6114
6126
|
});
|
|
6115
6127
|
function RadioList(props) {
|
|
@@ -6122,7 +6134,7 @@ function RadioList(props) {
|
|
|
6122
6134
|
View,
|
|
6123
6135
|
{
|
|
6124
6136
|
accessibilityRole: "radiogroup",
|
|
6125
|
-
style:
|
|
6137
|
+
style: styles39.list,
|
|
6126
6138
|
...webFieldA11y({ describedById, hasError }),
|
|
6127
6139
|
...radio.groupProps,
|
|
6128
6140
|
children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
@@ -6176,11 +6188,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
6176
6188
|
);
|
|
6177
6189
|
}
|
|
6178
6190
|
var BUTTON_BASIS = "40%";
|
|
6179
|
-
var
|
|
6191
|
+
var styles40 = StyleSheet.create({
|
|
6180
6192
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
6181
6193
|
});
|
|
6182
6194
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
6183
|
-
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style:
|
|
6195
|
+
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles40.cell, children: /* @__PURE__ */ jsx(
|
|
6184
6196
|
Button,
|
|
6185
6197
|
{
|
|
6186
6198
|
fullWidth: true,
|
|
@@ -6261,12 +6273,12 @@ function StickyBarDecision(props) {
|
|
|
6261
6273
|
}
|
|
6262
6274
|
var TEXT_SIZE3 = 13;
|
|
6263
6275
|
var TEXT_LINE3 = 18;
|
|
6264
|
-
var
|
|
6276
|
+
var styles41 = StyleSheet.create({
|
|
6265
6277
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
6266
6278
|
});
|
|
6267
6279
|
var SubmitError = ({ message, testID }) => {
|
|
6268
6280
|
const { theme } = useUi();
|
|
6269
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
6281
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles41.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
6270
6282
|
};
|
|
6271
6283
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
6272
6284
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
@@ -6309,7 +6321,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
6309
6321
|
}
|
|
6310
6322
|
var TITLE_SIZE2 = 15;
|
|
6311
6323
|
var PANEL_GAP = 12;
|
|
6312
|
-
var
|
|
6324
|
+
var styles42 = StyleSheet.create({
|
|
6313
6325
|
panel: { rowGap: PANEL_GAP },
|
|
6314
6326
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
6315
6327
|
});
|
|
@@ -6323,8 +6335,8 @@ function DecisionPanel(props) {
|
|
|
6323
6335
|
const { theme } = useUi();
|
|
6324
6336
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
6325
6337
|
const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
|
|
6326
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
6327
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
6338
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles42.panel, style], testID, children: [
|
|
6339
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles42.title, { color: theme.colors.text }], children: labels.title }),
|
|
6328
6340
|
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),
|
|
6329
6341
|
state.error === "submit" ? /* @__PURE__ */ jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
6330
6342
|
] });
|
|
@@ -6357,7 +6369,7 @@ var POP_FROM = 0.6;
|
|
|
6357
6369
|
var POP_PEAK = 1.12;
|
|
6358
6370
|
var POP_UP_MS = 160;
|
|
6359
6371
|
var POP_SETTLE_MS = 100;
|
|
6360
|
-
var
|
|
6372
|
+
var styles43 = StyleSheet.create({
|
|
6361
6373
|
mark: { width: MARK_SIZE, height: MARK_SIZE, borderRadius: MARK_SIZE / 2, alignItems: "center", justifyContent: "center" },
|
|
6362
6374
|
ring: { borderWidth: RING_WIDTH }
|
|
6363
6375
|
});
|
|
@@ -6377,8 +6389,8 @@ function RuleMark({ tone, colors }) {
|
|
|
6377
6389
|
]).start();
|
|
6378
6390
|
}, [met, reduced, scale]);
|
|
6379
6391
|
const color = colors.mark[tone];
|
|
6380
|
-
const shape = met ? { backgroundColor: color } : [
|
|
6381
|
-
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsx(View, { style: [
|
|
6392
|
+
const shape = met ? { backgroundColor: color } : [styles43.ring, { borderColor: color }];
|
|
6393
|
+
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsx(View, { style: [styles43.mark, shape], children: met ? /* @__PURE__ */ jsx(SvgIcon, { color: colors.onMark, name: "check", size: CHECK_SIZE2 }) : null }) });
|
|
6382
6394
|
}
|
|
6383
6395
|
var GAP8 = 6;
|
|
6384
6396
|
var ROW_GAP8 = 8;
|
|
@@ -6390,7 +6402,7 @@ var CHIP_PAD_V2 = 4;
|
|
|
6390
6402
|
var CHIP_PAD_H2 = 10;
|
|
6391
6403
|
var CHIP_BORDER2 = 1;
|
|
6392
6404
|
var HALF4 = "50%";
|
|
6393
|
-
var
|
|
6405
|
+
var styles44 = StyleSheet.create({
|
|
6394
6406
|
column: { gap: GAP8 },
|
|
6395
6407
|
row: { flexDirection: "row", alignItems: "center", gap: ROW_GAP8 },
|
|
6396
6408
|
text: { fontSize: FONT5, lineHeight: LINE, flexShrink: 1 },
|
|
@@ -6406,31 +6418,31 @@ function RuleList({ rules, flagUnmet, colors, testID, listStyle, itemStyle, outl
|
|
|
6406
6418
|
return /* @__PURE__ */ jsx(View, { role: "list", style: listStyle, testID, children: rules.map((rule) => {
|
|
6407
6419
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6408
6420
|
const outline = outlined ? { borderColor: colors.mark[tone] } : null;
|
|
6409
|
-
return /* @__PURE__ */ jsxs(View, { role: "listitem", style: [
|
|
6421
|
+
return /* @__PURE__ */ jsxs(View, { role: "listitem", style: [styles44.row, itemStyle, outline], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6410
6422
|
/* @__PURE__ */ jsx(RuleMark, { colors, tone }),
|
|
6411
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
6423
|
+
/* @__PURE__ */ jsx(Text, { style: [styles44.text, { color: colors.text[tone] }], children: rule.label })
|
|
6412
6424
|
] }, rule.id);
|
|
6413
6425
|
}) });
|
|
6414
6426
|
}
|
|
6415
6427
|
function RulesChecklist(props) {
|
|
6416
|
-
return /* @__PURE__ */ jsx(RuleList, { ...props, listStyle:
|
|
6428
|
+
return /* @__PURE__ */ jsx(RuleList, { ...props, listStyle: styles44.column });
|
|
6417
6429
|
}
|
|
6418
6430
|
function RulesChips(props) {
|
|
6419
|
-
return /* @__PURE__ */ jsx(RuleList, { ...props, outlined: true, itemStyle:
|
|
6431
|
+
return /* @__PURE__ */ jsx(RuleList, { ...props, outlined: true, itemStyle: styles44.chip, listStyle: styles44.chips });
|
|
6420
6432
|
}
|
|
6421
6433
|
function RulesMeterGrid(props) {
|
|
6422
6434
|
const { rules, flagUnmet, colors, testID } = props;
|
|
6423
6435
|
const metCount = rules.filter((rule) => rule.met).length;
|
|
6424
6436
|
const unfilled = flagUnmet ? colors.mark.refused : colors.track;
|
|
6425
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
6426
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6427
|
-
/* @__PURE__ */ jsx(RuleList, { ...props, itemStyle:
|
|
6437
|
+
return /* @__PURE__ */ jsxs(View, { style: styles44.column, children: [
|
|
6438
|
+
/* @__PURE__ */ jsx(View, { style: styles44.meter, testID: `${testID}-meter`, children: rules.map((rule, index) => /* @__PURE__ */ jsx(View, { style: [styles44.segment, { backgroundColor: index < metCount ? colors.mark.met : unfilled }] }, rule.id)) }),
|
|
6439
|
+
/* @__PURE__ */ jsx(RuleList, { ...props, itemStyle: styles44.cell, listStyle: styles44.grid })
|
|
6428
6440
|
] });
|
|
6429
6441
|
}
|
|
6430
6442
|
function RulesSentence({ rules, flagUnmet, colors, testID }) {
|
|
6431
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
6443
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles44.text, { color: colors.text.unmet }], testID, children: rules.map((rule, index) => {
|
|
6432
6444
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6433
|
-
return /* @__PURE__ */ jsxs(Text, { style: [{ color: colors.text[tone] }, rule.met ?
|
|
6445
|
+
return /* @__PURE__ */ jsxs(Text, { style: [{ color: colors.text[tone] }, rule.met ? styles44.metPhrase : null], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6434
6446
|
index > 0 ? ", " : "",
|
|
6435
6447
|
rule.label
|
|
6436
6448
|
] }, rule.id);
|
|
@@ -6449,7 +6461,7 @@ function PasswordRules({ display, ...variant }) {
|
|
|
6449
6461
|
}
|
|
6450
6462
|
}
|
|
6451
6463
|
var ICON_SIZE = 20;
|
|
6452
|
-
var
|
|
6464
|
+
var styles45 = StyleSheet.create({
|
|
6453
6465
|
button: { width: MIN_TOUCH_TARGET_PX, height: MIN_TOUCH_TARGET_PX, alignItems: "center", justifyContent: "center" }
|
|
6454
6466
|
});
|
|
6455
6467
|
function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, color, testID }) {
|
|
@@ -6461,7 +6473,7 @@ function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, col
|
|
|
6461
6473
|
accessibilityLabel: label,
|
|
6462
6474
|
accessibilityRole: "button",
|
|
6463
6475
|
"aria-pressed": revealed,
|
|
6464
|
-
style:
|
|
6476
|
+
style: styles45.button,
|
|
6465
6477
|
testID,
|
|
6466
6478
|
onPress: onToggle,
|
|
6467
6479
|
onPressIn,
|
|
@@ -6515,7 +6527,7 @@ function useRuleColors(override) {
|
|
|
6515
6527
|
var RULES_GAP = 8;
|
|
6516
6528
|
var TOGGLE_INSET = 48;
|
|
6517
6529
|
var NO_RULES = [];
|
|
6518
|
-
var
|
|
6530
|
+
var styles46 = StyleSheet.create({
|
|
6519
6531
|
inputRow: { position: "relative", justifyContent: "center" },
|
|
6520
6532
|
input: { paddingRight: TOGGLE_INSET },
|
|
6521
6533
|
toggle: { position: "absolute", right: 0, top: 0, bottom: 0, justifyContent: "center" },
|
|
@@ -6557,7 +6569,7 @@ var PasswordField = React41.forwardRef(function PasswordField2({ label, value, o
|
|
|
6557
6569
|
const rulesId = `${testID}-rules`;
|
|
6558
6570
|
const hasRules = rules.length > 0;
|
|
6559
6571
|
return /* @__PURE__ */ jsx(Field, { error, label, testID: `${testID}-field`, children: (context) => /* @__PURE__ */ jsxs(View, { children: [
|
|
6560
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6572
|
+
/* @__PURE__ */ jsxs(View, { style: styles46.inputRow, children: [
|
|
6561
6573
|
/* @__PURE__ */ jsx(
|
|
6562
6574
|
ThemedTextInput,
|
|
6563
6575
|
{
|
|
@@ -6569,18 +6581,18 @@ var PasswordField = React41.forwardRef(function PasswordField2({ label, value, o
|
|
|
6569
6581
|
hasError: context.hasError || flagUnmet && rules.some((rule) => !rule.met),
|
|
6570
6582
|
id: context.controlId,
|
|
6571
6583
|
secureTextEntry: !toggle2.revealed,
|
|
6572
|
-
style: [
|
|
6584
|
+
style: [styles46.input, inputProps?.style],
|
|
6573
6585
|
testID,
|
|
6574
6586
|
value,
|
|
6575
6587
|
onChangeText,
|
|
6576
6588
|
onSelectionChange: toggle2.onSelectionChange
|
|
6577
6589
|
}
|
|
6578
6590
|
),
|
|
6579
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6591
|
+
/* @__PURE__ */ jsx(View, { style: styles46.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 }) })
|
|
6580
6592
|
] }),
|
|
6581
|
-
hasRules ? /* @__PURE__ */ jsxs(View, { nativeID: rulesId, style:
|
|
6593
|
+
hasRules ? /* @__PURE__ */ jsxs(View, { nativeID: rulesId, style: styles46.rules, children: [
|
|
6582
6594
|
/* @__PURE__ */ jsx(PasswordRules, { colors, display: rulesDisplay, flagUnmet, rules, testID: rulesId }),
|
|
6583
|
-
/* @__PURE__ */ jsx(Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style:
|
|
6595
|
+
/* @__PURE__ */ jsx(Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style: styles46.live, testID: `${testID}-announce`, children: announcement })
|
|
6584
6596
|
] }) : null
|
|
6585
6597
|
] }) });
|
|
6586
6598
|
});
|