@terreno/ui 57.10.1 → 57.11.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/src/SplitPage.tsx CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  import {SwiperFlatList} from "react-native-swiper-flatlist";
18
18
 
19
19
  import {Box} from "./Box";
20
- import type {SplitPageListItem, SplitPageProps} from "./Common";
20
+ import {getRounding, type SplitPageListItem, type SplitPageProps} from "./Common";
21
21
  import {FlatList} from "./FlatList";
22
22
  import {IconButton} from "./IconButton";
23
23
  import {isNarrowViewport} from "./MediaQuery";
@@ -51,6 +51,7 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
51
51
  narrowViewportListButtonLabel,
52
52
  narrowViewportSelectionActive,
53
53
  narrowViewportSelectionKey,
54
+ childColumnRounding = "md",
54
55
  showItemList,
55
56
  }: SplitPageProps<TItem>) => {
56
57
  const {theme} = useTheme();
@@ -67,6 +68,7 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
67
68
  const isNarrowLayout =
68
69
  narrowBelowWidth === undefined ? isNarrowViewport() : windowWidth <= narrowBelowWidth;
69
70
  const isDetailActive = selectedId !== undefined || narrowViewportSelectionActive === true;
71
+ const childColumnBorderRadius = getRounding(childColumnRounding);
70
72
 
71
73
  const elementArray = Children.toArray(children).filter((c) => c !== null);
72
74
 
@@ -210,8 +212,10 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
210
212
  }}
211
213
  key={tabIndex}
212
214
  style={{
215
+ borderRadius: childColumnBorderRadius,
213
216
  flex: 1,
214
217
  height: "100%",
218
+ overflow: "hidden",
215
219
  paddingLeft: i ? 16 : 0,
216
220
  paddingRight: i ? 0 : 16,
217
221
  width: "60%",
@@ -259,10 +263,12 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
259
263
  contentContainerStyle={{flexGrow: 1}}
260
264
  key={index}
261
265
  style={{
266
+ borderRadius: childColumnBorderRadius,
262
267
  flexGrow: 0,
263
268
  flexShrink: 0,
264
269
  height: "100%",
265
270
  maxWidth: childWidth,
271
+ overflow: "hidden",
266
272
  width: childWidth,
267
273
  }}
268
274
  testID={`split-page-desktop-child-${index}`}
@@ -285,8 +291,10 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
285
291
  }}
286
292
  key={index}
287
293
  style={{
294
+ borderRadius: childColumnBorderRadius,
288
295
  flex: 1,
289
296
  height: "100%",
297
+ overflow: "hidden",
290
298
  width: "60%",
291
299
  }}
292
300
  >
@@ -386,7 +394,9 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
386
394
  <View
387
395
  key={index}
388
396
  style={{
397
+ borderRadius: childColumnBorderRadius,
389
398
  height: "100%",
399
+ overflow: "hidden",
390
400
  padding: 0,
391
401
  paddingBottom: bottomNavBarHeight,
392
402
  width: pageWidth,
@@ -410,11 +420,9 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
410
420
  <IconButton
411
421
  accessibilityHint={narrowViewportListButtonLabel}
412
422
  accessibilityLabel={narrowViewportListButtonLabel}
413
- backgroundOpacity={0.88}
414
423
  iconName="arrow-left"
415
424
  onClick={() => onItemDeselect()}
416
425
  testID="split-page-back-to-list"
417
- variant="muted"
418
426
  />
419
427
  </View>
420
428
  ) : null}
@@ -431,25 +439,21 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
431
439
  {activeChildIndex > 0 ? (
432
440
  <IconButton
433
441
  accessibilityLabel={`Show previous column: ${labels[activeChildIndex - 1]}`}
434
- backgroundOpacity={0.88}
435
442
  iconName="chevron-left"
436
443
  onClick={() => {
437
444
  showMobileChild(activeChildIndex - 1);
438
445
  }}
439
446
  testID="split-page-column-previous"
440
- variant="muted"
441
447
  />
442
448
  ) : null}
443
449
  {activeChildIndex < lastIndex ? (
444
450
  <IconButton
445
451
  accessibilityLabel={`Show next column: ${labels[activeChildIndex + 1]}`}
446
- backgroundOpacity={0.88}
447
452
  iconName="chevron-right"
448
453
  onClick={() => {
449
454
  showMobileChild(activeChildIndex + 1);
450
455
  }}
451
456
  testID="split-page-column-next"
452
- variant="muted"
453
457
  />
454
458
  ) : null}
455
459
  </View>
@@ -482,7 +486,9 @@ export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
482
486
  <View
483
487
  key={i}
