@dloizides/ui-layout 1.42.0 → 1.44.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/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var React14 = require('react');
3
+ var React16 = 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');
7
+ var designTokens = require('@dloizides/design-tokens');
7
8
  var uiButtons = require('@dloizides/ui-buttons');
8
9
  var uiIcons = require('@dloizides/ui-icons');
9
10
  var uiMotion = require('@dloizides/ui-motion');
10
11
  var a11y = require('@dloizides/a11y');
11
12
  var reactDom = require('react-dom');
12
- var designTokens = require('@dloizides/design-tokens');
13
13
  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 React14__default = /*#__PURE__*/_interopDefault(React14);
17
+ var React16__default = /*#__PURE__*/_interopDefault(React16);
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 = React14__default.default.useMemo(
47
+ const containerStyle = React16__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
  );
@@ -96,6 +96,8 @@ var AppText = ({
96
96
  var LAYOUT_TEST_IDS = {
97
97
  headingText: "heading-text",
98
98
  statusLabel: "status-label",
99
+ countBadge: "count-badge",
100
+ splitPanes: "split-panes",
99
101
  stickyPreview: "sticky-preview",
100
102
  pageFrame: "page-frame",
101
103
  upgradePrompt: "upgrade-prompt",
@@ -134,6 +136,7 @@ var LAYOUT_I18N = {
134
136
  accordionToggleHint: "common.accordionToggleHint",
135
137
  /** Default accessible hint on a `StatusBadge` when the caller supplies none. */
136
138
  statusBadgeHint: "common.statusBadgeHint",
139
+ countBadgeLabel: "common.countBadgeLabel",
137
140
  /** `ModalShell`: accessible name of the dialog when its title is not a plain string. */
138
141
  dialog: "common.dialog",
139
142
  /** `ModalShell`: accessible hint on the close button. */
@@ -221,7 +224,7 @@ var Heading = ({
221
224
  testID
222
225
  }) => {
223
226
  const { theme } = uiFeedback.useUi();
224
- const headingStyle = React14__default.default.useMemo(
227
+ const headingStyle = React16__default.default.useMemo(
225
228
  () => [styles3.heading, { color: theme.colors.text }, style],
226
229
  [theme.colors.text, style]
227
230
  );
@@ -236,6 +239,40 @@ var Heading = ({
236
239
  }
237
240
  );
238
241
  };
242
+
243
+ // src/StatusBadge/BadgeTone.ts
244
+ var BadgeTone = /* @__PURE__ */ ((BadgeTone2) => {
245
+ BadgeTone2["Neutral"] = "neutral";
246
+ BadgeTone2["Info"] = "info";
247
+ BadgeTone2["Success"] = "success";
248
+ BadgeTone2["Warning"] = "warning";
249
+ BadgeTone2["Danger"] = "danger";
250
+ return BadgeTone2;
251
+ })(BadgeTone || {});
252
+ function scaleFor(theme, tone) {
253
+ const semantic = theme.semantic;
254
+ if (tone === "danger" /* Danger */) return theme.semantic.error;
255
+ if (tone === "success" /* Success */) return semantic.success;
256
+ if (tone === "warning" /* Warning */) return semantic.warning;
257
+ if (tone === "info" /* Info */) return semantic.info ?? theme.palette.primary;
258
+ return void 0;
259
+ }
260
+ function readableInk(fill) {
261
+ if (fill === void 0 || !designTokens.isHexColor(fill) || !designTokens.canCarryAccessibleInk(fill)) return null;
262
+ return designTokens.resolveOnBrand(fill);
263
+ }
264
+ function neutralColors(colors) {
265
+ return { color: colors.text, backgroundColor: colors.surfaceElevated };
266
+ }
267
+ function resolveToneColors(theme, tone) {
268
+ const scale = scaleFor(theme, tone);
269
+ if (scale === void 0) return neutralColors(theme.colors);
270
+ for (const fill of [scale[designTokens.UI_MAIN_STEP], scale[designTokens.UI_DEEP_STEP]]) {
271
+ const ink = readableInk(fill);
272
+ if (ink !== null && fill !== void 0) return { color: ink, backgroundColor: fill };
273
+ }
274
+ return neutralColors(theme.colors);
275
+ }
239
276
  var DEFAULT_PADDING_H = 10;
240
277
  var DEFAULT_PADDING_V = 4;
241
278
  var DEFAULT_BORDER_RADIUS = 12;
@@ -267,18 +304,22 @@ var styles4 = reactNative.StyleSheet.create({
267
304
  });
268
305
  var StatusBadge = ({
269
306
  label,
270
- color,
271
- backgroundColor,
307
+ tone = "neutral" /* Neutral */,
308
+ color: rawColor,
309
+ backgroundColor: rawBackground,
272
310
  icon,
273
311
  dashed = false,
274
312
  testID = LAYOUT_TEST_IDS.statusLabel,
275
313
  accessibilityLabel,
276
314
  accessibilityHint
277
315
  }) => {
278
- const { t } = uiFeedback.useUi();
279
- const dynamicBadge = React14.useMemo(() => ({ backgroundColor }), [backgroundColor]);
280
- const dashedColor = React14.useMemo(() => ({ borderColor: color }), [color]);
281
- const dynamicText = React14.useMemo(() => ({ color }), [color]);
316
+ const { t, theme } = uiFeedback.useUi();
317
+ const toned = React16.useMemo(() => resolveToneColors(theme, tone), [theme, tone]);
318
+ const color = rawColor ?? toned.color;
319
+ const backgroundColor = rawBackground ?? toned.backgroundColor;
320
+ const dynamicBadge = React16.useMemo(() => ({ backgroundColor }), [backgroundColor]);
321
+ const dashedColor = React16.useMemo(() => ({ borderColor: color }), [color]);
322
+ const dynamicText = React16.useMemo(() => ({ color }), [color]);
282
323
  const hasIcon = icon !== void 0 && icon !== null;
283
324
  return /* @__PURE__ */ jsxRuntime.jsxs(
284
325
  reactNative.View,
@@ -294,13 +335,105 @@ var StatusBadge = ({
294
335
  }
295
336
  );
296
337
  };
338
+
339
+ // src/CountBadge/formatCount.ts
340
+ var OVERFLOW_SUFFIX = "+";
341
+ function formatCount(count, max) {
342
+ const whole = Math.max(0, Math.floor(count));
343
+ if (whole > max) return `${String(max)}${OVERFLOW_SUFFIX}`;
344
+ return String(whole);
345
+ }
346
+ var DEFAULT_MAX = 99;
347
+ var BADGE_SIZE = 20;
348
+ var BADGE_PADDING_H = 6;
349
+ var BADGE_FONT_SIZE = 12;
350
+ var styles5 = reactNative.StyleSheet.create({
351
+ badge: {
352
+ minWidth: BADGE_SIZE,
353
+ height: BADGE_SIZE,
354
+ borderRadius: BADGE_SIZE / 2,
355
+ paddingHorizontal: BADGE_PADDING_H,
356
+ alignItems: "center",
357
+ justifyContent: "center",
358
+ alignSelf: "flex-start"
359
+ },
360
+ text: { fontSize: BADGE_FONT_SIZE, fontWeight: "700" }
361
+ });
362
+ var CountBadge = ({
363
+ count,
364
+ max = DEFAULT_MAX,
365
+ tone = "neutral" /* Neutral */,
366
+ showZero = false,
367
+ testID = LAYOUT_TEST_IDS.countBadge,
368
+ accessibilityLabel
369
+ }) => {
370
+ const { theme, t } = uiFeedback.useUi();
371
+ const toned = React16.useMemo(() => resolveToneColors(theme, tone), [theme, tone]);
372
+ const badgeStyle = React16.useMemo(() => [styles5.badge, { backgroundColor: toned.backgroundColor }], [toned.backgroundColor]);
373
+ const textStyle = React16.useMemo(() => [styles5.text, { color: toned.color }], [toned.color]);
374
+ const text = formatCount(count, max);
375
+ const isHidden = text === "0" && !showZero;
376
+ if (isHidden) return null;
377
+ return /* @__PURE__ */ jsxRuntime.jsx(
378
+ reactNative.View,
379
+ {
380
+ accessibilityLabel: accessibilityLabel ?? t(LAYOUT_I18N.countBadgeLabel, text),
381
+ style: badgeStyle,
382
+ testID,
383
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: text })
384
+ }
385
+ );
386
+ };
387
+
388
+ // src/SplitPanes/SplitLayout.ts
389
+ var SplitLayout = /* @__PURE__ */ ((SplitLayout2) => {
390
+ SplitLayout2["Auto"] = "auto";
391
+ SplitLayout2["Stack"] = "stack";
392
+ SplitLayout2["Side"] = "side";
393
+ return SplitLayout2;
394
+ })(SplitLayout || {});
395
+
396
+ // src/SplitPanes/isSplitSideBySide.ts
397
+ function isSplitSideBySide(layout, width, breakpoint) {
398
+ if (layout === "side" /* Side */) return true;
399
+ if (layout === "stack" /* Stack */) return false;
400
+ return width >= breakpoint;
401
+ }
402
+ var DEFAULT_GAP = 12;
403
+ var DEFAULT_WEIGHT = 1;
404
+ var styles6 = reactNative.StyleSheet.create({
405
+ row: { flexDirection: "row", alignItems: "flex-start", width: "100%" },
406
+ column: { flexDirection: "column", width: "100%" },
407
+ sidePane: { flexBasis: 0, flexShrink: 1, minWidth: 0 },
408
+ stackPane: { width: "100%", minWidth: 0 }
409
+ });
410
+ var SplitPanes = ({
411
+ start,
412
+ end,
413
+ layout = "auto" /* Auto */,
414
+ startWeight = DEFAULT_WEIGHT,
415
+ endWeight = DEFAULT_WEIGHT,
416
+ gap = DEFAULT_GAP,
417
+ breakpoint = LAYOUT_COLLAPSE_BREAKPOINT,
418
+ testID = LAYOUT_TEST_IDS.splitPanes
419
+ }) => {
420
+ const { width } = reactNative.useWindowDimensions();
421
+ const isSide = isSplitSideBySide(layout, width, breakpoint);
422
+ const container = React16.useMemo(() => [isSide ? styles6.row : styles6.column, { gap }], [isSide, gap]);
423
+ const startStyle = isSide ? [styles6.sidePane, { flexGrow: startWeight }] : styles6.stackPane;
424
+ const endStyle = isSide ? [styles6.sidePane, { flexGrow: endWeight }] : styles6.stackPane;
425
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: container, testID, children: [
426
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: startStyle, testID: `${testID}-start`, children: start }),
427
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: endStyle, testID: `${testID}-end`, children: end })
428
+ ] });
429
+ };
297
430
  function isPastStickyLine(sentinelTop, isIntersecting, topOffset) {
298
431
  return !isIntersecting && sentinelTop < topOffset;
299
432
  }
