@dloizides/ui-layout 1.33.0 → 1.35.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 +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +185 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -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
|
});
|
|
@@ -269,6 +346,7 @@ var StickyPreview = ({
|
|
|
269
346
|
forceCompact = false,
|
|
270
347
|
topOffset = 0,
|
|
271
348
|
accessibilityLabel,
|
|
349
|
+
accessibilityHint,
|
|
272
350
|
testID = LAYOUT_TEST_IDS.stickyPreview
|
|
273
351
|
}) => {
|
|
274
352
|
const { theme } = uiFeedback.useUi();
|
|
@@ -280,16 +358,17 @@ var StickyPreview = ({
|
|
|
280
358
|
return reactNative.Platform.OS === WEB_PLATFORM ? web : {};
|
|
281
359
|
}, [offsetTop, topOffset]);
|
|
282
360
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
283
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style:
|
|
361
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style: styles5.sentinel }),
|
|
284
362
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
285
363
|
reactNative.View,
|
|
286
364
|
{
|
|
365
|
+
accessibilityHint,
|
|
287
366
|
accessibilityLabel,
|
|
288
367
|
role: "region",
|
|
289
368
|
style: [
|
|
290
369
|
pinned,
|
|
291
370
|
{ backgroundColor: theme.colors.background, borderColor: theme.colors.border },
|
|
292
|
-
isCompact &&
|
|
371
|
+
isCompact && styles5.compact
|
|
293
372
|
],
|
|
294
373
|
testID,
|
|
295
374
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}-${isCompact ? "compact" : "full"}`, children: isCompact ? compact : full })
|
|
@@ -308,7 +387,7 @@ var BORDER_WIDTH = 1;
|
|
|
308
387
|
var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
|
|
309
388
|
var SHADOW_ELEVATION = 2;
|
|
310
389
|
var TRANSPARENT = "transparent";
|
|
311
|
-
var
|
|
390
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
312
391
|
track: {
|
|
313
392
|
flexDirection: "row",
|
|
314
393
|
alignSelf: "flex-start",
|
|
@@ -353,7 +432,7 @@ function SegmentedControl({
|
|
|
353
432
|
{
|
|
354
433
|
accessibilityRole: "tablist",
|
|
355
434
|
"aria-label": accessibilityLabel,
|
|
356
|
-
style: [
|
|
435
|
+
style: [styles6.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
|
|
357
436
|
testID,
|
|
358
437
|
children: options.map((opt) => {
|
|
359
438
|
const selected = opt.value === value;
|
|
@@ -366,13 +445,13 @@ function SegmentedControl({
|
|
|
366
445
|
accessibilityHint: opt.accessibilityHint,
|
|
367
446
|
onPress: () => onChange(opt.value),
|
|
368
447
|
style: [
|
|
369
|
-
|
|
370
|
-
selected ?
|
|
448
|
+
styles6.segment,
|
|
449
|
+
selected ? styles6.segmentSelected : null,
|
|
371
450
|
{ backgroundColor: selected ? colors.surface : TRANSPARENT }
|
|
372
451
|
],
|
|
373
452
|
testID: opt.testID,
|
|
374
453
|
...ariaSelectedProps(selected),
|
|
375
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
454
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
|
|
376
455
|
},
|
|
377
456
|
opt.value
|
|
378
457
|
);
|
|
@@ -509,7 +588,7 @@ var HEADING_PADDING_H = 16;
|
|
|
509
588
|
var HEADING_PADDING_TOP = 8;
|
|
510
589
|
var HEADING_PADDING_BOTTOM = 4;
|
|
511
590
|
var HEADING_LETTER_SPACING = 0.5;
|
|
512
|
-
var
|
|
591
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
513
592
|
heading: {
|
|
514
593
|
fontSize: HEADING_FONT_SIZE,
|
|
515
594
|
fontWeight: HEADING_FONT_WEIGHT,
|
|
@@ -525,7 +604,7 @@ var MenuHeading = ({ testID, text }) => {
|
|
|
525
604
|
reactNative.Text,
|
|
526
605
|
{
|
|
527
606
|
accessibilityRole: "header",
|
|
528
|
-
style: [
|
|
607
|
+
style: [styles7.heading, { color: theme.colors.textSecondary }],
|
|
529
608
|
testID: `${testID}-menu-heading`,
|
|
530
609
|
children: text
|
|
531
610
|
}
|
|
@@ -546,7 +625,7 @@ var OPTION_PADDING_V = 12;
|
|
|
546
625
|
var ACCENT_BAR_WIDTH = 3;
|
|
547
626
|
var CHECK_GAP = 8;
|
|
548
627
|
var CHECK_GLYPH = "\u2713";
|
|
549
|
-
var
|
|
628
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
550
629
|
option: {
|
|
551
630
|
paddingHorizontal: OPTION_PADDING_H,
|
|
552
631
|
paddingVertical: OPTION_PADDING_V,
|
|
@@ -585,16 +664,16 @@ var OptionRow = ({
|
|
|
585
664
|
const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
|
|
586
665
|
const isActive = isSelected || isHighlighted;
|
|
587
666
|
const rowStyle = [
|
|
588
|
-
|
|
589
|
-
isMarked ?
|
|
667
|
+
styles8.option,
|
|
668
|
+
isMarked ? styles8.markedRow : null,
|
|
590
669
|
isActive ? { backgroundColor: colors.surfaceElevated } : null,
|
|
591
670
|
isMarked && isSelected ? { borderLeftColor: accentColor } : null
|
|
592
671
|
];
|
|
593
672
|
const textStyle = [
|
|
594
|
-
|
|
673
|
+
styles8.optionText,
|
|
595
674
|
{ color: colors.text },
|
|
596
|
-
isSelected ?
|
|
597
|
-
isMarked ?
|
|
675
|
+
isSelected ? styles8.selectedText : null,
|
|
676
|
+
isMarked ? styles8.markedText : null
|
|
598
677
|
];
|
|
599
678
|
const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
|
|
600
679
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -610,7 +689,7 @@ var OptionRow = ({
|
|
|
610
689
|
onPress: handlePress,
|
|
611
690
|
children: [
|
|
612
691
|
/* @__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: [
|
|
692
|
+
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
693
|
]
|
|
615
694
|
}
|
|
616
695
|
);
|
|
@@ -768,7 +847,7 @@ var IS_WEB2 = reactNative.Platform.OS === "web";
|
|
|
768
847
|
var BORDER_RADIUS2 = 8;
|
|
769
848
|
var BORDER_WIDTH3 = 1;
|
|
770
849
|
var MENU_PADDING2 = 4;
|
|
771
|
-
var
|
|
850
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
772
851
|
/** Native (in-tree) popover — anchored absolutely just under the trigger. */
|
|
773
852
|
popover: {
|
|
774
853
|
position: "absolute",
|
|
@@ -855,7 +934,7 @@ var InlineMenu = ({
|
|
|
855
934
|
themed
|
|
856
935
|
];
|
|
857
936
|
}
|
|
858
|
-
return [
|
|
937
|
+
return [styles9.popover, { minWidth: menuMinWidth }, themed];
|
|
859
938
|
}, [colors.border, colors.surface, menuMinWidth, rect]);
|
|
860
939
|
const menu = /* @__PURE__ */ jsxRuntime.jsx(
|
|
861
940
|
reactNative.View,
|
|
@@ -870,10 +949,10 @@ var InlineMenu = ({
|
|
|
870
949
|
reactNative.Animated.View,
|
|
871
950
|
{
|
|
872
951
|
pointerEvents: isOpen ? "auto" : "none",
|
|
873
|
-
style: [
|
|
952
|
+
style: [styles9.animated, animatedStyle, isOpen ? null : styles9.inert],
|
|
874
953
|
children: [
|
|
875
954
|
menuHeading !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
876
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style:
|
|
955
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style: styles9.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
877
956
|
OptionRow,
|
|
878
957
|
{
|
|
879
958
|
asMenuItem: true,
|
|
@@ -921,7 +1000,7 @@ var CARET_OPEN_ROTATION = "180deg";
|
|
|
921
1000
|
var CARET_CLOSED_ROTATION = "0deg";
|
|
922
1001
|
var POPOVER_ENTER_SCALE = 0.96;
|
|
923
1002
|
var POPOVER_MOTION_MS = 120;
|
|
924
|
-
var
|
|
1003
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
925
1004
|
anchor: { position: "relative" },
|
|
926
1005
|
container: {
|
|
927
1006
|
borderWidth: BORDER_WIDTH4,
|
|
@@ -1036,19 +1115,19 @@ var ModalDropdown = ({
|
|
|
1036
1115
|
const isCaret = showCaret && !isHamburger;
|
|
1037
1116
|
const containerStyle = React11.useMemo(
|
|
1038
1117
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1039
|
-
|
|
1040
|
-
isHamburger ?
|
|
1118
|
+
styles10.container,
|
|
1119
|
+
isHamburger ? styles10.containerHamburger : isCaret ? styles10.containerMenu : null,
|
|
1041
1120
|
{ borderColor: colors.border, backgroundColor: colors.surface }
|
|
1042
1121
|
],
|
|
1043
1122
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1044
1123
|
);
|
|
1045
1124
|
const hamburgerStyle = React11.useMemo(
|
|
1046
|
-
() => [
|
|
1125
|
+
() => [styles10.hamburger, { color: colors.textSecondary }],
|
|
1047
1126
|
[colors.textSecondary]
|
|
1048
1127
|
);
|
|
1049
1128
|
const caretStyle = React11.useMemo(
|
|
1050
1129
|
() => [
|
|
1051
|
-
|
|
1130
|
+
styles10.caret,
|
|
1052
1131
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1053
1132
|
],
|
|
1054
1133
|
[colors.textSecondary, isOpen]
|
|
@@ -1058,11 +1137,11 @@ var ModalDropdown = ({
|
|
|
1058
1137
|
[optionTestID, testID]
|
|
1059
1138
|
);
|
|
1060
1139
|
const anchorStyle = React11.useMemo(
|
|
1061
|
-
() => [
|
|
1140
|
+
() => [styles10.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1062
1141
|
[isMenu, isOpen]
|
|
1063
1142
|
);
|
|
1064
1143
|
const modalContentStyle = React11.useMemo(
|
|
1065
|
-
() => [
|
|
1144
|
+
() => [styles10.modalContent, { backgroundColor: colors.surface }],
|
|
1066
1145
|
[colors.surface]
|
|
1067
1146
|
);
|
|
1068
1147
|
const renderModalOption = React11.useCallback(
|
|
@@ -1083,11 +1162,11 @@ var ModalDropdown = ({
|
|
|
1083
1162
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1084
1163
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1085
1164
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
|
|
1086
|
-
/* @__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 })
|
|
1087
1166
|
] }) : isCaret ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1088
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [
|
|
1167
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles10.selectedText, styles10.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
|
|
1089
1168
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: caretStyle, children: CARET_GLYPH })
|
|
1090
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1169
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.selectedText, { color: colors.text }], children: selectedLabel }),
|
|
1091
1170
|
hintNode
|
|
1092
1171
|
] }),
|
|
1093
1172
|
isMenu && menuAnim.mounted ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1108,7 +1187,7 @@ var ModalDropdown = ({
|
|
|
1108
1187
|
onSelect: handleSelect
|
|
1109
1188
|
}
|
|
1110
1189
|
) : null,
|
|
1111
|
-
!isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1190
|
+
!isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles10.modalOverlay, children: [
|
|
1112
1191
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1192
|
reactNative.TouchableOpacity,
|
|
1114
1193
|
{
|
|
@@ -1201,7 +1280,7 @@ var ROW_PAD_V = 8;
|
|
|
1201
1280
|
var PANEL_PAD_TOP = 16;
|
|
1202
1281
|
var BORDER_WIDTH5 = 1;
|
|
1203
1282
|
var TEXT_ON_PRIMARY = "#ffffff";
|
|
1204
|
-
var
|
|
1283
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
1205
1284
|
root: {
|
|
1206
1285
|
width: "100%"
|
|
1207
1286
|
},
|
|
@@ -1255,7 +1334,7 @@ var WideTabStrip = ({
|
|
|
1255
1334
|
textSecondary,
|
|
1256
1335
|
surfaceElevated,
|
|
1257
1336
|
stripStyle
|
|
1258
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
1337
|
+
}) => /* @__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
1338
|
const selected = tab.key === activeKey;
|
|
1260
1339
|
const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
|
|
1261
1340
|
const pillColor = selected ? primaryColor : surfaceElevated;
|
|
@@ -1269,10 +1348,10 @@ var WideTabStrip = ({
|
|
|
1269
1348
|
accessibilityLabel: tab.accessibilityLabel ?? tab.label,
|
|
1270
1349
|
accessibilityHint: tab.accessibilityHint,
|
|
1271
1350
|
onPress: () => onChange(tab.key),
|
|
1272
|
-
style: [
|
|
1351
|
+
style: [styles11.pill, { backgroundColor: pillColor }],
|
|
1273
1352
|
testID: tab.testID,
|
|
1274
1353
|
...ariaTabProps(selected, panelId, tabId),
|
|
1275
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1354
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.pillText, { color: textColor }], children: tab.label })
|
|
1276
1355
|
},
|
|
1277
1356
|
tab.key
|
|
1278
1357
|
);
|
|
@@ -1297,7 +1376,7 @@ var Tabs = ({
|
|
|
1297
1376
|
const activePanelId = `${idPrefix}-panel-${activeKey}`;
|
|
1298
1377
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
1299
1378
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
1300
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1379
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles11.root, style], testID, children: [
|
|
1301
1380
|
collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
1381
|
TabsMenu,
|
|
1303
1382
|
{
|
|
@@ -1324,7 +1403,7 @@ var Tabs = ({
|
|
|
1324
1403
|
onChange
|
|
1325
1404
|
}
|
|
1326
1405
|
),
|
|
1327
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [
|
|
1406
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [styles11.panel, panelStyle], ...panelAria, children })
|
|
1328
1407
|
] });
|
|
1329
1408
|
};
|
|
1330
1409
|
var PROMPT_PADDING = 20;
|
|
@@ -1339,7 +1418,7 @@ var DISMISS_FONT_SIZE = 13;
|
|
|
1339
1418
|
var TITLE_MARGIN_BOTTOM = 8;
|
|
1340
1419
|
var MESSAGE_MARGIN_BOTTOM = 16;
|
|
1341
1420
|
var CTA_MARGIN_BOTTOM = 8;
|
|
1342
|
-
var
|
|
1421
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
1343
1422
|
container: {
|
|
1344
1423
|
padding: PROMPT_PADDING,
|
|
1345
1424
|
borderRadius: PROMPT_BORDER_RADIUS,
|
|
@@ -1374,21 +1453,21 @@ var UpgradePrompt = ({
|
|
|
1374
1453
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1375
1454
|
reactNative.View,
|
|
1376
1455
|
{
|
|
1377
|
-
style: [
|
|
1456
|
+
style: [styles12.container, { borderColor: primary, backgroundColor: colors.surface }],
|
|
1378
1457
|
testID: LAYOUT_TEST_IDS.upgradePrompt,
|
|
1379
1458
|
children: [
|
|
1380
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1381
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1459
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
|
|
1382
1461
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1383
1462
|
reactNative.TouchableOpacity,
|
|
1384
1463
|
{
|
|
1385
1464
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
|
|
1386
1465
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
|
|
1387
1466
|
accessibilityRole: "button",
|
|
1388
|
-
style: [
|
|
1467
|
+
style: [styles12.cta, { backgroundColor: primary }],
|
|
1389
1468
|
testID: LAYOUT_TEST_IDS.upgradePromptCta,
|
|
1390
1469
|
onPress: handleUpgradePress,
|
|
1391
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1470
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
|
|
1392
1471
|
}
|
|
1393
1472
|
),
|
|
1394
1473
|
onDismiss ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1397,10 +1476,10 @@ var UpgradePrompt = ({
|
|
|
1397
1476
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
|
|
1398
1477
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
|
|
1399
1478
|
accessibilityRole: "button",
|
|
1400
|
-
style:
|
|
1479
|
+
style: styles12.dismiss,
|
|
1401
1480
|
testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
|
|
1402
1481
|
onPress: onDismiss,
|
|
1403
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1482
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
|
|
1404
1483
|
}
|
|
1405
1484
|
) : null
|
|
1406
1485
|
]
|
|
@@ -1409,7 +1488,7 @@ var UpgradePrompt = ({
|
|
|
1409
1488
|
};
|
|
1410
1489
|
var CLOSE_ICON_SIZE = 18;
|
|
1411
1490
|
var PANEL_ENTER_SCALE = 0.96;
|
|
1412
|
-
var
|
|
1491
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
1413
1492
|
animatedFill: { flex: 1 },
|
|
1414
1493
|
container: {
|
|
1415
1494
|
flex: 1,
|
|
@@ -1436,7 +1515,7 @@ var ModalShell = ({
|
|
|
1436
1515
|
const { theme, t } = uiFeedback.useUi();
|
|
1437
1516
|
const { style: sheetStyle, mounted } = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
|
|
1438
1517
|
const containerStyle = React11__default.default.useMemo(
|
|
1439
|
-
() => [
|
|
1518
|
+
() => [styles13.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
1440
1519
|
[theme.colors.background, contentStyle]
|
|
1441
1520
|
);
|
|
1442
1521
|
const closeA11yLabel = t(LAYOUT_I18N.close);
|
|
@@ -1448,7 +1527,7 @@ var ModalShell = ({
|
|
|
1448
1527
|
testID: LAYOUT_TEST_IDS.modalShell,
|
|
1449
1528
|
visible: mounted,
|
|
1450
1529
|
onRequestClose: onCancel,
|
|
1451
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [
|
|
1530
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1452
1531
|
reactNative.ScrollView,
|
|
1453
1532
|
{
|
|
1454
1533
|
accessibilityViewIsModal: true,
|
|
@@ -1456,7 +1535,7 @@ var ModalShell = ({
|
|
|
1456
1535
|
role: "dialog",
|
|
1457
1536
|
style: containerStyle,
|
|
1458
1537
|
children: [
|
|
1459
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1538
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.headerRow, children: [
|
|
1460
1539
|
/* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
|
|
1461
1540
|
showClose ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
1541
|
reactNative.TouchableOpacity,
|
|
@@ -1464,7 +1543,7 @@ var ModalShell = ({
|
|
|
1464
1543
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
1465
1544
|
accessibilityLabel: closeA11yLabel,
|
|
1466
1545
|
accessibilityRole: "button",
|
|
1467
|
-
style:
|
|
1546
|
+
style: styles13.closeButton,
|
|
1468
1547
|
testID: LAYOUT_TEST_IDS.modalShellClose,
|
|
1469
1548
|
onPress: onCancel,
|
|
1470
1549
|
children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
|
|
@@ -1510,7 +1589,7 @@ var HEADER_MARGIN = 12;
|
|
|
1510
1589
|
var DIALOG_MAX_HEIGHT = "90%";
|
|
1511
1590
|
var PANEL_ENTER_SCALE2 = 0.96;
|
|
1512
1591
|
var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640 };
|
|
1513
|
-
var
|
|
1592
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
1514
1593
|
overlay: {
|
|
1515
1594
|
flex: 1,
|
|
1516
1595
|
justifyContent: "center",
|
|
@@ -1562,15 +1641,15 @@ var Modal3 = ({
|
|
|
1562
1641
|
const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
|
|
1563
1642
|
const closeLabel = t(LAYOUT_I18N.dialogClose);
|
|
1564
1643
|
const dialogStyle = React11.useMemo(
|
|
1565
|
-
() => [
|
|
1644
|
+
() => [styles14.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
|
|
1566
1645
|
[theme.colors.surface, size]
|
|
1567
1646
|
);
|
|
1568
1647
|
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:
|
|
1648
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.overlay, children: [
|
|
1570
1649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
1650
|
reactNative.Animated.View,
|
|
1572
1651
|
{
|
|
1573
|
-
style: [reactNative.StyleSheet.absoluteFill,
|
|
1652
|
+
style: [reactNative.StyleSheet.absoluteFill, styles14.scrim, { opacity: backdrop.style.opacity }]
|
|
1574
1653
|
}
|
|
1575
1654
|
),
|
|
1576
1655
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1596,8 +1675,8 @@ var Modal3 = ({
|
|
|
1596
1675
|
style: [dialogStyle, panel.style],
|
|
1597
1676
|
testID,
|
|
1598
1677
|
children: [
|
|
1599
|
-
hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1600
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
1678
|
+
hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.headerRow, children: [
|
|
1679
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles14.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title }) : null }),
|
|
1601
1680
|
showClose ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1602
1681
|
uiButtons.IconButton,
|
|
1603
1682
|
{
|
|
@@ -1614,7 +1693,7 @@ var Modal3 = ({
|
|
|
1614
1693
|
) : null
|
|
1615
1694
|
] }) : null,
|
|
1616
1695
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { children }),
|
|
1617
|
-
footer !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
1696
|
+
footer !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles14.footer, children: footer }) : null
|
|
1618
1697
|
]
|
|
1619
1698
|
}
|
|
1620
1699
|
)
|
|
@@ -1623,7 +1702,7 @@ var Modal3 = ({
|
|
|
1623
1702
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
1624
1703
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
1625
1704
|
var BUTTON_GAP = 12;
|
|
1626
|
-
var
|
|
1705
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
1627
1706
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
|
|
1628
1707
|
footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
|
|
1629
1708
|
});
|
|
@@ -1642,7 +1721,7 @@ var ConfirmDialog = ({
|
|
|
1642
1721
|
const { theme, t } = uiFeedback.useUi();
|
|
1643
1722
|
const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
|
|
1644
1723
|
const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
|
|
1645
|
-
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1724
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.footer, children: [
|
|
1646
1725
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
1726
|
uiButtons.Button,
|
|
1648
1727
|
{
|
|
@@ -1678,7 +1757,7 @@ var ConfirmDialog = ({
|
|
|
1678
1757
|
title,
|
|
1679
1758
|
visible,
|
|
1680
1759
|
onClose: onCancel,
|
|
1681
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1760
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
1682
1761
|
}
|
|
1683
1762
|
);
|
|
1684
1763
|
};
|
|
@@ -1691,7 +1770,7 @@ function useAccordionContext() {
|
|
|
1691
1770
|
return value;
|
|
1692
1771
|
}
|
|
1693
1772
|
var BOXED_GAP = 12;
|
|
1694
|
-
var
|
|
1773
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
1695
1774
|
container: { alignSelf: "stretch" },
|
|
1696
1775
|
boxed: { gap: BOXED_GAP }
|
|
1697
1776
|
});
|
|
@@ -1748,7 +1827,7 @@ var Accordion = ({
|
|
|
1748
1827
|
[openSet, toggle, allowMultiple, variant]
|
|
1749
1828
|
);
|
|
1750
1829
|
const containerStyle = React11.useMemo(() => {
|
|
1751
|
-
const base = variant === "boxed" ? [
|
|
1830
|
+
const base = variant === "boxed" ? [styles16.container, styles16.boxed] : [styles16.container];
|
|
1752
1831
|
if (style === void 0) return base;
|
|
1753
1832
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
1754
1833
|
}, [style, variant]);
|
|
@@ -1780,7 +1859,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
1780
1859
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
1781
1860
|
var BOX_MARKER_GAP = 6;
|
|
1782
1861
|
var BOX_MARKER = "\u25B8";
|
|
1783
|
-
var
|
|
1862
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
1784
1863
|
item: { borderTopWidth: reactNative.StyleSheet.hairlineWidth },
|
|
1785
1864
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
1786
1865
|
header: {
|
|
@@ -1856,19 +1935,19 @@ var AccordionItem = ({
|
|
|
1856
1935
|
);
|
|
1857
1936
|
const keyboardProps = reactNative.Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
1858
1937
|
const itemStyle = React11.useMemo(
|
|
1859
|
-
() => boxed ? [
|
|
1938
|
+
() => boxed ? [styles17.boxItem, { borderColor: colors.border }] : [styles17.item, { borderTopColor: colors.border }],
|
|
1860
1939
|
[boxed, colors.border]
|
|
1861
1940
|
);
|
|
1862
1941
|
const headerStyle = React11.useMemo(
|
|
1863
1942
|
() => [
|
|
1864
|
-
|
|
1865
|
-
...boxed ? [
|
|
1943
|
+
styles17.header,
|
|
1944
|
+
...boxed ? [styles17.boxHeader] : [],
|
|
1866
1945
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
1867
1946
|
],
|
|
1868
1947
|
[boxed, disabled]
|
|
1869
1948
|
);
|
|
1870
1949
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
1871
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ?
|
|
1950
|
+
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
1951
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: itemStyle, children: [
|
|
1873
1952
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1874
1953
|
reactNative.Pressable,
|
|
@@ -1885,7 +1964,7 @@ var AccordionItem = ({
|
|
|
1885
1964
|
onPress: handlePress,
|
|
1886
1965
|
...keyboardProps,
|
|
1887
1966
|
children: [
|
|
1888
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1967
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles17.headerLeft, boxed ? styles17.headerLeftRow : null], children: [
|
|
1889
1968
|
boxed ? (
|
|
1890
1969
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
1891
1970
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1894,15 +1973,15 @@ var AccordionItem = ({
|
|
|
1894
1973
|
accessibilityElementsHidden: true,
|
|
1895
1974
|
"aria-hidden": true,
|
|
1896
1975
|
importantForAccessibility: "no-hide-descendants",
|
|
1897
|
-
style: [
|
|
1976
|
+
style: [styles17.marker, { transform: [{ rotate }] }],
|
|
1898
1977
|
testID: chevronTestID,
|
|
1899
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1978
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
1900
1979
|
}
|
|
1901
1980
|
)
|
|
1902
1981
|
) : null,
|
|
1903
1982
|
titleNode
|
|
1904
1983
|
] }),
|
|
1905
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1984
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.headerRight, children: [
|
|
1906
1985
|
right,
|
|
1907
1986
|
boxed ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1908
1987
|
reactNative.Animated.View,
|
|
@@ -1910,7 +1989,7 @@ var AccordionItem = ({
|
|
|
1910
1989
|
accessibilityElementsHidden: true,
|
|
1911
1990
|
"aria-hidden": true,
|
|
1912
1991
|
importantForAccessibility: "no-hide-descendants",
|
|
1913
|
-
style: [
|
|
1992
|
+
style: [styles17.chevron, { transform: [{ rotate }] }],
|
|
1914
1993
|
children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
1915
1994
|
}
|
|
1916
1995
|
)
|
|
@@ -1924,7 +2003,7 @@ var AccordionItem = ({
|
|
|
1924
2003
|
accessibilityLabel: resolvedLabel,
|
|
1925
2004
|
nativeID: bodyTestID,
|
|
1926
2005
|
role: ROLE_REGION,
|
|
1927
|
-
style: boxed ?
|
|
2006
|
+
style: boxed ? styles17.boxBody : styles17.body,
|
|
1928
2007
|
testID: bodyTestID,
|
|
1929
2008
|
children
|
|
1930
2009
|
}
|
|
@@ -1987,7 +2066,7 @@ function useAvailableWidth() {
|
|
|
1987
2066
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
1988
2067
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
1989
2068
|
var UNMEASURED2 = 0;
|
|
1990
|
-
var
|
|
2069
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
1991
2070
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
1992
2071
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
1993
2072
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2018,7 +2097,7 @@ var TruncatedText = ({
|
|
|
2018
2097
|
[value, measureRef]
|
|
2019
2098
|
);
|
|
2020
2099
|
const flatStyle = React11.useMemo(
|
|
2021
|
-
() => reactNative.StyleSheet.flatten([
|
|
2100
|
+
() => reactNative.StyleSheet.flatten([styles18.base, style]),
|
|
2022
2101
|
[style]
|
|
2023
2102
|
);
|
|
2024
2103
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
@@ -2033,7 +2112,7 @@ var TruncatedText = ({
|
|
|
2033
2112
|
ref: attachRef,
|
|
2034
2113
|
onLayout,
|
|
2035
2114
|
numberOfLines: 1,
|
|
2036
|
-
style: [
|
|
2115
|
+
style: [styles18.base, styles18.fill, style],
|
|
2037
2116
|
testID,
|
|
2038
2117
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2039
2118
|
accessibilityLabel,
|
|
@@ -2136,7 +2215,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2136
2215
|
var ACTION_PADDING_H = 6;
|
|
2137
2216
|
var ACTION_PADDING_V = 2;
|
|
2138
2217
|
var ACTION_RADIUS = 6;
|
|
2139
|
-
var
|
|
2218
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
2140
2219
|
cell: { gap: CELL_GAP },
|
|
2141
2220
|
label: {
|
|
2142
2221
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2201,14 +2280,14 @@ var CopyableId = ({
|
|
|
2201
2280
|
const { colors } = theme;
|
|
2202
2281
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2203
2282
|
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:
|
|
2283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.cell, style], testID, children: [
|
|
2284
|
+
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.label, { color: colors.textSecondary }], children: label }),
|
|
2285
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.row, children: [
|
|
2286
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.valueWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2208
2287
|
TruncatedText,
|
|
2209
2288
|
{
|
|
2210
2289
|
value,
|
|
2211
|
-
style: [
|
|
2290
|
+
style: [styles19.value, { color: colors.text }],
|
|
2212
2291
|
testID: `${testID}-value`,
|
|
2213
2292
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2214
2293
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2222,7 +2301,7 @@ var CopyableId = ({
|
|
|
2222
2301
|
accessibilityLabel: t(action.key),
|
|
2223
2302
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2224
2303
|
testID: `${testID}-copy`,
|
|
2225
|
-
style: [
|
|
2304
|
+
style: [styles19.action, { color: action.color }],
|
|
2226
2305
|
children: t(action.key)
|
|
2227
2306
|
}
|
|
2228
2307
|
)
|
|
@@ -2277,7 +2356,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
2277
2356
|
var FOOTER_PADDING_H = 12;
|
|
2278
2357
|
var FOOTER_FONT_SIZE = 11;
|
|
2279
2358
|
var FOOTER_OPACITY = 0.75;
|
|
2280
|
-
var
|
|
2359
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
2281
2360
|
footer: {
|
|
2282
2361
|
paddingVertical: FOOTER_PADDING_V,
|
|
2283
2362
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -2303,7 +2382,7 @@ var BuildInfoFooter = ({
|
|
|
2303
2382
|
const commit = apiCommit ?? fetchedCommit;
|
|
2304
2383
|
const label = formatBuildInfo(buildVersion, commit);
|
|
2305
2384
|
const textStyle = React11.useMemo(
|
|
2306
|
-
() => [
|
|
2385
|
+
() => [styles20.text, { color: theme.colors.textSecondary }],
|
|
2307
2386
|
[theme.colors.textSecondary]
|
|
2308
2387
|
);
|
|
2309
2388
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2311,7 +2390,7 @@ var BuildInfoFooter = ({
|
|
|
2311
2390
|
{
|
|
2312
2391
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2313
2392
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
2314
|
-
style: [
|
|
2393
|
+
style: [styles20.footer, style],
|
|
2315
2394
|
testID,
|
|
2316
2395
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label })
|
|
2317
2396
|
}
|
|
@@ -2321,6 +2400,7 @@ var BuildInfoFooter = ({
|
|
|
2321
2400
|
exports.API_COMMIT_SEPARATOR = API_COMMIT_SEPARATOR;
|
|
2322
2401
|
exports.Accordion = Accordion;
|
|
2323
2402
|
exports.AccordionItem = AccordionItem;
|
|
2403
|
+
exports.AppText = AppText;
|
|
2324
2404
|
exports.BUILD_INFO_PREFIX = BUILD_INFO_PREFIX;
|
|
2325
2405
|
exports.BuildInfoFooter = BuildInfoFooter;
|
|
2326
2406
|
exports.COPY_FEEDBACK_MS = COPY_FEEDBACK_MS;
|
|
@@ -2338,7 +2418,9 @@ exports.MIN_TARGET_PX = MIN_TARGET_PX;
|
|
|
2338
2418
|
exports.Modal = Modal3;
|
|
2339
2419
|
exports.ModalDropdown = ModalDropdown;
|
|
2340
2420
|
exports.ModalShell = ModalShell;
|
|
2421
|
+
exports.ScreenColumn = ScreenColumn;
|
|
2341
2422
|
exports.Section = Section;
|
|
2423
|
+
exports.SectionVariant = SectionVariant;
|
|
2342
2424
|
exports.SegmentedControl = SegmentedControl;
|
|
2343
2425
|
exports.SelectedMarker = SelectedMarker;
|
|
2344
2426
|
exports.StatusBadge = StatusBadge;
|
|
@@ -2346,6 +2428,7 @@ exports.StickyPreview = StickyPreview;
|
|
|
2346
2428
|
exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
|
|
2347
2429
|
exports.Tabs = Tabs;
|
|
2348
2430
|
exports.TabsCollapsedTrigger = TabsCollapsedTrigger;
|
|
2431
|
+
exports.TextKind = TextKind;
|
|
2349
2432
|
exports.TruncatedText = TruncatedText;
|
|
2350
2433
|
exports.UpgradePrompt = UpgradePrompt;
|
|
2351
2434
|
exports.copyText = copyText;
|
|
@@ -2359,6 +2442,7 @@ exports.truncateMiddle = truncateMiddle;
|
|
|
2359
2442
|
exports.useApiCommit = useApiCommit;
|
|
2360
2443
|
exports.useCopyToClipboard = useCopyToClipboard;
|
|
2361
2444
|
exports.useFocusTrap = useFocusTrap;
|
|
2445
|
+
exports.useIsWideViewport = useIsWideViewport;
|
|
2362
2446
|
exports.useVisibleViewport = useVisibleViewport;
|
|
2363
2447
|
//# sourceMappingURL=index.js.map
|
|
2364
2448
|
//# sourceMappingURL=index.js.map
|