@terreno/ui 57.7.0 → 57.8.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.
Files changed (58) hide show
  1. package/dist/Avatar.js +2 -2
  2. package/dist/Avatar.js.map +1 -1
  3. package/dist/Button.js +2 -2
  4. package/dist/Button.js.map +1 -1
  5. package/dist/Common.d.ts +49 -0
  6. package/dist/Common.d.ts.map +1 -1
  7. package/dist/Common.js.map +1 -1
  8. package/dist/DateTimeActionSheet.js +2 -2
  9. package/dist/DateTimeActionSheet.js.map +1 -1
  10. package/dist/DateTimeField.js +3 -3
  11. package/dist/DateTimeField.js.map +1 -1
  12. package/dist/DropdownPanel.d.ts.map +1 -1
  13. package/dist/DropdownPanel.js +1 -1
  14. package/dist/DropdownPanel.js.map +1 -1
  15. package/dist/HeightField.js +2 -2
  16. package/dist/HeightField.js.map +1 -1
  17. package/dist/IconButton.d.ts.map +1 -1
  18. package/dist/IconButton.js +9 -6
  19. package/dist/IconButton.js.map +1 -1
  20. package/dist/MediaQuery.d.ts +10 -0
  21. package/dist/MediaQuery.d.ts.map +1 -1
  22. package/dist/MediaQuery.js +13 -1
  23. package/dist/MediaQuery.js.map +1 -1
  24. package/dist/MultiselectField.js +2 -2
  25. package/dist/MultiselectField.js.map +1 -1
  26. package/dist/RadioField.js +2 -2
  27. package/dist/RadioField.js.map +1 -1
  28. package/dist/SplitPage.d.ts +1 -1
  29. package/dist/SplitPage.d.ts.map +1 -1
  30. package/dist/SplitPage.js +126 -21
  31. package/dist/SplitPage.js.map +1 -1
  32. package/dist/UnifiedAddressAutoComplete.js +2 -2
  33. package/dist/UnifiedAddressAutoComplete.js.map +1 -1
  34. package/dist/fieldElements/FieldTitle.js +2 -2
  35. package/dist/fieldElements/FieldTitle.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/Avatar.tsx +2 -2
  38. package/src/Button.test.tsx +7 -7
  39. package/src/Button.tsx +2 -2
  40. package/src/Common.ts +50 -0
  41. package/src/DateTimeActionSheet.tsx +4 -4
  42. package/src/DateTimeField.test.tsx +5 -4
  43. package/src/DateTimeField.tsx +3 -3
  44. package/src/DropdownPanel.test.tsx +12 -0
  45. package/src/DropdownPanel.tsx +8 -1
  46. package/src/HeightField.tsx +2 -2
  47. package/src/IconButton.test.tsx +63 -0
  48. package/src/IconButton.tsx +10 -5
  49. package/src/MediaQuery.ts +14 -1
  50. package/src/MultiselectField.tsx +2 -2
  51. package/src/RadioField.tsx +2 -2
  52. package/src/SplitPage.test.tsx +449 -11
  53. package/src/SplitPage.tsx +255 -21
  54. package/src/UnifiedAddressAutoComplete.test.tsx +4 -4
  55. package/src/UnifiedAddressAutoComplete.tsx +2 -2
  56. package/src/__snapshots__/DropdownPanel.test.tsx.snap +3 -1
  57. package/src/bunSetup.ts +2 -1
  58. package/src/fieldElements/FieldTitle.tsx +2 -2
package/dist/SplitPage.js CHANGED
@@ -1,22 +1,32 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Children, useCallback, useEffect, useState } from "react";
3
- import { Dimensions, ScrollView, View } from "react-native";
2
+ import { Children, useCallback, useEffect, useRef, useState, } from "react";
3
+ import { ScrollView, useWindowDimensions, View, } from "react-native";
4
4
  import { SwiperFlatList } from "react-native-swiper-flatlist";
5
5
  import { Box } from "./Box";
6
6
  import { FlatList } from "./FlatList";
7
7
  import { IconButton } from "./IconButton";
8
- import { isMobileDevice } from "./MediaQuery";
8
+ import { isNarrowViewport } from "./MediaQuery";
9
9
  import { SegmentedControl } from "./SegmentedControl";
10
10
  import { Spinner } from "./Spinner";
11
11
  import { useTheme } from "./Theme";
12
12
  // A component for rendering a list on one side and a details view on the right for large screens,
13
13
  // and a scrollable list where clicking an item takes you the details view.