300
433
  function useStuckSentinel(topOffset) {
301
- const sentinelRef = React14.useRef(null);
302
- const [isStuck, setIsStuck] = React14.useState(false);
303
- React14.useEffect(() => {
434
+ const sentinelRef = React16.useRef(null);
435
+ const [isStuck, setIsStuck] = React16.useState(false);
436
+ React16.useEffect(() => {
304
437
  const node = sentinelRef.current;
305
438
  if (node === null || typeof IntersectionObserver === "undefined") return void 0;
306
439
  const observer = new IntersectionObserver(
@@ -321,9 +454,9 @@ function isKeyboardOpen(visibleHeight, tallestHeight) {
321
454
  return visibleHeight < tallestHeight * KEYBOARD_HEIGHT_RATIO;
322
455
  }
323
456
  function useVisibleViewport() {
324
- const [state, setState] = React14.useState(INITIAL);
325
- const tallest = React14.useRef({ width: 0, height: 0 });
326
- React14.useEffect(() => {
457
+ const [state, setState] = React16.useState(INITIAL);
458
+ const tallest = React16.useRef({ width: 0, height: 0 });
459
+ React16.useEffect(() => {
327
460
  const viewport = typeof window === "undefined" ? void 0 : window.visualViewport;
328
461
  if (viewport === void 0 || viewport === null) return void 0;
329
462
  const read = () => {
@@ -349,7 +482,7 @@ function useVisibleViewport() {
349
482
  return state;
350
483
  }
351
484
  var STICKY_Z_INDEX = 5;
352
- var styles5 = reactNative.StyleSheet.create({
485
+ var styles7 = reactNative.StyleSheet.create({
353
486
  sentinel: { height: 1, marginBottom: -1 },
354
487
  compact: { borderBottomWidth: 1 }
355
488
  });
@@ -366,12 +499,12 @@ var StickyPreview = ({
366
499
  const { offsetTop, keyboardOpen } = useVisibleViewport();
367
500
  const { sentinelRef, isStuck } = useStuckSentinel(topOffset);
368
501
  const isCompact = forceCompact || isStuck || keyboardOpen;
369
- const pinned = React14.useMemo(() => {
502
+ const pinned = React16.useMemo(() => {
370
503
  const web = { position: "sticky", top: topOffset + offsetTop, zIndex: STICKY_Z_INDEX };
371
504
  return reactNative.Platform.OS === WEB_PLATFORM ? web : {};
372
505
  }, [offsetTop, topOffset]);
373
506
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
374
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style: styles5.sentinel }),
507
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, ref: sentinelRef, style: styles7.sentinel }),
375
508
  /* @__PURE__ */ jsxRuntime.jsx(
376
509
  reactNative.View,
377
510
  {
@@ -381,7 +514,7 @@ var StickyPreview = ({
381
514
  style: [
382
515
  pinned,
383
516
  { backgroundColor: theme.colors.background, borderColor: theme.colors.border },
384
- isCompact && styles5.compact
517
+ isCompact && styles7.compact
385
518
  ],
386
519
  testID,
387
520
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}-${isCompact ? "compact" : "full"}`, children: isCompact ? compact : full })
@@ -395,8 +528,8 @@ function isInsideOpenMenu(target) {
395
528
  return target instanceof Element && target.closest(OPEN_MENU_SELECTOR) !== null;
396
529
  }
397
530
  function useEscapeKey(enabled, onClose) {
398
- const isEscapeForMenu = React14.useRef(false);
399
- React14.useEffect(() => {
531
+ const isEscapeForMenu = React16.useRef(false);
532
+ React16.useEffect(() => {
400
533
  if (reactNative.Platform.OS !== "web" || !enabled) return;
401
534
  const onKeyDownCapture = (event) => {
402
535
  if (event.key === ESCAPE_KEY) isEscapeForMenu.current = isInsideOpenMenu(event.target);
@@ -426,8 +559,14 @@ function getFocusableElements(container) {
426
559
  function savePreviousFocus() {
427
560
  return document.activeElement instanceof HTMLElement ? document.activeElement : null;
428
561
  }
562
+ var MAX_ATTACH_FRAMES = 10;
563
+ function findNamed(domNode, initialFocusTestID) {
564
+ if (initialFocusTestID === void 0) return null;
565
+ const selector = `[data-testid="${initialFocusTestID}"]`;
566
+ return domNode.matches(selector) ? domNode : domNode.querySelector(selector);
567
+ }
429
568
  function focusInitial(domNode, initialFocusTestID) {
430
- const named = initialFocusTestID === void 0 ? null : domNode.querySelector(`[data-testid="${initialFocusTestID}"]`);
569
+ const named = findNamed(domNode, initialFocusTestID);
431
570
  if (named) {
432
571
  named.focus();
433
572
  return;
@@ -458,25 +597,39 @@ function handleKeyDown(domNode, event) {
458
597
  }
459
598
  }
460
599
  function useFocusTrap(containerRef, enabled, initialFocusTestID) {
461
- const previousFocusRef = React14.useRef(null);
462
- React14.useEffect(() => {
600
+ const previousFocusRef = React16.useRef(null);
601
+ React16.useEffect(() => {
463
602
  if (reactNative.Platform.OS !== "web" || !enabled) return;
464
- const domNode = containerRef.current;
465
- if (!domNode) return;
466
- const previous = savePreviousFocus();
467
- previousFocusRef.current = previous !== null && domNode.contains(previous) ? null : previous;
468
- queueMicrotask(() => focusInitial(domNode, initialFocusTestID));
469
- const listener = (e) => handleKeyDown(domNode, e);
470
- domNode.addEventListener("keydown", listener);
603
+ let domNode = null;
604
+ let frame = 0;
605
+ let attempts = 0;
606
+ const listener = (e) => {
607
+ if (domNode) handleKeyDown(domNode, e);
608
+ };
609
+ const attach = () => {
610
+ const node = containerRef.current;
611
+ if (!node) {
612
+ attempts += 1;
613
+ if (attempts <= MAX_ATTACH_FRAMES) frame = requestAnimationFrame(attach);
614
+ return;
615
+ }
616
+ domNode = node;
617
+ const previous = savePreviousFocus();
618
+ previousFocusRef.current = previous !== null && node.contains(previous) ? null : previous;
619
+ queueMicrotask(() => focusInitial(node, initialFocusTestID));
620
+ node.addEventListener("keydown", listener);
621
+ };
622
+ attach();
471
623
  return () => {
472
- domNode.removeEventListener("keydown", listener);
624
+ cancelAnimationFrame(frame);
625
+ domNode?.removeEventListener("keydown", listener);
473
626
  previousFocusRef.current?.focus();
474
627
  previousFocusRef.current = null;
475
628
  };
476
629
  }, [containerRef, enabled, initialFocusTestID]);
477
630
  }
478
631
  function useScrollLock(enabled) {
479
- React14.useEffect(() => {
632
+ React16.useEffect(() => {
480
633
  if (reactNative.Platform.OS !== "web" || !enabled) return;
481
634
  const { body } = document;
482
635
  const previousOverflow = body.style.overflow;
@@ -496,7 +649,7 @@ var HEADER_MARGIN = 12;
496
649
  var DIALOG_MAX_HEIGHT = "90%";
497
650
  var PANEL_ENTER_SCALE = 0.96;
498
651
  var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640, xl: 880 };
499
- var styles6 = reactNative.StyleSheet.create({
652
+ var styles8 = reactNative.StyleSheet.create({
500
653
  overlay: {
501
654
  flex: 1,
502
655
  justifyContent: "center",
@@ -508,7 +661,9 @@ var styles6 = reactNative.StyleSheet.create({
508
661
  // react-native-web, which is why the fade is driven by `Animated` instead. `pointerEvents` lives
509
662
  // in style (not the deprecated prop) so taps fall through to the sibling tap-catcher below.
510
663
  scrim: { backgroundColor: uiFeedback.MODAL_OVERLAY_COLOR, pointerEvents: "none" },
664
+ backdrop: { zIndex: 0 },
511
665
  dialog: {
666
+ zIndex: 1,
512
667
  width: "100%",
513
668
  borderRadius: DIALOG_RADIUS,
514
669
  padding: DIALOG_PADDING,
@@ -541,7 +696,7 @@ var styles6 = reactNative.StyleSheet.create({
541
696
  });
542
697
  var ModalFooter = ({ children, testID }) => {
543
698
  const { width } = reactNative.useWindowDimensions();
544
- const style = isModalFooterStacked(width) ? styles6.footerStack : styles6.footerRow;
699
+ const style = isModalFooterStacked(width) ? styles8.footerStack : styles8.footerRow;
545
700
  return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID, children });
546
701
  };
547
702
  var Modal = ({
@@ -557,7 +712,7 @@ var Modal = ({
557
712
  initialFocusTestID
558
713
  }) => {
559
714
  const { theme, t } = uiFeedback.useUi();
560
- const dialogRef = React14.useRef(null);
715
+ const dialogRef = React16.useRef(null);
561
716
  const backdrop = uiMotion.useEnterExit({ visible });
562
717
  const panel = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
563
718
  const mounted = panel.mounted || backdrop.mounted;
@@ -566,30 +721,18 @@ var Modal = ({
566
721
  useScrollLock(visible);
567
722
  const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
568
723
  const closeLabel = t(LAYOUT_I18N.dialogClose);
569
- const dialogStyle = React14.useMemo(
570
- () => [styles6.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
724
+ const dialogStyle = React16.useMemo(
725
+ () => [styles8.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
571
726
  [theme.colors.surface, size]
572
727
  );
573
728
  const hasHeader = title !== void 0 || showClose;
729
+ const focusesDialog = initialFocusTestID === testID;
574
730
  const hardwareBackClose = reactNative.Platform.OS === "web" ? void 0 : onClose;
575
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles6.overlay, children: [
731
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.overlay, children: [
576
732
  /* @__PURE__ */ jsxRuntime.jsx(
577
733
  reactNative.Animated.View,
578
734
  {
579
- style: [reactNative.StyleSheet.absoluteFill, styles6.scrim, { opacity: backdrop.style.opacity }]
580
- }
581
- ),
582
- /* @__PURE__ */ jsxRuntime.jsx(
583
- reactNative.TouchableOpacity,
584
- {
585
- accessible: true,
586
- accessibilityHint: t(LAYOUT_I18N.dismissDropdownHint),
587
- accessibilityLabel: t(LAYOUT_I18N.dismissDropdown),
588
- accessibilityRole: "button",
589
- activeOpacity: 1,
590
- style: reactNative.StyleSheet.absoluteFill,
591
- testID: `${testID}-backdrop`,
592
- onPress: onClose
735
+ style: [reactNative.StyleSheet.absoluteFill, styles8.scrim, { opacity: backdrop.style.opacity }]
593
736
  }
594
737
  ),
595
738
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -600,10 +743,11 @@ var Modal = ({
600
743
  "aria-label": accessibleName,
601
744
  role: "dialog",
602
745
  style: [dialogStyle, panel.style],
746
+ tabIndex: focusesDialog ? -1 : void 0,
603
747
  testID,
604
748
  children: [
605
- hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles6.headerRow, children: [
606
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title }) : null }),
749
+ hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.headerRow, children: [
750
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles8.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title }) : null }),
607
751
  showClose ? /* @__PURE__ */ jsxRuntime.jsx(
608
752
  uiButtons.IconButton,
609
753
  {
@@ -623,6 +767,20 @@ var Modal = ({
623
767
  footer !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ModalFooter, { testID: `${testID}-footer`, children: footer }) : null
624
768
  ]
625
769
  }
770
+ ),
771
+ /* @__PURE__ */ jsxRuntime.jsx(
772
+ reactNative.TouchableOpacity,
773
+ {
774
+ accessible: true,
775
+ accessibilityHint: t(LAYOUT_I18N.dismissDropdownHint),
776
+ accessibilityLabel: t(LAYOUT_I18N.dismissDropdown),
777
+ accessibilityRole: "button",
778
+ activeOpacity: 1,
779
+ style: [reactNative.StyleSheet.absoluteFill, styles8.backdrop],
780
+ focusable: false,
781
+ testID: `${testID}-backdrop`,
782
+ onPress: onClose
783
+ }
626
784
  )
627
785
  ] }) });
628
786
  };
@@ -655,7 +813,7 @@ var scaledFrame = (containerWidth, page) => {
655
813
  offsetY: (scale - 1) * page.height / HALF
656
814
  };
657
815
  };
658
- var styles7 = reactNative.StyleSheet.create({
816
+ var styles9 = reactNative.StyleSheet.create({
659
817
  outer: { width: "100%", overflow: "hidden" },
660
818
  page: { position: "absolute", top: 0, left: 0 },
661
819
  trigger: { width: "100%", cursor: "pointer" }
@@ -667,19 +825,19 @@ var PageFrame = ({
667
825
  enlargeable = false
668
826
  }) => {
669
827
  const { t } = uiFeedback.useUi();
670
- const [containerWidth, setContainerWidth] = React14.useState(0);
671
- const [enlarged, setEnlarged] = React14.useState(false);
672
- const onLayout = React14.useCallback((event) => {
828
+ const [containerWidth, setContainerWidth] = React16.useState(0);
829
+ const [enlarged, setEnlarged] = React16.useState(false);
830
+ const onLayout = React16.useCallback((event) => {
673
831
  setContainerWidth(event.nativeEvent.layout.width);
674
832
  }, []);
675
- const open = React14.useCallback(() => setEnlarged(true), []);
676
- const close = React14.useCallback(() => setEnlarged(false), []);
833
+ const open = React16.useCallback(() => setEnlarged(true), []);
834
+ const close = React16.useCallback(() => setEnlarged(false), []);
677
835
  const frame = scaledFrame(containerWidth, pageSize);
678
- const preview = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles7.outer, { height: frame.height }], testID, onLayout, children: /* @__PURE__ */ jsxRuntime.jsx(
836
+ const preview = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles9.outer, { height: frame.height }], testID, onLayout, children: /* @__PURE__ */ jsxRuntime.jsx(
679
837
  reactNative.View,
680
838
  {
681
839
  style: [
682
- styles7.page,
840
+ styles9.page,
683
841
  {
684
842
  width: pageSize.width,
685
843
  height: pageSize.height,
@@ -697,7 +855,7 @@ var PageFrame = ({
697
855
  accessibilityHint: t(LAYOUT_I18N.pageEnlargeHint),
698
856
  accessibilityLabel: t(LAYOUT_I18N.pageEnlarge),
699
857
  accessibilityRole: "button",
700
- style: styles7.trigger,
858
+ style: styles9.trigger,
701
859
  testID: `${testID}-enlarge`,
702
860
  onPress: open,
703
861
  children: preview
@@ -717,7 +875,7 @@ var BORDER_WIDTH = 1;
717
875
  var SEGMENT_BOX_SHADOW = "0px 1px 3px rgba(20, 30, 50, 0.1)";
718
876
  var SHADOW_ELEVATION = 2;
719
877
  var TRANSPARENT = "transparent";
720
- var styles8 = reactNative.StyleSheet.create({
878
+ var styles10 = reactNative.StyleSheet.create({
721
879
  track: {
722
880
  flexDirection: "row",
723
881
  alignSelf: "flex-start",
@@ -762,7 +920,7 @@ function SegmentedControl({
762
920
  {
763
921
  accessibilityRole: "tablist",
764
922
  "aria-label": accessibilityLabel,
765
- style: [styles8.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
923
+ style: [styles10.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
766
924
  testID,
767
925
  children: options.map((opt) => {
768
926
  const selected = opt.value === value;
@@ -775,13 +933,13 @@ function SegmentedControl({
775
933
  accessibilityHint: opt.accessibilityHint,
776
934
  onPress: () => onChange(opt.value),
777
935
  style: [
778
- styles8.segment,
779
- selected ? styles8.segmentSelected : null,
936
+ styles10.segment,
937
+ selected ? styles10.segmentSelected : null,
780
938
  { backgroundColor: selected ? colors.surface : TRANSPARENT }
781
939
  ],
782
940
  testID: opt.testID,
783
941
  ...ariaSelectedProps(selected),
784
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
942
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
785
943
  },
786
944
  opt.value
787
945
  );
@@ -873,7 +1031,7 @@ var HEADING_PADDING_H = 16;
873
1031
  var HEADING_PADDING_TOP = 8;
874
1032
  var HEADING_PADDING_BOTTOM = 4;
875
1033
  var HEADING_LETTER_SPACING = 0.5;
876
- var styles9 = reactNative.StyleSheet.create({
1034
+ var styles11 = reactNative.StyleSheet.create({
877
1035
  heading: {
878
1036
  fontSize: HEADING_FONT_SIZE,
879
1037
  fontWeight: HEADING_FONT_WEIGHT,
@@ -889,7 +1047,7 @@ var MenuHeading = ({ testID, text }) => {
889
1047
  reactNative.Text,
890
1048
  {
891
1049
  accessibilityRole: "header",
892
- style: [styles9.heading, { color: theme.colors.textSecondary }],
1050
+ style: [styles11.heading, { color: theme.colors.textSecondary }],
893
1051
  testID: `${testID}-menu-heading`,
894
1052
  children: text
895
1053
  }
@@ -910,7 +1068,7 @@ var OPTION_PADDING_V = 12;
910
1068
  var ACCENT_BAR_WIDTH = 3;
911
1069
  var CHECK_GAP = 8;
912
1070
  var CHECK_GLYPH = "\u2713";
913
- var styles10 = reactNative.StyleSheet.create({
1071
+ var styles12 = reactNative.StyleSheet.create({
914
1072
  option: {
915
1073
  paddingHorizontal: OPTION_PADDING_H,
916
1074
  paddingVertical: OPTION_PADDING_V,
@@ -942,23 +1100,23 @@ var OptionRow = ({
942
1100
  }) => {
943
1101
  const { theme, t } = uiFeedback.useUi();
944
1102
  const { colors } = theme;
945
- const handlePress = React14.useCallback(() => {
1103
+ const handlePress = React16.useCallback(() => {
946
1104
  onSelect();
947
1105
  }, [onSelect]);
948
1106
  const accentColor = theme.palette.primary["500"];
949
1107
  const isMarked = selectedMarker === "accent-check" /* AccentCheck */;
950
1108
  const isActive = isSelected || isHighlighted;
951
1109
  const rowStyle = [
952
- styles10.option,
953
- isMarked ? styles10.markedRow : null,
1110
+ styles12.option,
1111
+ isMarked ? styles12.markedRow : null,
954
1112
  isActive ? { backgroundColor: colors.surfaceElevated } : null,
955
1113
  isMarked && isSelected ? { borderLeftColor: accentColor } : null
956
1114
  ];
957
1115
  const textStyle = [
958
- styles10.optionText,
1116
+ styles12.optionText,
959
1117
  { color: colors.text },
960
- isSelected ? styles10.selectedText : null,
961
- isMarked ? styles10.markedText : null
1118
+ isSelected ? styles12.selectedText : null,
1119
+ isMarked ? styles12.markedText : null
962
1120
  ];
963
1121
  const selectionProps = asMenuItem ? { "aria-current": isSelected ? "true" : void 0 } : { "aria-selected": isSelected };
964
1122
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -974,7 +1132,7 @@ var OptionRow = ({
974
1132
  onPress: handlePress,
975
1133
  children: [
976
1134
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label }),
977
- isMarked && isSelected ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
1135
+ isMarked && isSelected ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { "aria-hidden": true, testID: `${testID}-check`, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.selectedText, { color: accentColor }], children: CHECK_GLYPH }) }) : null
978
1136
  ]
979
1137
  }
980
1138
  );
@@ -1031,8 +1189,8 @@ function isSameRect(a, b) {
1031
1189
  return a.top === b.top && a.left === b.left && a.width === b.width && a.bottom === b.bottom;
1032
1190
  }
1033
1191
  function useAnchorTracking(containerRef, onOutOfView) {
1034
- const [rect, setRect] = React14.useState(() => readAnchorRect(containerRef));
1035
- React14.useLayoutEffect(() => {
1192
+ const [rect, setRect] = React16.useState(() => readAnchorRect(containerRef));
1193
+ React16.useLayoutEffect(() => {
1036
1194
  if (!IS_WEB) return void 0;
1037
1195
  let frame = null;
1038
1196
  let isDisposed = false;
@@ -1111,7 +1269,7 @@ function buildKeyHandler(params) {
1111
1269
  }
1112
1270
  function useMenuKeyboard(params) {
1113
1271
  const { containerRef, menuRef, enabled, onClose } = params;
1114
- React14.useEffect(() => {
1272
+ React16.useEffect(() => {
1115
1273
  if (reactNative.Platform.OS !== "web" || !enabled) return;
1116
1274
  const onKeyDown = buildKeyHandler(params);
1117
1275
  const onMouseDown = (event) => {
@@ -1134,19 +1292,19 @@ function readViewportHeight() {
1134
1292
  return IS_WEB2 && typeof window !== "undefined" ? window.innerHeight : 0;
1135
1293
  }
1136
1294
  function useMenuPlacement(rect, menuRef, itemCount) {
1137
- const [menuHeight, setMenuHeight] = React14.useState(MENU_MAX_HEIGHT);
1138
- const [viewportHeight, setViewportHeight] = React14.useState(readViewportHeight);
1139
- React14.useLayoutEffect(() => {
1295
+ const [menuHeight, setMenuHeight] = React16.useState(MENU_MAX_HEIGHT);
1296
+ const [viewportHeight, setViewportHeight] = React16.useState(readViewportHeight);
1297
+ React16.useLayoutEffect(() => {
1140
1298
  const measured = toDomNode(menuRef)?.offsetHeight ?? 0;
1141
1299
  if (measured > 0) setMenuHeight(measured);
1142
1300
  }, [menuRef, itemCount]);
1143
- React14.useLayoutEffect(() => {
1301
+ React16.useLayoutEffect(() => {
1144
1302
  if (!IS_WEB2) return void 0;
1145
1303
  const onResize = () => setViewportHeight(readViewportHeight());
1146
1304
  window.addEventListener("resize", onResize);
1147
1305
  return () => window.removeEventListener("resize", onResize);
1148
1306
  }, []);
1149
- return React14.useMemo(
1307
+ return React16.useMemo(
1150
1308
  () => resolveMenuPlacement(rect ?? UNMEASURED_RECT, viewportHeight, menuHeight),
1151
1309
  [rect, viewportHeight, menuHeight]
1152
1310
  );
@@ -1155,7 +1313,7 @@ var IS_WEB3 = reactNative.Platform.OS === "web";
1155
1313
  var BORDER_RADIUS2 = 8;
1156
1314
  var BORDER_WIDTH3 = 1;
1157
1315
  var MENU_PADDING2 = 4;
1158
- var styles11 = reactNative.StyleSheet.create({
1316
+ var styles13 = reactNative.StyleSheet.create({
1159
1317
  /** Native (in-tree) popover — anchored absolutely just under the trigger. */
1160
1318
  popover: {
1161
1319
  position: "absolute",
@@ -1199,29 +1357,29 @@ var InlineMenu = ({
1199
1357
  }) => {
1200
1358
  const { theme } = uiFeedback.useUi();
1201
1359
  const { colors } = theme;
1202
- const menuRef = React14.useRef(null);
1360
+ const menuRef = React16.useRef(null);
1203
1361
  const rect = useAnchorTracking(containerRef, onClose);
1204
1362
  const placement = useMenuPlacement(rect, menuRef, options.length);
1205
1363
  const opensAbove = placement.bottom !== void 0;
1206
- const selectedIndex = React14.useMemo(
1364
+ const selectedIndex = React16.useMemo(
1207
1365
  () => Math.max(0, options.findIndex((opt) => opt.value === value)),
1208
1366
  [options, value]
1209
1367
  );
1210
- const [highlightedIndex, setHighlightedIndex] = React14.useState(() => selectedIndex);
1211
- const handleSelect = React14.useCallback(
1368
+ const [highlightedIndex, setHighlightedIndex] = React16.useState(() => selectedIndex);
1369
+ const handleSelect = React16.useCallback(
1212
1370
  (optionValue) => {
1213
1371
  if (isOpen) onSelect(optionValue);
1214
1372
  },
1215
1373
  [isOpen, onSelect]
1216
1374
  );
1217
- const selectAt = React14.useCallback(
1375
+ const selectAt = React16.useCallback(
1218
1376
  (index) => {
1219
1377
  const option = options[index];
1220
1378
  if (option !== void 0) handleSelect(option.value);
1221
1379
  },
1222
1380
  [options, handleSelect]
1223
1381
  );
1224
- const selectHighlighted = React14.useCallback(
1382
+ const selectHighlighted = React16.useCallback(
1225
1383
  () => {
1226
1384
  selectAt(highlightedIndex);
1227
1385
  },
@@ -1236,7 +1394,7 @@ var InlineMenu = ({
1236
1394
  onSelectHighlighted: selectHighlighted,
1237
1395
  onClose
1238
1396
  });
1239
- const popoverStyle = React14.useMemo(() => {
1397
+ const popoverStyle = React16.useMemo(() => {
1240
1398
  const themed = { borderColor: colors.border, backgroundColor: colors.surface };
1241
1399
  if (IS_WEB3) {
1242
1400
  const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 0;
@@ -1245,9 +1403,9 @@ var InlineMenu = ({
1245
1403
  themed
1246
1404
  ];
1247
1405
  }
1248
- return [styles11.popover, { minWidth: menuMinWidth }, themed];
1406
+ return [styles13.popover, { minWidth: menuMinWidth }, themed];
1249
1407
  }, [colors.border, colors.surface, menuMinWidth, placement, rect]);
1250
- const scrollStyle = IS_WEB3 ? { maxHeight: menuScrollMaxHeight(placement.maxHeight) } : styles11.scroll;
1408
+ const scrollStyle = IS_WEB3 ? { maxHeight: menuScrollMaxHeight(placement.maxHeight) } : styles13.scroll;
1251
1409
  const menu = /* @__PURE__ */ jsxRuntime.jsx(
1252
1410
  reactNative.View,
1253
1411
  {
@@ -1261,7 +1419,7 @@ var InlineMenu = ({
1261
1419
  reactNative.Animated.View,
1262
1420
  {
1263
1421
  pointerEvents: isOpen ? "auto" : "none",
1264
- style: [styles11.animated, opensAbove ? styles11.animatedAbove : null, animatedStyle, isOpen ? null : styles11.inert],
1422
+ style: [styles13.animated, opensAbove ? styles13.animatedAbove : null, animatedStyle, isOpen ? null : styles13.inert],
1265
1423
  children: [
1266
1424
  menuHeading !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MenuHeading, { testID, text: menuHeading }) : null,
1267
1425
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style: scrollStyle, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1312,7 +1470,7 @@ var CARET_OPEN_ROTATION = "180deg";
1312
1470
  var CARET_CLOSED_ROTATION = "0deg";
1313
1471
  var POPOVER_ENTER_SCALE = 0.96;
1314
1472
  var POPOVER_MOTION_MS = 120;
1315
- var styles12 = reactNative.StyleSheet.create({
1473
+ var styles14 = reactNative.StyleSheet.create({
1316
1474
  anchor: { position: "relative" },
1317
1475
  container: {
1318
1476
  borderWidth: BORDER_WIDTH4,
@@ -1382,7 +1540,7 @@ var ModalDropdown = ({
1382
1540
  const { colors } = theme;
1383
1541
  const resolvedVariant = useResolvedDropdownVariant(variant);
1384
1542
  const isMenu = resolvedVariant === "menu" /* Menu */;
1385
- const [isOpen, setIsOpen] = React14.useState(false);
1543
+ const [isOpen, setIsOpen] = React16.useState(false);
1386
1544
  const { a11yProps, hintNode } = a11y.useA11y({
1387
1545
  label: accessibilityLabel,
1388
1546
  hint: accessibilityHint,
@@ -1390,10 +1548,10 @@ var ModalDropdown = ({
1390
1548
  state: { expanded: isOpen },
1391
1549
  testID
1392
1550
  });
1393
- const anchorRef = React14.useRef(null);
1394
- const triggerRef = React14.useRef(null);
1551
+ const anchorRef = React16.useRef(null);
1552
+ const triggerRef = React16.useRef(null);
1395
1553
  const popupProps = { "aria-haspopup": isMenu ? "menu" : "dialog" };
1396
- const dialogRef = React14.useRef(null);
1554
+ const dialogRef = React16.useRef(null);
1397
1555
  useFocusTrap(dialogRef, isOpen && !isMenu);
1398
1556
  const menuAnim = uiMotion.useEnterExit({
1399
1557
  visible: isMenu && isOpen,
@@ -1405,17 +1563,17 @@ var ModalDropdown = ({
1405
1563
  fromScale: POPOVER_ENTER_SCALE,
1406
1564
  duration: POPOVER_MOTION_MS
1407
1565
  });
1408
- const selectedLabel = React14.useMemo(() => {
1566
+ const selectedLabel = React16.useMemo(() => {
1409
1567
  const found = options.find((opt) => opt.value === value);
1410
1568
  return found?.label ?? t(LAYOUT_I18N.selectPlaceholder);
1411
1569
  }, [options, value, t]);
1412
- const handleToggle = React14.useCallback(() => {
1570
+ const handleToggle = React16.useCallback(() => {
1413
1571
  setIsOpen((prev) => !prev);
1414
1572
  }, []);
1415
- const handleClose = React14.useCallback(() => {
1573
+ const handleClose = React16.useCallback(() => {
1416
1574
  setIsOpen(false);
1417
1575
  }, []);
1418
- const handleSelect = React14.useCallback(
1576
+ const handleSelect = React16.useCallback(
1419
1577
  (optionValue) => {
1420
1578
  onChange(optionValue);
1421
1579
  setIsOpen(false);
@@ -1425,38 +1583,38 @@ var ModalDropdown = ({
1425
1583
  );
1426
1584
  const isHamburger = showHamburger;
1427
1585
  const isCaret = showCaret && !isHamburger;
1428
- const containerStyle = React14.useMemo(
1586
+ const containerStyle = React16.useMemo(
1429
1587
  () => renderTrigger !== void 0 ? void 0 : [
1430
- styles12.container,
1431
- isHamburger ? styles12.containerHamburger : isCaret ? styles12.containerMenu : null,
1588
+ styles14.container,
1589
+ isHamburger ? styles14.containerHamburger : isCaret ? styles14.containerMenu : null,
1432
1590
  { borderColor: colors.border, backgroundColor: colors.surface }
1433
1591
  ],
1434
1592
  [colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
1435
1593
  );
1436
- const hamburgerStyle = React14.useMemo(
1437
- () => [styles12.hamburger, { color: colors.textSecondary }],
1594
+ const hamburgerStyle = React16.useMemo(
1595
+ () => [styles14.hamburger, { color: colors.textSecondary }],
1438
1596
  [colors.textSecondary]
1439
1597
  );
1440
- const caretStyle = React14.useMemo(
1598
+ const caretStyle = React16.useMemo(
1441
1599
  () => [
1442
- styles12.caret,
1600
+ styles14.caret,
1443
1601
  { color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
1444
1602
  ],
1445
1603
  [colors.textSecondary, isOpen]
1446
1604
  );
1447
- const optionTestIDFor = React14.useCallback(
1605
+ const optionTestIDFor = React16.useCallback(
1448
1606
  (optionValue) => optionTestID !== void 0 ? optionTestID(optionValue) : `${testID}-option-${String(optionValue)}`,
1449
1607
  [optionTestID, testID]
1450
1608
  );
1451
- const anchorStyle = React14.useMemo(
1452
- () => [styles12.anchor, buildAnchorStackStyle(isMenu && isOpen)],
1609
+ const anchorStyle = React16.useMemo(
1610
+ () => [styles14.anchor, buildAnchorStackStyle(isMenu && isOpen)],
1453
1611
  [isMenu, isOpen]
1454
1612
  );
1455
- const modalContentStyle = React14.useMemo(
1456
- () => [styles12.modalContent, { backgroundColor: colors.surface }],
1613
+ const modalContentStyle = React16.useMemo(
1614
+ () => [styles14.modalContent, { backgroundColor: colors.surface }],
1457
1615
  [colors.surface]
1458
1616
  );
1459
- const renderModalOption = React14.useCallback(
1617
+ const renderModalOption = React16.useCallback(
1460
1618
  ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
1461
1619
  OptionRow,
1462
1620
  {
@@ -1469,16 +1627,16 @@ var ModalDropdown = ({
1469
1627
  ),
1470
1628
  [handleSelect, optionTestIDFor, selectedMarker, value]
1471
1629
  );
1472
- const keyExtractor = React14.useCallback((item) => String(item.value), []);
1630
+ const keyExtractor = React16.useCallback((item) => String(item.value), []);
1473
1631
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: anchorRef, style: anchorStyle, children: [
1474
1632
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.TouchableOpacity, { ...a11yProps, ...popupProps, ref: triggerRef, style: containerStyle, onPress: handleToggle, children: [
1475
1633
  renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1476
1634
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
1477
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles12.selectedText, styles12.selectedTextMenu, { color: colors.text }], children: selectedLabel })
1635
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles14.selectedText, styles14.selectedTextMenu, { color: colors.text }], children: selectedLabel })
1478
1636
  ] }) : isCaret ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1479
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles12.selectedText, styles12.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
1637
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles14.selectedText, styles14.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
1480
1638
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: caretStyle, children: CARET_GLYPH })
1481
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.selectedText, { color: colors.text }], children: selectedLabel }),
1639
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.selectedText, { color: colors.text }], children: selectedLabel }),
1482
1640
  hintNode
1483
1641
  ] }),
1484
1642
  isMenu && menuAnim.mounted ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -1499,7 +1657,7 @@ var ModalDropdown = ({
1499
1657
  onSelect: handleSelect
1500
1658
  }
1501
1659
  ) : null,
1502
- !isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles12.modalOverlay, children: [
1660
+ !isMenu ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.modalOverlay, children: [
1503
1661
  /* @__PURE__ */ jsxRuntime.jsx(
1504
1662
  reactNative.TouchableOpacity,
1505
1663
  {
@@ -1545,11 +1703,11 @@ var TabsMenu = ({
1545
1703
  collapsedTrigger = "caret" /* Caret */
1546
1704
  }) => {
1547
1705
  const { t } = uiFeedback.useUi();
1548
- const options = React14.useMemo(
1706
+ const options = React16.useMemo(
1549
1707
  () => tabs.map((tab) => ({ label: tab.label, value: tab.key })),
1550
1708
  [tabs]
1551
1709
  );
1552
- const optionTestID = React14.useCallback(
1710
+ const optionTestID = React16.useCallback(
1553
1711
  (key) => {
1554
1712
  const found = tabs.find((tab) => tab.key === key);
1555
1713
  return found?.testID ?? `${idPrefix}-tab-${key}`;
@@ -1592,7 +1750,7 @@ var ROW_PAD_V = 8;
1592
1750
  var PANEL_PAD_TOP = 16;
1593
1751
  var BORDER_WIDTH5 = 1;
1594
1752
  var TEXT_ON_PRIMARY = "#ffffff";
1595
- var styles13 = reactNative.StyleSheet.create({
1753
+ var styles15 = reactNative.StyleSheet.create({
1596
1754
  root: {
1597
1755
  width: "100%"
1598
1756
  },
@@ -1646,7 +1804,7 @@ var WideTabStrip = ({
1646
1804
  textSecondary,
1647
1805
  surfaceElevated,
1648
1806
  stripStyle
1649
- }) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles13.strip, stripStyle], children: tabs.map((tab) => {
1807
+ }) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles15.strip, stripStyle], children: tabs.map((tab) => {
1650
1808
  const selected = tab.key === activeKey;
1651
1809
  const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
1652
1810
  const pillColor = selected ? primaryColor : surfaceElevated;
@@ -1660,10 +1818,10 @@ var WideTabStrip = ({
1660
1818
  accessibilityLabel: tab.accessibilityLabel ?? tab.label,
1661
1819
  accessibilityHint: tab.accessibilityHint,
1662
1820
  onPress: () => onChange(tab.key),
1663
- style: [styles13.pill, { backgroundColor: pillColor }],
1821
+ style: [styles15.pill, { backgroundColor: pillColor }],
1664
1822
  testID: tab.testID,
1665
1823
  ...ariaTabProps(selected, panelId, tabId),
1666
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.pillText, { color: textColor }], children: tab.label })
1824
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.pillText, { color: textColor }], children: tab.label })
1667
1825
  },
1668
1826
  tab.key
1669
1827
  );
@@ -1688,7 +1846,7 @@ var Tabs = ({
1688
1846
  const activePanelId = `${idPrefix}-panel-${activeKey}`;
1689
1847
  const activeTabId = `${idPrefix}-tab-${activeKey}`;
1690
1848
  const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
1691
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles13.root, style], testID, children: [
1849
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.root, style], testID, children: [
1692
1850
  collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
1693
1851
  TabsMenu,
1694
1852
  {
@@ -1715,7 +1873,7 @@ var Tabs = ({
1715
1873
  onChange
1716
1874
  }
1717
1875
  ),
1718
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [styles13.panel, panelStyle], ...panelAria, children })
1876
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "none", style: [styles15.panel, panelStyle], ...panelAria, children })
1719
1877
  ] });
1720
1878
  };
1721
1879
  var PROMPT_PADDING = 20;
@@ -1730,7 +1888,7 @@ var DISMISS_FONT_SIZE = 13;
1730
1888
  var TITLE_MARGIN_BOTTOM = 8;
1731
1889
  var MESSAGE_MARGIN_BOTTOM = 16;
1732
1890
  var CTA_MARGIN_BOTTOM = 8;
1733
- var styles14 = reactNative.StyleSheet.create({
1891
+ var styles16 = reactNative.StyleSheet.create({
1734
1892
  container: {
1735
1893
  padding: PROMPT_PADDING,
1736
1894
  borderRadius: PROMPT_BORDER_RADIUS,
@@ -1765,21 +1923,21 @@ var UpgradePrompt = ({
1765
1923
  return /* @__PURE__ */ jsxRuntime.jsxs(
1766
1924
  reactNative.View,
1767
1925
  {
1768
- style: [styles14.container, { borderColor: primary, backgroundColor: colors.surface }],
1926
+ style: [styles16.container, { borderColor: primary, backgroundColor: colors.surface }],
1769
1927
  testID: LAYOUT_TEST_IDS.upgradePrompt,
1770
1928
  children: [
1771
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
1772
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
1929
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
1930
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
1773
1931
  /* @__PURE__ */ jsxRuntime.jsx(
1774
1932
  reactNative.TouchableOpacity,
1775
1933
  {
1776
1934
  accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
1777
1935
  accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
1778
1936
  accessibilityRole: "button",
1779
- style: [styles14.cta, { backgroundColor: primary }],
1937
+ style: [styles16.cta, { backgroundColor: primary }],
1780
1938
  testID: LAYOUT_TEST_IDS.upgradePromptCta,
1781
1939
  onPress: handleUpgradePress,
1782
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
1940
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
1783
1941
  }
1784
1942
  ),
1785
1943
  onDismiss ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -1788,10 +1946,10 @@ var UpgradePrompt = ({
1788
1946
  accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
1789
1947
  accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
1790
1948
  accessibilityRole: "button",
1791
- style: styles14.dismiss,
1949
+ style: styles16.dismiss,
1792
1950
  testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
1793
1951
  onPress: onDismiss,
1794
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
1952
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
1795
1953
  }
1796
1954
  ) : null
1797
1955
  ]
@@ -1800,7 +1958,7 @@ var UpgradePrompt = ({
1800
1958
  };
1801
1959
  var CLOSE_ICON_SIZE = 18;
1802
1960
  var PANEL_ENTER_SCALE2 = 0.96;
1803
- var styles15 = reactNative.StyleSheet.create({
1961
+ var styles17 = reactNative.StyleSheet.create({
1804
1962
  animatedFill: { flex: 1 },
1805
1963
  container: {
1806
1964
  flex: 1,
@@ -1829,8 +1987,8 @@ var ModalShell = ({
1829
1987
  }) => {
1830
1988
  const { theme, t } = uiFeedback.useUi();
1831
1989
  const { style: sheetStyle, mounted } = uiMotion.useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE2 });
1832
- const containerStyle = React14__default.default.useMemo(
1833
- () => [styles15.container, { backgroundColor: theme.colors.background }, contentStyle],
1990
+ const containerStyle = React16__default.default.useMemo(
1991
+ () => [styles17.container, { backgroundColor: theme.colors.background }, contentStyle],
1834
1992
  [theme.colors.background, contentStyle]
1835
1993
  );
1836
1994
  const closeA11yLabel = t(LAYOUT_I18N.close);
@@ -1842,7 +2000,7 @@ var ModalShell = ({
1842
2000
  testID: LAYOUT_TEST_IDS.modalShell,
1843
2001
  visible: mounted,
1844
2002
  onRequestClose: onCancel,
1845
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles15.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxRuntime.jsxs(
2003
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles17.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxRuntime.jsxs(
1846
2004
  reactNative.ScrollView,
1847
2005
  {
1848
2006
  accessibilityViewIsModal: true,
@@ -1850,7 +2008,7 @@ var ModalShell = ({
1850
2008
  role: "dialog",
1851
2009
  style: containerStyle,
1852
2010
  children: [
1853
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.headerRow, children: [
2011
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.headerRow, children: [
1854
2012
  /* @__PURE__ */ jsxRuntime.jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
1855
2013
  showClose ? /* @__PURE__ */ jsxRuntime.jsx(
1856
2014
  reactNative.TouchableOpacity,
@@ -1858,7 +2016,7 @@ var ModalShell = ({
1858
2016
  accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
1859
2017
  accessibilityLabel: closeA11yLabel,
1860
2018
  accessibilityRole: "button",
1861
- style: styles15.closeButton,
2019
+ style: styles17.closeButton,
1862
2020
  testID: LAYOUT_TEST_IDS.modalShellClose,
1863
2021
  onPress: onCancel,
1864
2022
  children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
@@ -1875,7 +2033,7 @@ var ModalShell = ({
1875
2033
  var SHEET_WIDTH = 560;
1876
2034
  var PHONE_CORNER = 16;
1877
2035
  var PHONE_ENTER_OFFSET = 24;
1878
- var styles16 = reactNative.StyleSheet.create({
2036
+ var styles18 = reactNative.StyleSheet.create({
1879
2037
  root: { flex: 1 },
1880
2038
  scrim: { backgroundColor: uiFeedback.MODAL_OVERLAY_COLOR, pointerEvents: "none" },
1881
2039
  sheet: { position: "absolute", bottom: 0, overflow: "hidden" },
@@ -1904,7 +2062,7 @@ var SideSheet = ({
1904
2062
  }) => {
1905
2063
  const { theme, t } = uiFeedback.useUi();
1906
2064
  const isWide = useIsWideViewport();
1907
- const sheetRef = React14.useRef(null);
2065
+ const sheetRef = React16.useRef(null);
1908
2066
  const backdrop = uiMotion.useEnterExit({ visible });
1909
2067
  const panel = uiMotion.useEnterExit({ visible, translateY: isWide ? 0 : PHONE_ENTER_OFFSET });
1910
2068
  const edges = { borderColor: theme.colors.border };
@@ -1912,8 +2070,8 @@ var SideSheet = ({
1912
2070
  useEscapeKey(visible, onClose);
1913
2071
  useScrollLock(visible);
1914
2072
  const hardwareBackClose = reactNative.Platform.OS === "web" ? void 0 : onClose;
1915
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.root, children: [
1916
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, styles16.scrim, { opacity: backdrop.style.opacity }] }),
2073
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.root, children: [
2074
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, styles18.scrim, { opacity: backdrop.style.opacity }] }),
1917
2075
  /* @__PURE__ */ jsxRuntime.jsx(
1918
2076
  reactNative.Pressable,
1919
2077
  {
@@ -1934,17 +2092,17 @@ var SideSheet = ({
1934
2092
  "aria-label": accessibilityLabel ?? title,
1935
2093
  role: "dialog",
1936
2094
  style: [
1937
- styles16.sheet,
1938
- isWide ? styles16.wide : styles16.phone,
2095
+ styles18.sheet,
2096
+ isWide ? styles18.wide : styles18.phone,
1939
2097
  edges,
1940
2098
  { backgroundColor: theme.colors.surface },
1941
2099
  panel.style
1942
2100
  ],
1943
2101
  testID,
1944
2102
  children: [
1945
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.title, children: /* @__PURE__ */ jsxRuntime.jsx(AppText, { kind: "title" /* Title */, children: title }) }),
1946
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { contentContainerStyle: styles16.content, style: styles16.scroll, children }),
1947
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.bar, edges], children: footer })
2103
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.title, children: /* @__PURE__ */ jsxRuntime.jsx(AppText, { kind: "title" /* Title */, children: title }) }),
2104
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { contentContainerStyle: styles18.content, style: styles18.scroll, children }),
2105
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.bar, edges], children: footer })
1948
2106
  ]
1949
2107
  }
1950
2108
  )
@@ -1956,7 +2114,7 @@ var WIDE_MAX_WIDTH = 560;
1956
2114
  var TOP_CORNER = 16;
1957
2115
  var ENTER_OFFSET = 24;
1958
2116
  var CLOSE_ICON_SIZE2 = 18;
1959
- var styles17 = reactNative.StyleSheet.create({
2117
+ var styles19 = reactNative.StyleSheet.create({
1960
2118
  root: { flex: 1 },
1961
2119
  backdrop: { backgroundColor: uiFeedback.MODAL_OVERLAY_COLOR, pointerEvents: "none" },
1962
2120
  panel: {
@@ -1989,7 +2147,7 @@ var BottomSheet = ({
1989
2147
  }) => {
1990
2148
  const { theme, t } = uiFeedback.useUi();
1991
2149
  const isWide = useIsWideViewport();
1992
- const panelRef = React14.useRef(null);
2150
+ const panelRef = React16.useRef(null);
1993
2151
  const backdrop = uiMotion.useEnterExit({ visible });
1994
2152
  const panel = uiMotion.useEnterExit({ visible, translateY: ENTER_OFFSET });
1995
2153
  const hasFooter = footer !== void 0 && footer !== null;
@@ -1998,8 +2156,8 @@ var BottomSheet = ({
1998
2156
  useEscapeKey(visible, onClose);
1999
2157
  useScrollLock(visible);
2000
2158
  const hardwareBackClose = reactNative.Platform.OS === "web" ? void 0 : onClose;
2001
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.root, children: [
2002
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, styles17.backdrop, { opacity: backdrop.style.opacity }] }),
2159
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { transparent: true, visible: panel.mounted || backdrop.mounted, onRequestClose: hardwareBackClose, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.root, children: [
2160
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, styles19.backdrop, { opacity: backdrop.style.opacity }] }),
2003
2161
  /* @__PURE__ */ jsxRuntime.jsx(
2004
2162
  reactNative.Pressable,
2005
2163
  {
@@ -2020,39 +2178,47 @@ var BottomSheet = ({
2020
2178
  "aria-label": accessibilityLabel ?? title,
2021
2179
  role: "dialog",
2022
2180
  style: [
2023
- styles17.panel,
2024
- isWide ? styles17.wide : null,
2181
+ styles19.panel,
2182
+ isWide ? styles19.wide : null,
2025
2183
  panelSize,
2026
2184
  { backgroundColor: theme.colors.surface },
2027
2185
  panel.style
2028
2186
  ],
2029
2187
  testID,
2030
2188
  children: [
2031
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.header, children: [
2032
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.title, children: /* @__PURE__ */ jsxRuntime.jsx(AppText, { kind: "title" /* Title */, children: title }) }),
2189
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.header, children: [
2190
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.title, children: /* @__PURE__ */ jsxRuntime.jsx(AppText, { kind: "title" /* Title */, children: title }) }),
2033
2191
  /* @__PURE__ */ jsxRuntime.jsx(
2034
2192
  reactNative.TouchableOpacity,
2035
2193
  {
2036
2194
  accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
2037
2195
  accessibilityLabel: t(LAYOUT_I18N.dialogClose),
2038
2196
  accessibilityRole: "button",
2039
- style: styles17.close,
2197
+ style: styles19.close,
2040
2198
  testID: `${testID}-close`,
2041
2199
  onPress: onClose,
2042
2200
  children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE2 })
2043
2201
  }
2044
2202
  )
2045
2203
  ] }),
2046
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { contentContainerStyle: styles17.content, style: styles17.body, children }),
2047
- hasFooter ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles17.footer, { borderColor: theme.colors.border }], testID: `${testID}-footer`, children: footer }) : null
2204
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { contentContainerStyle: styles19.content, style: styles19.body, children }),
2205
+ hasFooter ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.footer, { borderColor: theme.colors.border }], testID: `${testID}-footer`, children: footer }) : null
2048
2206
  ]
2049
2207
  }
2050
2208
  )
2051
2209
  ] }) });
2052
2210
  };
2211
+
2212
+ // src/Modal/ConfirmDialogFocus.ts
2213
+ var ConfirmDialogFocus = /* @__PURE__ */ ((ConfirmDialogFocus2) => {
2214
+ ConfirmDialogFocus2["Cancel"] = "cancel";
2215
+ ConfirmDialogFocus2["Confirm"] = "confirm";
2216
+ ConfirmDialogFocus2["None"] = "none";
2217
+ return ConfirmDialogFocus2;
2218
+ })(ConfirmDialogFocus || {});
2053
2219
  var MESSAGE_FONT_SIZE2 = 14;
2054
2220
  var MESSAGE_LINE_HEIGHT = 20;
2055
- var styles18 = reactNative.StyleSheet.create({
2221
+ var styles20 = reactNative.StyleSheet.create({
2056
2222
  message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT }
2057
2223
  });
2058
2224
  var ConfirmDialog = ({
@@ -2065,11 +2231,17 @@ var ConfirmDialog = ({
2065
2231
  onConfirm,
2066
2232
  onCancel,
2067
2233
  busy = false,
2234
+ initialFocus = "cancel" /* Cancel */,
2068
2235
  testID = LAYOUT_TEST_IDS.confirmDialog
2069
2236
  }) => {
2070
2237
  const { theme, t } = uiFeedback.useUi();
2071
2238
  const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
2072
2239
  const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
2240
+ const focusTestID = {
2241
+ ["cancel" /* Cancel */]: `${testID}-cancel`,
2242
+ ["confirm" /* Confirm */]: `${testID}-confirm`,
2243
+ ["none" /* None */]: testID
2244
+ };
2073
2245
  const footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2074
2246
  /* @__PURE__ */ jsxRuntime.jsx(
2075
2247
  uiButtons.Button,
@@ -2100,25 +2272,26 @@ var ConfirmDialog = ({
2100
2272
  Modal,
2101
2273
  {
2102
2274
  footer,
2275
+ initialFocusTestID: focusTestID[initialFocus],
2103
2276
  showClose: false,
2104
2277
  size: "sm",
2105
2278
  testID,
2106
2279
  title,
2107
2280
  visible,
2108
2281
  onClose: onCancel,
2109
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
2282
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
2110
2283
  }
2111
2284
  );
2112
2285
  };
2113
2286
  var FIELD_SELECTOR = "input:not([disabled]), textarea:not([disabled]), select:not([disabled])";
2114
2287
  var FORM_STYLE = { display: "contents" };
2115
2288
  var WebFormBody = ({ children, visible, onSubmit }) => {
2116
- const formRef = React14.useRef(null);
2117
- React14.useEffect(() => {
2289
+ const formRef = React16.useRef(null);
2290
+ React16.useEffect(() => {
2118
2291
  if (reactNative.Platform.OS !== "web" || !visible) return;
2119
2292
  formRef.current?.querySelector(FIELD_SELECTOR)?.focus();
2120
2293
  }, [visible]);
2121
- const handleSubmit = React14.useCallback(
2294
+ const handleSubmit = React16.useCallback(
2122
2295
  (event) => {
2123
2296
  event.preventDefault();
2124
2297
  onSubmit();
@@ -2126,11 +2299,11 @@ var WebFormBody = ({ children, visible, onSubmit }) => {
2126
2299
  [onSubmit]
2127
2300
  );
2128
2301
  if (reactNative.Platform.OS !== "web") return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
2129
- return React14__default.default.createElement(
2302
+ return React16__default.default.createElement(
2130
2303
  "form",
2131
2304
  { ref: formRef, noValidate: true, style: FORM_STYLE, onSubmit: handleSubmit },
2132
2305
  children,
2133
- React14__default.default.createElement("button", { type: "submit", hidden: true, tabIndex: -1, "aria-hidden": true })
2306
+ React16__default.default.createElement("button", { type: "submit", hidden: true, tabIndex: -1, "aria-hidden": true })
2134
2307
  );
2135
2308
  };
2136
2309
  var FormDialogActions = (props) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2173,7 +2346,7 @@ var FormDialog = ({
2173
2346
  testID = LAYOUT_TEST_IDS.formDialog
2174
2347
  }) => {
2175
2348
  const { t } = uiFeedback.useUi();
2176
- const submit = React14.useCallback(() => {
2349
+ const submit = React16.useCallback(() => {
2177
2350
  if (!loading) onSubmit();
2178
2351
  }, [loading, onSubmit]);
2179
2352
  const footer = /* @__PURE__ */ jsxRuntime.jsx(
@@ -2191,23 +2364,23 @@ var FormDialog = ({
2191
2364
  );
2192
2365
  return /* @__PURE__ */ jsxRuntime.jsx(Modal, { footer, size, testID: `${testID}-dialog`, title, visible, onClose: onCancel, children: /* @__PURE__ */ jsxRuntime.jsx(WebFormBody, { visible, onSubmit: submit, children }) });
2193
2366
  };
2194
- var AccordionContext = React14.createContext(null);
2367
+ var AccordionContext = React16.createContext(null);
2195
2368
  function useAccordionContext() {
2196
- const value = React14.useContext(AccordionContext);
2369
+ const value = React16.useContext(AccordionContext);
2197
2370
  if (value === null) {
2198
2371
  throw new Error("AccordionItem must be rendered inside an <Accordion>.");
2199
2372
  }
2200
2373
  return value;
2201
2374
  }
2202
2375
  var BOXED_GAP = 12;
2203
- var styles19 = reactNative.StyleSheet.create({
2376
+ var styles21 = reactNative.StyleSheet.create({
2204
2377
  container: { alignSelf: "stretch" },
2205
2378
  boxed: { gap: BOXED_GAP }
2206
2379
  });
2207
2380
  function computeInitialOpen(children, defaultOpenIds, allowMultiple) {
2208
2381
  const ids = new Set(defaultOpenIds ?? []);
2209
- React14__default.default.Children.forEach(children, (child) => {
2210
- if (!React14__default.default.isValidElement(child)) return;
2382
+ React16__default.default.Children.forEach(children, (child) => {
2383
+ if (!React16__default.default.isValidElement(child)) return;
2211
2384
  const props = child.props;
2212
2385
  if (props.defaultOpen === true && typeof props.id === "string") {
2213
2386
  ids.add(props.id);
@@ -2230,14 +2403,14 @@ var Accordion = ({
2230
2403
  style
2231
2404
  }) => {
2232
2405
  const isControlled = openIds !== void 0;
2233
- const [internalOpen, setInternalOpen] = React14.useState(
2406
+ const [internalOpen, setInternalOpen] = React16.useState(
2234
2407
  () => computeInitialOpen(children, defaultOpenIds, allowMultiple)
2235
2408
  );
2236
- const openSet = React14.useMemo(
2409
+ const openSet = React16.useMemo(
2237
2410
  () => isControlled ? new Set(openIds) : internalOpen,
2238
2411
  [isControlled, openIds, internalOpen]
2239
2412
  );
2240
- const toggle = React14.useCallback(
2413
+ const toggle = React16.useCallback(
2241
2414
  (id) => {
2242
2415
  const next = new Set(openSet);
2243
2416
  const willOpen = !next.has(id);
@@ -2252,12 +2425,12 @@ var Accordion = ({
2252
2425
  },
2253
2426
  [allowMultiple, isControlled, onOpenChange, openSet]
2254
2427
  );
2255
- const contextValue = React14.useMemo(
2428
+ const contextValue = React16.useMemo(
2256
2429
  () => ({ openIds: openSet, toggle, allowMultiple, variant }),
2257
2430
  [openSet, toggle, allowMultiple, variant]
2258
2431
  );
2259
- const containerStyle = React14.useMemo(() => {
2260
- const base = variant === "boxed" ? [styles19.container, styles19.boxed] : [styles19.container];
2432
+ const containerStyle = React16.useMemo(() => {
2433
+ const base = variant === "boxed" ? [styles21.container, styles21.boxed] : [styles21.container];
2261
2434
  if (style === void 0) return base;
2262
2435
  return [...base, ...Array.isArray(style) ? style : [style]];
2263
2436
  }, [style, variant]);
@@ -2289,7 +2462,7 @@ var BOX_TITLE_FONT_SIZE = 14;
2289
2462
  var BOX_MARKER_FONT_SIZE = 13;
2290
2463
  var BOX_MARKER_GAP = 6;
2291
2464
  var BOX_MARKER = "\u25B8";
2292
- var styles20 = reactNative.StyleSheet.create({
2465
+ var styles22 = reactNative.StyleSheet.create({
2293
2466
  item: { borderTopWidth: reactNative.StyleSheet.hairlineWidth },
2294
2467
  boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
2295
2468
  header: {
@@ -2335,9 +2508,9 @@ var AccordionItem = ({
2335
2508
  const headerTestID = testID ?? `accordion-item-${id}`;
2336
2509
  const bodyTestID = `${headerTestID}-body`;
2337
2510
  const chevronTestID = `${headerTestID}-chevron`;
2338
- const [rotation] = React14.useState(() => new reactNative.Animated.Value(expanded ? ROTATE_EXPANDED : ROTATE_COLLAPSED));
2511
+ const [rotation] = React16.useState(() => new reactNative.Animated.Value(expanded ? ROTATE_EXPANDED : ROTATE_COLLAPSED));
2339
2512
  const reducedMotion = rnWebHooks.useReducedMotion();
2340
- React14.useEffect(() => {
2513
+ React16.useEffect(() => {
2341
2514
  reactNative.Animated.timing(rotation, {
2342
2515
  toValue: expanded ? ROTATE_EXPANDED : ROTATE_COLLAPSED,
2343
2516
  duration: reducedMotion ? INSTANT_DURATION_MS : ROTATE_DURATION_MS,
@@ -2349,10 +2522,10 @@ var AccordionItem = ({
2349
2522
  inputRange: [ROTATE_COLLAPSED, ROTATE_EXPANDED],
2350
2523
  outputRange: [COLLAPSED_DEG, boxed ? BOXED_EXPANDED_DEG : PLAIN_EXPANDED_DEG]
2351
2524
  });
2352
- const handlePress = React14.useCallback(() => {
2525
+ const handlePress = React16.useCallback(() => {
2353
2526
  if (!disabled) toggle(id);
2354
2527
  }, [disabled, id, toggle]);
2355
- const handleKeyDown2 = React14.useCallback(
2528
+ const handleKeyDown2 = React16.useCallback(
2356
2529
  (event) => {
2357
2530
  if (disabled) return;
2358
2531
  const key = event.key ?? "";
@@ -2364,20 +2537,20 @@ var AccordionItem = ({
2364
2537
  [disabled, id, toggle]
2365
2538
  );
2366
2539
  const keyboardProps = reactNative.Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
2367
- const itemStyle = React14.useMemo(
2368
- () => boxed ? [styles20.boxItem, { borderColor: colors.border }] : [styles20.item, { borderTopColor: colors.border }],
2540
+ const itemStyle = React16.useMemo(
2541
+ () => boxed ? [styles22.boxItem, { borderColor: colors.border }] : [styles22.item, { borderTopColor: colors.border }],
2369
2542
  [boxed, colors.border]
2370
2543
  );
2371
- const headerStyle = React14.useMemo(
2544
+ const headerStyle = React16.useMemo(
2372
2545
  () => [
2373
- styles20.header,
2374
- ...boxed ? [styles20.boxHeader] : [],
2546
+ styles22.header,
2547
+ ...boxed ? [styles22.boxHeader] : [],
2375
2548
  { opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
2376
2549
  ],
2377
2550
  [boxed, disabled]
2378
2551
  );
2379
2552
  const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
2380
- const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ? styles20.boxTitle : styles20.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
2553
+ const titleNode = typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [boxed ? styles22.boxTitle : styles22.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
2381
2554
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: itemStyle, children: [
2382
2555
  /* @__PURE__ */ jsxRuntime.jsxs(
2383
2556
  reactNative.Pressable,
@@ -2394,7 +2567,7 @@ var AccordionItem = ({
2394
2567
  onPress: handlePress,
2395
2568
  ...keyboardProps,
2396
2569
  children: [
2397
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.headerLeft, boxed ? styles20.headerLeftRow : null], children: [
2570
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles22.headerLeft, boxed ? styles22.headerLeftRow : null], children: [
2398
2571
  boxed ? (
2399
2572
  // Decorative — the open/closed state is already conveyed by aria-expanded on the header.
2400
2573
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2403,15 +2576,15 @@ var AccordionItem = ({
2403
2576
  accessibilityElementsHidden: true,
2404
2577
  "aria-hidden": true,
2405
2578
  importantForAccessibility: "no-hide-descendants",
2406
- style: [styles20.marker, { transform: [{ rotate }] }],
2579
+ style: [styles22.marker, { transform: [{ rotate }] }],
2407
2580
  testID: chevronTestID,
2408
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
2581
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
2409
2582
  }
2410
2583
  )
2411
2584
  ) : null,
2412
2585
  titleNode
2413
2586
  ] }),
2414
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.headerRight, children: [
2587
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.headerRight, children: [
2415
2588
  right,
2416
2589
  boxed ? null : /* @__PURE__ */ jsxRuntime.jsx(
2417
2590
  reactNative.Animated.View,
@@ -2419,7 +2592,7 @@ var AccordionItem = ({
2419
2592
  accessibilityElementsHidden: true,
2420
2593
  "aria-hidden": true,
2421
2594
  importantForAccessibility: "no-hide-descendants",
2422
- style: [styles20.chevron, { transform: [{ rotate }] }],
2595
+ style: [styles22.chevron, { transform: [{ rotate }] }],
2423
2596
  children: /* @__PURE__ */ jsxRuntime.jsx(uiIcons.SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
2424
2597
  }
2425
2598
  )
@@ -2433,7 +2606,7 @@ var AccordionItem = ({
2433
2606
  accessibilityLabel: resolvedLabel,
2434
2607
  nativeID: bodyTestID,
2435
2608
  role: ROLE_REGION,
2436
- style: boxed ? styles20.boxBody : styles20.body,
2609
+ style: boxed ? styles22.boxBody : styles22.body,
2437
2610
  testID: bodyTestID,
2438
2611
  children
2439
2612
  }
@@ -2471,14 +2644,14 @@ function measureParentInnerWidth(node) {
2471
2644
  return Math.max(UNMEASURED, parent.clientWidth - padding);
2472
2645
  }
2473
2646
  function useAvailableWidth() {
2474
- const [width, setWidth] = React14.useState(UNMEASURED);
2475
- const nodeRef = React14.useRef(null);
2476
- const measureRef = React14.useCallback((node) => {
2647
+ const [width, setWidth] = React16.useState(UNMEASURED);
2648
+ const nodeRef = React16.useRef(null);
2649
+ const measureRef = React16.useCallback((node) => {
2477
2650
  if (!IS_WEB4) return;
2478
2651
  nodeRef.current = node;
2479
2652
  if (nodeRef.current !== null) setWidth(measureParentInnerWidth(nodeRef.current));
2480
2653
  }, []);
2481
- React14.useEffect(() => {
2654
+ React16.useEffect(() => {
2482
2655
  if (!IS_WEB4) return void 0;
2483
2656
  const remeasure = () => {
2484
2657
  const node = nodeRef.current;
@@ -2487,7 +2660,7 @@ function useAvailableWidth() {
2487
2660
  window.addEventListener("resize", remeasure);
2488
2661
  return () => window.removeEventListener("resize", remeasure);
2489
2662
  }, []);
2490
- const onLayout = React14.useCallback((event) => {
2663
+ const onLayout = React16.useCallback((event) => {
2491
2664
  if (IS_WEB4) return;
2492
2665
  setWidth(event.nativeEvent.layout.width);
2493
2666
  }, []);
@@ -2496,7 +2669,7 @@ function useAvailableWidth() {
2496
2669
  var AVG_CHAR_WIDTH_RATIO = 0.58;
2497
2670
  var DEFAULT_FONT_SIZE2 = 13;
2498
2671
  var UNMEASURED2 = 0;
2499
- var styles21 = reactNative.StyleSheet.create({
2672
+ var styles23 = reactNative.StyleSheet.create({
2500
2673
  base: { fontSize: DEFAULT_FONT_SIZE2 },
2501
2674
  /** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
2502
2675
  fill: { flexShrink: 1, minWidth: 0 }
@@ -2516,8 +2689,8 @@ var TruncatedText = ({
2516
2689
  accessibilityHint
2517
2690
  }) => {
2518
2691
  const { width, measureRef, onLayout } = useAvailableWidth();
2519
- const hostRef = React14.useRef(null);
2520
- const attachRef = React14.useCallback(
2692
+ const hostRef = React16.useRef(null);
2693
+ const attachRef = React16.useCallback(
2521
2694
  (node) => {
2522
2695
  hostRef.current = node;
2523
2696
  measureRef(node);
@@ -2526,12 +2699,12 @@ var TruncatedText = ({
2526
2699
  },
2527
2700
  [value, measureRef]
2528
2701
  );
2529
- const flatStyle = React14.useMemo(
2530
- () => reactNative.StyleSheet.flatten([styles21.base, style]),
2702
+ const flatStyle = React16.useMemo(
2703
+ () => reactNative.StyleSheet.flatten([styles23.base, style]),
2531
2704
  [style]
2532
2705
  );
2533
2706
  const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
2534
- const display = React14.useMemo(() => {
2707
+ const display = React16.useMemo(() => {
2535
2708
  const source = isUrl ? formatUrlForDisplay(value) : value;
2536
2709
  const budget = charBudget(width, fontSize);
2537
2710
  return budget === UNMEASURED2 ? source : truncateMiddle(source, budget);
@@ -2542,7 +2715,7 @@ var TruncatedText = ({
2542
2715
  ref: attachRef,
2543
2716
  onLayout,
2544
2717
  numberOfLines: 1,
2545
- style: [styles21.base, styles21.fill, style],
2718
+ style: [styles23.base, styles23.fill, style],
2546
2719
  testID,
2547
2720
  accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
2548
2721
  accessibilityLabel,
@@ -2613,17 +2786,17 @@ async function copyText(value, writer) {
2613
2786
  // src/CopyableId/useCopyToClipboard.ts
2614
2787
  var COPY_FEEDBACK_MS = 2e3;
2615
2788
  function useCopyToClipboard(value, writer) {
2616
- const [status, setStatus] = React14.useState("idle" /* Idle */);
2617
- const timerRef = React14.useRef(null);
2618
- const mountedRef = React14.useRef(true);
2619
- React14.useEffect(() => {
2789
+ const [status, setStatus] = React16.useState("idle" /* Idle */);
2790
+ const timerRef = React16.useRef(null);
2791
+ const mountedRef = React16.useRef(true);
2792
+ React16.useEffect(() => {
2620
2793
  mountedRef.current = true;
2621
2794
  return () => {
2622
2795
  mountedRef.current = false;
2623
2796
  if (timerRef.current !== null) clearTimeout(timerRef.current);
2624
2797
  };
2625
2798
  }, []);
2626
- const copy = React14.useCallback(() => {
2799
+ const copy = React16.useCallback(() => {
2627
2800
  void (async () => {
2628
2801
  const ok = await copyText(value, writer);
2629
2802
  if (!mountedRef.current) return;
@@ -2645,7 +2818,7 @@ var LABEL_LETTER_SPACING = 0.4;
2645
2818
  var ACTION_PADDING_H = 6;
2646
2819
  var ACTION_PADDING_V = 2;
2647
2820
  var ACTION_RADIUS = 6;
2648
- var styles22 = reactNative.StyleSheet.create({
2821
+ var styles24 = reactNative.StyleSheet.create({
2649
2822
  cell: { gap: CELL_GAP },
2650
2823
  label: {
2651
2824
  fontSize: LABEL_FONT_SIZE,
@@ -2687,7 +2860,7 @@ var styles22 = reactNative.StyleSheet.create({
2687
2860
  var TONE_STEP = "500";
2688
2861
  function useActionState(status) {
2689
2862
  const { theme } = uiFeedback.useUi();
2690
- return React14.useMemo(() => {
2863
+ return React16.useMemo(() => {
2691
2864
  const primary = theme.palette.primary[TONE_STEP];
2692
2865
  if (status === "copied" /* Copied */) {
2693
2866
  return { key: LAYOUT_I18N.copied, color: theme.semantic.success?.[TONE_STEP] ?? primary };
@@ -2710,14 +2883,14 @@ var CopyableId = ({
2710
2883
  const { colors } = theme;
2711
2884
  const { status, copy } = useCopyToClipboard(value, writer);
2712
2885
  const action = useActionState(status);
2713
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles22.cell, style], testID, children: [
2714
- label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.label, { color: colors.textSecondary }], children: label }),
2715
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.row, children: [
2716
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.valueWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
2886
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles24.cell, style], testID, children: [
2887
+ label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.label, { color: colors.textSecondary }], children: label }),
2888
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.row, children: [
2889
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.valueWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
2717
2890
  TruncatedText,
2718
2891
  {
2719
2892
  value,
2720
- style: [styles22.value, { color: colors.text }],
2893
+ style: [styles24.value, { color: colors.text }],
2721
2894
  testID: `${testID}-value`,
2722
2895
  accessibilityLabel: accessibilityLabel ?? value,
2723
2896
  accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
@@ -2731,7 +2904,7 @@ var CopyableId = ({
2731
2904
  accessibilityLabel: t(action.key),
2732
2905
  accessibilityHint: t(LAYOUT_I18N.copyHint),
2733
2906
  testID: `${testID}-copy`,
2734
- style: [styles22.action, { color: action.color }],
2907
+ style: [styles24.action, { color: action.color }],
2735
2908
  children: t(action.key)
2736
2909
  }
2737
2910
  )
@@ -2756,15 +2929,15 @@ function formatBuildInfo(buildVersion, apiCommit) {
2756
2929
  return `${base}${API_COMMIT_SEPARATOR}${shortenCommit(commit)}`;
2757
2930
  }
2758
2931
  function useApiCommit(apiBaseUrl, fetchImpl) {
2759
- const [commit, setCommit] = React14.useState(void 0);
2760
- const mountedRef = React14.useRef(true);
2761
- React14.useEffect(() => {
2932
+ const [commit, setCommit] = React16.useState(void 0);
2933
+ const mountedRef = React16.useRef(true);
2934
+ React16.useEffect(() => {
2762
2935
  mountedRef.current = true;
2763
2936
  return () => {
2764
2937
  mountedRef.current = false;
2765
2938
  };
2766
2939
  }, []);
2767
- React14.useEffect(() => {
2940
+ React16.useEffect(() => {
2768
2941
  if (apiBaseUrl === void 0 || apiBaseUrl === "") return;
2769
2942
  const doFetch = fetchImpl ?? (typeof fetch !== "undefined" ? fetch : void 0);
2770
2943
  if (doFetch === void 0) return;
@@ -2786,7 +2959,7 @@ var FOOTER_PADDING_V = 6;
2786
2959
  var FOOTER_PADDING_H = 12;
2787
2960
  var FOOTER_FONT_SIZE = 11;
2788
2961
  var FOOTER_OPACITY = 0.75;
2789
- var styles23 = reactNative.StyleSheet.create({
2962
+ var styles25 = reactNative.StyleSheet.create({
2790
2963
  footer: {
2791
2964
  paddingVertical: FOOTER_PADDING_V,
2792
2965
  paddingHorizontal: FOOTER_PADDING_H,
@@ -2811,8 +2984,8 @@ var BuildInfoFooter = ({
2811
2984
  const fetchedCommit = useApiCommit(apiCommit === void 0 ? apiBaseUrl : void 0, fetchImpl);
2812
2985
  const commit = apiCommit ?? fetchedCommit;
2813
2986
  const label = formatBuildInfo(buildVersion, commit);
2814
- const textStyle = React14.useMemo(
2815
- () => [styles23.text, { color: theme.colors.textSecondary }],
2987
+ const textStyle = React16.useMemo(
2988
+ () => [styles25.text, { color: theme.colors.textSecondary }],
2816
2989
  [theme.colors.textSecondary]
2817
2990
  );
2818
2991
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2820,7 +2993,7 @@ var BuildInfoFooter = ({
2820
2993
  {
2821
2994
  accessibilityLabel: accessibilityLabel ?? label,
2822
2995
  accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
2823
- style: [styles23.footer, style],
2996
+ style: [styles25.footer, style],
2824
2997
  testID,
2825
2998
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, children: label })
2826
2999
  }
@@ -2831,7 +3004,7 @@ var BORDER = 2;
2831
3004
  var GLYPH_SIZE = 14;
2832
3005
  var GLYPH_LINE = 16;
2833
3006
  var TICK = "\u2713";
2834
- var styles24 = reactNative.StyleSheet.create({
3007
+ var styles26 = reactNative.StyleSheet.create({
2835
3008
  circle: {
2836
3009
  width: SIZE,
2837
3010
  height: SIZE,
@@ -2848,14 +3021,14 @@ var CheckMark = ({ filled, accent, ring, glyphColor, testID }) => /* @__PURE__ *
2848
3021
  "aria-hidden": true,
2849
3022
  accessibilityElementsHidden: true,
2850
3023
  importantForAccessibility: "no-hide-descendants",
2851
- style: [styles24.circle, { borderColor: filled ? accent : ring, backgroundColor: filled ? accent : void 0 }],
3024
+ style: [styles26.circle, { borderColor: filled ? accent : ring, backgroundColor: filled ? accent : void 0 }],
2852
3025
  testID,
2853
- children: filled ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.glyph, { color: glyphColor }], children: TICK }) : null
3026
+ children: filled ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles26.glyph, { color: glyphColor }], children: TICK }) : null
2854
3027
  }
2855
3028
  );
2856
- var ListRowToneContext = React14.createContext(null);
3029
+ var ListRowToneContext = React16.createContext(null);
2857
3030
  function useListRowTone() {
2858
- return React14.useContext(ListRowToneContext);
3031
+ return React16.useContext(ListRowToneContext);
2859
3032
  }
2860
3033
  function useRowPalette() {
2861
3034
  const { colors, palette, semantic } = uiFeedback.useUi().theme;
@@ -2973,7 +3146,7 @@ var PAD_V = 12;
2973
3146
  var GAP = 4;
2974
3147
  var MARK_GAP = 12;
2975
3148
  var LINE_GAP = 8;
2976
- var styles25 = reactNative.StyleSheet.create({
3149
+ var styles27 = reactNative.StyleSheet.create({
2977
3150
  row: {
2978
3151
  flexDirection: "row",
2979
3152
  alignItems: "center",
@@ -2997,7 +3170,7 @@ function focusTarget(event) {
2997
3170
  }
2998
3171
  function slot(node, color, strong) {
2999
3172
  if (typeof node !== "string") return node;
3000
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.shrink, strong ? styles25.strong : null, { color }], children: node });
3173
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.shrink, strong ? styles27.strong : null, { color }], children: node });
3001
3174
  }
3002
3175
  var ListRow = ({
3003
3176
  title,
@@ -3014,9 +3187,9 @@ var ListRow = ({
3014
3187
  }) => {
3015
3188
  const palette = useRowPalette();
3016
3189
  const { colors } = uiFeedback.useUi().theme;
3017
- const [focused, setFocused] = React14.useState(false);
3190
+ const [focused, setFocused] = React16.useState(false);
3018
3191
  const rest = resolveRowLook(selectedStyle, { selected, hovered: false, pressed: false, focused }, palette);
3019
- const tone = React14.useMemo(() => ({ textColor: rest.textColor, inverse: rest.inverse }), [rest.textColor, rest.inverse]);
3192
+ const tone = React16.useMemo(() => ({ textColor: rest.textColor, inverse: rest.inverse }), [rest.textColor, rest.inverse]);
3020
3193
  const checkTestId = testID === void 0 ? void 0 : `${testID}-check`;
3021
3194
  return /* @__PURE__ */ jsxRuntime.jsxs(ListRowToneContext.Provider, { value: tone, children: [
3022
3195
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3029,7 +3202,7 @@ var ListRow = ({
3029
3202
  style: (state) => {
3030
3203
  const { pressed, hovered } = state;
3031
3204
  const look = resolveRowLook(selectedStyle, { selected, pressed, focused, hovered: hovered === true }, palette);
3032
- return [styles25.row, { borderTopColor: colors.border }, look.container];
3205
+ return [styles27.row, { borderTopColor: colors.border }, look.container];
3033
3206
  },
3034
3207
  testID,
3035
3208
  onBlur: () => {
@@ -3042,14 +3215,14 @@ var ListRow = ({
3042
3215
  ...pressedProps(selected),
3043
3216
  children: [
3044
3217
  rest.showCheck ? /* @__PURE__ */ jsxRuntime.jsx(CheckMark, { accent: palette.accent, filled: rest.checkFilled, glyphColor: palette.background, ring: palette.border, testID: checkTestId }) : null,
3045
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.body, children: [
3046
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.line, children: [
3218
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.body, children: [
3219
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.line, children: [
3047
3220
  slot(title, rest.titleColor, true),
3048
3221
  slot(trailing, rest.textColor, true)
3049
3222
  ] }),
3050
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.line, children: [
3051
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.shrink, children: slot(meta, rest.textColor, false) }),
3052
- badges === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.badges, children: badges })
3223
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.line, children: [
3224
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.shrink, children: slot(meta, rest.textColor, false) }),
3225
+ badges === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.badges, children: badges })
3053
3226
  ] })
3054
3227
  ] })
3055
3228
  ]
@@ -3065,12 +3238,15 @@ exports.Accordion = Accordion;
3065
3238
  exports.AccordionItem = AccordionItem;
3066
3239
  exports.AppText = AppText;
3067
3240
  exports.BUILD_INFO_PREFIX = BUILD_INFO_PREFIX;
3241
+ exports.BadgeTone = BadgeTone;
3068
3242
  exports.BottomSheet = BottomSheet;
3069
3243
  exports.BuildInfoFooter = BuildInfoFooter;
3070
3244
  exports.COPY_FEEDBACK_MS = COPY_FEEDBACK_MS;
3071
3245
  exports.ConfirmDialog = ConfirmDialog;
3246
+ exports.ConfirmDialogFocus = ConfirmDialogFocus;
3072
3247
  exports.CopyStatus = CopyStatus;
3073
3248
  exports.CopyableId = CopyableId;
3249
+ exports.CountBadge = CountBadge;
3074
3250
  exports.DEFAULT_BILLING_ROUTE = DEFAULT_BILLING_ROUTE;
3075
3251
  exports.DropdownVariant = DropdownVariant;
3076
3252
  exports.ELLIPSIS = ELLIPSIS;
@@ -3094,6 +3270,8 @@ exports.SectionVariant = SectionVariant;
3094
3270
  exports.SegmentedControl = SegmentedControl;
3095
3271
  exports.SelectedMarker = SelectedMarker;
3096
3272
  exports.SideSheet = SideSheet;
3273
+ exports.SplitLayout = SplitLayout;
3274
+ exports.SplitPanes = SplitPanes;
3097
3275
  exports.StatusBadge = StatusBadge;
3098
3276
  exports.StickyPreview = StickyPreview;
3099
3277
  exports.TYPE_SCALE_BREAKPOINT = TYPE_SCALE_BREAKPOINT;
@@ -3104,12 +3282,15 @@ exports.TruncatedText = TruncatedText;
3104
3282
  exports.UpgradePrompt = UpgradePrompt;
3105
3283
  exports.copyText = copyText;
3106
3284
  exports.formatBuildInfo = formatBuildInfo;
3285
+ exports.formatCount = formatCount;
3107
3286
  exports.formatUrlForDisplay = formatUrlForDisplay;
3108
3287
  exports.isKeyboardOpen = isKeyboardOpen;
3109
3288
  exports.isModalFooterStacked = isModalFooterStacked;
3289
+ exports.isSplitSideBySide = isSplitSideBySide;
3110
3290
  exports.isWideWebViewport = isWideWebViewport;
3111
3291
  exports.pageScale = pageScale;
3112
3292
  exports.resolveRowLook = resolveRowLook;
3293
+ exports.resolveToneColors = resolveToneColors;
3113
3294
  exports.scaledFrame = scaledFrame;
3114
3295
  exports.shortenCommit = shortenCommit;
3115
3296
  exports.trimTrailingSlash = trimTrailingSlash;