@dloizides/ui-layout 1.29.0 → 1.30.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.mjs CHANGED
@@ -380,12 +380,40 @@ function isAnchorHidden(rect, clip, minVisiblePx) {
380
380
  const visibleWidth = Math.min(rect.left + rect.width, clip.right) - Math.max(rect.left, clip.left);
381
381
  return visibleHeight < minVisiblePx || visibleWidth < minVisiblePx;
382
382
  }
383
+ var HEADING_FONT_SIZE = 12;
384
+ var HEADING_FONT_WEIGHT = "600";
385
+ var HEADING_PADDING_H = 16;
386
+ var HEADING_PADDING_TOP = 8;
387
+ var HEADING_PADDING_BOTTOM = 4;
388
+ var HEADING_LETTER_SPACING = 0.5;
389
+ var styles5 = StyleSheet.create({
390
+ heading: {
391
+ fontSize: HEADING_FONT_SIZE,
392
+ fontWeight: HEADING_FONT_WEIGHT,
393
+ letterSpacing: HEADING_LETTER_SPACING,
394
+ paddingHorizontal: HEADING_PADDING_H,
395
+ paddingTop: HEADING_PADDING_TOP,
396
+ paddingBottom: HEADING_PADDING_BOTTOM
397
+ }
398
+ });
399
+ var MenuHeading = ({ testID, text }) => {
400
+ const { theme } = useUi();
401
+ return /* @__PURE__ */ jsx(
402
+ Text,
403
+ {
404
+ accessibilityRole: "header",
405
+ style: [styles5.heading, { color: theme.colors.textSecondary }],
406
+ testID: `${testID}-menu-heading`,
407
+ children: text
408
+ }
409
+ );
410
+ };
383
411
  var OPTION_BORDER_RADIUS = 4;
384
412
  var BODY_FONT_SIZE = 14;
385
413
  var SELECTED_FONT_WEIGHT = "600";
386
414
  var OPTION_PADDING_H = 16;
387
415
  var OPTION_PADDING_V = 12;
