@dloizides/ui-forms 1.61.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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +150 -137
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -137
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -632,6 +632,16 @@ var FormActions = ({
|
|
|
632
632
|
}
|
|
633
633
|
)
|
|
634
634
|
] });
|
|
635
|
+
var ICON_INSET = 12;
|
|
636
|
+
var ICON_ROOM = 36;
|
|
637
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
638
|
+
box: { justifyContent: "center" },
|
|
639
|
+
icon: { position: "absolute", left: ICON_INSET, zIndex: 1 }
|
|
640
|
+
});
|
|
641
|
+
var FieldIcon = ({ icon, children }) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.box, children: [
|
|
642
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, pointerEvents: "none", style: styles11.icon, testID: "form-field-icon", children: icon }),
|
|
643
|
+
children
|
|
644
|
+
] });
|
|
635
645
|
var FIELD_GAP = 4;
|
|
636
646
|
var LABEL_FONT = 11;
|
|
637
647
|
var LABEL_LETTER_SPACING = 0.4;
|
|
@@ -726,7 +736,7 @@ var DETAIL_FONT = 12;
|
|
|
726
736
|
var DETAIL_GAP = 12;
|
|
727
737
|
var STACK_GAP = 2;
|
|
728
738
|
var DETAIL_BESIDE_MIN_MENU_WIDTH = 400;
|
|
729
|
-
var
|
|
739
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
730
740
|
beside: { alignItems: "baseline", flexDirection: "row", gap: DETAIL_GAP, justifyContent: "space-between" },
|
|
731
741
|
stacked: { gap: STACK_GAP },
|
|
732
742
|
shrink: { flexShrink: 1 },
|
|
@@ -761,9 +771,9 @@ function OptionRow({ option, isActive, isHighlighted, isListboxRow, menuWidth, h
|
|
|
761
771
|
onPress: () => onSelect(option.value),
|
|
762
772
|
style: [controlStyles.option, isHighlighted ? { backgroundColor: colors.text } : null],
|
|
763
773
|
testID: `${testID}-option-${option.value}`,
|
|
764
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ?
|
|
765
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText,
|
|
766
|
-
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
774
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ? styles12.beside : styles12.stacked, children: [
|
|
775
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText, styles12.shrink, { color: ink.title, fontWeight: isBold ? ACTIVE_WEIGHT : IDLE_WEIGHT }], children: option.label }),
|
|
776
|
+
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.detail, { color: ink.detail }], children: option.detail }) : null
|
|
767
777
|
] })
|
|
768
778
|
}
|
|
769
779
|
);
|
|
@@ -1329,6 +1339,7 @@ function useAutoGrowRows(text, minRows) {
|
|
|
1329
1339
|
}, []);
|
|
1330
1340
|
return { numberOfLines: rowsForText(text, inputWidth, minRows), onLayout };
|
|
1331
1341
|
}
|
|
1342
|
+
var iconRoom = { paddingLeft: ICON_ROOM };
|
|
1332
1343
|
var PlainFormField = ({
|
|
1333
1344
|
label,
|
|
1334
1345
|
labelHidden = false,
|
|
@@ -1339,6 +1350,7 @@ var PlainFormField = ({
|
|
|
1339
1350
|
recentMax,
|
|
1340
1351
|
inputRef,
|
|
1341
1352
|
labelVariant,
|
|
1353
|
+
icon,
|
|
1342
1354
|
...textInputProps
|
|
1343
1355
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1344
1356
|
Field,
|
|
@@ -1359,7 +1371,7 @@ var PlainFormField = ({
|
|
|
1359
1371
|
testID: "form-field-input",
|
|
1360
1372
|
...textInputProps
|
|
1361
1373
|
};
|
|
1362
|
-
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsxRuntime.jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : /* @__PURE__ */ jsxRuntime.jsx(ThemedTextInput, { ref: inputRef, ...inputProps });
|
|
1374
|
+
return recentKey !== void 0 && recentKey !== "" ? /* @__PURE__ */ jsxRuntime.jsx(RecentInputField, { label, recentKey, recentMax, ...inputProps }) : icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ThemedTextInput, { ref: inputRef, ...inputProps }) : /* @__PURE__ */ jsxRuntime.jsx(FieldIcon, { icon, children: /* @__PURE__ */ jsxRuntime.jsx(ThemedTextInput, { ref: inputRef, style: iconRoom, ...inputProps }) });
|
|
1363
1375
|
}
|
|
1364
1376
|
}
|
|
1365
1377
|
);
|
|
@@ -1380,7 +1392,7 @@ var AutoGrowFormField = ({
|
|
|
1380
1392
|
};
|
|
1381
1393
|
var FormField = ({ autoGrowMinRows, ...fieldProps }) => autoGrowMinRows === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PlainFormField, { ...fieldProps }) : /* @__PURE__ */ jsxRuntime.jsx(AutoGrowFormField, { ...fieldProps, minRows: autoGrowMinRows });
|
|
1382
1394
|
var TEXT_INPUT_HEIGHT = 48;
|
|
1383
|
-
var
|
|
1395
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
1384
1396
|
track: { padding: 0, borderWidth: 0 },
|
|
1385
1397
|
besideTextInput: {
|
|
1386
1398
|
padding: 0,
|
|
@@ -1389,8 +1401,8 @@ var styles12 = reactNative.StyleSheet.create({
|
|
|
1389
1401
|
alignItems: "stretch"
|
|
1390
1402
|
}
|
|
1391
1403
|
});
|
|
1392
|
-
var SEGMENT_BESIDE_FIELD =
|
|
1393
|
-
var SEGMENT_BESIDE_TEXT_INPUT =
|
|
1404
|
+
var SEGMENT_BESIDE_FIELD = styles13.track;
|
|
1405
|
+
var SEGMENT_BESIDE_TEXT_INPUT = styles13.besideTextInput;
|
|
1394
1406
|
|
|
1395
1407
|
// src/ChipSelector/constants.ts
|
|
1396
1408
|
var TRANSPARENT_COLOR = "transparent";
|
|
@@ -1761,7 +1773,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1761
1773
|
ariaChecked: isRadio ? selected : void 0
|
|
1762
1774
|
};
|
|
1763
1775
|
}
|
|
1764
|
-
var
|
|
1776
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1765
1777
|
chipContainer: {
|
|
1766
1778
|
flexDirection: "row",
|
|
1767
1779
|
flexWrap: "wrap",
|
|
@@ -1855,7 +1867,7 @@ var ChipSelector = ({
|
|
|
1855
1867
|
reactNative.View,
|
|
1856
1868
|
{
|
|
1857
1869
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1858
|
-
style: [
|
|
1870
|
+
style: [styles14.chipContainer, chipRowGap(size)],
|
|
1859
1871
|
...webFieldA11y({ describedById, hasError }),
|
|
1860
1872
|
...radio.groupProps,
|
|
1861
1873
|
children: options.map(renderChip)
|
|
@@ -1865,7 +1877,7 @@ var ChipSelector = ({
|
|
|
1865
1877
|
);
|
|
1866
1878
|
};
|
|
1867
1879
|
var BOX_SLOT_PAD_H = 10;
|
|
1868
|
-
var
|
|
1880
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
1869
1881
|
row: {
|
|
1870
1882
|
minWidth: a11y.MIN_TOUCH_TARGET_PX,
|
|
1871
1883
|
minHeight: a11y.MIN_TOUCH_TARGET_PX,
|
|
@@ -1888,7 +1900,7 @@ var SwitchSlot = ({
|
|
|
1888
1900
|
accessibilityHint,
|
|
1889
1901
|
activeTrackColor,
|
|
1890
1902
|
inBox = false
|
|
1891
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: inBox ?
|
|
1903
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: inBox ? styles15.box : styles15.row, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1892
1904
|
reactNative.Switch,
|
|
1893
1905
|
{
|
|
1894
1906
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1905,7 +1917,7 @@ var BOX_RADIUS = 8;
|
|
|
1905
1917
|
var BOX_PAD_LEFT = 10;
|
|
1906
1918
|
var BOX_BORDER = 1;
|
|
1907
1919
|
var STATE_FONT_SIZE = 13;
|
|
1908
|
-
var
|
|
1920
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
1909
1921
|
box: {
|
|
1910
1922
|
flexDirection: "row",
|
|
1911
1923
|
alignItems: "center",
|
|
@@ -1940,19 +1952,19 @@ var FormSwitchBox = ({
|
|
|
1940
1952
|
{
|
|
1941
1953
|
accessible: false,
|
|
1942
1954
|
disabled,
|
|
1943
|
-
style: [
|
|
1955
|
+
style: [styles16.box, boxColors],
|
|
1944
1956
|
tabIndex: -1,
|
|
1945
1957
|
testID: slot.testID,
|
|
1946
1958
|
onPress: toggle2,
|
|
1947
1959
|
children: [
|
|
1948
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [
|
|
1960
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles16.state, { color: colors.text }], children: stateLabel ?? "" }),
|
|
1949
1961
|
/* @__PURE__ */ jsxRuntime.jsx(SwitchSlot, { ...slot, inBox: true })
|
|
1950
1962
|
]
|
|
1951
1963
|
}
|
|
1952
1964
|
) });
|
|
1953
1965
|
};
|
|
1954
1966
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1955
|
-
var
|
|
1967
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
1956
1968
|
container: {
|
|
1957
1969
|
flexDirection: "row",
|
|
1958
1970
|
justifyContent: "space-between",
|
|
@@ -2008,13 +2020,13 @@ var FormSwitchRow = ({
|
|
|
2008
2020
|
accessible: false,
|
|
2009
2021
|
disabled,
|
|
2010
2022
|
onPress: toggle2,
|
|
2011
|
-
style: [
|
|
2023
|
+
style: [styles17.container, containerStyle],
|
|
2012
2024
|
tabIndex: -1,
|
|
2013
2025
|
testID,
|
|
2014
2026
|
children: [
|
|
2015
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2016
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2017
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2027
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.textColumn, children: [
|
|
2028
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.label, themeStyles.label], children: label }),
|
|
2029
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.description, themeStyles.description], children: description }) : null
|
|
2018
2030
|
] }),
|
|
2019
2031
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2020
2032
|
SwitchSlot,
|
|
@@ -2065,7 +2077,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
2065
2077
|
var FOCUS_RING_WIDTH = 2;
|
|
2066
2078
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
2067
2079
|
var FOCUS_RING_INSET = -6;
|
|
2068
|
-
var
|
|
2080
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
2069
2081
|
container: {
|
|
2070
2082
|
flexDirection: "row",
|
|
2071
2083
|
alignItems: "flex-start",
|
|
@@ -2181,9 +2193,9 @@ var FormCheckbox = ({
|
|
|
2181
2193
|
onPress: toggle2,
|
|
2182
2194
|
role: "checkbox",
|
|
2183
2195
|
style: [
|
|
2184
|
-
|
|
2185
|
-
hasHint ? null :
|
|
2186
|
-
labelHidden ?
|
|
2196
|
+
styles18.container,
|
|
2197
|
+
hasHint ? null : styles18.centered,
|
|
2198
|
+
labelHidden ? styles18.boxOnly : null,
|
|
2187
2199
|
containerStyle,
|
|
2188
2200
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
2189
2201
|
reactNative.Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -2191,13 +2203,13 @@ var FormCheckbox = ({
|
|
|
2191
2203
|
testID,
|
|
2192
2204
|
...keyboardProps,
|
|
2193
2205
|
children: [
|
|
2194
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2195
|
-
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [
|
|
2196
|
-
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [
|
|
2206
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles18.box, lookBox, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
2207
|
+
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [styles18.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
2208
|
+
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [styles18.tick, themeStyles.tick], testID: `${testID}-tick` }) : null
|
|
2197
2209
|
] }),
|
|
2198
|
-
labelHidden ? null : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2199
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2200
|
-
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [
|
|
2210
|
+
labelHidden ? null : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.textColumn, children: [
|
|
2211
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.label, themeStyles.label], children: label }),
|
|
2212
|
+
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [styles18.hint, themeStyles.hint], children: hintText }) : null
|
|
2201
2213
|
] })
|
|
2202
2214
|
]
|
|
2203
2215
|
}
|
|
@@ -2544,7 +2556,7 @@ var CHIP_PAD_H = 8;
|
|
|
2544
2556
|
var CHIP_PAD_V = 4;
|
|
2545
2557
|
var CHIP_RADIUS = 999;
|
|
2546
2558
|
var CHIP_FONT = 13;
|
|
2547
|
-
var
|
|
2559
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
2548
2560
|
chip: {
|
|
2549
2561
|
flexDirection: "row",
|
|
2550
2562
|
alignItems: "center",
|
|
@@ -2565,12 +2577,12 @@ function SelectedChip({ option, colors, removeLabel, removeHint, onRemove, testI
|
|
|
2565
2577
|
accessibilityLabel: removeLabel,
|
|
2566
2578
|
accessibilityRole: "button",
|
|
2567
2579
|
hitSlop: CHIP_HIT_SLOP,
|
|
2568
|
-
style: [
|
|
2580
|
+
style: [styles19.chip, { borderColor: colors.border, backgroundColor: colors.surface }],
|
|
2569
2581
|
testID,
|
|
2570
2582
|
onPress: () => onRemove(option.value),
|
|
2571
2583
|
children: [
|
|
2572
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [
|
|
2573
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { "aria-hidden": true, style: [
|
|
2584
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles19.text, { color: colors.text }], children: option.label }),
|
|
2585
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { "aria-hidden": true, style: [styles19.text, { color: colors.text }], children: REMOVE_GLYPH })
|
|
2574
2586
|
]
|
|
2575
2587
|
}
|
|
2576
2588
|
);
|
|
@@ -2593,7 +2605,7 @@ var CHEVRON_DOWN2 = "\u25BE";
|
|
|
2593
2605
|
var CHEVRON_UP2 = "\u25B4";
|
|
2594
2606
|
var BOX_GAP = 6;
|
|
2595
2607
|
var TRIGGER_MIN_WIDTH = 96;
|
|
2596
|
-
var
|
|
2608
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
2597
2609
|
box: { flexWrap: "wrap", justifyContent: "flex-start", gap: BOX_GAP },
|
|
2598
2610
|
trigger: {
|
|
2599
2611
|
flexGrow: 1,
|
|
@@ -2627,7 +2639,7 @@ function MultiSelectBox(props) {
|
|
|
2627
2639
|
const chipColors = { text: colors.text, border: colors.border, surface: colors.surface };
|
|
2628
2640
|
const summary = chosen.map((option) => option.label).join(", ");
|
|
2629
2641
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: controlStyles.anchor, children: [
|
|
2630
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [controlStyles.selectTrigger,
|
|
2642
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [controlStyles.selectTrigger, styles20.box, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }], testID: `${testID}-box`, children: [
|
|
2631
2643
|
chosen.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2632
2644
|
SelectedChip,
|
|
2633
2645
|
{
|
|
@@ -2651,7 +2663,7 @@ function MultiSelectBox(props) {
|
|
|
2651
2663
|
"aria-haspopup": "menu",
|
|
2652
2664
|
"aria-labelledby": labelId,
|
|
2653
2665
|
disabled: remaining.length === 0,
|
|
2654
|
-
style:
|
|
2666
|
+
style: styles20.trigger,
|
|
2655
2667
|
testID: `${testID}-trigger`,
|
|
2656
2668
|
onPress: toggle2,
|
|
2657
2669
|
children: [
|
|
@@ -3091,20 +3103,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
3091
3103
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
3092
3104
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
3093
3105
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
3094
|
-
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [
|
|
3106
|
+
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.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
|
|
3095
3107
|
] });
|
|
3096
3108
|
}
|
|
3097
|
-
var
|
|
3109
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
3098
3110
|
dropdown: { position: "absolute" },
|
|
3099
3111
|
growFromField: { transformOrigin: "top left" }
|
|
3100
3112
|
});
|
|
3101
3113
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children, progress, scale, accessibilityLabel }) {
|
|
3102
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3114
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.backdrop, children: [
|
|
3103
3115
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
3104
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { testID: `${testID}-sheet`, style: [
|
|
3116
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { testID: `${testID}-sheet`, style: [styles22.sheet, { transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, progress === void 0 ? null : { opacity: progress }], children })
|
|
3105
3117
|
] }) });
|
|
3106
3118
|
}
|
|
3107
|
-
var
|
|
3119
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
3108
3120
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
3109
3121
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
3110
3122
|
});
|
|
@@ -3680,9 +3692,9 @@ var GLYPH_EM = 0.62;
|
|
|
3680
3692
|
var PAD_INLINE = 12;
|
|
3681
3693
|
var BORDER = 1;
|
|
3682
3694
|
var PLACEHOLDER_CHARS = 15;
|
|
3683
|
-
function closedFieldMinWidth(text,
|
|
3695
|
+
function closedFieldMinWidth(text, iconRoom2) {
|
|
3684
3696
|
const chars = Math.max(text.length, PLACEHOLDER_CHARS);
|
|
3685
|
-
return Math.ceil(chars * FONT_PX * GLYPH_EM) + PAD_INLINE +
|
|
3697
|
+
return Math.ceil(chars * FONT_PX * GLYPH_EM) + PAD_INLINE + iconRoom2 + BORDER + BORDER;
|
|
3686
3698
|
}
|
|
3687
3699
|
|
|
3688
3700
|
// src/DatePicker/utils/datePattern.ts
|
|
@@ -3738,7 +3750,7 @@ function typedEditBind(typed) {
|
|
|
3738
3750
|
};
|
|
3739
3751
|
}
|
|
3740
3752
|
var SINGLE_PICKER_WIDTH = 340;
|
|
3741
|
-
var
|
|
3753
|
+
var ICON_ROOM2 = 48;
|
|
3742
3754
|
var ICON_SLOT = { position: "absolute", right: 2, top: 0, bottom: 0, display: "flex", alignItems: "center" };
|
|
3743
3755
|
var anchorStyles = reactNative.StyleSheet.create({ wrap: { position: "relative", width: "100%" } });
|
|
3744
3756
|
function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
@@ -3773,7 +3785,7 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3773
3785
|
event.preventDefault();
|
|
3774
3786
|
if (typed.isReady()) onSubmit();
|
|
3775
3787
|
};
|
|
3776
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: [anchorStyles.wrap, { minWidth: closedFieldMinWidth(typed.display,
|
|
3788
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: [anchorStyles.wrap, { minWidth: closedFieldMinWidth(typed.display, ICON_ROOM2) }], testID: `${testID}-anchor`, children: [
|
|
3777
3789
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3778
3790
|
"input",
|
|
3779
3791
|
{
|
|
@@ -3786,7 +3798,7 @@ function DatePickerInput({ fieldProps, context, onTypedError }) {
|
|
|
3786
3798
|
disabled,
|
|
3787
3799
|
id: context.controlId,
|
|
3788
3800
|
placeholder: labels.datePlaceholder !== "" ? labels.datePlaceholder : datePattern(locale),
|
|
3789
|
-
style: { ...buildNativeInputStyle(style, look), paddingInlineEnd:
|
|
3801
|
+
style: { ...buildNativeInputStyle(style, look), paddingInlineEnd: ICON_ROOM2 },
|
|
3790
3802
|
title: accessibilityHint,
|
|
3791
3803
|
type: "text",
|
|
3792
3804
|
value: typed.display,
|
|
@@ -4078,7 +4090,7 @@ function WebDateRange({ value, onChange, onSubmit, fromLabel, toLabel, hint, tes
|
|
|
4078
4090
|
);
|
|
4079
4091
|
};
|
|
4080
4092
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: anchorStyles.wrap, children: [
|
|
4081
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { ...hoverBind, style: { ...buildNativeInputStyle(style), display: "flex", alignItems: "center", gap: GAP5, paddingInlineEnd:
|
|
4093
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { ...hoverBind, style: { ...buildNativeInputStyle(style), display: "flex", alignItems: "center", gap: GAP5, paddingInlineEnd: ICON_ROOM2 }, children: [
|
|
4082
4094
|
segment("from" /* From */, from),
|
|
4083
4095
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2192" }),
|
|
4084
4096
|
segment("to" /* To */, to)
|
|
@@ -4110,6 +4122,7 @@ function DateRangeControl({
|
|
|
4110
4122
|
fromLabel,
|
|
4111
4123
|
toLabel,
|
|
4112
4124
|
accessibilityHint,
|
|
4125
|
+
showLabel = true,
|
|
4113
4126
|
style,
|
|
4114
4127
|
testID
|
|
4115
4128
|
}) {
|
|
@@ -4119,7 +4132,7 @@ function DateRangeControl({
|
|
|
4119
4132
|
if (!IS_WEB9) {
|
|
4120
4133
|
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(NativeDateRange, { fromLabel, hint, style, testID, toLabel, value, onChange, onSubmit }) });
|
|
4121
4134
|
}
|
|
4122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID: `${testID}-range`, children: /* @__PURE__ */ jsxRuntime.jsx(Field, { error: typedError, label: `${fromLabel}${labels.rangeSeparator}${toLabel}
|
|
4135
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID: `${testID}-range`, children: /* @__PURE__ */ jsxRuntime.jsx(Field, { error: typedError, label: showLabel ? `${fromLabel}${labels.rangeSeparator}${toLabel}` : void 0, children: (context) => /* @__PURE__ */ jsxRuntime.jsx(WebDateRange, { context, fromLabel, hint, testID, toLabel, value, onChange, onSubmit, onTypedError: setTypedError }) }) }) });
|
|
4123
4136
|
}
|
|
4124
4137
|
function DateTimeField(props) {
|
|
4125
4138
|
return /* @__PURE__ */ jsxRuntime.jsx(TemporalField, { fieldProps: props, webInputType: "datetime-local" });
|
|
@@ -4155,7 +4168,7 @@ var ROW_GAP = 4;
|
|
|
4155
4168
|
var TAB_PADDING = 4;
|
|
4156
4169
|
var INDICATOR_WIDTH = 2;
|
|
4157
4170
|
var TAB_FONT_SIZE = 12;
|
|
4158
|
-
var
|
|
4171
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
4159
4172
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
4160
4173
|
tab: {
|
|
4161
4174
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -4195,13 +4208,13 @@ var StepperTab = ({
|
|
|
4195
4208
|
accessibilityRole: "tab",
|
|
4196
4209
|
accessibilityState: { selected },
|
|
4197
4210
|
"aria-selected": selected,
|
|
4198
|
-
style: [
|
|
4211
|
+
style: [styles23.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
4199
4212
|
testID,
|
|
4200
4213
|
onBlur: ring.onBlur,
|
|
4201
4214
|
onFocus: ring.onFocus,
|
|
4202
4215
|
onPress: () => onStep(step.key),
|
|
4203
4216
|
...webKeyProps,
|
|
4204
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4217
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.text, { color: theme.colors.text }, selected ? styles23.textSelected : void 0], children: step.label })
|
|
4205
4218
|
}
|
|
4206
4219
|
);
|
|
4207
4220
|
};
|
|
@@ -4211,7 +4224,7 @@ var StepperTabs = ({
|
|
|
4211
4224
|
onStep,
|
|
4212
4225
|
stepHint,
|
|
4213
4226
|
testID
|
|
4214
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style:
|
|
4227
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style: styles23.row, testID, children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4215
4228
|
StepperTab,
|
|
4216
4229
|
{
|
|
4217
4230
|
hint: stepHint,
|
|
@@ -4230,7 +4243,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
4230
4243
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
4231
4244
|
}
|
|
4232
4245
|
var ROW_GAP2 = 8;
|
|
4233
|
-
var
|
|
4246
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
4234
4247
|
cell: { flex: 1, minWidth: 0 },
|
|
4235
4248
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
4236
4249
|
});
|
|
@@ -4242,8 +4255,8 @@ var StepperNav = ({
|
|
|
4242
4255
|
testID
|
|
4243
4256
|
}) => {
|
|
4244
4257
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
4245
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4246
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
4258
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.row, testID, children: [
|
|
4259
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4247
4260
|
uiButtons.Button,
|
|
4248
4261
|
{
|
|
4249
4262
|
fullWidth: true,
|
|
@@ -4259,7 +4272,7 @@ var StepperNav = ({
|
|
|
4259
4272
|
}
|
|
4260
4273
|
}
|
|
4261
4274
|
) }),
|
|
4262
|
-
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
4275
|
+
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4263
4276
|
uiButtons.Button,
|
|
4264
4277
|
{
|
|
4265
4278
|
fullWidth: true,
|
|
@@ -4274,13 +4287,13 @@ var StepperNav = ({
|
|
|
4274
4287
|
] });
|
|
4275
4288
|
};
|
|
4276
4289
|
var STATUS_FONT = 16;
|
|
4277
|
-
var
|
|
4290
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
4278
4291
|
line: { fontSize: STATUS_FONT }
|
|
4279
4292
|
});
|
|
4280
4293
|
function FormStatusLine({ message, testID, style }) {
|
|
4281
4294
|
const { theme } = uiFeedback.useUi();
|
|
4282
4295
|
if (message === null || message === void 0 || message === "") return null;
|
|
4283
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
4296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles25.line, { color: theme.colors.text }, style], testID, children: message });
|
|
4284
4297
|
}
|
|
4285
4298
|
function useFocusFirstInvalid(refs) {
|
|
4286
4299
|
const latest = React41.useRef(refs);
|
|
@@ -4369,7 +4382,7 @@ function useKeepInView(trigger) {
|
|
|
4369
4382
|
}
|
|
4370
4383
|
var IS_WEB10 = reactNative.Platform.OS === "web";
|
|
4371
4384
|
var INPUT_FONT2 = 14;
|
|
4372
|
-
var
|
|
4385
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
4373
4386
|
nativeButton: { minHeight: a11y.MIN_TOUCH_TARGET_PX, minWidth: a11y.MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
4374
4387
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
4375
4388
|
});
|
|
@@ -4397,10 +4410,10 @@ function FileInput({
|
|
|
4397
4410
|
accessibilityRole: "button",
|
|
4398
4411
|
accessibilityState: { disabled },
|
|
4399
4412
|
disabled,
|
|
4400
|
-
style:
|
|
4413
|
+
style: styles26.nativeButton,
|
|
4401
4414
|
testID,
|
|
4402
4415
|
onPress: onNativePick,
|
|
4403
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4416
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles26.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
4404
4417
|
}
|
|
4405
4418
|
);
|
|
4406
4419
|
}
|
|
@@ -4430,7 +4443,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
4430
4443
|
var GAP6 = 8;
|
|
4431
4444
|
var TITLE_FONT_SIZE = 14;
|
|
4432
4445
|
var HELP_FONT_SIZE = 13;
|
|
4433
|
-
var
|
|
4446
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
4434
4447
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
4435
4448
|
root: { gap: GAP6 },
|
|
4436
4449
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -4452,11 +4465,11 @@ var UploadWithLinkField = ({
|
|
|
4452
4465
|
const url = value ?? "";
|
|
4453
4466
|
const [pasting, setPasting] = React41.useState(url !== "");
|
|
4454
4467
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
4455
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4456
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4457
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4468
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.root, children: [
|
|
4469
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.title, { color: theme.colors.text }], children: labels.title }),
|
|
4470
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.tile, children: [
|
|
4458
4471
|
url === "" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
|
|
4459
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4472
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.help, { color: theme.colors.text }], children: labels.help })
|
|
4460
4473
|
] }),
|
|
4461
4474
|
uploadControl,
|
|
4462
4475
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4467,12 +4480,12 @@ var UploadWithLinkField = ({
|
|
|
4467
4480
|
accessibilityRole: "button",
|
|
4468
4481
|
accessibilityState: { expanded: pasting },
|
|
4469
4482
|
"aria-expanded": pasting,
|
|
4470
|
-
style: [
|
|
4483
|
+
style: [styles27.toggle, ring.ringStyle],
|
|
4471
4484
|
testID: `${testID}-paste`,
|
|
4472
4485
|
onBlur: ring.onBlur,
|
|
4473
4486
|
onFocus: ring.onFocus,
|
|
4474
4487
|
onPress: () => setPasting(!pasting),
|
|
4475
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4488
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
4476
4489
|
}
|
|
4477
4490
|
),
|
|
4478
4491
|
pasting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4491,7 +4504,7 @@ var UploadWithLinkField = ({
|
|
|
4491
4504
|
};
|
|
4492
4505
|
var ACTION_GAP = 8;
|
|
4493
4506
|
var GROUP_GAP = 16;
|
|
4494
|
-
var
|
|
4507
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
4495
4508
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
4496
4509
|
group: { marginBottom: GROUP_GAP }
|
|
4497
4510
|
});
|
|
@@ -4514,7 +4527,7 @@ var AddOnRequest = ({
|
|
|
4514
4527
|
onRemove();
|
|
4515
4528
|
};
|
|
4516
4529
|
if (!isAddOnOpen(hasValue, requested))
|
|
4517
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
4530
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles28.action, style], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4518
4531
|
uiButtons.Button,
|
|
4519
4532
|
{
|
|
4520
4533
|
accessibilityHint: addHint,
|
|
@@ -4526,9 +4539,9 @@ var AddOnRequest = ({
|
|
|
4526
4539
|
onPress: () => setRequested(true)
|
|
4527
4540
|
}
|
|
4528
4541
|
) });
|
|
4529
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
4542
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles28.group, style], testID, children: [
|
|
4530
4543
|
children,
|
|
4531
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
4544
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles28.action, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4532
4545
|
uiButtons.Button,
|
|
4533
4546
|
{
|
|
4534
4547
|
accessibilityHint: removeHint,
|
|
@@ -4545,7 +4558,7 @@ var AddOnRequest = ({
|
|
|
4545
4558
|
var ROW_GAP3 = 8;
|
|
4546
4559
|
var TEXT_SIZE = 13;
|
|
4547
4560
|
var TEXT_LINE = 18;
|
|
4548
|
-
var
|
|
4561
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
4549
4562
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
4550
4563
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
4551
4564
|
});
|
|
@@ -4553,8 +4566,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
4553
4566
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
4554
4567
|
const { theme } = uiFeedback.useUi();
|
|
4555
4568
|
if (!isFixBarVisible(count)) return null;
|
|
4556
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
4557
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
4569
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles29.row, style], testID, children: [
|
|
4570
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles29.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
4558
4571
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4559
4572
|
uiButtons.Button,
|
|
4560
4573
|
{
|
|
@@ -4585,21 +4598,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
4585
4598
|
accessibilityLabel: option.label,
|
|
4586
4599
|
accessibilityRole: "button",
|
|
4587
4600
|
accessibilityState: { selected: active, checked: current },
|
|
4588
|
-
style: [
|
|
4601
|
+
style: [styles30.row, active ? { backgroundColor: colors.surface } : null],
|
|
4589
4602
|
testID: `${testID}-option-${option.value}`,
|
|
4590
4603
|
onPress: () => onPick(option),
|
|
4591
4604
|
children: [
|
|
4592
4605
|
renderLeading?.(option),
|
|
4593
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4594
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4595
|
-
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4606
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles30.label, children: [
|
|
4607
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles30.primary, { color: colors.text }], children: option.label }),
|
|
4608
|
+
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles30.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
4596
4609
|
] }),
|
|
4597
4610
|
renderDetail?.(option)
|
|
4598
4611
|
]
|
|
4599
4612
|
}
|
|
4600
4613
|
);
|
|
4601
4614
|
}
|
|
4602
|
-
var
|
|
4615
|
+
var styles30 = reactNative.StyleSheet.create({
|
|
4603
4616
|
row: { minHeight: a11y.MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
4604
4617
|
label: { flex: 1 },
|
|
4605
4618
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -4613,11 +4626,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
4613
4626
|
const { colors } = theme;
|
|
4614
4627
|
if (options.length === 0) return null;
|
|
4615
4628
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
4616
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
4629
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles31.header, { color: colors.textSecondary }], children: title }),
|
|
4617
4630
|
options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
4618
4631
|
] });
|
|
4619
4632
|
}
|
|
4620
|
-
var
|
|
4633
|
+
var styles31 = reactNative.StyleSheet.create({
|
|
4621
4634
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
4622
4635
|
});
|
|
4623
4636
|
var KEY_ESCAPE = "Escape";
|
|
@@ -4647,7 +4660,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4647
4660
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
4648
4661
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
4649
4662
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
4650
|
-
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
4663
|
+
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles32.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
4651
4664
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4652
4665
|
reactNative.TextInput,
|
|
4653
4666
|
{
|
|
@@ -4664,16 +4677,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4664
4677
|
onSubmitEditing: submit
|
|
4665
4678
|
}
|
|
4666
4679
|
),
|
|
4667
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4680
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles32.sheetList : styles32.dropList, children: [
|
|
4668
4681
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4669
4682
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4670
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4683
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles32.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4671
4684
|
] })
|
|
4672
4685
|
] });
|
|
4673
4686
|
if (!isSheet) return /* @__PURE__ */ jsxRuntime.jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4674
4687
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4675
4688
|
}
|
|
4676
|
-
var
|
|
4689
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
4677
4690
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4678
4691
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4679
4692
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4770,7 +4783,7 @@ function SearchSelect(props) {
|
|
|
4770
4783
|
const onTriggerBlur = React41.useCallback(() => {
|
|
4771
4784
|
if (!openRef.current) onBlur?.();
|
|
4772
4785
|
}, [onBlur]);
|
|
4773
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style:
|
|
4786
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: styles33.anchor, children: [
|
|
4774
4787
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4775
4788
|
reactNative.Pressable,
|
|
4776
4789
|
{
|
|
@@ -4779,7 +4792,7 @@ function SearchSelect(props) {
|
|
|
4779
4792
|
accessibilityLabel,
|
|
4780
4793
|
accessibilityRole: "button",
|
|
4781
4794
|
accessibilityState: { expanded: state.open },
|
|
4782
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4795
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles33.customTrigger,
|
|
4783
4796
|
testID,
|
|
4784
4797
|
onBlur: onTriggerBlur,
|
|
4785
4798
|
onPress,
|
|
@@ -4791,7 +4804,7 @@ function SearchSelect(props) {
|
|
|
4791
4804
|
}
|
|
4792
4805
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4793
4806
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4794
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4807
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.value, children: [
|
|
4795
4808
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4796
4809
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4797
4810
|
selected !== null ? /* @__PURE__ */ jsxRuntime.jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4804,7 +4817,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4804
4817
|
if (option.detail === void 0) return null;
|
|
4805
4818
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4806
4819
|
}
|
|
4807
|
-
var
|
|
4820
|
+
var styles33 = reactNative.StyleSheet.create({
|
|
4808
4821
|
anchor: { position: "relative" },
|
|
4809
4822
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4810
4823
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -5581,7 +5594,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5581
5594
|
const { theme } = uiFeedback.useUi();
|
|
5582
5595
|
const { textSecondary } = theme.colors;
|
|
5583
5596
|
const options = React41.useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
5584
|
-
const renderCode = React41.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5597
|
+
const renderCode = React41.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles34.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
5585
5598
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5586
5599
|
SearchSelect,
|
|
5587
5600
|
{
|
|
@@ -5599,7 +5612,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
5599
5612
|
}
|
|
5600
5613
|
);
|
|
5601
5614
|
}
|
|
5602
|
-
var
|
|
5615
|
+
var styles34 = reactNative.StyleSheet.create({
|
|
5603
5616
|
code: { fontSize: CODE_FONT }
|
|
5604
5617
|
});
|
|
5605
5618
|
function useBlurVerdict(validate) {
|
|
@@ -5855,9 +5868,9 @@ var LINE_GAP = 4;
|
|
|
5855
5868
|
function RejectionLine({ message, testID }) {
|
|
5856
5869
|
const { theme } = uiFeedback.useUi();
|
|
5857
5870
|
if (message === null) return null;
|
|
5858
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [
|
|
5871
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [styles35.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5859
5872
|
}
|
|
5860
|
-
var
|
|
5873
|
+
var styles35 = reactNative.StyleSheet.create({
|
|
5861
5874
|
line: { marginTop: LINE_GAP }
|
|
5862
5875
|
});
|
|
5863
5876
|
|
|
@@ -6004,7 +6017,7 @@ var PAD_V = 10;
|
|
|
6004
6017
|
var PAD_H = 16;
|
|
6005
6018
|
var TEXT_SIZE2 = 13;
|
|
6006
6019
|
var TEXT_LINE2 = 18;
|
|
6007
|
-
var
|
|
6020
|
+
var styles36 = reactNative.StyleSheet.create({
|
|
6008
6021
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
6009
6022
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
6010
6023
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -6016,9 +6029,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
6016
6029
|
const { colors } = theme;
|
|
6017
6030
|
const pinned = actionBarPosition(sticky, reactNative.Platform.OS) === "sticky" ? PINNED : null;
|
|
6018
6031
|
const hasMessage = message !== void 0 && message !== "";
|
|
6019
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
6020
|
-
hasMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "status", style: [
|
|
6021
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6032
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles36.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
6033
|
+
hasMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "status", style: [styles36.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
6034
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles36.actions, children })
|
|
6022
6035
|
] });
|
|
6023
6036
|
};
|
|
6024
6037
|
|
|
@@ -6026,14 +6039,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
6026
6039
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
6027
6040
|
var TITLE_SIZE = 13;
|
|
6028
6041
|
var TITLE_GAP = 6;
|
|
6029
|
-
var
|
|
6042
|
+
var styles37 = reactNative.StyleSheet.create({
|
|
6030
6043
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
6031
6044
|
});
|
|
6032
6045
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
6033
6046
|
const { theme } = uiFeedback.useUi();
|
|
6034
6047
|
const complete = isChecklistComplete(items, checked);
|
|
6035
6048
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { testID, children: [
|
|
6036
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
6049
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles37.title, { color: theme.colors.text }], children: title }),
|
|
6037
6050
|
items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6038
6051
|
FormCheckbox,
|
|
6039
6052
|
{
|
|
@@ -6059,7 +6072,7 @@ var RADIUS2 = 8;
|
|
|
6059
6072
|
var LABEL_SIZE = 14;
|
|
6060
6073
|
var DESCRIPTION_SIZE = 12;
|
|
6061
6074
|
var DESCRIPTION_LINE = 16;
|
|
6062
|
-
var
|
|
6075
|
+
var styles38 = reactNative.StyleSheet.create({
|
|
6063
6076
|
row: {
|
|
6064
6077
|
alignItems: "center",
|
|
6065
6078
|
borderRadius: RADIUS2,
|
|
@@ -6090,15 +6103,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
6090
6103
|
accessibilityState: identity.accessibilityState,
|
|
6091
6104
|
"aria-checked": checked,
|
|
6092
6105
|
disabled,
|
|
6093
|
-
style: [
|
|
6106
|
+
style: [styles38.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
6094
6107
|
tabIndex,
|
|
6095
6108
|
testID: identity.testID,
|
|
6096
6109
|
onPress,
|
|
6097
6110
|
children: [
|
|
6098
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
6099
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6100
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
6101
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
6111
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles38.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles38.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
6112
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles38.text, children: [
|
|
6113
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles38.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
6114
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles38.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
6102
6115
|
] })
|
|
6103
6116
|
]
|
|
6104
6117
|
}
|
|
@@ -6115,7 +6128,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
6115
6128
|
};
|
|
6116
6129
|
};
|
|
6117
6130
|
var ROW_GAP7 = 8;
|
|
6118
|
-
var
|
|
6131
|
+
var styles39 = reactNative.StyleSheet.create({
|
|
6119
6132
|
list: { rowGap: ROW_GAP7 }
|
|
6120
6133
|
});
|
|
6121
6134
|
function RadioList(props) {
|
|
@@ -6128,7 +6141,7 @@ function RadioList(props) {
|
|
|
6128
6141
|
reactNative.View,
|
|
6129
6142
|
{
|
|
6130
6143
|
accessibilityRole: "radiogroup",
|
|
6131
|
-
style:
|
|
6144
|
+
style: styles39.list,
|
|
6132
6145
|
...webFieldA11y({ describedById, hasError }),
|
|
6133
6146
|
...radio.groupProps,
|
|
6134
6147
|
children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6182,11 +6195,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
6182
6195
|
);
|
|
6183
6196
|
}
|
|
6184
6197
|
var BUTTON_BASIS = "40%";
|
|
6185
|
-
var
|
|
6198
|
+
var styles40 = reactNative.StyleSheet.create({
|
|
6186
6199
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
6187
6200
|
});
|
|
6188
6201
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
6189
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6202
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles40.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6190
6203
|
uiButtons.Button,
|
|
6191
6204
|
{
|
|
6192
6205
|
fullWidth: true,
|
|
@@ -6267,12 +6280,12 @@ function StickyBarDecision(props) {
|
|
|
6267
6280
|
}
|
|
6268
6281
|
var TEXT_SIZE3 = 13;
|
|
6269
6282
|
var TEXT_LINE3 = 18;
|
|
6270
|
-
var
|
|
6283
|
+
var styles41 = reactNative.StyleSheet.create({
|
|
6271
6284
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
6272
6285
|
});
|
|
6273
6286
|
var SubmitError = ({ message, testID }) => {
|
|
6274
6287
|
const { theme } = uiFeedback.useUi();
|
|
6275
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
6288
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles41.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
6276
6289
|
};
|
|
6277
6290
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
6278
6291
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
@@ -6315,7 +6328,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
6315
6328
|
}
|
|
6316
6329
|
var TITLE_SIZE2 = 15;
|
|
6317
6330
|
var PANEL_GAP = 12;
|
|
6318
|
-
var
|
|
6331
|
+
var styles42 = reactNative.StyleSheet.create({
|
|
6319
6332
|
panel: { rowGap: PANEL_GAP },
|
|
6320
6333
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
6321
6334
|
});
|
|
@@ -6329,8 +6342,8 @@ function DecisionPanel(props) {
|
|
|
6329
6342
|
const { theme } = uiFeedback.useUi();
|
|
6330
6343
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
6331
6344
|
const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
|
|
6332
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
6333
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
6345
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles42.panel, style], testID, children: [
|
|
6346
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles42.title, { color: theme.colors.text }], children: labels.title }),
|
|
6334
6347
|
checklist !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(GatedChecklist, { checked: state.checked, items: checklist.items, testID: `${testID}-checklist`, title: checklist.title, onToggle: state.toggleCheck, children: (complete) => body(!complete) }) : body(false),
|
|
6335
6348
|
state.error === "submit" ? /* @__PURE__ */ jsxRuntime.jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
6336
6349
|
] });
|
|
@@ -6363,7 +6376,7 @@ var POP_FROM = 0.6;
|
|
|
6363
6376
|
var POP_PEAK = 1.12;
|
|
6364
6377
|
var POP_UP_MS = 160;
|
|
6365
6378
|
var POP_SETTLE_MS = 100;
|
|
6366
|
-
var
|
|
6379
|
+
var styles43 = reactNative.StyleSheet.create({
|
|
6367
6380
|
mark: { width: MARK_SIZE, height: MARK_SIZE, borderRadius: MARK_SIZE / 2, alignItems: "center", justifyContent: "center" },
|
|
6368
6381
|
ring: { borderWidth: RING_WIDTH }
|
|
6369
6382
|
});
|
|
@@ -6383,8 +6396,8 @@ function RuleMark({ tone, colors }) {
|
|
|
6383
6396
|
]).start();
|
|
6384
6397
|
}, [met, reduced, scale]);
|
|
6385
6398
|
const color = colors.mark[tone];
|
|
6386
|
-
const shape = met ? { backgroundColor: color } : [
|
|
6387
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
6399
|
+
const shape = met ? { backgroundColor: color } : [styles43.ring, { borderColor: color }];
|
|
6400
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: { transform: [{ scale }] }, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles43.mark, shape], children: met ? /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: colors.onMark, name: "check", size: CHECK_SIZE2 }) : null }) });
|
|
6388
6401
|
}
|
|
6389
6402
|
var GAP8 = 6;
|
|
6390
6403
|
var ROW_GAP8 = 8;
|
|
@@ -6396,7 +6409,7 @@ var CHIP_PAD_V2 = 4;
|
|
|
6396
6409
|
var CHIP_PAD_H2 = 10;
|
|
6397
6410
|
var CHIP_BORDER2 = 1;
|
|
6398
6411
|
var HALF4 = "50%";
|
|
6399
|
-
var
|
|
6412
|
+
var styles44 = reactNative.StyleSheet.create({
|
|
6400
6413
|
column: { gap: GAP8 },
|
|
6401
6414
|
row: { flexDirection: "row", alignItems: "center", gap: ROW_GAP8 },
|
|
6402
6415
|
text: { fontSize: FONT5, lineHeight: LINE, flexShrink: 1 },
|
|
@@ -6412,31 +6425,31 @@ function RuleList({ rules, flagUnmet, colors, testID, listStyle, itemStyle, outl
|
|
|
6412
6425
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { role: "list", style: listStyle, testID, children: rules.map((rule) => {
|
|
6413
6426
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6414
6427
|
const outline = outlined ? { borderColor: colors.mark[tone] } : null;
|
|
6415
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "listitem", style: [
|
|
6428
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "listitem", style: [styles44.row, itemStyle, outline], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6416
6429
|
/* @__PURE__ */ jsxRuntime.jsx(RuleMark, { colors, tone }),
|
|
6417
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
6430
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles44.text, { color: colors.text[tone] }], children: rule.label })
|
|
6418
6431
|
] }, rule.id);
|
|
6419
6432
|
}) });
|
|
6420
6433
|
}
|
|
6421
6434
|
function RulesChecklist(props) {
|
|
6422
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, listStyle:
|
|
6435
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, listStyle: styles44.column });
|
|
6423
6436
|
}
|
|
6424
6437
|
function RulesChips(props) {
|
|
6425
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, outlined: true, itemStyle:
|
|
6438
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, outlined: true, itemStyle: styles44.chip, listStyle: styles44.chips });
|
|
6426
6439
|
}
|
|
6427
6440
|
function RulesMeterGrid(props) {
|
|
6428
6441
|
const { rules, flagUnmet, colors, testID } = props;
|
|
6429
6442
|
const metCount = rules.filter((rule) => rule.met).length;
|
|
6430
6443
|
const unfilled = flagUnmet ? colors.mark.refused : colors.track;
|
|
6431
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6432
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6433
|
-
/* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, itemStyle:
|
|
6444
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles44.column, children: [
|
|
6445
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles44.meter, testID: `${testID}-meter`, children: rules.map((rule, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles44.segment, { backgroundColor: index < metCount ? colors.mark.met : unfilled }] }, rule.id)) }),
|
|
6446
|
+
/* @__PURE__ */ jsxRuntime.jsx(RuleList, { ...props, itemStyle: styles44.cell, listStyle: styles44.grid })
|
|
6434
6447
|
] });
|
|
6435
6448
|
}
|
|
6436
6449
|
function RulesSentence({ rules, flagUnmet, colors, testID }) {
|
|
6437
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
6450
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles44.text, { color: colors.text.unmet }], testID, children: rules.map((rule, index) => {
|
|
6438
6451
|
const tone = ruleTone(rule.met, flagUnmet);
|
|
6439
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [{ color: colors.text[tone] }, rule.met ?
|
|
6452
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [{ color: colors.text[tone] }, rule.met ? styles44.metPhrase : null], testID: `${testID}-${rule.id}`, ...{ dataSet: { tone } }, children: [
|
|
6440
6453
|
index > 0 ? ", " : "",
|
|
6441
6454
|
rule.label
|
|
6442
6455
|
] }, rule.id);
|
|
@@ -6455,7 +6468,7 @@ function PasswordRules({ display, ...variant }) {
|
|
|
6455
6468
|
}
|
|
6456
6469
|
}
|
|
6457
6470
|
var ICON_SIZE = 20;
|
|
6458
|
-
var
|
|
6471
|
+
var styles45 = reactNative.StyleSheet.create({
|
|
6459
6472
|
button: { width: a11y.MIN_TOUCH_TARGET_PX, height: a11y.MIN_TOUCH_TARGET_PX, alignItems: "center", justifyContent: "center" }
|
|
6460
6473
|
});
|
|
6461
6474
|
function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, color, testID }) {
|
|
@@ -6467,7 +6480,7 @@ function RevealToggle({ revealed, onToggle, onPressIn, showLabel, hideLabel, col
|
|
|
6467
6480
|
accessibilityLabel: label,
|
|
6468
6481
|
accessibilityRole: "button",
|
|
6469
6482
|
"aria-pressed": revealed,
|
|
6470
|
-
style:
|
|
6483
|
+
style: styles45.button,
|
|
6471
6484
|
testID,
|
|
6472
6485
|
onPress: onToggle,
|
|
6473
6486
|
onPressIn,
|
|
@@ -6521,7 +6534,7 @@ function useRuleColors(override) {
|
|
|
6521
6534
|
var RULES_GAP = 8;
|
|
6522
6535
|
var TOGGLE_INSET = 48;
|
|
6523
6536
|
var NO_RULES = [];
|
|
6524
|
-
var
|
|
6537
|
+
var styles46 = reactNative.StyleSheet.create({
|
|
6525
6538
|
inputRow: { position: "relative", justifyContent: "center" },
|
|
6526
6539
|
input: { paddingRight: TOGGLE_INSET },
|
|
6527
6540
|
toggle: { position: "absolute", right: 0, top: 0, bottom: 0, justifyContent: "center" },
|
|
@@ -6563,7 +6576,7 @@ var PasswordField = React41__default.default.forwardRef(function PasswordField2(
|
|
|
6563
6576
|
const rulesId = `${testID}-rules`;
|
|
6564
6577
|
const hasRules = rules.length > 0;
|
|
6565
6578
|
return /* @__PURE__ */ jsxRuntime.jsx(Field, { error, label, testID: `${testID}-field`, children: (context) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
6566
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6579
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles46.inputRow, children: [
|
|
6567
6580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6568
6581
|
ThemedTextInput,
|
|
6569
6582
|
{
|
|
@@ -6575,18 +6588,18 @@ var PasswordField = React41__default.default.forwardRef(function PasswordField2(
|
|
|
6575
6588
|
hasError: context.hasError || flagUnmet && rules.some((rule) => !rule.met),
|
|
6576
6589
|
id: context.controlId,
|
|
6577
6590
|
secureTextEntry: !toggle2.revealed,
|
|
6578
|
-
style: [
|
|
6591
|
+
style: [styles46.input, inputProps?.style],
|
|
6579
6592
|
testID,
|
|
6580
6593
|
value,
|
|
6581
6594
|
onChangeText,
|
|
6582
6595
|
onSelectionChange: toggle2.onSelectionChange
|
|
6583
6596
|
}
|
|
6584
6597
|
),
|
|
6585
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6598
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles46.toggle, children: /* @__PURE__ */ jsxRuntime.jsx(RevealToggle, { color: colors.text.unmet, hideLabel: labels.hide, revealed: toggle2.revealed, showLabel: labels.show, testID: `${testID}-reveal`, onPressIn: toggle2.onPressIn, onToggle: toggle2.onToggle }) })
|
|
6586
6599
|
] }),
|
|
6587
|
-
hasRules ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { nativeID: rulesId, style:
|
|
6600
|
+
hasRules ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { nativeID: rulesId, style: styles46.rules, children: [
|
|
6588
6601
|
/* @__PURE__ */ jsxRuntime.jsx(PasswordRules, { colors, display: rulesDisplay, flagUnmet, rules, testID: rulesId }),
|
|
6589
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style:
|
|
6602
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { "aria-live": "polite", accessibilityLiveRegion: "polite", style: styles46.live, testID: `${testID}-announce`, children: announcement })
|
|
6590
6603
|
] }) : null
|
|
6591
6604
|
] }) });
|
|
6592
6605
|
});
|