@dloizides/ui-forms 1.38.0 → 1.39.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/CHANGELOG.md +537 -536
- package/dist/index.d.mts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +215 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,7 +365,142 @@ var InlineFieldRow = ({
|
|
|
365
365
|
/* @__PURE__ */ jsxRuntime.jsx(AlignToControl, { style: styles4.action, children: action })
|
|
366
366
|
] });
|
|
367
367
|
};
|
|
368
|
+
|
|
369
|
+
// src/LineItems/utils/lineItemsLayout.ts
|
|
370
|
+
var LINE_ITEMS_WIDE_MIN_WIDTH = 1280;
|
|
371
|
+
var LINE_ITEMS_DEFAULT_MIN_ITEMS = 1;
|
|
372
|
+
var LINE_ITEMS_CARD_PADDING = 12;
|
|
373
|
+
var LINE_ITEMS_CARD_BORDER = 1;
|
|
374
|
+
var DEFAULT_COLUMN_FLEX = 1;
|
|
375
|
+
function isLineItemsWide(width, wideMinWidth = LINE_ITEMS_WIDE_MIN_WIDTH) {
|
|
376
|
+
return width >= wideMinWidth;
|
|
377
|
+
}
|
|
378
|
+
function canRemoveLine(count, minItems = LINE_ITEMS_DEFAULT_MIN_ITEMS) {
|
|
379
|
+
return count > minItems;
|
|
380
|
+
}
|
|
381
|
+
function lineNumberOf(index) {
|
|
382
|
+
return index + 1;
|
|
383
|
+
}
|
|
384
|
+
function lineItemColumnFlex(column) {
|
|
385
|
+
return column.flex ?? DEFAULT_COLUMN_FLEX;
|
|
386
|
+
}
|
|
387
|
+
var CARD_RADIUS = 8;
|
|
388
|
+
var HEADER_GAP = 8;
|
|
368
389
|
var styles5 = reactNative.StyleSheet.create({
|
|
390
|
+
card: {
|
|
391
|
+
borderRadius: CARD_RADIUS,
|
|
392
|
+
borderWidth: LINE_ITEMS_CARD_BORDER,
|
|
393
|
+
gap: FORM_GRID_DEFAULT_GAP,
|
|
394
|
+
padding: LINE_ITEMS_CARD_PADDING
|
|
395
|
+
},
|
|
396
|
+
header: { alignItems: "center", columnGap: HEADER_GAP, flexDirection: "row", flexWrap: "wrap", rowGap: HEADER_GAP },
|
|
397
|
+
spacer: { flexGrow: 1 }
|
|
398
|
+
});
|
|
399
|
+
var LineItemCard = ({ title, header, removeAction, children, testID }) => {
|
|
400
|
+
const { theme } = uiFeedback.useUi();
|
|
401
|
+
const { colors } = theme;
|
|
402
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
403
|
+
reactNative.View,
|
|
404
|
+
{
|
|
405
|
+
"aria-label": title,
|
|
406
|
+
role: "group",
|
|
407
|
+
style: [styles5.card, { backgroundColor: colors.surface, borderColor: colors.border }],
|
|
408
|
+
testID,
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles5.header, children: [
|
|
411
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [resolveLabelVariantStyle(), { color: colors.text }], testID: `${testID}-title`, children: title }),
|
|
412
|
+
header,
|
|
413
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles5.spacer }),
|
|
414
|
+
removeAction
|
|
415
|
+
] }),
|
|
416
|
+
children
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
};
|
|
421
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
422
|
+
cell: { flexBasis: 0, flexShrink: 1, minWidth: 0 },
|
|
423
|
+
row: {
|
|
424
|
+
flexDirection: "row",
|
|
425
|
+
gap: FORM_GRID_DEFAULT_GAP,
|
|
426
|
+
paddingHorizontal: LINE_ITEMS_CARD_PADDING + LINE_ITEMS_CARD_BORDER
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
var LineItemsColumnHeaders = ({ columns, testID }) => {
|
|
430
|
+
const { theme } = uiFeedback.useUi();
|
|
431
|
+
const labelStyle = [resolveLabelVariantStyle(), { color: theme.colors.textSecondary }];
|
|
432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.row, testID, children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles6.cell, { flexGrow: lineItemColumnFlex(column) }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: labelStyle, children: column.label }) }, column.key)) });
|
|
433
|
+
};
|
|
434
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
435
|
+
add: { alignSelf: "flex-start" },
|
|
436
|
+
cell: { flexBasis: 0, flexShrink: 1, minWidth: 0 },
|
|
437
|
+
list: { gap: FORM_GRID_DEFAULT_GAP },
|
|
438
|
+
wideRow: { alignItems: "flex-start", flexDirection: "row", gap: FORM_GRID_DEFAULT_GAP }
|
|
439
|
+
});
|
|
440
|
+
function LineItems({
|
|
441
|
+
items,
|
|
442
|
+
getKey,
|
|
443
|
+
columns,
|
|
444
|
+
renderCell,
|
|
445
|
+
lineLabel,
|
|
446
|
+
labels,
|
|
447
|
+
testID,
|
|
448
|
+
renderLineHeader,
|
|
449
|
+
onAdd,
|
|
450
|
+
onRemove,
|
|
451
|
+
minItems,
|
|
452
|
+
wideMinWidth
|
|
453
|
+
}) {
|
|
454
|
+
const { width } = reactNative.useWindowDimensions();
|
|
455
|
+
const wide = isLineItemsWide(width, wideMinWidth);
|
|
456
|
+
const removable = onRemove !== void 0 && canRemoveLine(items.length, minItems);
|
|
457
|
+
const renderCells = (item, index) => {
|
|
458
|
+
if (wide)
|
|
459
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles7.wideRow, children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles7.cell, { flexGrow: lineItemColumnFlex(column) }], children: renderCell({ item, index, columnKey: column.key, wide }) }, column.key)) }) });
|
|
460
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormGrid, { children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(FormCell, { children: renderCell({ item, index, columnKey: column.key, wide }) }, column.key)) });
|
|
461
|
+
};
|
|
462
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles7.list, testID, children: [
|
|
463
|
+
wide ? /* @__PURE__ */ jsxRuntime.jsx(LineItemsColumnHeaders, { columns, testID: `${testID}-columns` }) : null,
|
|
464
|
+
items.map((item, index) => {
|
|
465
|
+
const lineNumber = lineNumberOf(index);
|
|
466
|
+
const lineTestID = `${testID}-line-${String(lineNumber)}`;
|
|
467
|
+
const removeAction = removable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
468
|
+
uiButtons.Button,
|
|
469
|
+
{
|
|
470
|
+
accessibilityHint: labels.removeHint,
|
|
471
|
+
accessibilityLabel: labels.remove(lineNumber),
|
|
472
|
+
label: labels.remove(lineNumber),
|
|
473
|
+
testID: `${lineTestID}-remove`,
|
|
474
|
+
variant: "ghost",
|
|
475
|
+
onPress: () => onRemove(index)
|
|
476
|
+
}
|
|
477
|
+
) : void 0;
|
|
478
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
+
LineItemCard,
|
|
480
|
+
{
|
|
481
|
+
header: renderLineHeader?.(item, index),
|
|
482
|
+
removeAction,
|
|
483
|
+
testID: lineTestID,
|
|
484
|
+
title: lineLabel(lineNumber),
|
|
485
|
+
children: renderCells(item, index)
|
|
486
|
+
},
|
|
487
|
+
getKey(item, index)
|
|
488
|
+
);
|
|
489
|
+
}),
|
|
490
|
+
onAdd !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles7.add, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
|
+
uiButtons.Button,
|
|
492
|
+
{
|
|
493
|
+
accessibilityHint: labels.addHint,
|
|
494
|
+
accessibilityLabel: labels.add,
|
|
495
|
+
label: labels.add,
|
|
496
|
+
testID: `${testID}-add`,
|
|
497
|
+
variant: "secondary",
|
|
498
|
+
onPress: onAdd
|
|
499
|
+
}
|
|
500
|
+
) }) : null
|
|
501
|
+
] });
|
|
502
|
+
}
|
|
503
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
369
504
|
stack: { flexDirection: "column" }
|
|
370
505
|
});
|
|
371
506
|
var FormStack = ({
|
|
@@ -373,7 +508,7 @@ var FormStack = ({
|
|
|
373
508
|
gap = FORM_GRID_DEFAULT_GAP,
|
|
374
509
|
style,
|
|
375
510
|
testID
|
|
376
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
511
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles8.stack, { gap }, style], testID, children }) });
|
|
377
512
|
|
|
378
513
|
// src/ResponsiveFormLayout/isWideFormLayout.ts
|
|
379
514
|
var RESPONSIVE_FORM_DEFAULT_BREAKPOINT = 768;
|
|
@@ -390,7 +525,7 @@ function ResponsiveFormLayout({
|
|
|
390
525
|
}
|
|
391
526
|
var SECTION_GAP = 10;
|
|
392
527
|
var DESCRIPTION_FONT_SIZE = 12;
|
|
393
|
-
var
|
|
528
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
394
529
|
section: {
|
|
395
530
|
gap: SECTION_GAP
|
|
396
531
|
},
|
|
@@ -425,7 +560,7 @@ var FormSection = ({
|
|
|
425
560
|
// The section spaces its children with `gap`, so it owns their vertical rhythm exactly as a
|
|
426
561
|
// `FormGrid` owns a row's — without this a `Field` placed directly in a section would stack its
|
|
427
562
|
// 16px margin on the section's gap and recreate the F3 bug one level up.
|
|
428
|
-
/* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "group", style: [
|
|
563
|
+
/* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "group", style: [styles9.section, style], testID, ...a11y, children: [
|
|
429
564
|
hasTitle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
430
565
|
reactNative.Text,
|
|
431
566
|
{
|
|
@@ -434,13 +569,13 @@ var FormSection = ({
|
|
|
434
569
|
children: title
|
|
435
570
|
}
|
|
436
571
|
) : null,
|
|
437
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
572
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.description, { color: colors.textSecondary }], children: description }) : null,
|
|
438
573
|
children
|
|
439
574
|
] }) })
|
|
440
575
|
);
|
|
441
576
|
};
|
|
442
577
|
var ACTIONS_GAP = 12;
|
|
443
|
-
var
|
|
578
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
444
579
|
container: {
|
|
445
580
|
flexDirection: "row",
|
|
446
581
|
justifyContent: "flex-end",
|
|
@@ -460,7 +595,7 @@ var FormActions = ({
|
|
|
460
595
|
saveTestID = "save-button",
|
|
461
596
|
cancelTestID = "cancel-button",
|
|
462
597
|
testID
|
|
463
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
598
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles10.container, containerStyle], testID, children: [
|
|
464
599
|
typeof onCancel === "function" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
465
600
|
uiButtons.Button,
|
|
466
601
|
{
|
|
@@ -581,7 +716,7 @@ var DETAIL_FONT = 12;
|
|
|
581
716
|
var DETAIL_GAP = 12;
|
|
582
717
|
var STACK_GAP = 2;
|
|
583
718
|
var DETAIL_BESIDE_MIN_MENU_WIDTH = 400;
|
|
584
|
-
var
|
|
719
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
585
720
|
beside: { alignItems: "baseline", flexDirection: "row", gap: DETAIL_GAP, justifyContent: "space-between" },
|
|
586
721
|
stacked: { gap: STACK_GAP },
|
|
587
722
|
shrink: { flexShrink: 1 },
|
|
@@ -616,9 +751,9 @@ function OptionRow({ option, isActive, isHighlighted, isListboxRow, menuWidth, h
|
|
|
616
751
|
onPress: () => onSelect(option.value),
|
|
617
752
|
style: [controlStyles.option, isHighlighted ? { backgroundColor: colors.text } : null],
|
|
618
753
|
testID: `${testID}-option-${option.value}`,
|
|
619
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ?
|
|
620
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText,
|
|
621
|
-
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
754
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ? styles11.beside : styles11.stacked, children: [
|
|
755
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText, styles11.shrink, { color: ink.title, fontWeight: isBold ? ACTIVE_WEIGHT : IDLE_WEIGHT }], children: option.label }),
|
|
756
|
+
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.detail, { color: ink.detail }], children: option.detail }) : null
|
|
622
757
|
] })
|
|
623
758
|
}
|
|
624
759
|
);
|
|
@@ -1440,7 +1575,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1440
1575
|
ariaChecked: isRadio ? selected : void 0
|
|
1441
1576
|
};
|
|
1442
1577
|
}
|
|
1443
|
-
var
|
|
1578
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
1444
1579
|
chipContainer: {
|
|
1445
1580
|
flexDirection: "row",
|
|
1446
1581
|
flexWrap: "wrap",
|
|
@@ -1526,7 +1661,7 @@ var ChipSelector = ({
|
|
|
1526
1661
|
reactNative.View,
|
|
1527
1662
|
{
|
|
1528
1663
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1529
|
-
style:
|
|
1664
|
+
style: styles12.chipContainer,
|
|
1530
1665
|
...webFieldA11y({ describedById, hasError }),
|
|
1531
1666
|
...radio.groupProps,
|
|
1532
1667
|
children: options.map(renderChip)
|
|
@@ -1536,7 +1671,7 @@ var ChipSelector = ({
|
|
|
1536
1671
|
);
|
|
1537
1672
|
};
|
|
1538
1673
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1539
|
-
var
|
|
1674
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
1540
1675
|
container: {
|
|
1541
1676
|
flexDirection: "row",
|
|
1542
1677
|
justifyContent: "space-between",
|
|
@@ -1597,15 +1732,15 @@ var FormSwitch = ({
|
|
|
1597
1732
|
accessible: false,
|
|
1598
1733
|
disabled,
|
|
1599
1734
|
onPress: toggle,
|
|
1600
|
-
style: [
|
|
1735
|
+
style: [styles13.container, containerStyle],
|
|
1601
1736
|
tabIndex: -1,
|
|
1602
1737
|
testID: `${testID}-row`,
|
|
1603
1738
|
children: [
|
|
1604
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1605
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1606
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1739
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.textColumn, children: [
|
|
1740
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.label, themeStyles.label], children: label }),
|
|
1741
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.description, themeStyles.description], children: description }) : null
|
|
1607
1742
|
] }),
|
|
1608
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style:
|
|
1743
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles13.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1609
1744
|
reactNative.Switch,
|
|
1610
1745
|
{
|
|
1611
1746
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1634,7 +1769,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1634
1769
|
var FOCUS_RING_WIDTH = 2;
|
|
1635
1770
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1636
1771
|
var FOCUS_RING_INSET = -6;
|
|
1637
|
-
var
|
|
1772
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1638
1773
|
container: {
|
|
1639
1774
|
flexDirection: "row",
|
|
1640
1775
|
alignItems: "flex-start",
|
|
@@ -1739,8 +1874,8 @@ var FormCheckbox = ({
|
|
|
1739
1874
|
onPress: toggle,
|
|
1740
1875
|
role: "checkbox",
|
|
1741
1876
|
style: [
|
|
1742
|
-
|
|
1743
|
-
hasHint ? null :
|
|
1877
|
+
styles14.container,
|
|
1878
|
+
hasHint ? null : styles14.centered,
|
|
1744
1879
|
containerStyle,
|
|
1745
1880
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1746
1881
|
reactNative.Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1748,13 +1883,13 @@ var FormCheckbox = ({
|
|
|
1748
1883
|
testID,
|
|
1749
1884
|
...keyboardProps,
|
|
1750
1885
|
children: [
|
|
1751
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1752
|
-
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [
|
|
1753
|
-
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1886
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles14.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1887
|
+
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [styles14.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1888
|
+
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.check, { color: colors.surface }], accessibilityElementsHidden: true, children: "\u2713" }) : null
|
|
1754
1889
|
] }),
|
|
1755
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1756
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1757
|
-
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [
|
|
1890
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.textColumn, children: [
|
|
1891
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.label, themeStyles.label], children: label }),
|
|
1892
|
+
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [styles14.hint, themeStyles.hint], children: hintText }) : null
|
|
1758
1893
|
] })
|
|
1759
1894
|
]
|
|
1760
1895
|
}
|
|
@@ -2304,7 +2439,7 @@ var ROW_GAP = 4;
|
|
|
2304
2439
|
var TAB_PADDING = 4;
|
|
2305
2440
|
var INDICATOR_WIDTH = 2;
|
|
2306
2441
|
var TAB_FONT_SIZE = 12;
|
|
2307
|
-
var
|
|
2442
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
2308
2443
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
2309
2444
|
tab: {
|
|
2310
2445
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -2344,13 +2479,13 @@ var StepperTab = ({
|
|
|
2344
2479
|
accessibilityRole: "tab",
|
|
2345
2480
|
accessibilityState: { selected },
|
|
2346
2481
|
"aria-selected": selected,
|
|
2347
|
-
style: [
|
|
2482
|
+
style: [styles15.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
2348
2483
|
testID,
|
|
2349
2484
|
onBlur: ring.onBlur,
|
|
2350
2485
|
onFocus: ring.onFocus,
|
|
2351
2486
|
onPress: () => onStep(step.key),
|
|
2352
2487
|
...webKeyProps,
|
|
2353
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2488
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.text, { color: theme.colors.text }, selected ? styles15.textSelected : void 0], children: step.label })
|
|
2354
2489
|
}
|
|
2355
2490
|
);
|
|
2356
2491
|
};
|
|
@@ -2360,7 +2495,7 @@ var StepperTabs = ({
|
|
|
2360
2495
|
onStep,
|
|
2361
2496
|
stepHint,
|
|
2362
2497
|
testID
|
|
2363
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style:
|
|
2498
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style: styles15.row, testID, children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2364
2499
|
StepperTab,
|
|
2365
2500
|
{
|
|
2366
2501
|
hint: stepHint,
|
|
@@ -2379,7 +2514,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
2379
2514
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
2380
2515
|
}
|
|
2381
2516
|
var ROW_GAP2 = 8;
|
|
2382
|
-
var
|
|
2517
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
2383
2518
|
cell: { flex: 1, minWidth: 0 },
|
|
2384
2519
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
2385
2520
|
});
|
|
@@ -2391,8 +2526,8 @@ var StepperNav = ({
|
|
|
2391
2526
|
testID
|
|
2392
2527
|
}) => {
|
|
2393
2528
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
2394
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2395
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2529
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.row, testID, children: [
|
|
2530
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2396
2531
|
uiButtons.Button,
|
|
2397
2532
|
{
|
|
2398
2533
|
fullWidth: true,
|
|
@@ -2408,7 +2543,7 @@ var StepperNav = ({
|
|
|
2408
2543
|
}
|
|
2409
2544
|
}
|
|
2410
2545
|
) }),
|
|
2411
|
-
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2546
|
+
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2412
2547
|
uiButtons.Button,
|
|
2413
2548
|
{
|
|
2414
2549
|
fullWidth: true,
|
|
@@ -2423,13 +2558,13 @@ var StepperNav = ({
|
|
|
2423
2558
|
] });
|
|
2424
2559
|
};
|
|
2425
2560
|
var STATUS_FONT = 16;
|
|
2426
|
-
var
|
|
2561
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
2427
2562
|
line: { fontSize: STATUS_FONT }
|
|
2428
2563
|
});
|
|
2429
2564
|
function FormStatusLine({ message, testID, style }) {
|
|
2430
2565
|
const { theme } = uiFeedback.useUi();
|
|
2431
2566
|
if (message === null || message === void 0 || message === "") return null;
|
|
2432
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
2567
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles17.line, { color: theme.colors.text }, style], testID, children: message });
|
|
2433
2568
|
}
|
|
2434
2569
|
function useFocusFirstInvalid(refs) {
|
|
2435
2570
|
const latest = React2.useRef(refs);
|
|
@@ -2456,7 +2591,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
2456
2591
|
var GAP = 8;
|
|
2457
2592
|
var TITLE_FONT_SIZE = 14;
|
|
2458
2593
|
var HELP_FONT_SIZE = 13;
|
|
2459
|
-
var
|
|
2594
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
2460
2595
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
2461
2596
|
root: { gap: GAP },
|
|
2462
2597
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP },
|
|
@@ -2478,11 +2613,11 @@ var UploadWithLinkField = ({
|
|
|
2478
2613
|
const url = value ?? "";
|
|
2479
2614
|
const [pasting, setPasting] = React2.useState(url !== "");
|
|
2480
2615
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
2481
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2482
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2483
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.root, children: [
|
|
2617
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.title, { color: theme.colors.text }], children: labels.title }),
|
|
2618
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.tile, children: [
|
|
2484
2619
|
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` }),
|
|
2485
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2620
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.help, { color: theme.colors.text }], children: labels.help })
|
|
2486
2621
|
] }),
|
|
2487
2622
|
uploadControl,
|
|
2488
2623
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2493,12 +2628,12 @@ var UploadWithLinkField = ({
|
|
|
2493
2628
|
accessibilityRole: "button",
|
|
2494
2629
|
accessibilityState: { expanded: pasting },
|
|
2495
2630
|
"aria-expanded": pasting,
|
|
2496
|
-
style: [
|
|
2631
|
+
style: [styles18.toggle, ring.ringStyle],
|
|
2497
2632
|
testID: `${testID}-paste`,
|
|
2498
2633
|
onBlur: ring.onBlur,
|
|
2499
2634
|
onFocus: ring.onFocus,
|
|
2500
2635
|
onPress: () => setPasting(!pasting),
|
|
2501
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2636
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
2502
2637
|
}
|
|
2503
2638
|
),
|
|
2504
2639
|
pasting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2517,7 +2652,7 @@ var UploadWithLinkField = ({
|
|
|
2517
2652
|
};
|
|
2518
2653
|
var ACTION_GAP = 8;
|
|
2519
2654
|
var GROUP_GAP = 16;
|
|
2520
|
-
var
|
|
2655
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
2521
2656
|
action: { alignItems: "flex-start", marginTop: ACTION_GAP },
|
|
2522
2657
|
group: { marginBottom: GROUP_GAP }
|
|
2523
2658
|
});
|
|
@@ -2540,7 +2675,7 @@ var AddOnRequest = ({
|
|
|
2540
2675
|
onRemove();
|
|
2541
2676
|
};
|
|
2542
2677
|
if (!isAddOnOpen(hasValue, requested))
|
|
2543
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2678
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.action, style], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
2679
|
uiButtons.Button,
|
|
2545
2680
|
{
|
|
2546
2681
|
accessibilityHint: addHint,
|
|
@@ -2552,9 +2687,9 @@ var AddOnRequest = ({
|
|
|
2552
2687
|
onPress: () => setRequested(true)
|
|
2553
2688
|
}
|
|
2554
2689
|
) });
|
|
2555
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2690
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.group, style], testID, children: [
|
|
2556
2691
|
children,
|
|
2557
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2692
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.action, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2558
2693
|
uiButtons.Button,
|
|
2559
2694
|
{
|
|
2560
2695
|
accessibilityHint: removeHint,
|
|
@@ -2571,7 +2706,7 @@ var AddOnRequest = ({
|
|
|
2571
2706
|
var ROW_GAP3 = 8;
|
|
2572
2707
|
var TEXT_SIZE = 13;
|
|
2573
2708
|
var TEXT_LINE = 18;
|
|
2574
|
-
var
|
|
2709
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
2575
2710
|
row: { alignItems: "center", columnGap: ROW_GAP3, flexDirection: "row", justifyContent: "space-between" },
|
|
2576
2711
|
text: { flexShrink: 1, fontSize: TEXT_SIZE, fontWeight: "700", lineHeight: TEXT_LINE }
|
|
2577
2712
|
});
|
|
@@ -2579,8 +2714,8 @@ var isFixBarVisible = (count) => count > 0;
|
|
|
2579
2714
|
var FixBar = ({ count, message, showLabel, showHint, onShow, testID, style }) => {
|
|
2580
2715
|
const { theme } = uiFeedback.useUi();
|
|
2581
2716
|
if (!isFixBarVisible(count)) return null;
|
|
2582
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2583
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
2717
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.row, style], testID, children: [
|
|
2718
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles20.text, { color: fieldErrorInk(theme) }], testID: `${testID}-count`, children: message }),
|
|
2584
2719
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2585
2720
|
uiButtons.Button,
|
|
2586
2721
|
{
|
|
@@ -2644,10 +2779,10 @@ function DropdownSurface({ progress, translateY, anchorRef, onDismiss, closeLabe
|
|
|
2644
2779
|
const place = frame === null ? null : { left: frame.left, width: frame.width, top: frame.top, bottom: frame.bottom };
|
|
2645
2780
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Modal, { transparent: true, visible: true, animationType: "none", onRequestClose: onDismiss, children: [
|
|
2646
2781
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2647
|
-
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [
|
|
2782
|
+
frame !== null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles21.dropdown, place, { opacity: progress, transform: [{ translateY }] }], testID: `${testID}-dropdown-${frame.placement}`, onLayout, children }) : null
|
|
2648
2783
|
] });
|
|
2649
2784
|
}
|
|
2650
|
-
var
|
|
2785
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
2651
2786
|
dropdown: { position: "absolute" }
|
|
2652
2787
|
});
|
|
2653
2788
|
var ROW_PAD_H = 12;
|
|
@@ -2667,21 +2802,21 @@ function OptionRow2({ option, active, current, renderLeading, renderDetail, onPi
|
|
|
2667
2802
|
accessibilityLabel: option.label,
|
|
2668
2803
|
accessibilityRole: "button",
|
|
2669
2804
|
accessibilityState: { selected: active, checked: current },
|
|
2670
|
-
style: [
|
|
2805
|
+
style: [styles22.row, active ? { backgroundColor: colors.surface } : null],
|
|
2671
2806
|
testID: `${testID}-option-${option.value}`,
|
|
2672
2807
|
onPress: () => onPick(option),
|
|
2673
2808
|
children: [
|
|
2674
2809
|
renderLeading?.(option),
|
|
2675
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2676
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2677
|
-
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2810
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.label, children: [
|
|
2811
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.primary, { color: colors.text }], children: option.label }),
|
|
2812
|
+
detailBelow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.secondary, { color: colors.textSecondary }], children: option.detail }) : null
|
|
2678
2813
|
] }),
|
|
2679
2814
|
renderDetail?.(option)
|
|
2680
2815
|
]
|
|
2681
2816
|
}
|
|
2682
2817
|
);
|
|
2683
2818
|
}
|
|
2684
|
-
var
|
|
2819
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
2685
2820
|
row: { minHeight: a11y.MIN_TOUCH_TARGET_PX, flexDirection: "row", alignItems: "center", gap: ROW_GAP4, paddingHorizontal: ROW_PAD_H },
|
|
2686
2821
|
label: { flex: 1 },
|
|
2687
2822
|
primary: { fontSize: OPTION_FONT2, flexShrink: 1 },
|
|
@@ -2695,20 +2830,20 @@ function OptionSection({ title, options, offset, highlight, selectedValue, ...ro
|
|
|
2695
2830
|
const { colors } = theme;
|
|
2696
2831
|
if (options.length === 0) return null;
|
|
2697
2832
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
2698
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [
|
|
2833
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles23.header, { color: colors.textSecondary }], children: title }),
|
|
2699
2834
|
options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(OptionRow2, { ...row, active: offset + index === highlight, current: option.value === selectedValue, option }, option.value))
|
|
2700
2835
|
] });
|
|
2701
2836
|
}
|
|
2702
|
-
var
|
|
2837
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
2703
2838
|
header: { fontSize: HEADER_FONT, paddingHorizontal: ROW_PAD_H2, paddingTop: ROW_GAP5, textTransform: "uppercase" }
|
|
2704
2839
|
});
|
|
2705
2840
|
function SheetSurface({ translateY, onDismiss, closeLabel, closeHint, testID, children }) {
|
|
2706
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2841
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: true, animationType: "none", onRequestClose: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.backdrop, children: [
|
|
2707
2842
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint: closeHint, accessibilityLabel: closeLabel, accessibilityRole: "button", style: reactNative.StyleSheet.absoluteFill, testID: `${testID}-backdrop`, onPress: onDismiss }),
|
|
2708
2843
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: { transform: [{ translateY }] }, children })
|
|
2709
2844
|
] }) });
|
|
2710
2845
|
}
|
|
2711
|
-
var
|
|
2846
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
2712
2847
|
backdrop: { flex: 1, justifyContent: "flex-end" }
|
|
2713
2848
|
});
|
|
2714
2849
|
var KEY_ESCAPE = "Escape";
|
|
@@ -2738,7 +2873,7 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
2738
2873
|
const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [motion.fromY, 0] });
|
|
2739
2874
|
const isSheet = motion.surface === "sheet" /* Sheet */;
|
|
2740
2875
|
const shared = { selectedValue, renderLeading, renderDetail, onPick: pick, optionHint: labels.optionHint, testID, highlight };
|
|
2741
|
-
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2876
|
+
const list = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles25.panel, { backgroundColor: colors.surfaceElevated, borderColor: colors.border }], testID: `${testID}-panel`, children: [
|
|
2742
2877
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2743
2878
|
reactNative.TextInput,
|
|
2744
2879
|
{
|
|
@@ -2755,16 +2890,16 @@ function SearchSelectPanel({ motion, state, labels, anchorRef, renderLeading, re
|
|
|
2755
2890
|
onSubmitEditing: submit
|
|
2756
2891
|
}
|
|
2757
2892
|
),
|
|
2758
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ?
|
|
2893
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: isSheet ? styles25.sheetList : styles25.dropList, children: [
|
|
2759
2894
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: 0, options: sections.recent, title: labels.recent }),
|
|
2760
2895
|
/* @__PURE__ */ jsxRuntime.jsx(OptionSection, { ...shared, offset: sections.recent.length, options: sections.all, title: labels.all }),
|
|
2761
|
-
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2896
|
+
sections.flat.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.empty, { color: colors.textSecondary }], children: labels.empty }) : null
|
|
2762
2897
|
] })
|
|
2763
2898
|
] });
|
|
2764
2899
|
if (!isSheet) return /* @__PURE__ */ jsxRuntime.jsx(DropdownSurface, { anchorRef, closeHint: labels.closeHint, closeLabel: labels.close, progress, testID, translateY, onDismiss: dismiss, children: list });
|
|
2765
2900
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetSurface, { closeHint: labels.closeHint, closeLabel: labels.close, testID, translateY, onDismiss: dismiss, children: list });
|
|
2766
2901
|
}
|
|
2767
|
-
var
|
|
2902
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
2768
2903
|
panel: { borderWidth: 1, borderRadius: PANEL_RADIUS, padding: PANEL_PAD, gap: PANEL_PAD },
|
|
2769
2904
|
dropList: { maxHeight: MENU_MAX_HEIGHT },
|
|
2770
2905
|
sheetList: { maxHeight: SHEET_MAX_HEIGHT },
|
|
@@ -2889,7 +3024,7 @@ function SearchSelect(props) {
|
|
|
2889
3024
|
const onTriggerBlur = React2.useCallback(() => {
|
|
2890
3025
|
if (!openRef.current) onBlur?.();
|
|
2891
3026
|
}, [onBlur]);
|
|
2892
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style:
|
|
3027
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: styles26.anchor, children: [
|
|
2893
3028
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2894
3029
|
reactNative.Pressable,
|
|
2895
3030
|
{
|
|
@@ -2898,7 +3033,7 @@ function SearchSelect(props) {
|
|
|
2898
3033
|
accessibilityLabel,
|
|
2899
3034
|
accessibilityRole: "button",
|
|
2900
3035
|
accessibilityState: { expanded: state.open },
|
|
2901
|
-
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] :
|
|
3036
|
+
style: renderTrigger === void 0 ? [controlStyles.selectTrigger, { borderColor: colors.border, backgroundColor: colors.surfaceElevated }] : styles26.customTrigger,
|
|
2902
3037
|
testID,
|
|
2903
3038
|
onBlur: onTriggerBlur,
|
|
2904
3039
|
onPress,
|
|
@@ -2910,7 +3045,7 @@ function SearchSelect(props) {
|
|
|
2910
3045
|
}
|
|
2911
3046
|
function FieldBoxContent({ selected, placeholder, colors, renderLeading, renderDetail }) {
|
|
2912
3047
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2913
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3048
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles26.value, children: [
|
|
2914
3049
|
selected !== null && renderLeading !== void 0 ? renderLeading(selected) : null,
|
|
2915
3050
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [controlStyles.selectTriggerText, { color: selected === null ? colors.textSecondary : colors.text }], children: selected?.label ?? placeholder }),
|
|
2916
3051
|
selected !== null ? /* @__PURE__ */ jsxRuntime.jsx(SelectedDetail, { colors, option: selected, renderDetail }) : null
|
|
@@ -2923,7 +3058,7 @@ function SelectedDetail({ option, colors, renderDetail }) {
|
|
|
2923
3058
|
if (option.detail === void 0) return null;
|
|
2924
3059
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.selectTriggerText, { color: colors.textSecondary }], children: option.detail });
|
|
2925
3060
|
}
|
|
2926
|
-
var
|
|
3061
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
2927
3062
|
anchor: { position: "relative" },
|
|
2928
3063
|
customTrigger: { minHeight: MIN_TOUCH, minWidth: MIN_TOUCH, alignSelf: "flex-start", justifyContent: "center" },
|
|
2929
3064
|
value: { flex: 1, flexDirection: "row", alignItems: "center", gap: VALUE_GAP }
|
|
@@ -3700,7 +3835,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
3700
3835
|
const { theme } = uiFeedback.useUi();
|
|
3701
3836
|
const { textSecondary } = theme.colors;
|
|
3702
3837
|
const options = React2.useMemo(() => countryFieldOptions(countries, noneLabel), [countries, noneLabel]);
|
|
3703
|
-
const renderCode = React2.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3838
|
+
const renderCode = React2.useCallback((option) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.code, { color: textSecondary }], children: option.detail }), [textSecondary]);
|
|
3704
3839
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3705
3840
|
SearchSelect,
|
|
3706
3841
|
{
|
|
@@ -3718,7 +3853,7 @@ function CountryField({ value, onChange, accessibilityLabel, accessibilityHint,
|
|
|
3718
3853
|
}
|
|
3719
3854
|
);
|
|
3720
3855
|
}
|
|
3721
|
-
var
|
|
3856
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
3722
3857
|
code: { fontSize: CODE_FONT }
|
|
3723
3858
|
});
|
|
3724
3859
|
function useBlurVerdict(validate) {
|
|
@@ -3972,9 +4107,9 @@ var LINE_GAP = 4;
|
|
|
3972
4107
|
function RejectionLine({ message, testID }) {
|
|
3973
4108
|
const { theme } = uiFeedback.useUi();
|
|
3974
4109
|
if (message === null) return null;
|
|
3975
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [
|
|
4110
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityLiveRegion: "polite", style: [styles28.line, { color: fieldErrorInk(theme) }], testID: `${testID}-rejection`, children: message });
|
|
3976
4111
|
}
|
|
3977
|
-
var
|
|
4112
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
3978
4113
|
line: { marginTop: LINE_GAP }
|
|
3979
4114
|
});
|
|
3980
4115
|
|
|
@@ -4156,6 +4291,8 @@ exports.INLINE_FIELD_ROW_MIN_WIDTH = INLINE_FIELD_ROW_MIN_WIDTH;
|
|
|
4156
4291
|
exports.IbanInput = IbanInput;
|
|
4157
4292
|
exports.IbanRejection = IbanRejection;
|
|
4158
4293
|
exports.InlineFieldRow = InlineFieldRow;
|
|
4294
|
+
exports.LINE_ITEMS_WIDE_MIN_WIDTH = LINE_ITEMS_WIDE_MIN_WIDTH;
|
|
4295
|
+
exports.LineItems = LineItems;
|
|
4159
4296
|
exports.PHONE_MAX_WIDTH = PHONE_MAX_WIDTH;
|
|
4160
4297
|
exports.RESPONSIVE_FORM_DEFAULT_BREAKPOINT = RESPONSIVE_FORM_DEFAULT_BREAKPOINT;
|
|
4161
4298
|
exports.ResponsiveFormLayout = ResponsiveFormLayout;
|
|
@@ -4169,6 +4306,7 @@ exports.ThemedTextInput = ThemedTextInput;
|
|
|
4169
4306
|
exports.TypeaheadControl = TypeaheadControl;
|
|
4170
4307
|
exports.UploadWithLinkField = UploadWithLinkField;
|
|
4171
4308
|
exports.buildSearchSelectSections = buildSearchSelectSections;
|
|
4309
|
+
exports.canRemoveLine = canRemoveLine;
|
|
4172
4310
|
exports.controlStyles = controlStyles;
|
|
4173
4311
|
exports.countryFieldOptions = countryFieldOptions;
|
|
4174
4312
|
exports.countryFlag = countryFlag;
|
|
@@ -4188,9 +4326,12 @@ exports.inlineFieldRowLayout = inlineFieldRowLayout;
|
|
|
4188
4326
|
exports.isAddOnOpen = isAddOnOpen;
|
|
4189
4327
|
exports.isFallbackFlag = isFallbackFlag;
|
|
4190
4328
|
exports.isFixBarVisible = isFixBarVisible;
|
|
4329
|
+
exports.isLineItemsWide = isLineItemsWide;
|
|
4191
4330
|
exports.isOutside = isOutside;
|
|
4192
4331
|
exports.isUnmatched = isUnmatched;
|
|
4193
4332
|
exports.isWideFormLayout = isWideFormLayout;
|
|
4333
|
+
exports.lineItemColumnFlex = lineItemColumnFlex;
|
|
4334
|
+
exports.lineNumberOf = lineNumberOf;
|
|
4194
4335
|
exports.moveHighlight = moveHighlight;
|
|
4195
4336
|
exports.nextHighlight = nextHighlight;
|
|
4196
4337
|
exports.placeDropdown = placeDropdown;
|