@dloizides/ui-layout 1.56.0 → 1.58.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 +14 -0
- package/dist/index.d.mts +32 -8
- package/dist/index.d.ts +32 -8
- package/dist/index.js +282 -220
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +282 -222
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React16, { createContext, useMemo, useState, useRef, useEffect, useCallback, useContext, useLayoutEffect } from 'react';
|
|
2
|
-
import { StyleSheet, Platform, Text,
|
|
2
|
+
import { StyleSheet, Platform, Text, useWindowDimensions, View, Modal as Modal$1, Animated, ScrollView, TouchableOpacity, Pressable, FlatList, 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 { Z_INDEX, UI_MAIN_STEP, UI_DEEP_STEP, isHexColor, canCarryAccessibleInk, resolveOnBrand, contrastRatio, AA_NORMAL_TEXT_RATIO } from '@dloizides/design-tokens';
|
|
@@ -135,6 +135,21 @@ var Heading = ({
|
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
+
// src/responsive.ts
|
|
139
|
+
var WEB_PLATFORM = "web";
|
|
140
|
+
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
141
|
+
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
142
|
+
}
|
|
143
|
+
function isModalFooterStacked(width) {
|
|
144
|
+
return width < MODAL_FOOTER_STACK_BELOW;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/hooks/useIsWideViewport.ts
|
|
148
|
+
function useIsWideViewport(breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
149
|
+
const { width } = useWindowDimensions();
|
|
150
|
+
return isWideWebViewport(width, Platform.OS, breakpoint);
|
|
151
|
+
}
|
|
152
|
+
|
|
138
153
|
// src/Section/SectionVariant.ts
|
|
139
154
|
var SectionVariant = /* @__PURE__ */ ((SectionVariant2) => {
|
|
140
155
|
SectionVariant2["Panel"] = "panel";
|
|
@@ -167,14 +182,18 @@ var Section = ({
|
|
|
167
182
|
title,
|
|
168
183
|
titleLevel,
|
|
169
184
|
padding,
|
|
185
|
+
narrowPadding,
|
|
186
|
+
breakpoint = LAYOUT_COLLAPSE_BREAKPOINT,
|
|
170
187
|
testID
|
|
171
188
|
}) => {
|
|
172
189
|
const { theme } = useUi();
|
|
190
|
+
const wide = useIsWideViewport(breakpoint);
|
|
191
|
+
const inner = narrowPadding !== void 0 && !wide ? narrowPadding : padding;
|
|
173
192
|
const isCard = variant === "card" /* Card */;
|
|
174
193
|
const fill = isCard ? theme.colors.background : theme.colors.surface;
|
|
175
194
|
const containerStyle = React16.useMemo(
|
|
176
|
-
() => [styles2.card, isCard ? styles2.raised : null, title === void 0 ? null : styles2.titled, { borderColor: theme.colors.border, backgroundColor: fill }, paddingStyle(
|
|
177
|
-
[theme.colors.border, fill, isCard, title,
|
|
195
|
+
() => [styles2.card, isCard ? styles2.raised : null, title === void 0 ? null : styles2.titled, { borderColor: theme.colors.border, backgroundColor: fill }, paddingStyle(inner), style],
|
|
196
|
+
[theme.colors.border, fill, isCard, title, inner, style]
|
|
178
197
|
);
|
|
179
198
|
return /* @__PURE__ */ jsxs(View, { style: containerStyle, testID, children: [
|
|
180
199
|
title === void 0 ? null : /* @__PURE__ */ jsx(Heading, { level: titleLevel, testID: testID === void 0 ? void 0 : `${testID}-title`, text: title }),
|
|
@@ -226,21 +245,6 @@ var AppText = ({
|
|
|
226
245
|
}
|
|
227
246
|
);
|
|
228
247
|
};
|
|
229
|
-
|
|
230
|
-
// src/responsive.ts
|
|
231
|
-
var WEB_PLATFORM = "web";
|
|
232
|
-
function isWideWebViewport(width, platformOS, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
233
|
-
return platformOS === WEB_PLATFORM && width >= breakpoint;
|
|
234
|
-
}
|
|
235
|
-
function isModalFooterStacked(width) {
|
|
236
|
-
return width < MODAL_FOOTER_STACK_BELOW;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// src/hooks/useIsWideViewport.ts
|
|
240
|
-
function useIsWideViewport(breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
241
|
-
const { width } = useWindowDimensions();
|
|
242
|
-
return isWideWebViewport(width, Platform.OS, breakpoint);
|
|
243
|
-
}
|
|
244
248
|
var styles3 = StyleSheet.create({
|
|
245
249
|
outer: { alignItems: "center", width: "100%" },
|
|
246
250
|
column: { width: "100%", gap: 16 },
|
|
@@ -933,6 +937,41 @@ var PageFrame = ({
|
|
|
933
937
|
/* @__PURE__ */ jsx(PageOverlay, { pageSize, testID: `${testID}-overlay`, visible: enlarged, onClose: close, children })
|
|
934
938
|
] });
|
|
935
939
|
};
|
|
940
|
+
|
|
941
|
+
// src/SegmentedControl/SegmentedVariant.ts
|
|
942
|
+
var SegmentedVariant = /* @__PURE__ */ ((SegmentedVariant2) => {
|
|
943
|
+
SegmentedVariant2["Raised"] = "raised";
|
|
944
|
+
SegmentedVariant2["Filled"] = "filled";
|
|
945
|
+
return SegmentedVariant2;
|
|
946
|
+
})(SegmentedVariant || {});
|
|
947
|
+
|
|
948
|
+
// src/SegmentedControl/segmentLook.ts
|
|
949
|
+
var FILLED_RADIUS = 10;
|
|
950
|
+
var FILLED_PAD_V = 12;
|
|
951
|
+
var TRANSPARENT = "transparent";
|
|
952
|
+
var styles10 = StyleSheet.create({
|
|
953
|
+
filledTrack: { borderRadius: FILLED_RADIUS, padding: 0, gap: 0, overflow: "hidden" },
|
|
954
|
+
filledSegment: { borderRadius: 0, paddingVertical: FILLED_PAD_V },
|
|
955
|
+
stretchTrack: { alignSelf: "stretch" },
|
|
956
|
+
stretchSegment: { flex: 1 }
|
|
957
|
+
});
|
|
958
|
+
function segmentLook(variant, selected, colors, selectedColor) {
|
|
959
|
+
if (!selected) return { fill: TRANSPARENT, ink: colors.textSecondary };
|
|
960
|
+
if (variant === "filled" /* Filled */) return { fill: selectedColor ?? colors.text, ink: colors.surface };
|
|
961
|
+
return { fill: colors.surface, ink: colors.text };
|
|
962
|
+
}
|
|
963
|
+
function trackShape(variant, stretch) {
|
|
964
|
+
const shape = [];
|
|
965
|
+
if (variant === "filled" /* Filled */) shape.push(styles10.filledTrack);
|
|
966
|
+
if (stretch) shape.push(styles10.stretchTrack);
|
|
967
|
+
return shape;
|
|
968
|
+
}
|
|
969
|
+
function segmentShape(variant, stretch) {
|
|
970
|
+
const shape = [];
|
|
971
|
+
if (variant === "filled" /* Filled */) shape.push(styles10.filledSegment);
|
|
972
|
+
if (stretch) shape.push(styles10.stretchSegment);
|
|
973
|
+
return shape;
|
|
974
|
+
}
|
|
936
975
|
var TRACK_PADDING = 3;
|
|
937
976
|
var TRACK_RADIUS = 999;
|
|
938
977
|
var SEGMENT_RADIUS = 999;
|
|
@@ -943,9 +982,8 @@ var SEGMENT_WEIGHT = "600";
|
|
|
943
982
|
var BORDER_WIDTH = 1;
|
|
944
983
|
var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
|
|
945
984
|
var SHADOW_ELEVATION = 2;
|
|
946
|
-
var TRANSPARENT = "transparent";
|
|
947
985
|
var HINT_ID_FALLBACK = "segmented-control";
|
|
948
|
-
var
|
|
986
|
+
var styles11 = StyleSheet.create({
|
|
949
987
|
track: {
|
|
950
988
|
flexDirection: "row",
|
|
951
989
|
alignSelf: "flex-start",
|
|
@@ -982,6 +1020,9 @@ function SegmentedControl({
|
|
|
982
1020
|
accessibilityLabel,
|
|
983
1021
|
accessibilityHint,
|
|
984
1022
|
style,
|
|
1023
|
+
stretch = false,
|
|
1024
|
+
variant = "raised" /* Raised */,
|
|
1025
|
+
selectedColor,
|
|
985
1026
|
testID
|
|
986
1027
|
}) {
|
|
987
1028
|
const { theme } = useUi();
|
|
@@ -994,11 +1035,12 @@ function SegmentedControl({
|
|
|
994
1035
|
accessibilityRole: "tablist",
|
|
995
1036
|
"aria-label": accessibilityLabel,
|
|
996
1037
|
...describedBy,
|
|
997
|
-
style: [
|
|
1038
|
+
style: [styles11.track, { backgroundColor: colors.background, borderColor: colors.border }, ...trackShape(variant, stretch), style],
|
|
998
1039
|
testID,
|
|
999
1040
|
children: [
|
|
1000
1041
|
options.map((opt) => {
|
|
1001
1042
|
const selected = opt.value === value;
|
|
1043
|
+
const look = segmentLook(variant, selected, colors, selectedColor);
|
|
1002
1044
|
return /* @__PURE__ */ jsx(
|
|
1003
1045
|
Pressable,
|
|
1004
1046
|
{
|
|
@@ -1008,13 +1050,14 @@ function SegmentedControl({
|
|
|
1008
1050
|
accessibilityHint: opt.accessibilityHint,
|
|
1009
1051
|
onPress: () => onChange(opt.value),
|
|
1010
1052
|
style: [
|
|
1011
|
-
|
|
1012
|
-
selected ?
|
|
1013
|
-
|
|
1053
|
+
styles11.segment,
|
|
1054
|
+
selected && variant === "raised" /* Raised */ ? styles11.segmentSelected : null,
|
|
1055
|
+
...segmentShape(variant, stretch),
|
|
1056
|
+
{ backgroundColor: look.fill }
|
|
1014
1057
|
],
|
|
1015
1058
|
testID: opt.testID,
|
|
1016
1059
|
...ariaSelectedProps(selected),
|
|
1017
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1060
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles11.label, { color: look.ink }], children: opt.label })
|
|
1018
1061
|
},
|
|
1019
1062
|
opt.value
|
|
1020
1063
|
);
|
|
@@ -1108,7 +1151,7 @@ var HEADING_PADDING_H = 16;
|
|
|
1108
1151
|
var HEADING_PADDING_TOP = 8;
|
|
1109
1152
|
var HEADING_PADDING_BOTTOM = 4;
|
|
1110
1153
|
var HEADING_LETTER_SPACING = 0.5;
|
|
1111
|
-
var
|
|
1154
|
+
var styles12 = StyleSheet.create({
|
|
1112
1155
|
heading: {
|
|
1113
1156
|
fontSize: HEADING_FONT_SIZE,
|
|
1114
1157
|
fontWeight: HEADING_FONT_WEIGHT,
|
|
@@ -1124,7 +1167,7 @@ var MenuHeading = ({ testID, text }) => {
|
|
|
1124
1167
|
Text,
|
|
1125
1168
|
{
|
|
1126
1169
|
accessibilityRole: "header",
|
|
1127
|
-
style: [
|
|
1170
|
+
style: [styles12.heading, { color: theme.colors.textSecondary }],
|
|
1128
1171
|
testID: `${testID}-menu-heading`,
|
|
1129
1172
|
children: text
|
|
1130
1173
|
}
|
|
@@ -1145,7 +1188,7 @@ var OPTION_PADDING_V = 12;
|
|
|
1145
1188
|
var ACCENT_BAR_WIDTH = 3;
|
|
1146
1189
|
var CHECK_GAP = 8;
|
|
1147
1190
|
var CHECK_GLYPH = "\u2713";
|
|
1148
|
-
var
|
|
1191
|
+
var styles13 = StyleSheet.create({
|
|
1149
1192
|
option: {
|
|
1150
1193
|
paddingHorizontal: OPTION_PADDING_H,
|
|
1151
1194
|
paddingVertical: OPTION_PADDING_V,
|
|
@@ -1184,16 +1227,16 @@ var OptionRow = ({
|
|
|
1184
1227
|
const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
|
|
1185
1228
|
const isActive = isSelected || isHighlighted;
|
|
1186
1229
|
const rowStyle = [
|
|
1187
|
-
|
|
1188
|
-
isMarked ?
|
|
1230
|
+
styles13.option,
|
|
1231
|
+
isMarked ? styles13.markedRow : null,
|
|
1189
1232
|
isActive ? { backgroundColor: colors.surfaceElevated } : null,
|
|
1190
1233
|
isMarked && isSelected ? { borderLeftColor: accentColor } : null
|
|
1191
1234
|
];
|
|
1192
1235
|
const textStyle = [
|
|
1193
|
-
|
|
1236
|
+
styles13.optionText,
|
|
1194
1237
|
{ color: colors.text },
|
|
1195
|
-
isSelected ?
|
|
1196
|
-
isMarked ?
|
|
1238
|
+
isSelected ? styles13.selectedText : null,
|
|
1239
|
+
isMarked ? styles13.markedText : null
|
|
1197
1240
|
];
|
|
1198
1241
|
const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
|
|
1199
1242
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1209,7 +1252,7 @@ var OptionRow = ({
|
|
|
1209
1252
|
onPress: handlePress,
|
|
1210
1253
|
children: [
|
|
1211
1254
|
/* @__PURE__ */ jsx(Text, { style: textStyle, children: label }),
|
|
1212
|
-
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1255
|
+
isMarked && isSelected ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsx(Text, { style: [styles13.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
|
|
1213
1256
|
]
|
|
1214
1257
|
}
|
|
1215
1258
|
);
|
|
@@ -1390,7 +1433,7 @@ var IS_WEB3 = Platform.OS === "web";
|
|
|
1390
1433
|
var BORDER_RADIUS2 = 8;
|
|
1391
1434
|
var BORDER_WIDTH3 = 1;
|
|
1392
1435
|
var MENU_PADDING2 = 4;
|
|
1393
|
-
var
|
|
1436
|
+
var styles14 = StyleSheet.create({
|
|
1394
1437
|
/** Native (in-tree) popover — anchored absolutely just under the trigger. */
|
|
1395
1438
|
popover: {
|
|
1396
1439
|
position: "absolute",
|
|
@@ -1480,9 +1523,9 @@ var InlineMenu = ({
|
|
|
1480
1523
|
themed
|
|
1481
1524
|
];
|
|
1482
1525
|
}
|
|
1483
|
-
return [
|
|
1526
|
+
return [styles14.popover, { minWidth: menuMinWidth }, themed];
|
|
1484
1527
|
}, [colors.border, colors.surface, menuMinWidth, placement, rect]);
|
|
1485
|
-
const scrollStyle = IS_WEB3 ? { maxHeight: menuScrollMaxHeight(placement.maxHeight) } :
|
|
1528
|
+
const scrollStyle = IS_WEB3 ? { maxHeight: menuScrollMaxHeight(placement.maxHeight) } : styles14.scroll;
|
|
1486
1529
|
const menu = /* @__PURE__ */ jsx(
|
|
1487
1530
|
View,
|
|
1488
1531
|
{
|
|
@@ -1496,7 +1539,7 @@ var InlineMenu = ({
|
|
|
1496
1539
|
Animated.View,
|
|
1497
1540
|
{
|
|
1498
1541
|
pointerEvents: isOpen ? "auto" : "none",
|
|
1499
|
-
style: [
|
|
1542
|
+
style: [styles14.animated, opensAbove ? styles14.animatedAbove : null, animatedStyle, isOpen ? null : styles14.inert],
|
|
1500
1543
|
children: [
|
|
1501
1544
|
menuHeading !== void 0 ? /* @__PURE__ */ jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
1502
1545
|
/* @__PURE__ */ jsx(ScrollView, { style: scrollStyle, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
@@ -1547,7 +1590,7 @@ var CARET_OPEN_ROTATION = "180deg";
|
|
|
1547
1590
|
var CARET_CLOSED_ROTATION = "0deg";
|
|
1548
1591
|
var POPOVER_ENTER_SCALE = 0.96;
|
|
1549
1592
|
var POPOVER_MOTION_MS = 120;
|
|
1550
|
-
var
|
|
1593
|
+
var styles15 = StyleSheet.create({
|
|
1551
1594
|
anchor: { position: "relative" },
|
|
1552
1595
|
container: {
|
|
1553
1596
|
borderWidth: BORDER_WIDTH4,
|
|
@@ -1662,19 +1705,19 @@ var ModalDropdown = ({
|
|
|
1662
1705
|
const isCaret = showCaret && !isHamburger;
|
|
1663
1706
|
const containerStyle = useMemo(
|
|
1664
1707
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1665
|
-
|
|
1666
|
-
isHamburger ?
|
|
1708
|
+
styles15.container,
|
|
1709
|
+
isHamburger ? styles15.containerHamburger : isCaret ? styles15.containerMenu : null,
|
|
1667
1710
|
{ borderColor: colors.border, backgroundColor: colors.surface }
|
|
1668
1711
|
],
|
|
1669
1712
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1670
1713
|
);
|
|
1671
1714
|
const hamburgerStyle = useMemo(
|
|
1672
|
-
() => [
|
|
1715
|
+
() => [styles15.hamburger, { color: colors.textSecondary }],
|
|
1673
1716
|
[colors.textSecondary]
|
|
1674
1717
|
);
|
|
1675
1718
|
const caretStyle = useMemo(
|
|
1676
1719
|
() => [
|
|
1677
|
-
|
|
1720
|
+
styles15.caret,
|
|
1678
1721
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1679
1722
|
],
|
|
1680
1723
|
[colors.textSecondary, isOpen]
|
|
@@ -1684,11 +1727,11 @@ var ModalDropdown = ({
|
|
|
1684
1727
|
[optionTestID, testID]
|
|
1685
1728
|
);
|
|
1686
1729
|
const anchorStyle = useMemo(
|
|
1687
|
-
() => [
|
|
1730
|
+
() => [styles15.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1688
1731
|
[isMenu, isOpen]
|
|
1689
1732
|
);
|
|
1690
1733
|
const modalContentStyle = useMemo(
|
|
1691
|
-
() => [
|
|
1734
|
+
() => [styles15.modalContent, { backgroundColor: colors.surface }],
|
|
1692
1735
|
[colors.surface]
|
|
1693
1736
|
);
|
|
1694
1737
|
const renderModalOption = useCallback(
|
|
@@ -1709,11 +1752,11 @@ var ModalDropdown = ({
|
|
|
1709
1752
|
/* @__PURE__ */ jsxs(TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1710
1753
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1711
1754
|
/* @__PURE__ */ jsx(Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
|
|
1712
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1755
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles15.selectedText, styles15.selectedTextMenu, { color: colors.text }], children: selectedLabel })
|
|
1713
1756
|
] }) : isCaret ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1714
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
1757
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles15.selectedText, styles15.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
|
|
1715
1758
|
/* @__PURE__ */ jsx(Text, { style: caretStyle, children: CARET_GLYPH })
|
|
1716
|
-
] }) : /* @__PURE__ */ jsx(Text, { style: [
|
|
1759
|
+
] }) : /* @__PURE__ */ jsx(Text, { style: [styles15.selectedText, { color: colors.text }], children: selectedLabel }),
|
|
1717
1760
|
hintNode
|
|
1718
1761
|
] }),
|
|
1719
1762
|
isMenu && menuAnim.mounted ? /* @__PURE__ */ jsx(
|
|
@@ -1734,7 +1777,7 @@ var ModalDropdown = ({
|
|
|
1734
1777
|
onSelect: handleSelect
|
|
1735
1778
|
}
|
|
1736
1779
|
) : null,
|
|
1737
|
-
!isMenu ? /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
1780
|
+
!isMenu ? /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style: styles15.modalOverlay, children: [
|
|
1738
1781
|
/* @__PURE__ */ jsx(
|
|
1739
1782
|
TouchableOpacity,
|
|
1740
1783
|
{
|
|
@@ -1828,7 +1871,7 @@ var ROW_PAD_V = 8;
|
|
|
1828
1871
|
var PANEL_PAD_TOP = 16;
|
|
1829
1872
|
var BORDER_WIDTH5 = 1;
|
|
1830
1873
|
var TEXT_ON_PRIMARY = "#ffffff";
|
|
1831
|
-
var
|
|
1874
|
+
var styles16 = StyleSheet.create({
|
|
1832
1875
|
root: {
|
|
1833
1876
|
width: "100%"
|
|
1834
1877
|
},
|
|
@@ -1883,7 +1926,7 @@ var WideTabStrip = ({
|
|
|
1883
1926
|
textSecondary,
|
|
1884
1927
|
surfaceElevated,
|
|
1885
1928
|
stripStyle
|
|
1886
|
-
}) => /* @__PURE__ */ jsx(View, { style: [
|
|
1929
|
+
}) => /* @__PURE__ */ jsx(View, { style: [styles16.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles16.strip, stripStyle], children: tabs.map((tab) => {
|
|
1887
1930
|
const selected = tab.key === activeKey;
|
|
1888
1931
|
const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
|
|
1889
1932
|
const pillColor = selected ? primaryColor : surfaceElevated;
|
|
@@ -1897,10 +1940,10 @@ var WideTabStrip = ({
|
|
|
1897
1940
|
accessibilityLabel: tab.accessibilityLabel ?? tab.label,
|
|
1898
1941
|
accessibilityHint: tab.accessibilityHint,
|
|
1899
1942
|
onPress: () => onChange(tab.key),
|
|
1900
|
-
style: [
|
|
1943
|
+
style: [styles16.pill, { backgroundColor: pillColor }],
|
|
1901
1944
|
testID: tab.testID,
|
|
1902
1945
|
...ariaTabProps(selected, panelId, tabId),
|
|
1903
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1946
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles16.pillText, { color: textColor }], children: tab.label })
|
|
1904
1947
|
},
|
|
1905
1948
|
tab.key
|
|
1906
1949
|
);
|
|
@@ -1926,7 +1969,7 @@ var Tabs = ({
|
|
|
1926
1969
|
const activePanelId = `${idPrefix}-panel-${activeKey}`;
|
|
1927
1970
|
const activeTabId = `${idPrefix}-tab-${activeKey}`;
|
|
1928
1971
|
const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
|
|
1929
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
1972
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles16.root, style], testID, children: [
|
|
1930
1973
|
collapsed ? /* @__PURE__ */ jsx(
|
|
1931
1974
|
TabsMenu,
|
|
1932
1975
|
{
|
|
@@ -1955,7 +1998,7 @@ var Tabs = ({
|
|
|
1955
1998
|
onChange
|
|
1956
1999
|
}
|
|
1957
2000
|
),
|
|
1958
|
-
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [
|
|
2001
|
+
/* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles16.panel, panelStyle], ...panelAria, children })
|
|
1959
2002
|
] });
|
|
1960
2003
|
};
|
|
1961
2004
|
var PROMPT_PADDING = 20;
|
|
@@ -1970,7 +2013,7 @@ var DISMISS_FONT_SIZE = 13;
|
|
|
1970
2013
|
var TITLE_MARGIN_BOTTOM = 8;
|
|
1971
2014
|
var MESSAGE_MARGIN_BOTTOM = 16;
|
|
1972
2015
|
var CTA_MARGIN_BOTTOM = 8;
|
|
1973
|
-
var
|
|
2016
|
+
var styles17 = StyleSheet.create({
|
|
1974
2017
|
container: {
|
|
1975
2018
|
padding: PROMPT_PADDING,
|
|
1976
2019
|
borderRadius: PROMPT_BORDER_RADIUS,
|
|
@@ -2005,21 +2048,21 @@ var UpgradePrompt = ({
|
|
|
2005
2048
|
return /* @__PURE__ */ jsxs(
|
|
2006
2049
|
View,
|
|
2007
2050
|
{
|
|
2008
|
-
style: [
|
|
2051
|
+
style: [styles17.container, { borderColor: primary, backgroundColor: colors.surface }],
|
|
2009
2052
|
testID: LAYOUT_TEST_IDS.upgradePrompt,
|
|
2010
2053
|
children: [
|
|
2011
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2012
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2054
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
|
|
2055
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
|
|
2013
2056
|
/* @__PURE__ */ jsx(
|
|
2014
2057
|
TouchableOpacity,
|
|
2015
2058
|
{
|
|
2016
2059
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
|
|
2017
2060
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
|
|
2018
2061
|
accessibilityRole: "button",
|
|
2019
|
-
style: [
|
|
2062
|
+
style: [styles17.cta, { backgroundColor: primary }],
|
|
2020
2063
|
testID: LAYOUT_TEST_IDS.upgradePromptCta,
|
|
2021
2064
|
onPress: handleUpgradePress,
|
|
2022
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2065
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles17.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
|
|
2023
2066
|
}
|
|
2024
2067
|
),
|
|
2025
2068
|
onDismiss ? /* @__PURE__ */ jsx(
|
|
@@ -2028,10 +2071,10 @@ var UpgradePrompt = ({
|
|
|
2028
2071
|
accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
|
|
2029
2072
|
accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
|
|
2030
2073
|
accessibilityRole: "button",
|
|
2031
|
-
style:
|
|
2074
|
+
style: styles17.dismiss,
|
|
2032
2075
|
testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
|
|
2033
2076
|
onPress: onDismiss,
|
|
2034
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2077
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles17.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
|
|
2035
2078
|
}
|
|
2036
2079
|
) : null
|
|
2037
2080
|
]
|
|
@@ -2040,7 +2083,7 @@ var UpgradePrompt = ({
|
|
|
2040
2083
|
};
|
|
2041
2084
|
var CLOSE_ICON_SIZE = 18;
|
|
2042
2085
|
var PANEL_ENTER_SCALE2 = 0.96;
|
|
2043
|
-
var
|
|
2086
|
+
var styles18 = StyleSheet.create({
|
|
2044
2087
|
animatedFill: { flex: 1 },
|
|
2045
2088
|
container: {
|
|
2046
2089
|
flex: 1,
|
|
@@ -2070,7 +2113,7 @@ var ModalShell = ({
|
|
|
2070
2113
|
const { theme, t } = useUi();
|
|
2071
2114
|
const { style: sheetStyle, mounted } = useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE2 });
|
|
2072
2115
|
const containerStyle = React16.useMemo(
|
|
2073
|
-
() => [
|
|
2116
|
+
() => [styles18.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
2074
2117
|
[theme.colors.background, contentStyle]
|
|
2075
2118
|
);
|
|
2076
2119
|
const closeA11yLabel = t(LAYOUT_I18N.close);
|
|
@@ -2082,7 +2125,7 @@ var ModalShell = ({
|
|
|
2082
2125
|
testID: LAYOUT_TEST_IDS.modalShell,
|
|
2083
2126
|
visible: mounted,
|
|
2084
2127
|
onRequestClose: onCancel,
|
|
2085
|
-
children: /* @__PURE__ */ jsx(Animated.View, { style: [
|
|
2128
|
+
children: /* @__PURE__ */ jsx(Animated.View, { style: [styles18.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxs(
|
|
2086
2129
|
ScrollView,
|
|
2087
2130
|
{
|
|
2088
2131
|
accessibilityViewIsModal: true,
|
|
@@ -2090,7 +2133,7 @@ var ModalShell = ({
|
|
|
2090
2133
|
role: "dialog",
|
|
2091
2134
|
style: containerStyle,
|
|
2092
2135
|
children: [
|
|
2093
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2136
|
+
/* @__PURE__ */ jsxs(View, { style: styles18.headerRow, children: [
|
|
2094
2137
|
/* @__PURE__ */ jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
|
|
2095
2138
|
showClose ? /* @__PURE__ */ jsx(
|
|
2096
2139
|
TouchableOpacity,
|
|
@@ -2098,7 +2141,7 @@ var ModalShell = ({
|
|
|
2098
2141
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
2099
2142
|
accessibilityLabel: closeA11yLabel,
|
|
2100
2143
|
accessibilityRole: "button",
|
|
2101
|
-
style:
|
|
2144
|
+
style: styles18.closeButton,
|
|
2102
2145
|
testID: LAYOUT_TEST_IDS.modalShellClose,
|
|
2103
2146
|
onPress: onCancel,
|
|
2104
2147
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
|
|
@@ -2115,7 +2158,7 @@ var ModalShell = ({
|
|
|
2115
2158
|
var SHEET_WIDTH = 560;
|
|
2116
2159
|
var PHONE_CORNER = 16;
|
|
2117
2160
|
var PHONE_ENTER_OFFSET = 24;
|
|
2118
|
-
var
|
|
2161
|
+
var styles19 = StyleSheet.create({
|
|
2119
2162
|
root: { flex: 1 },
|
|
2120
2163
|
scrim: { backgroundColor: MODAL_OVERLAY_COLOR, pointerEvents: "none" },
|
|
2121
2164
|
sheet: { position: "absolute", bottom: 0, overflow: "hidden" },
|
|
@@ -2152,8 +2195,8 @@ var SideSheet = ({
|
|
|
2152
2195
|
useEscapeKey(visible, onClose);
|
|
2153
2196
|
useScrollLock(visible);
|
|
2154
2197
|
const hardwareBackClose = Platform.OS === "web" ? void 0 : onClose;
|
|
2155
|
-
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
2156
|
-
/* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill,
|
|
2198
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxs(View, { style: styles19.root, children: [
|
|
2199
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill, styles19.scrim, { opacity: backdrop.style.opacity }] }),
|
|
2157
2200
|
/* @__PURE__ */ jsx(
|
|
2158
2201
|
Pressable,
|
|
2159
2202
|
{
|
|
@@ -2174,17 +2217,17 @@ var SideSheet = ({
|
|
|
2174
2217
|
"aria-label": accessibilityLabel ?? title,
|
|
2175
2218
|
role: "dialog",
|
|
2176
2219
|
style: [
|
|
2177
|
-
|
|
2178
|
-
isWide ?
|
|
2220
|
+
styles19.sheet,
|
|
2221
|
+
isWide ? styles19.wide : styles19.phone,
|
|
2179
2222
|
edges,
|
|
2180
2223
|
{ backgroundColor: theme.colors.surface },
|
|
2181
2224
|
panel.style
|
|
2182
2225
|
],
|
|
2183
2226
|
testID,
|
|
2184
2227
|
children: [
|
|
2185
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2186
|
-
/* @__PURE__ */ jsx(ScrollView, { contentContainerStyle:
|
|
2187
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
2228
|
+
/* @__PURE__ */ jsx(View, { style: styles19.title, children: /* @__PURE__ */ jsx(AppText, { kind: "title" /* Title */, children: title }) }),
|
|
2229
|
+
/* @__PURE__ */ jsx(ScrollView, { contentContainerStyle: styles19.content, style: styles19.scroll, children }),
|
|
2230
|
+
/* @__PURE__ */ jsx(View, { style: [styles19.bar, edges], children: footer })
|
|
2188
2231
|
]
|
|
2189
2232
|
}
|
|
2190
2233
|
)
|
|
@@ -2196,7 +2239,7 @@ var WIDE_MAX_WIDTH = 560;
|
|
|
2196
2239
|
var TOP_CORNER = 16;
|
|
2197
2240
|
var ENTER_OFFSET = 24;
|
|
2198
2241
|
var CLOSE_ICON_SIZE2 = 18;
|
|
2199
|
-
var
|
|
2242
|
+
var styles20 = StyleSheet.create({
|
|
2200
2243
|
root: { flex: 1 },
|
|
2201
2244
|
backdrop: { backgroundColor: MODAL_OVERLAY_COLOR, pointerEvents: "none" },
|
|
2202
2245
|
panel: {
|
|
@@ -2238,8 +2281,8 @@ var BottomSheet = ({
|
|
|
2238
2281
|
useEscapeKey(visible, onClose);
|
|
2239
2282
|
useScrollLock(visible);
|
|
2240
2283
|
const hardwareBackClose = Platform.OS === "web" ? void 0 : onClose;
|
|
2241
|
-
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxs(View, { style:
|
|
2242
|
-
/* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill,
|
|
2284
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxs(View, { style: styles20.root, children: [
|
|
2285
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill, styles20.backdrop, { opacity: backdrop.style.opacity }] }),
|
|
2243
2286
|
/* @__PURE__ */ jsx(
|
|
2244
2287
|
Pressable,
|
|
2245
2288
|
{
|
|
@@ -2260,31 +2303,31 @@ var BottomSheet = ({
|
|
|
2260
2303
|
"aria-label": accessibilityLabel ?? title,
|
|
2261
2304
|
role: "dialog",
|
|
2262
2305
|
style: [
|
|
2263
|
-
|
|
2264
|
-
isWide ?
|
|
2306
|
+
styles20.panel,
|
|
2307
|
+
isWide ? styles20.wide : null,
|
|
2265
2308
|
panelSize,
|
|
2266
2309
|
{ backgroundColor: theme.colors.surface },
|
|
2267
2310
|
panel.style
|
|
2268
2311
|
],
|
|
2269
2312
|
testID,
|
|
2270
2313
|
children: [
|
|
2271
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2272
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2314
|
+
/* @__PURE__ */ jsxs(View, { style: styles20.header, children: [
|
|
2315
|
+
/* @__PURE__ */ jsx(View, { style: styles20.title, children: /* @__PURE__ */ jsx(AppText, { kind: "title" /* Title */, children: title }) }),
|
|
2273
2316
|
/* @__PURE__ */ jsx(
|
|
2274
2317
|
TouchableOpacity,
|
|
2275
2318
|
{
|
|
2276
2319
|
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
2277
2320
|
accessibilityLabel: t(LAYOUT_I18N.dialogClose),
|
|
2278
2321
|
accessibilityRole: "button",
|
|
2279
|
-
style:
|
|
2322
|
+
style: styles20.close,
|
|
2280
2323
|
testID: `${testID}-close`,
|
|
2281
2324
|
onPress: onClose,
|
|
2282
2325
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE2 })
|
|
2283
2326
|
}
|
|
2284
2327
|
)
|
|
2285
2328
|
] }),
|
|
2286
|
-
/* @__PURE__ */ jsx(ScrollView, { contentContainerStyle:
|
|
2287
|
-
hasFooter ? /* @__PURE__ */ jsx(View, { style: [
|
|
2329
|
+
/* @__PURE__ */ jsx(ScrollView, { contentContainerStyle: styles20.content, style: styles20.body, children }),
|
|
2330
|
+
hasFooter ? /* @__PURE__ */ jsx(View, { style: [styles20.footer, { borderColor: theme.colors.border }], testID: `${testID}-footer`, children: footer }) : null
|
|
2288
2331
|
]
|
|
2289
2332
|
}
|
|
2290
2333
|
)
|
|
@@ -2300,7 +2343,7 @@ var ConfirmDialogFocus = /* @__PURE__ */ ((ConfirmDialogFocus2) => {
|
|
|
2300
2343
|
})(ConfirmDialogFocus || {});
|
|
2301
2344
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
2302
2345
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
2303
|
-
var
|
|
2346
|
+
var styles21 = StyleSheet.create({
|
|
2304
2347
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT }
|
|
2305
2348
|
});
|
|
2306
2349
|
var ConfirmDialog = ({
|
|
@@ -2363,7 +2406,7 @@ var ConfirmDialog = ({
|
|
|
2363
2406
|
title,
|
|
2364
2407
|
visible,
|
|
2365
2408
|
onClose: onCancel,
|
|
2366
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2409
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles21.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
2367
2410
|
}
|
|
2368
2411
|
);
|
|
2369
2412
|
};
|
|
@@ -2457,7 +2500,7 @@ function useAccordionContext() {
|
|
|
2457
2500
|
return value;
|
|
2458
2501
|
}
|
|
2459
2502
|
var BOXED_GAP = 12;
|
|
2460
|
-
var
|
|
2503
|
+
var styles22 = StyleSheet.create({
|
|
2461
2504
|
container: { alignSelf: "stretch" },
|
|
2462
2505
|
boxed: { gap: BOXED_GAP }
|
|
2463
2506
|
});
|
|
@@ -2514,7 +2557,7 @@ var Accordion = ({
|
|
|
2514
2557
|
[openSet, toggle, allowMultiple, variant]
|
|
2515
2558
|
);
|
|
2516
2559
|
const containerStyle = useMemo(() => {
|
|
2517
|
-
const base = variant === "boxed" ? [
|
|
2560
|
+
const base = variant === "boxed" ? [styles22.container, styles22.boxed] : [styles22.container];
|
|
2518
2561
|
if (style === void 0) return base;
|
|
2519
2562
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
2520
2563
|
}, [style, variant]);
|
|
@@ -2546,7 +2589,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
2546
2589
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
2547
2590
|
var BOX_MARKER_GAP = 6;
|
|
2548
2591
|
var BOX_MARKER = "\u25B8";
|
|
2549
|
-
var
|
|
2592
|
+
var styles23 = StyleSheet.create({
|
|
2550
2593
|
item: { borderTopWidth: StyleSheet.hairlineWidth },
|
|
2551
2594
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
2552
2595
|
header: {
|
|
@@ -2622,19 +2665,19 @@ var AccordionItem = ({
|
|
|
2622
2665
|
);
|
|
2623
2666
|
const keyboardProps = Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
2624
2667
|
const itemStyle = useMemo(
|
|
2625
|
-
() => boxed ? [
|
|
2668
|
+
() => boxed ? [styles23.boxItem, { borderColor: colors.border }] : [styles23.item, { borderTopColor: colors.border }],
|
|
2626
2669
|
[boxed, colors.border]
|
|
2627
2670
|
);
|
|
2628
2671
|
const headerStyle = useMemo(
|
|
2629
2672
|
() => [
|
|
2630
|
-
|
|
2631
|
-
...boxed ? [
|
|
2673
|
+
styles23.header,
|
|
2674
|
+
...boxed ? [styles23.boxHeader] : [],
|
|
2632
2675
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
2633
2676
|
],
|
|
2634
2677
|
[boxed, disabled]
|
|
2635
2678
|
);
|
|
2636
2679
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
2637
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ?
|
|
2680
|
+
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles23.boxTitle : styles23.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
|
|
2638
2681
|
return /* @__PURE__ */ jsxs(View, { style: itemStyle, children: [
|
|
2639
2682
|
/* @__PURE__ */ jsxs(
|
|
2640
2683
|
Pressable,
|
|
@@ -2651,7 +2694,7 @@ var AccordionItem = ({
|
|
|
2651
2694
|
onPress: handlePress,
|
|
2652
2695
|
...keyboardProps,
|
|
2653
2696
|
children: [
|
|
2654
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2697
|
+
/* @__PURE__ */ jsxs(View, { style: [styles23.headerLeft, boxed ? styles23.headerLeftRow : null], children: [
|
|
2655
2698
|
boxed ? (
|
|
2656
2699
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
2657
2700
|
/* @__PURE__ */ jsx(
|
|
@@ -2660,15 +2703,15 @@ var AccordionItem = ({
|
|
|
2660
2703
|
accessibilityElementsHidden: true,
|
|
2661
2704
|
"aria-hidden": true,
|
|
2662
2705
|
importantForAccessibility: "no-hide-descendants",
|
|
2663
|
-
style: [
|
|
2706
|
+
style: [styles23.marker, { transform: [{ rotate }] }],
|
|
2664
2707
|
testID: chevronTestID,
|
|
2665
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2708
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles23.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
2666
2709
|
}
|
|
2667
2710
|
)
|
|
2668
2711
|
) : null,
|
|
2669
2712
|
titleNode
|
|
2670
2713
|
] }),
|
|
2671
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2714
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.headerRight, children: [
|
|
2672
2715
|
right,
|
|
2673
2716
|
boxed ? null : /* @__PURE__ */ jsx(
|
|
2674
2717
|
Animated.View,
|
|
@@ -2676,7 +2719,7 @@ var AccordionItem = ({
|
|
|
2676
2719
|
accessibilityElementsHidden: true,
|
|
2677
2720
|
"aria-hidden": true,
|
|
2678
2721
|
importantForAccessibility: "no-hide-descendants",
|
|
2679
|
-
style: [
|
|
2722
|
+
style: [styles23.chevron, { transform: [{ rotate }] }],
|
|
2680
2723
|
children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
2681
2724
|
}
|
|
2682
2725
|
)
|
|
@@ -2690,7 +2733,7 @@ var AccordionItem = ({
|
|
|
2690
2733
|
accessibilityLabel: resolvedLabel,
|
|
2691
2734
|
nativeID: bodyTestID,
|
|
2692
2735
|
role: ROLE_REGION,
|
|
2693
|
-
style: boxed ?
|
|
2736
|
+
style: boxed ? styles23.boxBody : styles23.body,
|
|
2694
2737
|
testID: bodyTestID,
|
|
2695
2738
|
children
|
|
2696
2739
|
}
|
|
@@ -2753,7 +2796,7 @@ function useAvailableWidth() {
|
|
|
2753
2796
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
2754
2797
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
2755
2798
|
var UNMEASURED2 = 0;
|
|
2756
|
-
var
|
|
2799
|
+
var styles24 = StyleSheet.create({
|
|
2757
2800
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
2758
2801
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
2759
2802
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2784,7 +2827,7 @@ var TruncatedText = ({
|
|
|
2784
2827
|
[value, measureRef]
|
|
2785
2828
|
);
|
|
2786
2829
|
const flatStyle = useMemo(
|
|
2787
|
-
() => StyleSheet.flatten([
|
|
2830
|
+
() => StyleSheet.flatten([styles24.base, style]),
|
|
2788
2831
|
[style]
|
|
2789
2832
|
);
|
|
2790
2833
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
@@ -2799,7 +2842,7 @@ var TruncatedText = ({
|
|
|
2799
2842
|
ref: attachRef,
|
|
2800
2843
|
onLayout,
|
|
2801
2844
|
numberOfLines: 1,
|
|
2802
|
-
style: [
|
|
2845
|
+
style: [styles24.base, styles24.fill, style],
|
|
2803
2846
|
testID,
|
|
2804
2847
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2805
2848
|
accessibilityLabel,
|
|
@@ -2907,7 +2950,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2907
2950
|
var ACTION_PADDING_H = 6;
|
|
2908
2951
|
var ACTION_PADDING_V = 2;
|
|
2909
2952
|
var ACTION_RADIUS = 6;
|
|
2910
|
-
var
|
|
2953
|
+
var styles25 = StyleSheet.create({
|
|
2911
2954
|
cell: { gap: CELL_GAP },
|
|
2912
2955
|
label: {
|
|
2913
2956
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2972,14 +3015,14 @@ var CopyableId = ({
|
|
|
2972
3015
|
const { colors } = theme;
|
|
2973
3016
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2974
3017
|
const action = useActionState(status);
|
|
2975
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
2976
|
-
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [
|
|
2977
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2978
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3018
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles25.cell, style], testID, children: [
|
|
3019
|
+
label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles25.label, { color: colors.textSecondary }], children: label }),
|
|
3020
|
+
/* @__PURE__ */ jsxs(View, { style: styles25.row, children: [
|
|
3021
|
+
/* @__PURE__ */ jsx(View, { style: styles25.valueWrap, children: /* @__PURE__ */ jsx(
|
|
2979
3022
|
TruncatedText,
|
|
2980
3023
|
{
|
|
2981
3024
|
value,
|
|
2982
|
-
style: [
|
|
3025
|
+
style: [styles25.value, { color: colors.text }],
|
|
2983
3026
|
testID: `${testID}-value`,
|
|
2984
3027
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2985
3028
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2993,7 +3036,7 @@ var CopyableId = ({
|
|
|
2993
3036
|
accessibilityLabel: t(action.key),
|
|
2994
3037
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2995
3038
|
testID: `${testID}-copy`,
|
|
2996
|
-
style: [
|
|
3039
|
+
style: [styles25.action, { color: readableTone(action.color, [colors.background, colors.surfaceElevated], colors.text) }],
|
|
2997
3040
|
children: t(action.key)
|
|
2998
3041
|
}
|
|
2999
3042
|
)
|
|
@@ -3048,7 +3091,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
3048
3091
|
var FOOTER_PADDING_H = 12;
|
|
3049
3092
|
var FOOTER_FONT_SIZE = 11;
|
|
3050
3093
|
var FOOTER_OPACITY = 0.75;
|
|
3051
|
-
var
|
|
3094
|
+
var styles26 = StyleSheet.create({
|
|
3052
3095
|
footer: {
|
|
3053
3096
|
paddingVertical: FOOTER_PADDING_V,
|
|
3054
3097
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -3074,7 +3117,7 @@ var BuildInfoFooter = ({
|
|
|
3074
3117
|
const commit = apiCommit ?? fetchedCommit;
|
|
3075
3118
|
const label = formatBuildInfo(buildVersion, commit);
|
|
3076
3119
|
const textStyle = useMemo(
|
|
3077
|
-
() => [
|
|
3120
|
+
() => [styles26.text, { color: theme.colors.textSecondary }],
|
|
3078
3121
|
[theme.colors.textSecondary]
|
|
3079
3122
|
);
|
|
3080
3123
|
return /* @__PURE__ */ jsx(
|
|
@@ -3082,7 +3125,7 @@ var BuildInfoFooter = ({
|
|
|
3082
3125
|
{
|
|
3083
3126
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
3084
3127
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
3085
|
-
style: [
|
|
3128
|
+
style: [styles26.footer, style],
|
|
3086
3129
|
testID,
|
|
3087
3130
|
children: /* @__PURE__ */ jsx(Text, { style: textStyle, children: label })
|
|
3088
3131
|
}
|
|
@@ -3093,7 +3136,7 @@ var BORDER = 2;
|
|
|
3093
3136
|
var GLYPH_SIZE = 14;
|
|
3094
3137
|
var GLYPH_LINE = 16;
|
|
3095
3138
|
var TICK = "\u2713";
|
|
3096
|
-
var
|
|
3139
|
+
var styles27 = StyleSheet.create({
|
|
3097
3140
|
circle: {
|
|
3098
3141
|
width: SIZE,
|
|
3099
3142
|
height: SIZE,
|
|
@@ -3110,9 +3153,9 @@ var CheckMark = ({ filled, accent, ring, glyphColor, testID }) => /* @__PURE__ *
|
|
|
3110
3153
|
"aria-hidden": true,
|
|
3111
3154
|
accessibilityElementsHidden: true,
|
|
3112
3155
|
importantForAccessibility: "no-hide-descendants",
|
|
3113
|
-
style: [
|
|
3156
|
+
style: [styles27.circle, { borderColor: filled ? accent : ring, backgroundColor: filled ? accent : void 0 }],
|
|
3114
3157
|
testID,
|
|
3115
|
-
children: filled ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3158
|
+
children: filled ? /* @__PURE__ */ jsx(Text, { style: [styles27.glyph, { color: glyphColor }], children: TICK }) : null
|
|
3116
3159
|
}
|
|
3117
3160
|
);
|
|
3118
3161
|
var ListRowToneContext = createContext(null);
|
|
@@ -3235,7 +3278,7 @@ var PAD_V = 12;
|
|
|
3235
3278
|
var GAP = 4;
|
|
3236
3279
|
var MARK_GAP = 12;
|
|
3237
3280
|
var LINE_GAP = 8;
|
|
3238
|
-
var
|
|
3281
|
+
var styles28 = StyleSheet.create({
|
|
3239
3282
|
row: {
|
|
3240
3283
|
flexDirection: "row",
|
|
3241
3284
|
alignItems: "center",
|
|
@@ -3259,7 +3302,7 @@ function focusTarget(event) {
|
|
|
3259
3302
|
}
|
|
3260
3303
|
function slot(node, color, strong) {
|
|
3261
3304
|
if (typeof node !== "string") return node;
|
|
3262
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
3305
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles28.shrink, strong ? styles28.strong : null, { color }], children: node });
|
|
3263
3306
|
}
|
|
3264
3307
|
var ListRow = ({
|
|
3265
3308
|
title,
|
|
@@ -3291,7 +3334,7 @@ var ListRow = ({
|
|
|
3291
3334
|
style: (state) => {
|
|
3292
3335
|
const { pressed, hovered } = state;
|
|
3293
3336
|
const look = resolveRowLook(selectedStyle, { selected, pressed, focused, hovered: hovered === true }, palette);
|
|
3294
|
-
return [
|
|
3337
|
+
return [styles28.row, { borderTopColor: colors.border }, look.container];
|
|
3295
3338
|
},
|
|
3296
3339
|
testID,
|
|
3297
3340
|
onBlur: () => {
|
|
@@ -3304,14 +3347,14 @@ var ListRow = ({
|
|
|
3304
3347
|
...pressedProps(selected),
|
|
3305
3348
|
children: [
|
|
3306
3349
|
rest.showCheck ? /* @__PURE__ */ jsx(CheckMark, { accent: palette.accent, filled: rest.checkFilled, glyphColor: palette.background, ring: palette.border, testID: checkTestId }) : null,
|
|
3307
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3308
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3350
|
+
/* @__PURE__ */ jsxs(View, { style: styles28.body, children: [
|
|
3351
|
+
/* @__PURE__ */ jsxs(View, { style: styles28.line, children: [
|
|
3309
3352
|
slot(title, rest.titleColor, true),
|
|
3310
3353
|
slot(trailing, rest.textColor, true)
|
|
3311
3354
|
] }),
|
|
3312
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3313
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3314
|
-
badges === void 0 ? null : /* @__PURE__ */ jsx(View, { style:
|
|
3355
|
+
/* @__PURE__ */ jsxs(View, { style: styles28.line, children: [
|
|
3356
|
+
/* @__PURE__ */ jsx(View, { style: styles28.shrink, children: slot(meta, rest.textColor, false) }),
|
|
3357
|
+
badges === void 0 ? null : /* @__PURE__ */ jsx(View, { style: styles28.badges, children: badges })
|
|
3315
3358
|
] })
|
|
3316
3359
|
] })
|
|
3317
3360
|
]
|
|
@@ -3333,7 +3376,7 @@ var ChipOverflow = /* @__PURE__ */ ((ChipOverflow2) => {
|
|
|
3333
3376
|
ChipOverflow2["Scroll"] = "scroll";
|
|
3334
3377
|
return ChipOverflow2;
|
|
3335
3378
|
})(ChipOverflow || {});
|
|
3336
|
-
var
|
|
3379
|
+
var styles29 = StyleSheet.create({
|
|
3337
3380
|
root: { flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
3338
3381
|
scrollRow: { flexDirection: "row", flexWrap: "nowrap", gap: 8 },
|
|
3339
3382
|
chip: { minHeight: MIN_TARGET_PX, justifyContent: "center", paddingHorizontal: 14, borderRadius: 999, borderWidth: 1 },
|
|
@@ -3347,7 +3390,7 @@ var SectionChips = ({ sections, activeKey, groupLabel, itemHint, overflow = "wra
|
|
|
3347
3390
|
const { colors } = theme;
|
|
3348
3391
|
const fill = activeColor ?? colors.text;
|
|
3349
3392
|
const scroll = overflow === "scroll" /* Scroll */;
|
|
3350
|
-
const row = /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", accessibilityLabel: groupLabel, style: scroll ?
|
|
3393
|
+
const row = /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", accessibilityLabel: groupLabel, style: scroll ? styles29.scrollRow : styles29.root, testID: `${testID}-chips`, children: sections.map((entry) => {
|
|
3351
3394
|
const active = entry.key === activeKey;
|
|
3352
3395
|
return /* @__PURE__ */ jsx(
|
|
3353
3396
|
Pressable,
|
|
@@ -3356,10 +3399,10 @@ var SectionChips = ({ sections, activeKey, groupLabel, itemHint, overflow = "wra
|
|
|
3356
3399
|
accessibilityRole: "tab",
|
|
3357
3400
|
accessibilityLabel: entry.title,
|
|
3358
3401
|
accessibilityHint: itemHint,
|
|
3359
|
-
style: [
|
|
3402
|
+
style: [styles29.chip, { borderColor: colors.border, backgroundColor: active ? fill : colors.background }],
|
|
3360
3403
|
testID: `${testID}-chip-${entry.key}`,
|
|
3361
3404
|
onPress: () => onSelect(entry.key),
|
|
3362
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3405
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles29.label, { color: active ? colors.background : colors.text }], children: entry.title })
|
|
3363
3406
|
},
|
|
3364
3407
|
entry.key
|
|
3365
3408
|
);
|
|
@@ -3376,7 +3419,7 @@ var SectionDensity = /* @__PURE__ */ ((SectionDensity2) => {
|
|
|
3376
3419
|
var SECTION_INDEX_WIDTH = 200;
|
|
3377
3420
|
var ACTIVE_BAR = 3;
|
|
3378
3421
|
var TRANSPARENT3 = "transparent";
|
|
3379
|
-
var
|
|
3422
|
+
var styles30 = StyleSheet.create({
|
|
3380
3423
|
root: { flexShrink: 0, gap: 2, alignSelf: "flex-start" },
|
|
3381
3424
|
heading: { fontSize: 12, fontWeight: "700", letterSpacing: 0.6, textTransform: "uppercase", paddingHorizontal: 10, paddingBottom: 6 },
|
|
3382
3425
|
item: { minHeight: MIN_TARGET_PX, justifyContent: "center", paddingHorizontal: 10, borderLeftWidth: ACTIVE_BAR, borderRadius: 6 },
|
|
@@ -3390,8 +3433,8 @@ var SectionIndex = ({ sections, activeKey, heading, itemHint, onSelect, testID,
|
|
|
3390
3433
|
const { theme } = useUi();
|
|
3391
3434
|
const { colors } = theme;
|
|
3392
3435
|
const bar = activeColor ?? colors.text;
|
|
3393
|
-
return /* @__PURE__ */ jsxs(View, { role: "navigation", accessibilityLabel: heading, style: [
|
|
3394
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3436
|
+
return /* @__PURE__ */ jsxs(View, { role: "navigation", accessibilityLabel: heading, style: [styles30.root, { width }], testID: `${testID}-index`, children: [
|
|
3437
|
+
/* @__PURE__ */ jsx(Text, { style: [styles30.heading, { color: colors.textSecondary }], children: heading }),
|
|
3395
3438
|
sections.map((entry) => {
|
|
3396
3439
|
const active = entry.key === activeKey;
|
|
3397
3440
|
return /* @__PURE__ */ jsx(
|
|
@@ -3401,10 +3444,10 @@ var SectionIndex = ({ sections, activeKey, heading, itemHint, onSelect, testID,
|
|
|
3401
3444
|
accessibilityRole: "link",
|
|
3402
3445
|
accessibilityLabel: entry.title,
|
|
3403
3446
|
accessibilityHint: itemHint,
|
|
3404
|
-
style: [
|
|
3447
|
+
style: [styles30.item, { borderLeftColor: active ? bar : TRANSPARENT3, backgroundColor: active ? colors.surface : TRANSPARENT3 }],
|
|
3405
3448
|
testID: `${testID}-index-${entry.key}`,
|
|
3406
3449
|
onPress: () => onSelect(entry.key),
|
|
3407
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
3450
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles30.label, active && styles30.labelActive, { color: active ? colors.text : colors.textSecondary }], children: entry.title })
|
|
3408
3451
|
},
|
|
3409
3452
|
entry.key
|
|
3410
3453
|
);
|
|
@@ -3430,7 +3473,7 @@ function scrollToSection(anchorId) {
|
|
|
3430
3473
|
var COMFORTABLE_GAP = 12;
|
|
3431
3474
|
var DENSE_GAP = 8;
|
|
3432
3475
|
var WEB_STICKY = { position: "sticky", top: 0 };
|
|
3433
|
-
var
|
|
3476
|
+
var styles31 = StyleSheet.create({
|
|
3434
3477
|
wide: { flexDirection: "row", alignItems: "flex-start", gap: 20 },
|
|
3435
3478
|
column: { flex: 1, minWidth: 0 }
|
|
3436
3479
|
});
|
|
@@ -3476,9 +3519,9 @@ var SectionIndexLayout = ({
|
|
|
3476
3519
|
scrollToSection(sectionAnchorId(testID, key));
|
|
3477
3520
|
};
|
|
3478
3521
|
const sticky = stickyIndex && Platform.OS === "web" ? WEB_STICKY : null;
|
|
3479
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3522
|
+
return /* @__PURE__ */ jsxs(View, { style: styles31.wide, testID, children: [
|
|
3480
3523
|
/* @__PURE__ */ jsx(View, { style: sticky, children: /* @__PURE__ */ jsx(SectionIndex, { activeColor, activeKey, heading: indexHeading, itemHint, sections, testID, width: indexWidth, onSelect: select }) }),
|
|
3481
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
3524
|
+
/* @__PURE__ */ jsx(View, { style: [styles31.column, gap], children: sections.map((entry) => /* @__PURE__ */ jsx(View, { nativeID: sectionAnchorId(testID, entry.key), testID: sectionAnchorId(testID, entry.key), children: entry.content }, entry.key)) })
|
|
3482
3525
|
] });
|
|
3483
3526
|
};
|
|
3484
3527
|
|
|
@@ -3488,12 +3531,23 @@ var DayBadgeFill = /* @__PURE__ */ ((DayBadgeFill2) => {
|
|
|
3488
3531
|
DayBadgeFill2["Tint"] = "tint";
|
|
3489
3532
|
return DayBadgeFill2;
|
|
3490
3533
|
})(DayBadgeFill || {});
|
|
3534
|
+
|
|
3535
|
+
// src/DayCard/DayCardLayout.ts
|
|
3536
|
+
var DayCardLayout = /* @__PURE__ */ ((DayCardLayout2) => {
|
|
3537
|
+
DayCardLayout2["Grouped"] = "grouped";
|
|
3538
|
+
DayCardLayout2["Separate"] = "separate";
|
|
3539
|
+
return DayCardLayout2;
|
|
3540
|
+
})(DayCardLayout || {});
|
|
3491
3541
|
var PILL_RADIUS2 = 999;
|
|
3492
3542
|
var BADGE_ICON_SIZE = 12;
|
|
3493
|
-
var
|
|
3543
|
+
var ITEM_RADIUS = 12;
|
|
3544
|
+
var ITEM_GAP = 8;
|
|
3545
|
+
var styles32 = StyleSheet.create({
|
|
3494
3546
|
body: { borderRadius: 8, borderWidth: 1, overflow: "hidden" },
|
|
3495
3547
|
count: { borderRadius: PILL_RADIUS2, borderWidth: 1, fontSize: 12, fontWeight: "700", paddingHorizontal: 8 },
|
|
3496
3548
|
head: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
3549
|
+
item: { borderRadius: ITEM_RADIUS, borderWidth: 1, overflow: "hidden" },
|
|
3550
|
+
items: { gap: ITEM_GAP },
|
|
3497
3551
|
label: { fontSize: 13, fontWeight: "600" },
|
|
3498
3552
|
stack: { gap: 6 }
|
|
3499
3553
|
});
|
|
@@ -3506,34 +3560,36 @@ var DayCard = ({
|
|
|
3506
3560
|
badgeTone = "warning" /* Warning */,
|
|
3507
3561
|
badgeFill = "solid" /* Solid */,
|
|
3508
3562
|
badgeIcon,
|
|
3563
|
+
layout = "grouped" /* Grouped */,
|
|
3509
3564
|
testID,
|
|
3510
3565
|
children
|
|
3511
3566
|
}) => {
|
|
3512
3567
|
const { theme } = useUi();
|
|
3513
3568
|
const { colors } = theme;
|
|
3514
3569
|
const tint = badgeFill === "tint" /* Tint */ ? resolveTintColors(theme, badgeTone) : void 0;
|
|
3570
|
+
const surface = { backgroundColor: colors.surface, borderColor: colors.border };
|
|
3515
3571
|
const iconInk = tint?.color ?? colors.textSecondary;
|
|
3516
3572
|
const icon = badgeIcon === void 0 ? void 0 : /* @__PURE__ */ jsx(SvgIcon, { color: iconInk, name: badgeIcon, size: BADGE_ICON_SIZE });
|
|
3517
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3518
|
-
/* @__PURE__ */ jsxs(View, { accessibilityHint, accessibilityLabel, accessibilityRole: "header", style:
|
|
3519
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3573
|
+
return /* @__PURE__ */ jsxs(View, { style: styles32.stack, testID, children: [
|
|
3574
|
+
/* @__PURE__ */ jsxs(View, { accessibilityHint, accessibilityLabel, accessibilityRole: "header", style: styles32.head, children: [
|
|
3575
|
+
/* @__PURE__ */ jsx(Text, { style: [styles32.label, { color: colors.text }], children: label }),
|
|
3520
3576
|
/* @__PURE__ */ jsx(StatusBadge, { backgroundColor: tint?.backgroundColor, color: tint?.color, icon, label: badge, testID: testID === void 0 ? void 0 : `${testID}-badge`, tone: badgeTone }),
|
|
3521
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3577
|
+
/* @__PURE__ */ jsx(Text, { style: [styles32.count, { borderColor: colors.border, color: colors.textSecondary }], children: String(count) })
|
|
3522
3578
|
] }),
|
|
3523
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3579
|
+
layout === "separate" /* Separate */ ? /* @__PURE__ */ jsx(View, { style: styles32.items, children: React16.Children.toArray(children).map((child, index) => /* @__PURE__ */ jsx(View, { style: [styles32.item, surface], testID: testID === void 0 ? void 0 : `${testID}-item-${String(index)}`, children: child }, index)) }) : /* @__PURE__ */ jsx(View, { style: [styles32.body, surface], children })
|
|
3524
3580
|
] });
|
|
3525
3581
|
};
|
|
3526
|
-
var
|
|
3582
|
+
var styles33 = StyleSheet.create({
|
|
3527
3583
|
full: { flexBasis: "100%" },
|
|
3528
3584
|
half: { flexBasis: "45%", flexGrow: 1, minWidth: 0 },
|
|
3529
3585
|
strip: { flexDirection: "row", flexWrap: "wrap", gap: 12 }
|
|
3530
3586
|
});
|
|
3531
3587
|
function figureCell(wide, span = 1) {
|
|
3532
3588
|
if (wide) return { flexBasis: 0, flexGrow: span, minWidth: 0 };
|
|
3533
|
-
return span > 1 ?
|
|
3589
|
+
return span > 1 ? styles33.full : styles33.half;
|
|
3534
3590
|
}
|
|
3535
|
-
var FigureStrip = ({ children, testID }) => /* @__PURE__ */ jsx(View, { style:
|
|
3536
|
-
var
|
|
3591
|
+
var FigureStrip = ({ children, testID }) => /* @__PURE__ */ jsx(View, { style: styles33.strip, testID, children });
|
|
3592
|
+
var styles34 = StyleSheet.create({
|
|
3537
3593
|
stack: { gap: 12 }
|
|
3538
3594
|
});
|
|
3539
3595
|
var ToggleSection = ({ wide, title, toggleLabel, toggleHint, forceOpen = false, open, onOpenChange, testID, children }) => {
|
|
@@ -3544,7 +3600,7 @@ var ToggleSection = ({ wide, title, toggleLabel, toggleHint, forceOpen = false,
|
|
|
3544
3600
|
onOpenChange?.(!isOpen);
|
|
3545
3601
|
};
|
|
3546
3602
|
if (wide) return /* @__PURE__ */ jsx(Section, { testID: `${testID}-card`, title, variant: "card" /* Card */, children });
|
|
3547
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3603
|
+
return /* @__PURE__ */ jsxs(View, { style: styles34.stack, children: [
|
|
3548
3604
|
/* @__PURE__ */ jsx(Button, { accessibilityHint: toggleHint, accessibilityLabel: toggleLabel, label: toggleLabel, testID: `${testID}-toggle`, variant: "outline", onPress: toggle }),
|
|
3549
3605
|
isOpen || forceOpen ? children : null
|
|
3550
3606
|
] });
|
|
@@ -3558,7 +3614,7 @@ function stickyEdgeStyle(os, bottomInset) {
|
|
|
3558
3614
|
return { position: "sticky", bottom: 0, zIndex: 1, paddingBottom: `calc(${String(padding)}px + env(safe-area-inset-bottom))` };
|
|
3559
3615
|
}
|
|
3560
3616
|
var ACTION_GAP = 8;
|
|
3561
|
-
var
|
|
3617
|
+
var styles35 = StyleSheet.create({
|
|
3562
3618
|
inline: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", justifyContent: "flex-end", gap: ACTION_GAP },
|
|
3563
3619
|
bar: { flexDirection: "row", flexWrap: "wrap", alignItems: "stretch", gap: ACTION_GAP, paddingTop: BAR_PADDING, paddingHorizontal: BAR_PADDING, borderTopWidth: 1 }
|
|
3564
3620
|
});
|
|
@@ -3568,16 +3624,17 @@ var StickyActionBar = ({
|
|
|
3568
3624
|
children,
|
|
3569
3625
|
breakpoint = LAYOUT_COLLAPSE_BREAKPOINT,
|
|
3570
3626
|
bottomInset = 0,
|
|
3627
|
+
bleed = 0,
|
|
3571
3628
|
testID = LAYOUT_TEST_IDS.stickyActionBar
|
|
3572
3629
|
}) => {
|
|
3573
3630
|
const wide = useIsWideViewport(breakpoint);
|
|
3574
3631
|
const { colors } = useUi().theme;
|
|
3575
|
-
if (wide) return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style:
|
|
3576
|
-
const surface = { backgroundColor: colors.surface, borderTopColor: colors.border };
|
|
3577
|
-
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: [
|
|
3632
|
+
if (wide) return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: styles35.inline, testID, children });
|
|
3633
|
+
const surface = { backgroundColor: colors.surface, borderTopColor: colors.border, marginHorizontal: -bleed };
|
|
3634
|
+
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: [styles35.bar, surface, stickyEdgeStyle(Platform.OS, bottomInset)], testID, children });
|
|
3578
3635
|
};
|
|
3579
3636
|
var TITLE_BASIS = 280;
|
|
3580
|
-
var
|
|
3637
|
+
var styles36 = StyleSheet.create({
|
|
3581
3638
|
row: { flexDirection: "row", flexWrap: "wrap", alignItems: "flex-start", justifyContent: "space-between", gap: 12 },
|
|
3582
3639
|
text: { gap: 4, flexGrow: 1, flexShrink: 1, flexBasis: TITLE_BASIS, minWidth: 0 },
|
|
3583
3640
|
title: { fontSize: 24, fontWeight: "800" },
|
|
@@ -3590,15 +3647,15 @@ var PageHead = ({ title, subtitle, actions, initialFocus = false, testID = LAYOU
|
|
|
3590
3647
|
const { colors } = useUi().theme;
|
|
3591
3648
|
const titleRef = useInitialFocus();
|
|
3592
3649
|
const focusProps = initialFocus ? { ref: titleRef, ...INITIAL_FOCUS_PROPS } : {};
|
|
3593
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3594
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3595
|
-
/* @__PURE__ */ jsx(Text, { ...focusProps, accessibilityRole: "header", style: [
|
|
3650
|
+
return /* @__PURE__ */ jsxs(View, { style: styles36.row, testID, children: [
|
|
3651
|
+
/* @__PURE__ */ jsxs(View, { style: styles36.text, children: [
|
|
3652
|
+
/* @__PURE__ */ jsx(Text, { ...focusProps, accessibilityRole: "header", style: [styles36.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
|
|
3596
3653
|
subtitle
|
|
3597
3654
|
] }),
|
|
3598
|
-
hasContent(actions) ? /* @__PURE__ */ jsx(View, { style:
|
|
3655
|
+
hasContent(actions) ? /* @__PURE__ */ jsx(View, { style: styles36.actions, testID: `${testID}-actions`, children: actions }) : null
|
|
3599
3656
|
] });
|
|
3600
3657
|
};
|
|
3601
|
-
var
|
|
3658
|
+
var styles37 = StyleSheet.create({
|
|
3602
3659
|
entry: { borderLeftWidth: 2, gap: 4, paddingBottom: 12, paddingLeft: 12 },
|
|
3603
3660
|
head: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
3604
3661
|
time: { fontSize: 13 },
|
|
@@ -3613,12 +3670,12 @@ var Timeline = ({ entries, accessibilityLabel, accessibilityHint, testID }) => {
|
|
|
3613
3670
|
accessibilityHint: entry.accessibilityHint,
|
|
3614
3671
|
accessibilityLabel: entry.accessibilityLabel,
|
|
3615
3672
|
role: "listitem",
|
|
3616
|
-
style: [
|
|
3673
|
+
style: [styles37.entry, { borderLeftColor: colors.border }],
|
|
3617
3674
|
testID: entryTestId(testID, entry.key),
|
|
3618
3675
|
children: [
|
|
3619
|
-
entry.time === "" ? null : /* @__PURE__ */ jsx(Text, { style: [
|
|
3620
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3621
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3676
|
+
entry.time === "" ? null : /* @__PURE__ */ jsx(Text, { style: [styles37.time, { color: colors.textSecondary }], children: entry.time }),
|
|
3677
|
+
/* @__PURE__ */ jsxs(View, { style: styles37.head, children: [
|
|
3678
|
+
/* @__PURE__ */ jsx(Text, { style: [styles37.title, { color: colors.text }], children: entry.title }),
|
|
3622
3679
|
entry.status === void 0 || entry.status === "" ? null : /* @__PURE__ */ jsx(StatusBadge, { label: entry.status, tone: entry.tone ?? "neutral" /* Neutral */ })
|
|
3623
3680
|
] })
|
|
3624
3681
|
]
|
|
@@ -3633,7 +3690,7 @@ function isRecordHeaderCompact(width, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
|
|
|
3633
3690
|
}
|
|
3634
3691
|
var GAP2 = 8;
|
|
3635
3692
|
var WIDE_GAP = 16;
|
|
3636
|
-
var
|
|
3693
|
+
var styles38 = StyleSheet.create({
|
|
3637
3694
|
actions: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP2, justifyContent: "flex-end" },
|
|
3638
3695
|
compactActions: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP2 },
|
|
3639
3696
|
identity: { flex: 1, gap: GAP2, minWidth: 0 },
|
|
@@ -3642,9 +3699,9 @@ var styles37 = StyleSheet.create({
|
|
|
3642
3699
|
});
|
|
3643
3700
|
var RecordHeader = ({ breadcrumb, title, meta, actions, collapseBelow, testID }) => {
|
|
3644
3701
|
const compact = isRecordHeaderCompact(useWindowDimensions().width, collapseBelow);
|
|
3645
|
-
const actionRow = actions === void 0 ? null : /* @__PURE__ */ jsx(View, { style: compact ?
|
|
3646
|
-
return /* @__PURE__ */ jsx(View, { style:
|
|
3647
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3702
|
+
const actionRow = actions === void 0 ? null : /* @__PURE__ */ jsx(View, { style: compact ? styles38.compactActions : styles38.actions, children: actions });
|
|
3703
|
+
return /* @__PURE__ */ jsx(View, { style: styles38.root, testID, children: /* @__PURE__ */ jsxs(View, { style: compact ? styles38.root : styles38.top, children: [
|
|
3704
|
+
/* @__PURE__ */ jsxs(View, { style: styles38.identity, children: [
|
|
3648
3705
|
breadcrumb,
|
|
3649
3706
|
title,
|
|
3650
3707
|
meta
|
|
@@ -3656,7 +3713,7 @@ var FONT_SIZE = 13;
|
|
|
3656
3713
|
var GAP3 = 6;
|
|
3657
3714
|
var SEPARATOR = "\u203A";
|
|
3658
3715
|
var BACK = "\u2039";
|
|
3659
|
-
var
|
|
3716
|
+
var styles39 = StyleSheet.create({
|
|
3660
3717
|
link: { justifyContent: "center", minHeight: MIN_TARGET_PX },
|
|
3661
3718
|
row: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP3 },
|
|
3662
3719
|
text: { fontSize: FONT_SIZE, fontWeight: "500" }
|
|
@@ -3664,11 +3721,11 @@ var styles38 = StyleSheet.create({
|
|
|
3664
3721
|
var Breadcrumb = ({ items, accessibilityLabel, accessibilityHint, testID }) => {
|
|
3665
3722
|
const { theme } = useUi();
|
|
3666
3723
|
const muted = { color: theme.colors.textSecondary };
|
|
3667
|
-
return /* @__PURE__ */ jsxs(View, { accessibilityHint, "aria-label": accessibilityLabel, style:
|
|
3668
|
-
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [
|
|
3724
|
+
return /* @__PURE__ */ jsxs(View, { accessibilityHint, "aria-label": accessibilityLabel, style: styles39.row, testID, children: [
|
|
3725
|
+
/* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles39.text, muted], children: BACK }),
|
|
3669
3726
|
items.map((item, index) => /* @__PURE__ */ jsxs(React16.Fragment, { children: [
|
|
3670
|
-
index > 0 ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [
|
|
3671
|
-
item.onPress === void 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3727
|
+
index > 0 ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles39.text, muted], children: SEPARATOR }) : null,
|
|
3728
|
+
item.onPress === void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles39.text, muted], testID: item.testID, children: item.label }) : /* @__PURE__ */ jsx(Pressable, { accessibilityHint: item.accessibilityHint, accessibilityLabel: item.label, accessibilityRole: "link", style: styles39.link, testID: item.testID, onPress: item.onPress, children: /* @__PURE__ */ jsx(Text, { style: [styles39.text, { color: theme.colors.text }], children: item.label }) })
|
|
3672
3729
|
] }, item.key))
|
|
3673
3730
|
] });
|
|
3674
3731
|
};
|
|
@@ -3677,7 +3734,7 @@ var PAD_H2 = 12;
|
|
|
3677
3734
|
var GAP4 = 6;
|
|
3678
3735
|
var FONT_SIZE2 = 13;
|
|
3679
3736
|
var DISABLED_OPACITY2 = 0.55;
|
|
3680
|
-
var
|
|
3737
|
+
var styles40 = StyleSheet.create({
|
|
3681
3738
|
base: { alignItems: "center", borderRadius: RADIUS, borderWidth: 1, flexDirection: "row", gap: GAP4, justifyContent: "center", minHeight: MIN_TARGET_PX, minWidth: MIN_TARGET_PX, paddingHorizontal: PAD_H2 },
|
|
3682
3739
|
disabled: { borderStyle: "dashed", opacity: DISABLED_OPACITY2 },
|
|
3683
3740
|
text: { fontSize: FONT_SIZE2, fontWeight: "600" }
|
|
@@ -3704,12 +3761,12 @@ var RecordActionButton = ({ label, hint, testID, icon, onPress, iconOnly = false
|
|
|
3704
3761
|
accessibilityRole: "button",
|
|
3705
3762
|
accessibilityState: { disabled },
|
|
3706
3763
|
disabled,
|
|
3707
|
-
style: [
|
|
3764
|
+
style: [styles40.base, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }, disabled && styles40.disabled],
|
|
3708
3765
|
testID,
|
|
3709
3766
|
onPress,
|
|
3710
3767
|
children: [
|
|
3711
3768
|
icon === void 0 ? null : /* @__PURE__ */ jsx(View, { "aria-hidden": true, children: icon }),
|
|
3712
|
-
showLabel ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3769
|
+
showLabel ? /* @__PURE__ */ jsx(Text, { style: [styles40.text, { color: theme.colors.text }], children: label }) : null
|
|
3713
3770
|
]
|
|
3714
3771
|
}
|
|
3715
3772
|
);
|
|
@@ -3721,7 +3778,7 @@ var FONT_SIZE3 = 12;
|
|
|
3721
3778
|
var COPY_GLYPH = "\u29C9";
|
|
3722
3779
|
var COPIED_GLYPH = "\u2713";
|
|
3723
3780
|
var MONO = Platform.select({ web: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", default: "monospace" });
|
|
3724
|
-
var
|
|
3781
|
+
var styles41 = StyleSheet.create({
|
|
3725
3782
|
chip: { alignItems: "center", alignSelf: "flex-start", borderRadius: RADIUS2, borderWidth: 1, flexDirection: "row", gap: GAP5, maxWidth: "100%", minHeight: MIN_TARGET_PX, paddingHorizontal: PAD_H3 },
|
|
3726
3783
|
text: { flexShrink: 1, fontFamily: MONO, fontSize: FONT_SIZE3 }
|
|
3727
3784
|
});
|
|
@@ -3738,24 +3795,24 @@ var IdChip = ({ label, value, testID, accessibilityLabel, accessibilityHint, dis
|
|
|
3738
3795
|
accessibilityRole: "button",
|
|
3739
3796
|
accessibilityState: { disabled: !copyable },
|
|
3740
3797
|
disabled: !copyable,
|
|
3741
|
-
style: [
|
|
3798
|
+
style: [styles41.chip, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }],
|
|
3742
3799
|
testID,
|
|
3743
3800
|
onPress: copyable ? copy : void 0,
|
|
3744
3801
|
children: [
|
|
3745
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3746
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
3747
|
-
copyable ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [
|
|
3802
|
+
/* @__PURE__ */ jsx(Text, { style: [styles41.text, { color: theme.colors.textSecondary }], children: label }),
|
|
3803
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles41.text, ink], testID: valueTestID, children: display ?? value }),
|
|
3804
|
+
copyable ? /* @__PURE__ */ jsx(Text, { "aria-hidden": true, style: [styles41.text, ink], testID: `${testID}-glyph`, children: status === "copied" /* Copied */ ? COPIED_GLYPH : COPY_GLYPH }) : null
|
|
3748
3805
|
]
|
|
3749
3806
|
}
|
|
3750
3807
|
);
|
|
3751
3808
|
};
|
|
3752
3809
|
var STEP_WIDTH = 8;
|
|
3753
3810
|
var STEP_OPACITIES = [0.35, 0.65, 0.9];
|
|
3754
|
-
var
|
|
3811
|
+
var styles42 = StyleSheet.create({
|
|
3755
3812
|
fade: { bottom: 0, flexDirection: "row", position: "absolute", right: 0, top: 0 },
|
|
3756
3813
|
step: { width: STEP_WIDTH }
|
|
3757
3814
|
});
|
|
3758
|
-
var EdgeFadeStrip = ({ color }) => /* @__PURE__ */ jsx(View, { "aria-hidden": true, pointerEvents: "none", style:
|
|
3815
|
+
var EdgeFadeStrip = ({ color }) => /* @__PURE__ */ jsx(View, { "aria-hidden": true, pointerEvents: "none", style: styles42.fade, children: STEP_OPACITIES.map((opacity) => /* @__PURE__ */ jsx(View, { style: [styles42.step, { backgroundColor: color, opacity }] }, opacity)) });
|
|
3759
3816
|
var SLACK_PX = 1;
|
|
3760
3817
|
function showsEdgeFade({ contentWidth, viewportWidth, offset }) {
|
|
3761
3818
|
return contentWidth - viewportWidth - offset > SLACK_PX;
|
|
@@ -3782,7 +3839,7 @@ var COUNT_FONT = 12;
|
|
|
3782
3839
|
var COUNT_MIN = 22;
|
|
3783
3840
|
var COUNT_PAD = 6;
|
|
3784
3841
|
var PILL = 999;
|
|
3785
|
-
var
|
|
3842
|
+
var styles43 = StyleSheet.create({
|
|
3786
3843
|
chip: { alignItems: "center", borderRadius: PILL, borderWidth: 1, flexDirection: "row", gap: GAP6, justifyContent: "center", minHeight: MIN_TARGET_PX, minWidth: MIN_TARGET_PX, paddingHorizontal: CHIP_PAD_H },
|
|
3787
3844
|
chipCount: { fontSize: FONT_SIZE4, fontWeight: "700" },
|
|
3788
3845
|
count: { borderRadius: PILL, fontSize: COUNT_FONT, fontWeight: "700", minWidth: COUNT_MIN, paddingHorizontal: COUNT_PAD, textAlign: "center" },
|
|
@@ -3803,20 +3860,23 @@ var TabPressable = ({ tab, selected, onChange, style, children }) => /* @__PURE_
|
|
|
3803
3860
|
children
|
|
3804
3861
|
}
|
|
3805
3862
|
);
|
|
3806
|
-
var UnderlineTabItem = ({ underline, ...item }) => {
|
|
3863
|
+
var UnderlineTabItem = ({ underline, activeText, ...item }) => {
|
|
3807
3864
|
const { theme } = useUi();
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
item.tab.
|
|
3865
|
+
const selectedInk = activeText ?? theme.colors.text;
|
|
3866
|
+
return /* @__PURE__ */ jsxs(TabPressable, { ...item, style: [styles43.tab, { borderBottomColor: item.selected ? underline : "transparent" }], children: [
|
|
3867
|
+
item.tab.icon ?? null,
|
|
3868
|
+
/* @__PURE__ */ jsx(Text, { style: [styles43.label, { color: item.selected ? selectedInk : theme.colors.textSecondary }], children: item.tab.label }),
|
|
3869
|
+
item.tab.count === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles43.count, { backgroundColor: theme.colors.border, color: theme.colors.text }], children: String(item.tab.count) })
|
|
3811
3870
|
] });
|
|
3812
3871
|
};
|
|
3813
|
-
var ChipTabItem = (item) => {
|
|
3872
|
+
var ChipTabItem = ({ activeFill, activeText, ...item }) => {
|
|
3814
3873
|
const { theme } = useUi();
|
|
3815
|
-
const
|
|
3816
|
-
const
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3874
|
+
const selectedFill = activeFill ?? theme.colors.text;
|
|
3875
|
+
const fill = item.selected ? selectedFill : "transparent";
|
|
3876
|
+
const ink = item.selected ? activeText ?? theme.colors.background : theme.colors.text;
|
|
3877
|
+
return /* @__PURE__ */ jsxs(TabPressable, { ...item, style: [styles43.chip, { backgroundColor: fill, borderColor: item.selected ? selectedFill : theme.colors.border }], children: [
|
|
3878
|
+
/* @__PURE__ */ jsx(Text, { style: [styles43.label, { color: ink }], children: item.tab.label }),
|
|
3879
|
+
item.tab.count === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles43.chipCount, { color: ink }], children: String(item.tab.count) })
|
|
3820
3880
|
] });
|
|
3821
3881
|
};
|
|
3822
3882
|
|
|
@@ -3830,26 +3890,26 @@ var DEFAULT_UNDERLINE_STEP = "700";
|
|
|
3830
3890
|
var SCROLL_THROTTLE_MS = 16;
|
|
3831
3891
|
var CHIP_GAP = 8;
|
|
3832
3892
|
var CHIP_PAD_V = 4;
|
|
3833
|
-
var
|
|
3893
|
+
var styles44 = StyleSheet.create({
|
|
3834
3894
|
chipRow: { alignItems: "center", flexDirection: "row", gap: CHIP_GAP, paddingVertical: CHIP_PAD_V },
|
|
3835
3895
|
chipWrap: { flexWrap: "wrap" },
|
|
3836
3896
|
strip: { position: "relative", width: "100%" }
|
|
3837
3897
|
});
|
|
3838
|
-
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll
|
|
3898
|
+
var UnderlineTabs = ({ tabs, activeKey, onChange, accessibilityLabel, accessibilityHint, underlineColor, fadeColor, testID, variant = "underline" /* Underline */, chipOverflow = "scroll" /* Scroll */, activeFillColor, activeTextColor }) => {
|
|
3839
3899
|
const { theme } = useUi();
|
|
3840
3900
|
const underline = underlineColor ?? theme.palette.primary[DEFAULT_UNDERLINE_STEP];
|
|
3841
3901
|
const fade = useEdgeFade();
|
|
3842
3902
|
const chips = variant === "chips" /* Chips */;
|
|
3843
3903
|
const items = tabs.map((tab) => {
|
|
3844
|
-
const item = { tab, selected: tab.key === activeKey, onChange };
|
|
3845
|
-
return chips ? /* @__PURE__ */ jsx(ChipTabItem, { ...item }, tab.key) : /* @__PURE__ */ jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3904
|
+
const item = { tab, selected: tab.key === activeKey, onChange, activeText: activeTextColor };
|
|
3905
|
+
return chips ? /* @__PURE__ */ jsx(ChipTabItem, { ...item, activeFill: activeFillColor }, tab.key) : /* @__PURE__ */ jsx(UnderlineTabItem, { ...item, underline }, tab.key);
|
|
3846
3906
|
});
|
|
3847
|
-
const stripStyle = chips ?
|
|
3907
|
+
const stripStyle = chips ? styles44.strip : [styles44.strip, { borderBottomColor: theme.colors.border, borderBottomWidth: 1 }];
|
|
3848
3908
|
if (chips && chipOverflow === "wrap" /* Wrap */) {
|
|
3849
|
-
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [
|
|
3909
|
+
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles44.chipRow, styles44.chipWrap], testID, children: items });
|
|
3850
3910
|
}
|
|
3851
3911
|
return /* @__PURE__ */ jsxs(View, { style: stripStyle, testID, children: [
|
|
3852
|
-
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, contentContainerStyle: chips ?
|
|
3912
|
+
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, accessibilityHint, accessibilityRole: "tablist", "aria-label": accessibilityLabel, contentContainerStyle: chips ? styles44.chipRow : void 0, scrollEventThrottle: SCROLL_THROTTLE_MS, showsHorizontalScrollIndicator: false, onContentSizeChange: fade.onContentSizeChange, onLayout: fade.onLayout, onScroll: fade.onScroll, children: items }),
|
|
3853
3913
|
fade.visible ? /* @__PURE__ */ jsx(EdgeFadeStrip, { color: fadeColor ?? theme.colors.background }) : null
|
|
3854
3914
|
] });
|
|
3855
3915
|
};
|
|
@@ -3857,7 +3917,7 @@ var RADIUS3 = 12;
|
|
|
3857
3917
|
var PAD = 16;
|
|
3858
3918
|
var GAP7 = 8;
|
|
3859
3919
|
var TITLE_FONT = 15;
|
|
3860
|
-
var
|
|
3920
|
+
var styles45 = StyleSheet.create({
|
|
3861
3921
|
card: { borderRadius: RADIUS3, borderWidth: 1, gap: GAP7, minWidth: 0, padding: PAD },
|
|
3862
3922
|
footer: { alignItems: "flex-start", flexDirection: "row", flexWrap: "wrap", gap: GAP7 },
|
|
3863
3923
|
head: { alignItems: "center", flexDirection: "row", gap: GAP7 },
|
|
@@ -3865,14 +3925,14 @@ var styles44 = StyleSheet.create({
|
|
|
3865
3925
|
});
|
|
3866
3926
|
var WidgetCard = ({ title, children, icon, headerRight, footer, testID }) => {
|
|
3867
3927
|
const { theme } = useUi();
|
|
3868
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3869
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3928
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles45.card, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }], testID, children: [
|
|
3929
|
+
/* @__PURE__ */ jsxs(View, { style: styles45.head, children: [
|
|
3870
3930
|
icon === void 0 ? null : /* @__PURE__ */ jsx(View, { "aria-hidden": true, children: icon }),
|
|
3871
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [
|
|
3931
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles45.title, { color: theme.colors.text }], children: title }),
|
|
3872
3932
|
headerRight
|
|
3873
3933
|
] }),
|
|
3874
3934
|
children,
|
|
3875
|
-
footer === void 0 ? null : /* @__PURE__ */ jsx(View, { style:
|
|
3935
|
+
footer === void 0 ? null : /* @__PURE__ */ jsx(View, { style: styles45.footer, children: footer })
|
|
3876
3936
|
] });
|
|
3877
3937
|
};
|
|
3878
3938
|
var LEAD_LABEL_SIZE = 14;
|
|
@@ -3884,7 +3944,7 @@ var GAP8 = 12;
|
|
|
3884
3944
|
var LEAD_GAP = 4;
|
|
3885
3945
|
var LEAD_BORDER = 1.5;
|
|
3886
3946
|
var ACCENT_STEP = "500";
|
|
3887
|
-
var
|
|
3947
|
+
var styles46 = StyleSheet.create({
|
|
3888
3948
|
slip: { gap: GAP8, width: "100%" },
|
|
3889
3949
|
lead: { padding: LEAD_PAD, borderRadius: LEAD_RADIUS, borderWidth: LEAD_BORDER, gap: LEAD_GAP },
|
|
3890
3950
|
leadLabel: { fontSize: LEAD_LABEL_SIZE },
|
|
@@ -3896,13 +3956,13 @@ var TransferSlip = ({ leadLabel, amount, recipient, children, footer, testID })
|
|
|
3896
3956
|
const { theme } = useUi();
|
|
3897
3957
|
const { colors } = theme;
|
|
3898
3958
|
const accent = theme.palette.primary[ACCENT_STEP];
|
|
3899
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3900
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
3901
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3902
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3903
|
-
recipient !== void 0 && /* @__PURE__ */ jsx(Text, { style: [
|
|
3959
|
+
return /* @__PURE__ */ jsxs(View, { style: styles46.slip, testID, children: [
|
|
3960
|
+
/* @__PURE__ */ jsxs(View, { style: [styles46.lead, { borderColor: accent, backgroundColor: colors.surface }], testID: `${testID}-lead`, children: [
|
|
3961
|
+
/* @__PURE__ */ jsx(Text, { style: [styles46.leadLabel, { color: colors.textSecondary }], children: leadLabel }),
|
|
3962
|
+
/* @__PURE__ */ jsx(Text, { style: [styles46.amount, { color: colors.text }], testID: `${testID}-amount`, children: amount }),
|
|
3963
|
+
recipient !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles46.recipient, { color: colors.text }], children: recipient })
|
|
3904
3964
|
] }),
|
|
3905
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3965
|
+
/* @__PURE__ */ jsx(View, { style: styles46.rows, children }),
|
|
3906
3966
|
footer
|
|
3907
3967
|
] });
|
|
3908
3968
|
};
|
|
@@ -3935,7 +3995,7 @@ var STACK_GAP = 8;
|
|
|
3935
3995
|
var ROW_PAD = 10;
|
|
3936
3996
|
var TEXT_GAP = 2;
|
|
3937
3997
|
var MONO_SPACING = 1;
|
|
3938
|
-
var
|
|
3998
|
+
var styles47 = StyleSheet.create({
|
|
3939
3999
|
inline: { flexDirection: "row", alignItems: "center", gap: ROW_GAP3, paddingVertical: ROW_PAD, borderTopWidth: StyleSheet.hairlineWidth },
|
|
3940
4000
|
prominent: { gap: STACK_GAP, paddingVertical: ROW_PAD },
|
|
3941
4001
|
text: { flex: 1, minWidth: 0, gap: TEXT_GAP },
|
|
@@ -3959,10 +4019,10 @@ var CopyValueRow = ({
|
|
|
3959
4019
|
const { status, copy } = useCopyToClipboard(copyValue ?? value, writer);
|
|
3960
4020
|
const action = copyActionLabel(status, labels);
|
|
3961
4021
|
const prominent = emphasis === "prominent" /* Prominent */;
|
|
3962
|
-
const valueStyle = prominent || monospace ?
|
|
3963
|
-
return /* @__PURE__ */ jsxs(View, { style: prominent ?
|
|
3964
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3965
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4022
|
+
const valueStyle = prominent || monospace ? styles47.big : styles47.value;
|
|
4023
|
+
return /* @__PURE__ */ jsxs(View, { style: prominent ? styles47.prominent : [styles47.inline, { borderTopColor: colors.border }], testID, children: [
|
|
4024
|
+
/* @__PURE__ */ jsxs(View, { style: styles47.text, children: [
|
|
4025
|
+
/* @__PURE__ */ jsx(Text, { style: [styles47.label, { color: colors.textSecondary }], children: label }),
|
|
3966
4026
|
/* @__PURE__ */ jsx(Text, { selectable: true, style: [valueStyle, { color: colors.text }], testID: `${testID}-value`, children: value })
|
|
3967
4027
|
] }),
|
|
3968
4028
|
copyControl === "icon" /* Icon */ ? /* @__PURE__ */ jsx(
|
|
@@ -4005,7 +4065,7 @@ var TILE_PAD = 12;
|
|
|
4005
4065
|
var TILE_RADIUS = 10;
|
|
4006
4066
|
var TILE_GAP = 2;
|
|
4007
4067
|
var ALERT_STEP = "500";
|
|
4008
|
-
var
|
|
4068
|
+
var styles48 = StyleSheet.create({
|
|
4009
4069
|
tile: { padding: TILE_PAD, borderRadius: TILE_RADIUS, borderWidth: StyleSheet.hairlineWidth, gap: TILE_GAP },
|
|
4010
4070
|
label: { fontSize: LABEL_SIZE2, fontWeight: "600" },
|
|
4011
4071
|
value: { fontSize: VALUE_SIZE2, fontWeight: "700" },
|
|
@@ -4019,19 +4079,19 @@ var TotalsStrip = ({ items, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT, testID }) =
|
|
|
4019
4079
|
return /* @__PURE__ */ jsx(FigureStrip, { testID, children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
4020
4080
|
View,
|
|
4021
4081
|
{
|
|
4022
|
-
style: [
|
|
4082
|
+
style: [styles48.tile, figureCell(wide), { borderColor: colors.border, backgroundColor: colors.surfaceElevated }],
|
|
4023
4083
|
testID: `${testID}-${item.key}`,
|
|
4024
4084
|
children: [
|
|
4025
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
4085
|
+
/* @__PURE__ */ jsx(Text, { style: [styles48.label, { color: colors.textSecondary }], children: item.label }),
|
|
4026
4086
|
/* @__PURE__ */ jsx(
|
|
4027
4087
|
Text,
|
|
4028
4088
|
{
|
|
4029
|
-
style: [
|
|
4089
|
+
style: [styles48.value, { color: item.tone === "alert" /* Alert */ ? theme.semantic.error[ALERT_STEP] : colors.text }],
|
|
4030
4090
|
testID: `${testID}-${item.key}-value`,
|
|
4031
4091
|
children: item.value
|
|
4032
4092
|
}
|
|
4033
4093
|
),
|
|
4034
|
-
item.caption !== void 0 && /* @__PURE__ */ jsx(Text, { style: [
|
|
4094
|
+
item.caption !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles48.caption, { color: colors.textSecondary }], children: item.caption })
|
|
4035
4095
|
]
|
|
4036
4096
|
},
|
|
4037
4097
|
item.key
|
|
@@ -4070,6 +4130,6 @@ var ListDetailLayout = ({
|
|
|
4070
4130
|
return /* @__PURE__ */ jsx(SplitPanes, { end: null, layout: "stack" /* Stack */, start: panes.detail ? detail : list, testID });
|
|
4071
4131
|
};
|
|
4072
4132
|
|
|
4073
|
-
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, Breadcrumb, BuildInfoFooter, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, CopyControl, CopyRowEmphasis, CopyStatus, CopyValueRow, CopyableId, CountBadge, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DropdownVariant, ELLIPSIS, FigureStrip, FormDialog, HEADER_STACK_BREAKPOINT, Heading, IdChip, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, ListDetailPane, ListRow, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, ModalShell, PageFrame, PageHead, RecordActionButton, RecordHeader, RowSelectedStyle, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, ScreenColumn, Section, SectionChips, SectionDensity, SectionIndex, SectionIndexLayout, SectionVariant, SegmentedControl, SelectedMarker, SideSheet, SplitLayout, SplitPanes, StatusBadge, StickyActionBar, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TabsVariant, TextKind, Timeline, ToggleSection, TotalsStrip, TotalsTone, TransferSlip, TruncatedText, UnderlineTabs, UpgradePrompt, WidgetCard, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
4133
|
+
export { A4_PAGE, API_COMMIT_SEPARATOR, Accordion, AccordionItem, AppText, BUILD_INFO_PREFIX, BadgeTone, BottomSheet, Breadcrumb, BuildInfoFooter, COPY_FEEDBACK_MS, ChipOverflow, ConfirmDialog, ConfirmDialogFocus, CopyControl, CopyRowEmphasis, CopyStatus, CopyValueRow, CopyableId, CountBadge, DEFAULT_BILLING_ROUTE, DayBadgeFill, DayCard, DayCardLayout, DropdownVariant, ELLIPSIS, FigureStrip, FormDialog, HEADER_STACK_BREAKPOINT, Heading, IdChip, LAYOUT_COLLAPSE_BREAKPOINT, LAYOUT_I18N, LAYOUT_TEST_IDS, ListDetailLayout, ListDetailPane, ListRow, MIN_TARGET_PX, MODAL_FOOTER_STACK_BELOW, Modal, ModalDropdown, ModalShell, PageFrame, PageHead, RecordActionButton, RecordHeader, RowSelectedStyle, SECTION_INDEX_BREAKPOINT, SECTION_INDEX_WIDTH, ScreenColumn, Section, SectionChips, SectionDensity, SectionIndex, SectionIndexLayout, SectionVariant, SegmentedControl, SegmentedVariant, SelectedMarker, SideSheet, SplitLayout, SplitPanes, StatusBadge, StickyActionBar, StickyPreview, TYPE_SCALE_BREAKPOINT, Tabs, TabsCollapsedTrigger, TabsVariant, TextKind, Timeline, ToggleSection, TotalsStrip, TotalsTone, TransferSlip, TruncatedText, UnderlineTabs, UpgradePrompt, WidgetCard, copyActionLabel, copyText, figureCell, formatBuildInfo, formatCount, formatUrlForDisplay, isKeyboardOpen, isModalFooterStacked, isRecordHeaderCompact, isSplitSideBySide, isWideWebViewport, pageScale, resolveActiveKey, resolveListDetailPanes, resolveRowLook, resolveTintColors, resolveToneColors, rowSelection, scaledFrame, shortenCommit, trimTrailingSlash, truncateMiddle, useApiCommit, useCopyToClipboard, useFocusTrap, useIsWideViewport, useListRowTone, useVisibleViewport };
|
|
4074
4134
|
//# sourceMappingURL=index.mjs.map
|
|
4075
4135
|
//# sourceMappingURL=index.mjs.map
|