14
- export const SplitPage = ({ children, tabs = [], loading = false, color, keyboardOffset, renderListViewItem, renderListViewHeader, renderContent, onSelectionChange = () => { }, listViewData, listViewExtraData, listViewWidth, listViewMaxWidth, bottomNavBarHeight, showItemList, }) => {
14
+ // On web, opt in to minimum widths for the desktop side-by-side children, or a labeled pager
15
+ // on the narrow viewport. `narrowBelowWidth` chooses that viewport from the window width;
16
+ // otherwise it follows `isNarrowViewport()`. The native SplitPage ignores those props.
17
+ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboardOffset, renderListViewItem, renderListViewHeader, renderContent, onSelectionChange = () => { }, listViewData, listViewExtraData, listViewWidth, listViewMaxWidth, bottomNavBarHeight, desktopChildrenMinWidth, narrowBelowWidth, narrowViewportChildLabels, narrowViewportListButtonLabel, narrowViewportSelectionActive, narrowViewportSelectionKey, showItemList, }) => {
15
18
  const { theme } = useTheme();
19
+ const { width: windowWidth } = useWindowDimensions();
16
20
  const [selectedId, setSelectedId] = useState(undefined);
17
21
  const [activeTabs, setActiveTabs] = useState([0, 1]);
18
- const { width } = Dimensions.get("window");
19
- const isMobileLayout = isMobileDevice();
22
+ const [activeChildIndex, setActiveChildIndex] = useState(0);
23
+ const activeChildIndexRef = useRef(activeChildIndex);
24
+ activeChildIndexRef.current = activeChildIndex;
25
+ const swiperRef = useRef(null);
26
+ const [desktopScrollWidth, setDesktopScrollWidth] = useState(0);
27
+ const [measuredPageWidth, setMeasuredPageWidth] = useState(0);
28
+ const isNarrowLayout = narrowBelowWidth === undefined ? isNarrowViewport() : windowWidth <= narrowBelowWidth;
29
+ const isDetailActive = selectedId !== undefined || narrowViewportSelectionActive === true;
20
30
  const elementArray = Children.toArray(children).filter((c) => c !== null);
21
31
  const onItemSelect = useCallback(async (item) => {
22
32
  setSelectedId(item.index);
@@ -32,6 +42,21 @@ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboar
32
42
  void onItemDeselect();
33
43
  }
34
44
  }, [showItemList, onItemDeselect]);
45
+ // Reset the narrow pager when the selected record changes. Width changes stay out of this effect
46
+ // so a resize does not jump back to the first child.
47
+ // biome-ignore lint/correctness/useExhaustiveDependencies: these values are the reset triggers.
48
+ useEffect(() => {
49
+ setActiveChildIndex(0);
50
+ swiperRef.current?.scrollToIndex({ animated: false, index: 0 });
51
+ }, [isDetailActive, isNarrowLayout, narrowViewportSelectionKey, selectedId]);
52
+ // Keep the current child aligned after the page width changes, without snapping over a chevron animation.
53
+ // biome-ignore lint/correctness/useExhaustiveDependencies: widths are the realign triggers; the index is read from a ref.
54
+ useEffect(() => {
55
+ swiperRef.current?.scrollToIndex({
56
+ animated: false,
57
+ index: activeChildIndexRef.current,
58
+ });
59
+ }, [measuredPageWidth, windowWidth]);
35
60
  if (!children && !renderContent) {
36
61
  console.warn("A child node is required");
37
62
  return null;
@@ -40,6 +65,13 @@ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboar
40
65
  console.warn("There must be a tab for each child");
41
66
  return null;
42
67
  }
68
+ if (desktopChildrenMinWidth !== undefined && elementArray.length > 2) {
69
+ console.warn("desktopChildrenMinWidth applies only when SplitPage has two or fewer children.");
70
+ }
71
+ if (narrowViewportChildLabels !== undefined &&
72
+ narrowViewportChildLabels.length !== elementArray.length) {
73
+ console.warn("narrowViewportChildLabels must have one entry per child. Falling back to the default narrow pager.");
74
+ }
43
75
  const renderItem = (itemInfo) => {
44
76
  return (_jsx(Box, { accessibilityHint: "", accessibilityLabel: "Select", onClick: async () => {
45
77
  await onItemSelect(itemInfo);
@@ -79,20 +111,39 @@ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboar
79
111
  }, children: elementArray[tabIndex] }, tabIndex));
80
112
  }) })] }));
81
113
  }
