@dloizides/ui-forms 1.43.1 → 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 +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +142 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +139 -91
- 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,
|
|
@@ -1762,7 +1810,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1762
1810
|
var FOCUS_RING_WIDTH = 2;
|
|
1763
1811
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1764
1812
|
var FOCUS_RING_INSET = -6;
|
|
1765
|
-
var
|
|
1813
|
+
var styles15 = StyleSheet.create({
|
|
1766
1814
|
container: {
|
|
1767
1815
|
flexDirection: "row",
|
|
1768
1816
|
alignItems: "flex-start",
|
|
@@ -1867,8 +1915,8 @@ var FormCheckbox = ({
|
|
|
1867
1915
|
onPress: toggle2,
|
|
1868
1916
|
role: "checkbox",
|
|
1869
1917
|
style: [
|
|
1870
|
-
|
|
1871
|
-
hasHint ? null :
|
|
1918
|
+
styles15.container,
|
|
1919
|
+
hasHint ? null : styles15.centered,
|
|
1872
1920
|
containerStyle,
|
|
1873
1921
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1874
1922
|
Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1876,13 +1924,13 @@ var FormCheckbox = ({
|
|
|
1876
1924
|
testID,
|
|
1877
1925
|
...keyboardProps,
|
|
1878
1926
|
children: [
|
|
1879
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
1880
|
-
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [
|
|
1881
|
-
value ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1927
|
+
/* @__PURE__ */ jsxs(View, { style: [styles15.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1928
|
+
focused ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles15.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1929
|
+
value ? /* @__PURE__ */ jsx(Text, { style: [styles15.check, { color: colors.surface }], accessibilityElementsHidden: true, children: "\u2713" }) : null
|
|
1882
1930
|
] }),
|
|
1883
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1884
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1885
|
-
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [
|
|
1931
|
+
/* @__PURE__ */ jsxs(View, { style: styles15.textColumn, children: [
|
|
1932
|
+
/* @__PURE__ */ jsx(Text, { style: [styles15.label, themeStyles.label], children: label }),
|
|
1933
|
+
hasHint ? /* @__PURE__ */ jsx(Text, { nativeID: hintId, style: [styles15.hint, themeStyles.hint], children: hintText }) : null
|
|
1886
1934
|
] })
|
|
1887
1935
|
]
|
|
1888
1936
|
}
|
|
@@ -2503,20 +2551,20 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
2503
2551
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
2504
2552
|
return /* @__PURE__ */ jsxs(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: [
|
|
2505
2553
|
/* @__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: [
|
|
2554
|
+
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
2555
|
] });
|
|
2508
2556
|
}
|
|
2509
|
-
var
|
|
2557
|
+
var styles16 = StyleSheet.create({
|
|
2510
2558
|
dropdown: { position: "absolute" },
|
|
2511
2559
|
growFromField: { transformOrigin: "top left" }
|
|
2512
2560
|
});
|
|
2513
2561
|
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:
|
|
2562
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: true, animationType: "none", "aria-label": accessibilityLabel, onRequestClose: onDismiss, children: /* @__PURE__ */ jsxs(View, { style: styles17.backdrop, children: [
|
|
2515
2563
|
/* @__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: [
|
|
2564
|
+
/* @__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
2565
|
] }) });
|
|
2518
2566
|
}
|
|
2519
|
-
var
|
|
2567
|
+
var styles17 = StyleSheet.create({
|
|
2520
2568
|
backdrop: { flex: 1, justifyContent: "flex-end" },
|
|
2521
2569
|
sheet: { width: "100%", alignSelf: "stretch" }
|
|
2522
2570
|
});
|
|
@@ -3546,7 +3594,7 @@ var ROW_GAP = 4;
|
|
|
3546
3594
|
var TAB_PADDING = 4;
|
|
3547
3595
|
var INDICATOR_WIDTH = 2;
|
|
3548
3596
|
var TAB_FONT_SIZE = 12;
|
|
3549
|
-
var
|
|
3597
|
+
var styles18 = StyleSheet.create({
|
|
3550
3598
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
3551
3599
|
tab: {
|
|
3552
3600
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -3586,13 +3634,13 @@ var StepperTab = ({
|
|
|
3586
3634
|
accessibilityRole: "tab",
|
|
3587
3635
|
accessibilityState: { selected },
|
|
3588
3636
|
"aria-selected": selected,
|
|
3589
|
-
style: [
|
|
3637
|
+
style: [styles18.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
3590
3638
|
testID,
|
|
3591
3639
|
onBlur: ring.onBlur,
|
|
3592
3640
|
onFocus: ring.onFocus,
|
|
3593
3641
|
onPress: () => onStep(step.key),
|
|
3594
3642
|
...webKeyProps,
|
|
3595
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3643
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles18.text, { color: theme.colors.text }, selected ? styles18.textSelected : void 0], children: step.label })
|
|
3596
3644
|
}
|
|
3597
3645
|
);
|
|
3598
3646
|
};
|
|
@@ -3602,7 +3650,7 @@ var StepperTabs = ({
|
|
|
3602
3650
|
onStep,
|
|
3603
3651
|
stepHint,
|
|
3604
3652
|
testID
|
|
3605
|
-
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style:
|
|
3653
|
+
}) => /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", style: styles18.row, testID, children: steps.map((step) => /* @__PURE__ */ jsx(
|
|
3606
3654
|
StepperTab,
|
|
3607
3655
|
{
|
|
3608
3656
|
hint: stepHint,
|
|
@@ -3621,7 +3669,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
3621
3669
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
3622
3670
|
}
|
|
3623
3671
|
var ROW_GAP2 = 8;
|
|
3624
|
-
var
|
|
3672
|
+
var styles19 = StyleSheet.create({
|
|
3625
3673
|
cell: { flex: 1, minWidth: 0 },
|
|
3626
3674
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
3627
3675
|
});
|
|
@@ -3633,8 +3681,8 @@ var StepperNav = ({
|
|
|
3633
3681
|
testID
|
|
3634
3682
|
}) => {
|
|
3635
3683
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
3636
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3637
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3684
|
+
return /* @__PURE__ */ jsxs(View, { style: styles19.row, testID, children: [
|
|
3685
|
+
/* @__PURE__ */ jsx(View, { style: styles19.cell, children: /* @__PURE__ */ jsx(
|
|
3638
3686
|
Button,
|
|
3639
3687
|
{
|
|
3640
3688
|
fullWidth: true,
|
|
@@ -3650,7 +3698,7 @@ var StepperNav = ({
|
|
|
3650
3698
|
}
|
|
3651
3699
|
}
|
|
3652
3700
|
) }),
|
|
3653
|
-
next === null ? null : /* @__PURE__ */ jsx(View, { style:
|
|
3701
|
+
next === null ? null : /* @__PURE__ */ jsx(View, { style: styles19.cell, children: /* @__PURE__ */ jsx(
|
|
3654
3702
|
Button,
|
|
3655
3703
|
{
|
|
3656
3704
|
fullWidth: true,
|
|
@@ -3665,13 +3713,13 @@ var StepperNav = ({
|
|
|
3665
3713
|
] });
|
|
3666
3714
|
};
|
|
3667
3715
|
var STATUS_FONT = 16;
|
|
3668
|
-
var
|
|
3716
|
+
var styles20 = StyleSheet.create({
|
|
3669
3717
|
line: { fontSize: STATUS_FONT }
|
|
3670
3718
|
});
|
|
3671
3719
|
function FormStatusLine({ message, testID, style }) {
|
|
3672
3720
|
const { theme } = useUi();
|
|
3673
3721
|
if (message === null || message === void 0 || message === "") return null;
|
|
3674
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
3722
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles20.line, { color: theme.colors.text }, style], testID, children: message });
|
|
3675
3723
|
}
|
|
3676
3724
|
function useFocusFirstInvalid(refs) {
|
|
3677
3725
|
const latest = useRef(refs);
|
|
@@ -3695,7 +3743,7 @@ function useKeepInView(trigger) {
|
|
|
3695
3743
|
}
|
|
3696
3744
|
var IS_WEB10 = Platform.OS === "web";
|
|
3697
3745
|
var INPUT_FONT2 = 14;
|
|
3698
|
-
var
|
|
3746
|
+
var styles21 = StyleSheet.create({
|
|
3699
3747
|
nativeButton: { minHeight: MIN_TOUCH_TARGET_PX, minWidth: MIN_TOUCH_TARGET_PX, justifyContent: "center" },
|
|
3700
3748
|
nativeText: { fontSize: INPUT_FONT2 }
|
|
3701
3749
|
});
|
|
@@ -3723,10 +3771,10 @@ function FileInput({
|
|
|
3723
3771
|
accessibilityRole: "button",
|
|
3724
3772
|
accessibilityState: { disabled },
|
|
3725
3773
|
disabled,
|
|
3726
|
-
style:
|
|
3774
|
+
style: styles21.nativeButton,
|
|
3727
3775
|
testID,
|
|
3728
3776
|
onPress: onNativePick,
|
|
3729
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3777
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles21.nativeText, { color: colors.text }], children: nativeLabel ?? accessibilityLabel })
|
|
3730
3778
|
}
|
|
3731
3779
|
);
|
|
3732
3780
|
}
|
|
@@ -3756,7 +3804,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
3756
3804
|
var GAP6 = 8;
|
|
3757
3805
|
var TITLE_FONT_SIZE = 14;
|
|
3758
3806
|
var HELP_FONT_SIZE = 13;
|
|
3759
|
-
var
|
|
3807
|
+
var styles22 = StyleSheet.create({
|
|
3760
3808
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
3761
3809
|
root: { gap: GAP6 },
|
|
3762
3810
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP6 },
|
|
@@ -3778,11 +3826,11 @@ var UploadWithLinkField = ({
|
|
|
3778
3826
|
const url = value ?? "";
|
|
3779
3827
|
const [pasting, setPasting] = useState(url !== "");
|
|
3780
3828
|
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:
|
|
3829
|
+
return /* @__PURE__ */ jsxs(View, { style: styles22.root, children: [
|
|
3830
|
+
/* @__PURE__ */ jsx(Text, { style: [styles22.title, { color: theme.colors.text }], children: labels.title }),
|
|
3831
|
+
/* @__PURE__ */ jsxs(View, { style: styles22.tile, children: [
|
|
3784
3832
|
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: [
|
|
3833
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles22.help, { color: theme.colors.text }], children: labels.help })
|
|
3786
3834
|
] }),
|
|
3787
3835
|
uploadControl,
|
|
3788
3836
|
/* @__PURE__ */ jsx(
|
|
@@ -3793,12 +3841,12 @@ var UploadWithLinkField = ({
|
|
|
3793
3841
|
accessibilityRole: "button",
|
|
3794
3842
|
accessibilityState: { expanded: pasting },
|
|
3795
3843
|
"aria-expanded": pasting,
|
|
3796
|
-
style: [
|
|
3844
|
+
style: [styles22.toggle, ring.ringStyle],
|
|
3797
3845
|
testID: `${testID}-paste`,
|
|
3798
3846
|
onBlur: ring.onBlur,
|
|
3799
3847
|
onFocus: ring.onFocus,
|
|
3800
3848
|
onPress: () => setPasting(!pasting),
|
|
3801
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3849
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles22.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
3802
3850
|
}
|
|
3803
3851
|
),
|
|
3804
3852
|
pasting ? /* @__PURE__ */ jsx(
|
|
@@ -3817,7 +3865,7 @@ var UploadWithLinkField = ({
|
|
|
3817
3865
|
};
|
|
3818
3866
|
var ACTION_GAP = 8;
|
|
3819
3867
|
var GROUP_GAP = 16;
|
|
3820
|
-
var
|
|
3868
|
+
var styles23 = StyleSheet.create({
|
|
3821
3869
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
3822
3870
|
group: { marginBottom: GROUP_GAP }
|
|
3823
3871
|
});
|
|
@@ -3840,7 +3888,7 @@ var AddOnRequest = ({
|
|
|
3840
3888
|
onRemove();
|
|
3841
3889
|
};
|
|
3842
3890
|
if (!isAddOnOpen(hasValue, requested))
|
|
3843
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
3891
|
+
return /* @__PURE__ */ jsx(View, { style: [styles23.action, style], children: /* @__PURE__ */ jsx(
|
|
3844
3892
|
Button,
|
|
3845
3893
|
{
|
|
3846
3894
|
accessibilityHint: addHint,
|
|
@@ -3852,9 +3900,9 @@ var AddOnRequest = ({
|
|
|
3852
3900
|
onPress: () => setRequested(true)
|
|
3853
3901
|
}
|
|
3854
3902
|
) });
|
|
3855
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3903
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles23.group, style], testID, children: [
|
|
3856
3904
|
children,
|
|
3857
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3905
|
+
/* @__PURE__ */ jsx(View, { style: styles23.action, children: /* @__PURE__ */ jsx(
|
|
3858
3906
|
Button,
|
|
3859
3907
|
{
|
|
3860
3908
|
accessibilityHint: removeHint,
|
|
@@ -3871,7 +3919,7 @@ var AddOnRequest = ({
|
|
|
3871
3919
|
var ROW_GAP3 = 8;
|
|
3872
3920
|
var TEXT_SIZE = 13;
|
|
3873
3921
|
var TEXT_LINE = 18;
|
|
3874
|
-
var
|
|
3922
|
+
var styles24 = StyleSheet.create({
|
|
3875
3923
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
3876
3924
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
3877
3925
|
});
|
|
@@ -3879,8 +3927,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
3879
3927
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
3880
3928
|
const { theme } = useUi();
|
|
3881
3929
|
if (!isFixBarVisible(count)) return null;
|
|
3882
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3883
|
-
/* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
3930
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles24.row, style], testID, children: [
|
|
3931
|
+
/* @__PURE__ */ jsx(Text, { role: "alert", style: [styles24.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
3884
3932
|
/* @__PURE__ */ jsx(
|
|
3885
3933
|
Button,
|
|
3886
3934
|
{
|
|
@@ -3918,21 +3966,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
3918
3966
|
accessibilityLabel: option.label,
|
|
3919
3967
|
accessibilityRole: "button",
|
|
3920
3968
|
accessibilityState: { selected: active, checked: current },
|
|
3921
|
-
style: [
|
|
3969
|
+
style: [styles25.row, active ? { backgroundColor: colors.surface } : null],
|
|
3922
3970
|
testID: `${testID}-option-${option.value}`,
|
|
3923
3971
|
onPress: () => onPick(option),
|
|
3924
3972
|
children: [
|
|
3925
3973
|
renderLeading?.(option),
|
|
3926
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3927
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3928
|
-
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3974
|
+
/* @__PURE__ */ jsxs(View, { style: styles25.label, children: [
|
|
3975
|
+
/* @__PURE__ */ jsx(Text, { style: [styles25.primary, { color: colors.text }], children: option.label }),
|
|
3976
|
+
detailBelow ? /* @__PURE__ */ jsx(Text, { style: [styles25.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
3929
3977
|
] }),
|
|
3930
3978
|
renderDetail?.(option)
|
|
3931
3979
|
]
|
|
3932
3980
|
}
|
|
3933
3981
|
);
|
|
3934
3982
|
}
|
|
3935
|
-
var
|
|
3983
|
+
var styles25 = StyleSheet.create({
|
|
3936
3984
|
row: { minHeight: MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
3937
3985
|
label: { flex: 1 },
|
|
3938
3986
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -3946,11 +3994,11 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
3946
3994
|
const { colors } = theme;
|
|
3947
3995
|
if (options.length === 0) return null;
|
|
3948
3996
|
return /* @__PURE__ */ jsxs(View, { children: [
|
|
3949
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
3997
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles26.header, { color: colors.textSecondary }], children: title }),
|
|
3950
3998
|
options.map((option, index) => /* @__PURE__ */ jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
3951
3999
|
] });
|
|
3952
4000
|
}
|
|
3953
|
-
var
|
|
4001
|
+
var styles26 = StyleSheet.create({
|
|
3954
4002
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
3955
4003
|
});
|
|
3956
4004
|
var KEY_ESCAPE = "Escape";
|
|
@@ -3980,7 +4028,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
3980
4028
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
3981
4029
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
3982
4030
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
3983
|
-
const list = /* @__PURE__ */ jsxs(View, { style: [
|
|
4031
|
+
const list = /* @__PURE__ */ jsxs(View, { style: [styles27.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
3984
4032
|
/* @__PURE__ */ jsx(
|
|
3985
4033
|
TextInput,
|
|
3986
4034
|
{
|
|
@@ -3997,16 +4045,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
3997
4045
|
onSubmitEditing: submit
|
|
3998
4046
|
}
|
|
3999
4047
|
),
|
|
4000
|
-
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
4048
|
+
/* @__PURE__ */ jsxs(ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles27.sheetList : styles27.dropList, children: [
|
|
4001
4049
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
4002
4050
|
/* @__PURE__ */ jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
4003
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4051
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles27.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
4004
4052
|
] })
|
|
4005
4053
|
] });
|
|
4006
4054
|
if (!isSheet) return /* @__PURE__ */ jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
4007
4055
|
return /* @__PURE__ */ jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
4008
4056
|
}
|
|
4009
|
-
var
|
|
4057
|
+
var styles27 = StyleSheet.create({
|
|
4010
4058
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
4011
4059
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
4012
4060
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT2 },
|
|
@@ -4116,7 +4164,7 @@ function SearchSelect(props) {
|
|
|
4116
4164
|
const onTriggerBlur = useCallback(() => {
|
|
4117
4165
|
if (!openRef.current) onBlur?.();
|
|
4118
4166
|
}, [onBlur]);
|
|
4119
|
-
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style:
|
|
4167
|
+
return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles28.anchor, children: [
|
|
4120
4168
|
/* @__PURE__ */ jsx(
|
|
4121
4169
|
Pressable,
|
|
4122
4170
|
{
|
|
@@ -4125,7 +4173,7 @@ function SearchSelect(props) {
|
|
|
4125
4173
|
accessibilityLabel,
|
|
4126
4174
|
accessibilityRole: "button",
|
|
4127
4175
|
accessibilityState: { expanded: state.open },
|
|
4128
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
4176
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles28.customTrigger,
|
|
4129
4177
|
testID,
|
|
4130
4178
|
onBlur: onTriggerBlur,
|
|
4131
4179
|
onPress,
|
|
@@ -4137,7 +4185,7 @@ function SearchSelect(props) {
|
|
|
4137
4185
|
}
|
|
4138
4186
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
4139
4187
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4140
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4188
|
+
/* @__PURE__ */ jsxs(View, { style: styles28.value, children: [
|
|
4141
4189
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
4142
4190
|
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
4143
4191
|
selected !== null ? /* @__PURE__ */ jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -4150,7 +4198,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
4150
4198
|
if (option.detail === void 0) return null;
|
|
4151
4199
|
return /* @__PURE__ */ jsx(Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
4152
4200
|
}
|
|
4153
|
-
var
|
|
4201
|
+
var styles28 = StyleSheet.create({
|
|
4154
4202
|
anchor: { position: "relative" },
|
|
4155
4203
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
4156
4204
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -4927,7 +4975,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4927
4975
|
const { theme } = useUi();
|
|
4928
4976
|
const { textSecondary } = theme.colors;
|
|
4929
4977
|
const options = useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
4930
|
-
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [
|
|
4978
|
+
const renderCode = useCallback((option) => /* @__PURE__ */ jsx(Text, { style: [styles29.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
4931
4979
|
return /* @__PURE__ */ jsx(
|
|
4932
4980
|
SearchSelect,
|
|
4933
4981
|
{
|
|
@@ -4945,7 +4993,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
4945
4993
|
}
|
|
4946
4994
|
);
|
|
4947
4995
|
}
|
|
4948
|
-
var
|
|
4996
|
+
var styles29 = StyleSheet.create({
|
|
4949
4997
|
code: { fontSize: CODE_FONT }
|
|
4950
4998
|
});
|
|
4951
4999
|
function useBlurVerdict(validate) {
|
|
@@ -5201,9 +5249,9 @@ var LINE_GAP = 4;
|
|
|
5201
5249
|
function RejectionLine({ message, testID }) {
|
|
5202
5250
|
const { theme } = useUi();
|
|
5203
5251
|
if (message === null) return null;
|
|
5204
|
-
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [
|
|
5252
|
+
return /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: [styles30.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
5205
5253
|
}
|
|
5206
|
-
var
|
|
5254
|
+
var styles30 = StyleSheet.create({
|
|
5207
5255
|
line: { marginTop: LINE_GAP }
|
|
5208
5256
|
});
|
|
5209
5257
|
|
|
@@ -5350,7 +5398,7 @@ var PAD_V = 10;
|
|
|
5350
5398
|
var PAD_H = 16;
|
|
5351
5399
|
var TEXT_SIZE2 = 13;
|
|
5352
5400
|
var TEXT_LINE2 = 18;
|
|
5353
|
-
var
|
|
5401
|
+
var styles31 = StyleSheet.create({
|
|
5354
5402
|
bar: { borderTopWidth: 1, paddingHorizontal: PAD_H, paddingVertical: PAD_V, rowGap: BAR_GAP },
|
|
5355
5403
|
actions: { flexDirection: "row", flexWrap: "wrap", gap: BAR_GAP },
|
|
5356
5404
|
message: { fontSize: TEXT_SIZE2, fontWeight: "700", lineHeight: TEXT_LINE2 }
|
|
@@ -5362,9 +5410,9 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5362
5410
|
const { colors } = theme;
|
|
5363
5411
|
const pinned = actionBarPosition(sticky, Platform.OS) === "sticky" ? PINNED : null;
|
|
5364
5412
|
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:
|
|
5413
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles31.bar, { backgroundColor: colors.surface, borderTopColor: colors.border }, pinned, style], testID, children: [
|
|
5414
|
+
hasMessage ? /* @__PURE__ */ jsx(Text, { role: "status", style: [styles31.message, { color: colors.text }], testID: `${testID}-message`, children: message }) : null,
|
|
5415
|
+
/* @__PURE__ */ jsx(View, { style: styles31.actions, children })
|
|
5368
5416
|
] });
|
|
5369
5417
|
};
|
|
5370
5418
|
|
|
@@ -5372,14 +5420,14 @@ var ActionBar = ({ children, message, sticky = false, testID, style }) => {
|
|
|
5372
5420
|
var isChecklistComplete = (items, checked) => items.every((item) => checked.includes(item.id));
|
|
5373
5421
|
var TITLE_SIZE = 13;
|
|
5374
5422
|
var TITLE_GAP = 6;
|
|
5375
|
-
var
|
|
5423
|
+
var styles32 = StyleSheet.create({
|
|
5376
5424
|
title: { fontSize: TITLE_SIZE, fontWeight: "700", marginBottom: TITLE_GAP }
|
|
5377
5425
|
});
|
|
5378
5426
|
var GatedChecklist = ({ title, items, checked, onToggle, testID, disabled = false, children }) => {
|
|
5379
5427
|
const { theme } = useUi();
|
|
5380
5428
|
const complete = isChecklistComplete(items, checked);
|
|
5381
5429
|
return /* @__PURE__ */ jsxs(View, { testID, children: [
|
|
5382
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
5430
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles32.title, { color: theme.colors.text }], children: title }),
|
|
5383
5431
|
items.map((item) => /* @__PURE__ */ jsx(
|
|
5384
5432
|
FormCheckbox,
|
|
5385
5433
|
{
|
|
@@ -5405,7 +5453,7 @@ var RADIUS2 = 8;
|
|
|
5405
5453
|
var LABEL_SIZE = 14;
|
|
5406
5454
|
var DESCRIPTION_SIZE = 12;
|
|
5407
5455
|
var DESCRIPTION_LINE = 16;
|
|
5408
|
-
var
|
|
5456
|
+
var styles33 = StyleSheet.create({
|
|
5409
5457
|
row: {
|
|
5410
5458
|
alignItems: "center",
|
|
5411
5459
|
borderRadius: RADIUS2,
|
|
@@ -5436,15 +5484,15 @@ function RadioRow({ option, identity, colors, tabIndex, hostRef, onPress }) {
|
|
|
5436
5484
|
accessibilityState: identity.accessibilityState,
|
|
5437
5485
|
"aria-checked": checked,
|
|
5438
5486
|
disabled,
|
|
5439
|
-
style: [
|
|
5487
|
+
style: [styles33.row, { borderColor: accent, backgroundColor: checked ? colors.tint : colors.muted }],
|
|
5440
5488
|
tabIndex,
|
|
5441
5489
|
testID: identity.testID,
|
|
5442
5490
|
onPress,
|
|
5443
5491
|
children: [
|
|
5444
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
5445
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5446
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5447
|
-
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [
|
|
5492
|
+
/* @__PURE__ */ jsx(View, { style: [styles33.dot, { borderColor: accent }], children: checked ? /* @__PURE__ */ jsx(View, { style: [styles33.dotInner, { backgroundColor: colors.primary }] }) : null }),
|
|
5493
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.text, children: [
|
|
5494
|
+
/* @__PURE__ */ jsx(Text, { style: [styles33.label, { color: checked ? colors.primary : colors.textStrong }], children: option.label }),
|
|
5495
|
+
hasDescription ? /* @__PURE__ */ jsx(Text, { style: [styles33.description, { color: colors.textMuted }], testID: `${identity.testID}-description`, children: option.description }) : null
|
|
5448
5496
|
] })
|
|
5449
5497
|
]
|
|
5450
5498
|
}
|
|
@@ -5461,7 +5509,7 @@ var radioRowIdentity = (option, selected, disabled, prefix) => {
|
|
|
5461
5509
|
};
|
|
5462
5510
|
};
|
|
5463
5511
|
var ROW_GAP7 = 8;
|
|
5464
|
-
var
|
|
5512
|
+
var styles34 = StyleSheet.create({
|
|
5465
5513
|
list: { rowGap: ROW_GAP7 }
|
|
5466
5514
|
});
|
|
5467
5515
|
function RadioList(props) {
|
|
@@ -5474,7 +5522,7 @@ function RadioList(props) {
|
|
|
5474
5522
|
View,
|
|
5475
5523
|
{
|
|
5476
5524
|
accessibilityRole: "radiogroup",
|
|
5477
|
-
style:
|
|
5525
|
+
style: styles34.list,
|
|
5478
5526
|
...webFieldA11y({ describedById, hasError }),
|
|
5479
5527
|
...radio.groupProps,
|
|
5480
5528
|
children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
@@ -5528,11 +5576,11 @@ function DecisionNote({ state, labels, testID, disabled }) {
|
|
|
5528
5576
|
);
|
|
5529
5577
|
}
|
|
5530
5578
|
var BUTTON_BASIS = "40%";
|
|
5531
|
-
var
|
|
5579
|
+
var styles35 = StyleSheet.create({
|
|
5532
5580
|
cell: { flexBasis: BUTTON_BASIS, flexGrow: 1 }
|
|
5533
5581
|
});
|
|
5534
5582
|
function OutcomeButtons({ outcomes, pending, disabled, testID, onPress }) {
|
|
5535
|
-
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style:
|
|
5583
|
+
return /* @__PURE__ */ jsx(Fragment, { children: outcomes.map((item) => /* @__PURE__ */ jsx(View, { style: styles35.cell, children: /* @__PURE__ */ jsx(
|
|
5536
5584
|
Button,
|
|
5537
5585
|
{
|
|
5538
5586
|
fullWidth: true,
|
|
@@ -5613,12 +5661,12 @@ function StickyBarDecision(props) {
|
|
|
5613
5661
|
}
|
|
5614
5662
|
var TEXT_SIZE3 = 13;
|
|
5615
5663
|
var TEXT_LINE3 = 18;
|
|
5616
|
-
var
|
|
5664
|
+
var styles36 = StyleSheet.create({
|
|
5617
5665
|
text: { fontSize: TEXT_SIZE3, fontWeight: "700", lineHeight: TEXT_LINE3 }
|
|
5618
5666
|
});
|
|
5619
5667
|
var SubmitError = ({ message, testID }) => {
|
|
5620
5668
|
const { theme } = useUi();
|
|
5621
|
-
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [
|
|
5669
|
+
return /* @__PURE__ */ jsx(Text, { role: "alert", style: [styles36.text, { color: fieldErrorInk(theme) }], testID, children: message });
|
|
5622
5670
|
};
|
|
5623
5671
|
var toggle = (list, id) => list.includes(id) ? list.filter((item) => item !== id) : [...list, id];
|
|
5624
5672
|
function useDecisionPanel(outcomes, onSubmit) {
|
|
@@ -5661,7 +5709,7 @@ function useDecisionPanel(outcomes, onSubmit) {
|
|
|
5661
5709
|
}
|
|
5662
5710
|
var TITLE_SIZE2 = 15;
|
|
5663
5711
|
var PANEL_GAP = 12;
|
|
5664
|
-
var
|
|
5712
|
+
var styles37 = StyleSheet.create({
|
|
5665
5713
|
panel: { rowGap: PANEL_GAP },
|
|
5666
5714
|
title: { fontSize: TITLE_SIZE2, fontWeight: "700" }
|
|
5667
5715
|
});
|
|
@@ -5675,13 +5723,13 @@ function DecisionPanel(props) {
|
|
|
5675
5723
|
const { theme } = useUi();
|
|
5676
5724
|
const state = useDecisionPanel(outcomes, onSubmit);
|
|
5677
5725
|
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: [
|
|
5726
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles37.panel, style], testID, children: [
|
|
5727
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles37.title, { color: theme.colors.text }], children: labels.title }),
|
|
5680
5728
|
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
5729
|
state.error === "submit" ? /* @__PURE__ */ jsx(SubmitError, { message: labels.submitError, testID: `${testID}-error` }) : null
|
|
5682
5730
|
] });
|
|
5683
5731
|
}
|
|
5684
5732
|
|
|
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 };
|
|
5733
|
+
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
5734
|
//# sourceMappingURL=index.mjs.map
|
|
5687
5735
|
//# sourceMappingURL=index.mjs.map
|