@dloizides/ui-layout 1.32.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 +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +189 -101
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +186 -103
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React11, { createContext, useMemo, useState, useRef, useEffect, useCallback, useContext, useLayoutEffect } from 'react';
|
|
2
|
-
import { StyleSheet, Platform, View, Text, Pressable, TouchableOpacity, Modal, Animated, FlatList, ScrollView, Easing
|
|
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';
|
|
5
5
|
import { MIN_TOUCH_TARGET_PX, useA11y } from '@dloizides/a11y';
|
|
@@ -11,20 +11,79 @@ import { IconButton, Button } from '@dloizides/ui-buttons';
|
|
|
11
11
|
import { useReducedMotion } from '@dloizides/rn-web-hooks';
|
|
12
12
|
|
|
13
13
|
// src/Section/Section.tsx
|
|
14
|
+
|
|
15
|
+
// src/Section/SectionVariant.ts
|
|
16
|
+
var SectionVariant = /* @__PURE__ */ ((SectionVariant2) => {
|
|
17
|
+
SectionVariant2["Panel"] = "panel";
|
|
18
|
+
SectionVariant2["Card"] = "card";
|
|
19
|
+
return SectionVariant2;
|
|
20
|
+
})(SectionVariant || {});
|
|
14
21
|
var styles = StyleSheet.create({
|
|
15
22
|
card: {
|
|
16
23
|
padding: 16,
|
|
17
24
|
borderWidth: 1,
|
|
18
25
|
borderRadius: 6
|
|
26
|
+
},
|
|
27
|
+
raised: {
|
|
28
|
+
borderRadius: 12,
|
|
29
|
+
gap: 12
|
|
19
30
|
}
|
|
20
31
|
});
|
|
21
|
-
var Section = ({
|
|
32
|
+
var Section = ({
|
|
33
|
+
children,
|
|
34
|
+
style,
|
|
35
|
+
variant = "panel" /* Panel */,
|
|
36
|
+
testID
|
|
37
|
+
}) => {
|
|
22
38
|
const { theme } = useUi();
|
|
39
|
+
const isCard = variant === "card" /* Card */;
|
|
40
|
+
const fill = isCard ? theme.colors.background : theme.colors.surface;
|
|
23
41
|
const containerStyle = React11.useMemo(
|
|
24
|
-
() => [styles.card, { borderColor: theme.colors.border, backgroundColor:
|
|
25
|
-
[theme.colors.border,
|
|
42
|
+
() => [styles.card, isCard ? styles.raised : null, { borderColor: theme.colors.border, backgroundColor: fill }, style],
|
|
43
|
+
[theme.colors.border, fill, isCard, style]
|
|
44
|
+
);
|
|
45
|
+
return /* @__PURE__ */ jsx(View, { style: containerStyle, testID, children });
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/AppText/TextKind.ts
|
|
49
|
+
var TextKind = /* @__PURE__ */ ((TextKind2) => {
|
|
50
|
+
TextKind2["Title"] = "title";
|
|
51
|
+
TextKind2["Heading"] = "heading";
|
|
52
|
+
TextKind2["Body"] = "body";
|
|
53
|
+
TextKind2["Strong"] = "strong";
|
|
54
|
+
TextKind2["Muted"] = "muted";
|
|
55
|
+
TextKind2["Small"] = "small";
|
|
56
|
+
return TextKind2;
|
|
57
|
+
})(TextKind || {});
|
|
58
|
+
var SIZES = {
|
|
59
|
+
["title" /* Title */]: { fontSize: 24, fontWeight: "700", lineHeight: 30 },
|
|
60
|
+
["heading" /* Heading */]: { fontSize: 17, fontWeight: "700", lineHeight: 24 },
|
|
61
|
+
["body" /* Body */]: { fontSize: 15, lineHeight: 22 },
|
|
62
|
+
["strong" /* Strong */]: { fontSize: 15, fontWeight: "700", lineHeight: 22 },
|
|
63
|
+
["muted" /* Muted */]: { fontSize: 14, lineHeight: 20 },
|
|
64
|
+
["small" /* Small */]: { fontSize: 12, lineHeight: 16 }
|
|
65
|
+
};
|
|
66
|
+
var AppText = ({
|
|
67
|
+
kind = "body" /* Body */,
|
|
68
|
+
color,
|
|
69
|
+
style,
|
|
70
|
+
testID,
|
|
71
|
+
children
|
|
72
|
+
}) => {
|
|
73
|
+
const { theme } = useUi();
|
|
74
|
+
const quiet = kind === "muted" /* Muted */ || kind === "small" /* Small */;
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
Text,
|
|
77
|
+
{
|
|
78
|
+
style: [
|
|
79
|
+
SIZES[kind],
|
|
80
|
+
{ color: color ?? (quiet ? theme.colors.textSecondary : theme.colors.text) },
|
|
81
|
+
style
|
|
82
|
+
],
|
|
83
|
+
testID,
|
|
84
|
+
children
|
|
85
|
+
}
|
|
26
86
|
);
|
|
27
|
-
return /* @__PURE__ */ jsx(View, { style: containerStyle, children });
|
|
28
87
|
};
|
|
29
88
|
|
|
30
89
|
// src/constants.ts
|
|
@@ -104,7 +163,31 @@ var LAYOUT_I18N = {
|
|
|
104
163
|
var TYPE_SCALE_BREAKPOINT = 600;
|
|
105
164
|
var LAYOUT_COLLAPSE_BREAKPOINT = 768;
|
|
106
165
|
var MIN_TARGET_PX = 44;
|
|
166
|
+
|
|
167
|
+
// src/responsive.ts
|
|
168
|
+
var WEB_PLATFORM = "web";
|
|
169
|
+
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
170
|
+
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// src/hooks/useIsWideViewport.ts
|
|
174
|
+
function useIsWideViewport(breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
175
|
+
const { width } = useWindowDimensions();
|
|
176
|
+
return isWideWebViewport(width, Platform.OS, breakpoint);
|
|
177
|
+
}
|
|
107
178
|
var styles2 = StyleSheet.create({
|
|
179
|
+
outer: { alignItems: "center", width: "100%" },
|
|
180
|
+
column: { width: "100%", gap: 16 },
|
|
181
|
+
desktop: { paddingHorizontal: 32, paddingVertical: 24 },
|
|
182
|
+
mobile: { paddingHorizontal: 16, paddingVertical: 16 },
|
|
183
|
+
wide: { maxWidth: 1200 },
|
|
184
|
+
narrow: { maxWidth: 720 }
|
|
185
|
+
});
|
|
186
|
+
var ScreenColumn = ({ children, narrow = false }) => {
|
|
187
|
+
const isWide = useIsWideViewport();
|
|
188
|
+
return /* @__PURE__ */ jsx(View, { style: styles2.outer, children: /* @__PURE__ */ jsx(View, { style: [styles2.column, isWide ? styles2.desktop : styles2.mobile, narrow ? styles2.narrow : styles2.wide], children }) });
|
|
189
|
+
};
|
|
190
|
+
var styles3 = StyleSheet.create({
|
|
108
191
|
heading: {
|
|
109
192
|
fontWeight: "700",
|
|
110
193
|
fontSize: 16
|
|
@@ -120,7 +203,7 @@ var Heading = ({
|
|
|
120
203
|
}) => {
|
|
121
204
|
const { theme } = useUi();
|
|
122
205
|
const headingStyle = React11.useMemo(
|
|
123
|
-
() => [
|
|
206
|
+
() => [styles3.heading, { color: theme.colors.text }, style],
|
|
124
207
|
[theme.colors.text, style]
|
|
125
208
|
);
|
|
126
209
|
return /* @__PURE__ */ jsx(
|
|
@@ -139,7 +222,7 @@ var DEFAULT_PADDING_V = 4;
|
|
|
139
222
|
var DEFAULT_BORDER_RADIUS = 12;
|
|
140
223
|
var DEFAULT_FONT_SIZE = 12;
|
|
141
224
|
var ICON_GAP = 4;
|
|
142
|
-
var
|
|
225
|
+
var styles4 = StyleSheet.create({
|
|
143
226
|
badge: {
|
|
144
227
|
paddingHorizontal: DEFAULT_PADDING_H,
|
|
145
228
|
paddingVertical: DEFAULT_PADDING_V,
|
|
@@ -153,6 +236,10 @@ var styles3 = StyleSheet.create({
|
|
|
153
236
|
alignItems: "center",
|
|
154
237
|
gap: ICON_GAP
|
|
155
238
|
},
|
|
239
|
+
badgeDashed: {
|
|
240
|
+
borderWidth: 1,
|
|
241
|
+
borderStyle: "dashed"
|
|
242
|
+
},
|
|
156
243
|
text: {
|
|
157
244
|
fontSize: DEFAULT_FONT_SIZE,
|
|
158
245
|
fontWeight: "600",
|
|
@@ -164,12 +251,14 @@ var StatusBadge = ({
|
|
|
164
251
|
color,
|
|
165
252
|
backgroundColor,
|
|
166
253
|
icon,
|
|
254
|
+
dashed = false,
|
|
167
255
|
testID = LAYOUT_TEST_IDS.statusLabel,
|
|
168
256
|
accessibilityLabel,
|
|
169
257
|
accessibilityHint
|
|
170
258
|
}) => {
|
|
171
259
|
const { t } = useUi();
|
|
172
260
|
const dynamicBadge = useMemo(() => ({ backgroundColor }), [backgroundColor]);
|
|
261
|
+
const dashedColor = useMemo(() => ({ borderColor: color }), [color]);
|
|
173
262
|
const dynamicText = useMemo(() => ({ color }), [color]);
|
|
174
263
|
const hasIcon = icon !== void 0 && icon !== null;
|
|
175
264
|
return /* @__PURE__ */ jsxs(
|
|
@@ -177,21 +266,15 @@ var StatusBadge = ({
|
|
|
177
266
|
{
|
|
178
267
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.statusBadgeHint),
|
|
179
268
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
180
|
-
style: [
|
|
269
|
+
style: [styles4.badge, hasIcon && styles4.badgeWithIcon, dynamicBadge, dashed && styles4.badgeDashed, dashed && dashedColor],
|
|
181
270
|
testID,
|
|
182
271
|
children: [
|
|
183
272
|
hasIcon ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, children: icon }) : null,
|
|
184
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
273
|
+
/* @__PURE__ */ jsx(Text, { style: [styles4.text, dynamicText], children: label })
|
|
185
274
|
]
|
|
186
275
|
}
|
|
187
276
|
);
|
|
188
277
|
};
|
|
189
|
-
|
|
190
|
-
// src/responsive.ts
|
|
191
|
-
var WEB_PLATFORM = "web";
|
|
192
|
-
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
193
|
-
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
194
|
-
}
|
|
195
278
|
function isPastStickyLine(sentinelTop, isIntersecting, topOffset) {
|
|
196
279
|
return !isIntersecting && sentinelTop < topOffset;
|
|
197
280
|
}
|
|
@@ -247,7 +330,7 @@ function useVisibleViewport() {
|
|
|
247
330
|
return state;
|
|
248
331
|
}
|
|
249
332
|
var STICKY_Z_INDEX = 5;
|
|
250
|
-
var
|
|
333
|
+
var styles5 = StyleSheet.create({
|
|
251
334
|
sentinel: { height: 1, marginBottom: -1 },
|
|
252
335
|
compact: { borderBottomWidth: 1 }
|
|
253
336
|
});
|
|
@@ -268,7 +351,7 @@ var StickyPreview = ({
|
|
|
268
351
|
return Platform.OS === WEB_PLATFORM ? web : {};
|
|
269
352
|
}, [offsetTop, topOffset]);
|
|
270
353
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
271
|
-
/* @__PURE__ */ jsx(View, { "aria-hidden": true, ref: sentinelRef, style:
|
|
354
|
+
/* @__PURE__ */ jsx(View, { "aria-hidden": true, ref: sentinelRef, style: styles5.sentinel }),
|
|
272
355
|
/* @__PURE__ */ jsx(
|
|
273
356
|
View,
|
|
274
357
|
{
|
|
@@ -277,7 +360,7 @@ var StickyPreview = ({
|
|
|
277
360
|
style: [
|
|
278
361
|
pinned,
|
|
279
362
|
{ backgroundColor: theme.colors.background, borderColor: theme.colors.border },
|
|
280
|
-
isCompact &&
|
|
363
|
+
isCompact && styles5.compact
|
|
281
364
|
],
|
|
282
365
|
testID,
|
|
283
366
|
children: /* @__PURE__ */ jsx(View, { testID: `${testID}-${isCompact ? "compact" : "full"}`, children: isCompact ? compact : full })
|
|
@@ -296,7 +379,7 @@ var BORDER_WIDTH = 1;
|
|
|
296
379
|
var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
|
|
297
380
|
var SHADOW_ELEVATION = 2;
|
|
298
381
|
var TRANSPARENT = "transparent";
|
|
299
|
-
var
|
|
382
|
+
var styles6 = StyleSheet.create({
|
|
300
383
|
track: {
|
|
301
384
|
flexDirection: "row",
|
|
302
385
|
alignSelf: "flex-start",
|
|
@@ -341,7 +424,7 @@ function SegmentedControl({
|
|
|
341
424
|
{
|
|
342
425
|
accessibilityRole: "tablist",
|
|
343
426
|
"aria-label": accessibilityLabel,
|
|
344
|
-
style: [
|
|
427
|
+
style: [styles6.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
|
|
345
428
|
testID,
|
|
346
429
|
children: options.map((opt) => {
|
|
347
430
|
const selected = opt.value === value;
|
|
@@ -354,13 +437,13 @@ function SegmentedControl({
|
|
|
354
437
|
accessibilityHint: opt.accessibilityHint,
|
|
355
438
|
onPress: () => onChange(opt.value),
|
|
356
439
|
style: [
|
|
357
|
-
|
|
358
|
-
selected ?
|
|
440
|
+
styles6.segment,
|
|
441
|
+
selected ? styles6.segmentSelected : null,
|
|
359
442
|
{ backgroundColor: selected ? colors.surface : TRANSPARENT }
|
|
360
443
|
],
|
|
361
444
|
testID: opt.testID,
|
|
362
445
|
...ariaSelectedProps(selected),
|
|
363
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
446
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles6.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
|
|
364
447
|
},
|
|
365
448
|
opt.value
|
|
366
449
|
);
|
|
@@ -497,7 +580,7 @@ var HEADING_PADDING_H = 16;
|
|
|
497
580
|
var HEADING_PADDING_TOP = 8;
|
|
498
581
|
var HEADING_PADDING_BOTTOM = 4;
|
|
499
582
|
var HEADING_LETTER_SPACING = 0.5;
|
|
500
|
-
var
|
|
583
|
+
var styles7 = StyleSheet.create({
|
|
501
584
|
heading: {
|
|
502
585
|
fontSize: HEADING_FONT_SIZE,
|
|
503
586
|
fontWeight: HEADING_FONT_WEIGHT,
|
|
@@ -513,7 +596,7 @@ var MenuHeading = ({ testID, text }) => {
|
|
|
513
596
|
Text,
|
|
514
597
|
{
|
|
515
598
|
accessibilityRole: "header",
|
|
516
|
-
style: [
|
|
599
|
+
style: [styles7.heading, { color: theme.colors.textSecondary }],
|
|
517
600
|
testID: `${testID}-menu-heading`,
|
|
518
601
|
children: text
|
|
519
602
|
}
|
|
@@ -534,7 +617,7 @@ var OPTION_PADDING_V = 12;
|
|
|
534
617
|
var ACCENT_BAR_WIDTH = 3;
|
|
535
618
|
var CHECK_GAP = 8;
|
|
536
619
|
var CHECK_GLYPH = "\u2713";
|
|
537
|
-
var
|
|
620
|
+
var styles8 = StyleSheet.create({
|
|
538
621
|
option: {
|
|
539
622
|
paddingHorizontal: OPTION_PADDING_H,
|
|
540
623
|
paddingVertical: OPTION_PADDING_V,
|
|
@@ -573,16 +656,16 @@ var OptionRow = ({
|
|
|
573
656
|
const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
|
|
574
657
|
const isActive = isSelected || isHighlighted;
|
|
575
658
|
const rowStyle = [
|
|
576
|
-
|
|
577
|
-
isMarked ?
|
|
659
|
+
styles8.option,
|
|
660
|
+
isMarked ? styles8.markedRow : null,
|
|
578
661
|
isActive ? { backgroundColor: colors.surfaceElevated } : null,
|
|
579
662
|
isMarked && isSelected ? { borderLeftColor: accentColor } : null
|
|
580
663
|
];
|
|
581
664
|
const textStyle = [
|
|
582
|
-
|
|
665
|
+
styles8.optionText,
|
|
583
666
|
{ color: colors.text },
|
|
584
|
-
isSelected ?
|
|
585
|
-
isMarked ?
|
|
667
|
+
isSelected ? styles8.selectedText : null,
|
|
668
|
+
isMarked ? styles8.markedText : null
|
|
586
669
|
];
|
|
587
670
|
const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
|
|
588
671
|
return /* @__PURE__ */ jsxs(
|
|
@@ -598,7 +681,7 @@ var OptionRow = ({
|
|
|
598
681
|
onPress: handlePress,
|
|
599
682
|
children: [
|
|
600
683
|
/* @__PURE__ */ jsx(Text, { style: textStyle, children: label }),
|
|
601
|
-
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [
|
|
684
|
+
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [styles8.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
|
|
602
685
|
]
|
|
603
686
|
}
|
|
604
687
|
);
|
|
@@ -756,7 +839,7 @@ var IS_WEB2 = Platform.OS === "web";
|
|
|
756
839
|
var BORDER_RADIUS2 = 8;
|
|
757
840
|
var BORDER_WIDTH3 = 1;
|
|
758
841
|
var MENU_PADDING2 = 4;
|
|
759
|
-
var
|
|
842
|
+
var styles9 = StyleSheet.create({
|
|
760
843
|
/** Native (in-tree) popover — anchored absolutely just under the trigger. */
|
|
761
844
|
popover: {
|
|
762
845
|
position: "absolute",
|
|
@@ -843,7 +926,7 @@ var InlineMenu = ({
|
|
|
843
926
|
themed
|
|
844
927
|
];
|
|
845
928
|
}
|
|
846
|
-
return [
|
|
929
|
+
return [styles9.popover, { minWidth: menuMinWidth }, themed];
|
|
847
930
|
}, [colors.border, colors.surface, menuMinWidth, rect]);
|
|
848
931
|
const menu = /* @__PURE__ */ jsx(
|
|
849
932
|
View,
|
|
@@ -858,10 +941,10 @@ var InlineMenu = ({
|
|
|
858
941
|
Animated.View,
|
|
859
942
|
{
|
|
860
943
|
pointerEvents: isOpen ? "auto" : "none",
|
|
861
|
-
style: [
|
|
944
|
+
style: [styles9.animated, animatedStyle, isOpen ? null : styles9.inert],
|
|
862
945
|
children: [
|
|
863
946
|
menuHeading !== void 0 ? /* @__PURE__ */ jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
864
|
-
/* @__PURE__ */ jsx(ScrollView, { style:
|
|
947
|
+
/* @__PURE__ */ jsx(ScrollView, { style: styles9.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
865
948
|
OptionRow,
|
|
866
949
|
{
|
|
867
950
|
asMenuItem: true,
|
|
@@ -909,7 +992,7 @@ var CARET_OPEN_ROTATION = "180deg";
|
|
|
909
992
|
var CARET_CLOSED_ROTATION = "0deg";
|
|
910
993
|
var POPOVER_ENTER_SCALE = 0.96;
|
|
911
994
|
var POPOVER_MOTION_MS = 120;
|
|
912
|
-
var
|
|
995
|
+
var styles10 = StyleSheet.create({
|
|
913
996
|
anchor: { position: "relative" },
|
|
914
997
|
container: {
|
|
915
998
|
borderWidth: BORDER_WIDTH4,
|
|
@@ -1024,19 +1107,19 @@ var ModalDropdown = ({
|
|
|
1024
1107
|
const isCaret = showCaret && !isHamburger;
|
|
1025
1108
|
const containerStyle = useMemo(
|
|
1026
1109
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1027
|
-
|
|
1028
|
-
isHamburger ?
|
|
1110
|
+
styles10.container,
|
|
1111
|
+
isHamburger ? styles10.containerHamburger : isCaret ? styles10.containerMenu : null,
|
|
1029
1112
|
{ borderColor: colors.border, backgroundColor: colors.surface }
|
|
1030
1113
|
],
|
|
1031
1114
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1032
1115
|
);
|
|
1033
1116
|
const hamburgerStyle = useMemo(
|
|
1034
|
-
() => [
|
|
1117
|
+
() => [styles10.hamburger, { color: colors.textSecondary }],
|
|
1035
1118
|
[colors.textSecondary]
|
|
1036
1119
|
);
|
|
1037
1120
|
const caretStyle = useMemo(
|
|
1038
1121
|
() => [
|
|
1039
|
-
|
|
1122
|
+
styles10.caret,
|
|
1040
1123
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1041
1124
|
],
|
|
1042
1125
|
[colors.textSecondary, isOpen]
|
|
@@ -1046,11 +1129,11 @@ var ModalDropdown = ({
|
|
|
1046
1129
|
[optionTestID, testID]
|
|
1047
1130
|
);
|
|
1048
1131
|
const anchorStyle = useMemo(
|
|
1049
|
-
() => [
|
|
1132
|
+
() => [styles10.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1050
1133
|
[isMenu, isOpen]
|
|
1051
1134
|
);
|
|
1052
1135
|
const modalContentStyle = useMemo(
|
|
1053
|
-
() => [
|
|
1136
|
+
() => [styles10.modalContent, { backgroundColor: colors.surface }],
|
|
1054
1137
|
[colors.surface]
|
|
1055
1138
|
);
|
|
1056
1139
|
const renderModalOption = useCallback(
|
|
@@ -1071,11 +1154,11 @@ var ModalDropdown = ({
|
|
|
1071
1154
|
/* @__PURE__ */ jsxs(TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1072
1155
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1073
1156
|
/* @__PURE__ */ jsx(Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
|
|
1074
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1157
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles10.selectedText, styles10.selectedTextMenu, { color: colors.text }], children: selectedLabel })
|
|
1075
1158
|
] }) : isCaret ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1076
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1159
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles10.selectedText, styles10.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
|
|
1077
1160
|
/* @__PURE__ */ jsx(Text, { style: caretStyle, children: CARET_GLYPH })
|
|
1078
|
-
] }) : /* @__PURE__ */ jsx(Text, { style: [
|
|
1161
|
+
] }) : /* @__PURE__ */ jsx(Text, { style: [styles10.selectedText, { color: colors.text }], children: selectedLabel }),
|
|
1079
1162
|
hintNode
|
|
1080
1163
|
] }),
|
|
1081
1164
|
isMenu && menuAnim.mounted ? /* @__PURE__ */ jsx(
|
|
@@ -1096,7 +1179,7 @@ var ModalDropdown = ({
|
|
|
1096
1179
|
onSelect: handleSelect
|
|
1097
1180
|
}
|
|
1098
1181
|
) : null,
|
|
1099
|
-
!isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
1182
|
+
!isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style: styles10.modalOverlay, children: [
|
|
1100
1183
|
/* @__PURE__ */ jsx(
|
|
1101
1184
|
TouchableOpacity,
|
|
1102
1185
|
{
|
|
@@ -1189,7 +1272,7 @@ var ROW_PAD_V = 8;
|
|
|
1189
1272
|
var PANEL_PAD_TOP = 16;
|
|
1190
1273
|
var BORDER_WIDTH5 = 1;
|
|
1191
1274
|
var TEXT_ON_PRIMARY = "#ffffff";
|
|
1192
|
-
var
|
|
1275
|
+
var styles11 = StyleSheet.create({
|
|
1193
1276
|
root: {
|
|
1194
1277
|
width: "100%"
|
|
1195
1278
|
},
|
|
@@ -1243,7 +1326,7 @@ var WideTabStrip = ({
|
|
|
1243
1326
|
textSecondary,
|
|
1244
1327
|
surfaceElevated,
|
|
1245
1328
|
stripStyle
|
|
1246
|
-
}) => /* @__PURE__ */ jsx(View, { style: [
|
|
1329
|
+
}) => /* @__PURE__ */ jsx(View, { style: [styles11.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles11.strip, stripStyle], children: tabs.map((tab) => {
|
|
1247
1330
|
const selected = tab.key === activeKey;
|
|
1248
1331
|
const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
|
|
1249
1332
|
const pillColor = selected ? primaryColor : surfaceElevated;
|
|
@@ -1257,10 +1340,10 @@ var WideTabStrip = ({
|
|
|
1257
1340
|
accessibilityLabel: tab.accessibilityLabel ?? tab.label,
|
|
1258
1341
|
accessibilityHint: tab.accessibilityHint,
|
|
1259
1342
|
onPress: () => onChange(tab.key),
|
|
1260
|
-
style: [
|
|
1343
|
+
style: [styles11.pill, { backgroundColor: pillColor }],
|
|
1261
1344
|
testID: tab.testID,
|
|
1262
1345
|
...ariaTabProps(selected, panelId, tabId),
|
|
1263
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1346
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles11.pillText, { color: textColor }], children: tab.label })
|
|
1264
1347
|
},
|
|
1265
1348
|
tab.key
|
|
1266
1349
|
);
|
|
@@ -1285,7 +1368,7 @@ var Tabs = ({
|
|
|
1285
1368
|
const activePanelId = `${idPrefix}-panel-${activeKey}`;
|
|
1286
1369
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
1287
1370
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
1288
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
1371
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles11.root, style], testID, children: [
|
|
1289
1372
|
collapsed ? /* @__PURE__ */ jsx(
|
|
1290
1373
|
TabsMenu,
|
|
1291
1374
|
{
|
|
@@ -1312,7 +1395,7 @@ var Tabs = ({
|
|
|
1312
1395
|
onChange
|
|
1313
1396
|
}
|
|
1314
1397
|
),
|
|
1315
|
-
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [
|
|
1398
|
+
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles11.panel, panelStyle], ...panelAria, children })
|
|
1316
1399
|
] });
|
|
1317
1400
|
};
|
|
1318
1401
|
var PROMPT_PADDING = 20;
|
|
@@ -1327,7 +1410,7 @@ var DISMISS_FONT_SIZE = 13;
|
|
|
1327
1410
|
var TITLE_MARGIN_BOTTOM = 8;
|
|
1328
1411
|
var MESSAGE_MARGIN_BOTTOM = 16;
|
|
1329
1412
|
var CTA_MARGIN_BOTTOM = 8;
|
|
1330
|
-
var
|
|
1413
|
+
var styles12 = StyleSheet.create({
|
|
1331
1414
|
container: {
|
|
1332
1415
|
padding: PROMPT_PADDING,
|
|
1333
1416
|
borderRadius: PROMPT_BORDER_RADIUS,
|
|
@@ -1362,21 +1445,21 @@ var UpgradePrompt = ({
|
|
|
1362
1445
|
return /* @__PURE__ */ jsxs(
|
|
1363
1446
|
View,
|
|
1364
1447
|
{
|
|
1365
|
-
style: [
|
|
1448
|
+
style: [styles12.container, { borderColor: primary, backgroundColor: colors.surface }],
|
|
1366
1449
|
testID: LAYOUT_TEST_IDS.upgradePrompt,
|
|
1367
1450
|
children: [
|
|
1368
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1369
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1451
|
+
/* @__PURE__ */ jsx(Text, { style: [styles12.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
|
|
1452
|
+
/* @__PURE__ */ jsx(Text, { style: [styles12.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
|
|
1370
1453
|
/* @__PURE__ */ jsx(
|
|
1371
1454
|
TouchableOpacity,
|
|
1372
1455
|
{
|
|
1373
1456
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
|
|
1374
1457
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
|
|
1375
1458
|
accessibilityRole: "button",
|
|
1376
|
-
style: [
|
|
1459
|
+
style: [styles12.cta, { backgroundColor: primary }],
|
|
1377
1460
|
testID: LAYOUT_TEST_IDS.upgradePromptCta,
|
|
1378
1461
|
onPress: handleUpgradePress,
|
|
1379
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1462
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles12.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
|
|
1380
1463
|
}
|
|
1381
1464
|
),
|
|
1382
1465
|
onDismiss ? /* @__PURE__ */ jsx(
|
|
@@ -1385,10 +1468,10 @@ var UpgradePrompt = ({
|
|
|
1385
1468
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
|
|
1386
1469
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
|
|
1387
1470
|
accessibilityRole: "button",
|
|
1388
|
-
style:
|
|
1471
|
+
style: styles12.dismiss,
|
|
1389
1472
|
testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
|
|
1390
1473
|
onPress: onDismiss,
|
|
1391
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1474
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles12.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
|
|
1392
1475
|
}
|
|
1393
1476
|
) : null
|
|
1394
1477
|
]
|
|
@@ -1397,7 +1480,7 @@ var UpgradePrompt = ({
|
|
|
1397
1480
|
};
|
|
1398
1481
|
var CLOSE_ICON_SIZE = 18;
|
|
1399
1482
|
var PANEL_ENTER_SCALE = 0.96;
|
|
1400
|
-
var
|
|
1483
|
+
var styles13 = StyleSheet.create({
|
|
1401
1484
|
animatedFill: { flex: 1 },
|
|
1402
1485
|
container: {
|
|
1403
1486
|
flex: 1,
|
|
@@ -1424,7 +1507,7 @@ var ModalShell = ({
|
|
|
1424
1507
|
const { theme, t } = useUi();
|
|
1425
1508
|
const { style: sheetStyle, mounted } = useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
|
|
1426
1509
|
const containerStyle = React11.useMemo(
|
|
1427
|
-
() => [
|
|
1510
|
+
() => [styles13.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
1428
1511
|
[theme.colors.background, contentStyle]
|
|
1429
1512
|
);
|
|
1430
1513
|
const closeA11yLabel = t(LAYOUT_I18N.close);
|
|
@@ -1436,7 +1519,7 @@ var ModalShell = ({
|
|
|
1436
1519
|
testID: LAYOUT_TEST_IDS.modalShell,
|
|
1437
1520
|
visible: mounted,
|
|
1438
1521
|
onRequestClose: onCancel,
|
|
1439
|
-
children: /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
1522
|
+
children: /* @__PURE__ */ jsx(Animated.View, { style: [styles13.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxs(
|
|
1440
1523
|
ScrollView,
|
|
1441
1524
|
{
|
|
1442
1525
|
accessibilityViewIsModal: true,
|
|
@@ -1444,7 +1527,7 @@ var ModalShell = ({
|
|
|
1444
1527
|
role: "dialog",
|
|
1445
1528
|
style: containerStyle,
|
|
1446
1529
|
children: [
|
|
1447
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1530
|
+
/* @__PURE__ */ jsxs(View, { style: styles13.headerRow, children: [
|
|
1448
1531
|
/* @__PURE__ */ jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
|
|
1449
1532
|
showClose ? /* @__PURE__ */ jsx(
|
|
1450
1533
|
TouchableOpacity,
|
|
@@ -1452,7 +1535,7 @@ var ModalShell = ({
|
|
|
1452
1535
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
1453
1536
|
accessibilityLabel: closeA11yLabel,
|
|
1454
1537
|
accessibilityRole: "button",
|
|
1455
|
-
style:
|
|
1538
|
+
style: styles13.closeButton,
|
|
1456
1539
|
testID: LAYOUT_TEST_IDS.modalShellClose,
|
|
1457
1540
|
onPress: onCancel,
|
|
1458
1541
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
|
|
@@ -1498,7 +1581,7 @@ var HEADER_MARGIN = 12;
|
|
|
1498
1581
|
var DIALOG_MAX_HEIGHT = "90%";
|
|
1499
1582
|
var PANEL_ENTER_SCALE2 = 0.96;
|
|
1500
1583
|
var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640 };
|
|
1501
|
-
var
|
|
1584
|
+
var styles14 = StyleSheet.create({
|
|
1502
1585
|
overlay: {
|
|
1503
1586
|
flex: 1,
|
|
1504
1587
|
justifyContent: "center",
|
|
@@ -1550,15 +1633,15 @@ var Modal3 = ({
|
|
|
1550
1633
|
const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
|
|
1551
1634
|
const closeLabel = t(LAYOUT_I18N.dialogClose);
|
|
1552
1635
|
const dialogStyle = useMemo(
|
|
1553
|
-
() => [
|
|
1636
|
+
() => [styles14.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
|
|
1554
1637
|
[theme.colors.surface, size]
|
|
1555
1638
|
);
|
|
1556
1639
|
const hasHeader = title !== void 0 || showClose;
|
|
1557
|
-
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
1640
|
+
return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style: styles14.overlay, children: [
|
|
1558
1641
|
/* @__PURE__ */ jsx(
|
|
1559
1642
|
Animated.View,
|
|
1560
1643
|
{
|
|
1561
|
-
style: [StyleSheet.absoluteFill,
|
|
1644
|
+
style: [StyleSheet.absoluteFill, styles14.scrim, { opacity: backdrop.style.opacity }]
|
|
1562
1645
|
}
|
|
1563
1646
|
),
|
|
1564
1647
|
/* @__PURE__ */ jsx(
|
|
@@ -1584,8 +1667,8 @@ var Modal3 = ({
|
|
|
1584
1667
|
style: [dialogStyle, panel.style],
|
|
1585
1668
|
testID,
|
|
1586
1669
|
children: [
|
|
1587
|
-
hasHeader ? /* @__PURE__ */ jsxs(View, { style:
|
|
1588
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1670
|
+
hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles14.headerRow, children: [
|
|
1671
|
+
/* @__PURE__ */ jsx(View, { style: styles14.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsx(Heading, { children: title }) : null }),
|
|
1589
1672
|
showClose ? /* @__PURE__ */ jsx(
|
|
1590
1673
|
IconButton,
|
|
1591
1674
|
{
|
|
@@ -1602,7 +1685,7 @@ var Modal3 = ({
|
|
|
1602
1685
|
) : null
|
|
1603
1686
|
] }) : null,
|
|
1604
1687
|
/* @__PURE__ */ jsx(ScrollView, { children }),
|
|
1605
|
-
footer !== void 0 ? /* @__PURE__ */ jsx(View, { style:
|
|
1688
|
+
footer !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles14.footer, children: footer }) : null
|
|
1606
1689
|
]
|
|
1607
1690
|
}
|
|
1608
1691
|
)
|
|
@@ -1611,7 +1694,7 @@ var Modal3 = ({
|
|
|
1611
1694
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
1612
1695
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
1613
1696
|
var BUTTON_GAP = 12;
|
|
1614
|
-
var
|
|
1697
|
+
var styles15 = StyleSheet.create({
|
|
1615
1698
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
|
|
1616
1699
|
footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
|
|
1617
1700
|
});
|
|
@@ -1630,7 +1713,7 @@ var ConfirmDialog = ({
|
|
|
1630
1713
|
const { theme, t } = useUi();
|
|
1631
1714
|
const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
|
|
1632
1715
|
const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
|
|
1633
|
-
const footer = /* @__PURE__ */ jsxs(View, { style:
|
|
1716
|
+
const footer = /* @__PURE__ */ jsxs(View, { style: styles15.footer, children: [
|
|
1634
1717
|
/* @__PURE__ */ jsx(
|
|
1635
1718
|
Button,
|
|
1636
1719
|
{
|
|
@@ -1666,7 +1749,7 @@ var ConfirmDialog = ({
|
|
|
1666
1749
|
title,
|
|
1667
1750
|
visible,
|
|
1668
1751
|
onClose: onCancel,
|
|
1669
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1752
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles15.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
1670
1753
|
}
|
|
1671
1754
|
);
|
|
1672
1755
|
};
|
|
@@ -1679,7 +1762,7 @@ function useAccordionContext() {
|
|
|
1679
1762
|
return value;
|
|
1680
1763
|
}
|
|
1681
1764
|
var BOXED_GAP = 12;
|
|
1682
|
-
var
|
|
1765
|
+
var styles16 = StyleSheet.create({
|
|
1683
1766
|
container: { alignSelf: "stretch" },
|
|
1684
1767
|
boxed: { gap: BOXED_GAP }
|
|
1685
1768
|
});
|
|
@@ -1736,7 +1819,7 @@ var Accordion = ({
|
|
|
1736
1819
|
[openSet, toggle, allowMultiple, variant]
|
|
1737
1820
|
);
|
|
1738
1821
|
const containerStyle = useMemo(() => {
|
|
1739
|
-
const base = variant === "boxed" ? [
|
|
1822
|
+
const base = variant === "boxed" ? [styles16.container, styles16.boxed] : [styles16.container];
|
|
1740
1823
|
if (style === void 0) return base;
|
|
1741
1824
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
1742
1825
|
}, [style, variant]);
|
|
@@ -1768,7 +1851,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
1768
1851
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
1769
1852
|
var BOX_MARKER_GAP = 6;
|
|
1770
1853
|
var BOX_MARKER = "\u25B8";
|
|
1771
|
-
var
|
|
1854
|
+
var styles17 = StyleSheet.create({
|
|
1772
1855
|
item: { borderTopWidth: StyleSheet.hairlineWidth },
|
|
1773
1856
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
1774
1857
|
header: {
|
|
@@ -1844,19 +1927,19 @@ var AccordionItem = ({
|
|
|
1844
1927
|
);
|
|
1845
1928
|
const keyboardProps = Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
1846
1929
|
const itemStyle = useMemo(
|
|
1847
|
-
() => boxed ? [
|
|
1930
|
+
() => boxed ? [styles17.boxItem, { borderColor: colors.border }] : [styles17.item, { borderTopColor: colors.border }],
|
|
1848
1931
|
[boxed, colors.border]
|
|
1849
1932
|
);
|
|
1850
1933
|
const headerStyle = useMemo(
|
|
1851
1934
|
() => [
|
|
1852
|
-
|
|
1853
|
-
...boxed ? [
|
|
1935
|
+
styles17.header,
|
|
1936
|
+
...boxed ? [styles17.boxHeader] : [],
|
|
1854
1937
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
1855
1938
|
],
|
|
1856
1939
|
[boxed, disabled]
|
|
1857
1940
|
);
|
|
1858
1941
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
1859
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ?
|
|
1942
|
+
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles17.boxTitle : styles17.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
|
|
1860
1943
|
return /* @__PURE__ */ jsxs(View, { style: itemStyle, children: [
|
|
1861
1944
|
/* @__PURE__ */ jsxs(
|
|
1862
1945
|
Pressable,
|
|
@@ -1873,7 +1956,7 @@ var AccordionItem = ({
|
|
|
1873
1956
|
onPress: handlePress,
|
|
1874
1957
|
...keyboardProps,
|
|
1875
1958
|
children: [
|
|
1876
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
1959
|
+
/* @__PURE__ */ jsxs(View, { style: [styles17.headerLeft, boxed ? styles17.headerLeftRow : null], children: [
|
|
1877
1960
|
boxed ? (
|
|
1878
1961
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
1879
1962
|
/* @__PURE__ */ jsx(
|
|
@@ -1882,15 +1965,15 @@ var AccordionItem = ({
|
|
|
1882
1965
|
accessibilityElementsHidden: true,
|
|
1883
1966
|
"aria-hidden": true,
|
|
1884
1967
|
importantForAccessibility: "no-hide-descendants",
|
|
1885
|
-
style: [
|
|
1968
|
+
style: [styles17.marker, { transform: [{ rotate }] }],
|
|
1886
1969
|
testID: chevronTestID,
|
|
1887
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1970
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles17.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
1888
1971
|
}
|
|
1889
1972
|
)
|
|
1890
1973
|
) : null,
|
|
1891
1974
|
titleNode
|
|
1892
1975
|
] }),
|
|
1893
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1976
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.headerRight, children: [
|
|
1894
1977
|
right,
|
|
1895
1978
|
boxed ? null : /* @__PURE__ */ jsx(
|
|
1896
1979
|
Animated.View,
|
|
@@ -1898,7 +1981,7 @@ var AccordionItem = ({
|
|
|
1898
1981
|
accessibilityElementsHidden: true,
|
|
1899
1982
|
"aria-hidden": true,
|
|
1900
1983
|
importantForAccessibility: "no-hide-descendants",
|
|
1901
|
-
style: [
|
|
1984
|
+
style: [styles17.chevron, { transform: [{ rotate }] }],
|
|
1902
1985
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
1903
1986
|
}
|
|
1904
1987
|
)
|
|
@@ -1912,7 +1995,7 @@ var AccordionItem = ({
|
|
|
1912
1995
|
accessibilityLabel: resolvedLabel,
|
|
1913
1996
|
nativeID: bodyTestID,
|
|
1914
1997
|
role: ROLE_REGION,
|
|
1915
|
-
style: boxed ?
|
|
1998
|
+
style: boxed ? styles17.boxBody : styles17.body,
|
|
1916
1999
|
testID: bodyTestID,
|
|
1917
2000
|
children
|
|
1918
2001
|
}
|
|
@@ -1975,7 +2058,7 @@ function useAvailableWidth() {
|
|
|
1975
2058
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
1976
2059
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
1977
2060
|
var UNMEASURED2 = 0;
|
|
1978
|
-
var
|
|
2061
|
+
var styles18 = StyleSheet.create({
|
|
1979
2062
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
1980
2063
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
1981
2064
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2006,7 +2089,7 @@ var TruncatedText = ({
|
|
|
2006
2089
|
[value, measureRef]
|
|
2007
2090
|
);
|
|
2008
2091
|
const flatStyle = useMemo(
|
|
2009
|
-
() => StyleSheet.flatten([
|
|
2092
|
+
() => StyleSheet.flatten([styles18.base, style]),
|
|
2010
2093
|
[style]
|
|
2011
2094
|
);
|
|
2012
2095
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
@@ -2021,7 +2104,7 @@ var TruncatedText = ({
|
|
|
2021
2104
|
ref: attachRef,
|
|
2022
2105
|
onLayout,
|
|
2023
2106
|
numberOfLines: 1,
|
|
2024
|
-
style: [
|
|
2107
|
+
style: [styles18.base, styles18.fill, style],
|
|
2025
2108
|
testID,
|
|
2026
2109
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2027
2110
|
accessibilityLabel,
|
|
@@ -2124,7 +2207,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2124
2207
|
var ACTION_PADDING_H = 6;
|
|
2125
2208
|
var ACTION_PADDING_V = 2;
|
|
2126
2209
|
var ACTION_RADIUS = 6;
|
|
2127
|
-
var
|
|
2210
|
+
var styles19 = StyleSheet.create({
|
|
2128
2211
|
cell: { gap: CELL_GAP },
|
|
2129
2212
|
label: {
|
|
2130
2213
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2189,14 +2272,14 @@ var CopyableId = ({
|
|
|
2189
2272
|
const { colors } = theme;
|
|
2190
2273
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2191
2274
|
const action = useActionState(status);
|
|
2192
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
2193
|
-
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [
|
|
2194
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2195
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2275
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles19.cell, style], testID, children: [
|
|
2276
|
+
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles19.label, { color: colors.textSecondary }], children: label }),
|
|
2277
|
+
/* @__PURE__ */ jsxs(View, { style: styles19.row, children: [
|
|
2278
|
+
/* @__PURE__ */ jsx(View, { style: styles19.valueWrap, children: /* @__PURE__ */ jsx(
|
|
2196
2279
|
TruncatedText,
|
|
2197
2280
|
{
|
|
2198
2281
|
value,
|
|
2199
|
-
style: [
|
|
2282
|
+
style: [styles19.value, { color: colors.text }],
|
|
2200
2283
|
testID: `${testID}-value`,
|
|
2201
2284
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2202
2285
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2210,7 +2293,7 @@ var CopyableId = ({
|
|
|
2210
2293
|
accessibilityLabel: t(action.key),
|
|
2211
2294
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2212
2295
|
testID: `${testID}-copy`,
|
|
2213
|
-
style: [
|
|
2296
|
+
style: [styles19.action, { color: action.color }],
|
|
2214
2297
|
children: t(action.key)
|
|
2215
2298
|
}
|
|
2216
2299
|
)
|
|
@@ -2265,7 +2348,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
2265
2348
|
var FOOTER_PADDING_H = 12;
|
|
2266
2349
|
var FOOTER_FONT_SIZE = 11;
|
|
2267
2350
|
var FOOTER_OPACITY = 0.75;
|
|
2268
|
-
var
|
|
2351
|
+
var styles20 = StyleSheet.create({
|
|
2269
2352
|
footer: {
|
|
2270
2353
|
paddingVertical: FOOTER_PADDING_V,
|
|
2271
2354
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -2291,7 +2374,7 @@ var BuildInfoFooter = ({
|
|
|
2291
2374
|
const commit = apiCommit ?? fetchedCommit;
|
|
2292
2375
|
const label = formatBuildInfo(buildVersion, commit);
|
|
2293
2376
|
const textStyle = useMemo(
|
|
2294
|
-
() => [
|
|
2377
|
+
() => [styles20.text, { color: theme.colors.textSecondary }],
|
|
2295
2378
|
[theme.colors.textSecondary]
|
|
2296
2379
|
);
|
|
2297
2380
|
return /* @__PURE__ */ jsx(
|
|
@@ -2299,13 +2382,13 @@ var BuildInfoFooter = ({
|
|
|
2299
2382
|
{
|
|
2300
2383
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2301
2384
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
2302
|
-
style: [
|
|
2385
|
+
style: [styles20.footer, style],
|
|
2303
2386
|
testID,
|
|
2304
2387
|
children: /* @__PURE__ */ jsx(Text, { style: textStyle, children: label })
|
|
2305
2388
|
}
|
|
2306
2389
|
);
|
|
2307
2390
|
};
|
|
2308
2391
|
|
|
2309
|
-
export { API_COMMIT_SEPARATOR, Accordion, AccordionItem, BUILD_INFO_PREFIX, BuildInfoFooter, COPY_FEEDBACK_MS, ConfirmDialog, CopyStatus, CopyableId, DEFAULT_BILLING_ROUTE, DropdownVariant, ELLIPSIS, Heading, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, MIN_TARGET_PX, Modal3 as Modal, ModalDropdown, ModalShell, Section, SegmentedControl, SelectedMarker, StatusBadge, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TruncatedText, UpgradePrompt, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useVisibleViewport };
|
|
2392
|
+
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, MIN_TARGET_PX, Modal3 as Modal, ModalDropdown, ModalShell, ScreenColumn, Section, SectionVariant, SegmentedControl, SelectedMarker, StatusBadge, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TextKind, TruncatedText, UpgradePrompt, copyText, formatBuildInfo, formatUrlForDisplay, isKeyboardOpen, isWideWebViewport, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useVisibleViewport };
|
|
2310
2393
|
//# sourceMappingURL=index.mjs.map
|
|
2311
2394
|
//# sourceMappingURL=index.mjs.map
|