484
488
  style={{
489
+ borderRadius: childColumnBorderRadius,
485
490
  height: elementArray.length > 1 ? "90%" : "100%",
491
+ overflow: "hidden",
486
492
  padding: 4,
487
493
  paddingBottom: bottomNavBarHeight,
488
494
  width: windowWidth - 8,
@@ -350,7 +350,7 @@ exports[`Button renders outline variant 1`] = `
350
350
  "flexDirection": "column",
351
351
  "height": undefined,
352
352
  "justifyContent": "center",
353
- "paddingHorizontal": 20,
353
+ "paddingHorizontal": 18,
354
354
  "paddingVertical": 6,
355
355
  "width": "auto",
356
356
  },
@@ -262,8 +262,10 @@ exports[`SplitPage renders correctly with children 1`] = `
262
262
  "flex": 1,
263
263
  },
264
264
  "style": {
265
+ "borderRadius": 4,
265
266
  "flex": 1,
266
267
  "height": "100%",
268
+ "overflow": "hidden",
267
269
  "width": "60%",
268
270
  },
269
271
  },
@@ -287,8 +289,10 @@ exports[`SplitPage renders correctly with children 1`] = `
287
289
  "flex": 1,
288
290
  },
289
291
  "style": {
292
+ "borderRadius": 4,
290
293
  "flex": 1,
291
294
  "height": "100%",
295
+ "overflow": "hidden",
292
296
  "width": "60%",
293
297
  },
294
298
  },
@@ -959,8 +963,10 @@ exports[`SplitPage renders with tabs when more than 2 children 1`] = `
959
963
  "flex": 1,
960
964
  },
961
965
  "style": {
966
+ "borderRadius": 4,
962
967
  "flex": 1,
963
968
  "height": "100%",
969
+ "overflow": "hidden",
964
970
  "paddingLeft": 0,
965
971
  "paddingRight": 16,
966
972
  "width": "60%",
@@ -986,8 +992,10 @@ exports[`SplitPage renders with tabs when more than 2 children 1`] = `
986
992
  "flex": 1,
987
993
  },
988
994
  "style": {
995
+ "borderRadius": 4,
989
996
  "flex": 1,
990
997
  "height": "100%",
998
+ "overflow": "hidden",
991
999
  "paddingLeft": 16,
992
1000
  "paddingRight": 0,
993
1001
  "width": "60%",
@@ -1796,8 +1804,10 @@ exports[`SplitPage filters out null children 1`] = `
1796
1804
  "flex": 1,
1797
1805
  },
1798
1806
  "style": {
1807
+ "borderRadius": 4,
1799
1808
  "flex": 1,
1800
1809
  "height": "100%",
1810
+ "overflow": "hidden",
1801
1811
  "width": "60%",
1802
1812
  },
1803
1813
  },
@@ -1821,8 +1831,10 @@ exports[`SplitPage filters out null children 1`] = `
1821
1831
  "flex": 1,
1822
1832
  },
1823
1833
  "style": {
1834
+ "borderRadius": 4,
1824
1835
  "flex": 1,
1825
1836
  "height": "100%",
1837
+ "overflow": "hidden",
1826
1838
  "width": "60%",
1827
1839
  },
1828
1840
  },
@@ -2147,8 +2159,10 @@ exports[`SplitPage renders with bottomNavBarHeight 1`] = `
2147
2159
  "flex": 1,
2148
2160
  },
2149
2161
  "style": {
2162
+ "borderRadius": 4,
2150
2163
  "flex": 1,
2151
2164
  "height": "100%",
2165
+ "overflow": "hidden",
2152
2166
  "width": "60%",
2153
2167
  },
2154
2168
  },
package/src/bunSetup.ts CHANGED
@@ -929,12 +929,6 @@ mock.module("expo-localization", () => ({
929
929
  timezone: "America/New_York",
930
930
  }));
931
931
 
932
- // Mock @expo/vector-icons
933
- mock.module("@expo/vector-icons", () => ({
934
- default: mock(() => null),
935
- FontAwesome6: mock(() => null),
936
- }));
937
-
938
932
  // Mock @expo/vector-icons/FontAwesome6
939
933
  mock.module("@expo/vector-icons/FontAwesome6", () => ({
940
934
  default: mock(() => null),
@@ -1,5 +1,5 @@
1
1
  // TableHeaderCell.tsx
2
- import {FontAwesome6} from "@expo/vector-icons";
2
+ import FontAwesome6 from "@expo/vector-icons/FontAwesome6";
3
3
  import {type ReactElement, useCallback} from "react";
4
4
 
5
5
  import {Box} from "../Box";