@dloizides/ui-nav 1.28.0 → 1.29.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.d.mts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +79 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -877,7 +877,8 @@ var NAV_TEST_IDS = {
|
|
|
877
877
|
/** the compact "Current ▾" trigger of `PillNav` with `variant={PillNavVariant.Menu}`. */
|
|
878
878
|
pillNavMenu: "pill-nav-menu",
|
|
879
879
|
/** the optional middle slot of `Topbar` (rendered only when `center` is passed). */
|
|
880
|
-
topbarCenter: "topbar-center"
|
|
880
|
+
topbarCenter: "topbar-center",
|
|
881
|
+
brandHome: "nav-brand-home"
|
|
881
882
|
};
|
|
882
883
|
var APP_SHELL_SUFFIX = {
|
|
883
884
|
content: "-content",
|
|
@@ -1384,6 +1385,7 @@ var NavBarInner = ({
|
|
|
1384
1385
|
() => contentMaxWidth === void 0 ? null : { maxWidth: contentMaxWidth, width: "100%", alignSelf: "center" },
|
|
1385
1386
|
[contentMaxWidth]
|
|
1386
1387
|
);
|
|
1388
|
+
useEffect(() => setOpen(false), [pathname]);
|
|
1387
1389
|
const toggleMenu = useCallback(() => setOpen((v) => !v), []);
|
|
1388
1390
|
const handlePress = useCallback(
|
|
1389
1391
|
(route) => {
|
|
@@ -1531,6 +1533,39 @@ var NavBar = ({ barTheme, ...props }) => {
|
|
|
1531
1533
|
if (barTheme === void 0) return /* @__PURE__ */ jsx(NavBarInner, { ...props });
|
|
1532
1534
|
return /* @__PURE__ */ jsx(UiProvider, { navigate, t, theme: barTheme, children: /* @__PURE__ */ jsx(NavBarInner, { ...props }) });
|
|
1533
1535
|
};
|
|
1536
|
+
var styles3 = StyleSheet.create({
|
|
1537
|
+
hitBox: { minHeight: MIN_TOUCH_TARGET, minWidth: MIN_TOUCH_TARGET, justifyContent: "center" }
|
|
1538
|
+
});
|
|
1539
|
+
function anchorProps(route) {
|
|
1540
|
+
return { href: route };
|
|
1541
|
+
}
|
|
1542
|
+
function hasNewTabModifier(event) {
|
|
1543
|
+
const { ctrlKey, metaKey, shiftKey } = event.nativeEvent;
|
|
1544
|
+
return ctrlKey === true || metaKey === true || shiftKey === true;
|
|
1545
|
+
}
|
|
1546
|
+
var BrandHomeLink = ({ route, label, onNavigate, children }) => {
|
|
1547
|
+
const { theme } = useUi();
|
|
1548
|
+
const [focused, setFocused] = useState(false);
|
|
1549
|
+
const handlePress = (event) => {
|
|
1550
|
+
if (hasNewTabModifier(event)) return;
|
|
1551
|
+
event.preventDefault();
|
|
1552
|
+
onNavigate(route);
|
|
1553
|
+
};
|
|
1554
|
+
return /* @__PURE__ */ jsx(
|
|
1555
|
+
Pressable,
|
|
1556
|
+
{
|
|
1557
|
+
accessibilityLabel: label,
|
|
1558
|
+
accessibilityRole: "link",
|
|
1559
|
+
style: [styles3.hitBox, focusRingStyle(focused, theme.palette.primary["500"])],
|
|
1560
|
+
testID: NAV_TEST_IDS.brandHome,
|
|
1561
|
+
onBlur: () => setFocused(false),
|
|
1562
|
+
onFocus: () => setFocused(true),
|
|
1563
|
+
onPress: handlePress,
|
|
1564
|
+
...anchorProps(route),
|
|
1565
|
+
children
|
|
1566
|
+
}
|
|
1567
|
+
);
|
|
1568
|
+
};
|
|
1534
1569
|
var Nav = (props) => {
|
|
1535
1570
|
if (props.orientation === "vertical") {
|
|
1536
1571
|
return /* @__PURE__ */ jsx(Sidebar, { ...props });
|
|
@@ -1548,7 +1583,7 @@ function resolveRailMode({ viewport, hasSidebar, hasCollapsed, range }) {
|
|
|
1548
1583
|
}
|
|
1549
1584
|
return viewport >= RAIL_FULL_BREAKPOINT ? "full" : "drawer";
|
|
1550
1585
|
}
|
|
1551
|
-
var
|
|
1586
|
+
var styles4 = StyleSheet.create({
|
|
1552
1587
|
band: { left: 0, position: "absolute", right: 0, top: 0 }
|
|
1553
1588
|
});
|
|
1554
1589
|
function readBackdrop(theme) {
|
|
@@ -1571,7 +1606,7 @@ function resolveShellBackdrop(theme, viewport, contentPadding, testID) {
|
|
|
1571
1606
|
View,
|
|
1572
1607
|
{
|
|
1573
1608
|
pointerEvents: "none",
|
|
1574
|
-
style: [
|
|
1609
|
+
style: [styles4.band, { backgroundColor: band.color, height: contentPadding + overlap }],
|
|
1575
1610
|
testID: `${testID}${APP_SHELL_SUFFIX.band}`
|
|
1576
1611
|
}
|
|
1577
1612
|
);
|
|
@@ -1583,7 +1618,7 @@ var CARD_BORDER_WIDTH = 1;
|
|
|
1583
1618
|
var CARD_TITLE_FONT_SIZE = 16;
|
|
1584
1619
|
var CARD_MESSAGE_FONT_SIZE = 14;
|
|
1585
1620
|
var CARD_TITLE_MARGIN_BOTTOM = 8;
|
|
1586
|
-
var
|
|
1621
|
+
var styles5 = StyleSheet.create({
|
|
1587
1622
|
// Loading is a TRANSITIONAL state: the spinner is an absolute overlay ON TOP of
|
|
1588
1623
|
// stably-mounted children, never a replacement for them. Replacing children here
|
|
1589
1624
|
// would unmount whatever they host (e.g. a navigator), and on remount React
|
|
@@ -1615,9 +1650,9 @@ function MessageCard({
|
|
|
1615
1650
|
}) {
|
|
1616
1651
|
const { theme } = useUi();
|
|
1617
1652
|
const colors = theme.colors;
|
|
1618
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
1619
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1620
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1653
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles5.card, { backgroundColor: colors.surface, borderColor: accentColor }], testID, children: [
|
|
1654
|
+
/* @__PURE__ */ jsx(Text, { style: [styles5.cardTitle, { color: accentColor }], children: message.titleText }),
|
|
1655
|
+
/* @__PURE__ */ jsx(Text, { style: [styles5.cardMessage, { color: colors.textSecondary }], children: message.messageText })
|
|
1621
1656
|
] });
|
|
1622
1657
|
}
|
|
1623
1658
|
function useContentBody(state, children, testID) {
|
|
@@ -1629,12 +1664,12 @@ function useContentBody(state, children, testID) {
|
|
|
1629
1664
|
return /* @__PURE__ */ jsx(MessageCard, { accentColor: errorColor, message: state.forbidden, testID: `${testID}${APP_SHELL_SUFFIX.forbidden}` });
|
|
1630
1665
|
if (state.error)
|
|
1631
1666
|
return /* @__PURE__ */ jsx(MessageCard, { accentColor: errorColor, message: state.error, testID: `${testID}${APP_SHELL_SUFFIX.error}` });
|
|
1632
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
1667
|
+
return /* @__PURE__ */ jsxs(View, { style: styles5.loadingHost, children: [
|
|
1633
1668
|
children,
|
|
1634
1669
|
state.loading === true ? /* @__PURE__ */ jsx(
|
|
1635
1670
|
View,
|
|
1636
1671
|
{
|
|
1637
|
-
style: [
|
|
1672
|
+
style: [styles5.loadingOverlay, { backgroundColor: theme.colors.background }],
|
|
1638
1673
|
testID: `${testID}${APP_SHELL_SUFFIX.loading}`,
|
|
1639
1674
|
children: /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" })
|
|
1640
1675
|
}
|
|
@@ -1661,7 +1696,7 @@ var DEFAULT_DRAWER_LABELS = {
|
|
|
1661
1696
|
closeLabel: "Close menu",
|
|
1662
1697
|
closeHint: "Close the navigation menu"
|
|
1663
1698
|
};
|
|
1664
|
-
var
|
|
1699
|
+
var styles6 = StyleSheet.create({
|
|
1665
1700
|
overlay: { ...StyleSheet.absoluteFillObject, zIndex: DRAWER_Z_INDEX },
|
|
1666
1701
|
// The scrim's tap-to-close hit area is anchored to the RIGHT of the panel
|
|
1667
1702
|
// (`left: DRAWER_WIDTH`), so it NEVER overlaps the panel: nav-item taps always
|
|
@@ -1696,10 +1731,10 @@ var MenuToggle = ({ label, hint, onOpen, testID }) => {
|
|
|
1696
1731
|
accessibilityHint: hint,
|
|
1697
1732
|
accessibilityLabel: label,
|
|
1698
1733
|
ringColor: theme.palette.primary["500"],
|
|
1699
|
-
style:
|
|
1734
|
+
style: styles6.menuToggle,
|
|
1700
1735
|
testID,
|
|
1701
1736
|
onPress: onOpen,
|
|
1702
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
1737
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles6.menuToggleGlyph, { color: theme.colors.text }], children: MENU_GLYPH2 })
|
|
1703
1738
|
}
|
|
1704
1739
|
);
|
|
1705
1740
|
};
|
|
@@ -1725,14 +1760,14 @@ var MobileDrawer = ({
|
|
|
1725
1760
|
node.addEventListener("click", handleClick);
|
|
1726
1761
|
return () => node.removeEventListener("click", handleClick);
|
|
1727
1762
|
}, [onClose]);
|
|
1728
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
1763
|
+
return /* @__PURE__ */ jsxs(View, { style: styles6.overlay, children: [
|
|
1729
1764
|
/* @__PURE__ */ jsx(
|
|
1730
1765
|
Pressable,
|
|
1731
1766
|
{
|
|
1732
1767
|
accessibilityHint: labels.closeHint,
|
|
1733
1768
|
accessibilityLabel: labels.closeLabel,
|
|
1734
1769
|
accessibilityRole: "button",
|
|
1735
|
-
style:
|
|
1770
|
+
style: styles6.scrim,
|
|
1736
1771
|
testID: scrimTestID,
|
|
1737
1772
|
onPress: onClose
|
|
1738
1773
|
}
|
|
@@ -1743,7 +1778,7 @@ var MobileDrawer = ({
|
|
|
1743
1778
|
ref: panelRef,
|
|
1744
1779
|
"aria-modal": true,
|
|
1745
1780
|
role: "dialog",
|
|
1746
|
-
style: [
|
|
1781
|
+
style: [styles6.panel, { backgroundColor: theme.colors.surface }],
|
|
1747
1782
|
testID: drawerTestID,
|
|
1748
1783
|
children: renderTextSlot(sidebar, { color: theme.colors.text })
|
|
1749
1784
|
}
|
|
@@ -1761,7 +1796,7 @@ function useContentMaxWidth(width) {
|
|
|
1761
1796
|
return resolveContentMaxWidth(width, viewport);
|
|
1762
1797
|
}
|
|
1763
1798
|
var DEFAULT_CONTENT_PADDING = 24;
|
|
1764
|
-
var
|
|
1799
|
+
var styles7 = StyleSheet.create({
|
|
1765
1800
|
root: { flex: 1 },
|
|
1766
1801
|
// Auth-pending spinner: an opaque absolute overlay over the mounted shell, so
|
|
1767
1802
|
// `children` (and any navigator they host) are never unmounted while the gate
|
|
@@ -1823,13 +1858,13 @@ var AppShell = ({
|
|
|
1823
1858
|
}, [isUnauthenticated, gate]);
|
|
1824
1859
|
const gatePending = gate?.pending === true;
|
|
1825
1860
|
if (isUnauthenticated) return null;
|
|
1826
|
-
const columnStyle = maxWidth === "full" ?
|
|
1827
|
-
const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [
|
|
1861
|
+
const columnStyle = maxWidth === "full" ? styles7.columnFull : [styles7.columnCapped, { maxWidth }];
|
|
1862
|
+
const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [styles7.chromeCapped, { maxWidth, paddingHorizontal: contentPadding }] : void 0;
|
|
1828
1863
|
const scroller = /* @__PURE__ */ jsxs(
|
|
1829
1864
|
ScrollView,
|
|
1830
1865
|
{
|
|
1831
|
-
contentContainerStyle: [
|
|
1832
|
-
style:
|
|
1866
|
+
contentContainerStyle: [styles7.scrollContent, { padding: contentPadding }],
|
|
1867
|
+
style: styles7.scroll,
|
|
1833
1868
|
testID: `${testID}${APP_SHELL_SUFFIX.content}`,
|
|
1834
1869
|
children: [
|
|
1835
1870
|
look.band,
|
|
@@ -1837,7 +1872,7 @@ var AppShell = ({
|
|
|
1837
1872
|
]
|
|
1838
1873
|
}
|
|
1839
1874
|
);
|
|
1840
|
-
const headerRegion = useDrawer ? /* @__PURE__ */ jsxs(View, { style: [
|
|
1875
|
+
const headerRegion = useDrawer ? /* @__PURE__ */ jsxs(View, { style: [styles7.headerRow, look.chrome], testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: [
|
|
1841
1876
|
/* @__PURE__ */ jsx(
|
|
1842
1877
|
MenuToggle,
|
|
1843
1878
|
{
|
|
@@ -1847,14 +1882,14 @@ var AppShell = ({
|
|
|
1847
1882
|
onOpen: openDrawer
|
|
1848
1883
|
}
|
|
1849
1884
|
),
|
|
1850
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1885
|
+
/* @__PURE__ */ jsx(View, { style: styles7.headerFill, children: renderTextSlot(header, { color: look.chromeText }) })
|
|
1851
1886
|
] }) : /* @__PURE__ */ jsx(View, { style: look.chrome, testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: renderTextSlot(header, { color: look.chromeText }) });
|
|
1852
1887
|
const railRegion = railMode === "full" ? /* @__PURE__ */ jsx(View, { testID: `${testID}${APP_SHELL_SUFFIX.sidebar}`, children: renderTextSlot(sidebar, { color: theme.colors.text }) }) : railMode === "collapsed" ? /* @__PURE__ */ jsx(View, { testID: `${testID}${APP_SHELL_SUFFIX.collapsedSidebar}`, children: renderTextSlot(collapsedSidebar, { color: theme.colors.text }) }) : null;
|
|
1853
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
1888
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles7.root, look.root], testID, children: [
|
|
1854
1889
|
headerRegion,
|
|
1855
1890
|
nav !== void 0 ? /* @__PURE__ */ jsx(View, { style: look.chrome, testID: `${testID}${APP_SHELL_SUFFIX.nav}`, children: navInnerStyle !== void 0 ? /* @__PURE__ */ jsx(View, { style: navInnerStyle, children: renderTextSlot(nav, { color: look.chromeText }) }) : renderTextSlot(nav, { color: look.chromeText }) }) : null,
|
|
1856
1891
|
banner !== void 0 ? /* @__PURE__ */ jsx(View, { testID: `${testID}${APP_SHELL_SUFFIX.banner}`, children: renderTextSlot(banner, { color: theme.colors.text }) }) : null,
|
|
1857
|
-
railRegion !== null ? /* @__PURE__ */ jsxs(View, { style:
|
|
1892
|
+
railRegion !== null ? /* @__PURE__ */ jsxs(View, { style: styles7.bodyRow, children: [
|
|
1858
1893
|
railRegion,
|
|
1859
1894
|
scroller
|
|
1860
1895
|
] }) : scroller,
|
|
@@ -1871,7 +1906,7 @@ var AppShell = ({
|
|
|
1871
1906
|
gatePending ? /* @__PURE__ */ jsx(
|
|
1872
1907
|
View,
|
|
1873
1908
|
{
|
|
1874
|
-
style: [
|
|
1909
|
+
style: [styles7.pendingOverlay, { backgroundColor: theme.colors.background }],
|
|
1875
1910
|
testID: `${testID}${APP_SHELL_SUFFIX.pending}`,
|
|
1876
1911
|
children: /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" })
|
|
1877
1912
|
}
|
|
@@ -2238,7 +2273,7 @@ var KEY_DOWN = "ArrowDown";
|
|
|
2238
2273
|
var KEY_UP = "ArrowUp";
|
|
2239
2274
|
var KEY_ENTER = "Enter";
|
|
2240
2275
|
var KEY_ESCAPE = "Escape";
|
|
2241
|
-
var
|
|
2276
|
+
var styles8 = StyleSheet.create({
|
|
2242
2277
|
overlay: { ...StyleSheet.absoluteFillObject, zIndex: OVERLAY_Z_INDEX, alignItems: "center" },
|
|
2243
2278
|
scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: SCRIM_COLOR2 },
|
|
2244
2279
|
panel: {
|
|
@@ -2267,14 +2302,14 @@ var PaletteRow = ({ item, selected, onChoose }) => {
|
|
|
2267
2302
|
accessibilityLabel: item.label,
|
|
2268
2303
|
accessibilityRole: "button",
|
|
2269
2304
|
accessibilityState: { selected },
|
|
2270
|
-
style: [
|
|
2305
|
+
style: [styles8.row, selected ? { backgroundColor: colors.border } : void 0],
|
|
2271
2306
|
testID: item.testID ?? item.key,
|
|
2272
2307
|
onPress: () => onChoose(item),
|
|
2273
2308
|
children: [
|
|
2274
2309
|
typeof item.renderIcon === "function" ? item.renderIcon(colors.textSecondary, NAV_ICON_SIZE) : null,
|
|
2275
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2276
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2277
|
-
item.hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2310
|
+
/* @__PURE__ */ jsxs(View, { style: styles8.rowText, children: [
|
|
2311
|
+
/* @__PURE__ */ jsx(Text, { style: [styles8.rowLabel, { color: colors.text }], children: item.label }),
|
|
2312
|
+
item.hint ? /* @__PURE__ */ jsx(Text, { style: [styles8.rowHint, { color: colors.textSecondary }], children: item.hint }) : null
|
|
2278
2313
|
] })
|
|
2279
2314
|
]
|
|
2280
2315
|
}
|
|
@@ -2314,14 +2349,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2314
2349
|
[results, selected, choose, onClose]
|
|
2315
2350
|
);
|
|
2316
2351
|
if (!open) return null;
|
|
2317
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
2352
|
+
return /* @__PURE__ */ jsxs(View, { style: styles8.overlay, children: [
|
|
2318
2353
|
/* @__PURE__ */ jsx(
|
|
2319
2354
|
Pressable,
|
|
2320
2355
|
{
|
|
2321
2356
|
accessibilityHint: labels.closeHint,
|
|
2322
2357
|
accessibilityLabel: labels.closeLabel,
|
|
2323
2358
|
accessibilityRole: "button",
|
|
2324
|
-
style:
|
|
2359
|
+
style: styles8.scrim,
|
|
2325
2360
|
testID: `${testID ?? "command-palette"}-scrim`,
|
|
2326
2361
|
onPress: onClose
|
|
2327
2362
|
}
|
|
@@ -2332,7 +2367,7 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2332
2367
|
"aria-modal": true,
|
|
2333
2368
|
"aria-label": labels.regionLabel,
|
|
2334
2369
|
role: "dialog",
|
|
2335
|
-
style: [
|
|
2370
|
+
style: [styles8.panel, { backgroundColor: colors.surface, borderColor: colors.border }],
|
|
2336
2371
|
testID: testID ?? "command-palette",
|
|
2337
2372
|
children: [
|
|
2338
2373
|
/* @__PURE__ */ jsx(
|
|
@@ -2342,14 +2377,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2342
2377
|
accessibilityLabel: labels.placeholder,
|
|
2343
2378
|
placeholder: labels.placeholder,
|
|
2344
2379
|
placeholderTextColor: colors.textSecondary,
|
|
2345
|
-
style: [
|
|
2380
|
+
style: [styles8.input, { color: colors.text, borderBottomColor: colors.border }],
|
|
2346
2381
|
testID: `${testID ?? "command-palette"}-input`,
|
|
2347
2382
|
value: query,
|
|
2348
2383
|
onChangeText: setQuery,
|
|
2349
2384
|
onKeyPress
|
|
2350
2385
|
}
|
|
2351
2386
|
),
|
|
2352
|
-
results.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2387
|
+
results.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles8.empty, { color: colors.textSecondary }], children: labels.emptyText }) : /* @__PURE__ */ jsx(ScrollView, { keyboardShouldPersistTaps: "handled", style: styles8.list, children: results.map((item, index) => /* @__PURE__ */ jsx(PaletteRow, { item, selected: index === selected, onChoose: choose }, item.key)) })
|
|
2353
2388
|
]
|
|
2354
2389
|
}
|
|
2355
2390
|
)
|
|
@@ -2454,7 +2489,7 @@ var TAB_MIN_HEIGHT = 56;
|
|
|
2454
2489
|
var LABEL_SIZE = 12;
|
|
2455
2490
|
var LABEL_GAP = 2;
|
|
2456
2491
|
var TAB_PADDING = 4;
|
|
2457
|
-
var
|
|
2492
|
+
var styles9 = StyleSheet.create({
|
|
2458
2493
|
tab: {
|
|
2459
2494
|
flex: 1,
|
|
2460
2495
|
minHeight: TAB_MIN_HEIGHT,
|
|
@@ -2491,31 +2526,31 @@ var BottomTab = ({
|
|
|
2491
2526
|
accessibilityLabel: item.label,
|
|
2492
2527
|
accessibilityRole: "link",
|
|
2493
2528
|
accessibilityState: { selected: isActive },
|
|
2494
|
-
style: [
|
|
2529
|
+
style: [styles9.tab, { opacity: feedback.opacity }],
|
|
2495
2530
|
testID: item.testID ?? item.key,
|
|
2496
2531
|
onPress: () => onPress(item.route),
|
|
2497
2532
|
onPressIn: () => setPressed(true),
|
|
2498
2533
|
onPressOut: () => setPressed(false),
|
|
2499
2534
|
...ariaCurrentProps3(isActive),
|
|
2500
2535
|
children: [
|
|
2501
|
-
/* @__PURE__ */ jsxs(Animated.View, { style: [
|
|
2536
|
+
/* @__PURE__ */ jsxs(Animated.View, { style: [styles9.iconWrap, { transform: [{ scale }] }], children: [
|
|
2502
2537
|
feedback.pillScale === null ? null : /* @__PURE__ */ jsx(
|
|
2503
2538
|
View,
|
|
2504
2539
|
{
|
|
2505
2540
|
pointerEvents: "none",
|
|
2506
|
-
style: [
|
|
2541
|
+
style: [styles9.pill, { backgroundColor: colors.pill, transform: [{ scale: feedback.pillScale }] }, motion]
|
|
2507
2542
|
}
|
|
2508
2543
|
),
|
|
2509
2544
|
/* @__PURE__ */ jsx(View, { style: [{ transform: feedback.iconTransform }, motion], children: item.renderIcon?.(color, ICON_SIZE) })
|
|
2510
2545
|
] }),
|
|
2511
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2546
|
+
/* @__PURE__ */ jsx(Text, { style: [styles9.label, { color }], children: item.label })
|
|
2512
2547
|
]
|
|
2513
2548
|
}
|
|
2514
2549
|
);
|
|
2515
2550
|
};
|
|
2516
2551
|
var DEFAULT_TEST_ID = "bottom-tab-bar";
|
|
2517
2552
|
var SLIDER_HEIGHT = 3;
|
|
2518
|
-
var
|
|
2553
|
+
var styles10 = StyleSheet.create({
|
|
2519
2554
|
bar: { flexDirection: "row", borderTopWidth: StyleSheet.hairlineWidth },
|
|
2520
2555
|
slider: { position: "absolute", top: 0, height: SLIDER_HEIGHT }
|
|
2521
2556
|
});
|
|
@@ -2542,14 +2577,14 @@ var BottomTabBar = ({
|
|
|
2542
2577
|
{
|
|
2543
2578
|
"aria-label": regionLabel,
|
|
2544
2579
|
role: "navigation",
|
|
2545
|
-
style: [
|
|
2580
|
+
style: [styles10.bar, { backgroundColor: theme.colors.surface, borderTopColor: theme.colors.border }, containerStyle],
|
|
2546
2581
|
testID,
|
|
2547
2582
|
children: [
|
|
2548
2583
|
bar === null ? null : /* @__PURE__ */ jsx(
|
|
2549
2584
|
View,
|
|
2550
2585
|
{
|
|
2551
2586
|
pointerEvents: "none",
|
|
2552
|
-
style: [
|
|
2587
|
+
style: [styles10.slider, { left: bar.left, width: bar.width, backgroundColor: primary }, webTransition("left", barMs, reducedMotion)]
|
|
2553
2588
|
}
|
|
2554
2589
|
),
|
|
2555
2590
|
items.map((item) => /* @__PURE__ */ jsx(
|
|
@@ -2570,6 +2605,6 @@ var BottomTabBar = ({
|
|
|
2570
2605
|
);
|
|
2571
2606
|
};
|
|
2572
2607
|
|
|
2573
|
-
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, AppShell, BASE_INDENT, BottomTabBar, CHEVRON_ICON_SIZE, CollapsedRail, CommandPalette, CommandPaletteTrigger, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, NavExpandableItem, NavHoverFeedback, NavOverflowMenu, NavShell, PillNav, PillNavVariant, RAIL_FULL_BREAKPOINT, Sidebar, SidebarChevron, SidebarSearch, TabFeedback, Topbar, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
2608
|
+
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, AppShell, BASE_INDENT, BottomTabBar, BrandHomeLink, CHEVRON_ICON_SIZE, CollapsedRail, CommandPalette, CommandPaletteTrigger, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, NavExpandableItem, NavHoverFeedback, NavOverflowMenu, NavShell, PillNav, PillNavVariant, RAIL_FULL_BREAKPOINT, Sidebar, SidebarChevron, SidebarSearch, TabFeedback, Topbar, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
2574
2609
|
//# sourceMappingURL=index.mjs.map
|
|
2575
2610
|
//# sourceMappingURL=index.mjs.map
|