@dloizides/ui-forms 1.43.1 → 1.44.1
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 +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +153 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1292,7 +1292,27 @@ function RecentInputField({
|
|
|
1292
1292
|
) : null
|
|
1293
1293
|
] });
|
|
1294
1294
|
}
|
|
1295
|
-
|
|
1295
|
+
|
|
1296
|
+
// src/FormField/textRows.ts
|
|
1297
|
+
var INPUT_SIDE_INSET = 26;
|
|
1298
|
+
var AVERAGE_CHAR_WIDTH = 8.4;
|
|
1299
|
+
var SPARE_ROWS = 1;
|
|
1300
|
+
var NARROWEST_INPUT_WIDTH = 296;
|
|
1301
|
+
function rowsForText(text, inputWidth, minRows) {
|
|
1302
|
+
const charsPerLine = Math.max(1, Math.floor((inputWidth - INPUT_SIDE_INSET) / AVERAGE_CHAR_WIDTH));
|
|
1303
|
+
const wrappedLines = text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(line.length / charsPerLine)), 0);
|
|
1304
|
+
return Math.max(minRows, wrappedLines + SPARE_ROWS);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
// src/FormField/useAutoGrowRows.ts
|
|
1308
|
+
function useAutoGrowRows(text, minRows) {
|
|
1309
|
+
const [inputWidth, setInputWidth] = useState(NARROWEST_INPUT_WIDTH);
|
|
1310
|
+
const onLayout = useCallback((event) => {
|
|
1311
|
+
setInputWidth(event.nativeEvent.layout.width);
|
|
1312
|
+
}, []);
|
|
1313
|
+
return { numberOfLines: rowsForText(text, inputWidth, minRows), onLayout };
|
|
1314
|
+
}
|
|
1315
|
+
var PlainFormField = ({
|
|
1296
1316
|
label,
|
|
1297
1317
|
labelHidden = false,
|
|
1298
1318
|
required = false,
|
|
@@ -1324,6 +1344,34 @@ var FormField = ({
|
|
|
1324
1344
|
}
|
|
1325
1345
|
}
|
|
1326
1346
|
);
|
|
1347
|
+
var AutoGrowFormField = ({
|
|
1348
|
+
minRows,
|
|
1349
|
+
...fieldProps
|
|
1350
|
+
}) => {
|
|
1351
|
+
const grow = useAutoGrowRows(fieldProps.value ?? "", minRows);
|
|
1352
|
+
return /* @__PURE__ */ jsx(
|
|
1353
|
+
PlainFormField,
|
|
1354
|
+
{
|
|
1355
|
+
...fieldProps,
|
|
1356
|
+
multiline: true,
|
|
1357
|
+
numberOfLines: grow.numberOfLines,
|
|
1358
|
+
onLayout: grow.onLayout
|
|
1359
|
+
}
|
|
1360
|
+
);
|
|
1361
|
+
};
|
|
1362
|
+
var FormField = ({ autoGrowMinRows, ...fieldProps }) => autoGrowMinRows === void 0 ? /* @__PURE__ */ jsx(PlainFormField, { ...fieldProps }) : /* @__PURE__ */ jsx(AutoGrowFormField, { ...fieldProps, minRows: autoGrowMinRows });
|
|
1363
|
+
var TEXT_INPUT_HEIGHT = 48;
|
|
1364
|
+
var styles12 = StyleSheet.create({
|
|
1365
|
+
track: { padding: 0, borderWidth: 0 },
|
|
1366
|
+
besideTextInput: {
|
|
1367
|
+
padding: 0,
|
|
1368
|
+
borderWidth: 0,
|
|
1369
|
+
minHeight: TEXT_INPUT_HEIGHT,
|
|
1370
|
+
alignItems: "stretch"
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
var SEGMENT_BESIDE_FIELD = styles12.track;
|
|
1374
|
+
var SEGMENT_BESIDE_TEXT_INPUT = styles12.besideTextInput;
|
|
1327
1375
|
|
|
1328
1376
|
// src/ChipSelector/constants.ts
|
|
1329
1377
|
var TRANSPARENT_COLOR = "transparent";
|
|
@@ -1568,7 +1616,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1568
1616
|
ariaChecked: isRadio ? selected : void 0
|
|
1569
1617
|
};
|
|
1570
1618
|
}
|
|
1571
|
-
var
|
|
1619
|
+
var styles13 = StyleSheet.create({
|
|
1572
1620
|
chipContainer: {
|
|
1573
1621
|
flexDirection: "row",
|
|
1574
1622
|
flexWrap: "wrap",
|
|
@@ -1654,7 +1702,7 @@ var ChipSelector = ({
|
|
|
1654
1702
|
View,
|
|
1655
1703
|
{
|
|
1656
1704
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1657
|
-
style:
|
|
1705
|
+
style: styles13.chipContainer,
|
|
1658
1706
|
...webFieldA11y({ describedById, hasError }),
|
|
1659
1707
|
...radio.groupProps,
|
|
1660
1708
|
children: options.map(renderChip)
|
|
@@ -1664,7 +1712,7 @@ var ChipSelector = ({
|
|
|
1664
1712
|
);
|
|
1665
1713
|
};
|
|
1666
1714
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1667
|
-
var
|
|
1715
|
+
var styles14 = StyleSheet.create({
|
|
1668
1716
|
container: {
|
|
1669
1717
|
flexDirection: "row",
|
|
1670
1718
|
justifyContent: "space-between",
|
|
@@ -1725,15 +1773,15 @@ var FormSwitch = ({
|
|
|
1725
1773
|
accessible: false,
|
|
1726
1774
|
disabled,
|
|
1727
1775
|
onPress: toggle2,
|
|
1728
|
-
style: [
|
|
1776
|
+
style: [styles14.container, containerStyle],
|
|
1729
1777
|
tabIndex: -1,
|
|
1730
1778
|
testID,
|
|
1731
1779
|
children: [
|
|
1732
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1733
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1734
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1780
|
+
/* @__PURE__ */ jsxs(View, { style: styles14.textColumn, children: [
|
|
1781
|
+
/* @__PURE__ */ jsx(Text, { style: [styles14.label, themeStyles.label], children: label }),
|
|
1782
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles14.description, themeStyles.description], children: description }) : null
|
|
1735
1783
|
] }),
|
|
1736
|
-
/* @__PURE__ */ jsx(View, { pointerEvents: "none", style:
|
|
1784
|
+
/* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles14.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsx(
|
|
1737
1785
|
Switch,
|
|
1738
1786
|
{
|
|
1739
1787
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1757,12 +1805,15 @@ var ACTIVATION_KEYS = ["Enter", " ", "Spacebar"];
|
|
|
1757
1805
|
var HINT_FONT_SIZE2 = 12;
|
|
1758
1806
|
var BOX_SIZE = 20;
|
|
1759
1807
|
var BOX_RADIUS = 5;
|
|
1760
|
-
var
|
|
1808
|
+
var TICK_WIDTH = 6;
|
|
1809
|
+
var TICK_HEIGHT = 10;
|
|
1810
|
+
var TICK_STROKE = 2;
|
|
1811
|
+
var TICK_LIFT = -2;
|
|
1761
1812
|
var DISABLED_OPACITY = 0.5;
|
|
1762
1813
|
var FOCUS_RING_WIDTH = 2;
|
|
1763
1814
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1764
1815
|
var FOCUS_RING_INSET = -6;
|
|
1765
|
-
var
|
|
1816
|
+
var styles15 = StyleSheet.create({
|
|
1766
1817
|
container: {
|
|
1767
1818
|
flexDirection: "row",
|
|
1768
1819
|
alignItems: "flex-start",
|
|
@@ -1795,10 +1846,13 @@ var styles14 = StyleSheet.create({
|
|
|
1795
1846
|
borderWidth: FOCUS_RING_WIDTH,
|
|
1796
1847
|
borderRadius: BOX_RADIUS - FOCUS_RING_INSET
|
|
1797
1848
|
},
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1849
|
+
tick: {
|
|
1850
|
+
width: TICK_WIDTH,
|
|
1851
|
+
height: TICK_HEIGHT,
|
|
1852
|
+
marginTop: TICK_LIFT,
|
|
1853
|
+
borderRightWidth: TICK_STROKE,
|
|
1854
|
+
borderBottomWidth: TICK_STROKE,
|
|
1855
|
+
transform: [{ rotate: "45deg" }]
|
|
1802
1856
|
},
|
|
1803
1857
|
textColumn: {
|
|
1804
1858
|
flex: 1
|
|
@@ -1867,8 +1921,8 @@ var FormCheckbox = ({
|
|
|
1867
1921
|
onPress: toggle2,
|
|
1868
1922
|
role: "checkbox",
|
|
1869
1923
|
style: [
|
|
1870
|
-
|
|
1871
|
-
hasHint ? null :
|
|
1924
|
+
styles15.container,
|
|
1925
|
+
hasHint ? null : styles15.centered,
|
|
1872
1926
|
containerStyle,
|
|
1873
1927
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1874
1928
|
Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1876,13 +1930,13 @@ var FormCheckbox = ({
|
|
|
1876
1930
|
testID,
|
|
1877
1931
|
...keyboardProps,
|
|
1878
1932
|
children: [
|
|
1879
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
1880
|
-
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [
|
|
1881
|
-
value ? /* @__PURE__ */ jsx(
|
|
1933
|
+
/* @__PURE__ */ jsxs(View, { style: [styles15.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1934
|
+
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles15.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1935
|
+
value ? /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, pointerEvents: "none", style: [styles15.tick, { borderColor: colors.surface }], testID: `${testID}-tick` }) : null
|
|
1882
1936
|
] }),
|
|
1883
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1884
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1885
|
-
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [
|
|
1937
|
+
/* @__PURE__ */ jsxs(View, { style: styles15.textColumn, children: [
|
|
1938
|
+
/* @__PURE__ */ jsx(Text, { style: [styles15.label, themeStyles.label], children: label }),
|
|
1939
|
+
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [styles15.hint, themeStyles.hint], children: hintText }) : null
|
|
1886
1940
|
] })
|
|
1887
1941
|
]
|
|
1888
1942
|
}
|
|
@@ -2503,20 +2557,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
2503
2557
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
2504
2558
|
return /* @__PURE__ */ jsxs(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
2505
2559
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2506
|
-
frame !== null ? /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
2560
|
+
frame !== null ? /* @__PURE__ */ jsx(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
|
|
2507
2561
|
] });
|
|
2508
2562
|
}
|
|
2509
|
-
var
|
|
2563
|
+
var styles16 = StyleSheet.create({
|
|
2510
2564
|
dropdown: { position: "absolute" },
|
|
2511
2565
|
growFromField: { transformOrigin: "top left" }
|
|
2512
2566
|
});
|
|
2513
2567
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children, progress, scale, accessibilityLabel }) {
|
|
2514
|
-
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style:
|
|
2568
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style: styles17.backdrop, children: [
|
|
2515
2569
|
/* @__PURE__ */ jsx(Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2516
|
-
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [
|
|
2570
|
+
/* @__PURE__ */ jsx(Animated.View, { testID: `${testID}-sheet`, style: [styles17.sheet, { transform: scale === void 0 ? [{ translateY }] : [{ translateY }, { scale }] }, progress === void 0 ? null : { opacity: progress }], children })
|
|
2517
2571
|
] }) });
|
|
2518
2572
|
}
|
|
2519
|
-
var
|
|
2573
|
+
var styles17 = StyleSheet.create({
|
|
2520
2574
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
2521
2575
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
2522
2576
|
});
|
|
@@ -3546,7 +3600,7 @@ var ROW_GAP = 4;
|
|
|
3546
3600
|
var TAB_PADDING = 4;
|
|
3547
3601
|
var INDICATOR_WIDTH = 2;
|
|
3548
3602
|
var TAB_FONT_SIZE = 12;
|
|
3549
|
-
var
|
|
3603
|
+
var styles18 = StyleSheet.create({
|
|
3550
3604
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
3551
3605
|
tab: {
|
|
3552
3606
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -3586,13 +3640,13 @@ var StepperTab = ({
|
|
|
3586
3640
|
accessibilityRole: "tab",
|
|
3587
3641
|
accessibilityState: { selected },
|
|
3588
3642
|
"aria-selected": selected,
|
|
3589
|
-
style: [
|
|
3643
|
+
style: [styles18.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
3590
3644
|
testID,
|
|
3591
3645
|
onBlur: ring.onBlur,
|
|
3592
3646
|
onFocus: ring.onFocus,
|
|
3593
3647
|
onPress: () => onStep(step.key),
|
|
3594
3648
|
...webKeyProps,
|
|
3595
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3649
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles18.text, { color: theme.colors.text }, selected ? styles18.textSelected : void 0], children: step.label })
|
|
3596
3650
|
}
|
|
3597
3651
|
);
|
|
3598
3652
|
};
|
|
@@ -3602,7 +3656,7 @@ var StepperTabs = ({
|
|
|
3602
3656
|
onStep,
|
|
3603
3657
|
stepHint,
|
|
3604
3658
|
testID
|
|
3605
|
-
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style:
|
|
3659
|
+
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style: styles18.row, testID, children: steps.map((step) => /* @__PURE__ */ jsx(
|
|
3606
3660
|
StepperTab,
|
|
3607
3661
|
{
|
|
3608
3662
|
hint: stepHint,
|
|
@@ -3621,7 +3675,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
3621
3675
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
3622
3676
|
}
|
|
3623
3677
|
var ROW_GAP2 = 8;
|
|
3624
|
-
var
|
|
3678
|
+
var styles19 = StyleSheet.create({
|
|
3625
3679
|
cell: { flex: 1, minWidth: 0 },
|
|
3626
3680
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
3627
3681
|
});
|
|
@@ -3633,8 +3687,8 @@ var StepperNav = ({
|
|
|
3633
3687
|
testID
|
|
3634
3688
|
}) => {
|
|
3635
3689
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
3636
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3637
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3690
|
+
return /* @__PURE__ */ jsxs(View, { style: styles19.row, testID, children: [
|
|
3691
|
+
/* @__PURE__ */ jsx(View, { style: styles19.cell, children: /* @__PURE__ */ jsx(
|
|
3638
3692
|
Button,
|
|
3639
3693
|
{
|
|
3640
3694
|
fullWidth: true,
|
|
@@ -3650,7 +3704,7 @@ var StepperNav = ({
|
|
|
3650
3704
|
}
|
|
3651
3705
|
}
|
|
3652
3706
|
) }),
|
|
3653
|
-
next === null ? null : /* @__PURE__ */ jsx(View, { style:
|
|
3707
|
+
next === null ? null : /* @__PURE__ */ jsx(View, { style: styles19.cell, children: /* @__PURE__ */ jsx(
|
|
3654
3708
|
Button,
|
|
3655
3709
|
{
|
|
3656
3710
|
fullWidth: true,
|
|
@@ -3665,13 +3719,13 @@ var StepperNav = ({
|
|
|
3665
3719
|
] });
|
|
3666
3720
|
};
|
|
3667
3721
|
var STATUS_FONT = 16;
|
|
3668
|
-
var
|
|
3722
|
+
var styles20 = StyleSheet.create({
|
|
3669
3723
|
line: { fontSize: STATUS_FONT }
|
|
3670
3724
|
});
|
|
3671
3725
|
function FormStatusLine({ message, testID, style }) {
|
|
3672
3726
|
const { theme } = useUi();
|
|
3673
3727
|
if (message === null || message === void 0 || message === "") return null;
|
|
3674
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
3728
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles20.line, { color: theme.colors.text }, style], testID, children: message });
|
|
3675
3729
|
}
|
|
3676
3730
|
function useFocusFirstInvalid(refs) {
|
|
3677
3731
|
const latest = useRef(refs);
|
|
@@ -3695,7 +3749,7 @@ function useKeepInView(trigger) {
|
|
|
3695
3749
|
}
|
|
3696
3750
|
var IS_WEB10 = Platform.OS === "web";
|
|
3697
3751
|
var INPUT_FONT2 = 14;
|
|
3698
|
-
var
|
|
3752
|
+
var styles21 = StyleSheet.create({
|
|
3699
3753
|
nativeButton: { minHeight: MIN_TOUCH_TARGET_PX, minWidth: MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
3700
3754
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
3701
3755
|
});
|
|
@@ -3723,10 +3777,10 @@ function FileInput({
|
|
|
3723
3777
|
accessibilityRole: "button",
|
|
3724
3778
|
accessibilityState: { disabled },
|
|
3725
3779
|
disabled,
|
|
3726
|
-
style:
|
|
3780
|
+
style: styles21.nativeButton,
|
|
3727
3781
|
testID,
|
|
3728
3782
|
onPress: onNativePick,
|
|
3729
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3783
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles21.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
3730
3784
|
}
|
|
3731
3785
|
);
|
|
3732
3786
|
}
|
|
@@ -3756,7 +3810,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
3756
3810
|
var GAP6 = 8;
|
|
3757
3811
|
var TITLE_FONT_SIZE = 14;
|
|
3758
3812
|
var HELP_FONT_SIZE = 13;
|
|
3759
|
-
var
|
|
3813
|
+
var styles22 = StyleSheet.create({
|
|
3760
3814
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
3761
3815
|
root: { gap: GAP6 },
|
|
3762
3816
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -3778,11 +3832,11 @@ var UploadWithLinkField = ({
|
|
|
3778
3832
|
const url = value ?? "";
|
|
3779
3833
|
const [pasting, setPasting] = useState(url !== "");
|
|
3780
3834
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
3781
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3782
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3783
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3835
|
+
return /* @__PURE__ */ jsxs(View, { style: styles22.root, children: [
|
|
3836
|
+
/* @__PURE__ */ jsx(Text, { style: [styles22.title, { color: theme.colors.text }], children: labels.title }),
|
|
3837
|
+
/* @__PURE__ */ jsxs(View, { style: styles22.tile, children: [
|
|
3784
3838
|
url === "" ? /* @__PURE__ */ jsx(View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsx(Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
|
|
3785
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [
|
|
3839
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles22.help, { color: theme.colors.text }], children: labels.help })
|
|
3786
3840
|
] }),
|
|
3787
3841
|
uploadControl,
|
|
3788
3842
|
/* @__PURE__ */ jsx(
|
|
@@ -3793,12 +3847,12 @@ var UploadWithLinkField = ({
|
|
|
3793
3847
|
accessibilityRole: "button",
|
|
3794
3848
|
accessibilityState: { expanded: pasting },
|
|
3795
3849
|
"aria-expanded": pasting,
|
|
3796
|
-
style: [
|
|
3850
|
+
style: [styles22.toggle, ring.ringStyle],
|
|
3797
3851
|
testID: `${testID}-paste`,
|
|
3798
3852
|
onBlur: ring.onBlur,
|
|
3799
3853
|
onFocus: ring.onFocus,
|
|
3800
3854
|
onPress: () => setPasting(!pasting),
|
|
3801
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3855
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles22.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
3802
3856
|
}
|
|
3803
3857
|
),
|
|
3804
3858
|
pasting ? /* @__PURE__ */ jsx(
|
|
@@ -3817,7 +3871,7 @@ var UploadWithLinkField = ({
|
|
|
3817
3871
|
};
|
|
3818
3872
|
var ACTION_GAP = 8;
|
|
3819
3873
|
var GROUP_GAP = 16;
|
|
3820
|
-
var
|
|
3874
|
+
var styles23 = StyleSheet.create({
|
|
3821
3875
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
3822
3876
|
group: { marginBottom: GROUP_GAP }
|
|
3823
3877
|
});
|
|
@@ -3840,7 +3894,7 @@ var AddOnRequest = ({
|
|
|
3840
3894
|
onRemove();
|
|
3841
3895
|
};
|
|
3842
3896
|
if (!isAddOnOpen(hasValue, requested))
|
|
3843
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
3897
|
+
return /* @__PURE__ */ jsx(View, { style: [styles23.action, style], children: /* @__PURE__ */ jsx(
|
|
3844
3898
|
Button,
|
|
3845
3899
|
{
|
|
3846
3900
|
accessibilityHint: addHint,
|
|
@@ -3852,9 +3906,9 @@ var AddOnRequest = ({
|
|
|
3852
3906
|
onPress: () => setRequested(true)
|
|
3853
3907
|
}
|
|
3854
3908
|
) });
|
|
3855
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3909
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles23.group, style], testID, children: [
|
|
3856
3910
|
children,
|
|
3857
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3911
|
+
/* @__PURE__ */ jsx(View, { style: styles23.action, children: /* @__PURE__ */ jsx(
|
|
3858
3912
|
Button,
|
|
3859
3913
|
{
|
|
3860
3914
|
accessibilityHint: removeHint,
|
|
@@ -3871,7 +3925,7 @@ var AddOnRequest = ({
|
|
|
3871
3925
|
var ROW_GAP3 = 8;
|
|
3872
3926
|
var TEXT_SIZE = 13;
|
|
3873
3927
|
var TEXT_LINE = 18;
|
|
3874
|
-
var
|
|
3928
|
+
var styles24 = StyleSheet.create({
|
|
3875
3929
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
3876
3930
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
3877
3931
|
});
|
|
@@ -3879,8 +3933,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
3879
3933
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
3880
3934
|
const { theme } = useUi();
|
|
3881
3935
|
if (!isFixBarVisible(count)) return null;
|
|
3882
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3883
|
-
/* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
3936
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles24.row, style], testID, children: [
|
|
3937
|
+
/* @__PURE__ */ jsx(Text, { role: "alert", style: [styles24.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
3884
3938
|
/* @__PURE__ */ jsx(
|
|
3885
3939
|
Button,
|
|
3886
3940
|
{
|
|
@@ -3918,21 +3972,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
3918
3972
|
accessibilityLabel: option.label,
|
|
3919
3973
|
accessibilityRole: "button",
|
|
3920
3974
|
accessibilityState: { selected: active, checked: current },
|
|
3921
|
-
style: [
|
|
3975
|
+
style: [styles25.row, active ? { backgroundColor: colors.surface } : null],
|
|
3922
3976
|
testID: `${testID}-option-${option.value}`,
|
|
3923
3977
|
onPress: () => onPick(option),
|
|
3924
3978
|
children: [
|
|
3925
3979
|
renderLeading?.(option),
|
|
3926
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3927
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3928
|
-
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3980
|
+
/* @__PURE__ */ jsxs(View, { style: styles25.label, children: [
|
|
3981
|
+
/* @__PURE__ */ jsx(Text, { style: [styles25.primary, { color: colors.text }], children: option.label }),
|
|
3982
|
+
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles25.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
3929
3983
|
] }),
|
|
3930
3984
|
renderDetail?.(option)
|
|
3931
3985
|
]
|
|
3932
3986
|
}
|
|
3933
3987
|
);
|
|
3934
3988
|
}
|
|
3935
|
-
var
|
|
3989
|
+
var styles25 = StyleSheet.create({
|
|
3936
3990
|
row: { minHeight: MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
3937
3991
|
label: { flex: 1 },
|
|
3938
3992
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -3946,11 +4000,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
3946
4000
|
const { colors } = theme;
|
|
3947
4001
|
if (options.length === 0) return null;
|
|
3948
4002
|
return /* @__PURE__ */ jsxs(View, { children: [
|
|
3949
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
4003
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles26.header, { color: colors.textSecondary }], children: title }),
|
|
3950
4004
|
options.map((option, index) => /* @__PURE__ */ jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
3951
4005
|
] });
|
|
3952
4006
|
}
|
|
3953
|
-
var
|
|
4007
|
+
var styles26 = StyleSheet.create({
|
|
3954
4008
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
3955
4009
|
});
|
|
3956
4010
|
var KEY_ESCAPE = "Escape";
|
|
@@ -3980,7 +4034,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
3980
4034
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
3981
4035
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
3982
4036
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
3983
|
-
const list = /* @__PURE__ */ jsxs(View, { style: [
|
|
4037
|
+
const list = /* @__PURE__ */ jsxs(View, { style: [styles27.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
3984
4038
|
/* @__PURE__ */ jsx(
|
|
3985
4039
|
TextInput,
|
|
3986
4040
|
{
|
|
@@ -3997,16 +4051,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
3997
4051
|
onSubmitEditing: submit
|
|
3998
4052
|
}
|
|
3999
4053
|
),
|
|
4000
|
-
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4054
|
+
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles27.sheetList : styles27.dropList, children: [
|
|
4001
4055
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4002
4056
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4003
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4057
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles27.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4004
4058
|
] })
|
|
4005
4059
|
] });
|
|
4006
4060
|
if (!isSheet) return /* @__PURE__ */ jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4007
4061
|
return /* @__PURE__ */ jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4008
4062
|
}
|
|
4009
|
-
var
|
|
4063
|
+
var styles27 = StyleSheet.create({
|
|
4010
4064
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4011
4065
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4012
4066
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4116,7 +4170,7 @@ function SearchSelect(props) {
|
|
|
4116
4170
|
const onTriggerBlur = useCallback(() => {
|
|
4117
4171
|
if (!openRef.current) onBlur?.();
|
|
4118
4172
|
}, [onBlur]);
|
|
4119
|
-
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style:
|
|
4173
|
+
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles28.anchor, children: [
|
|
4120
4174
|
/* @__PURE__ */ jsx(
|
|
4121
4175
|
Pressable,
|
|
4122
4176
|
{
|
|
@@ -4125,7 +4179,7 @@ function SearchSelect(props) {
|
|
|
4125
4179
|
accessibilityLabel,
|
|
4126
4180
|
accessibilityRole: "button",
|
|
4127
4181
|
accessibilityState: { expanded: state.open },
|
|
4128
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4182
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles28.customTrigger,
|
|
4129
4183
|
testID,
|
|
4130
4184
|
onBlur: onTriggerBlur,
|
|
4131
4185
|
onPress,
|
|
@@ -4137,7 +4191,7 @@ function SearchSelect(props) {
|
|
|
4137
4191
|
}
|
|
4138
4192
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4139
4193
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4140
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4194
|
+
/* @__PURE__ */ jsxs(View, { style: styles28.value, children: [
|
|
4141
4195
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4142
4196
|
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4143
4197
|
selected !== null ? /* @__PURE__ */ jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4150,7 +4204,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4150
4204
|
if (option.detail === void 0) return null;
|
|
4151
4205
|
return /* @__PURE__ */ jsx(Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4152
4206
|
}
|
|
4153
|
-
var
|
|
4207
|
+
var styles28 = StyleSheet.create({
|
|
4154
4208
|
anchor: { position: "relative" },
|
|
4155
4209
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4156
4210
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -4927,7 +4981,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4927
4981
|
const { theme } = useUi();
|
|
4928
4982
|
const { textSecondary } = theme.colors;
|
|
4929
4983
|
const options = useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
4930
|
-
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [
|
|
4984
|
+
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles29.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
4931
4985
|
return /* @__PURE__ */ jsx(
|
|
4932
4986
|
SearchSelect,
|
|
4933
4987
|
{
|
|
@@ -4945,7 +4999,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4945
4999
|
}
|
|
4946
5000
|
);
|
|
4947
5001
|
}
|
|
4948
|
-
var
|
|
5002
|
+
var styles29 = StyleSheet.create({
|
|
4949
5003
|
code: { fontSize: CODE_FONT }
|
|
4950
5004
|
});
|
|
4951
5005
|
function useBlurVerdict(validate) {
|
|
@@ -5201,9 +5255,9 @@ var LINE_GAP = 4;
|
|
|
5201
5255
|
function RejectionLine({ message, testID }) {
|
|
5202
5256
|
const { theme } = useUi();
|
|
5203
5257
|
if (message === null) return null;
|
|
5204
|
-
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [
|
|
5258
|
+
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles30.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5205
5259
|
}
|
|
5206
|
-
var
|
|
5260
|
+
var styles30 = StyleSheet.create({
|
|
5207
5261
|
line: { marginTop: LINE_GAP }
|
|
5208
5262
|
});
|
|
5209
5263
|
|
|
@@ -5350,7 +5404,7 @@ var PAD_V = 10;
|
|
|
5350
5404
|
var PAD_H = 16;
|
|
5351
5405
|
var TEXT_SIZE2 = 13;
|
|
5352
5406
|
var TEXT_LINE2 = 18;
|
|
5353
|
-
var
|
|
5407
|
+
var styles31 = StyleSheet.create({
|
|
5354
5408
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
5355
5409
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
5356
5410
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -5362,9 +5416,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5362
5416
|
const { colors } = theme;
|
|
5363
5417
|
const pinned = actionBarPosition(sticky, Platform.OS) === "sticky" ? PINNED : null;
|
|
5364
5418
|
const hasMessage = message !== void 0 && message !== "";
|
|
5365
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5366
|
-
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [
|
|
5367
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
5419
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles31.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
5420
|
+
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles31.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
5421
|
+
/* @__PURE__ */ jsx(View, { style: styles31.actions, children })
|
|
5368
5422
|
] });
|
|
5369
5423
|
};
|
|
5370
5424
|
|
|
@@ -5372,14 +5426,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5372
5426
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
5373
5427
|
var TITLE_SIZE = 13;
|
|
5374
5428
|
var TITLE_GAP = 6;
|
|
5375
|
-
var
|
|
5429
|
+
var styles32 = StyleSheet.create({
|
|
5376
5430
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
5377
5431
|
});
|
|
5378
5432
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
5379
5433
|
const { theme } = useUi();
|
|
5380
5434
|
const complete = isChecklistComplete(items, checked);
|
|
5381
5435
|
return /* @__PURE__ */ jsxs(View, { testID, children: [
|
|
5382
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
5436
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles32.title, { color: theme.colors.text }], children: title }),
|
|
5383
5437
|
items.map((item) => /* @__PURE__ */ jsx(
|
|
5384
5438
|
FormCheckbox,
|
|
5385
5439
|
{
|
|
@@ -5405,7 +5459,7 @@ var RADIUS2 = 8;
|
|
|
5405
5459
|
var LABEL_SIZE = 14;
|
|
5406
5460
|
var DESCRIPTION_SIZE = 12;
|
|
5407
5461
|
var DESCRIPTION_LINE = 16;
|
|
5408
|
-
var
|
|
5462
|
+
var styles33 = StyleSheet.create({
|
|
5409
5463
|
row: {
|
|
5410
5464
|
alignItems: "center",
|
|
5411
5465
|
borderRadius: RADIUS2,
|
|
@@ -5436,15 +5490,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
5436
5490
|
accessibilityState: identity.accessibilityState,
|
|
5437
5491
|
"aria-checked": checked,
|
|
5438
5492
|
disabled,
|
|
5439
|
-
style: [
|
|
5493
|
+
style: [styles33.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
5440
5494
|
tabIndex,
|
|
5441
5495
|
testID: identity.testID,
|
|
5442
5496
|
onPress,
|
|
5443
5497
|
children: [
|
|
5444
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
5445
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5446
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5447
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
5498
|
+
/* @__PURE__ */ jsx(View, { style: [styles33.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles33.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
5499
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.text, children: [
|
|
5500
|
+
/* @__PURE__ */ jsx(Text, { style: [styles33.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
5501
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles33.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
5448
5502
|
] })
|
|
5449
5503
|
]
|
|
5450
5504
|
}
|
|
@@ -5461,7 +5515,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
5461
5515
|
};
|
|
5462
5516
|
};
|
|
5463
5517
|
var ROW_GAP7 = 8;
|
|
5464
|
-
var
|
|
5518
|
+
var styles34 = StyleSheet.create({
|
|
5465
5519
|
list: { rowGap: ROW_GAP7 }
|
|
5466
5520
|
});
|
|
5467
5521
|
function RadioList(props) {
|
|
@@ -5474,7 +5528,7 @@ function RadioList(props) {
|
|
|
5474
5528
|
View,
|
|
5475
5529
|
{
|
|
5476
5530
|
accessibilityRole: "radiogroup",
|
|
5477
|
-
style:
|
|
5531
|
+
style: styles34.list,
|
|
5478
5532
|
...webFieldA11y({ describedById, hasError }),
|
|
5479
5533
|
...radio.groupProps,
|
|
5480
5534
|
children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
@@ -5528,11 +5582,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
5528
5582
|
);
|
|
5529
5583
|
}
|
|
5530
5584
|
var BUTTON_BASIS = "40%";
|
|
5531
|
-
var
|
|
5585
|
+
var styles35 = StyleSheet.create({
|
|
5532
5586
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
5533
5587
|
});
|
|
5534
5588
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
5535
|
-
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style:
|
|
5589
|
+
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles35.cell, children: /* @__PURE__ */ jsx(
|
|
5536
5590
|
Button,
|
|
5537
5591
|
{
|
|
5538
5592
|
fullWidth: true,
|
|
@@ -5613,12 +5667,12 @@ function StickyBarDecision(props) {
|
|
|
5613
5667
|
}
|
|
5614
5668
|
var TEXT_SIZE3 = 13;
|
|
5615
5669
|
var TEXT_LINE3 = 18;
|
|
5616
|
-
var
|
|
5670
|
+
var styles36 = StyleSheet.create({
|
|
5617
5671
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
5618
5672
|
});
|
|
5619
5673
|
var SubmitError = ({ message, testID }) => {
|
|
5620
5674
|
const { theme } = useUi();
|
|
5621
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
5675
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles36.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
5622
5676
|
};
|
|
5623
5677
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
5624
5678
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
@@ -5661,7 +5715,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
5661
5715
|
}
|
|
5662
5716
|
var TITLE_SIZE2 = 15;
|
|
5663
5717
|
var PANEL_GAP = 12;
|
|
5664
|
-
var
|
|
5718
|
+
var styles37 = StyleSheet.create({
|
|
5665
5719
|
panel: { rowGap: PANEL_GAP },
|
|
5666
5720
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
5667
5721
|
});
|
|
@@ -5675,13 +5729,13 @@ function DecisionPanel(props) {
|
|
|
5675
5729
|
const { theme } = useUi();
|
|
5676
5730
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
5677
5731
|
const body = (locked) => renderVariant(variant, { state, outcomes, labels, testID, disabled: disabled || locked, reasons, leadOutcome });
|
|
5678
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5679
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
5732
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles37.panel, style], testID, children: [
|
|
5733
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles37.title, { color: theme.colors.text }], children: labels.title }),
|
|
5680
5734
|
checklist !== void 0 ? /* @__PURE__ */ jsx(GatedChecklist, { checked: state.checked, items: checklist.items, testID: `${testID}-checklist`, title: checklist.title, onToggle: state.toggleCheck, children: (complete) => body(!complete) }) : body(false),
|
|
5681
5735
|
state.error === "submit" ? /* @__PURE__ */ jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
5682
5736
|
] });
|
|
5683
5737
|
}
|
|
5684
5738
|
|
|
5685
|
-
export { ActionBar, AddOnRequest, AlignToControl, AnchoredMenu, BicInput, BicRejection, COUNTRIES, ChipLabelWrap, ChipSelector, CountryField, CountryFlag, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, DateInput, DatePickerProvider, DateRangeControl, DateTimeField, DecisionPanel, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, FileInput, FixBar, FlagShapeKind, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStack, FormStatusLine, FormSwitch, GatedChecklist, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, IbanInput, IbanRejection, InlineFieldRow, LINE_ITEMS_WIDE_MIN_WIDTH, LineItems, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, ResponsiveFormLayout, SearchSelect, SelectControl, SelectField, SelectSurface, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, suggestOptions, toCountryValue, toggleGroupSelection, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
|
|
5739
|
+
export { ActionBar, AddOnRequest, AlignToControl, AnchoredMenu, BicInput, BicRejection, COUNTRIES, ChipLabelWrap, ChipSelector, CountryField, CountryFlag, DEFAULT_DATE_PICKER_LABELS, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, DateInput, DatePickerProvider, DateRangeControl, DateTimeField, DecisionPanel, DropdownPlacement, FLAG_HEIGHT, FLAG_WIDTH, Field, FileInput, FixBar, FlagShapeKind, FormActions, FormCell, FormCheckbox, FormField, FormGrid, FormSection, FormStack, FormStatusLine, FormSwitch, GatedChecklist, IBAN_MAX_LENGTH, IBAN_REGISTERED_COUNTRY_COUNT, INLINE_FIELD_ROW_MIN_WIDTH, IbanInput, IbanRejection, InlineFieldRow, LINE_ITEMS_WIDE_MIN_WIDTH, LineItems, PHONE_MAX_WIDTH, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, RadioList, ResponsiveFormLayout, SEGMENT_BESIDE_FIELD, SEGMENT_BESIDE_TEXT_INPUT, SearchSelect, SelectControl, SelectField, SelectSurface, StepperNav, StepperTabs, ThemedTextInput, TypeaheadControl, UploadWithLinkField, actionBarPosition, buildSearchSelectSections, canRemoveLine, controlStyles, countryFieldOptions, countryFlag, countryOptions, defaultDecisionVariant, draftBic, draftIban, dropdownFrame, findOption, fitDropdownWidth, flagShapes, groupAriaChecked, groupInFours, highlightAfterQuery, ibanCounter, ibanLengthFor, inlineFieldRowLayout, isAddOnOpen, isChecklistComplete, isFallbackFlag, isFixBarVisible, isLineItemsWide, isOutside, isUnmatched, isWideFormLayout, leadFirst, lineItemColumnFlex, lineNumberOf, moveHighlight, nextHighlight, placeDropdown, radioRowIdentity, rejectionMessage, resolveGroupSelection, resolveSelectMotion, resolveStepNeighbours, rowsForText, suggestOptions, toCountryValue, toggleGroupSelection, useAutoGrowRows, useBlurVerdict, useDeferredFocus, useFocusFirstInvalid, useKeepInView, useOutsidePress, useRecentValues, useReducedMotion, useSearchSelectState, useThemedInput, validateBic, validateDecision, validateIban };
|
|
5686
5740
|
//# sourceMappingURL=index.mjs.map
|
|
5687
5741
|
//# sourceMappingURL=index.mjs.map
|