@dloizides/ui-layout 1.36.1 → 1.37.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 +7 -0
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +235 -184
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -102
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React12, { createContext, useMemo, useState, useRef, useEffect, useCallback, useContext, useLayoutEffect } from 'react';
|
|
2
2
|
import { StyleSheet, Platform, View, Text, useWindowDimensions, Pressable, TouchableOpacity, Modal, Animated, FlatList, ScrollView, Easing } from 'react-native';
|
|
3
3
|
import { MODAL_OVERLAY_COLOR, useUi } from '@dloizides/ui-feedback';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -38,7 +38,7 @@ var Section = ({
|
|
|
38
38
|
const { theme } = useUi();
|
|
39
39
|
const isCard = variant === "card" /* Card */;
|
|
40
40
|
const fill = isCard ? theme.colors.background : theme.colors.surface;
|
|
41
|
-
const containerStyle =
|
|
41
|
+
const containerStyle = React12.useMemo(
|
|
42
42
|
() => [styles.card, isCard ? styles.raised : null, { borderColor: theme.colors.border, backgroundColor: fill }, style],
|
|
43
43
|
[theme.colors.border, fill, isCard, style]
|
|
44
44
|
);
|
|
@@ -91,6 +91,7 @@ var LAYOUT_TEST_IDS = {
|
|
|
91
91
|
headingText: "heading-text",
|
|
92
92
|
statusLabel: "status-label",
|
|
93
93
|
stickyPreview: "sticky-preview",
|
|
94
|
+
pageFrame: "page-frame",
|
|
94
95
|
upgradePrompt: "upgrade-prompt",
|
|
95
96
|
upgradePromptCta: "upgrade-prompt-cta",
|
|
96
97
|
upgradePromptDismiss: "upgrade-prompt-dismiss",
|
|
@@ -202,7 +203,7 @@ var Heading = ({
|
|
|
202
203
|
testID
|
|
203
204
|
}) => {
|
|
204
205
|
const { theme } = useUi();
|
|
205
|
-
const headingStyle =
|
|
206
|
+
const headingStyle = React12.useMemo(
|
|
206
207
|
() => [styles3.heading, { color: theme.colors.text }, style],
|
|
207
208
|
[theme.colors.text, style]
|
|
208
209
|
);
|
|
@@ -370,6 +371,52 @@ var StickyPreview = ({
|
|
|
370
371
|
)
|
|
371
372
|
] });
|
|
372
373
|
};
|
|
374
|
+
|
|
375
|
+
// src/PageFrame/utils/pageScale.ts
|
|
376
|
+
var HALF = 2;
|
|
377
|
+
var A4_PAGE = { width: 794, height: 1123 };
|
|
378
|
+
var pageScale = (containerWidth, pageWidth) => {
|
|
379
|
+
if (containerWidth <= 0 || pageWidth <= 0) return 1;
|
|
380
|
+
return Math.min(1, containerWidth / pageWidth);
|
|
381
|
+
};
|
|
382
|
+
var scaledFrame = (containerWidth, page) => {
|
|
383
|
+
const scale = pageScale(containerWidth, page.width);
|
|
384
|
+
return {
|
|
385
|
+
scale,
|
|
386
|
+
height: page.height * scale,
|
|
387
|
+
offsetX: (scale - 1) * page.width / HALF,
|
|
388
|
+
offsetY: (scale - 1) * page.height / HALF
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
var styles6 = StyleSheet.create({
|
|
392
|
+
outer: { width: "100%", overflow: "hidden" },
|
|
393
|
+
page: { position: "absolute", top: 0, left: 0 }
|
|
394
|
+
});
|
|
395
|
+
var PageFrame = ({
|
|
396
|
+
children,
|
|
397
|
+
pageSize = A4_PAGE,
|
|
398
|
+
testID = LAYOUT_TEST_IDS.pageFrame
|
|
399
|
+
}) => {
|
|
400
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
401
|
+
const onLayout = useCallback((event) => {
|
|
402
|
+
setContainerWidth(event.nativeEvent.layout.width);
|
|
403
|
+
}, []);
|
|
404
|
+
const frame = scaledFrame(containerWidth, pageSize);
|
|
405
|
+
return /* @__PURE__ */ jsx(View, { style: [styles6.outer, { height: frame.height }], testID, onLayout, children: /* @__PURE__ */ jsx(
|
|
406
|
+
View,
|
|
407
|
+
{
|
|
408
|
+
style: [
|
|
409
|
+
styles6.page,
|
|
410
|
+
{
|
|
411
|
+
width: pageSize.width,
|
|
412
|
+
height: pageSize.height,
|
|
413
|
+
transform: [{ translateX: frame.offsetX }, { translateY: frame.offsetY }, { scale: frame.scale }]
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
children
|
|
417
|
+
}
|
|
418
|
+
) });
|
|
419
|
+
};
|
|
373
420
|
var TRACK_PADDING = 3;
|
|
374
421
|
var TRACK_RADIUS = 999;
|
|
375
422
|
var SEGMENT_RADIUS = 999;
|
|
@@ -381,7 +428,7 @@ var BORDER_WIDTH = 1;
|
|
|
381
428
|
var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
|
|
382
429
|
var SHADOW_ELEVATION = 2;
|
|
383
430
|
var TRANSPARENT = "transparent";
|
|
384
|
-
var
|
|
431
|
+
var styles7 = StyleSheet.create({
|
|
385
432
|
track: {
|
|
386
433
|
flexDirection: "row",
|
|
387
434
|
alignSelf: "flex-start",
|
|
@@ -426,7 +473,7 @@ function SegmentedControl({
|
|
|
426
473
|
{
|
|
427
474
|
accessibilityRole: "tablist",
|
|
428
475
|
"aria-label": accessibilityLabel,
|
|
429
|
-
style: [
|
|
476
|
+
style: [styles7.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
|
|
430
477
|
testID,
|
|
431
478
|
children: options.map((opt) => {
|
|
432
479
|
const selected = opt.value === value;
|
|
@@ -439,13 +486,13 @@ function SegmentedControl({
|
|
|
439
486
|
accessibilityHint: opt.accessibilityHint,
|
|
440
487
|
onPress: () => onChange(opt.value),
|
|
441
488
|
style: [
|
|
442
|
-
|
|
443
|
-
selected ?
|
|
489
|
+
styles7.segment,
|
|
490
|
+
selected ? styles7.segmentSelected : null,
|
|
444
491
|
{ backgroundColor: selected ? colors.surface : TRANSPARENT }
|
|
445
492
|
],
|
|
446
493
|
testID: opt.testID,
|
|
447
494
|
...ariaSelectedProps(selected),
|
|
448
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
495
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles7.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
|
|
449
496
|
},
|
|
450
497
|
opt.value
|
|
451
498
|
);
|
|
@@ -582,7 +629,7 @@ var HEADING_PADDING_H = 16;
|
|
|
582
629
|
var HEADING_PADDING_TOP = 8;
|
|
583
630
|
var HEADING_PADDING_BOTTOM = 4;
|
|
584
631
|
var HEADING_LETTER_SPACING = 0.5;
|
|
585
|
-
var
|
|
632
|
+
var styles8 = StyleSheet.create({
|
|
586
633
|
heading: {
|
|
587
634
|
fontSize: HEADING_FONT_SIZE,
|
|
588
635
|
fontWeight: HEADING_FONT_WEIGHT,
|
|
@@ -598,7 +645,7 @@ var MenuHeading = ({ testID, text }) => {
|
|
|
598
645
|
Text,
|
|
599
646
|
{
|
|
600
647
|
accessibilityRole: "header",
|
|
601
|
-
style: [
|
|
648
|
+
style: [styles8.heading, { color: theme.colors.textSecondary }],
|
|
602
649
|
testID: `${testID}-menu-heading`,
|
|
603
650
|
children: text
|
|
604
651
|
}
|
|
@@ -619,7 +666,7 @@ var OPTION_PADDING_V = 12;
|
|
|
619
666
|
var ACCENT_BAR_WIDTH = 3;
|
|
620
667
|
var CHECK_GAP = 8;
|
|
621
668
|
var CHECK_GLYPH = "\u2713";
|
|
622
|
-
var
|
|
669
|
+
var styles9 = StyleSheet.create({
|
|
623
670
|
option: {
|
|
624
671
|
paddingHorizontal: OPTION_PADDING_H,
|
|
625
672
|
paddingVertical: OPTION_PADDING_V,
|
|
@@ -658,16 +705,16 @@ var OptionRow = ({
|
|
|
658
705
|
const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
|
|
659
706
|
const isActive = isSelected || isHighlighted;
|
|
660
707
|
const rowStyle = [
|
|
661
|
-
|
|
662
|
-
isMarked ?
|
|
708
|
+
styles9.option,
|
|
709
|
+
isMarked ? styles9.markedRow : null,
|
|
663
710
|
isActive ? { backgroundColor: colors.surfaceElevated } : null,
|
|
664
711
|
isMarked && isSelected ? { borderLeftColor: accentColor } : null
|
|
665
712
|
];
|
|
666
713
|
const textStyle = [
|
|
667
|
-
|
|
714
|
+
styles9.optionText,
|
|
668
715
|
{ color: colors.text },
|
|
669
|
-
isSelected ?
|
|
670
|
-
isMarked ?
|
|
716
|
+
isSelected ? styles9.selectedText : null,
|
|
717
|
+
isMarked ? styles9.markedText : null
|
|
671
718
|
];
|
|
672
719
|
const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
|
|
673
720
|
return /* @__PURE__ */ jsxs(
|
|
@@ -683,7 +730,7 @@ var OptionRow = ({
|
|
|
683
730
|
onPress: handlePress,
|
|
684
731
|
children: [
|
|
685
732
|
/* @__PURE__ */ jsx(Text, { style: textStyle, children: label }),
|
|
686
|
-
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [
|
|
733
|
+
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [styles9.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
|
|
687
734
|
]
|
|
688
735
|
}
|
|
689
736
|
);
|
|
@@ -841,7 +888,7 @@ var IS_WEB2 = Platform.OS === "web";
|
|
|
841
888
|
var BORDER_RADIUS2 = 8;
|
|
842
889
|
var BORDER_WIDTH3 = 1;
|
|
843
890
|
var MENU_PADDING2 = 4;
|
|
844
|
-
var
|
|
891
|
+
var styles10 = StyleSheet.create({
|
|
845
892
|
/** Native (in-tree) popover — anchored absolutely just under the trigger. */
|
|
846
893
|
popover: {
|
|
847
894
|
position: "absolute",
|
|
@@ -928,7 +975,7 @@ var InlineMenu = ({
|
|
|
928
975
|
themed
|
|
929
976
|
];
|
|
930
977
|
}
|
|
931
|
-
return [
|
|
978
|
+
return [styles10.popover, { minWidth: menuMinWidth }, themed];
|
|
932
979
|
}, [colors.border, colors.surface, menuMinWidth, rect]);
|
|
933
980
|
const menu = /* @__PURE__ */ jsx(
|
|
934
981
|
View,
|
|
@@ -943,10 +990,10 @@ var InlineMenu = ({
|
|
|
943
990
|
Animated.View,
|
|
944
991
|
{
|
|
945
992
|
pointerEvents: isOpen ? "auto" : "none",
|
|
946
|
-
style: [
|
|
993
|
+
style: [styles10.animated, animatedStyle, isOpen ? null : styles10.inert],
|
|
947
994
|
children: [
|
|
948
995
|
menuHeading !== void 0 ? /* @__PURE__ */ jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
949
|
-
/* @__PURE__ */ jsx(ScrollView, { style:
|
|
996
|
+
/* @__PURE__ */ jsx(ScrollView, { style: styles10.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
950
997
|
OptionRow,
|
|
951
998
|
{
|
|
952
999
|
asMenuItem: true,
|
|
@@ -994,7 +1041,7 @@ var CARET_OPEN_ROTATION = "180deg";
|
|
|
994
1041
|
var CARET_CLOSED_ROTATION = "0deg";
|
|
995
1042
|
var POPOVER_ENTER_SCALE = 0.96;
|
|
996
1043
|
var POPOVER_MOTION_MS = 120;
|
|
997
|
-
var
|
|
1044
|
+
var styles11 = StyleSheet.create({
|
|
998
1045
|
anchor: { position: "relative" },
|
|
999
1046
|
container: {
|
|
1000
1047
|
borderWidth: BORDER_WIDTH4,
|
|
@@ -1109,19 +1156,19 @@ var ModalDropdown = ({
|
|
|
1109
1156
|
const isCaret = showCaret && !isHamburger;
|
|
1110
1157
|
const containerStyle = useMemo(
|
|
1111
1158
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1112
|
-
|
|
1113
|
-
isHamburger ?
|
|
1159
|
+
styles11.container,
|
|
1160
|
+
isHamburger ? styles11.containerHamburger : isCaret ? styles11.containerMenu : null,
|
|
1114
1161
|
{ borderColor: colors.border, backgroundColor: colors.surface }
|
|
1115
1162
|
],
|
|
1116
1163
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1117
1164
|
);
|
|
1118
1165
|
const hamburgerStyle = useMemo(
|
|
1119
|
-
() => [
|
|
1166
|
+
() => [styles11.hamburger, { color: colors.textSecondary }],
|
|
1120
1167
|
[colors.textSecondary]
|
|
1121
1168
|
);
|
|
1122
1169
|
const caretStyle = useMemo(
|
|
1123
1170
|
() => [
|
|
1124
|
-
|
|
1171
|
+
styles11.caret,
|
|
1125
1172
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1126
1173
|
],
|
|
1127
1174
|
[colors.textSecondary, isOpen]
|
|
@@ -1131,11 +1178,11 @@ var ModalDropdown = ({
|
|
|
1131
1178
|
[optionTestID, testID]
|
|
1132
1179
|
);
|
|
1133
1180
|
const anchorStyle = useMemo(
|
|
1134
|
-
() => [
|
|
1181
|
+
() => [styles11.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1135
1182
|
[isMenu, isOpen]
|
|
1136
1183
|
);
|
|
1137
1184
|
const modalContentStyle = useMemo(
|
|
1138
|
-
() => [
|
|
1185
|
+
() => [styles11.modalContent, { backgroundColor: colors.surface }],
|
|
1139
1186
|
[colors.surface]
|
|
1140
1187
|
);
|
|
1141
1188
|
const renderModalOption = useCallback(
|
|
@@ -1156,11 +1203,11 @@ var ModalDropdown = ({
|
|
|
1156
1203
|
/* @__PURE__ */ jsxs(TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1157
1204
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1158
1205
|
/* @__PURE__ */ jsx(Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
|
|
1159
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1206
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles11.selectedText, styles11.selectedTextMenu, { color: colors.text }], children: selectedLabel })
|
|
1160
1207
|
] }) : isCaret ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1161
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1208
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles11.selectedText, styles11.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
|
|
1162
1209
|
/* @__PURE__ */ jsx(Text, { style: caretStyle, children: CARET_GLYPH })
|
|
1163
|
-
] }) : /* @__PURE__ */ jsx(Text, { style: [
|
|
1210
|
+
] }) : /* @__PURE__ */ jsx(Text, { style: [styles11.selectedText, { color: colors.text }], children: selectedLabel }),
|
|
1164
1211
|
hintNode
|
|
1165
1212
|
] }),
|
|
1166
1213
|
isMenu && menuAnim.mounted ? /* @__PURE__ */ jsx(
|
|
@@ -1181,7 +1228,7 @@ var ModalDropdown = ({
|
|
|
1181
1228
|
onSelect: handleSelect
|
|
1182
1229
|
}
|
|
1183
1230
|
) : null,
|
|
1184
|
-
!isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
1231
|
+
!isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style: styles11.modalOverlay, children: [
|
|
1185
1232
|
/* @__PURE__ */ jsx(
|
|
1186
1233
|
TouchableOpacity,
|
|
1187
1234
|
{
|
|
@@ -1274,7 +1321,7 @@ var ROW_PAD_V = 8;
|
|
|
1274
1321
|
var PANEL_PAD_TOP = 16;
|
|
1275
1322
|
var BORDER_WIDTH5 = 1;
|
|
1276
1323
|
var TEXT_ON_PRIMARY = "#ffffff";
|
|
1277
|
-
var
|
|
1324
|
+
var styles12 = StyleSheet.create({
|
|
1278
1325
|
root: {
|
|
1279
1326
|
width: "100%"
|
|
1280
1327
|
},
|
|
@@ -1328,7 +1375,7 @@ var WideTabStrip = ({
|
|
|
1328
1375
|
textSecondary,
|
|
1329
1376
|
surfaceElevated,
|
|
1330
1377
|
stripStyle
|
|
1331
|
-
}) => /* @__PURE__ */ jsx(View, { style: [
|
|
1378
|
+
}) => /* @__PURE__ */ jsx(View, { style: [styles12.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles12.strip, stripStyle], children: tabs.map((tab) => {
|
|
1332
1379
|
const selected = tab.key === activeKey;
|
|
1333
1380
|
const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
|
|
1334
1381
|
const pillColor = selected ? primaryColor : surfaceElevated;
|
|
@@ -1342,10 +1389,10 @@ var WideTabStrip = ({
|
|
|
1342
1389
|
accessibilityLabel: tab.accessibilityLabel ?? tab.label,
|
|
1343
1390
|
accessibilityHint: tab.accessibilityHint,
|
|
1344
1391
|
onPress: () => onChange(tab.key),
|
|
1345
|
-
style: [
|
|
1392
|
+
style: [styles12.pill, { backgroundColor: pillColor }],
|
|
1346
1393
|
testID: tab.testID,
|
|
1347
1394
|
...ariaTabProps(selected, panelId, tabId),
|
|
1348
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1395
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles12.pillText, { color: textColor }], children: tab.label })
|
|
1349
1396
|
},
|
|
1350
1397
|
tab.key
|
|
1351
1398
|
);
|
|
@@ -1370,7 +1417,7 @@ var Tabs = ({
|
|
|
1370
1417
|
const activePanelId = `${idPrefix}-panel-${activeKey}`;
|
|
1371
1418
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
1372
1419
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
1373
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
1420
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles12.root, style], testID, children: [
|
|
1374
1421
|
collapsed ? /* @__PURE__ */ jsx(
|
|
1375
1422
|
TabsMenu,
|
|
1376
1423
|
{
|
|
@@ -1397,7 +1444,7 @@ var Tabs = ({
|
|
|
1397
1444
|
onChange
|
|
1398
1445
|
}
|
|
1399
1446
|
),
|
|
1400
|
-
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [
|
|
1447
|
+
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles12.panel, panelStyle], ...panelAria, children })
|
|
1401
1448
|
] });
|
|
1402
1449
|
};
|
|
1403
1450
|
var PROMPT_PADDING = 20;
|
|
@@ -1412,7 +1459,7 @@ var DISMISS_FONT_SIZE = 13;
|
|
|
1412
1459
|
var TITLE_MARGIN_BOTTOM = 8;
|
|
1413
1460
|
var MESSAGE_MARGIN_BOTTOM = 16;
|
|
1414
1461
|
var CTA_MARGIN_BOTTOM = 8;
|
|
1415
|
-
var
|
|
1462
|
+
var styles13 = StyleSheet.create({
|
|
1416
1463
|
container: {
|
|
1417
1464
|
padding: PROMPT_PADDING,
|
|
1418
1465
|
borderRadius: PROMPT_BORDER_RADIUS,
|
|
@@ -1447,21 +1494,21 @@ var UpgradePrompt = ({
|
|
|
1447
1494
|
return /* @__PURE__ */ jsxs(
|
|
1448
1495
|
View,
|
|
1449
1496
|
{
|
|
1450
|
-
style: [
|
|
1497
|
+
style: [styles13.container, { borderColor: primary, backgroundColor: colors.surface }],
|
|
1451
1498
|
testID: LAYOUT_TEST_IDS.upgradePrompt,
|
|
1452
1499
|
children: [
|
|
1453
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1454
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1500
|
+
/* @__PURE__ */ jsx(Text, { style: [styles13.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
|
|
1501
|
+
/* @__PURE__ */ jsx(Text, { style: [styles13.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
|
|
1455
1502
|
/* @__PURE__ */ jsx(
|
|
1456
1503
|
TouchableOpacity,
|
|
1457
1504
|
{
|
|
1458
1505
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
|
|
1459
1506
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
|
|
1460
1507
|
accessibilityRole: "button",
|
|
1461
|
-
style: [
|
|
1508
|
+
style: [styles13.cta, { backgroundColor: primary }],
|
|
1462
1509
|
testID: LAYOUT_TEST_IDS.upgradePromptCta,
|
|
1463
1510
|
onPress: handleUpgradePress,
|
|
1464
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1511
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles13.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
|
|
1465
1512
|
}
|
|
1466
1513
|
),
|
|
1467
1514
|
onDismiss ? /* @__PURE__ */ jsx(
|
|
@@ -1470,10 +1517,10 @@ var UpgradePrompt = ({
|
|
|
1470
1517
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
|
|
1471
1518
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
|
|
1472
1519
|
accessibilityRole: "button",
|
|
1473
|
-
style:
|
|
1520
|
+
style: styles13.dismiss,
|
|
1474
1521
|
testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
|
|
1475
1522
|
onPress: onDismiss,
|
|
1476
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1523
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles13.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
|
|
1477
1524
|
}
|
|
1478
1525
|
) : null
|
|
1479
1526
|
]
|
|
@@ -1482,7 +1529,7 @@ var UpgradePrompt = ({
|
|
|
1482
1529
|
};
|
|
1483
1530
|
var CLOSE_ICON_SIZE = 18;
|
|
1484
1531
|
var PANEL_ENTER_SCALE = 0.96;
|
|
1485
|
-
var
|
|
1532
|
+
var styles14 = StyleSheet.create({
|
|
1486
1533
|
animatedFill: { flex: 1 },
|
|
1487
1534
|
container: {
|
|
1488
1535
|
flex: 1,
|
|
@@ -1508,8 +1555,8 @@ var ModalShell = ({
|
|
|
1508
1555
|
}) => {
|
|
1509
1556
|
const { theme, t } = useUi();
|
|
1510
1557
|
const { style: sheetStyle, mounted } = useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
|
|
1511
|
-
const containerStyle =
|
|
1512
|
-
() => [
|
|
1558
|
+
const containerStyle = React12.useMemo(
|
|
1559
|
+
() => [styles14.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
1513
1560
|
[theme.colors.background, contentStyle]
|
|
1514
1561
|
);
|
|
1515
1562
|
const closeA11yLabel = t(LAYOUT_I18N.close);
|
|
@@ -1521,7 +1568,7 @@ var ModalShell = ({
|
|
|
1521
1568
|
testID: LAYOUT_TEST_IDS.modalShell,
|
|
1522
1569
|
visible: mounted,
|
|
1523
1570
|
onRequestClose: onCancel,
|
|
1524
|
-
children: /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
1571
|
+
children: /* @__PURE__ */ jsx(Animated.View, { style: [styles14.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxs(
|
|
1525
1572
|
ScrollView,
|
|
1526
1573
|
{
|
|
1527
1574
|
accessibilityViewIsModal: true,
|
|
@@ -1529,7 +1576,7 @@ var ModalShell = ({
|
|
|
1529
1576
|
role: "dialog",
|
|
1530
1577
|
style: containerStyle,
|
|
1531
1578
|
children: [
|
|
1532
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1579
|
+
/* @__PURE__ */ jsxs(View, { style: styles14.headerRow, children: [
|
|
1533
1580
|
/* @__PURE__ */ jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
|
|
1534
1581
|
showClose ? /* @__PURE__ */ jsx(
|
|
1535
1582
|
TouchableOpacity,
|
|
@@ -1537,7 +1584,7 @@ var ModalShell = ({
|
|
|
1537
1584
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
1538
1585
|
accessibilityLabel: closeA11yLabel,
|
|
1539
1586
|
accessibilityRole: "button",
|
|
1540
|
-
style:
|
|
1587
|
+
style: styles14.closeButton,
|
|
1541
1588
|
testID: LAYOUT_TEST_IDS.modalShellClose,
|
|
1542
1589
|
onPress: onCancel,
|
|
1543
1590
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
|
|
@@ -1583,7 +1630,7 @@ var HEADER_MARGIN = 12;
|
|
|
1583
1630
|
var DIALOG_MAX_HEIGHT = "90%";
|
|
1584
1631
|
var PANEL_ENTER_SCALE2 = 0.96;
|
|
1585
1632
|
var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640 };
|
|
1586
|
-
var
|
|
1633
|
+
var styles15 = StyleSheet.create({
|
|
1587
1634
|
overlay: {
|
|
1588
1635
|
flex: 1,
|
|
1589
1636
|
justifyContent: "center",
|
|
@@ -1635,15 +1682,15 @@ var Modal3 = ({
|
|
|
1635
1682
|
const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
|
|
1636
1683
|
const closeLabel = t(LAYOUT_I18N.dialogClose);
|
|
1637
1684
|
const dialogStyle = useMemo(
|
|
1638
|
-
() => [
|
|
1685
|
+
() => [styles15.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
|
|
1639
1686
|
[theme.colors.surface, size]
|
|
1640
1687
|
);
|
|
1641
1688
|
const hasHeader = title !== void 0 || showClose;
|
|
1642
|
-
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
1689
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style: styles15.overlay, children: [
|
|
1643
1690
|
/* @__PURE__ */ jsx(
|
|
1644
1691
|
Animated.View,
|
|
1645
1692
|
{
|
|
1646
|
-
style: [StyleSheet.absoluteFill,
|
|
1693
|
+
style: [StyleSheet.absoluteFill, styles15.scrim, { opacity: backdrop.style.opacity }]
|
|
1647
1694
|
}
|
|
1648
1695
|
),
|
|
1649
1696
|
/* @__PURE__ */ jsx(
|
|
@@ -1669,8 +1716,8 @@ var Modal3 = ({
|
|
|
1669
1716
|
style: [dialogStyle, panel.style],
|
|
1670
1717
|
testID,
|
|
1671
1718
|
children: [
|
|
1672
|
-
hasHeader ? /* @__PURE__ */ jsxs(View, { style:
|
|
1673
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1719
|
+
hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles15.headerRow, children: [
|
|
1720
|
+
/* @__PURE__ */ jsx(View, { style: styles15.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsx(Heading, { children: title }) : null }),
|
|
1674
1721
|
showClose ? /* @__PURE__ */ jsx(
|
|
1675
1722
|
IconButton,
|
|
1676
1723
|
{
|
|
@@ -1687,7 +1734,7 @@ var Modal3 = ({
|
|
|
1687
1734
|
) : null
|
|
1688
1735
|
] }) : null,
|
|
1689
1736
|
/* @__PURE__ */ jsx(ScrollView, { children }),
|
|
1690
|
-
footer !== void 0 ? /* @__PURE__ */ jsx(View, { style:
|
|
1737
|
+
footer !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles15.footer, children: footer }) : null
|
|
1691
1738
|
]
|
|
1692
1739
|
}
|
|
1693
1740
|
)
|
|
@@ -1696,7 +1743,7 @@ var Modal3 = ({
|
|
|
1696
1743
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
1697
1744
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
1698
1745
|
var BUTTON_GAP = 12;
|
|
1699
|
-
var
|
|
1746
|
+
var styles16 = StyleSheet.create({
|
|
1700
1747
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
|
|
1701
1748
|
footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
|
|
1702
1749
|
});
|
|
@@ -1715,7 +1762,7 @@ var ConfirmDialog = ({
|
|
|
1715
1762
|
const { theme, t } = useUi();
|
|
1716
1763
|
const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
|
|
1717
1764
|
const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
|
|
1718
|
-
const footer = /* @__PURE__ */ jsxs(View, { style:
|
|
1765
|
+
const footer = /* @__PURE__ */ jsxs(View, { style: styles16.footer, children: [
|
|
1719
1766
|
/* @__PURE__ */ jsx(
|
|
1720
1767
|
Button,
|
|
1721
1768
|
{
|
|
@@ -1751,7 +1798,7 @@ var ConfirmDialog = ({
|
|
|
1751
1798
|
title,
|
|
1752
1799
|
visible,
|
|
1753
1800
|
onClose: onCancel,
|
|
1754
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1801
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles16.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
1755
1802
|
}
|
|
1756
1803
|
);
|
|
1757
1804
|
};
|
|
@@ -1764,14 +1811,14 @@ function useAccordionContext() {
|
|
|
1764
1811
|
return value;
|
|
1765
1812
|
}
|
|
1766
1813
|
var BOXED_GAP = 12;
|
|
1767
|
-
var
|
|
1814
|
+
var styles17 = StyleSheet.create({
|
|
1768
1815
|
container: { alignSelf: "stretch" },
|
|
1769
1816
|
boxed: { gap: BOXED_GAP }
|
|
1770
1817
|
});
|
|
1771
1818
|
function computeInitialOpen(children, defaultOpenIds, allowMultiple) {
|
|
1772
1819
|
const ids = new Set(defaultOpenIds ?? []);
|
|
1773
|
-
|
|
1774
|
-
if (!
|
|
1820
|
+
React12.Children.forEach(children, (child) => {
|
|
1821
|
+
if (!React12.isValidElement(child)) return;
|
|
1775
1822
|
const props = child.props;
|
|
1776
1823
|
if (props.defaultOpen === true && typeof props.id === "string") {
|
|
1777
1824
|
ids.add(props.id);
|
|
@@ -1821,7 +1868,7 @@ var Accordion = ({
|
|
|
1821
1868
|
[openSet, toggle, allowMultiple, variant]
|
|
1822
1869
|
);
|
|
1823
1870
|
const containerStyle = useMemo(() => {
|
|
1824
|
-
const base = variant === "boxed" ? [
|
|
1871
|
+
const base = variant === "boxed" ? [styles17.container, styles17.boxed] : [styles17.container];
|
|
1825
1872
|
if (style === void 0) return base;
|
|
1826
1873
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
1827
1874
|
}, [style, variant]);
|
|
@@ -1853,7 +1900,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
1853
1900
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
1854
1901
|
var BOX_MARKER_GAP = 6;
|
|
1855
1902
|
var BOX_MARKER = "\u25B8";
|
|
1856
|
-
var
|
|
1903
|
+
var styles18 = StyleSheet.create({
|
|
1857
1904
|
item: { borderTopWidth: StyleSheet.hairlineWidth },
|
|
1858
1905
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
1859
1906
|
header: {
|
|
@@ -1929,19 +1976,19 @@ var AccordionItem = ({
|
|
|
1929
1976
|
);
|
|
1930
1977
|
const keyboardProps = Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
1931
1978
|
const itemStyle = useMemo(
|
|
1932
|
-
() => boxed ? [
|
|
1979
|
+
() => boxed ? [styles18.boxItem, { borderColor: colors.border }] : [styles18.item, { borderTopColor: colors.border }],
|
|
1933
1980
|
[boxed, colors.border]
|
|
1934
1981
|
);
|
|
1935
1982
|
const headerStyle = useMemo(
|
|
1936
1983
|
() => [
|
|
1937
|
-
|
|
1938
|
-
...boxed ? [
|
|
1984
|
+
styles18.header,
|
|
1985
|
+
...boxed ? [styles18.boxHeader] : [],
|
|
1939
1986
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
1940
1987
|
],
|
|
1941
1988
|
[boxed, disabled]
|
|
1942
1989
|
);
|
|
1943
1990
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
1944
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ?
|
|
1991
|
+
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles18.boxTitle : styles18.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
|
|
1945
1992
|
return /* @__PURE__ */ jsxs(View, { style: itemStyle, children: [
|
|
1946
1993
|
/* @__PURE__ */ jsxs(
|
|
1947
1994
|
Pressable,
|
|
@@ -1958,7 +2005,7 @@ var AccordionItem = ({
|
|
|
1958
2005
|
onPress: handlePress,
|
|
1959
2006
|
...keyboardProps,
|
|
1960
2007
|
children: [
|
|
1961
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2008
|
+
/* @__PURE__ */ jsxs(View, { style: [styles18.headerLeft, boxed ? styles18.headerLeftRow : null], children: [
|
|
1962
2009
|
boxed ? (
|
|
1963
2010
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
1964
2011
|
/* @__PURE__ */ jsx(
|
|
@@ -1967,15 +2014,15 @@ var AccordionItem = ({
|
|
|
1967
2014
|
accessibilityElementsHidden: true,
|
|
1968
2015
|
"aria-hidden": true,
|
|
1969
2016
|
importantForAccessibility: "no-hide-descendants",
|
|
1970
|
-
style: [
|
|
2017
|
+
style: [styles18.marker, { transform: [{ rotate }] }],
|
|
1971
2018
|
testID: chevronTestID,
|
|
1972
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2019
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles18.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
1973
2020
|
}
|
|
1974
2021
|
)
|
|
1975
2022
|
) : null,
|
|
1976
2023
|
titleNode
|
|
1977
2024
|
] }),
|
|
1978
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2025
|
+
/* @__PURE__ */ jsxs(View, { style: styles18.headerRight, children: [
|
|
1979
2026
|
right,
|
|
1980
2027
|
boxed ? null : /* @__PURE__ */ jsx(
|
|
1981
2028
|
Animated.View,
|
|
@@ -1983,7 +2030,7 @@ var AccordionItem = ({
|
|
|
1983
2030
|
accessibilityElementsHidden: true,
|
|
1984
2031
|
"aria-hidden": true,
|
|
1985
2032
|
importantForAccessibility: "no-hide-descendants",
|
|
1986
|
-
style: [
|
|
2033
|
+
style: [styles18.chevron, { transform: [{ rotate }] }],
|
|
1987
2034
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
1988
2035
|
}
|
|
1989
2036
|
)
|
|
@@ -1997,7 +2044,7 @@ var AccordionItem = ({
|
|
|
1997
2044
|
accessibilityLabel: resolvedLabel,
|
|
1998
2045
|
nativeID: bodyTestID,
|
|
1999
2046
|
role: ROLE_REGION,
|
|
2000
|
-
style: boxed ?
|
|
2047
|
+
style: boxed ? styles18.boxBody : styles18.body,
|
|
2001
2048
|
testID: bodyTestID,
|
|
2002
2049
|
children
|
|
2003
2050
|
}
|
|
@@ -2060,7 +2107,7 @@ function useAvailableWidth() {
|
|
|
2060
2107
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
2061
2108
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
2062
2109
|
var UNMEASURED2 = 0;
|
|
2063
|
-
var
|
|
2110
|
+
var styles19 = StyleSheet.create({
|
|
2064
2111
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
2065
2112
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
2066
2113
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2091,7 +2138,7 @@ var TruncatedText = ({
|
|
|
2091
2138
|
[value, measureRef]
|
|
2092
2139
|
);
|
|
2093
2140
|
const flatStyle = useMemo(
|
|
2094
|
-
() => StyleSheet.flatten([
|
|
2141
|
+
() => StyleSheet.flatten([styles19.base, style]),
|
|
2095
2142
|
[style]
|
|
2096
2143
|
);
|
|
2097
2144
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
@@ -2106,7 +2153,7 @@ var TruncatedText = ({
|
|
|
2106
2153
|
ref: attachRef,
|
|
2107
2154
|
onLayout,
|
|
2108
2155
|
numberOfLines: 1,
|
|
2109
|
-
style: [
|
|
2156
|
+
style: [styles19.base, styles19.fill, style],
|
|
2110
2157
|
testID,
|
|
2111
2158
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2112
2159
|
accessibilityLabel,
|
|
@@ -2209,7 +2256,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2209
2256
|
var ACTION_PADDING_H = 6;
|
|
2210
2257
|
var ACTION_PADDING_V = 2;
|
|
2211
2258
|
var ACTION_RADIUS = 6;
|
|
2212
|
-
var
|
|
2259
|
+
var styles20 = StyleSheet.create({
|
|
2213
2260
|
cell: { gap: CELL_GAP },
|
|
2214
2261
|
label: {
|
|
2215
2262
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2274,14 +2321,14 @@ var CopyableId = ({
|
|
|
2274
2321
|
const { colors } = theme;
|
|
2275
2322
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2276
2323
|
const action = useActionState(status);
|
|
2277
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
2278
|
-
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [
|
|
2279
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2280
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2324
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles20.cell, style], testID, children: [
|
|
2325
|
+
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles20.label, { color: colors.textSecondary }], children: label }),
|
|
2326
|
+
/* @__PURE__ */ jsxs(View, { style: styles20.row, children: [
|
|
2327
|
+
/* @__PURE__ */ jsx(View, { style: styles20.valueWrap, children: /* @__PURE__ */ jsx(
|
|
2281
2328
|
TruncatedText,
|
|
2282
2329
|
{
|
|
2283
2330
|
value,
|
|
2284
|
-
style: [
|
|
2331
|
+
style: [styles20.value, { color: colors.text }],
|
|
2285
2332
|
testID: `${testID}-value`,
|
|
2286
2333
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2287
2334
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2295,7 +2342,7 @@ var CopyableId = ({
|
|
|
2295
2342
|
accessibilityLabel: t(action.key),
|
|
2296
2343
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2297
2344
|
testID: `${testID}-copy`,
|
|
2298
|
-
style: [
|
|
2345
|
+
style: [styles20.action, { color: action.color }],
|
|
2299
2346
|
children: t(action.key)
|
|
2300
2347
|
}
|
|
2301
2348
|
)
|
|
@@ -2350,7 +2397,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
2350
2397
|
var FOOTER_PADDING_H = 12;
|
|
2351
2398
|
var FOOTER_FONT_SIZE = 11;
|
|
2352
2399
|
var FOOTER_OPACITY = 0.75;
|
|
2353
|
-
var
|
|
2400
|
+
var styles21 = StyleSheet.create({
|
|
2354
2401
|
footer: {
|
|
2355
2402
|
paddingVertical: FOOTER_PADDING_V,
|
|
2356
2403
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -2376,7 +2423,7 @@ var BuildInfoFooter = ({
|
|
|
2376
2423
|
const commit = apiCommit ?? fetchedCommit;
|
|
2377
2424
|
const label = formatBuildInfo(buildVersion, commit);
|
|
2378
2425
|
const textStyle = useMemo(
|
|
2379
|
-
() => [
|
|
2426
|
+
() => [styles21.text, { color: theme.colors.textSecondary }],
|
|
2380
2427
|
[theme.colors.textSecondary]
|
|
2381
2428
|
);
|
|
2382
2429
|
return /* @__PURE__ */ jsx(
|
|
@@ -2384,7 +2431,7 @@ var BuildInfoFooter = ({
|
|
|
2384
2431
|
{
|
|
2385
2432
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2386
2433
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
2387
|
-
style: [
|
|
2434
|
+
style: [styles21.footer, style],
|
|
2388
2435
|
testID,
|
|
2389
2436
|
children: /* @__PURE__ */ jsx(Text, { style: textStyle, children: label })
|
|
2390
2437
|
}
|
|
@@ -2395,7 +2442,7 @@ var BORDER = 2;
|
|
|
2395
2442
|
var GLYPH_SIZE = 14;
|
|
2396
2443
|
var GLYPH_LINE = 16;
|
|
2397
2444
|
var TICK = "\u2713";
|
|
2398
|
-
var
|
|
2445
|
+
var styles22 = StyleSheet.create({
|
|
2399
2446
|
circle: {
|
|
2400
2447
|
width: SIZE,
|
|
2401
2448
|
height: SIZE,
|
|
@@ -2412,9 +2459,9 @@ var CheckMark = ({ filled, accent, ring, glyphColor, testID }) => /* @__PURE__ *
|
|
|
2412
2459
|
"aria-hidden": true,
|
|
2413
2460
|
accessibilityElementsHidden: true,
|
|
2414
2461
|
importantForAccessibility: "no-hide-descendants",
|
|
2415
|
-
style: [
|
|
2462
|
+
style: [styles22.circle, { borderColor: filled ? accent : ring, backgroundColor: filled ? accent : void 0 }],
|
|
2416
2463
|
testID,
|
|
2417
|
-
children: filled ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2464
|
+
children: filled ? /* @__PURE__ */ jsx(Text, { style: [styles22.glyph, { color: glyphColor }], children: TICK }) : null
|
|
2418
2465
|
}
|
|
2419
2466
|
);
|
|
2420
2467
|
var ListRowToneContext = createContext(null);
|
|
@@ -2537,7 +2584,7 @@ var PAD_V = 12;
|
|
|
2537
2584
|
var GAP = 4;
|
|
2538
2585
|
var MARK_GAP = 12;
|
|
2539
2586
|
var LINE_GAP = 8;
|
|
2540
|
-
var
|
|
2587
|
+
var styles23 = StyleSheet.create({
|
|
2541
2588
|
row: {
|
|
2542
2589
|
flexDirection: "row",
|
|
2543
2590
|
alignItems: "center",
|
|
@@ -2561,7 +2608,7 @@ function focusTarget(event) {
|
|
|
2561
2608
|
}
|
|
2562
2609
|
function slot(node, color, strong) {
|
|
2563
2610
|
if (typeof node !== "string") return node;
|
|
2564
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
2611
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles23.shrink, strong ? styles23.strong : null, { color }], children: node });
|
|
2565
2612
|
}
|
|
2566
2613
|
var ListRow = ({
|
|
2567
2614
|
title,
|
|
@@ -2593,7 +2640,7 @@ var ListRow = ({
|
|
|
2593
2640
|
style: (state) => {
|
|
2594
2641
|
const { pressed, hovered } = state;
|
|
2595
2642
|
const look = resolveRowLook(selectedStyle, { selected, pressed, focused, hovered: hovered === true }, palette);
|
|
2596
|
-
return [
|
|
2643
|
+
return [styles23.row, { borderTopColor: colors.border }, look.container];
|
|
2597
2644
|
},
|
|
2598
2645
|
testID,
|
|
2599
2646
|
onBlur: () => {
|
|
@@ -2606,14 +2653,14 @@ var ListRow = ({
|
|
|
2606
2653
|
...pressedProps(selected),
|
|
2607
2654
|
children: [
|
|
2608
2655
|
rest.showCheck ? /* @__PURE__ */ jsx(CheckMark, { accent: palette.accent, filled: rest.checkFilled, glyphColor: palette.background, ring: palette.border, testID: checkTestId }) : null,
|
|
2609
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2610
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2656
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.body, children: [
|
|
2657
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.line, children: [
|
|
2611
2658
|
slot(title, rest.titleColor, true),
|
|
2612
2659
|
slot(trailing, rest.textColor, true)
|
|
2613
2660
|
] }),
|
|
2614
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2615
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2616
|
-
badges === void 0 ? null : /* @__PURE__ */ jsx(View, { style:
|
|
2661
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.line, children: [
|
|
2662
|
+
/* @__PURE__ */ jsx(View, { style: styles23.shrink, children: slot(meta, rest.textColor, false) }),
|
|
2663
|
+
badges === void 0 ? null : /* @__PURE__ */ jsx(View, { style: styles23.badges, children: badges })
|
|
2617
2664
|
] })
|
|
2618
2665
|
] })
|
|
2619
2666
|
]
|
|
@@ -2623,6 +2670,6 @@ var ListRow = ({
|
|
|
2623
2670
|
] });
|
|
2624
2671
|
};
|
|
2625
2672
|
|
|
2626
|
-
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BuildInfoFooter, COPY_FEEDBACK_MS, ConfirmDialog, CopyStatus, CopyableId, DEFAULT_BILLING_ROUTE, DropdownVariant, ELLIPSIS, Heading, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, MIN_TARGET_PX, Modal3 as Modal, ModalDropdown, ModalShell, RowSelectedStyle, ScreenColumn, Section, SectionVariant, SegmentedControl, SelectedMarker, StatusBadge, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TextKind, TruncatedText, UpgradePrompt, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, resolveRowLook, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
2673
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BuildInfoFooter, COPY_FEEDBACK_MS, ConfirmDialog, CopyStatus, CopyableId, DEFAULT_BILLING_ROUTE, DropdownVariant, ELLIPSIS, Heading, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListRow, MIN_TARGET_PX, Modal3 as Modal, ModalDropdown, ModalShell, PageFrame, RowSelectedStyle, ScreenColumn, Section, SectionVariant, SegmentedControl, SelectedMarker, StatusBadge, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TextKind, TruncatedText, UpgradePrompt, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, pageScale, resolveRowLook, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
2627
2674
|
//# sourceMappingURL=index.mjs.map
|
|
2628
2675
|
//# sourceMappingURL=index.mjs.map
|