@dloizides/ui-forms 1.43.0 → 1.44.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 +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +143 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -92
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1299,7 +1299,27 @@ function RecentInputField({
|
|
|
1299
1299
|
) : null
|
|
1300
1300
|
] });
|
|
1301
1301
|
}
|
|
1302
|
-
|
|
1302
|
+
|
|
1303
|
+
// src/FormField/textRows.ts
|
|
1304
|
+
var INPUT_SIDE_INSET = 26;
|
|
1305
|
+
var AVERAGE_CHAR_WIDTH = 8.4;
|
|
1306
|
+
var SPARE_ROWS = 1;
|
|
1307
|
+
var NARROWEST_INPUT_WIDTH = 296;
|
|
1308
|
+
function rowsForText(text, inputWidth, minRows) {
|
|
1309
|
+
const charsPerLine = Math.max(1, Math.floor((inputWidth - INPUT_SIDE_INSET) / AVERAGE_CHAR_WIDTH));
|
|
1310
|
+
const wrappedLines = text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(line.length / charsPerLine)), 0);
|
|
1311
|
+
return Math.max(minRows, wrappedLines + SPARE_ROWS);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
// src/FormField/useAutoGrowRows.ts
|
|
1315
|
+
function useAutoGrowRows(text, minRows) {
|
|
1316
|
+
const [inputWidth, setInputWidth] = React37.useState(NARROWEST_INPUT_WIDTH);
|
|
1317
|
+
const onLayout = React37.useCallback((event) => {
|
|
1318
|
+
setInputWidth(event.nativeEvent.layout.width);
|
|
1319
|
+
}, []);
|
|
1320
|
+
return { numberOfLines: rowsForText(text, inputWidth, minRows), onLayout };
|
|
1321
|
+
}
|
|
1322
|
+
var PlainFormField = ({
|
|
1303
1323
|
label,
|
|
1304
1324
|
labelHidden = false,
|
|
1305
1325
|
required = false,
|
|
@@ -1331,6 +1351,34 @@ var FormField = ({
|
|
|
1331
1351
|
}
|
|
1332
1352
|
}
|
|
1333
1353
|
);
|
|
1354
|
+
var AutoGrowFormField = ({
|
|
1355
|
+
minRows,
|
|
1356
|
+
...fieldProps
|
|
1357
|
+
}) => {
|
|
1358
|
+
const grow = useAutoGrowRows(fieldProps.value ?? "", minRows);
|
|
1359
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1360
|
+
PlainFormField,
|
|
1361
|
+
{
|
|
1362
|
+
...fieldProps,
|
|
1363
|
+
multiline: true,
|
|
1364
|
+
numberOfLines: grow.numberOfLines,
|
|
1365
|
+
onLayout: grow.onLayout
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
};
|
|
1369
|
+
var FormField = ({ autoGrowMinRows, ...fieldProps }) => autoGrowMinRows === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PlainFormField, { ...fieldProps }) : /* @__PURE__ */ jsxRuntime.jsx(AutoGrowFormField, { ...fieldProps, minRows: autoGrowMinRows });
|
|
1370
|
+
var TEXT_INPUT_HEIGHT = 48;
|
|
1371
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
1372
|
+
track: { padding: 0, borderWidth: 0 },
|
|
1373
|
+
besideTextInput: {
|
|
1374
|
+
padding: 0,
|
|
1375
|
+
borderWidth: 0,
|
|
1376
|
+
minHeight: TEXT_INPUT_HEIGHT,
|
|
1377
|
+
alignItems: "stretch"
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
var SEGMENT_BESIDE_FIELD = styles12.track;
|
|
1381
|
+
var SEGMENT_BESIDE_TEXT_INPUT = styles12.besideTextInput;
|
|
1334
1382
|
|
|
1335
1383
|
// src/ChipSelector/constants.ts
|
|
1336
1384
|
var TRANSPARENT_COLOR = "transparent";
|
|
@@ -1575,7 +1623,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1575
1623
|
ariaChecked: isRadio ? selected : void 0
|
|
1576
1624
|
};
|
|
1577
1625
|
}
|
|
1578
|
-
var
|
|
1626
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
1579
1627
|
chipContainer: {
|
|
1580
1628
|
flexDirection: "row",
|
|
1581
1629
|
flexWrap: "wrap",
|
|
@@ -1661,7 +1709,7 @@ var ChipSelector = ({
|
|
|
1661
1709
|
reactNative.View,
|
|
1662
1710
|
{
|
|
1663
1711
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1664
|
-
style:
|
|
1712
|
+
style: styles13.chipContainer,
|
|
1665
1713
|
...webFieldA11y({ describedById, hasError }),
|
|
1666
1714
|
...radio.groupProps,
|
|
1667
1715
|
children: options.map(renderChip)
|
|
@@ -1671,7 +1719,7 @@ var ChipSelector = ({
|
|
|
1671
1719
|
);
|
|
1672
1720
|
};
|
|
1673
1721
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1674
|
-
var
|
|
1722
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1675
1723
|
container: {
|
|
1676
1724
|
flexDirection: "row",
|
|
1677
1725
|
justifyContent: "space-between",
|
|
@@ -1732,15 +1780,15 @@ var FormSwitch = ({
|
|
|
1732
1780
|
accessible: false,
|
|
1733
1781
|
disabled,
|
|
1734
1782
|
onPress: toggle2,
|
|
1735
|
-
style: [
|
|
1783
|
+
style: [styles14.container, containerStyle],
|
|
1736
1784
|
tabIndex: -1,
|
|
1737
1785
|
testID,
|
|
1738
1786
|
children: [
|
|
1739
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1740
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1741
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1787
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.textColumn, children: [
|
|
1788
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.label, themeStyles.label], children: label }),
|
|
1789
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.description, themeStyles.description], children: description }) : null
|
|
1742
1790
|
] }),
|
|
1743
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style:
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles14.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
1792
|
reactNative.Switch,
|
|
1745
1793
|
{
|
|
1746
1794
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1769,7 +1817,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1769
1817
|
var FOCUS_RING_WIDTH = 2;
|
|
1770
1818
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1771
1819
|
var FOCUS_RING_INSET = -6;
|
|
1772
|
-
var
|
|
1820
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
1773
1821
|
container: {
|
|
1774
1822
|
flexDirection: "row",
|
|
1775
1823
|
alignItems: "flex-start",
|
|
@@ -1874,8 +1922,8 @@ var FormCheckbox = ({
|
|
|
1874
1922
|
onPress: toggle2,
|
|
1875
1923
|
role: "checkbox",
|
|
1876
1924
|
style: [
|
|
1877
|
-
|
|
1878
|
-
hasHint ? null :
|
|
1925
|
+
styles15.container,
|
|
1926
|
+
hasHint ? null : styles15.centered,
|
|
1879
1927
|
containerStyle,
|
|
1880
1928
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1881
1929
|
reactNative.Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1883,13 +1931,13 @@ var FormCheckbox = ({
|
|
|
1883
1931
|
testID,
|
|
1884
1932
|
...keyboardProps,
|
|
1885
1933
|
children: [
|
|
1886
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1887
|
-
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [
|
|
1888
|
-
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1934
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1935
|
+
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [styles15.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1936
|
+
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.check, { color: colors.surface }], accessibilityElementsHidden: true, children: "\u2713" }) : null
|
|
1889
1937
|
] }),
|
|
1890
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1891
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1892
|
-
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [
|
|
1938
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.textColumn, children: [
|
|
1939
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.label, themeStyles.label], children: label }),
|
|
1940
|
+
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [styles15.hint, themeStyles.hint], children: hintText }) : null
|
|
1893
1941
|
] })
|
|
1894
1942
|
]
|
|
1895
1943
|
}
|
|
@@ -1938,7 +1986,7 @@ function NativeSelect({
|
|
|
1938
1986
|
{
|
|
1939
1987
|
"aria-label": accessibilityLabel,
|
|
1940
1988
|
"aria-labelledby": labelledById,
|
|
1941
|
-
"data-testid":
|
|
1989
|
+
"data-testid": testID,
|
|
1942
1990
|
style: nativeSelectStyle(colors.border, colors.surfaceElevated, textColor),
|
|
1943
1991
|
title: accessibilityHint,
|
|
1944
1992
|
value,
|
|
@@ -2510,20 +2558,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
2510
2558
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
2511
2559
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
2512
2560
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2513
|
-
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [
|
|
2561
|
+
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles16.dropdown, place, { opacity: progress, transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, scale === void 0 ? null : styles16.growFromField], testID: `${testID}-dropdown-${frame.placement}`, onLayout, children }) : null
|
|
2514
2562
|
] });
|
|
2515
2563
|
}
|
|
2516
|
-
var
|
|
2564
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
2517
2565
|
dropdown: { position: "absolute" },
|
|
2518
2566
|
growFromField: { transformOrigin: "top left" }
|
|
2519
2567
|
});
|
|
2520
2568
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children, progress, scale, accessibilityLabel }) {
|
|
2521
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2569
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.backdrop, children: [
|
|
2522
2570
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2523
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { testID: `${testID}-sheet`, style: [
|
|
2571
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { testID: `${testID}-sheet`, style: [styles17.sheet, { transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, progress === void 0 ? null : { opacity: progress }], children })
|
|
2524
2572
|
] }) });
|
|
2525
2573
|
}
|
|
2526
|
-
var
|
|
2574
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
2527
2575
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
2528
2576
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
2529
2577
|
});
|
|
@@ -3553,7 +3601,7 @@ var ROW_GAP = 4;
|
|
|
3553
3601
|
var TAB_PADDING = 4;
|
|
3554
3602
|
var INDICATOR_WIDTH = 2;
|
|
3555
3603
|
var TAB_FONT_SIZE = 12;
|
|
3556
|
-
var
|
|
3604
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
3557
3605
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
3558
3606
|
tab: {
|
|
3559
3607
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -3593,13 +3641,13 @@ var StepperTab = ({
|
|
|
3593
3641
|
accessibilityRole: "tab",
|
|
3594
3642
|
accessibilityState: { selected },
|
|
3595
3643
|
"aria-selected": selected,
|
|
3596
|
-
style: [
|
|
3644
|
+
style: [styles18.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
3597
3645
|
testID,
|
|
3598
3646
|
onBlur: ring.onBlur,
|
|
3599
3647
|
onFocus: ring.onFocus,
|
|
3600
3648
|
onPress: () => onStep(step.key),
|
|
3601
3649
|
...webKeyProps,
|
|
3602
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3650
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.text, { color: theme.colors.text }, selected ? styles18.textSelected : void 0], children: step.label })
|
|
3603
3651
|
}
|
|
3604
3652
|
);
|
|
3605
3653
|
};
|
|
@@ -3609,7 +3657,7 @@ var StepperTabs = ({
|
|
|
3609
3657
|
onStep,
|
|
3610
3658
|
stepHint,
|
|
3611
3659
|
testID
|
|
3612
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style:
|
|
3660
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style: styles18.row, testID, children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3613
3661
|
StepperTab,
|
|
3614
3662
|
{
|
|
3615
3663
|
hint: stepHint,
|
|
@@ -3628,7 +3676,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
3628
3676
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
3629
3677
|
}
|
|
3630
3678
|
var ROW_GAP2 = 8;
|
|
3631
|
-
var
|
|
3679
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
3632
3680
|
cell: { flex: 1, minWidth: 0 },
|
|
3633
3681
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
3634
3682
|
});
|
|
@@ -3640,8 +3688,8 @@ var StepperNav = ({
|
|
|
3640
3688
|
testID
|
|
3641
3689
|
}) => {
|
|
3642
3690
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
3643
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3644
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3691
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.row, testID, children: [
|
|
3692
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3645
3693
|
uiButtons.Button,
|
|
3646
3694
|
{
|
|
3647
3695
|
fullWidth: true,
|
|
@@ -3657,7 +3705,7 @@ var StepperNav = ({
|
|
|
3657
3705
|
}
|
|
3658
3706
|
}
|
|
3659
3707
|
) }),
|
|
3660
|
-
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3708
|
+
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3661
3709
|
uiButtons.Button,
|
|
3662
3710
|
{
|
|
3663
3711
|
fullWidth: true,
|
|
@@ -3672,13 +3720,13 @@ var StepperNav = ({
|
|
|
3672
3720
|
] });
|
|
3673
3721
|
};
|
|
3674
3722
|
var STATUS_FONT = 16;
|
|
3675
|
-
var
|
|
3723
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
3676
3724
|
line: { fontSize: STATUS_FONT }
|
|
3677
3725
|
});
|
|
3678
3726
|
function FormStatusLine({ message, testID, style }) {
|
|
3679
3727
|
const { theme } = uiFeedback.useUi();
|
|
3680
3728
|
if (message === null || message === void 0 || message === "") return null;
|
|
3681
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
3729
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles20.line, { color: theme.colors.text }, style], testID, children: message });
|
|
3682
3730
|
}
|
|
3683
3731
|
function useFocusFirstInvalid(refs) {
|
|
3684
3732
|
const latest = React37.useRef(refs);
|
|
@@ -3702,7 +3750,7 @@ function useKeepInView(trigger) {
|
|
|
3702
3750
|
}
|
|
3703
3751
|
var IS_WEB10 = reactNative.Platform.OS === "web";
|
|
3704
3752
|
var INPUT_FONT2 = 14;
|
|
3705
|
-
var
|
|
3753
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
3706
3754
|
nativeButton: { minHeight: a11y.MIN_TOUCH_TARGET_PX, minWidth: a11y.MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
3707
3755
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
3708
3756
|
});
|
|
@@ -3730,10 +3778,10 @@ function FileInput({
|
|
|
3730
3778
|
accessibilityRole: "button",
|
|
3731
3779
|
accessibilityState: { disabled },
|
|
3732
3780
|
disabled,
|
|
3733
|
-
style:
|
|
3781
|
+
style: styles21.nativeButton,
|
|
3734
3782
|
testID,
|
|
3735
3783
|
onPress: onNativePick,
|
|
3736
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3784
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
3737
3785
|
}
|
|
3738
3786
|
);
|
|
3739
3787
|
}
|
|
@@ -3763,7 +3811,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
3763
3811
|
var GAP6 = 8;
|
|
3764
3812
|
var TITLE_FONT_SIZE = 14;
|
|
3765
3813
|
var HELP_FONT_SIZE = 13;
|
|
3766
|
-
var
|
|
3814
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
3767
3815
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
3768
3816
|
root: { gap: GAP6 },
|
|
3769
3817
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -3785,11 +3833,11 @@ var UploadWithLinkField = ({
|
|
|
3785
3833
|
const url = value ?? "";
|
|
3786
3834
|
const [pasting, setPasting] = React37.useState(url !== "");
|
|
3787
3835
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
3788
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3789
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3790
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3836
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.root, children: [
|
|
3837
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.title, { color: theme.colors.text }], children: labels.title }),
|
|
3838
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.tile, children: [
|
|
3791
3839
|
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` }),
|
|
3792
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3840
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.help, { color: theme.colors.text }], children: labels.help })
|
|
3793
3841
|
] }),
|
|
3794
3842
|
uploadControl,
|
|
3795
3843
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3800,12 +3848,12 @@ var UploadWithLinkField = ({
|
|
|
3800
3848
|
accessibilityRole: "button",
|
|
3801
3849
|
accessibilityState: { expanded: pasting },
|
|
3802
3850
|
"aria-expanded": pasting,
|
|
3803
|
-
style: [
|
|
3851
|
+
style: [styles22.toggle, ring.ringStyle],
|
|
3804
3852
|
testID: `${testID}-paste`,
|
|
3805
3853
|
onBlur: ring.onBlur,
|
|
3806
3854
|
onFocus: ring.onFocus,
|
|
3807
3855
|
onPress: () => setPasting(!pasting),
|
|
3808
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3856
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
3809
3857
|
}
|
|
3810
3858
|
),
|
|
3811
3859
|
pasting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3824,7 +3872,7 @@ var UploadWithLinkField = ({
|
|
|
3824
3872
|
};
|
|
3825
3873
|
var ACTION_GAP = 8;
|
|
3826
3874
|
var GROUP_GAP = 16;
|
|
3827
|
-
var
|
|
3875
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
3828
3876
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
3829
3877
|
group: { marginBottom: GROUP_GAP }
|
|
3830
3878
|
});
|
|
@@ -3847,7 +3895,7 @@ var AddOnRequest = ({
|
|
|
3847
3895
|
onRemove();
|
|
3848
3896
|
};
|
|
3849
3897
|
if (!isAddOnOpen(hasValue, requested))
|
|
3850
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
3898
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles23.action, style], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3851
3899
|
uiButtons.Button,
|
|
3852
3900
|
{
|
|
3853
3901
|
accessibilityHint: addHint,
|
|
@@ -3859,9 +3907,9 @@ var AddOnRequest = ({
|
|
|
3859
3907
|
onPress: () => setRequested(true)
|
|
3860
3908
|
}
|
|
3861
3909
|
) });
|
|
3862
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3910
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles23.group, style], testID, children: [
|
|
3863
3911
|
children,
|
|
3864
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3912
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles23.action, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3865
3913
|
uiButtons.Button,
|
|
3866
3914
|
{
|
|
3867
3915
|
accessibilityHint: removeHint,
|
|
@@ -3878,7 +3926,7 @@ var AddOnRequest = ({
|
|
|
3878
3926
|
var ROW_GAP3 = 8;
|
|
3879
3927
|
var TEXT_SIZE = 13;
|
|
3880
3928
|
var TEXT_LINE = 18;
|
|
3881
|
-
var
|
|
3929
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
3882
3930
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
3883
3931
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
3884
3932
|
});
|
|
@@ -3886,8 +3934,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
3886
3934
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
3887
3935
|
const { theme } = uiFeedback.useUi();
|
|
3888
3936
|
if (!isFixBarVisible(count)) return null;
|
|
3889
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3890
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
3937
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles24.row, style], testID, children: [
|
|
3938
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles24.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
3891
3939
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3892
3940
|
uiButtons.Button,
|
|
3893
3941
|
{
|
|
@@ -3925,21 +3973,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
3925
3973
|
accessibilityLabel: option.label,
|
|
3926
3974
|
accessibilityRole: "button",
|
|
3927
3975
|
accessibilityState: { selected: active, checked: current },
|
|
3928
|
-
style: [
|
|
3976
|
+
style: [styles25.row, active ? { backgroundColor: colors.surface } : null],
|
|
3929
3977
|
testID: `${testID}-option-${option.value}`,
|
|
3930
3978
|
onPress: () => onPick(option),
|
|
3931
3979
|
children: [
|
|
3932
3980
|
renderLeading?.(option),
|
|
3933
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3934
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3935
|
-
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3981
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.label, children: [
|
|
3982
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.primary, { color: colors.text }], children: option.label }),
|
|
3983
|
+
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
3936
3984
|
] }),
|
|
3937
3985
|
renderDetail?.(option)
|
|
3938
3986
|
]
|
|
3939
3987
|
}
|
|
3940
3988
|
);
|
|
3941
3989
|
}
|
|
3942
|
-
var
|
|
3990
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
3943
3991
|
row: { minHeight: a11y.MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
3944
3992
|
label: { flex: 1 },
|
|
3945
3993
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -3953,11 +4001,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
3953
4001
|
const { colors } = theme;
|
|
3954
4002
|
if (options.length === 0) return null;
|
|
3955
4003
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
3956
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
4004
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles26.header, { color: colors.textSecondary }], children: title }),
|
|
3957
4005
|
options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
3958
4006
|
] });
|
|
3959
4007
|
}
|
|
3960
|
-
var
|
|
4008
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
3961
4009
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
3962
4010
|
});
|
|
3963
4011
|
var KEY_ESCAPE = "Escape";
|
|
@@ -3987,7 +4035,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
3987
4035
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
3988
4036
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
3989
4037
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
3990
|
-
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
4038
|
+
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles27.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
3991
4039
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3992
4040
|
reactNative.TextInput,
|
|
3993
4041
|
{
|
|
@@ -4004,16 +4052,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
4004
4052
|
onSubmitEditing: submit
|
|
4005
4053
|
}
|
|
4006
4054
|
),
|
|
4007
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4055
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles27.sheetList : styles27.dropList, children: [
|
|
4008
4056
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4009
4057
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4010
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4058
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4011
4059
|
] })
|
|
4012
4060
|
] });
|
|
4013
4061
|
if (!isSheet) return /* @__PURE__ */ jsxRuntime.jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4014
4062
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4015
4063
|
}
|
|
4016
|
-
var
|
|
4064
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
4017
4065
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4018
4066
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4019
4067
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4123,7 +4171,7 @@ function SearchSelect(props) {
|
|
|
4123
4171
|
const onTriggerBlur = React37.useCallback(() => {
|
|
4124
4172
|
if (!openRef.current) onBlur?.();
|
|
4125
4173
|
}, [onBlur]);
|
|
4126
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style:
|
|
4174
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: styles28.anchor, children: [
|
|
4127
4175
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4128
4176
|
reactNative.Pressable,
|
|
4129
4177
|
{
|
|
@@ -4132,7 +4180,7 @@ function SearchSelect(props) {
|
|
|
4132
4180
|
accessibilityLabel,
|
|
4133
4181
|
accessibilityRole: "button",
|
|
4134
4182
|
accessibilityState: { expanded: state.open },
|
|
4135
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4183
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles28.customTrigger,
|
|
4136
4184
|
testID,
|
|
4137
4185
|
onBlur: onTriggerBlur,
|
|
4138
4186
|
onPress,
|
|
@@ -4144,7 +4192,7 @@ function SearchSelect(props) {
|
|
|
4144
4192
|
}
|
|
4145
4193
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4146
4194
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4147
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4195
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles28.value, children: [
|
|
4148
4196
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4149
4197
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4150
4198
|
selected !== null ? /* @__PURE__ */ jsxRuntime.jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4157,7 +4205,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4157
4205
|
if (option.detail === void 0) return null;
|
|
4158
4206
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4159
4207
|
}
|
|
4160
|
-
var
|
|
4208
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
4161
4209
|
anchor: { position: "relative" },
|
|
4162
4210
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4163
4211
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -4934,7 +4982,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4934
4982
|
const { theme } = uiFeedback.useUi();
|
|
4935
4983
|
const { textSecondary } = theme.colors;
|
|
4936
4984
|
const options = React37.useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
4937
|
-
const renderCode = React37.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4985
|
+
const renderCode = React37.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles29.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
4938
4986
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4939
4987
|
SearchSelect,
|
|
4940
4988
|
{
|
|
@@ -4952,7 +5000,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4952
5000
|
}
|
|
4953
5001
|
);
|
|
4954
5002
|
}
|
|
4955
|
-
var
|
|
5003
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
4956
5004
|
code: { fontSize: CODE_FONT }
|
|
4957
5005
|
});
|
|
4958
5006
|
function useBlurVerdict(validate) {
|
|
@@ -5208,9 +5256,9 @@ var LINE_GAP = 4;
|
|
|
5208
5256
|
function RejectionLine({ message, testID }) {
|
|
5209
5257
|
const { theme } = uiFeedback.useUi();
|
|
5210
5258
|
if (message === null) return null;
|
|
5211
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [
|
|
5259
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [styles30.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5212
5260
|
}
|
|
5213
|
-
var
|
|
5261
|
+
var styles30 = reactNative.StyleSheet.create({
|
|
5214
5262
|
line: { marginTop: LINE_GAP }
|
|
5215
5263
|
});
|
|
5216
5264
|
|
|
@@ -5357,7 +5405,7 @@ var PAD_V = 10;
|
|
|
5357
5405
|
var PAD_H = 16;
|
|
5358
5406
|
var TEXT_SIZE2 = 13;
|
|
5359
5407
|
var TEXT_LINE2 = 18;
|
|
5360
|
-
var
|
|
5408
|
+
var styles31 = reactNative.StyleSheet.create({
|
|
5361
5409
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
5362
5410
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
5363
5411
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -5369,9 +5417,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5369
5417
|
const { colors } = theme;
|
|
5370
5418
|
const pinned = actionBarPosition(sticky, reactNative.Platform.OS) === "sticky" ? PINNED : null;
|
|
5371
5419
|
const hasMessage = message !== void 0 && message !== "";
|
|
5372
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
5373
|
-
hasMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "status", style: [
|
|
5374
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5420
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles31.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
5421
|
+
hasMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "status", style: [styles31.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
5422
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.actions, children })
|
|
5375
5423
|
] });
|
|
5376
5424
|
};
|
|
5377
5425
|
|
|
@@ -5379,14 +5427,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5379
5427
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
5380
5428
|
var TITLE_SIZE = 13;
|
|
5381
5429
|
var TITLE_GAP = 6;
|
|
5382
|
-
var
|
|
5430
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
5383
5431
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
5384
5432
|
});
|
|
5385
5433
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
5386
5434
|
const { theme } = uiFeedback.useUi();
|
|
5387
5435
|
const complete = isChecklistComplete(items, checked);
|
|
5388
5436
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { testID, children: [
|
|
5389
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
5437
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles32.title, { color: theme.colors.text }], children: title }),
|
|
5390
5438
|
items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5391
5439
|
FormCheckbox,
|
|
5392
5440
|
{
|
|
@@ -5412,7 +5460,7 @@ var RADIUS2 = 8;
|
|
|
5412
5460
|
var LABEL_SIZE = 14;
|
|
5413
5461
|
var DESCRIPTION_SIZE = 12;
|
|
5414
5462
|
var DESCRIPTION_LINE = 16;
|
|
5415
|
-
var
|
|
5463
|
+
var styles33 = reactNative.StyleSheet.create({
|
|
5416
5464
|
row: {
|
|
5417
5465
|
alignItems: "center",
|
|
5418
5466
|
borderRadius: RADIUS2,
|
|
@@ -5443,15 +5491,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
5443
5491
|
accessibilityState: identity.accessibilityState,
|
|
5444
5492
|
"aria-checked": checked,
|
|
5445
5493
|
disabled,
|
|
5446
|
-
style: [
|
|
5494
|
+
style: [styles33.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
5447
5495
|
tabIndex,
|
|
5448
5496
|
testID: identity.testID,
|
|
5449
5497
|
onPress,
|
|
5450
5498
|
children: [
|
|
5451
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
5452
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
5453
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5454
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5499
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles33.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles33.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
5500
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.text, children: [
|
|
5501
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
5502
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
5455
5503
|
] })
|
|
5456
5504
|
]
|
|
5457
5505
|
}
|
|
@@ -5468,7 +5516,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
5468
5516
|
};
|
|
5469
5517
|
};
|
|
5470
5518
|
var ROW_GAP7 = 8;
|
|
5471
|
-
var
|
|
5519
|
+
var styles34 = reactNative.StyleSheet.create({
|
|
5472
5520
|
list: { rowGap: ROW_GAP7 }
|
|
5473
5521
|
});
|
|
5474
5522
|
function RadioList(props) {
|
|
@@ -5481,7 +5529,7 @@ function RadioList(props) {
|
|
|
5481
5529
|
reactNative.View,
|
|
5482
5530
|
{
|
|
5483
5531
|
accessibilityRole: "radiogroup",
|
|
5484
|
-
style:
|
|
5532
|
+
style: styles34.list,
|
|
5485
5533
|
...webFieldA11y({ describedById, hasError }),
|
|
5486
5534
|
...radio.groupProps,
|
|
5487
5535
|
children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5535,11 +5583,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
5535
5583
|
);
|
|
5536
5584
|
}
|
|
5537
5585
|
var BUTTON_BASIS = "40%";
|
|
5538
|
-
var
|
|
5586
|
+
var styles35 = reactNative.StyleSheet.create({
|
|
5539
5587
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
5540
5588
|
});
|
|
5541
5589
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
5542
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles35.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5543
5591
|
uiButtons.Button,
|
|
5544
5592
|
{
|
|
5545
5593
|
fullWidth: true,
|
|
@@ -5620,12 +5668,12 @@ function StickyBarDecision(props) {
|
|
|
5620
5668
|
}
|
|
5621
5669
|
var TEXT_SIZE3 = 13;
|
|
5622
5670
|
var TEXT_LINE3 = 18;
|
|
5623
|
-
var
|
|
5671
|
+
var styles36 = reactNative.StyleSheet.create({
|
|
5624
5672
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
5625
5673
|
});
|
|
5626
5674
|
var SubmitError = ({ message, testID }) => {
|
|
5627
5675
|
const { theme } = uiFeedback.useUi();
|
|
5628
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
5676
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles36.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
5629
5677
|
};
|
|
5630
5678
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
5631
5679
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
@@ -5668,7 +5716,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
5668
5716
|
}
|
|
5669
5717
|
var TITLE_SIZE2 = 15;
|
|
5670
5718
|
var PANEL_GAP = 12;
|
|
5671
|
-
var
|
|
5719
|
+
var styles37 = reactNative.StyleSheet.create({
|
|
5672
5720
|
panel: { rowGap: PANEL_GAP },
|
|
5673
5721
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
5674
5722
|
});
|
|
@@ -5682,8 +5730,8 @@ function DecisionPanel(props) {
|
|
|
5682
5730
|
const { theme } = uiFeedback.useUi();
|
|
5683
5731
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
5684
5732
|
const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
|
|
5685
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
5686
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
5733
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles37.panel, style], testID, children: [
|
|
5734
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles37.title, { color: theme.colors.text }], children: labels.title }),
|
|
5687
5735
|
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),
|
|
5688
5736
|
state.error === "submit" ? /* @__PURE__ */ jsxRuntime.jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
5689
5737
|
] });
|
|
@@ -5740,6 +5788,8 @@ exports.PHONE_MAX_WIDTH = PHONE_MAX_WIDTH;
|
|
|
5740
5788
|
exports.RESPONSIVE_FORM_DEFAULT_BREAKPOINT = RESPONSIVE_FORM_DEFAULT_BREAKPOINT;
|
|
5741
5789
|
exports.RadioList = RadioList;
|
|
5742
5790
|
exports.ResponsiveFormLayout = ResponsiveFormLayout;
|
|
5791
|
+
exports.SEGMENT_BESIDE_FIELD = SEGMENT_BESIDE_FIELD;
|
|
5792
|
+
exports.SEGMENT_BESIDE_TEXT_INPUT = SEGMENT_BESIDE_TEXT_INPUT;
|
|
5743
5793
|
exports.SearchSelect = SearchSelect;
|
|
5744
5794
|
exports.SelectControl = SelectControl;
|
|
5745
5795
|
exports.SelectField = SelectField;
|
|
@@ -5788,9 +5838,11 @@ exports.rejectionMessage = rejectionMessage;
|
|
|
5788
5838
|
exports.resolveGroupSelection = resolveGroupSelection;
|
|
5789
5839
|
exports.resolveSelectMotion = resolveSelectMotion;
|
|
5790
5840
|
exports.resolveStepNeighbours = resolveStepNeighbours;
|
|
5841
|
+
exports.rowsForText = rowsForText;
|
|
5791
5842
|
exports.suggestOptions = suggestOptions;
|
|
5792
5843
|
exports.toCountryValue = toCountryValue;
|
|
5793
5844
|
exports.toggleGroupSelection = toggleGroupSelection;
|
|
5845
|
+
exports.useAutoGrowRows = useAutoGrowRows;
|
|
5794
5846
|
exports.useBlurVerdict = useBlurVerdict;
|
|
5795
5847
|
exports.useDeferredFocus = useDeferredFocus;
|
|
5796
5848
|
exports.useFocusFirstInvalid = useFocusFirstInvalid;
|