@dloizides/ui-layout 1.3.0 → 1.5.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
@@ -1,5 +1,5 @@
1
1
  import React8, { createContext, useMemo, useRef, useEffect, useState, useCallback, useContext } from 'react';
2
- import { StyleSheet, View, Text, TouchableOpacity, Platform, Modal, FlatList, ScrollView, Animated, Easing, Pressable, useWindowDimensions, LayoutAnimation, UIManager } from 'react-native';
2
+ import { StyleSheet, View, Text, Pressable, TouchableOpacity, Platform, Modal, FlatList, ScrollView, Animated, Easing, useWindowDimensions, LayoutAnimation, UIManager } from 'react-native';
3
3
  import { MODAL_OVERLAY_COLOR, useUi } from '@dloizides/ui-feedback';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
  import { SvgIcon } from '@dloizides/ui-icons';
@@ -85,6 +85,93 @@ var StatusBadge = ({
85
85
  }
86
86
  );
87
87
  };
88
+ var TRACK_PADDING = 3;
89
+ var TRACK_RADIUS = 999;
90
+ var SEGMENT_RADIUS = 999;
91
+ var SEGMENT_PAD_H = 15;
92
+ var SEGMENT_PAD_V = 7;
93
+ var SEGMENT_FONT = 14;
94
+ var SEGMENT_WEIGHT = "600";
95
+ var BORDER_WIDTH = 1;
96
+ var SHADOW_COLOR = "#141e32";
97
+ var SHADOW_OPACITY = 0.1;
98
+ var SHADOW_RADIUS = 3;
99
+ var SHADOW_OFFSET = { width: 0, height: 1 };
100
+ var SHADOW_ELEVATION = 2;
101
+ var TRANSPARENT = "transparent";
102
+ var styles4 = StyleSheet.create({
103
+ track: {
104
+ flexDirection: "row",
105
+ alignSelf: "flex-start",
106
+ alignItems: "center",
107
+ gap: TRACK_PADDING + 1,
108
+ padding: TRACK_PADDING,
109
+ borderRadius: TRACK_RADIUS,
110
+ borderWidth: BORDER_WIDTH
111
+ },
112
+ segment: {
113
+ paddingHorizontal: SEGMENT_PAD_H,
114
+ paddingVertical: SEGMENT_PAD_V,
115
+ borderRadius: SEGMENT_RADIUS
116
+ },
117
+ segmentSelected: {
118
+ shadowColor: SHADOW_COLOR,
119
+ shadowOpacity: SHADOW_OPACITY,
120
+ shadowRadius: SHADOW_RADIUS,
121
+ shadowOffset: SHADOW_OFFSET,
122
+ elevation: SHADOW_ELEVATION
123
+ },
124
+ label: {
125
+ fontSize: SEGMENT_FONT,
126
+ fontWeight: SEGMENT_WEIGHT,
127
+ textAlign: "center"
128
+ }
129
+ });
130
+ function ariaSelectedProps(selected) {
131
+ return { "aria-selected": selected };
132
+ }
133
+ function SegmentedControl({
134
+ options,
135
+ value,
136
+ onChange,
137
+ accessibilityLabel,
138
+ style,
139
+ testID
140
+ }) {
141
+ const { theme } = useUi();
142
+ const { colors } = theme;
143
+ return /* @__PURE__ */ jsx(
144
+ View,
145
+ {
146
+ accessibilityRole: "tablist",
147
+ "aria-label": accessibilityLabel,
148
+ style: [styles4.track, { backgroundColor: colors.background, borderColor: colors.border }, style],
149
+ testID,
150
+ children: options.map((opt) => {
151
+ const selected = opt.value === value;
152
+ return /* @__PURE__ */ jsx(
153
+ Pressable,
154
+ {
155
+ accessibilityRole: "tab",
156
+ accessibilityState: { selected },
157
+ accessibilityLabel: opt.accessibilityLabel ?? opt.label,
158
+ accessibilityHint: opt.accessibilityHint,
159
+ onPress: () => onChange(opt.value),
160
+ style: [
161
+ styles4.segment,
162
+ selected ? styles4.segmentSelected : null,
163
+ { backgroundColor: selected ? colors.surface : TRANSPARENT }
164
+ ],
165
+ testID: opt.testID,
166
+ ...ariaSelectedProps(selected),
167
+ children: /* @__PURE__ */ jsx(Text, { style: [styles4.label, { color: selected ? colors.text : colors.textSecondary }], children: opt.label })
168
+ },
169
+ opt.value
170
+ );
171
+ })
172
+ }
173
+ );
174
+ }
88
175
  var PROMPT_PADDING = 20;
