@dloizides/ui-layout 1.33.0 → 1.34.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 +9 -0
- package/dist/index.d.mts +37 -4
- package/dist/index.d.ts +37 -4
- package/dist/index.js +183 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -103
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,20 +17,79 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
17
17
|
var React11__default = /*#__PURE__*/_interopDefault(React11);
|
|
18
18
|
|
|
19
19
|
// src/Section/Section.tsx
|
|
20
|
+
|
|
21
|
+
// src/Section/SectionVariant.ts
|
|
22
|
+
var SectionVariant = /* @__PURE__ */ ((SectionVariant2) => {
|
|
23
|
+
SectionVariant2["Panel"] = "panel";
|
|
24
|
+
SectionVariant2["Card"] = "card";
|
|
25
|
+
return SectionVariant2;
|
|
26
|
+
})(SectionVariant || {});
|
|
20
27
|
var styles = reactNative.StyleSheet.create({
|
|
21
28
|
card: {
|
|
22
29
|
padding: 16,
|
|
23
30
|
borderWidth: 1,
|
|
24
31
|
borderRadius: 6
|
|
32
|
+
},
|
|
33
|
+
raised: {
|
|
34
|
+
borderRadius: 12,
|
|
35
|
+
gap: 12
|
|
25
36
|
}
|
|
26
37
|
});
|
|
27
|
-
var Section = ({
|
|
38
|
+
var Section = ({
|
|
39
|
+
children,
|
|
40
|
+
style,
|
|
41
|
+
variant = "panel" /* Panel */,
|
|
42
|
+
testID
|
|
43
|
+
}) => {
|
|
28
44
|
const { theme } = uiFeedback.useUi();
|
|
45
|
+
const isCard = variant === "card" /* Card */;
|
|
46
|
+
const fill = isCard ? theme.colors.background : theme.colors.surface;
|
|
29
47
|
const containerStyle = React11__default.default.useMemo(
|
|
30
|
-
() => [styles.card, { borderColor: theme.colors.border, backgroundColor:
|
|
31
|
-
[theme.colors.border,
|
|
48
|
+
() => [styles.card, isCard ? styles.raised : null, { borderColor: theme.colors.border, backgroundColor: fill }, style],
|
|
49
|
+
[theme.colors.border, fill, isCard, style]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: containerStyle, testID, children });
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/AppText/TextKind.ts
|
|
55
|
+
var TextKind = /* @__PURE__ */ ((TextKind2) => {
|
|
56
|
+
TextKind2["Title"] = "title";
|
|
57
|
+
TextKind2["Heading"] = "heading";
|
|
58
|
+
TextKind2["Body"] = "body";
|
|
59
|
+
TextKind2["Strong"] = "strong";
|
|
60
|
+
TextKind2["Muted"] = "muted";
|
|
61
|
+
TextKind2["Small"] = "small";
|
|
62
|
+
return TextKind2;
|
|
63
|
+
})(TextKind || {});
|
|
64
|
+
var SIZES = {
|
|
65
|
+
["title" /* Title */]: { fontSize: 24, fontWeight: "700", lineHeight: 30 },
|
|
66
|
+
["heading" /* Heading */]: { fontSize: 17, fontWeight: "700", lineHeight: 24 },
|
|
67
|
+
["body" /* Body */]: { fontSize: 15, lineHeight: 22 },
|
|
68
|
+
["strong" /* Strong */]: { fontSize: 15, fontWeight: "700", lineHeight: 22 },
|
|
69
|
+
["muted" /* Muted */]: { fontSize: 14, lineHeight: 20 },
|
|
70
|
+
["small" /* Small */]: { fontSize: 12, lineHeight: 16 }
|
|
71
|
+
};
|
|
72
|
+
var AppText = ({
|
|
73
|
+
kind = "body" /* Body */,
|
|
74
|
+
color,
|
|
75
|
+
style,
|
|
76
|
+
testID,
|
|
77
|
+
children
|
|
78
|
+
}) => {
|
|
79
|
+
const { theme } = uiFeedback.useUi();
|
|
80
|
+
const quiet = kind === "muted" /* Muted */ || kind === "small" /* Small */;
|
|
81
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
+
reactNative.Text,
|
|
83
|
+
{
|
|
84
|
+
style: [
|
|
85
|
+
SIZES[kind],
|
|
86
|
+
{ color: color ?? (quiet ? theme.colors.textSecondary : theme.colors.text) },
|
|
87
|
+
style
|
|
88
|
+
],
|
|
89
|
+
testID,
|
|
90
|
+
children
|
|
91
|
+
}
|
|
32
92
|
);
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: containerStyle, children });
|
|
34
93
|
};
|
|
35
94
|
|
|
36
95
|
// src/constants.ts
|
|
@@ -110,7 +169,31 @@ var LAYOUT_I18N = {
|
|
|
110
169
|
var TYPE_SCALE_BREAKPOINT = 600;
|
|
111
170
|
var LAYOUT_COLLAPSE_BREAKPOINT = 768;
|
|
112
171
|
var MIN_TARGET_PX = 44;
|
|
172
|
+
|
|
173
|
+
// src/responsive.ts
|
|
174
|
+
var WEB_PLATFORM = "web";
|
|
175
|
+
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
176
|
+
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// src/hooks/useIsWideViewport.ts
|
|
180
|
+
function useIsWideViewport(breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
181
|
+
const { width } = reactNative.useWindowDimensions();
|
|
182
|
+
return isWideWebViewport(width, reactNative.Platform.OS, breakpoint);
|
|
183
|
+
}
|
|
113
184
|
var styles2 = reactNative.StyleSheet.create({
|
|
185
|
+
outer: { alignItems: "center", width: "100%" },
|
|
186
|
+
column: { width: "100%", gap: 16 },
|
|
187
|
+
desktop: { paddingHorizontal: 32, paddingVertical: 24 },
|
|
188
|
+
mobile: { paddingHorizontal: 16, paddingVertical: 16 },
|
|
189
|
+
wide: { maxWidth: 1200 },
|
|
190
|
+
narrow: { maxWidth: 720 }
|
|
191
|
+
});
|
|
192
|
+
var ScreenColumn = ({ children, narrow = false }) => {
|
|
193
|
+
const isWide = useIsWideViewport();
|
|
194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles2.outer, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles2.column, isWide ? styles2.desktop : styles2.mobile, narrow ? styles2.narrow : styles2.wide], children }) });
|
|
195
|
+
};
|
|
196
|
+
var styles3 = reactNative.StyleSheet.create({
|
|
114
197
|
heading: {
|
|
115
198
|
fontWeight: "700",
|
|
116
199
|
fontSize: 16
|
|
@@ -126,7 +209,7 @@ var Heading = ({
|
|
|
126
209
|
}) => {
|
|
127
210
|
const { theme } = uiFeedback.useUi();
|
|
128
211
|
const headingStyle = React11__default.default.useMemo(
|
|
129
|
-
() => [
|
|
212
|
+
() => [styles3.heading, { color: theme.colors.text }, style],
|
|
130
213
|
[theme.colors.text, style]
|
|
131
214
|
);
|
|
132
215
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -145,7 +228,7 @@ var DEFAULT_PADDING_V = 4;
|
|
|
145
228
|
var DEFAULT_BORDER_RADIUS = 12;
|
|
146
229
|
var DEFAULT_FONT_SIZE = 12;
|
|
147
230
|
var ICON_GAP = 4;
|
|
148
|
-
var
|
|
231
|
+
var styles4 = reactNative.StyleSheet.create({
|
|
149
232
|
badge: {
|
|
150
233
|
paddingHorizontal: DEFAULT_PADDING_H,
|
|
151
234
|
paddingVertical: DEFAULT_PADDING_V,
|
|
@@ -189,21 +272,15 @@ var StatusBadge = ({
|
|
|
189
272
|
{
|
|
190
273
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.statusBadgeHint),
|
|
191
274
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
192
|
-
style: [
|
|
275
|
+
style: [styles4.badge, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
|
|
193
276
|
testID,
|
|
194
277
|
children: [
|
|
195
278
|
hasIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, children: icon }) : null,
|
|
196
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
279
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles4.text, dynamicText], children: label })
|
|
197
280
|
]
|
|
198
281
|
}
|
|
199
282
|
);
|
|
200
283
|
};
|
|
201
|
-
|
|
202
|
-
// src/responsive.ts
|
|
203
|
-
var WEB_PLATFORM = "web";
|
|
204
|
-
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
205
|
-
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
206
|
-
}
|
|
207
284
|
function isPastStickyLine(sentinelTop, isIntersecting, topOffset) {
|
|
208
285
|
return !isIntersecting && sentinelTop < topOffset;
|
|
209
286
|
}
|
|
@@ -259,7 +336,7 @@ function useVisibleViewport() {
|
|
|
259
336
|
return state;
|
|
260
337
|
}
|
|
261
338
|
var STICKY_Z_INDEX = 5;
|
|
262
|
-
var
|
|
339
|
+
var styles5 = reactNative.StyleSheet.create({
|
|
263
340
|
sentinel: { height: 1, marginBottom: -1 },
|
|
264
341
|
compact: { borderBottomWidth: 1 }
|
|
265
342
|
});
|
|
@@ -280,7 +357,7 @@ var StickyPreview = ({
|
|
|
280
357
|
return reactNative.Platform.OS === WEB_PLATFORM ? web : {};
|
|
281
358
|
}, [offsetTop, topOffset]);
|
|
282
359
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
283
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style:
|
|
360
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style: styles5.sentinel }),
|
|
284
361
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
285
362
|
reactNative.View,
|
|
286
363
|
{
|
|
@@ -289,7 +366,7 @@ var StickyPreview = ({
|
|
|
289
366
|
style: [
|
|
290
367
|
pinned,
|
|
291
368
|
{ backgroundColor: theme.colors.background, borderColor: theme.colors.border },
|
|
292
|
-
isCompact &&
|
|
369
|
+
isCompact && styles5.compact
|
|
293
370
|
],
|
|
294
371
|
testID,
|
|
295
372
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}-${isCompact ? "compact" : "full"}`, children: isCompact ? compact : full })
|
|
@@ -308,7 +385,7 @@ var BORDER_WIDTH = 1;
|
|
|
308
385
|
var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
|
|
309
386
|
var SHADOW_ELEVATION = 2;
|
|
310
387
|
var TRANSPARENT = "transparent";
|
|
311
|
-
var
|
|
388
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
312
389
|
track: {
|
|
313
390
|
flexDirection: "row",
|
|
314
391
|
alignSelf: "flex-start",
|
|
@@ -353,7 +430,7 @@ function SegmentedControl({
|
|
|
353
430
|
{
|
|
354
431
|
accessibilityRole: "tablist",
|
|
355
432
|
"aria-label": accessibilityLabel,
|
|
356
|
-
style: [
|
|
433
|
+
style: [styles6.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
|
|
357
434
|
testID,
|
|
358
435
|
children: options.map((opt) => {
|
|
359
436
|
const selected = opt.value === value;
|
|
@@ -366,13 +443,13 @@ function SegmentedControl({
|
|
|
366
443
|
accessibilityHint: opt.accessibilityHint,
|
|
367
444
|
onPress: () => onChange(opt.value),
|
|
368
445
|
style: [
|
|
369
|
-
|
|
370
|
-
selected ?
|
|
446
|
+
styles6.segment,
|
|
447
|
+
selected ? styles6.segmentSelected : null,
|
|
371
448
|
{ backgroundColor: selected ? colors.surface : TRANSPARENT }
|
|
372
449
|
],
|
|
373
450
|
testID: opt.testID,
|
|
374
451
|
...ariaSelectedProps(selected),
|
|
375
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
452
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
|
|
376
453
|
},
|
|
377
454
|
opt.value
|
|
378
455
|
);
|
|
@@ -509,7 +586,7 @@ var HEADING_PADDING_H = 16;
|
|
|
509
586
|
var HEADING_PADDING_TOP = 8;
|
|
510
587
|
var HEADING_PADDING_BOTTOM = 4;
|
|
511
588
|
var HEADING_LETTER_SPACING = 0.5;
|
|
512
|
-
var
|
|
589
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
513
590
|
heading: {
|
|
514
591
|
fontSize: HEADING_FONT_SIZE,
|
|
515
592
|
fontWeight: HEADING_FONT_WEIGHT,
|
|
@@ -525,7 +602,7 @@ var MenuHeading = ({ testID, text }) => {
|
|
|
525
602
|
reactNative.Text,
|
|
526
603
|
{
|
|
527
604
|
accessibilityRole: "header",
|
|
528
|
-
style: [
|
|
605
|
+
style: [styles7.heading, { color: theme.colors.textSecondary }],
|
|
529
606
|
testID: `${testID}-menu-heading`,
|
|
530
607
|
children: text
|
|
531
608
|
}
|
|
@@ -546,7 +623,7 @@ var OPTION_PADDING_V = 12;
|
|
|
546
623
|
var ACCENT_BAR_WIDTH = 3;
|
|
547
624
|
var CHECK_GAP = 8;
|
|
548
625
|
var CHECK_GLYPH = "\u2713";
|
|
549
|
-
var
|
|
626
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
550
627
|
option: {
|
|
551
628
|
paddingHorizontal: OPTION_PADDING_H,
|
|
552
629
|
paddingVertical: OPTION_PADDING_V,
|
|
@@ -585,16 +662,16 @@ var OptionRow = ({
|
|
|
585
662
|
const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
|
|
586
663
|
const isActive = isSelected || isHighlighted;
|
|
587
664
|
const rowStyle = [
|
|
588
|
-
|
|
589
|
-
isMarked ?
|
|
665
|
+
styles8.option,
|
|
666
|
+
isMarked ? styles8.markedRow : null,
|
|
590
667
|
isActive ? { backgroundColor: colors.surfaceElevated } : null,
|
|
591
668
|
isMarked && isSelected ? { borderLeftColor: accentColor } : null
|
|
592
669
|
];
|
|
593
670
|
const textStyle = [
|
|
594
|
-
|
|
671
|
+
styles8.optionText,
|
|
595
672
|
{ color: colors.text },
|
|
596
|
-
isSelected ?
|
|
597
|
-
isMarked ?
|
|
673
|
+
isSelected ? styles8.selectedText : null,
|
|
674
|
+
isMarked ? styles8.markedText : null
|
|
598
675
|
];
|
|
599
676
|
const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
|
|
600
677
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -610,7 +687,7 @@ var OptionRow = ({
|
|
|
610
687
|
onPress: handlePress,
|
|
611
688
|
children: [
|
|
612
689
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label }),
|
|
613
|
-
isMarked && isSelected ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
690
|
+
isMarked && isSelected ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
|
|
614
691
|
]
|
|
615
692
|
}
|
|
616
693
|
);
|
|
@@ -768,7 +845,7 @@ var IS_WEB2 = reactNative.Platform.OS === "web";
|
|
|
768
845
|
var BORDER_RADIUS2 = 8;
|
|
769
846
|
var BORDER_WIDTH3 = 1;
|
|
770
847
|
var MENU_PADDING2 = 4;
|
|
771
|
-
var
|
|
848
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
772
849
|
/** Native (in-tree) popover — anchored absolutely just under the trigger. */
|
|
773
850
|
popover: {
|
|
774
851
|
position: "absolute",
|
|
@@ -855,7 +932,7 @@ var InlineMenu = ({
|
|
|
855
932
|
themed
|
|
856
933
|
];
|
|
857
934
|
}
|
|
858
|
-
return [
|
|
935
|
+
return [styles9.popover, { minWidth: menuMinWidth }, themed];
|
|
859
936
|
}, [colors.border, colors.surface, menuMinWidth, rect]);
|
|
860
937
|
const menu = /* @__PURE__ */ jsxRuntime.jsx(
|
|
861
938
|
reactNative.View,
|
|
@@ -870,10 +947,10 @@ var InlineMenu = ({
|
|
|
870
947
|
reactNative.Animated.View,
|
|
871
948
|
{
|
|
872
949
|
pointerEvents: isOpen ? "auto" : "none",
|
|
873
|
-
style: [
|
|
950
|
+
style: [styles9.animated, animatedStyle, isOpen ? null : styles9.inert],
|
|
874
951
|
children: [
|
|
875
952
|
menuHeading !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
876
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style:
|
|
953
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style: styles9.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
877
954
|
OptionRow,
|
|
878
955
|
{
|
|
879
956
|
asMenuItem: true,
|
|
@@ -921,7 +998,7 @@ var CARET_OPEN_ROTATION = "180deg";
|
|
|
921
998
|
var CARET_CLOSED_ROTATION = "0deg";
|
|
922
999
|
var POPOVER_ENTER_SCALE = 0.96;
|
|
923
1000
|
var POPOVER_MOTION_MS = 120;
|
|
924
|
-
var
|
|
1001
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
925
1002
|
anchor: { position: "relative" },
|
|
926
1003
|
container: {
|
|
927
1004
|
borderWidth: BORDER_WIDTH4,
|
|
@@ -1036,19 +1113,19 @@ var ModalDropdown = ({
|
|
|
1036
1113
|
const isCaret = showCaret && !isHamburger;
|
|
1037
1114
|
const containerStyle = React11.useMemo(
|
|
1038
1115
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1039
|
-
|
|
1040
|
-
isHamburger ?
|
|
1116
|
+
styles10.container,
|
|
1117
|
+
isHamburger ? styles10.containerHamburger : isCaret ? styles10.containerMenu : null,
|
|
1041
1118
|
{ borderColor: colors.border, backgroundColor: colors.surface }
|
|
1042
1119
|
],
|
|
1043
1120
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1044
1121
|
);
|
|
1045
1122
|
const hamburgerStyle = React11.useMemo(
|
|
1046
|
-
() => [
|
|
1123
|
+
() => [styles10.hamburger, { color: colors.textSecondary }],
|
|
1047
1124
|
[colors.textSecondary]
|
|
1048
1125
|
);
|
|
1049
1126
|
const caretStyle = React11.useMemo(
|
|
1050
1127
|
() => [
|
|
1051
|
-
|
|
1128
|
+
styles10.caret,
|
|
1052
1129
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1053
1130
|
],
|
|
1054
1131
|
[colors.textSecondary, isOpen]
|
|
@@ -1058,11 +1135,11 @@ var ModalDropdown = ({
|
|
|
1058
1135
|
[optionTestID, testID]
|
|
1059
1136
|
);
|
|
1060
1137
|
const anchorStyle = React11.useMemo(
|
|
1061
|
-
() => [
|
|
1138
|
+
() => [styles10.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1062
1139
|
[isMenu, isOpen]
|
|
1063
1140
|
);
|
|
1064
1141
|
const modalContentStyle = React11.useMemo(
|
|
1065
|
-
() => [
|
|
1142
|
+
() => [styles10.modalContent, { backgroundColor: colors.surface }],
|
|
1066
1143
|
[colors.surface]
|
|
1067
1144
|
);
|
|
1068
1145
|
const renderModalOption = React11.useCallback(
|
|
@@ -1083,11 +1160,11 @@ var ModalDropdown = ({
|
|
|
1083
1160
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1084
1161
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1085
1162
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
|
|
1086
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [
|
|
1163
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles10.selectedText, styles10.selectedTextMenu, { color: colors.text }], children: selectedLabel })
|
|
1087
1164
|
] }) : isCaret ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1088
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [
|
|
1165
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles10.selectedText, styles10.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
|
|
1089
1166
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: caretStyle, children: CARET_GLYPH })
|
|
1090
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1167
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.selectedText, { color: colors.text }], children: selectedLabel }),
|
|
1091
1168
|
hintNode
|
|
1092
1169
|
] }),
|
|
1093
1170
|
isMenu && menuAnim.mounted ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1108,7 +1185,7 @@ var ModalDropdown = ({
|
|
|
1108
1185
|
onSelect: handleSelect
|
|
1109
1186
|
}
|
|
1110
1187
|
) : null,
|
|
1111
|
-
!isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1188
|
+
!isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles10.modalOverlay, children: [
|
|
1112
1189
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1190
|
reactNative.TouchableOpacity,
|
|
1114
1191
|
{
|
|
@@ -1201,7 +1278,7 @@ var ROW_PAD_V = 8;
|
|
|
1201
1278
|
var PANEL_PAD_TOP = 16;
|
|
1202
1279
|
var BORDER_WIDTH5 = 1;
|
|
1203
1280
|
var TEXT_ON_PRIMARY = "#ffffff";
|
|
1204
|
-
var
|
|
1281
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
1205
1282
|
root: {
|
|
1206
1283
|
width: "100%"
|
|
1207
1284
|
},
|
|
@@ -1255,7 +1332,7 @@ var WideTabStrip = ({
|
|
|
1255
1332
|
textSecondary,
|
|
1256
1333
|
surfaceElevated,
|
|
1257
1334
|
stripStyle
|
|
1258
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
1335
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles11.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles11.strip, stripStyle], children: tabs.map((tab) => {
|
|
1259
1336
|
const selected = tab.key === activeKey;
|
|
1260
1337
|
const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
|
|
1261
1338
|
const pillColor = selected ? primaryColor : surfaceElevated;
|
|
@@ -1269,10 +1346,10 @@ var WideTabStrip = ({
|
|
|
1269
1346
|
accessibilityLabel: tab.accessibilityLabel ?? tab.label,
|
|
1270
1347
|
accessibilityHint: tab.accessibilityHint,
|
|
1271
1348
|
onPress: () => onChange(tab.key),
|
|
1272
|
-
style: [
|
|
1349
|
+
style: [styles11.pill, { backgroundColor: pillColor }],
|
|
1273
1350
|
testID: tab.testID,
|
|
1274
1351
|
...ariaTabProps(selected, panelId, tabId),
|
|
1275
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1352
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.pillText, { color: textColor }], children: tab.label })
|
|
1276
1353
|
},
|
|
1277
1354
|
tab.key
|
|
1278
1355
|
);
|
|
@@ -1297,7 +1374,7 @@ var Tabs = ({
|
|
|
1297
1374
|
const activePanelId = `${idPrefix}-panel-${activeKey}`;
|
|
1298
1375
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
1299
1376
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
1300
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1377
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles11.root, style], testID, children: [
|
|
1301
1378
|
collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
1379
|
TabsMenu,
|
|
1303
1380
|
{
|
|
@@ -1324,7 +1401,7 @@ var Tabs = ({
|
|
|
1324
1401
|
onChange
|
|
1325
1402
|
}
|
|
1326
1403
|
),
|
|
1327
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [
|
|
1404
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [styles11.panel, panelStyle], ...panelAria, children })
|
|
1328
1405
|
] });
|
|
1329
1406
|
};
|
|
1330
1407
|
var PROMPT_PADDING = 20;
|
|
@@ -1339,7 +1416,7 @@ var DISMISS_FONT_SIZE = 13;
|
|
|
1339
1416
|
var TITLE_MARGIN_BOTTOM = 8;
|
|
1340
1417
|
var MESSAGE_MARGIN_BOTTOM = 16;
|
|
1341
1418
|
var CTA_MARGIN_BOTTOM = 8;
|
|
1342
|
-
var
|
|
1419
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
1343
1420
|
container: {
|
|
1344
1421
|
padding: PROMPT_PADDING,
|
|
1345
1422
|
borderRadius: PROMPT_BORDER_RADIUS,
|
|
@@ -1374,21 +1451,21 @@ var UpgradePrompt = ({
|
|
|
1374
1451
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1375
1452
|
reactNative.View,
|
|
1376
1453
|
{
|
|
1377
|
-
style: [
|
|
1454
|
+
style: [styles12.container, { borderColor: primary, backgroundColor: colors.surface }],
|
|
1378
1455
|
testID: LAYOUT_TEST_IDS.upgradePrompt,
|
|
1379
1456
|
children: [
|
|
1380
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1381
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1457
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
|
|
1458
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
|
|
1382
1459
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1383
1460
|
reactNative.TouchableOpacity,
|
|
1384
1461
|
{
|
|
1385
1462
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
|
|
1386
1463
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
|
|
1387
1464
|
accessibilityRole: "button",
|
|
1388
|
-
style: [
|
|
1465
|
+
style: [styles12.cta, { backgroundColor: primary }],
|
|
1389
1466
|
testID: LAYOUT_TEST_IDS.upgradePromptCta,
|
|
1390
1467
|
onPress: handleUpgradePress,
|
|
1391
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1468
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
|
|
1392
1469
|
}
|
|
1393
1470
|
),
|
|
1394
1471
|
onDismiss ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1397,10 +1474,10 @@ var UpgradePrompt = ({
|
|
|
1397
1474
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
|
|
1398
1475
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
|
|
1399
1476
|
accessibilityRole: "button",
|
|
1400
|
-
style:
|
|
1477
|
+
style: styles12.dismiss,
|
|
1401
1478
|
testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
|
|
1402
1479
|
onPress: onDismiss,
|
|
1403
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1480
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
|
|
1404
1481
|
}
|
|
1405
1482
|
) : null
|
|
1406
1483
|
]
|
|
@@ -1409,7 +1486,7 @@ var UpgradePrompt = ({
|
|
|
1409
1486
|
};
|
|
1410
1487
|
var CLOSE_ICON_SIZE = 18;
|
|
1411
1488
|
var PANEL_ENTER_SCALE = 0.96;
|
|
1412
|
-
var
|
|
1489
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
1413
1490
|
animatedFill: { flex: 1 },
|
|
1414
1491
|
container: {
|
|
1415
1492
|
flex: 1,
|
|
@@ -1436,7 +1513,7 @@ var ModalShell = ({
|
|
|
1436
1513
|
const { theme, t } = uiFeedback.useUi();
|
|
1437
1514
|
const { style: sheetStyle, mounted } = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
|
|
1438
1515
|
const containerStyle = React11__default.default.useMemo(
|
|
1439
|
-
() => [
|
|
1516
|
+
() => [styles13.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
1440
1517
|
[theme.colors.background, contentStyle]
|
|
1441
1518
|
);
|
|
1442
1519
|
const closeA11yLabel = t(LAYOUT_I18N.close);
|
|
@@ -1448,7 +1525,7 @@ var ModalShell = ({
|
|
|
1448
1525
|
testID: LAYOUT_TEST_IDS.modalShell,
|
|
1449
1526
|
visible: mounted,
|
|
1450
1527
|
onRequestClose: onCancel,
|
|
1451
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [
|
|
1528
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1452
1529
|
reactNative.ScrollView,
|
|
1453
1530
|
{
|
|
1454
1531
|
accessibilityViewIsModal: true,
|
|
@@ -1456,7 +1533,7 @@ var ModalShell = ({
|
|
|
1456
1533
|
role: "dialog",
|
|
1457
1534
|
style: containerStyle,
|
|
1458
1535
|
children: [
|
|
1459
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1536
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.headerRow, children: [
|
|
1460
1537
|
/* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
|
|
1461
1538
|
showClose ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
1539
|
reactNative.TouchableOpacity,
|
|
@@ -1464,7 +1541,7 @@ var ModalShell = ({
|
|
|
1464
1541
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
1465
1542
|
accessibilityLabel: closeA11yLabel,
|
|
1466
1543
|
accessibilityRole: "button",
|
|
1467
|
-
style:
|
|
1544
|
+
style: styles13.closeButton,
|
|
1468
1545
|
testID: LAYOUT_TEST_IDS.modalShellClose,
|
|
1469
1546
|
onPress: onCancel,
|
|
1470
1547
|
children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
|
|
@@ -1510,7 +1587,7 @@ var HEADER_MARGIN = 12;
|
|
|
1510
1587
|
var DIALOG_MAX_HEIGHT = "90%";
|
|
1511
1588
|
var PANEL_ENTER_SCALE2 = 0.96;
|
|
1512
1589
|
var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640 };
|
|
1513
|
-
var
|
|
1590
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1514
1591
|
overlay: {
|
|
1515
1592
|
flex: 1,
|
|
1516
1593
|
justifyContent: "center",
|
|
@@ -1562,15 +1639,15 @@ var Modal3 = ({
|
|
|
1562
1639
|
const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
|
|
1563
1640
|
const closeLabel = t(LAYOUT_I18N.dialogClose);
|
|
1564
1641
|
const dialogStyle = React11.useMemo(
|
|
1565
|
-
() => [
|
|
1642
|
+
() => [styles14.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
|
|
1566
1643
|
[theme.colors.surface, size]
|
|
1567
1644
|
);
|
|
1568
1645
|
const hasHeader = title !== void 0 || showClose;
|
|
1569
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1646
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.overlay, children: [
|
|
1570
1647
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
1648
|
reactNative.Animated.View,
|
|
1572
1649
|
{
|
|
1573
|
-
style: [reactNative.StyleSheet.absoluteFill,
|
|
1650
|
+
style: [reactNative.StyleSheet.absoluteFill, styles14.scrim, { opacity: backdrop.style.opacity }]
|
|
1574
1651
|
}
|
|
1575
1652
|
),
|
|
1576
1653
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1596,8 +1673,8 @@ var Modal3 = ({
|
|
|
1596
1673
|
style: [dialogStyle, panel.style],
|
|
1597
1674
|
testID,
|
|
1598
1675
|
children: [
|
|
1599
|
-
hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1600
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
1676
|
+
hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.headerRow, children: [
|
|
1677
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles14.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title }) : null }),
|
|
1601
1678
|
showClose ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1602
1679
|
uiButtons.IconButton,
|
|
1603
1680
|
{
|
|
@@ -1614,7 +1691,7 @@ var Modal3 = ({
|
|
|
1614
1691
|
) : null
|
|
1615
1692
|
] }) : null,
|
|
1616
1693
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { children }),
|
|
1617
|
-
footer !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
1694
|
+
footer !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles14.footer, children: footer }) : null
|
|
1618
1695
|
]
|
|
1619
1696
|
}
|
|
1620
1697
|
)
|
|
@@ -1623,7 +1700,7 @@ var Modal3 = ({
|
|
|
1623
1700
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
1624
1701
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
1625
1702
|
var BUTTON_GAP = 12;
|
|
1626
|
-
var
|
|
1703
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
1627
1704
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
|
|
1628
1705
|
footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
|
|
1629
1706
|
});
|
|
@@ -1642,7 +1719,7 @@ var ConfirmDialog = ({
|
|
|
1642
1719
|
const { theme, t } = uiFeedback.useUi();
|
|
1643
1720
|
const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
|
|
1644
1721
|
const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
|
|
1645
|
-
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1722
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.footer, children: [
|
|
1646
1723
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
1724
|
uiButtons.Button,
|
|
1648
1725
|
{
|
|
@@ -1678,7 +1755,7 @@ var ConfirmDialog = ({
|
|
|
1678
1755
|
title,
|
|
1679
1756
|
visible,
|
|
1680
1757
|
onClose: onCancel,
|
|
1681
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1758
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
1682
1759
|
}
|
|
1683
1760
|
);
|
|
1684
1761
|
};
|
|
@@ -1691,7 +1768,7 @@ function useAccordionContext() {
|
|
|
1691
1768
|
return value;
|
|
1692
1769
|
}
|
|
1693
1770
|
var BOXED_GAP = 12;
|
|
1694
|
-
var
|
|
1771
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
1695
1772
|
container: { alignSelf: "stretch" },
|
|
1696
1773
|
boxed: { gap: BOXED_GAP }
|
|
1697
1774
|
});
|
|
@@ -1748,7 +1825,7 @@ var Accordion = ({
|
|
|
1748
1825
|
[openSet, toggle, allowMultiple, variant]
|
|
1749
1826
|
);
|
|
1750
1827
|
const containerStyle = React11.useMemo(() => {
|
|
1751
|
-
const base = variant === "boxed" ? [
|
|
1828
|
+
const base = variant === "boxed" ? [styles16.container, styles16.boxed] : [styles16.container];
|
|
1752
1829
|
if (style === void 0) return base;
|
|
1753
1830
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
1754
1831
|
}, [style, variant]);
|
|
@@ -1780,7 +1857,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
1780
1857
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
1781
1858
|
var BOX_MARKER_GAP = 6;
|
|
1782
1859
|
var BOX_MARKER = "\u25B8";
|
|
1783
|
-
var
|
|
1860
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
1784
1861
|
item: { borderTopWidth: reactNative.StyleSheet.hairlineWidth },
|
|
1785
1862
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
1786
1863
|
header: {
|
|
@@ -1856,19 +1933,19 @@ var AccordionItem = ({
|
|
|
1856
1933
|
);
|
|
1857
1934
|
const keyboardProps = reactNative.Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
1858
1935
|
const itemStyle = React11.useMemo(
|
|
1859
|
-
() => boxed ? [
|
|
1936
|
+
() => boxed ? [styles17.boxItem, { borderColor: colors.border }] : [styles17.item, { borderTopColor: colors.border }],
|
|
1860
1937
|
[boxed, colors.border]
|
|
1861
1938
|
);
|
|
1862
1939
|
const headerStyle = React11.useMemo(
|
|
1863
1940
|
() => [
|
|
1864
|
-
|
|
1865
|
-
...boxed ? [
|
|
1941
|
+
styles17.header,
|
|
1942
|
+
...boxed ? [styles17.boxHeader] : [],
|
|
1866
1943
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
1867
1944
|
],
|
|
1868
1945
|
[boxed, disabled]
|
|
1869
1946
|
);
|
|
1870
1947
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
1871
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ?
|
|
1948
|
+
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ? styles17.boxTitle : styles17.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
|
|
1872
1949
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: itemStyle, children: [
|
|
1873
1950
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1874
1951
|
reactNative.Pressable,
|
|
@@ -1885,7 +1962,7 @@ var AccordionItem = ({
|
|
|
1885
1962
|
onPress: handlePress,
|
|
1886
1963
|
...keyboardProps,
|
|
1887
1964
|
children: [
|
|
1888
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1965
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles17.headerLeft, boxed ? styles17.headerLeftRow : null], children: [
|
|
1889
1966
|
boxed ? (
|
|
1890
1967
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
1891
1968
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1894,15 +1971,15 @@ var AccordionItem = ({
|
|
|
1894
1971
|
accessibilityElementsHidden: true,
|
|
1895
1972
|
"aria-hidden": true,
|
|
1896
1973
|
importantForAccessibility: "no-hide-descendants",
|
|
1897
|
-
style: [
|
|
1974
|
+
style: [styles17.marker, { transform: [{ rotate }] }],
|
|
1898
1975
|
testID: chevronTestID,
|
|
1899
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1976
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
1900
1977
|
}
|
|
1901
1978
|
)
|
|
1902
1979
|
) : null,
|
|
1903
1980
|
titleNode
|
|
1904
1981
|
] }),
|
|
1905
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1982
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.headerRight, children: [
|
|
1906
1983
|
right,
|
|
1907
1984
|
boxed ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1908
1985
|
reactNative.Animated.View,
|
|
@@ -1910,7 +1987,7 @@ var AccordionItem = ({
|
|
|
1910
1987
|
accessibilityElementsHidden: true,
|
|
1911
1988
|
"aria-hidden": true,
|
|
1912
1989
|
importantForAccessibility: "no-hide-descendants",
|
|
1913
|
-
style: [
|
|
1990
|
+
style: [styles17.chevron, { transform: [{ rotate }] }],
|
|
1914
1991
|
children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
1915
1992
|
}
|
|
1916
1993
|
)
|
|
@@ -1924,7 +2001,7 @@ var AccordionItem = ({
|
|
|
1924
2001
|
accessibilityLabel: resolvedLabel,
|
|
1925
2002
|
nativeID: bodyTestID,
|
|
1926
2003
|
role: ROLE_REGION,
|
|
1927
|
-
style: boxed ?
|
|
2004
|
+
style: boxed ? styles17.boxBody : styles17.body,
|
|
1928
2005
|
testID: bodyTestID,
|
|
1929
2006
|
children
|
|
1930
2007
|
}
|
|
@@ -1987,7 +2064,7 @@ function useAvailableWidth() {
|
|
|
1987
2064
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
1988
2065
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
1989
2066
|
var UNMEASURED2 = 0;
|
|
1990
|
-
var
|
|
2067
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
1991
2068
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
1992
2069
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
1993
2070
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2018,7 +2095,7 @@ var TruncatedText = ({
|
|
|
2018
2095
|
[value, measureRef]
|
|
2019
2096
|
);
|
|
2020
2097
|
const flatStyle = React11.useMemo(
|
|
2021
|
-
() => reactNative.StyleSheet.flatten([
|
|
2098
|
+
() => reactNative.StyleSheet.flatten([styles18.base, style]),
|
|
2022
2099
|
[style]
|
|
2023
2100
|
);
|
|
2024
2101
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
@@ -2033,7 +2110,7 @@ var TruncatedText = ({
|
|
|
2033
2110
|
ref: attachRef,
|
|
2034
2111
|
onLayout,
|
|
2035
2112
|
numberOfLines: 1,
|
|
2036
|
-
style: [
|
|
2113
|
+
style: [styles18.base, styles18.fill, style],
|
|
2037
2114
|
testID,
|
|
2038
2115
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2039
2116
|
accessibilityLabel,
|
|
@@ -2136,7 +2213,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2136
2213
|
var ACTION_PADDING_H = 6;
|
|
2137
2214
|
var ACTION_PADDING_V = 2;
|
|
2138
2215
|
var ACTION_RADIUS = 6;
|
|
2139
|
-
var
|
|
2216
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
2140
2217
|
cell: { gap: CELL_GAP },
|
|
2141
2218
|
label: {
|
|
2142
2219
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2201,14 +2278,14 @@ var CopyableId = ({
|
|
|
2201
2278
|
const { colors } = theme;
|
|
2202
2279
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2203
2280
|
const action = useActionState(status);
|
|
2204
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2205
|
-
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2206
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2207
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2281
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.cell, style], testID, children: [
|
|
2282
|
+
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.label, { color: colors.textSecondary }], children: label }),
|
|
2283
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.row, children: [
|
|
2284
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.valueWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2208
2285
|
TruncatedText,
|
|
2209
2286
|
{
|
|
2210
2287
|
value,
|
|
2211
|
-
style: [
|
|
2288
|
+
style: [styles19.value, { color: colors.text }],
|
|
2212
2289
|
testID: `${testID}-value`,
|
|
2213
2290
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2214
2291
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2222,7 +2299,7 @@ var CopyableId = ({
|
|
|
2222
2299
|
accessibilityLabel: t(action.key),
|
|
2223
2300
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2224
2301
|
testID: `${testID}-copy`,
|
|
2225
|
-
style: [
|
|
2302
|
+
style: [styles19.action, { color: action.color }],
|
|
2226
2303
|
children: t(action.key)
|
|
2227
2304
|
}
|
|
2228
2305
|
)
|
|
@@ -2277,7 +2354,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
2277
2354
|
var FOOTER_PADDING_H = 12;
|
|
2278
2355
|
var FOOTER_FONT_SIZE = 11;
|
|
2279
2356
|
var FOOTER_OPACITY = 0.75;
|
|
2280
|
-
var
|
|
2357
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
2281
2358
|
footer: {
|
|
2282
2359
|
paddingVertical: FOOTER_PADDING_V,
|
|
2283
2360
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -2303,7 +2380,7 @@ var BuildInfoFooter = ({
|
|
|
2303
2380
|
const commit = apiCommit ?? fetchedCommit;
|
|
2304
2381
|
const label = formatBuildInfo(buildVersion, commit);
|
|
2305
2382
|
const textStyle = React11.useMemo(
|
|
2306
|
-
() => [
|
|
2383
|
+
() => [styles20.text, { color: theme.colors.textSecondary }],
|
|
2307
2384
|
[theme.colors.textSecondary]
|
|
2308
2385
|
);
|
|
2309
2386
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2311,7 +2388,7 @@ var BuildInfoFooter = ({
|
|
|
2311
2388
|
{
|
|
2312
2389
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2313
2390
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
2314
|
-
style: [
|
|
2391
|
+
style: [styles20.footer, style],
|
|
2315
2392
|
testID,
|
|
2316
2393
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label })
|
|
2317
2394
|
}
|
|
@@ -2321,6 +2398,7 @@ var BuildInfoFooter = ({
|
|
|
2321
2398
|
exports.API_COMMIT_SEPARATOR = API_COMMIT_SEPARATOR;
|
|
2322
2399
|
exports.Accordion = Accordion;
|
|
2323
2400
|
exports.AccordionItem = AccordionItem;
|
|
2401
|
+
exports.AppText = AppText;
|
|
2324
2402
|
exports.BUILD_INFO_PREFIX = BUILD_INFO_PREFIX;
|
|
2325
2403
|
exports.BuildInfoFooter = BuildInfoFooter;
|
|
2326
2404
|
exports.COPY_FEEDBACK_MS = COPY_FEEDBACK_MS;
|
|
@@ -2338,7 +2416,9 @@ exports.MIN_TARGET_PX = MIN_TARGET_PX;
|
|
|
2338
2416
|
exports.Modal = Modal3;
|
|
2339
2417
|
exports.ModalDropdown = ModalDropdown;
|
|
2340
2418
|
exports.ModalShell = ModalShell;
|
|
2419
|
+
exports.ScreenColumn = ScreenColumn;
|
|
2341
2420
|
exports.Section = Section;
|
|
2421
|
+
exports.SectionVariant = SectionVariant;
|
|
2342
2422
|
exports.SegmentedControl = SegmentedControl;
|
|
2343
2423
|
exports.SelectedMarker = SelectedMarker;
|
|
2344
2424
|
exports.StatusBadge = StatusBadge;
|
|
@@ -2346,6 +2426,7 @@ exports.StickyPreview = StickyPreview;
|
|
|
2346
2426
|
exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
|
|
2347
2427
|
exports.Tabs = Tabs;
|
|
2348
2428
|
exports.TabsCollapsedTrigger = TabsCollapsedTrigger;
|
|
2429
|
+
exports.TextKind = TextKind;
|
|
2349
2430
|
exports.TruncatedText = TruncatedText;
|
|
2350
2431
|
exports.UpgradePrompt = UpgradePrompt;
|
|
2351
2432
|
exports.copyText = copyText;
|
|
@@ -2359,6 +2440,7 @@ exports.truncateMiddle = truncateMiddle;
|
|
|
2359
2440
|
exports.useApiCommit = useApiCommit;
|
|
2360
2441
|
exports.useCopyToClipboard = useCopyToClipboard;
|
|
2361
2442
|
exports.useFocusTrap = useFocusTrap;
|
|
2443
|
+
exports.useIsWideViewport = useIsWideViewport;
|
|
2362
2444
|
exports.useVisibleViewport = useVisibleViewport;
|
|
2363
2445
|
//# sourceMappingURL=index.js.map
|
|
2364
2446
|
//# sourceMappingURL=index.js.map
|