@dloizides/ui-layout 1.38.2 → 1.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +267 -148
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +179 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React13 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var uiFeedback = require('@dloizides/ui-feedback');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -14,7 +14,7 @@ var rnWebHooks = require('@dloizides/rn-web-hooks');
|
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var React13__default = /*#__PURE__*/_interopDefault(React13);
|
|
18
18
|
|
|
19
19
|
// src/Section/Section.tsx
|
|
20
20
|
|
|
@@ -44,7 +44,7 @@ var Section = ({
|
|
|
44
44
|
const { theme } = uiFeedback.useUi();
|
|
45
45
|
const isCard = variant === "card" /* Card */;
|
|
46
46
|
const fill = isCard ? theme.colors.background : theme.colors.surface;
|
|
47
|
-
const containerStyle =
|
|
47
|
+
const containerStyle = React13__default.default.useMemo(
|
|
48
48
|
() => [styles.card, isCard ? styles.raised : null, { borderColor: theme.colors.border, backgroundColor: fill }, style],
|
|
49
49
|
[theme.colors.border, fill, isCard, style]
|
|
50
50
|
);
|
|
@@ -105,6 +105,7 @@ var LAYOUT_TEST_IDS = {
|
|
|
105
105
|
modalShellClose: "cancel-button",
|
|
106
106
|
/** Default base testID for the centered `Modal`; ✕ is `modal-close`, backdrop `modal-backdrop`. */
|
|
107
107
|
modal: "modal",
|
|
108
|
+
sideSheet: "side-sheet",
|
|
108
109
|
/** Default base testID for `ConfirmDialog`; Confirm/Cancel are `confirm-dialog-{confirm,cancel}`. */
|
|
109
110
|
confirmDialog: "confirm-dialog",
|
|
110
111
|
accordion: "accordion",
|
|
@@ -212,7 +213,7 @@ var Heading = ({
|
|
|
212
213
|
testID
|
|
213
214
|
}) => {
|
|
214
215
|
const { theme } = uiFeedback.useUi();
|
|
215
|
-
const headingStyle =
|
|
216
|
+
const headingStyle = React13__default.default.useMemo(
|
|
216
217
|
() => [styles3.heading, { color: theme.colors.text }, style],
|
|
217
218
|
[theme.colors.text, style]
|
|
218
219
|
);
|
|
@@ -267,9 +268,9 @@ var StatusBadge = ({
|
|
|
267
268
|
accessibilityHint
|
|
268
269
|
}) => {
|
|
269
270
|
const { t } = uiFeedback.useUi();
|
|
270
|
-
const dynamicBadge =
|
|
271
|
-
const dashedColor =
|
|
272
|
-
const dynamicText =
|
|
271
|
+
const dynamicBadge = React13.useMemo(() => ({ backgroundColor }), [backgroundColor]);
|
|
272
|
+
const dashedColor = React13.useMemo(() => ({ borderColor: color }), [color]);
|
|
273
|
+
const dynamicText = React13.useMemo(() => ({ color }), [color]);
|
|
273
274
|
const hasIcon = icon !== void 0 && icon !== null;
|
|
274
275
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
275
276
|
reactNative.View,
|
|
@@ -289,9 +290,9 @@ function isPastStickyLine(sentinelTop, isIntersecting, topOffset) {
|
|
|
289
290
|
return !isIntersecting && sentinelTop < topOffset;
|
|
290
291
|
}
|
|
291
292
|
function useStuckSentinel(topOffset) {
|
|
292
|
-
const sentinelRef =
|
|
293
|
-
const [isStuck, setIsStuck] =
|
|
294
|
-
|
|
293
|
+
const sentinelRef = React13.useRef(null);
|
|
294
|
+
const [isStuck, setIsStuck] = React13.useState(false);
|
|
295
|
+
React13.useEffect(() => {
|
|
295
296
|
const node = sentinelRef.current;
|
|
296
297
|
if (node === null || typeof IntersectionObserver === "undefined") return void 0;
|
|
297
298
|
const observer = new IntersectionObserver(
|
|
@@ -312,9 +313,9 @@ function isKeyboardOpen(visibleHeight, tallestHeight) {
|
|
|
312
313
|
return visibleHeight < tallestHeight * KEYBOARD_HEIGHT_RATIO;
|
|
313
314
|
}
|
|
314
315
|
function useVisibleViewport() {
|
|
315
|
-
const [state, setState] =
|
|
316
|
-
const tallest =
|
|
317
|
-
|
|
316
|
+
const [state, setState] = React13.useState(INITIAL);
|
|
317
|
+
const tallest = React13.useRef({ width: 0, height: 0 });
|
|
318
|
+
React13.useEffect(() => {
|
|
318
319
|
const viewport = typeof window === "undefined" ? void 0 : window.visualViewport;
|
|
319
320
|
if (viewport === void 0 || viewport === null) return void 0;
|
|
320
321
|
const read = () => {
|
|
@@ -357,7 +358,7 @@ var StickyPreview = ({
|
|
|
357
358
|
const { offsetTop, keyboardOpen } = useVisibleViewport();
|
|
358
359
|
const { sentinelRef, isStuck } = useStuckSentinel(topOffset);
|
|
359
360
|
const isCompact = forceCompact || isStuck || keyboardOpen;
|
|
360
|
-
const pinned =
|
|
361
|
+
const pinned = React13.useMemo(() => {
|
|
361
362
|
const web = { position: "sticky", top: topOffset + offsetTop, zIndex: STICKY_Z_INDEX };
|
|
362
363
|
return reactNative.Platform.OS === WEB_PLATFORM ? web : {};
|
|
363
364
|
}, [offsetTop, topOffset]);
|
|
@@ -381,7 +382,7 @@ var StickyPreview = ({
|
|
|
381
382
|
] });
|
|
382
383
|
};
|
|
383
384
|
function useEscapeKey(enabled, onClose) {
|
|
384
|
-
|
|
385
|
+
React13.useEffect(() => {
|
|
385
386
|
if (reactNative.Platform.OS !== "web" || !enabled) return;
|
|
386
387
|
const onKeyDown = (event) => {
|
|
387
388
|
if (event.key === "Escape") onClose();
|
|
@@ -438,8 +439,8 @@ function handleKeyDown(domNode, event) {
|
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
441
|
function useFocusTrap(containerRef, enabled, initialFocusTestID) {
|
|
441
|
-
const previousFocusRef =
|
|
442
|
-
|
|
442
|
+
const previousFocusRef = React13.useRef(null);
|
|
443
|
+
React13.useEffect(() => {
|
|
443
444
|
if (reactNative.Platform.OS !== "web" || !enabled) return;
|
|
444
445
|
const domNode = containerRef.current;
|
|
445
446
|
if (!domNode) return;
|
|
@@ -456,7 +457,7 @@ function useFocusTrap(containerRef, enabled, initialFocusTestID) {
|
|
|
456
457
|
}, [containerRef, enabled, initialFocusTestID]);
|
|
457
458
|
}
|
|
458
459
|
function useScrollLock(enabled) {
|
|
459
|
-
|
|
460
|
+
React13.useEffect(() => {
|
|
460
461
|
if (reactNative.Platform.OS !== "web" || !enabled) return;
|
|
461
462
|
const { body } = document;
|
|
462
463
|
const previousOverflow = body.style.overflow;
|
|
@@ -517,7 +518,7 @@ var Modal = ({
|
|
|
517
518
|
initialFocusTestID
|
|
518
519
|
}) => {
|
|
519
520
|
const { theme, t } = uiFeedback.useUi();
|
|
520
|
-
const dialogRef =
|
|
521
|
+
const dialogRef = React13.useRef(null);
|
|
521
522
|
const backdrop = uiMotion.useEnterExit({ visible });
|
|
522
523
|
const panel = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
|
|
523
524
|
const mounted = panel.mounted || backdrop.mounted;
|
|
@@ -526,7 +527,7 @@ var Modal = ({
|
|
|
526
527
|
useScrollLock(visible);
|
|
527
528
|
const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
|
|
528
529
|
const closeLabel = t(LAYOUT_I18N.dialogClose);
|
|
529
|
-
const dialogStyle =
|
|
530
|
+
const dialogStyle = React13.useMemo(
|
|
530
531
|
() => [styles6.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
|
|
531
532
|
[theme.colors.surface, size]
|
|
532
533
|
);
|
|
@@ -626,13 +627,13 @@ var PageFrame = ({
|
|
|
626
627
|
enlargeable = false
|
|
627
628
|
}) => {
|
|
628
629
|
const { t } = uiFeedback.useUi();
|
|
629
|
-
const [containerWidth, setContainerWidth] =
|
|
630
|
-
const [enlarged, setEnlarged] =
|
|
631
|
-
const onLayout =
|
|
630
|
+
const [containerWidth, setContainerWidth] = React13.useState(0);
|
|
631
|
+
const [enlarged, setEnlarged] = React13.useState(false);
|
|
632
|
+
const onLayout = React13.useCallback((event) => {
|
|
632
633
|
setContainerWidth(event.nativeEvent.layout.width);
|
|
633
634
|
}, []);
|
|
634
|
-
const open =
|
|
635
|
-
const close =
|
|
635
|
+
const open = React13.useCallback(() => setEnlarged(true), []);
|
|
636
|
+
const close = React13.useCallback(() => setEnlarged(false), []);
|
|
636
637
|
const frame = scaledFrame(containerWidth, pageSize);
|
|
637
638
|
const preview = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles7.outer, { height: frame.height }], testID, onLayout, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
638
639
|
reactNative.View,
|
|
@@ -771,6 +772,9 @@ var BORDER_RADIUS = 8;
|
|
|
771
772
|
var BORDER_WIDTH2 = 1;
|
|
772
773
|
var MENU_PADDING = 4;
|
|
773
774
|
var MENU_SCROLL_MAX_HEIGHT = MENU_MAX_HEIGHT - (BORDER_WIDTH2 + MENU_PADDING) * 2;
|
|
775
|
+
function menuScrollMaxHeight(popoverMaxHeight) {
|
|
776
|
+
return Math.max(0, popoverMaxHeight - (BORDER_WIDTH2 + MENU_PADDING) * 2);
|
|
777
|
+
}
|
|
774
778
|
var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
|
|
775
779
|
var MENU_VIEWPORT_MARGIN = 8;
|
|
776
780
|
var COMPACT_TRIGGER_MENU_MIN_WIDTH = 160;
|
|
@@ -778,7 +782,18 @@ function resolveMenuMinWidth(menuMinWidth, hasCustomTrigger) {
|
|
|
778
782
|
if (menuMinWidth !== void 0) return menuMinWidth;
|
|
779
783
|
return hasCustomTrigger ? COMPACT_TRIGGER_MENU_MIN_WIDTH : void 0;
|
|
780
784
|
}
|
|
781
|
-
function
|
|
785
|
+
function resolveMenuPlacement(rect, viewportHeight, menuHeight) {
|
|
786
|
+
if (viewportHeight <= 0) return { top: rect.bottom + MENU_TOP_GAP, maxHeight: MENU_MAX_HEIGHT };
|
|
787
|
+
const top = Math.max(MENU_VIEWPORT_MARGIN, rect.bottom + MENU_TOP_GAP);
|
|
788
|
+
const bottom = Math.max(MENU_VIEWPORT_MARGIN, viewportHeight - rect.top + MENU_TOP_GAP);
|
|
789
|
+
const roomBelow = viewportHeight - top - MENU_VIEWPORT_MARGIN;
|
|
790
|
+
const roomAbove = viewportHeight - bottom - MENU_VIEWPORT_MARGIN;
|
|
791
|
+
const fitsBelow = roomBelow >= Math.min(menuHeight, MENU_MAX_HEIGHT);
|
|
792
|
+
const cap = (room) => Math.max(0, Math.min(MENU_MAX_HEIGHT, room));
|
|
793
|
+
if (!fitsBelow && roomAbove > roomBelow) return { bottom, maxHeight: cap(roomAbove) };
|
|
794
|
+
return { top, maxHeight: cap(roomBelow) };
|
|
795
|
+
}
|
|
796
|
+
function buildPortalPopoverStyle(rect, minWidth = 0, viewportWidth = 0, placement = resolveMenuPlacement(rect, 0, MENU_MAX_HEIGHT)) {
|
|
782
797
|
const width = Math.max(rect.width, minWidth);
|
|
783
798
|
let left = rect.left;
|
|
784
799
|
if (viewportWidth > 0) {
|
|
@@ -789,14 +804,13 @@ function buildPortalPopoverStyle(rect, minWidth = 0, viewportWidth = 0) {
|
|
|
789
804
|
// RN's ViewStyle union omits 'fixed', but react-native-web honours it at runtime.
|
|
790
805
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- web-only position value
|
|
791
806
|
position: "fixed",
|
|
792
|
-
|
|
807
|
+
...placement,
|
|
793
808
|
left,
|
|
794
809
|
width,
|
|
795
810
|
zIndex: MENU_Z_INDEX,
|
|
796
811
|
borderWidth: BORDER_WIDTH2,
|
|
797
812
|
borderRadius: BORDER_RADIUS,
|
|
798
813
|
padding: MENU_PADDING,
|
|
799
|
-
maxHeight: MENU_MAX_HEIGHT,
|
|
800
814
|
boxShadow: MENU_BOX_SHADOW,
|
|
801
815
|
elevation: MENU_ELEVATION
|
|
802
816
|
};
|
|
@@ -888,7 +902,7 @@ var OptionRow = ({
|
|
|
888
902
|
}) => {
|
|
889
903
|
const { theme, t } = uiFeedback.useUi();
|
|
890
904
|
const { colors } = theme;
|
|
891
|
-
const handlePress =
|
|
905
|
+
const handlePress = React13.useCallback(() => {
|
|
892
906
|
onSelect();
|
|
893
907
|
}, [onSelect]);
|
|
894
908
|
const accentColor = theme.palette.primary["500"];
|
|
@@ -977,8 +991,8 @@ function isSameRect(a, b) {
|
|
|
977
991
|
return a.top === b.top && a.left === b.left && a.width === b.width && a.bottom === b.bottom;
|
|
978
992
|
}
|
|
979
993
|
function useAnchorTracking(containerRef, onOutOfView) {
|
|
980
|
-
const [rect, setRect] =
|
|
981
|
-
|
|
994
|
+
const [rect, setRect] = React13.useState(() => readAnchorRect(containerRef));
|
|
995
|
+
React13.useLayoutEffect(() => {
|
|
982
996
|
if (!IS_WEB) return void 0;
|
|
983
997
|
let frame = null;
|
|
984
998
|
let isDisposed = false;
|
|
@@ -1057,7 +1071,7 @@ function buildKeyHandler(params) {
|
|
|
1057
1071
|
}
|
|
1058
1072
|
function useMenuKeyboard(params) {
|
|
1059
1073
|
const { containerRef, menuRef, enabled, onClose } = params;
|
|
1060
|
-
|
|
1074
|
+
React13.useEffect(() => {
|
|
1061
1075
|
if (reactNative.Platform.OS !== "web" || !enabled) return;
|
|
1062
1076
|
const onKeyDown = buildKeyHandler(params);
|
|
1063
1077
|
const onMouseDown = (event) => {
|
|
@@ -1075,6 +1089,29 @@ function useMenuKeyboard(params) {
|
|
|
1075
1089
|
}, [containerRef, menuRef, enabled, onClose, params]);
|
|
1076
1090
|
}
|
|
1077
1091
|
var IS_WEB2 = reactNative.Platform.OS === "web";
|
|
1092
|
+
var UNMEASURED_RECT = { top: 0, bottom: 0 };
|
|
1093
|
+
function readViewportHeight() {
|
|
1094
|
+
return IS_WEB2 && typeof window !== "undefined" ? window.innerHeight : 0;
|
|
1095
|
+
}
|
|
1096
|
+
function useMenuPlacement(rect, menuRef, itemCount) {
|
|
1097
|
+
const [menuHeight, setMenuHeight] = React13.useState(MENU_MAX_HEIGHT);
|
|
1098
|
+
const [viewportHeight, setViewportHeight] = React13.useState(readViewportHeight);
|
|
1099
|
+
React13.useLayoutEffect(() => {
|
|
1100
|
+
const measured = toDomNode(menuRef)?.offsetHeight ?? 0;
|
|
1101
|
+
if (measured > 0) setMenuHeight(measured);
|
|
1102
|
+
}, [menuRef, itemCount]);
|
|
1103
|
+
React13.useLayoutEffect(() => {
|
|
1104
|
+
if (!IS_WEB2) return void 0;
|
|
1105
|
+
const onResize = () => setViewportHeight(readViewportHeight());
|
|
1106
|
+
window.addEventListener("resize", onResize);
|
|
1107
|
+
return () => window.removeEventListener("resize", onResize);
|
|
1108
|
+
}, []);
|
|
1109
|
+
return React13.useMemo(
|
|
1110
|
+
() => resolveMenuPlacement(rect ?? UNMEASURED_RECT, viewportHeight, menuHeight),
|
|
1111
|
+
[rect, viewportHeight, menuHeight]
|
|
1112
|
+
);
|
|
1113
|
+
}
|
|
1114
|
+
var IS_WEB3 = reactNative.Platform.OS === "web";
|
|
1078
1115
|
var BORDER_RADIUS2 = 8;
|
|
1079
1116
|
var BORDER_WIDTH3 = 1;
|
|
1080
1117
|
var MENU_PADDING2 = 4;
|
|
@@ -1097,7 +1134,8 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1097
1134
|
// The enter/exit fade+scale lives on an INNER wrapper so the outer popover keeps its raw DOM
|
|
1098
1135
|
// node (the `menuRef` outside-click / keyboard logic and the web portal target depend on it).
|
|
1099
1136
|
// `transformOrigin: 'top'` makes the scale grow downward FROM the anchor rather than the centre.
|
|
1100
|
-
animated: { transformOrigin: "top" },
|
|
1137
|
+
animated: { transformOrigin: "top", flexShrink: 1 },
|
|
1138
|
+
animatedAbove: { transformOrigin: "bottom" },
|
|
1101
1139
|
// Exit fade only: the dying popover must not receive the next click. See the file header.
|
|
1102
1140
|
inert: { pointerEvents: "none" },
|
|
1103
1141
|
// Bound the scroll viewport so a list longer than the popover scrolls (with a scrollbar) instead of
|
|
@@ -1121,27 +1159,29 @@ var InlineMenu = ({
|
|
|
1121
1159
|
}) => {
|
|
1122
1160
|
const { theme } = uiFeedback.useUi();
|
|
1123
1161
|
const { colors } = theme;
|
|
1124
|
-
const menuRef =
|
|
1162
|
+
const menuRef = React13.useRef(null);
|
|
1125
1163
|
const rect = useAnchorTracking(containerRef, onClose);
|
|
1126
|
-
const
|
|
1164
|
+
const placement = useMenuPlacement(rect, menuRef, options.length);
|
|
1165
|
+
const opensAbove = placement.bottom !== void 0;
|
|
1166
|
+
const selectedIndex = React13.useMemo(
|
|
1127
1167
|
() => Math.max(0, options.findIndex((opt) => opt.value === value)),
|
|
1128
1168
|
[options, value]
|
|
1129
1169
|
);
|
|
1130
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
1131
|
-
const handleSelect =
|
|
1170
|
+
const [highlightedIndex, setHighlightedIndex] = React13.useState(() => selectedIndex);
|
|
1171
|
+
const handleSelect = React13.useCallback(
|
|
1132
1172
|
(optionValue) => {
|
|
1133
1173
|
if (isOpen) onSelect(optionValue);
|
|
1134
1174
|
},
|
|
1135
1175
|
[isOpen, onSelect]
|
|
1136
1176
|
);
|
|
1137
|
-
const selectAt =
|
|
1177
|
+
const selectAt = React13.useCallback(
|
|
1138
1178
|
(index) => {
|
|
1139
1179
|
const option = options[index];
|
|
1140
1180
|
if (option !== void 0) handleSelect(option.value);
|
|
1141
1181
|
},
|
|
1142
1182
|
[options, handleSelect]
|
|
1143
1183
|
);
|
|
1144
|
-
const selectHighlighted =
|
|
1184
|
+
const selectHighlighted = React13.useCallback(
|
|
1145
1185
|
() => {
|
|
1146
1186
|
selectAt(highlightedIndex);
|
|
1147
1187
|
},
|
|
@@ -1156,17 +1196,18 @@ var InlineMenu = ({
|
|
|
1156
1196
|
onSelectHighlighted: selectHighlighted,
|
|
1157
1197
|
onClose
|
|
1158
1198
|
});
|
|
1159
|
-
const popoverStyle =
|
|
1199
|
+
const popoverStyle = React13.useMemo(() => {
|
|
1160
1200
|
const themed = { borderColor: colors.border, backgroundColor: colors.surface };
|
|
1161
|
-
if (
|
|
1201
|
+
if (IS_WEB3) {
|
|
1162
1202
|
const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 0;
|
|
1163
1203
|
return [
|
|
1164
|
-
buildPortalPopoverStyle(rect ?? { left: 0, width: 0, bottom: 0 }, menuMinWidth, viewportWidth),
|
|
1204
|
+
buildPortalPopoverStyle(rect ?? { top: 0, left: 0, width: 0, bottom: 0 }, menuMinWidth, viewportWidth, placement),
|
|
1165
1205
|
themed
|
|
1166
1206
|
];
|
|
1167
1207
|
}
|
|
1168
1208
|
return [styles11.popover, { minWidth: menuMinWidth }, themed];
|
|
1169
|
-
}, [colors.border, colors.surface, menuMinWidth, rect]);
|
|
1209
|
+
}, [colors.border, colors.surface, menuMinWidth, placement, rect]);
|
|
1210
|
+
const scrollStyle = IS_WEB3 ? { maxHeight: menuScrollMaxHeight(placement.maxHeight) } : styles11.scroll;
|
|
1170
1211
|
const menu = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1171
1212
|
reactNative.View,
|
|
1172
1213
|
{
|
|
@@ -1180,10 +1221,10 @@ var InlineMenu = ({
|
|
|
1180
1221
|
reactNative.Animated.View,
|
|
1181
1222
|
{
|
|
1182
1223
|
pointerEvents: isOpen ? "auto" : "none",
|
|
1183
|
-
style: [styles11.animated, animatedStyle, isOpen ? null : styles11.inert],
|
|
1224
|
+
style: [styles11.animated, opensAbove ? styles11.animatedAbove : null, animatedStyle, isOpen ? null : styles11.inert],
|
|
1184
1225
|
children: [
|
|
1185
1226
|
menuHeading !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MenuHeading, { testID, text: menuHeading }) : null,
|
|
1186
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style:
|
|
1227
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style: scrollStyle, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1187
1228
|
OptionRow,
|
|
1188
1229
|
{
|
|
1189
1230
|
asMenuItem: true,
|
|
@@ -1201,7 +1242,7 @@ var InlineMenu = ({
|
|
|
1201
1242
|
)
|
|
1202
1243
|
}
|
|
1203
1244
|
);
|
|
1204
|
-
if (
|
|
1245
|
+
if (IS_WEB3) return reactDom.createPortal(menu, document.body);
|
|
1205
1246
|
return menu;
|
|
1206
1247
|
};
|
|
1207
1248
|
var MENU_BREAKPOINT = LAYOUT_COLLAPSE_BREAKPOINT;
|
|
@@ -1301,7 +1342,7 @@ var ModalDropdown = ({
|
|
|
1301
1342
|
const { colors } = theme;
|
|
1302
1343
|
const resolvedVariant = useResolvedDropdownVariant(variant);
|
|
1303
1344
|
const isMenu = resolvedVariant === "menu" /* Menu */;
|
|
1304
|
-
const [isOpen, setIsOpen] =
|
|
1345
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
1305
1346
|
const { a11yProps, hintNode } = a11y.useA11y({
|
|
1306
1347
|
label: accessibilityLabel,
|
|
1307
1348
|
hint: accessibilityHint,
|
|
@@ -1309,10 +1350,10 @@ var ModalDropdown = ({
|
|
|
1309
1350
|
state: { expanded: isOpen },
|
|
1310
1351
|
testID
|
|
1311
1352
|
});
|
|
1312
|
-
const anchorRef =
|
|
1313
|
-
const triggerRef =
|
|
1353
|
+
const anchorRef = React13.useRef(null);
|
|
1354
|
+
const triggerRef = React13.useRef(null);
|
|
1314
1355
|
const popupProps = { "aria-haspopup": isMenu ? "menu" : "dialog" };
|
|
1315
|
-
const dialogRef =
|
|
1356
|
+
const dialogRef = React13.useRef(null);
|
|
1316
1357
|
useFocusTrap(dialogRef, isOpen && !isMenu);
|
|
1317
1358
|
const menuAnim = uiMotion.useEnterExit({
|
|
1318
1359
|
visible: isMenu && isOpen,
|
|
@@ -1324,17 +1365,17 @@ var ModalDropdown = ({
|
|
|
1324
1365
|
fromScale: POPOVER_ENTER_SCALE,
|
|
1325
1366
|
duration: POPOVER_MOTION_MS
|
|
1326
1367
|
});
|
|
1327
|
-
const selectedLabel =
|
|
1368
|
+
const selectedLabel = React13.useMemo(() => {
|
|
1328
1369
|
const found = options.find((opt) => opt.value === value);
|
|
1329
1370
|
return found?.label ?? t(LAYOUT_I18N.selectPlaceholder);
|
|
1330
1371
|
}, [options, value, t]);
|
|
1331
|
-
const handleToggle =
|
|
1372
|
+
const handleToggle = React13.useCallback(() => {
|
|
1332
1373
|
setIsOpen((prev) => !prev);
|
|
1333
1374
|
}, []);
|
|
1334
|
-
const handleClose =
|
|
1375
|
+
const handleClose = React13.useCallback(() => {
|
|
1335
1376
|
setIsOpen(false);
|
|
1336
1377
|
}, []);
|
|
1337
|
-
const handleSelect =
|
|
1378
|
+
const handleSelect = React13.useCallback(
|
|
1338
1379
|
(optionValue) => {
|
|
1339
1380
|
onChange(optionValue);
|
|
1340
1381
|
setIsOpen(false);
|
|
@@ -1344,7 +1385,7 @@ var ModalDropdown = ({
|
|
|
1344
1385
|
);
|
|
1345
1386
|
const isHamburger = showHamburger;
|
|
1346
1387
|
const isCaret = showCaret && !isHamburger;
|
|
1347
|
-
const containerStyle =
|
|
1388
|
+
const containerStyle = React13.useMemo(
|
|
1348
1389
|
() => renderTrigger !== void 0 ? void 0 : [
|
|
1349
1390
|
styles12.container,
|
|
1350
1391
|
isHamburger ? styles12.containerHamburger : isCaret ? styles12.containerMenu : null,
|
|
@@ -1352,30 +1393,30 @@ var ModalDropdown = ({
|
|
|
1352
1393
|
],
|
|
1353
1394
|
[colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
|
|
1354
1395
|
);
|
|
1355
|
-
const hamburgerStyle =
|
|
1396
|
+
const hamburgerStyle = React13.useMemo(
|
|
1356
1397
|
() => [styles12.hamburger, { color: colors.textSecondary }],
|
|
1357
1398
|
[colors.textSecondary]
|
|
1358
1399
|
);
|
|
1359
|
-
const caretStyle =
|
|
1400
|
+
const caretStyle = React13.useMemo(
|
|
1360
1401
|
() => [
|
|
1361
1402
|
styles12.caret,
|
|
1362
1403
|
{ color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
|
|
1363
1404
|
],
|
|
1364
1405
|
[colors.textSecondary, isOpen]
|
|
1365
1406
|
);
|
|
1366
|
-
const optionTestIDFor =
|
|
1407
|
+
const optionTestIDFor = React13.useCallback(
|
|
1367
1408
|
(optionValue) => optionTestID !== void 0 ? optionTestID(optionValue) : `${testID}-option-${String(optionValue)}`,
|
|
1368
1409
|
[optionTestID, testID]
|
|
1369
1410
|
);
|
|
1370
|
-
const anchorStyle =
|
|
1411
|
+
const anchorStyle = React13.useMemo(
|
|
1371
1412
|
() => [styles12.anchor, buildAnchorStackStyle(isMenu && isOpen)],
|
|
1372
1413
|
[isMenu, isOpen]
|
|
1373
1414
|
);
|
|
1374
|
-
const modalContentStyle =
|
|
1415
|
+
const modalContentStyle = React13.useMemo(
|
|
1375
1416
|
() => [styles12.modalContent, { backgroundColor: colors.surface }],
|
|
1376
1417
|
[colors.surface]
|
|
1377
1418
|
);
|
|
1378
|
-
const renderModalOption =
|
|
1419
|
+
const renderModalOption = React13.useCallback(
|
|
1379
1420
|
({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1380
1421
|
OptionRow,
|
|
1381
1422
|
{
|
|
@@ -1388,7 +1429,7 @@ var ModalDropdown = ({
|
|
|
1388
1429
|
),
|
|
1389
1430
|
[handleSelect, optionTestIDFor, selectedMarker, value]
|
|
1390
1431
|
);
|
|
1391
|
-
const keyExtractor =
|
|
1432
|
+
const keyExtractor = React13.useCallback((item) => String(item.value), []);
|
|
1392
1433
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: anchorStyle, children: [
|
|
1393
1434
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
|
|
1394
1435
|
renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1464,11 +1505,11 @@ var TabsMenu = ({
|
|
|
1464
1505
|
collapsedTrigger = "caret" /* Caret */
|
|
1465
1506
|
}) => {
|
|
1466
1507
|
const { t } = uiFeedback.useUi();
|
|
1467
|
-
const options =
|
|
1508
|
+
const options = React13.useMemo(
|
|
1468
1509
|
() => tabs.map((tab) => ({ label: tab.label, value: tab.key })),
|
|
1469
1510
|
[tabs]
|
|
1470
1511
|
);
|
|
1471
|
-
const optionTestID =
|
|
1512
|
+
const optionTestID = React13.useCallback(
|
|
1472
1513
|
(key) => {
|
|
1473
1514
|
const found = tabs.find((tab) => tab.key === key);
|
|
1474
1515
|
return found?.testID ?? `${idPrefix}-tab-${key}`;
|
|
@@ -1745,7 +1786,7 @@ var ModalShell = ({
|
|
|
1745
1786
|
}) => {
|
|
1746
1787
|
const { theme, t } = uiFeedback.useUi();
|
|
1747
1788
|
const { style: sheetStyle, mounted } = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE2 });
|
|
1748
|
-
const containerStyle =
|
|
1789
|
+
const containerStyle = React13__default.default.useMemo(
|
|
1749
1790
|
() => [styles15.container, { backgroundColor: theme.colors.background }, contentStyle],
|
|
1750
1791
|
[theme.colors.background, contentStyle]
|
|
1751
1792
|
);
|
|
@@ -1788,10 +1829,87 @@ var ModalShell = ({
|
|
|
1788
1829
|
}
|
|
1789
1830
|
);
|
|
1790
1831
|
};
|
|
1832
|
+
var SHEET_WIDTH = 560;
|
|
1833
|
+
var PHONE_CORNER = 16;
|
|
1834
|
+
var PHONE_ENTER_OFFSET = 24;
|
|
1835
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
1836
|
+
root: { flex: 1 },
|
|
1837
|
+
scrim: { backgroundColor: uiFeedback.MODAL_OVERLAY_COLOR, pointerEvents: "none" },
|
|
1838
|
+
sheet: { position: "absolute", bottom: 0, overflow: "hidden" },
|
|
1839
|
+
wide: { top: 0, right: 0, width: SHEET_WIDTH, maxWidth: "100%", borderLeftWidth: 1 },
|
|
1840
|
+
phone: {
|
|
1841
|
+
top: MIN_TARGET_PX,
|
|
1842
|
+
left: 0,
|
|
1843
|
+
right: 0,
|
|
1844
|
+
borderTopLeftRadius: PHONE_CORNER,
|
|
1845
|
+
borderTopRightRadius: PHONE_CORNER
|
|
1846
|
+
},
|
|
1847
|
+
title: { paddingHorizontal: 16, paddingTop: 16 },
|
|
1848
|
+
scroll: { flex: 1 },
|
|
1849
|
+
content: { padding: 16, gap: 12 },
|
|
1850
|
+
bar: { flexDirection: "row", justifyContent: "flex-end", gap: 8, padding: 16, borderTopWidth: 1 }
|
|
1851
|
+
});
|
|
1852
|
+
var SideSheet = ({
|
|
1853
|
+
visible,
|
|
1854
|
+
onClose,
|
|
1855
|
+
title,
|
|
1856
|
+
children,
|
|
1857
|
+
footer,
|
|
1858
|
+
testID = LAYOUT_TEST_IDS.sideSheet,
|
|
1859
|
+
accessibilityLabel,
|
|
1860
|
+
initialFocusTestID
|
|
1861
|
+
}) => {
|
|
1862
|
+
const { theme, t } = uiFeedback.useUi();
|
|
1863
|
+
const isWide = useIsWideViewport();
|
|
1864
|
+
const sheetRef = React13.useRef(null);
|
|
1865
|
+
const backdrop = uiMotion.useEnterExit({ visible });
|
|
1866
|
+
const panel = uiMotion.useEnterExit({ visible, translateY: isWide ? 0 : PHONE_ENTER_OFFSET });
|
|
1867
|
+
const edges = { borderColor: theme.colors.border };
|
|
1868
|
+
useFocusTrap(sheetRef, visible && panel.mounted, initialFocusTestID);
|
|
1869
|
+
useEscapeKey(visible, onClose);
|
|
1870
|
+
useScrollLock(visible);
|
|
1871
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.root, children: [
|
|
1872
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, styles16.scrim, { opacity: backdrop.style.opacity }] }),
|
|
1873
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1874
|
+
reactNative.Pressable,
|
|
1875
|
+
{
|
|
1876
|
+
accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
|
|
1877
|
+
accessibilityLabel: t(LAYOUT_I18N.dialogClose),
|
|
1878
|
+
accessibilityRole: "button",
|
|
1879
|
+
style: reactNative.StyleSheet.absoluteFill,
|
|
1880
|
+
testID: `${testID}-scrim`,
|
|
1881
|
+
onPress: onClose
|
|
1882
|
+
}
|
|
1883
|
+
),
|
|
1884
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1885
|
+
reactNative.Animated.View,
|
|
1886
|
+
{
|
|
1887
|
+
ref: sheetRef,
|
|
1888
|
+
accessibilityViewIsModal: true,
|
|
1889
|
+
"aria-modal": true,
|
|
1890
|
+
"aria-label": accessibilityLabel ?? title,
|
|
1891
|
+
role: "dialog",
|
|
1892
|
+
style: [
|
|
1893
|
+
styles16.sheet,
|
|
1894
|
+
isWide ? styles16.wide : styles16.phone,
|
|
1895
|
+
edges,
|
|
1896
|
+
{ backgroundColor: theme.colors.surface },
|
|
1897
|
+
panel.style
|
|
1898
|
+
],
|
|
1899
|
+
testID,
|
|
1900
|
+
children: [
|
|
1901
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.title, children: /* @__PURE__ */ jsxRuntime.jsx(AppText, { kind: "title" /* Title */, children: title }) }),
|
|
1902
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { contentContainerStyle: styles16.content, style: styles16.scroll, children }),
|
|
1903
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.bar, edges], children: footer })
|
|
1904
|
+
]
|
|
1905
|
+
}
|
|
1906
|
+
)
|
|
1907
|
+
] }) });
|
|
1908
|
+
};
|
|
1791
1909
|
var MESSAGE_FONT_SIZE2 = 14;
|
|
1792
1910
|
var MESSAGE_LINE_HEIGHT = 20;
|
|
1793
1911
|
var BUTTON_GAP = 12;
|
|
1794
|
-
var
|
|
1912
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
1795
1913
|
message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
|
|
1796
1914
|
footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
|
|
1797
1915
|
});
|
|
@@ -1810,7 +1928,7 @@ var ConfirmDialog = ({
|
|
|
1810
1928
|
const { theme, t } = uiFeedback.useUi();
|
|
1811
1929
|
const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
|
|
1812
1930
|
const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
|
|
1813
|
-
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1931
|
+
const footer = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.footer, children: [
|
|
1814
1932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1815
1933
|
uiButtons.Button,
|
|
1816
1934
|
{
|
|
@@ -1846,27 +1964,27 @@ var ConfirmDialog = ({
|
|
|
1846
1964
|
title,
|
|
1847
1965
|
visible,
|
|
1848
1966
|
onClose: onCancel,
|
|
1849
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1967
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
|
|
1850
1968
|
}
|
|
1851
1969
|
);
|
|
1852
1970
|
};
|
|
1853
|
-
var AccordionContext =
|
|
1971
|
+
var AccordionContext = React13.createContext(null);
|
|
1854
1972
|
function useAccordionContext() {
|
|
1855
|
-
const value =
|
|
1973
|
+
const value = React13.useContext(AccordionContext);
|
|
1856
1974
|
if (value === null) {
|
|
1857
1975
|
throw new Error("AccordionItem must be rendered inside an <Accordion>.");
|
|
1858
1976
|
}
|
|
1859
1977
|
return value;
|
|
1860
1978
|
}
|
|
1861
1979
|
var BOXED_GAP = 12;
|
|
1862
|
-
var
|
|
1980
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
1863
1981
|
container: { alignSelf: "stretch" },
|
|
1864
1982
|
boxed: { gap: BOXED_GAP }
|
|
1865
1983
|
});
|
|
1866
1984
|
function computeInitialOpen(children, defaultOpenIds, allowMultiple) {
|
|
1867
1985
|
const ids = new Set(defaultOpenIds ?? []);
|
|
1868
|
-
|
|
1869
|
-
if (!
|
|
1986
|
+
React13__default.default.Children.forEach(children, (child) => {
|
|
1987
|
+
if (!React13__default.default.isValidElement(child)) return;
|
|
1870
1988
|
const props = child.props;
|
|
1871
1989
|
if (props.defaultOpen === true && typeof props.id === "string") {
|
|
1872
1990
|
ids.add(props.id);
|
|
@@ -1889,14 +2007,14 @@ var Accordion = ({
|
|
|
1889
2007
|
style
|
|
1890
2008
|
}) => {
|
|
1891
2009
|
const isControlled = openIds !== void 0;
|
|
1892
|
-
const [internalOpen, setInternalOpen] =
|
|
2010
|
+
const [internalOpen, setInternalOpen] = React13.useState(
|
|
1893
2011
|
() => computeInitialOpen(children, defaultOpenIds, allowMultiple)
|
|
1894
2012
|
);
|
|
1895
|
-
const openSet =
|
|
2013
|
+
const openSet = React13.useMemo(
|
|
1896
2014
|
() => isControlled ? new Set(openIds) : internalOpen,
|
|
1897
2015
|
[isControlled, openIds, internalOpen]
|
|
1898
2016
|
);
|
|
1899
|
-
const toggle =
|
|
2017
|
+
const toggle = React13.useCallback(
|
|
1900
2018
|
(id) => {
|
|
1901
2019
|
const next = new Set(openSet);
|
|
1902
2020
|
const willOpen = !next.has(id);
|
|
@@ -1911,12 +2029,12 @@ var Accordion = ({
|
|
|
1911
2029
|
},
|
|
1912
2030
|
[allowMultiple, isControlled, onOpenChange, openSet]
|
|
1913
2031
|
);
|
|
1914
|
-
const contextValue =
|
|
2032
|
+
const contextValue = React13.useMemo(
|
|
1915
2033
|
() => ({ openIds: openSet, toggle, allowMultiple, variant }),
|
|
1916
2034
|
[openSet, toggle, allowMultiple, variant]
|
|
1917
2035
|
);
|
|
1918
|
-
const containerStyle =
|
|
1919
|
-
const base = variant === "boxed" ? [
|
|
2036
|
+
const containerStyle = React13.useMemo(() => {
|
|
2037
|
+
const base = variant === "boxed" ? [styles18.container, styles18.boxed] : [styles18.container];
|
|
1920
2038
|
if (style === void 0) return base;
|
|
1921
2039
|
return [...base, ...Array.isArray(style) ? style : [style]];
|
|
1922
2040
|
}, [style, variant]);
|
|
@@ -1948,7 +2066,7 @@ var BOX_TITLE_FONT_SIZE = 14;
|
|
|
1948
2066
|
var BOX_MARKER_FONT_SIZE = 13;
|
|
1949
2067
|
var BOX_MARKER_GAP = 6;
|
|
1950
2068
|
var BOX_MARKER = "\u25B8";
|
|
1951
|
-
var
|
|
2069
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
1952
2070
|
item: { borderTopWidth: reactNative.StyleSheet.hairlineWidth },
|
|
1953
2071
|
boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
|
|
1954
2072
|
header: {
|
|
@@ -1994,9 +2112,9 @@ var AccordionItem = ({
|
|
|
1994
2112
|
const headerTestID = testID ?? `accordion-item-${id}`;
|
|
1995
2113
|
const bodyTestID = `${headerTestID}-body`;
|
|
1996
2114
|
const chevronTestID = `${headerTestID}-chevron`;
|
|
1997
|
-
const [rotation] =
|
|
2115
|
+
const [rotation] = React13.useState(() => new reactNative.Animated.Value(expanded ? ROTATE_EXPANDED : ROTATE_COLLAPSED));
|
|
1998
2116
|
const reducedMotion = rnWebHooks.useReducedMotion();
|
|
1999
|
-
|
|
2117
|
+
React13.useEffect(() => {
|
|
2000
2118
|
reactNative.Animated.timing(rotation, {
|
|
2001
2119
|
toValue: expanded ? ROTATE_EXPANDED : ROTATE_COLLAPSED,
|
|
2002
2120
|
duration: reducedMotion ? INSTANT_DURATION_MS : ROTATE_DURATION_MS,
|
|
@@ -2008,10 +2126,10 @@ var AccordionItem = ({
|
|
|
2008
2126
|
inputRange: [ROTATE_COLLAPSED, ROTATE_EXPANDED],
|
|
2009
2127
|
outputRange: [COLLAPSED_DEG, boxed ? BOXED_EXPANDED_DEG : PLAIN_EXPANDED_DEG]
|
|
2010
2128
|
});
|
|
2011
|
-
const handlePress =
|
|
2129
|
+
const handlePress = React13.useCallback(() => {
|
|
2012
2130
|
if (!disabled) toggle(id);
|
|
2013
2131
|
}, [disabled, id, toggle]);
|
|
2014
|
-
const handleKeyDown2 =
|
|
2132
|
+
const handleKeyDown2 = React13.useCallback(
|
|
2015
2133
|
(event) => {
|
|
2016
2134
|
if (disabled) return;
|
|
2017
2135
|
const key = event.key ?? "";
|
|
@@ -2023,20 +2141,20 @@ var AccordionItem = ({
|
|
|
2023
2141
|
[disabled, id, toggle]
|
|
2024
2142
|
);
|
|
2025
2143
|
const keyboardProps = reactNative.Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
|
|
2026
|
-
const itemStyle =
|
|
2027
|
-
() => boxed ? [
|
|
2144
|
+
const itemStyle = React13.useMemo(
|
|
2145
|
+
() => boxed ? [styles19.boxItem, { borderColor: colors.border }] : [styles19.item, { borderTopColor: colors.border }],
|
|
2028
2146
|
[boxed, colors.border]
|
|
2029
2147
|
);
|
|
2030
|
-
const headerStyle =
|
|
2148
|
+
const headerStyle = React13.useMemo(
|
|
2031
2149
|
() => [
|
|
2032
|
-
|
|
2033
|
-
...boxed ? [
|
|
2150
|
+
styles19.header,
|
|
2151
|
+
...boxed ? [styles19.boxHeader] : [],
|
|
2034
2152
|
{ opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
|
|
2035
2153
|
],
|
|
2036
2154
|
[boxed, disabled]
|
|
2037
2155
|
);
|
|
2038
2156
|
const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
2039
|
-
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ?
|
|
2157
|
+
const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ? styles19.boxTitle : styles19.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
|
|
2040
2158
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: itemStyle, children: [
|
|
2041
2159
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2042
2160
|
reactNative.Pressable,
|
|
@@ -2053,7 +2171,7 @@ var AccordionItem = ({
|
|
|
2053
2171
|
onPress: handlePress,
|
|
2054
2172
|
...keyboardProps,
|
|
2055
2173
|
children: [
|
|
2056
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2174
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.headerLeft, boxed ? styles19.headerLeftRow : null], children: [
|
|
2057
2175
|
boxed ? (
|
|
2058
2176
|
// Decorative — the open/closed state is already conveyed by aria-expanded on the header.
|
|
2059
2177
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2062,15 +2180,15 @@ var AccordionItem = ({
|
|
|
2062
2180
|
accessibilityElementsHidden: true,
|
|
2063
2181
|
"aria-hidden": true,
|
|
2064
2182
|
importantForAccessibility: "no-hide-descendants",
|
|
2065
|
-
style: [
|
|
2183
|
+
style: [styles19.marker, { transform: [{ rotate }] }],
|
|
2066
2184
|
testID: chevronTestID,
|
|
2067
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2185
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
|
|
2068
2186
|
}
|
|
2069
2187
|
)
|
|
2070
2188
|
) : null,
|
|
2071
2189
|
titleNode
|
|
2072
2190
|
] }),
|
|
2073
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2191
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.headerRight, children: [
|
|
2074
2192
|
right,
|
|
2075
2193
|
boxed ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2076
2194
|
reactNative.Animated.View,
|
|
@@ -2078,7 +2196,7 @@ var AccordionItem = ({
|
|
|
2078
2196
|
accessibilityElementsHidden: true,
|
|
2079
2197
|
"aria-hidden": true,
|
|
2080
2198
|
importantForAccessibility: "no-hide-descendants",
|
|
2081
|
-
style: [
|
|
2199
|
+
style: [styles19.chevron, { transform: [{ rotate }] }],
|
|
2082
2200
|
children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
|
|
2083
2201
|
}
|
|
2084
2202
|
)
|
|
@@ -2092,7 +2210,7 @@ var AccordionItem = ({
|
|
|
2092
2210
|
accessibilityLabel: resolvedLabel,
|
|
2093
2211
|
nativeID: bodyTestID,
|
|
2094
2212
|
role: ROLE_REGION,
|
|
2095
|
-
style: boxed ?
|
|
2213
|
+
style: boxed ? styles19.boxBody : styles19.body,
|
|
2096
2214
|
testID: bodyTestID,
|
|
2097
2215
|
children
|
|
2098
2216
|
}
|
|
@@ -2121,7 +2239,7 @@ function formatUrlForDisplay(value) {
|
|
|
2121
2239
|
return trimmed.length > 0 ? trimmed : value;
|
|
2122
2240
|
}
|
|
2123
2241
|
var UNMEASURED = 0;
|
|
2124
|
-
var
|
|
2242
|
+
var IS_WEB4 = reactNative.Platform.OS === "web";
|
|
2125
2243
|
function measureParentInnerWidth(node) {
|
|
2126
2244
|
const parent = node.parentElement;
|
|
2127
2245
|
if (parent === null) return UNMEASURED;
|
|
@@ -2130,15 +2248,15 @@ function measureParentInnerWidth(node) {
|
|
|
2130
2248
|
return Math.max(UNMEASURED, parent.clientWidth - padding);
|
|
2131
2249
|
}
|
|
2132
2250
|
function useAvailableWidth() {
|
|
2133
|
-
const [width, setWidth] =
|
|
2134
|
-
const nodeRef =
|
|
2135
|
-
const measureRef =
|
|
2136
|
-
if (!
|
|
2251
|
+
const [width, setWidth] = React13.useState(UNMEASURED);
|
|
2252
|
+
const nodeRef = React13.useRef(null);
|
|
2253
|
+
const measureRef = React13.useCallback((node) => {
|
|
2254
|
+
if (!IS_WEB4) return;
|
|
2137
2255
|
nodeRef.current = node;
|
|
2138
2256
|
if (nodeRef.current !== null) setWidth(measureParentInnerWidth(nodeRef.current));
|
|
2139
2257
|
}, []);
|
|
2140
|
-
|
|
2141
|
-
if (!
|
|
2258
|
+
React13.useEffect(() => {
|
|
2259
|
+
if (!IS_WEB4) return void 0;
|
|
2142
2260
|
const remeasure = () => {
|
|
2143
2261
|
const node = nodeRef.current;
|
|
2144
2262
|
if (node !== null) setWidth(measureParentInnerWidth(node));
|
|
@@ -2146,8 +2264,8 @@ function useAvailableWidth() {
|
|
|
2146
2264
|
window.addEventListener("resize", remeasure);
|
|
2147
2265
|
return () => window.removeEventListener("resize", remeasure);
|
|
2148
2266
|
}, []);
|
|
2149
|
-
const onLayout =
|
|
2150
|
-
if (
|
|
2267
|
+
const onLayout = React13.useCallback((event) => {
|
|
2268
|
+
if (IS_WEB4) return;
|
|
2151
2269
|
setWidth(event.nativeEvent.layout.width);
|
|
2152
2270
|
}, []);
|
|
2153
2271
|
return { width, measureRef, onLayout };
|
|
@@ -2155,7 +2273,7 @@ function useAvailableWidth() {
|
|
|
2155
2273
|
var AVG_CHAR_WIDTH_RATIO = 0.58;
|
|
2156
2274
|
var DEFAULT_FONT_SIZE2 = 13;
|
|
2157
2275
|
var UNMEASURED2 = 0;
|
|
2158
|
-
var
|
|
2276
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
2159
2277
|
base: { fontSize: DEFAULT_FONT_SIZE2 },
|
|
2160
2278
|
/** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
|
|
2161
2279
|
fill: { flexShrink: 1, minWidth: 0 }
|
|
@@ -2175,8 +2293,8 @@ var TruncatedText = ({
|
|
|
2175
2293
|
accessibilityHint
|
|
2176
2294
|
}) => {
|
|
2177
2295
|
const { width, measureRef, onLayout } = useAvailableWidth();
|
|
2178
|
-
const hostRef =
|
|
2179
|
-
const attachRef =
|
|
2296
|
+
const hostRef = React13.useRef(null);
|
|
2297
|
+
const attachRef = React13.useCallback(
|
|
2180
2298
|
(node) => {
|
|
2181
2299
|
hostRef.current = node;
|
|
2182
2300
|
measureRef(node);
|
|
@@ -2185,12 +2303,12 @@ var TruncatedText = ({
|
|
|
2185
2303
|
},
|
|
2186
2304
|
[value, measureRef]
|
|
2187
2305
|
);
|
|
2188
|
-
const flatStyle =
|
|
2189
|
-
() => reactNative.StyleSheet.flatten([
|
|
2306
|
+
const flatStyle = React13.useMemo(
|
|
2307
|
+
() => reactNative.StyleSheet.flatten([styles20.base, style]),
|
|
2190
2308
|
[style]
|
|
2191
2309
|
);
|
|
2192
2310
|
const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
|
|
2193
|
-
const display =
|
|
2311
|
+
const display = React13.useMemo(() => {
|
|
2194
2312
|
const source = isUrl ? formatUrlForDisplay(value) : value;
|
|
2195
2313
|
const budget = charBudget(width, fontSize);
|
|
2196
2314
|
return budget === UNMEASURED2 ? source : truncateMiddle(source, budget);
|
|
@@ -2201,7 +2319,7 @@ var TruncatedText = ({
|
|
|
2201
2319
|
ref: attachRef,
|
|
2202
2320
|
onLayout,
|
|
2203
2321
|
numberOfLines: 1,
|
|
2204
|
-
style: [
|
|
2322
|
+
style: [styles20.base, styles20.fill, style],
|
|
2205
2323
|
testID,
|
|
2206
2324
|
accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
|
|
2207
2325
|
accessibilityLabel,
|
|
@@ -2272,17 +2390,17 @@ async function copyText(value, writer) {
|
|
|
2272
2390
|
// src/CopyableId/useCopyToClipboard.ts
|
|
2273
2391
|
var COPY_FEEDBACK_MS = 2e3;
|
|
2274
2392
|
function useCopyToClipboard(value, writer) {
|
|
2275
|
-
const [status, setStatus] =
|
|
2276
|
-
const timerRef =
|
|
2277
|
-
const mountedRef =
|
|
2278
|
-
|
|
2393
|
+
const [status, setStatus] = React13.useState("idle" /* Idle */);
|
|
2394
|
+
const timerRef = React13.useRef(null);
|
|
2395
|
+
const mountedRef = React13.useRef(true);
|
|
2396
|
+
React13.useEffect(() => {
|
|
2279
2397
|
mountedRef.current = true;
|
|
2280
2398
|
return () => {
|
|
2281
2399
|
mountedRef.current = false;
|
|
2282
2400
|
if (timerRef.current !== null) clearTimeout(timerRef.current);
|
|
2283
2401
|
};
|
|
2284
2402
|
}, []);
|
|
2285
|
-
const copy =
|
|
2403
|
+
const copy = React13.useCallback(() => {
|
|
2286
2404
|
void (async () => {
|
|
2287
2405
|
const ok = await copyText(value, writer);
|
|
2288
2406
|
if (!mountedRef.current) return;
|
|
@@ -2304,7 +2422,7 @@ var LABEL_LETTER_SPACING = 0.4;
|
|
|
2304
2422
|
var ACTION_PADDING_H = 6;
|
|
2305
2423
|
var ACTION_PADDING_V = 2;
|
|
2306
2424
|
var ACTION_RADIUS = 6;
|
|
2307
|
-
var
|
|
2425
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
2308
2426
|
cell: { gap: CELL_GAP },
|
|
2309
2427
|
label: {
|
|
2310
2428
|
fontSize: LABEL_FONT_SIZE,
|
|
@@ -2346,7 +2464,7 @@ var styles20 = reactNative.StyleSheet.create({
|
|
|
2346
2464
|
var TONE_STEP = "500";
|
|
2347
2465
|
function useActionState(status) {
|
|
2348
2466
|
const { theme } = uiFeedback.useUi();
|
|
2349
|
-
return
|
|
2467
|
+
return React13.useMemo(() => {
|
|
2350
2468
|
const primary = theme.palette.primary[TONE_STEP];
|
|
2351
2469
|
if (status === "copied" /* Copied */) {
|
|
2352
2470
|
return { key: LAYOUT_I18N.copied, color: theme.semantic.success?.[TONE_STEP] ?? primary };
|
|
@@ -2369,14 +2487,14 @@ var CopyableId = ({
|
|
|
2369
2487
|
const { colors } = theme;
|
|
2370
2488
|
const { status, copy } = useCopyToClipboard(value, writer);
|
|
2371
2489
|
const action = useActionState(status);
|
|
2372
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2373
|
-
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2374
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2375
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles21.cell, style], testID, children: [
|
|
2491
|
+
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.label, { color: colors.textSecondary }], children: label }),
|
|
2492
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.row, children: [
|
|
2493
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.valueWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2376
2494
|
TruncatedText,
|
|
2377
2495
|
{
|
|
2378
2496
|
value,
|
|
2379
|
-
style: [
|
|
2497
|
+
style: [styles21.value, { color: colors.text }],
|
|
2380
2498
|
testID: `${testID}-value`,
|
|
2381
2499
|
accessibilityLabel: accessibilityLabel ?? value,
|
|
2382
2500
|
accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
|
|
@@ -2390,7 +2508,7 @@ var CopyableId = ({
|
|
|
2390
2508
|
accessibilityLabel: t(action.key),
|
|
2391
2509
|
accessibilityHint: t(LAYOUT_I18N.copyHint),
|
|
2392
2510
|
testID: `${testID}-copy`,
|
|
2393
|
-
style: [
|
|
2511
|
+
style: [styles21.action, { color: action.color }],
|
|
2394
2512
|
children: t(action.key)
|
|
2395
2513
|
}
|
|
2396
2514
|
)
|
|
@@ -2415,15 +2533,15 @@ function formatBuildInfo(buildVersion, apiCommit) {
|
|
|
2415
2533
|
return `${base}${API_COMMIT_SEPARATOR}${shortenCommit(commit)}`;
|
|
2416
2534
|
}
|
|
2417
2535
|
function useApiCommit(apiBaseUrl, fetchImpl) {
|
|
2418
|
-
const [commit, setCommit] =
|
|
2419
|
-
const mountedRef =
|
|
2420
|
-
|
|
2536
|
+
const [commit, setCommit] = React13.useState(void 0);
|
|
2537
|
+
const mountedRef = React13.useRef(true);
|
|
2538
|
+
React13.useEffect(() => {
|
|
2421
2539
|
mountedRef.current = true;
|
|
2422
2540
|
return () => {
|
|
2423
2541
|
mountedRef.current = false;
|
|
2424
2542
|
};
|
|
2425
2543
|
}, []);
|
|
2426
|
-
|
|
2544
|
+
React13.useEffect(() => {
|
|
2427
2545
|
if (apiBaseUrl === void 0 || apiBaseUrl === "") return;
|
|
2428
2546
|
const doFetch = fetchImpl ?? (typeof fetch !== "undefined" ? fetch : void 0);
|
|
2429
2547
|
if (doFetch === void 0) return;
|
|
@@ -2445,7 +2563,7 @@ var FOOTER_PADDING_V = 6;
|
|
|
2445
2563
|
var FOOTER_PADDING_H = 12;
|
|
2446
2564
|
var FOOTER_FONT_SIZE = 11;
|
|
2447
2565
|
var FOOTER_OPACITY = 0.75;
|
|
2448
|
-
var
|
|
2566
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
2449
2567
|
footer: {
|
|
2450
2568
|
paddingVertical: FOOTER_PADDING_V,
|
|
2451
2569
|
paddingHorizontal: FOOTER_PADDING_H,
|
|
@@ -2470,8 +2588,8 @@ var BuildInfoFooter = ({
|
|
|
2470
2588
|
const fetchedCommit = useApiCommit(apiCommit === void 0 ? apiBaseUrl : void 0, fetchImpl);
|
|
2471
2589
|
const commit = apiCommit ?? fetchedCommit;
|
|
2472
2590
|
const label = formatBuildInfo(buildVersion, commit);
|
|
2473
|
-
const textStyle =
|
|
2474
|
-
() => [
|
|
2591
|
+
const textStyle = React13.useMemo(
|
|
2592
|
+
() => [styles22.text, { color: theme.colors.textSecondary }],
|
|
2475
2593
|
[theme.colors.textSecondary]
|
|
2476
2594
|
);
|
|
2477
2595
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2479,7 +2597,7 @@ var BuildInfoFooter = ({
|
|
|
2479
2597
|
{
|
|
2480
2598
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2481
2599
|
accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
|
|
2482
|
-
style: [
|
|
2600
|
+
style: [styles22.footer, style],
|
|
2483
2601
|
testID,
|
|
2484
2602
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label })
|
|
2485
2603
|
}
|
|
@@ -2490,7 +2608,7 @@ var BORDER = 2;
|
|
|
2490
2608
|
var GLYPH_SIZE = 14;
|
|
2491
2609
|
var GLYPH_LINE = 16;
|
|
2492
2610
|
var TICK = "\u2713";
|
|
2493
|
-
var
|
|
2611
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
2494
2612
|
circle: {
|
|
2495
2613
|
width: SIZE,
|
|
2496
2614
|
height: SIZE,
|
|
@@ -2507,14 +2625,14 @@ var CheckMark = ({ filled, accent, ring, glyphColor, testID }) => /* @__PURE__ *
|
|
|
2507
2625
|
"aria-hidden": true,
|
|
2508
2626
|
accessibilityElementsHidden: true,
|
|
2509
2627
|
importantForAccessibility: "no-hide-descendants",
|
|
2510
|
-
style: [
|
|
2628
|
+
style: [styles23.circle, { borderColor: filled ? accent : ring, backgroundColor: filled ? accent : void 0 }],
|
|
2511
2629
|
testID,
|
|
2512
|
-
children: filled ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2630
|
+
children: filled ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.glyph, { color: glyphColor }], children: TICK }) : null
|
|
2513
2631
|
}
|
|
2514
2632
|
);
|
|
2515
|
-
var ListRowToneContext =
|
|
2633
|
+
var ListRowToneContext = React13.createContext(null);
|
|
2516
2634
|
function useListRowTone() {
|
|
2517
|
-
return
|
|
2635
|
+
return React13.useContext(ListRowToneContext);
|
|
2518
2636
|
}
|
|
2519
2637
|
function useRowPalette() {
|
|
2520
2638
|
const { colors, palette, semantic } = uiFeedback.useUi().theme;
|
|
@@ -2632,7 +2750,7 @@ var PAD_V = 12;
|
|
|
2632
2750
|
var GAP = 4;
|
|
2633
2751
|
var MARK_GAP = 12;
|
|
2634
2752
|
var LINE_GAP = 8;
|
|
2635
|
-
var
|
|
2753
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
2636
2754
|
row: {
|
|
2637
2755
|
flexDirection: "row",
|
|
2638
2756
|
alignItems: "center",
|
|
@@ -2656,7 +2774,7 @@ function focusTarget(event) {
|
|
|
2656
2774
|
}
|
|
2657
2775
|
function slot(node, color, strong) {
|
|
2658
2776
|
if (typeof node !== "string") return node;
|
|
2659
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2777
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.shrink, strong ? styles24.strong : null, { color }], children: node });
|
|
2660
2778
|
}
|
|
2661
2779
|
var ListRow = ({
|
|
2662
2780
|
title,
|
|
@@ -2673,9 +2791,9 @@ var ListRow = ({
|
|
|
2673
2791
|
}) => {
|
|
2674
2792
|
const palette = useRowPalette();
|
|
2675
2793
|
const { colors } = uiFeedback.useUi().theme;
|
|
2676
|
-
const [focused, setFocused] =
|
|
2794
|
+
const [focused, setFocused] = React13.useState(false);
|
|
2677
2795
|
const rest = resolveRowLook(selectedStyle, { selected, hovered: false, pressed: false, focused }, palette);
|
|
2678
|
-
const tone =
|
|
2796
|
+
const tone = React13.useMemo(() => ({ textColor: rest.textColor, inverse: rest.inverse }), [rest.textColor, rest.inverse]);
|
|
2679
2797
|
const checkTestId = testID === void 0 ? void 0 : `${testID}-check`;
|
|
2680
2798
|
return /* @__PURE__ */ jsxRuntime.jsxs(ListRowToneContext.Provider, { value: tone, children: [
|
|
2681
2799
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2688,7 +2806,7 @@ var ListRow = ({
|
|
|
2688
2806
|
style: (state) => {
|
|
2689
2807
|
const { pressed, hovered } = state;
|
|
2690
2808
|
const look = resolveRowLook(selectedStyle, { selected, pressed, focused, hovered: hovered === true }, palette);
|
|
2691
|
-
return [
|
|
2809
|
+
return [styles24.row, { borderTopColor: colors.border }, look.container];
|
|
2692
2810
|
},
|
|
2693
2811
|
testID,
|
|
2694
2812
|
onBlur: () => {
|
|
@@ -2701,14 +2819,14 @@ var ListRow = ({
|
|
|
2701
2819
|
...pressedProps(selected),
|
|
2702
2820
|
children: [
|
|
2703
2821
|
rest.showCheck ? /* @__PURE__ */ jsxRuntime.jsx(CheckMark, { accent: palette.accent, filled: rest.checkFilled, glyphColor: palette.background, ring: palette.border, testID: checkTestId }) : null,
|
|
2704
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2705
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2822
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.body, children: [
|
|
2823
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.line, children: [
|
|
2706
2824
|
slot(title, rest.titleColor, true),
|
|
2707
2825
|
slot(trailing, rest.textColor, true)
|
|
2708
2826
|
] }),
|
|
2709
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2710
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2711
|
-
badges === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2827
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.line, children: [
|
|
2828
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.shrink, children: slot(meta, rest.textColor, false) }),
|
|
2829
|
+
badges === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.badges, children: badges })
|
|
2712
2830
|
] })
|
|
2713
2831
|
] })
|
|
2714
2832
|
]
|
|
@@ -2748,6 +2866,7 @@ exports.Section = Section;
|
|
|
2748
2866
|
exports.SectionVariant = SectionVariant;
|
|
2749
2867
|
exports.SegmentedControl = SegmentedControl;
|
|
2750
2868
|
exports.SelectedMarker = SelectedMarker;
|
|
2869
|
+
exports.SideSheet = SideSheet;
|
|
2751
2870
|
exports.StatusBadge = StatusBadge;
|
|
2752
2871
|
exports.StickyPreview = StickyPreview;
|
|
2753
2872
|
exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
|