89
176
  var PROMPT_BORDER_RADIUS = 12;
90
177
  var PROMPT_BORDER_WIDTH = 1;
@@ -97,7 +184,7 @@ var DISMISS_FONT_SIZE = 13;
97
184
  var TITLE_MARGIN_BOTTOM = 8;
98
185
  var MESSAGE_MARGIN_BOTTOM = 16;
99
186
  var CTA_MARGIN_BOTTOM = 8;
100
- var styles4 = StyleSheet.create({
187
+ var styles5 = StyleSheet.create({
101
188
  container: {
102
189
  padding: PROMPT_PADDING,
103
190
  borderRadius: PROMPT_BORDER_RADIUS,
@@ -125,21 +212,21 @@ var UpgradePrompt = ({
125
212
  return /* @__PURE__ */ jsxs(
126
213
  View,
127
214
  {
128
- style: [styles4.container, { borderColor: primary, backgroundColor: colors.surface }],
215
+ style: [styles5.container, { borderColor: primary, backgroundColor: colors.surface }],
129
216
  testID: LAYOUT_TEST_IDS.upgradePrompt,
130
217
  children: [
131
- /* @__PURE__ */ jsx(Text, { style: [styles4.title, { color: colors.text }], children: t("settings.billing.upgradePrompt.title") }),
132
- /* @__PURE__ */ jsx(Text, { style: [styles4.message, { color: colors.textSecondary }], children: t("settings.billing.upgradePrompt.message", requiredTier, currentTier) }),
218
+ /* @__PURE__ */ jsx(Text, { style: [styles5.title, { color: colors.text }], children: t("settings.billing.upgradePrompt.title") }),
219
+ /* @__PURE__ */ jsx(Text, { style: [styles5.message, { color: colors.textSecondary }], children: t("settings.billing.upgradePrompt.message", requiredTier, currentTier) }),
133
220
  /* @__PURE__ */ jsx(
134
221
  TouchableOpacity,
135
222
  {
136
223
  accessibilityHint: t("settings.billing.upgradePrompt.ctaHint"),
137
224
  accessibilityLabel: t("settings.billing.upgradePrompt.cta"),
138
225
  accessibilityRole: "button",
139
- style: [styles4.cta, { backgroundColor: primary }],
226
+ style: [styles5.cta, { backgroundColor: primary }],
140
227
  testID: LAYOUT_TEST_IDS.upgradePromptCta,
141
228
  onPress: handleUpgradePress,
142
- children: /* @__PURE__ */ jsx(Text, { style: [styles4.ctaText, { color: colors.surface }], children: t("settings.billing.upgradePrompt.cta") })
229
+ children: /* @__PURE__ */ jsx(Text, { style: [styles5.ctaText, { color: colors.surface }], children: t("settings.billing.upgradePrompt.cta") })
143
230
  }
144
231
  ),
145
232
  onDismiss ? /* @__PURE__ */ jsx(
@@ -148,10 +235,10 @@ var UpgradePrompt = ({
148
235
  accessibilityHint: t("settings.billing.upgradePrompt.dismissHint"),
149
236
  accessibilityLabel: t("settings.billing.upgradePrompt.dismiss"),
150
237
  accessibilityRole: "button",
151
- style: styles4.dismiss,
238
+ style: styles5.dismiss,
152
239
  testID: LAYOUT_TEST_IDS.upgradePromptDismiss,
153
240
  onPress: onDismiss,
154
- children: /* @__PURE__ */ jsx(Text, { style: [styles4.dismissText, { color: colors.textSecondary }], children: t("settings.billing.upgradePrompt.dismiss") })
241
+ children: /* @__PURE__ */ jsx(Text, { style: [styles5.dismissText, { color: colors.textSecondary }], children: t("settings.billing.upgradePrompt.dismiss") })
155
242
  }
156
243
  ) : null
157
244
  ]
@@ -223,7 +310,7 @@ var BODY_FONT_SIZE = 14;
223
310
  var SELECTED_FONT_WEIGHT = "600";
224
311
  var OPTION_PADDING_H = 16;
225
312
  var OPTION_PADDING_V = 12;
226
- var styles5 = StyleSheet.create({
313
+ var styles6 = StyleSheet.create({
227
314
  option: {
228
315
  paddingHorizontal: OPTION_PADDING_H,
229
316
  paddingVertical: OPTION_PADDING_V,
@@ -245,8 +332,8 @@ var OptionRow = ({
245
332
  onSelect();
246
333
  }, [onSelect]);
247
334
  const isActive = isSelected || isHighlighted;
248
- const rowStyle = [styles5.option, isActive ? { backgroundColor: colors.surfaceElevated } : null];
249
- const textStyle = [styles5.optionText, { color: colors.text }, isSelected ? styles5.selectedText : null];
335
+ const rowStyle = [styles6.option, isActive ? { backgroundColor: colors.surfaceElevated } : null];
336
+ const textStyle = [styles6.optionText, { color: colors.text }, isSelected ? styles6.selectedText : null];
250
337
  return /* @__PURE__ */ jsx(
251
338
  TouchableOpacity,
252
339
  {
@@ -318,14 +405,14 @@ function useMenuKeyboard(params) {
318
405
  }, [containerRef, enabled, onClose, params]);
319
406
  }
320
407
  var BORDER_RADIUS = 8;
321
- var BORDER_WIDTH = 1;
408
+ var BORDER_WIDTH2 = 1;
322
409
  var MENU_PADDING = 4;
323
410
  var MENU_MAX_HEIGHT = 300;
324
411
  var MENU_TOP_GAP = 4;
325
412
  var MENU_Z_INDEX = 1e3;
326
413
  var MENU_ELEVATION = 8;
327
414
  var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
328
- var styles6 = StyleSheet.create({
415
+ var styles7 = StyleSheet.create({
329
416
  popover: {
330
417
  position: "absolute",
331
418
  top: "100%",
@@ -333,7 +420,7 @@ var styles6 = StyleSheet.create({
333
420
  right: 0,
334
421
  marginTop: MENU_TOP_GAP,
335
422
  zIndex: MENU_Z_INDEX,
336
- borderWidth: BORDER_WIDTH,
423
+ borderWidth: BORDER_WIDTH2,
337
424
  borderRadius: BORDER_RADIUS,
338
425
  padding: MENU_PADDING,
339
426
  maxHeight: MENU_MAX_HEIGHT,
@@ -379,7 +466,7 @@ var InlineMenu = ({
379
466
  onClose
380
467
  });
381
468
  const popoverStyle = useMemo(
382
- () => [styles6.popover, { borderColor: colors.border, backgroundColor: colors.surface }],
469
+ () => [styles7.popover, { borderColor: colors.border, backgroundColor: colors.surface }],
383
470
  [colors.border, colors.surface]
384
471
  );
385
472
  return /* @__PURE__ */ jsx(
@@ -415,17 +502,17 @@ function useResolvedDropdownVariant(explicit) {
415
502
  return resolveDropdownVariant(explicit, width, Platform.OS);
416
503
  }
417
504
  var BORDER_RADIUS2 = 8;
418
- var BORDER_WIDTH2 = 1;
505
+ var BORDER_WIDTH3 = 1;
419
506
  var BODY_FONT_SIZE2 = 14;
420
507
  var MODAL_PADDING = 8;
421
508
  var MODAL_MIN_WIDTH = 200;
422
509
  var MODAL_MAX_HEIGHT = 300;
423
510
  var CONTAINER_PADDING_H = 12;
424
511
  var CONTAINER_PADDING_V = 10;
425
- var styles7 = StyleSheet.create({
512
+ var styles8 = StyleSheet.create({
426
513
  anchor: { position: "relative" },
427
514
  container: {
428
- borderWidth: BORDER_WIDTH2,
515
+ borderWidth: BORDER_WIDTH3,
429
516
  borderRadius: BORDER_RADIUS2,
430
517
  paddingHorizontal: CONTAINER_PADDING_H,
431
518
  paddingVertical: CONTAINER_PADDING_V
@@ -479,11 +566,11 @@ var ModalDropdown = ({
479
566
  [onChange]
480
567
  );
481
568
  const containerStyle = useMemo(
482
- () => [styles7.container, { borderColor: colors.border, backgroundColor: colors.surface }],
569
+ () => [styles8.container, { borderColor: colors.border, backgroundColor: colors.surface }],
483
570
  [colors.border, colors.surface]
484
571
  );
485
572
  const modalContentStyle = useMemo(
486
- () => [styles7.modalContent, { backgroundColor: colors.surface }],
573
+ () => [styles8.modalContent, { backgroundColor: colors.surface }],
487
574
  [colors.surface]
488
575
  );
489
576
  const renderModalOption = useCallback(
@@ -499,7 +586,7 @@ var ModalDropdown = ({
499
586
  [handleSelect, testID, value]
500
587
  );
501
588
  const keyExtractor = useCallback((item) => String(item.value), []);
502
- return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles7.anchor, children: [
589
+ return /* @__PURE__ */ jsxs(View, { ref: anchorRef, style: styles8.anchor, children: [
503
590
  /* @__PURE__ */ jsx(
504
591
  TouchableOpacity,
505
592
  {
@@ -511,7 +598,7 @@ var ModalDropdown = ({
511
598
  style: containerStyle,
512
599
  testID,
513
600
  onPress: handleToggle,
514
- children: /* @__PURE__ */ jsx(Text, { style: [styles7.selectedText, { color: colors.text }], children: selectedLabel })
601
+ children: /* @__PURE__ */ jsx(Text, { style: [styles8.selectedText, { color: colors.text }], children: selectedLabel })
515
602
  }
516
603
  ),
517
604
  isMenu && isOpen ? /* @__PURE__ */ jsx(
@@ -534,7 +621,7 @@ var ModalDropdown = ({
534
621
  accessibilityLabel: t("common.dismissDropdown"),
535
622
  accessibilityRole: "button",
536
623
  activeOpacity: 1,
537
- style: styles7.modalOverlay,
624
+ style: styles8.modalOverlay,
538
625
  testID: `${testID}-backdrop`,
539
626
  onPress: handleClose,
540
627
  children: /* @__PURE__ */ jsx(
@@ -553,7 +640,7 @@ var ModalDropdown = ({
553
640
  ] });
554
641
  };
555
642
  var CLOSE_ICON_SIZE = 18;
556
- var styles8 = StyleSheet.create({
643
+ var styles9 = StyleSheet.create({
557
644
  container: {
558
645
  flex: 1,
559
646
  padding: 16
@@ -578,7 +665,7 @@ var ModalShell = ({
578
665
  }) => {
579
666
  const { theme, t } = useUi();
580
667
  const containerStyle = React8.useMemo(
581
- () => [styles8.container, { backgroundColor: theme.colors.background }, contentStyle],
668
+ () => [styles9.container, { backgroundColor: theme.colors.background }, contentStyle],
582
669
  [theme.colors.background, contentStyle]
583
670
  );
584
671
  const closeA11yLabel = t("quizTemplates.cancel");
@@ -598,7 +685,7 @@ var ModalShell = ({
598
685
  role: "dialog",
599
686
  style: containerStyle,
600
687
  children: [
601
- /* @__PURE__ */ jsxs(View, { style: styles8.headerRow, children: [
688
+ /* @__PURE__ */ jsxs(View, { style: styles9.headerRow, children: [
602
689
  /* @__PURE__ */ jsx(Heading, { children: title ?? t("close") }),
603
690
  showClose ? /* @__PURE__ */ jsx(
604
691
  TouchableOpacity,
@@ -606,7 +693,7 @@ var ModalShell = ({
606
693
  accessibilityHint: t("common.closeDialogHint"),
607
694
  accessibilityLabel: closeA11yLabel,
608
695
  accessibilityRole: "button",
609
- style: styles8.closeButton,
696
+ style: styles9.closeButton,
610
697
  testID: LAYOUT_TEST_IDS.modalShellClose,
611
698
  onPress: onCancel,
612
699
  children: /* @__PURE__ */ jsx(SvgIcon, { color: theme.colors.textSecondary, name: "close", size: CLOSE_ICON_SIZE })
@@ -647,8 +734,10 @@ function animateNextLayout() {
647
734
  } catch {
648
735
  }
649
736
  }
650
- var styles9 = StyleSheet.create({
651
- container: { alignSelf: "stretch" }
737
+ var BOXED_GAP = 12;
738
+ var styles10 = StyleSheet.create({
739
+ container: { alignSelf: "stretch" },
740
+ boxed: { gap: BOXED_GAP }
652
741
  });
653
742
  function computeInitialOpen(children, defaultOpenIds, allowMultiple) {
654
743
  const ids = new Set(defaultOpenIds ?? []);
@@ -671,6 +760,7 @@ var Accordion = ({
671
760
  defaultOpenIds,
672
761
  onOpenChange,
673
762
  allowMultiple = true,
763
+ variant = "plain",
674
764
  testID = "accordion",
675
765
  style
676
766
  }) => {
@@ -699,13 +789,14 @@ var Accordion = ({
699
789
  [allowMultiple, isControlled, onOpenChange, openSet]
700
790
  );
701
791
  const contextValue = useMemo(
702
- () => ({ openIds: openSet, toggle, allowMultiple }),
703
- [openSet, toggle, allowMultiple]
704
- );
705
- const containerStyle = useMemo(
706
- () => style === void 0 ? [styles9.container] : [styles9.container, ...Array.isArray(style) ? style : [style]],
707
- [style]
792
+ () => ({ openIds: openSet, toggle, allowMultiple, variant }),
793
+ [openSet, toggle, allowMultiple, variant]
708
794
  );
795
+ const containerStyle = useMemo(() => {
796
+ const base = variant === "boxed" ? [styles10.container, styles10.boxed] : [styles10.container];
797
+ if (style === void 0) return base;
798
+ return [...base, ...Array.isArray(style) ? style : [style]];
799
+ }, [style, variant]);
709
800
  return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(View, { style: containerStyle, testID, children }) });
710
801
  };
711
802
  var HEADER_PADDING_H = 16;
@@ -720,12 +811,23 @@ var ROTATE_DURATION_MS = 160;
720
811
  var ROTATE_COLLAPSED = 0;
721
812
  var ROTATE_EXPANDED = 1;
722
813
  var COLLAPSED_DEG = "0deg";
723
- var EXPANDED_DEG = "180deg";
814
+ var PLAIN_EXPANDED_DEG = "180deg";
815
+ var BOXED_EXPANDED_DEG = "90deg";
724
816
  var DISABLED_OPACITY = 0.5;
725
817
  var FULL_OPACITY = 1;
726
818
  var ROLE_REGION = "region";
727
- var styles10 = StyleSheet.create({
819
+ var BOX_BORDER_RADIUS = 10;
820
+ var BOX_PADDING_H = 14;
821
+ var BOX_HEADER_PADDING_V = 8;
822
+ var BOX_BODY_PADDING_BOTTOM = 10;
823
+ var BOX_BODY_PADDING_TOP = 2;
824
+ var BOX_TITLE_FONT_SIZE = 14;
825
+ var BOX_MARKER_FONT_SIZE = 13;
826
+ var BOX_MARKER_GAP = 6;
827
+ var BOX_MARKER = "\u25B8";
828
+ var styles11 = StyleSheet.create({
728
829
  item: { borderTopWidth: StyleSheet.hairlineWidth },
830
+ boxItem: { borderWidth: 1, borderRadius: BOX_BORDER_RADIUS, paddingHorizontal: BOX_PADDING_H },
729
831
  header: {
730
832
  flexDirection: "row",
731
833
  alignItems: "center",
@@ -733,11 +835,17 @@ var styles10 = StyleSheet.create({
733
835
  paddingHorizontal: HEADER_PADDING_H,
734
836
  paddingVertical: HEADER_PADDING_V
735
837
  },
838
+ boxHeader: { paddingHorizontal: 0, paddingVertical: BOX_HEADER_PADDING_V },
736
839
  headerLeft: { flexShrink: 1, flexGrow: 1 },
840
+ headerLeftRow: { flexDirection: "row", alignItems: "center" },
737
841
  headerRight: { flexDirection: "row", alignItems: "center", marginLeft: HEADER_GAP },
738
842
  title: { fontSize: TITLE_FONT_SIZE2, fontWeight: TITLE_FONT_WEIGHT },
843
+ boxTitle: { fontSize: BOX_TITLE_FONT_SIZE, fontWeight: TITLE_FONT_WEIGHT },
739
844
  chevron: { marginLeft: HEADER_GAP },
740
- body: { paddingHorizontal: BODY_PADDING_H, paddingBottom: BODY_PADDING_V }
845
+ marker: { marginRight: BOX_MARKER_GAP },
846
+ markerText: { fontSize: BOX_MARKER_FONT_SIZE, fontWeight: TITLE_FONT_WEIGHT },
847
+ body: { paddingHorizontal: BODY_PADDING_H, paddingBottom: BODY_PADDING_V },
848
+ boxBody: { paddingHorizontal: 0, paddingBottom: BOX_BODY_PADDING_BOTTOM, paddingTop: BOX_BODY_PADDING_TOP }
741
849
  });
742
850
  var ACTIVATION_KEYS = ["Enter", " ", "Spacebar"];
743
851
  var AccordionItem = ({
@@ -754,7 +862,8 @@ var AccordionItem = ({
754
862
  }) => {
755
863
  const { theme, t } = useUi();
756
864
  const { colors } = theme;
757
- const { openIds, toggle } = useAccordionContext();
865
+ const { openIds, toggle, variant } = useAccordionContext();
866
+ const boxed = variant === "boxed";
758
867
  const expanded = openIds.has(id);
759
868
  const headerTestID = testID ?? `accordion-item-${id}`;
760
869
  const bodyTestID = `${headerTestID}-body`;
@@ -770,7 +879,7 @@ var AccordionItem = ({
770
879
  }, [expanded, rotation]);
771
880
  const rotate = rotation.interpolate({
772
881
  inputRange: [ROTATE_COLLAPSED, ROTATE_EXPANDED],
773
- outputRange: [COLLAPSED_DEG, EXPANDED_DEG]
882
+ outputRange: [COLLAPSED_DEG, boxed ? BOXED_EXPANDED_DEG : PLAIN_EXPANDED_DEG]
774
883
  });
775
884
  const handlePress = useCallback(() => {
776
885
  if (!disabled) toggle(id);
@@ -788,14 +897,19 @@ var AccordionItem = ({
788
897
  );
789
898
  const keyboardProps = Platform.OS === "web" ? { onKeyDown: handleKeyDown2 } : {};
790
899
  const itemStyle = useMemo(
791
- () => [styles10.item, { borderTopColor: colors.border }],
792
- [colors.border]
900
+ () => boxed ? [styles11.boxItem, { borderColor: colors.border }] : [styles11.item, { borderTopColor: colors.border }],
901
+ [boxed, colors.border]
793
902
  );
794
903
  const headerStyle = useMemo(
795
- () => [styles10.header, { opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }],
796
- [disabled]
904
+ () => [
905
+ styles11.header,
906
+ ...boxed ? [styles11.boxHeader] : [],
907
+ { opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }
908
+ ],
909
+ [boxed, disabled]
797
910
  );
798
911
  const resolvedLabel = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
912
+ const titleNode = typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [boxed ? styles11.boxTitle : styles11.title, { color: boxed ? colors.textSecondary : colors.text }], children: title }) : title;
799
913
  return /* @__PURE__ */ jsxs(View, { style: itemStyle, children: [
800
914
  /* @__PURE__ */ jsxs(
801
915
  Pressable,
@@ -812,18 +926,31 @@ var AccordionItem = ({
812
926
  onPress: handlePress,
813
927
  ...keyboardProps,
814
928
  children: [
815
- /* @__PURE__ */ jsx(View, { style: styles10.headerLeft, children: typeof title === "string" ? /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: colors.text }], children: title }) : title }),
816
- /* @__PURE__ */ jsxs(View, { style: styles10.headerRight, children: [
929
+ /* @__PURE__ */ jsxs(View, { style: [styles11.headerLeft, boxed ? styles11.headerLeftRow : null], children: [
930
+ boxed ? /* @__PURE__ */ jsx(Animated.View, { style: [styles11.marker, { transform: [{ rotate }] }], testID: chevronTestID, children: /* @__PURE__ */ jsx(Text, { style: [styles11.markerText, { color: colors.textSecondary }], children: BOX_MARKER }) }) : null,
931
+ titleNode
932
+ ] }),
933
+ /* @__PURE__ */ jsxs(View, { style: styles11.headerRight, children: [
817
934
  right,
818
- /* @__PURE__ */ jsx(Animated.View, { style: [styles10.chevron, { transform: [{ rotate }] }], children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID }) })
935
+ boxed ? null : /* @__PURE__ */ jsx(Animated.View, { style: [styles11.chevron, { transform: [{ rotate }] }], children: /* @__PURE__ */ jsx(SvgIcon, { color: colors.textSecondary, name: "chevronDown", size: CHEVRON_SIZE, testID: chevronTestID }) })
819
936
  ] })
820
937
  ]
821
938
  }
822
939
  ),
823
- expanded ? /* @__PURE__ */ jsx(View, { accessibilityLabel: resolvedLabel, nativeID: bodyTestID, role: ROLE_REGION, style: styles10.body, testID: bodyTestID, children }) : null
940
+ expanded ? /* @__PURE__ */ jsx(
941
+ View,
942
+ {
943
+ accessibilityLabel: resolvedLabel,
944
+ nativeID: bodyTestID,
945
+ role: ROLE_REGION,
946
+ style: boxed ? styles11.boxBody : styles11.body,
947
+ testID: bodyTestID,
948
+ children
949
+ }
950
+ ) : null
824
951
  ] });
825
952
  };
826
953
 
827
- export { Accordion, AccordionItem, DEFAULT_BILLING_ROUTE, DropdownVariant, Heading, LAYOUT_TEST_IDS, ModalDropdown, ModalShell, Section, StatusBadge, UpgradePrompt, useFocusTrap };
954
+ export { Accordion, AccordionItem, DEFAULT_BILLING_ROUTE, DropdownVariant, Heading, LAYOUT_TEST_IDS, ModalDropdown, ModalShell, Section, SegmentedControl, StatusBadge, UpgradePrompt, useFocusTrap };
828
955
  //# sourceMappingURL=index.mjs.map
829
956
  //# sourceMappingURL=index.mjs.map