82
- else {
83
- return (_jsx(Box, { alignItems: "center", direction: "row", flex: "grow", justifyContent: "center", paddingX: 2, children: elementArray.map((element, index) => {
84
- return (_jsx(ScrollView, { contentContainerStyle: {
85
- flex: 1,
86
- }, style: {
87
- flex: 1,
114
+ if (desktopChildrenMinWidth !== undefined &&
115
+ elementArray.length >= 1 &&
116
+ elementArray.length <= 2) {
117
+ const childCount = elementArray.length;
118
+ const childWidth = desktopScrollWidth > 0
119
+ ? Math.max(desktopChildrenMinWidth, desktopScrollWidth / childCount)
120
+ : desktopChildrenMinWidth;
121
+ const rowWidth = Math.max(desktopScrollWidth, desktopChildrenMinWidth * childCount, childWidth * childCount);
122
+ return (_jsx(ScrollView, { contentContainerStyle: { flexDirection: "row", width: rowWidth }, horizontal: true, nestedScrollEnabled: true, onLayout: (event) => {
123
+ const nextWidth = event.nativeEvent.layout.width;
124
+ setDesktopScrollWidth((current) => (current === nextWidth ? current : nextWidth));
125
+ }, style: { flex: 1, height: "100%" }, testID: "split-page-desktop-children-scroll", children: elementArray.map((element, index) => {
126
+ return (_jsx(ScrollView, { contentContainerStyle: { flexGrow: 1 }, style: {
127
+ flexGrow: 0,
128
+ flexShrink: 0,
88
129
  height: "100%",
89
- width: "60%",
90
- }, children: element }, index));
130
+ maxWidth: childWidth,
131
+ width: childWidth,
132
+ }, testID: `split-page-desktop-child-${index}`, children: element }, index));
91
133
  }) }));
92
134
  }
135
+ return (_jsx(Box, { alignItems: "center", direction: "row", flex: "grow", justifyContent: "center", paddingX: 2, children: elementArray.map((element, index) => {
136
+ return (_jsx(ScrollView, { contentContainerStyle: {
137
+ flex: 1,
138
+ }, style: {
139
+ flex: 1,
140
+ height: "100%",
141
+ width: "60%",
142
+ }, children: element }, index));
143
+ }) }));
93
144
  };
94
145
  const renderMobileList = () => {
95
- if (isMobileLayout && selectedId !== undefined) {
146
+ if (isNarrowLayout && isDetailActive) {
96
147
  return null;
97
148
  }
98
149
  return (_jsxs(View, { style: {
@@ -106,21 +157,69 @@ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboar
106
157
  }, children: [renderListViewHeader?.(), _jsx(FlatList, { data: listViewData, extraData: listViewExtraData, keyExtractor: (item) => item.id, nestedScrollEnabled: true, renderItem: renderItem })] }));
107
158
  };
108
159
  const renderMobileListContent = () => {
109
- if (isMobileLayout && selectedId === undefined) {
160
+ if (isNarrowLayout && !isDetailActive) {
110
161
  return null;
111
162
  }
112
- return (_jsxs(Box, { flex: "grow", padding: 2, children: [isMobileLayout && (_jsx(Box, { width: "100%", children: _jsx(IconButton, { accessibilityHint: "close split page", accessibilityLabel: "close", iconName: "xmark", onClick: () => onItemDeselect() }) })), renderContent?.(selectedId)] }));
163
+ return (_jsxs(Box, { flex: "grow", padding: 2, children: [isNarrowLayout && (_jsx(Box, { width: "100%", children: _jsx(IconButton, { accessibilityHint: "close split page", accessibilityLabel: "close", iconName: "xmark", onClick: () => onItemDeselect() }) })), renderContent?.(selectedId)] }));
164
+ };
165
+ const showMobileChild = (destination) => {
166
+ setActiveChildIndex(destination);
167
+ swiperRef.current?.scrollToIndex({ animated: true, index: destination });
168
+ };
169
+ const renderLabeledMobilePager = (labels) => {
170
+ const pageWidth = measuredPageWidth > 0 ? measuredPageWidth : windowWidth;
171
+ const lastIndex = elementArray.length - 1;
172
+ const controlBottom = (bottomNavBarHeight ?? 0) + 8;
173
+ return (_jsxs(View, { onLayout: (event) => {
174
+ const nextWidth = event.nativeEvent.layout.width;
175
+ setMeasuredPageWidth((current) => (current === nextWidth ? current : nextWidth));
176
+ }, style: { flex: 1, width: "100%" }, testID: "split-page-mobile-children", children: [_jsx(SwiperFlatList, { getItemLayout: (_data, index) => ({
177
+ index,
178
+ length: pageWidth,
179
+ offset: pageWidth * index,
180
+ }), nestedScrollEnabled: true, onChangeIndex: ({ index }) => {
181
+ setActiveChildIndex(index);
182
+ }, ref: swiperRef, renderAll: true, style: { width: "100%" }, children: elementArray.map((element, index) => {
183
+ return (_jsx(View, { style: {
184
+ height: "100%",
185
+ padding: 0,
186
+ paddingBottom: bottomNavBarHeight,
187
+ width: pageWidth,
188
+ }, testID: `split-page-mobile-child-${index}`, children: element }, index));
189
+ }) }), narrowViewportListButtonLabel ? (_jsx(View, { style: {
190
+ bottom: controlBottom,
191
+ left: 16,
192
+ position: "absolute",
193
+ zIndex: 1,
194
+ }, children: _jsx(IconButton, { accessibilityHint: narrowViewportListButtonLabel, accessibilityLabel: narrowViewportListButtonLabel, backgroundOpacity: 0.88, iconName: "arrow-left", onClick: () => onItemDeselect(), testID: "split-page-back-to-list", variant: "muted" }) })) : null, _jsxs(View, { style: {
195
+ bottom: controlBottom,
196
+ flexDirection: "row",
197
+ gap: 8,
198
+ position: "absolute",
199
+ right: 16,
200
+ zIndex: 1,
201
+ }, children: [activeChildIndex > 0 ? (_jsx(IconButton, { accessibilityLabel: `Show previous column: ${labels[activeChildIndex - 1]}`, backgroundOpacity: 0.88, iconName: "chevron-left", onClick: () => {
202
+ showMobileChild(activeChildIndex - 1);
203
+ }, testID: "split-page-column-previous", variant: "muted" })) : null, activeChildIndex < lastIndex ? (_jsx(IconButton, { accessibilityLabel: `Show next column: ${labels[activeChildIndex + 1]}`, backgroundOpacity: 0.88, iconName: "chevron-right", onClick: () => {
204
+ showMobileChild(activeChildIndex + 1);
205
+ }, testID: "split-page-column-next", variant: "muted" })) : null] })] }));
113
206
  };
114
207
  const renderMobileChildrenContent = () => {
115
- if (selectedId === undefined) {
208
+ if (!isDetailActive) {
116
209
  return null;
117
210
  }
211
+ if (isNarrowLayout &&
212
+ elementArray.length > 1 &&
213
+ narrowViewportChildLabels !== undefined &&
214
+ narrowViewportChildLabels.length === elementArray.length) {
215
+ return renderLabeledMobilePager(narrowViewportChildLabels);
216
+ }
118
217
  return (_jsx(SwiperFlatList, { nestedScrollEnabled: true, paginationStyle: { justifyContent: "center", width: "95%" }, renderAll: true, showPagination: true, style: { width: "100%" }, children: elementArray.map((element, i) => {
119
218
  return (_jsx(View, { style: {
120
219
  height: elementArray.length > 1 ? "90%" : "100%",
121
220
  padding: 4,
122
221
  paddingBottom: bottomNavBarHeight,
123
- width: width - 8,
222
+ width: windowWidth - 8,
124
223
  }, children: element }, i));
125
224
  }) }));
126
225
  };
@@ -131,8 +230,14 @@ export const SplitPage = ({ children, tabs = [], loading = false, color, keyboar
131
230
  const renderMainContent = renderContent
132
231
  ? renderMobileListContent()
133
232
  : renderMobileChildrenContent();
134
- return selectedId === undefined ? renderMobileList() : renderMainContent;
233
+ return isDetailActive ? renderMainContent : renderMobileList();
135
234
  };
136
- return (_jsxs(Box, { avoidKeyboard: true, color: color || "neutralLight", direction: "row", display: "flex", height: "100%", keyboardOffset: keyboardOffset, padding: 2, width: "100%", children: [loading === true && (_jsx(Spinner, { color: theme.text.primary, size: "md" })), isMobileLayout ? renderMobileSplitPage() : renderSplitPage()] }));
235
+ const isLabeledPagerBody = isNarrowLayout &&
236
+ isDetailActive &&
237
+ !renderContent &&
238
+ elementArray.length > 1 &&
239
+ narrowViewportChildLabels !== undefined &&
240
+ narrowViewportChildLabels.length === elementArray.length;
241
+ return (_jsxs(Box, { avoidKeyboard: true, color: color || "neutralLight", direction: "row", display: "flex", height: "100%", keyboardOffset: keyboardOffset, padding: isLabeledPagerBody ? 0 : 2, width: "100%", children: [loading === true && (_jsx(Spinner, { color: theme.text.primary, size: "md" })), isNarrowLayout ? renderMobileSplitPage() : renderSplitPage()] }));
137
242
  };
138
243
  //# sourceMappingURL=SplitPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplitPage.js","sourceRoot":"","sources":["../src/SplitPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAuB,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtF,OAAO,EAAC,UAAU,EAA2B,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACnF,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,k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AE,KAAK,IAAI,cAAc,EAC9B,SAAS,EAAC,KAAK,EACf,OAAO,EAAC,MAAM,EACd,MAAM,EAAC,MAAM,EACb,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACnC,KAAK,EAAC,MAAM,aAEX,OAAO,KAAK,IAAI,IAAI,CACnB,KAAC,OAAO,IACN,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAA6D,EAC/E,IAAI,EAAC,IAAI,GACT,CACH,EACA,cAAc,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,IACzD,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { isMobileDevice } from "./MediaQuery";
3
+ import { isNarrowViewport } from "./MediaQuery";
4
4
  import { MobileAddressAutocomplete } from "./MobileAddressAutoComplete";
5
5
  import { TextField } from "./TextField";
6
6
  import { isNative, isValidGoogleApiKey } from "./Utilities";
@@ -11,7 +11,7 @@ export const UnifiedAddressAutoCompleteField = ({ disabled, googleMapsApiKey, go
11
11
  if (isWeb && isValidatedGoogleApiKey) {
12
12
  return (_jsx(WebAddressAutocomplete, { disabled: disabled, googleMapsApiKey: googleMapsApiKey, handleAddressChange: handleAddressChange, handleAutoCompleteChange: handleAutoCompleteChange, includeCounty: includeCounty, inputValue: inputValue, testID: testID }));
13
13
  }
14
- else if (isMobileDevice() && isNative() && isValidatedGoogleApiKey) {
14
+ else if (isNarrowViewport() && isNative() && isValidatedGoogleApiKey) {
15
15
  return (_jsx(MobileAddressAutocomplete, { disabled: disabled, googleMapsApiKey: googleMapsApiKey, handleAddressChange: handleAddressChange, handleAutoCompleteChange: handleAutoCompleteChange, includeCounty: includeCounty, inputValue: inputValue, styles: googlePlacesMobileStyles, testID: testID }));
16
16
  }
17
17
  else {
@@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,OAAO,CACrC,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EACxE,CAAC,gBAAgB,CAAC,CACnB,CAAC;IAEF,IAAI,KAAK,IAAI,uBAAuB,EAAE,CAAC;QACrC,OAAO,CACL,KAAC,sBAAsB,IACrB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,wBAAwB,EAAE,wBAAwB,EAClD,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC;SAAM,IAAI,gBAAgB,EAAE,IAAI,QAAQ,EAAE,IAAI,uBAAuB,EAAE,CAAC;QACvE,OAAO,CACL,KAAC,yBAAyB,IACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,wBAAwB,EAAE,wBAAwB,EAClD,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CACL,KAAC,SAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAQ,EAAE;gBACxB,mBAAmB,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,EACD,WAAW,EAAC,kBAAkB,EAC9B,MAAM,EAAE,MAAM,EACd,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,UAAU,GACjB,CACH,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Text } from "react-native";
3
- import { isMobileDevice } from "../MediaQuery";
3
+ import { isNarrowViewport } from "../MediaQuery";
4
4
  import { useTheme } from "../Theme";
5
5
  import { toTestProps } from "../testing/resolveTestId";
6
6
  import { isNative } from "../Utilities";
7
7
  export const FieldTitle = ({ text, testID }) => {
8
8
  const { theme } = useTheme();
9
- const isMobileOrNative = isMobileDevice() || isNative();
9
+ const isMobileOrNative = isNarrowViewport() || isNative();
10
10
  return (_jsx(Text, { style: {
11
11
  color: theme.text.primary,
12
12
  fontSize: isMobileOrNative ? 14 : 16,
@@ -1 +1 @@
1
- {"version":3,"file":"FieldTitle.js","sourceRoot":"","sources":["../../src/fieldElements/FieldTitle.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAOtC,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,EAAE,EAAE;IAChE,MAAM,EAAC,KAAK,EAAC,GAAG,QAAQ,EAAE,CAAC;IAC3B,MAAM,gBAAgB,GAAG,cAAc,EAAE,IAAI,QAAQ,EAAE,CAAC;IAExD,OAAO,CACL,KAAC,IAAI,IACH,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO;YACzB,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACpC,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,IAAI;SACjB,KACG,WAAW,CAAC,MAAM,CAAC,YAEtB,IAAI,GACA,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"FieldTitle.js","sourceRoot":"","sources":["../../src/fieldElements/FieldTitle.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAOtC,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,EAAE,EAAE;IAChE,MAAM,EAAC,KAAK,EAAC,GAAG,QAAQ,EAAE,CAAC;IAC3B,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,IAAI,QAAQ,EAAE,CAAC;IAE1D,OAAO,CACL,KAAC,IAAI,IACH,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO;YACzB,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACpC,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,IAAI;SACjB,KACG,WAAW,CAAC,MAAM,CAAC,YAEtB,IAAI,GACA,CACR,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -162,7 +162,7 @@
162
162
  "test:coverage": "TZ=America/New_York bun run ../scripts/check-coverage.ts",
163
163
  "types": "bun typedoc"
164
164
  },
165
- "version": "57.7.0",
165
+ "version": "57.8.0",
166
166
  "bugs": {
167
167
  "url": "https://github.com/TerrenoLabs/terreno/issues"
168
168
  },
package/src/Avatar.tsx CHANGED
@@ -18,7 +18,7 @@ import {MobileIcon} from "./icons/MobileIcon";
18
18
  import {OfflineIcon} from "./icons/OfflineIcon";
19
19
  import {OnlineIcon} from "./icons/OnlineIcon";
20
20
  import {OutOfOfficeIcon} from "./icons/OutOfficeIcon";
21
- import {isMobileDevice} from "./MediaQuery";
21
+ import {isNarrowViewport} from "./MediaQuery";
22
22
  import {useTheme} from "./Theme";
23
23
  import {Tooltip} from "./Tooltip";
24
24
 
@@ -296,7 +296,7 @@ export const Avatar: FC<AvatarProps> = ({
296
296
  width: widthPlusPadding,
297
297
  }}
298
298
  >
299
- <Tooltip idealPosition="top" text={isMobileDevice() ? undefined : status}>
299
+ <Tooltip idealPosition="top" text={isNarrowViewport() ? undefined : status}>
300
300
  {avatar}
301
301
  </Tooltip>
302
302
  {renderStatusIcon()}
@@ -4,7 +4,7 @@ import {assert} from "chai";
4
4
 
5
5
  import {Button} from "./Button";
6
6
  import type {ButtonProps} from "./Common";
7
- import {isMobileDevice} from "./MediaQuery";
7
+ import {isNarrowViewport} from "./MediaQuery";
8
8
  import * as ThemeModule from "./Theme";
9
9
  import {renderWithIcons, renderWithTheme, TEST_CUSTOM_ICON_TEST_ID} from "./test-utils";
10
10
  import {Unifier} from "./Unifier";
@@ -228,7 +228,7 @@ describe("Button", () => {
228
228
 
229
229
  it("skips equivalent parent updates and redraws changed props", () => {
230
230
  const handleClick = mock(() => Promise.resolve());
231
- const mobileDeviceMock = isMobileDevice as ReturnType<typeof mock>;
231
+ const mobileDeviceMock = isNarrowViewport as ReturnType<typeof mock>;
232
232
  mobileDeviceMock.mockClear();
233
233
  const {rerender} = renderWithTheme(<Button onClick={handleClick} text="Stable" />);
234
234
  const initialRenderCalls = mobileDeviceMock.mock.calls.length;
@@ -615,9 +615,9 @@ describe("Button", () => {
615
615
  expect(tree).toBeTruthy();
616
616
  });
617
617
 
618
- it("does not render tooltip wrapper when isMobileDevice is true", () => {
618
+ it("does not render tooltip wrapper when isNarrowViewport is true", () => {
619
619
  const nativeSpy = spyOn(Utilities, "isNative").mockReturnValue(false);
620
- (isMobileDevice as ReturnType<typeof mock>).mockImplementation(() => true);
620
+ (isNarrowViewport as ReturnType<typeof mock>).mockImplementation(() => true);
621
621
 
622
622
  const {getByText, toJSON} = renderWithTheme(
623
623
  <Button onClick={() => {}} text="No Tooltip" tooltipText="Should not wrap" />
@@ -627,12 +627,12 @@ describe("Button", () => {
627
627
  const tree = JSON.stringify(toJSON());
628
628
  expect(tree).not.toContain("Should not wrap");
629
629
  nativeSpy.mockRestore();
630
- (isMobileDevice as ReturnType<typeof mock>).mockImplementation(() => false);
630
+ (isNarrowViewport as ReturnType<typeof mock>).mockImplementation(() => false);
631
631
  });
632
632
 
633
633
  it("renders tooltip wrapper when tooltipText is provided and not native", () => {
634
634
  const nativeSpy = spyOn(Utilities, "isNative").mockReturnValue(false);
635
- (isMobileDevice as ReturnType<typeof mock>).mockImplementation(() => false);
635
+ (isNarrowViewport as ReturnType<typeof mock>).mockImplementation(() => false);
636
636
 
637
637
  const {getByText} = renderWithTheme(
638
638
  <Button onClick={() => {}} text="With Tooltip" tooltipText="Helpful tip" />
@@ -640,7 +640,7 @@ describe("Button", () => {
640
640
 
641
641
  expect(getByText("With Tooltip")).toBeTruthy();
642
642
  nativeSpy.mockRestore();
643
- (isMobileDevice as ReturnType<typeof mock>).mockImplementation(() => false);
643
+ (isNarrowViewport as ReturnType<typeof mock>).mockImplementation(() => false);
644
644
  });
645
645
 
646
646
  it("resets loading and rethrows when onClick rejects", async () => {
package/src/Button.tsx CHANGED
@@ -13,7 +13,7 @@ import {ActivityIndicator, Pressable, type PressableProps, Text, View} from "rea
13
13
  import {Box} from "./Box";
14
14
  import type {ButtonPressAnimation, ButtonProps} from "./Common";
15
15
  import {useCustomIcon} from "./IconRegistry";
16
- import {isMobileDevice} from "./MediaQuery";
16
+ import {isNarrowViewport} from "./MediaQuery";
17
17
  import {useTheme} from "./Theme";
18
18
  import {Tooltip} from "./Tooltip";
19
19
  import {Unifier} from "./Unifier";
@@ -307,7 +307,7 @@ const ConfirmationButton: React.FC<ButtonProps> = ({
307
307
 
308
308
  const ButtonRender: React.FC<ButtonProps> = (props) => {
309
309
  const {tooltipText, tooltipIdealPosition, tooltipIncludeArrow = false} = props;
310
- const isMobileOrNative = isMobileDevice() || isNative();
310
+ const isMobileOrNative = isNarrowViewport() || isNative();
311
311
  const button = props.withConfirmation ? (
312
312
  <ConfirmationButton {...props} />
313
313
  ) : (
package/src/Common.ts CHANGED
@@ -1207,6 +1207,50 @@ export interface SplitPageProps<TItem extends SplitPageListItem = SplitPageListI
1207
1207
  listViewMaxWidth?: number;
1208
1208
  renderChild?: () => ReactChild;
1209
1209
  onSelectionChange?: (value?: ListRenderItemInfo<TItem>) => void | Promise<void>;
1210
+ /**
1211
+ * Web only. The native SplitPage ignores this prop.
1212
+ * Use the narrow layout when the window width is less than or equal to this many pixels.
1213
+ * When omitted, the narrow layout follows `isNarrowViewport()`.
1214
+ */
1215
+ narrowBelowWidth?: number;
1216
+ /**
1217
+ * Web only. The native SplitPage ignores this prop.
1218
+ * Minimum width, in pixels, of each child in the desktop side-by-side layout.
1219
+ * Applies only when the viewport is not narrow and there are 1 or 2 non-null children.
1220
+ * When omitted, that layout stays a flex row. When there are more than 2 children, the
1221
+ * segmented-control layout is used and this prop is ignored.
1222
+ */
1223
+ desktopChildrenMinWidth?: number;
1224
+ /**
1225
+ * Web only. The native SplitPage ignores this prop.
1226
+ * Opt-in labels for the narrow-viewport full-width pager, one per non-null child, in child
1227
+ * order. The pager is active only when the narrow layout is active, a detail view is active,
1228
+ * there is more than one non-null child, and this array's length equals that child count.
1229
+ * Otherwise the dotted swiper is used. A length mismatch is ignored and falls back to the
1230
+ * dotted swiper.
1231
+ */
1232
+ narrowViewportChildLabels?: string[];
1233
+ /**
1234
+ * Web only. The native SplitPage ignores this prop.
1235
+ * When true, the narrow detail view is active even if the internal list selection is unset.
1236
+ * Detail is active when the internal selection is set or this flag is true.
1237
+ * Showing the list clears only the internal selection. The parent turns this flag off.
1238
+ */
1239
+ narrowViewportSelectionActive?: boolean;
1240
+ /**
1241
+ * Web only. The native SplitPage ignores this prop.
1242
+ * Identity of the record the parent selected.
1243
+ * When this string changes, the narrow pager resets to the first child.
1244
+ * Width and layout measurement changes do not reset it.
1245
+ */
1246
+ narrowViewportSelectionKey?: string;
1247
+ /**
1248
+ * Web only. The native SplitPage ignores this prop.
1249
+ * When set on the opt-in narrow pager, show a return-to-list button that clears the
1250
+ * internal selection and calls onSelectionChange with undefined.
1251
+ * When omitted, that button is not rendered.
1252
+ */
1253
+ narrowViewportListButtonLabel?: string;
1210
1254
  }
1211
1255
 
1212
1256
  export type PermissionKind =
@@ -2335,6 +2379,12 @@ export interface IconButtonProps extends WithTestID {
2335
2379
  */
2336
2380
  variant?: "primary" | "secondary" | "muted" | "destructive" | "navigation" | "ghost";
2337
2381
 
2382
+ /**
2383
+ * When set, the variant background is passed through applyColorOpacity and the icon color
2384
+ * stays the opaque variant color. When omitted, the background is unchanged.
2385
+ */
2386
+ backgroundOpacity?: number;
2387
+
2338
2388
  /**
2339
2389
  * If true, a confirmation modal will be shown before the onClick action.
2340
2390
  * @default false
@@ -11,7 +11,7 @@ import {Calendar} from "react-native-calendars";
11
11
  import {Box} from "./Box";
12
12
  import type {DateTimeActionSheetProps, IconName} from "./Common";
13
13
  import {Heading} from "./Heading";
14
- import {isMobileDevice} from "./MediaQuery";
14
+ import {isNarrowViewport} from "./MediaQuery";
15
15
  import {Modal} from "./Modal";
16
16
  import {SelectField} from "./SelectField";
17
17
  import {useTheme} from "./Theme";
@@ -591,14 +591,14 @@ export const DateTimeActionSheet = ({
591
591
  >
592
592
  <View style={{display: "flex", justifyContent: "center", width: "100%"}}>
593
593
  {Boolean(type === "date") && <DateCalendar {...dateProps} />}
594
- {Boolean(type === "time" && isMobileDevice()) && <MobileTime {...timeProps} />}
595
- {Boolean(type === "time" && !isMobileDevice()) && <WebTime {...timeProps} />}
594
+ {Boolean(type === "time" && isNarrowViewport()) && <MobileTime {...timeProps} />}
595
+ {Boolean(type === "time" && !isNarrowViewport()) && <WebTime {...timeProps} />}
596
596
  {Boolean(type === "datetime") && (
597
597
  <Box>
598
598
  <Box marginBottom={2}>
599
599
  <DateCalendar {...dateProps} />
600
600
  </Box>
601
- {isMobileDevice() ? <MobileTime {...timeProps} /> : <WebTime {...timeProps} />}
601
+ {isNarrowViewport() ? <MobileTime {...timeProps} /> : <WebTime {...timeProps} />}
602
602
  </Box>
603
603
  )}
604
604
  </View>
@@ -18,7 +18,7 @@ import {renderWithTheme, setupComponentTest, teardownComponentTest} from "./test
18
18
 
19
19
  const setDesktop = () => {
20
20
  mock.module("./MediaQuery", () => ({
21
- isMobileDevice: () => false,
21
+ isNarrowViewport: () => false,
22
22
  mediaQuery: () => "lg" as const,
23
23
  mediaQueryLargerThan: () => true,
24
24
  mediaQuerySmallerThan: () => false,
@@ -27,7 +27,7 @@ const setDesktop = () => {
27
27
 
28
28
  const setMobile = () => {
29
29
  mock.module("./MediaQuery", () => ({
30
- isMobileDevice: () => true,
30
+ isNarrowViewport: () => true,
31
31
  mediaQuery: () => "xs" as const,
32
32
  mediaQueryLargerThan: () => false,
33
33
  mediaQuerySmallerThan: () => true,
@@ -35,11 +35,12 @@ const setMobile = () => {
35
35
  };
36
36
 
37
37
  // Restore MediaQuery to bunSetup defaults after all tests to prevent cross-file pollution.
38
- // bunSetup mocks: isMobileDevice → false, mediaQueryLargerThan → false.
38
+ // bunSetup mocks: isNarrowViewport → false, mediaQueryLargerThan → false, mediaQuerySmallerThan → false.
39
39
  const restoreDefault = () => {
40
40
  mock.module("./MediaQuery", () => ({
41
- isMobileDevice: mock(() => false),
41
+ isNarrowViewport: mock(() => false),
42
42
  mediaQueryLargerThan: mock(() => false),
43
+ mediaQuerySmallerThan: mock(() => false),
43
44
  }));
44
45
  };
45
46
 
@@ -11,7 +11,7 @@ import {FieldError} from "./fieldElements/FieldError";
11
11
  import {FieldHelperText} from "./fieldElements/FieldHelperText";
12
12
  import {FieldTitle} from "./fieldElements/FieldTitle";
13
13
  import {IconButton} from "./IconButton";
14
- import {isMobileDevice} from "./MediaQuery";
14
+ import {isNarrowViewport} from "./MediaQuery";
15
15
  import {SelectField} from "./SelectField";
16
16
  import {Text} from "./Text";
17
17
  import {useTheme} from "./Theme";
@@ -454,7 +454,7 @@ export const DateTimeField: FC<DateTimeFieldProps> = ({
454
454
 
455
455
  const [parentWidth, setParentWidth] = useState<number | null>(null);
456
456
  const parentIsLessThanBreakpointOrIsMobile =
457
- (parentWidth !== null && parentWidth < breakpoint) || isMobileDevice();
457
+ (parentWidth !== null && parentWidth < breakpoint) || isNarrowViewport();
458
458
 
459
459
  // We need to store the pending value in a ref because the state changes don't trigger
460
460
  // immediately, so onBlur may use stale values.
@@ -904,7 +904,7 @@ export const DateTimeField: FC<DateTimeFieldProps> = ({
904
904
  onRef: (el: TextInput | null, i: number) => (inputRefs.current[i] = el),
905
905
  };
906
906
 
907
- const isMobile = isMobileDevice();
907
+ const isMobile = isNarrowViewport();
908
908
  const isMobileTimeOnly = isMobile && type === "time";
909
909
  const isMobileDatetime = isMobile && type === "datetime";
910
910
  const showDateSection = type === "date" || type === "datetime";
@@ -295,6 +295,18 @@ describe("DropdownPanel trigger", () => {
295
295
  expect(getByTestId("f.panel")).toBeTruthy();
296
296
  });
297
297
 
298
+ it("hugs the trigger so the panel anchors to it, not to the surrounding row", () => {
299
+ // The wrapper is what gets measured. A stretched wrapper starts at the edge of the
300
+ // whole row, which anchors the panel far from a trigger aligned anywhere else.
301
+ const {getByTestId} = renderWithTheme(
302
+ <DropdownPanel testID="f">
303
+ <Text>Body</Text>
304
+ </DropdownPanel>
305
+ );
306
+ const wrapper = getByTestId("f").props.children[0];
307
+ expect(wrapper.props.style.alignSelf).toBe("flex-start");
308
+ });
309
+
298
310
  it("stretches the trigger wrapper when fullWidth is set", () => {
299
311
  const {getByTestId} = renderWithTheme(
300
312
  <DropdownPanel fullWidth testID="f">
@@ -346,7 +346,14 @@ export const DropdownPanel: FC<DropdownPanelProps> = ({
346
346
 
347
347
  return (
348
348
  <View style={{position: "relative", width: fullWidth ? "100%" : undefined}} testID={testID}>
349
- <View collapsable={false} ref={triggerRef}>
349
+ {/* The wrapper is what gets measured, so it must hug the trigger. A stretched
350
+ wrapper anchors the panel to the start of the whole row instead — which looks
351
+ right only while the trigger happens to sit at that edge. */}
352
+ <View
353
+ collapsable={false}
354
+ ref={triggerRef}
355
+ style={{alignSelf: fullWidth ? "stretch" : "flex-start"}}
356
+ >
350
357
  {renderTrigger ? renderTrigger({isOpen: Boolean(open), toggle}) : renderDefaultTrigger()}
351
358
  </View>
352
359
  {Boolean(open) && renderOverlay()}
@@ -8,7 +8,7 @@ import {FieldError} from "./fieldElements/FieldError";
8
8
  import {FieldHelperText} from "./fieldElements/FieldHelperText";
9
9
  import {FieldTitle} from "./fieldElements/FieldTitle";
10
10
  import {HeightActionSheet} from "./HeightActionSheet";
11
- import {isMobileDevice} from "./MediaQuery";
11
+ import {isNarrowViewport} from "./MediaQuery";
12
12
  import {SelectField} from "./SelectField";
13
13
  import {Text} from "./Text";
14
14
  import {useTheme} from "./Theme";
@@ -158,7 +158,7 @@ export const HeightField: FC<HeightFieldProps> = ({
158
158
  }) => {
159
159
  const {theme} = useTheme();
160
160
  const actionSheetRef = useRef<ActionSheet | null>(null);
161
- const isMobileOrNative = isMobileDevice() || isNative();
161
+ const isMobileOrNative = isNarrowViewport() || isNative();
162
162
 
163
163
  const minInches = min ?? DEFAULT_MIN_INCHES;
164
164
  const maxInches = max ?? DEFAULT_MAX_INCHES;