388
- var styles5 = StyleSheet.create({
416
+ var styles6 = StyleSheet.create({
389
417
  option: {
390
418
  paddingHorizontal: OPTION_PADDING_H,
391
419
  paddingVertical: OPTION_PADDING_V,
@@ -409,8 +437,8 @@ var OptionRow = ({
409
437
  onSelect();
410
438
  }, [onSelect]);
411
439
  const isActive = isSelected || isHighlighted;
412
- const rowStyle = [styles5.option, isActive ? { backgroundColor: colors.surfaceElevated } : null];
413
- const textStyle = [styles5.optionText, { color: colors.text }, isSelected ? styles5.selectedText : null];
440
+ const rowStyle = [styles6.option, isActive ? { backgroundColor: colors.surfaceElevated } : null];
441
+ const textStyle = [styles6.optionText, { color: colors.text }, isSelected ? styles6.selectedText : null];
414
442
  return /* @__PURE__ */ jsx(
415
443
  TouchableOpacity,
416
444
  {
@@ -579,7 +607,7 @@ var IS_WEB2 = Platform.OS === "web";
579
607
  var BORDER_RADIUS2 = 8;
580
608
  var BORDER_WIDTH3 = 1;
581
609
  var MENU_PADDING2 = 4;
582
- var styles6 = StyleSheet.create({
610
+ var styles7 = StyleSheet.create({
583
611
  /** Native (in-tree) popover — anchored absolutely just under the trigger. */
584
612
  popover: {
585
613
  position: "absolute",
@@ -614,6 +642,7 @@ var InlineMenu = ({
614
642
  isOpen,
615
643
  optionTestID,
616
644
  menuMinWidth = 0,
645
+ menuHeading,
617
646
  animatedStyle,
618
647
  onSelect,
619
648
  onClose
@@ -664,7 +693,7 @@ var InlineMenu = ({
664
693
  themed
665
694
  ];
666
695
  }
667
- return [styles6.popover, { minWidth: menuMinWidth }, themed];
696
+ return [styles7.popover, { minWidth: menuMinWidth }, themed];
668
697
  }, [colors.border, colors.surface, menuMinWidth, rect]);
669
698
  const menu = /* @__PURE__ */ jsx(
670
699
  View,
@@ -672,25 +701,28 @@ var InlineMenu = ({
672
701
  ref: menuRef,
673
702
  accessibilityRole: "menu",
674
703
  "aria-hidden": !isOpen,
675
- "aria-label": accessibilityLabel,
704
+ "aria-label": menuHeading ?? accessibilityLabel,
676
705
  style: popoverStyle,
677
706
  testID: `${testID}-menu`,
678
- children: /* @__PURE__ */ jsx(
707
+ children: /* @__PURE__ */ jsxs(
679
708
  Animated.View,
680
709
  {
681
710
  pointerEvents: isOpen ? "auto" : "none",
682
- style: [styles6.animated, animatedStyle, isOpen ? null : styles6.inert],
683
- children: /* @__PURE__ */ jsx(ScrollView, { style: styles6.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsx(
684
- OptionRow,
685
- {
686
- isHighlighted: index === highlightedIndex,
687
- isSelected: option.value === value,
688
- label: option.label,
689
- testID: optionTestID !== void 0 ? optionTestID(option.value) : `${testID}-option-${String(option.value)}`,
690
- onSelect: () => handleSelect(option.value)
691
- },
692
- String(option.value)
693
- )) })
711
+ style: [styles7.animated, animatedStyle, isOpen ? null : styles7.inert],
712
+ children: [
713
+ menuHeading !== void 0 ? /* @__PURE__ */ jsx(MenuHeading, { testID, text: menuHeading }) : null,
714
+ /* @__PURE__ */ jsx(ScrollView, { style: styles7.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsx(
715
+ OptionRow,
716
+ {
717
+ isHighlighted: index === highlightedIndex,
718
+ isSelected: option.value === value,
719
+ label: option.label,
720
+ testID: optionTestID !== void 0 ? optionTestID(option.value) : `${testID}-option-${String(option.value)}`,
721
+ onSelect: () => handleSelect(option.value)
722
+ },
723
+ String(option.value)
724
+ )) })
725
+ ]
694
726
  }
695
727
  )
696
728
  }
@@ -733,7 +765,7 @@ var CARET_OPEN_ROTATION = "180deg";
733
765
  var CARET_CLOSED_ROTATION = "0deg";
734
766
  var POPOVER_ENTER_SCALE = 0.96;
735
767
  var POPOVER_MOTION_MS = 120;
736
- var styles7 = StyleSheet.create({
768
+ var styles8 = StyleSheet.create({
737
769
  anchor: { position: "relative" },
738
770
  container: {
739
771
  borderWidth: BORDER_WIDTH4,
@@ -795,7 +827,8 @@ var ModalDropdown = ({
795
827
  optionTestID,
796
828
  menuMinWidth,
797
829
  showCaret = false,
798
- showHamburger = false
830
+ showHamburger = false,
831
+ menuHeading
799
832
  }) => {
800
833
  const { theme, t } = useUi();
801
834
  const { colors } = theme;
@@ -843,19 +876,19 @@ var ModalDropdown = ({
843
876
  const isCaret = showCaret && !isHamburger;
844
877
  const containerStyle = useMemo(
845
878
  () => renderTrigger !== void 0 ? void 0 : [
846
- styles7.container,
847
- isHamburger ? styles7.containerHamburger : isCaret ? styles7.containerMenu : null,
879
+ styles8.container,
880
+ isHamburger ? styles8.containerHamburger : isCaret ? styles8.containerMenu : null,
848
881
  { borderColor: colors.border, backgroundColor: colors.surface }
849
882
  ],
850
883
  [colors.border, colors.surface, renderTrigger, isHamburger, isCaret]
851
884
  );
852
885
  const hamburgerStyle = useMemo(
853
- () => [styles7.hamburger, { color: colors.textSecondary }],
886
+ () => [styles8.hamburger, { color: colors.textSecondary }],
854
887
  [colors.textSecondary]
855
888
  );
856
889
  const caretStyle = useMemo(
857
890
  () => [
858
- styles7.caret,
891
+ styles8.caret,
859
892
  { color: colors.textSecondary, transform: [{ rotate: isOpen ? CARET_OPEN_ROTATION : CARET_CLOSED_ROTATION }] }
860
893
  ],
861
894
  [colors.textSecondary, isOpen]
@@ -865,11 +898,11 @@ var ModalDropdown = ({
865
898
  [optionTestID, testID]
866
899
  );
867
900
  const anchorStyle = useMemo(
868
- () => [styles7.anchor, buildAnchorStackStyle(isMenu && isOpen)],
901
+ () => [styles8.anchor, buildAnchorStackStyle(isMenu && isOpen)],
869
902
  [isMenu, isOpen]
870
903
  );
871
904
  const modalContentStyle = useMemo(
872
- () => [styles7.modalContent, { backgroundColor: colors.surface }],
905
+ () => [styles8.modalContent, { backgroundColor: colors.surface }],
873
906
  [colors.surface]
874
907
  );
875
908
  const renderModalOption = useCallback(
@@ -889,11 +922,11 @@ var ModalDropdown = ({
889
922
  /* @__PURE__ */ jsxs(TouchableOpacity, { ...a11yProps, style: containerStyle, onPress: handleToggle, children: [
890
923
  renderTrigger !== void 0 ? renderTrigger({ label: selectedLabel, isOpen }) : isHamburger ? /* @__PURE__ */ jsxs(Fragment, { children: [
891
924
  /* @__PURE__ */ jsx(Text, { style: hamburgerStyle, children: HAMBURGER_GLYPH }),
892
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles7.selectedText, styles7.selectedTextMenu, { color: colors.text }], children: selectedLabel })
925
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles8.selectedText, styles8.selectedTextMenu, { color: colors.text }], children: selectedLabel })
893
926
  ] }) : isCaret ? /* @__PURE__ */ jsxs(Fragment, { children: [
894
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles7.selectedText, styles7.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
927
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles8.selectedText, styles8.selectedTextMenu, { color: colors.text }], children: selectedLabel }),
895
928
  /* @__PURE__ */ jsx(Text, { style: caretStyle, children: CARET_GLYPH })
896
- ] }) : /* @__PURE__ */ jsx(Text, { style: [styles7.selectedText, { color: colors.text }], children: selectedLabel }),
929
+ ] }) : /* @__PURE__ */ jsx(Text, { style: [styles8.selectedText, { color: colors.text }], children: selectedLabel }),
897
930
  hintNode
898
931
  ] }),
899
932
  isMenu && menuAnim.mounted ? /* @__PURE__ */ jsx(
@@ -903,6 +936,7 @@ var ModalDropdown = ({
903
936
  animatedStyle: menuAnim.style,
904
937
  containerRef: anchorRef,
905
938
  isOpen,
939
+ menuHeading,
906
940
  menuMinWidth,
907
941
  optionTestID: optionTestIDFor,
908
942
  options,
@@ -912,7 +946,7 @@ var ModalDropdown = ({
912
946
  onSelect: handleSelect
913
947
  }
914
948
  ) : null,
915
- !isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style: styles7.modalOverlay, children: [
949
+ !isMenu ? /* @__PURE__ */ jsx(Modal, { transparent: true, visible: modalAnim.mounted, onRequestClose: handleClose, children: /* @__PURE__ */ jsxs(View, { style: styles8.modalOverlay, children: [
916
950
  /* @__PURE__ */ jsx(
917
951
  TouchableOpacity,
918
952
  {
@@ -931,10 +965,18 @@ var ModalDropdown = ({
931
965
  {
932
966
  ref: dialogRef,
933
967
  accessibilityViewIsModal: true,
934
- "aria-label": accessibilityLabel,
968
+ "aria-label": menuHeading ?? accessibilityLabel,
935
969
  role: "dialog",
936
970
  style: [modalContentStyle, modalAnim.style],
937
- children: /* @__PURE__ */ jsx(FlatList, { data: [...options], keyExtractor, renderItem: renderModalOption })
971
+ children: /* @__PURE__ */ jsx(
972
+ FlatList,
973
+ {
974
+ data: [...options],
975
+ keyExtractor,
976
+ ListHeaderComponent: menuHeading !== void 0 ? /* @__PURE__ */ jsx(MenuHeading, { testID, text: menuHeading }) : null,
977
+ renderItem: renderModalOption
978
+ }
979
+ )
938
980
  }
939
981
  )
940
982
  ] }) }) : null
@@ -997,7 +1039,7 @@ var ROW_PAD_V = 8;
997
1039
  var PANEL_PAD_TOP = 16;
998
1040
  var BORDER_WIDTH5 = 1;
999
1041
  var TEXT_ON_PRIMARY = "#ffffff";
1000
- var styles8 = StyleSheet.create({
1042
+ var styles9 = StyleSheet.create({
1001
1043
  root: {
1002
1044
  width: "100%"
1003
1045
  },
@@ -1051,7 +1093,7 @@ var WideTabStrip = ({
1051
1093
  textSecondary,
1052
1094
  surfaceElevated,
1053
1095
  stripStyle
1054
- }) => /* @__PURE__ */ jsx(View, { style: [styles8.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles8.strip, stripStyle], children: tabs.map((tab) => {
1096
+ }) => /* @__PURE__ */ jsx(View, { style: [styles9.stripOuter, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(View, { accessibilityRole: "tablist", "aria-label": accessibilityLabel, style: [styles9.strip, stripStyle], children: tabs.map((tab) => {
1055
1097
  const selected = tab.key === activeKey;
1056
1098
  const textColor = selected ? TEXT_ON_PRIMARY : textSecondary;
1057
1099
  const pillColor = selected ? primaryColor : surfaceElevated;
@@ -1065,10 +1107,10 @@ var WideTabStrip = ({
1065
1107
  accessibilityLabel: tab.accessibilityLabel ?? tab.label,
1066
1108
  accessibilityHint: tab.accessibilityHint,
1067
1109
  onPress: () => onChange(tab.key),
1068
- style: [styles8.pill, { backgroundColor: pillColor }],
1110
+ style: [styles9.pill, { backgroundColor: pillColor }],
1069
1111
  testID: tab.testID,
1070
1112
  ...ariaTabProps(selected, panelId, tabId),
1071
- children: /* @__PURE__ */ jsx(Text, { style: [styles8.pillText, { color: textColor }], children: tab.label })
1113
+ children: /* @__PURE__ */ jsx(Text, { style: [styles9.pillText, { color: textColor }], children: tab.label })
1072
1114
  },
1073
1115
  tab.key
1074
1116
  );
@@ -1093,7 +1135,7 @@ var Tabs = ({
1093
1135
  const activePanelId = `${idPrefix}-panel-${activeKey}`;
1094
1136
  const activeTabId = `${idPrefix}-tab-${activeKey}`;
1095
1137
  const panelAria = { "aria-labelledby": activeTabId, id: activePanelId };
1096
- return /* @__PURE__ */ jsxs(View, { style: [styles8.root, style], testID, children: [
1138
+ return /* @__PURE__ */ jsxs(View, { style: [styles9.root, style], testID, children: [
1097
1139
  collapsed ? /* @__PURE__ */ jsx(
1098
1140
  TabsMenu,
1099
1141
  {
@@ -1120,7 +1162,7 @@ var Tabs = ({
1120
1162
  onChange
1121
1163
  }
1122
1164
  ),
1123
- /* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles8.panel, panelStyle], ...panelAria, children })
1165
+ /* @__PURE__ */ jsx(View, { accessibilityRole: "none", style: [styles9.panel, panelStyle], ...panelAria, children })
1124
1166
  ] });
1125
1167
  };
1126
1168
  var PROMPT_PADDING = 20;
@@ -1135,7 +1177,7 @@ var DISMISS_FONT_SIZE = 13;
1135
1177
  var TITLE_MARGIN_BOTTOM = 8;
1136
1178
  var MESSAGE_MARGIN_BOTTOM = 16;
1137
1179
  var CTA_MARGIN_BOTTOM = 8;
1138
- var styles9 = StyleSheet.create({
1180
+ var styles10 = StyleSheet.create({
1139
1181
  container: {
1140
1182
  padding: PROMPT_PADDING,
1141
1183
  borderRadius: PROMPT_BORDER_RADIUS,
@@ -1170,21 +1212,21 @@ var UpgradePrompt = ({
1170
1212
  return /* @__PURE__ */ jsxs(
1171
1213
  View,
1172
1214
  {
1173
- style: [styles9.container, { borderColor: primary, backgroundColor: colors.surface }],
1215
+ style: [styles10.container, { borderColor: primary, backgroundColor: colors.surface }],
1174
1216
  testID: LAYOUT_TEST_IDS.upgradePrompt,
1175
1217
  children: [
1176
- /* @__PURE__ */ jsx(Text, { style: [styles9.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
1177
- /* @__PURE__ */ jsx(Text, { style: [styles9.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
1218
+ /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: colors.text }], children: t(LAYOUT_I18N.upgradePromptTitle) }),
1219
+ /* @__PURE__ */ jsx(Text, { style: [styles10.message, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptMessage, requiredTier, currentTier) }),
1178
1220
  /* @__PURE__ */ jsx(
1179
1221
  TouchableOpacity,
1180
1222
  {
1181
1223
  accessibilityHint: t(LAYOUT_I18N.upgradePromptCtaHint),
1182
1224
  accessibilityLabel: t(LAYOUT_I18N.upgradePromptCta),
1183
1225
  accessibilityRole: "button",
1184
- style: [styles9.cta, { backgroundColor: primary }],
1226
+ style: [styles10.cta, { backgroundColor: primary }],
1185
1227
  testID: LAYOUT_TEST_IDS.upgradePromptCta,
1186
1228
  onPress: handleUpgradePress,
1187
- children: /* @__PURE__ */ jsx(Text, { style: [styles9.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
1229
+ children: /* @__PURE__ */ jsx(Text, { style: [styles10.ctaText, { color: colors.surface }], children: t(LAYOUT_I18N.upgradePromptCta) })
1188
1230
  }
1189
1231
  ),
1190
1232
  onDismiss ? /* @__PURE__ */ jsx(
@@ -1193,10 +1235,10 @@ var UpgradePrompt = ({
1193
1235
  accessibilityHint: t(LAYOUT_I18N.upgradePromptDismissHint),
1194
1236
  accessibilityLabel: t(LAYOUT_I18N.upgradePromptDismiss),
1195
1237
  accessibilityRole: "button",
1196
- style: styles9.dismiss,
1238
+ style: styles10.dismiss,
1197
1239
  testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
1198
1240
  onPress: onDismiss,
1199
- children: /* @__PURE__ */ jsx(Text, { style: [styles9.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
1241
+ children: /* @__PURE__ */ jsx(Text, { style: [styles10.dismissText, { color: colors.textSecondary }], children: t(LAYOUT_I18N.upgradePromptDismiss) })
1200
1242
  }
1201
1243
  ) : null
1202
1244
  ]
@@ -1205,7 +1247,7 @@ var UpgradePrompt = ({
1205
1247
  };
1206
1248
  var CLOSE_ICON_SIZE = 18;
1207
1249
  var PANEL_ENTER_SCALE = 0.96;
1208
- var styles10 = StyleSheet.create({
1250
+ var styles11 = StyleSheet.create({
1209
1251
  animatedFill: { flex: 1 },
1210
1252
  container: {
1211
1253
  flex: 1,
@@ -1232,7 +1274,7 @@ var ModalShell = ({
1232
1274
  const { theme, t } = useUi();
1233
1275
  const { style: sheetStyle, mounted } = useEnterExit({ visible, fromScale: PANEL_ENTER_SCALE });
1234
1276
  const containerStyle = React10.useMemo(
1235
- () => [styles10.container, { backgroundColor: theme.colors.background }, contentStyle],
1277
+ () => [styles11.container, { backgroundColor: theme.colors.background }, contentStyle],
1236
1278
  [theme.colors.background, contentStyle]
1237
1279
  );
1238
1280
  const closeA11yLabel = t(LAYOUT_I18N.close);
@@ -1244,7 +1286,7 @@ var ModalShell = ({
1244
1286
  testID: LAYOUT_TEST_IDS.modalShell,
1245
1287
  visible: mounted,
1246
1288
  onRequestClose: onCancel,
1247
- children: /* @__PURE__ */ jsx(Animated.View, { style: [styles10.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxs(
1289
+ children: /* @__PURE__ */ jsx(Animated.View, { style: [styles11.animatedFill, sheetStyle], children: /* @__PURE__ */ jsxs(
1248
1290
  ScrollView,
1249
1291
  {
1250
1292
  accessibilityViewIsModal: true,
@@ -1252,7 +1294,7 @@ var ModalShell = ({
1252
1294
  role: "dialog",
1253
1295
  style: containerStyle,
1254
1296
  children: [
1255
- /* @__PURE__ */ jsxs(View, { style: styles10.headerRow, children: [
1297
+ /* @__PURE__ */ jsxs(View, { style: styles11.headerRow, children: [
1256
1298
  /* @__PURE__ */ jsx(Heading, { children: title ?? t(LAYOUT_I18N.closeHeading) }),
1257
1299
  showClose ? /* @__PURE__ */ jsx(
1258
1300
  TouchableOpacity,
@@ -1260,7 +1302,7 @@ var ModalShell = ({
1260
1302
  accessibilityHint: t(LAYOUT_I18N.closeDialogHint),
1261
1303
  accessibilityLabel: closeA11yLabel,
1262
1304
  accessibilityRole: "button",
1263
- style: styles10.closeButton,
1305
+ style: styles11.closeButton,
1264
1306
  testID: LAYOUT_TEST_IDS.modalShellClose,
1265
1307
  onPress: onCancel,
1266
1308
  children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
@@ -1306,7 +1348,7 @@ var HEADER_MARGIN = 12;
1306
1348
  var DIALOG_MAX_HEIGHT = "90%";
1307
1349
  var PANEL_ENTER_SCALE2 = 0.96;
1308
1350
  var SIZE_MAX_WIDTH = { sm: 360, md: 480, lg: 640 };
1309
- var styles11 = StyleSheet.create({
1351
+ var styles12 = StyleSheet.create({
1310
1352
  overlay: {
1311
1353
  flex: 1,
1312
1354
  justifyContent: "center",
@@ -1358,15 +1400,15 @@ var Modal3 = ({
1358
1400
  const accessibleName = accessibilityLabel ?? title ?? t(LAYOUT_I18N.dialog);
1359
1401
  const closeLabel = t(LAYOUT_I18N.dialogClose);
1360
1402
  const dialogStyle = useMemo(
1361
- () => [styles11.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
1403
+ () => [styles12.dialog, { backgroundColor: theme.colors.surface, maxWidth: SIZE_MAX_WIDTH[size] }],
1362
1404
  [theme.colors.surface, size]
1363
1405
  );
1364
1406
  const hasHeader = title !== void 0 || showClose;
1365
- return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style: styles11.overlay, children: [
1407
+ return /* @__PURE__ */ jsx(Modal, { transparent: true, visible: mounted, onRequestClose: onClose, children: /* @__PURE__ */ jsxs(View, { style: styles12.overlay, children: [
1366
1408
  /* @__PURE__ */ jsx(
1367
1409
  Animated.View,
1368
1410
  {
1369
- style: [StyleSheet.absoluteFill, styles11.scrim, { opacity: backdrop.style.opacity }]
1411
+ style: [StyleSheet.absoluteFill, styles12.scrim, { opacity: backdrop.style.opacity }]
1370
1412
  }
1371
1413
  ),
1372
1414
  /* @__PURE__ */ jsx(
@@ -1392,8 +1434,8 @@ var Modal3 = ({
1392
1434
  style: [dialogStyle, panel.style],
1393
1435
  testID,
1394
1436
  children: [
1395
- hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles11.headerRow, children: [
1396
- /* @__PURE__ */ jsx(View, { style: styles11.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsx(Heading, { children: title }) : null }),
1437
+ hasHeader ? /* @__PURE__ */ jsxs(View, { style: styles12.headerRow, children: [
1438
+ /* @__PURE__ */ jsx(View, { style: styles12.titleWrap, children: title !== void 0 ? /* @__PURE__ */ jsx(Heading, { children: title }) : null }),
1397
1439
  showClose ? /* @__PURE__ */ jsx(
1398
1440
  IconButton,
1399
1441
  {
@@ -1410,7 +1452,7 @@ var Modal3 = ({
1410
1452
  ) : null
1411
1453
  ] }) : null,
1412
1454
  /* @__PURE__ */ jsx(ScrollView, { children }),
1413
- footer !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles11.footer, children: footer }) : null
1455
+ footer !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles12.footer, children: footer }) : null
1414
1456
  ]
1415
1457
  }
1416
1458
  )
@@ -1419,7 +1461,7 @@ var Modal3 = ({
1419
1461
  var MESSAGE_FONT_SIZE2 = 14;
1420
1462
  var MESSAGE_LINE_HEIGHT = 20;
1421
1463
  var BUTTON_GAP = 12;
1422
- var styles12 = StyleSheet.create({
1464
+ var styles13 = StyleSheet.create({
1423
1465
  message: { fontSize: MESSAGE_FONT_SIZE2, lineHeight: MESSAGE_LINE_HEIGHT },
1424
1466
  footer: { flexDirection: "row", justifyContent: "flex-end", columnGap: BUTTON_GAP }
1425
1467
  });
@@ -1438,7 +1480,7 @@ var ConfirmDialog = ({
1438
1480
  const { theme, t } = useUi();
1439
1481
  const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
1440
1482
  const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
1441
- const footer = /* @__PURE__ */ jsxs(View, { style: styles12.footer, children: [
1483
+ const footer = /* @__PURE__ */ jsxs(View, { style: styles13.footer, children: [
1442
1484
  /* @__PURE__ */ jsx(
1443
1485
  Button,
1444
1486
  {
@@ -1474,7 +1516,7 @@ var ConfirmDialog = ({
1474
1516
  title,
1475
1517
  visible,
1476
1518
  onClose: onCancel,
1477
- children: /* @__PURE__ */ jsx(Text, { style: [styles12.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
1519
+ children: /* @__PURE__ */ jsx(Text, { style: [styles13.message, { color: theme.colors.text }], testID: `${testID}-message`, children: message })
1478
1520
  }
1479
1521
  );
1480
1522
  };
@@ -1487,7 +1529,7 @@ function useAccordionContext() {
1487
1529
  return value;
1488
1530
  }
1489
1531
  var BOXED_GAP = 12;
1490
- var styles13 = StyleSheet.create({
1532
+ var styles14 = StyleSheet.create({
1491
1533
  container: { alignSelf: "stretch" },
1492
1534
  boxed: { gap: BOXED_GAP }
1493
1535
  });
@@ -1544,7 +1586,7 @@ var Accordion = ({
1544
1586
  [openSet, toggle, allowMultiple, variant]
1545
1587
  );
1546
1588
  const containerStyle = useMemo(() => {
1547
- const base = variant === "boxed" ? [styles13.container, styles13.boxed] : [styles13.container];
1589
+ const base = variant === "boxed" ? [styles14.container, styles14.boxed] : [styles14.container];
1548
1590
  if (style === void 0) return base;
1549
1591
  return [...base, ...Array.isArray(style) ? style : [style]];
1550
1592
  }, [style, variant]);
@@ -1576,7 +1618,7 @@ var BOX_TITLE_FONT_SIZE = 14;
1576
1618
  var BOX_MARKER_FONT_SIZE = 13;
1577
1619
  var BOX_MARKER_GAP = 6;
1578
1620
  var BOX_MARKER = "\u25B8";
1579
- var styles14 = StyleSheet.create({
1621
+ var styles15 = StyleSheet.create({
1580
1622
  item: { borderTopWidth: StyleSheet.hairlineWidth },
1581
1623
  boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
1582
1624
  header: {
@@ -1652,19 +1694,19 @@ var AccordionItem = ({
1652
1694
  );
1653
1695
  const keyboardProps = Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
1654
1696
  const itemStyle = useMemo(
1655
- () => boxed ? [styles14.boxItem, { borderColor: colors.border }] : [styles14.item, { borderTopColor: colors.border }],
1697
+ () => boxed ? [styles15.boxItem, { borderColor: colors.border }] : [styles15.item, { borderTopColor: colors.border }],
1656
1698
  [boxed, colors.border]
1657
1699
  );
1658
1700
  const headerStyle = useMemo(
1659
1701
  () => [
1660
- styles14.header,
1661
- ...boxed ? [styles14.boxHeader] : [],
1702
+ styles15.header,
1703
+ ...boxed ? [styles15.boxHeader] : [],
1662
1704
  { opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
1663
1705
  ],
1664
1706
  [boxed, disabled]
1665
1707
  );
1666
1708
  const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
1667
- const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles14.boxTitle : styles14.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
1709
+ const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles15.boxTitle : styles15.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
1668
1710
  return /* @__PURE__ */ jsxs(View, { style: itemStyle, children: [
1669
1711
  /* @__PURE__ */ jsxs(
1670
1712
  Pressable,
@@ -1681,7 +1723,7 @@ var AccordionItem = ({
1681
1723
  onPress: handlePress,
1682
1724
  ...keyboardProps,
1683
1725
  children: [
1684
- /* @__PURE__ */ jsxs(View, { style: [styles14.headerLeft, boxed ? styles14.headerLeftRow : null], children: [
1726
+ /* @__PURE__ */ jsxs(View, { style: [styles15.headerLeft, boxed ? styles15.headerLeftRow : null], children: [
1685
1727
  boxed ? (
1686
1728
  // Decorative — the open/closed state is already conveyed by aria-expanded on the header.
1687
1729
  /* @__PURE__ */ jsx(
@@ -1690,15 +1732,15 @@ var AccordionItem = ({
1690
1732
  accessibilityElementsHidden: true,
1691
1733
  "aria-hidden": true,
1692
1734
  importantForAccessibility: "no-hide-descendants",
1693
- style: [styles14.marker, { transform: [{ rotate }] }],
1735
+ style: [styles15.marker, { transform: [{ rotate }] }],
1694
1736
  testID: chevronTestID,
1695
- children: /* @__PURE__ */ jsx(Text, { style: [styles14.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
1737
+ children: /* @__PURE__ */ jsx(Text, { style: [styles15.markerText, { color: colors.textSecondary }], children: BOX_MARKER })
1696
1738
  }
1697
1739
  )
1698
1740
  ) : null,
1699
1741
  titleNode
1700
1742
  ] }),
1701
- /* @__PURE__ */ jsxs(View, { style: styles14.headerRight, children: [
1743
+ /* @__PURE__ */ jsxs(View, { style: styles15.headerRight, children: [
1702
1744
  right,
1703
1745
  boxed ? null : /* @__PURE__ */ jsx(
1704
1746
  Animated.View,
@@ -1706,7 +1748,7 @@ var AccordionItem = ({
1706
1748
  accessibilityElementsHidden: true,
1707
1749
  "aria-hidden": true,
1708
1750
  importantForAccessibility: "no-hide-descendants",
1709
- style: [styles14.chevron, { transform: [{ rotate }] }],
1751
+ style: [styles15.chevron, { transform: [{ rotate }] }],
1710
1752
  children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID })
1711
1753
  }
1712
1754
  )
@@ -1720,7 +1762,7 @@ var AccordionItem = ({
1720
1762
  accessibilityLabel: resolvedLabel,
1721
1763
  nativeID: bodyTestID,
1722
1764
  role: ROLE_REGION,
1723
- style: boxed ? styles14.boxBody : styles14.body,
1765
+ style: boxed ? styles15.boxBody : styles15.body,
1724
1766
  testID: bodyTestID,
1725
1767
  children
1726
1768
  }
@@ -1783,7 +1825,7 @@ function useAvailableWidth() {
1783
1825
  var AVG_CHAR_WIDTH_RATIO = 0.58;
1784
1826
  var DEFAULT_FONT_SIZE2 = 13;
1785
1827
  var UNMEASURED2 = 0;
1786
- var styles15 = StyleSheet.create({
1828
+ var styles16 = StyleSheet.create({
1787
1829
  base: { fontSize: DEFAULT_FONT_SIZE2 },
1788
1830
  /** `minWidth: 0` lets the text shrink inside a flex row instead of forcing the row wider. */
1789
1831
  fill: { flexShrink: 1, minWidth: 0 }
@@ -1814,7 +1856,7 @@ var TruncatedText = ({
1814
1856
  [value, measureRef]
1815
1857
  );
1816
1858
  const flatStyle = useMemo(
1817
- () => StyleSheet.flatten([styles15.base, style]),
1859
+ () => StyleSheet.flatten([styles16.base, style]),
1818
1860
  [style]
1819
1861
  );
1820
1862
  const fontSize = flatStyle.fontSize ?? DEFAULT_FONT_SIZE2;
@@ -1829,7 +1871,7 @@ var TruncatedText = ({
1829
1871
  ref: attachRef,
1830
1872
  onLayout,
1831
1873
  numberOfLines: 1,
1832
- style: [styles15.base, styles15.fill, style],
1874
+ style: [styles16.base, styles16.fill, style],
1833
1875
  testID,
1834
1876
  accessibilityRole: onPress !== void 0 || href !== void 0 ? "link" : "text",
1835
1877
  accessibilityLabel,
@@ -1932,7 +1974,7 @@ var LABEL_LETTER_SPACING = 0.4;
1932
1974
  var ACTION_PADDING_H = 6;
1933
1975
  var ACTION_PADDING_V = 2;
1934
1976
  var ACTION_RADIUS = 6;
1935
- var styles16 = StyleSheet.create({
1977
+ var styles17 = StyleSheet.create({
1936
1978
  cell: { gap: CELL_GAP },
1937
1979
  label: {
1938
1980
  fontSize: LABEL_FONT_SIZE,
@@ -1997,14 +2039,14 @@ var CopyableId = ({
1997
2039
  const { colors } = theme;
1998
2040
  const { status, copy } = useCopyToClipboard(value, writer);
1999
2041
  const action = useActionState(status);
2000
- return /* @__PURE__ */ jsxs(View, { style: [styles16.cell, style], testID, children: [
2001
- label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles16.label, { color: colors.textSecondary }], children: label }),
2002
- /* @__PURE__ */ jsxs(View, { style: styles16.row, children: [
2003
- /* @__PURE__ */ jsx(View, { style: styles16.valueWrap, children: /* @__PURE__ */ jsx(
2042
+ return /* @__PURE__ */ jsxs(View, { style: [styles17.cell, style], testID, children: [
2043
+ label !== void 0 && /* @__PURE__ */ jsx(Text, { style: [styles17.label, { color: colors.textSecondary }], children: label }),
2044
+ /* @__PURE__ */ jsxs(View, { style: styles17.row, children: [
2045
+ /* @__PURE__ */ jsx(View, { style: styles17.valueWrap, children: /* @__PURE__ */ jsx(
2004
2046
  TruncatedText,
2005
2047
  {
2006
2048
  value,
2007
- style: [styles16.value, { color: colors.text }],
2049
+ style: [styles17.value, { color: colors.text }],
2008
2050
  testID: `${testID}-value`,
2009
2051
  accessibilityLabel: accessibilityLabel ?? value,
2010
2052
  accessibilityHint: t(LAYOUT_I18N.copyableIdHint)
@@ -2018,7 +2060,7 @@ var CopyableId = ({
2018
2060
  accessibilityLabel: t(action.key),
2019
2061
  accessibilityHint: t(LAYOUT_I18N.copyHint),
2020
2062
  testID: `${testID}-copy`,
2021
- style: [styles16.action, { color: action.color }],
2063
+ style: [styles17.action, { color: action.color }],
2022
2064
  children: t(action.key)
2023
2065
  }
2024
2066
  )
@@ -2073,7 +2115,7 @@ var FOOTER_PADDING_V = 6;
2073
2115
  var FOOTER_PADDING_H = 12;
2074
2116
  var FOOTER_FONT_SIZE = 11;
2075
2117
  var FOOTER_OPACITY = 0.75;
2076
- var styles17 = StyleSheet.create({
2118
+ var styles18 = StyleSheet.create({
2077
2119
  footer: {
2078
2120
  paddingVertical: FOOTER_PADDING_V,
2079
2121
  paddingHorizontal: FOOTER_PADDING_H,
@@ -2099,7 +2141,7 @@ var BuildInfoFooter = ({
2099
2141
  const commit = apiCommit ?? fetchedCommit;
2100
2142
  const label = formatBuildInfo(buildVersion, commit);
2101
2143
  const textStyle = useMemo(
2102
- () => [styles17.text, { color: theme.colors.textSecondary }],
2144
+ () => [styles18.text, { color: theme.colors.textSecondary }],
2103
2145
  [theme.colors.textSecondary]
2104
2146
  );
2105
2147
  return /* @__PURE__ */ jsx(
@@ -2107,7 +2149,7 @@ var BuildInfoFooter = ({
2107
2149
  {
2108
2150
  accessibilityLabel: accessibilityLabel ?? label,
2109
2151
  accessibilityHint: accessibilityHint ?? t(LAYOUT_I18N.buildInfoHint),
2110
- style: [styles17.footer, style],
2152
+ style: [styles18.footer, style],
2111
2153
  testID,
2112
2154
  children: /* @__PURE__ */ jsx(Text, { style: textStyle, children: label })
2113
2155
  }