@dloizides/ui-nav 1.36.0 → 1.38.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
@@ -22,7 +22,6 @@ var NAV_LINK_GAP = 4;
22
22
  var navStyles = StyleSheet.create({
23
23
  // --- Sidebar ---
24
24
  sidebarContainer: {
25
- width: 220,
26
25
  paddingTop: 24,
27
26
  paddingHorizontal: 12,
28
27
  borderRightWidth: 1,
@@ -831,6 +830,20 @@ var SidebarSearch = ({
831
830
  }
832
831
  );
833
832
  };
833
+
834
+ // src/types.ts
835
+ var SIDEBAR_WIDTH_PX = {
836
+ default: 220,
837
+ sm: 240,
838
+ md: 264,
839
+ lg: 288
840
+ };
841
+ var NAV_BRAND_DEFAULTS = {
842
+ placement: "sidebar",
843
+ railWidth: "default",
844
+ drawerHeader: "none",
845
+ drawerWidth: "default"
846
+ };
834
847
  function isBareText(node) {
835
848
  return typeof node === "string" || typeof node === "number";
836
849
  }
@@ -895,11 +908,12 @@ var Sidebar = ({
895
908
  role: "navigation",
896
909
  style: [
897
910
  navStyles.sidebarContainer,
911
+ { width: SIDEBAR_WIDTH_PX.default },
898
912
  { backgroundColor: colors.surface, borderRightColor: colors.border },
899
913
  containerStyle
900
914
  ],
901
915
  children: [
902
- typeof title === "string" ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [navStyles.sidebarTitle, { color: colors.text }], children: title }) : /* @__PURE__ */ jsx(View, { style: navStyles.sidebarBrand, children: title }),
916
+ title === null ? null : typeof title === "string" ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [navStyles.sidebarTitle, { color: colors.text }], children: title }) : /* @__PURE__ */ jsx(View, { style: navStyles.sidebarBrand, children: title }),
903
917
  showInlineSearch && search !== void 0 ? /* @__PURE__ */ jsx(
904
918
  SidebarSearch,
905
919
  {
@@ -1829,6 +1843,33 @@ function useContentBody(state, children, testID) {
1829
1843
  ) : null
1830
1844
  ] });
1831
1845
  }
1846
+ var CLOSE_GLYPH = "\u2715";
1847
+ var CLOSE_GLYPH_FONT_SIZE = 18;
1848
+ var BAR_PADDING = 12;
1849
+ var styles8 = StyleSheet.create({
1850
+ bar: { flexDirection: "row", alignItems: "center", paddingLeft: BAR_PADDING, borderBottomWidth: 1 },
1851
+ brand: { flex: 1 },
1852
+ close: { minWidth: MIN_TOUCH_TARGET, minHeight: MIN_TOUCH_TARGET, alignItems: "center", justifyContent: "center" },
1853
+ glyph: { fontSize: CLOSE_GLYPH_FONT_SIZE, fontWeight: "700" }
1854
+ });
1855
+ var DrawerHeaderBar = ({ brand, closeLabel, closeHint, onClose, testID }) => {
1856
+ const { theme } = useUi();
1857
+ return /* @__PURE__ */ jsxs(View, { style: [styles8.bar, { borderBottomColor: theme.colors.border }], testID, children: [
1858
+ /* @__PURE__ */ jsx(View, { style: styles8.brand, children: brand }),
1859
+ /* @__PURE__ */ jsx(
1860
+ FocusableTouchable,
1861
+ {
1862
+ accessibilityHint: closeHint,
1863
+ accessibilityLabel: closeLabel,
1864
+ ringColor: theme.palette.primary["500"],
1865
+ style: styles8.close,
1866
+ testID: `${testID}-close`,
1867
+ onPress: onClose,
1868
+ children: /* @__PURE__ */ jsx(Text, { style: [styles8.glyph, { color: theme.colors.text }], children: CLOSE_GLYPH })
1869
+ }
1870
+ )
1871
+ ] });
1872
+ };
1832
1873
  var SCRIM_COLOR = "rgba(0, 0, 0, 0.5)";
1833
1874
  var MENU_GLYPH2 = "\u2630";
1834
1875
  var MENU_GLYPH_FONT_SIZE = 20;
@@ -1849,7 +1890,7 @@ var DEFAULT_DRAWER_LABELS = {
1849
1890
  closeLabel: "Close menu",
1850
1891
  closeHint: "Close the navigation menu"
1851
1892
  };
1852
- var styles8 = StyleSheet.create({
1893
+ var styles9 = StyleSheet.create({
1853
1894
  overlay: { ...StyleSheet.absoluteFillObject, zIndex: DRAWER_Z_INDEX },
1854
1895
  // The scrim's tap-to-close hit area is anchored to the RIGHT of the panel
1855
1896
  // (`left: DRAWER_WIDTH`), so it NEVER overlaps the panel: nav-item taps always
@@ -1867,6 +1908,8 @@ var styles8 = StyleSheet.create({
1867
1908
  // so on react-native-web it — and the nav leaves inside it — sit above the scrim
1868
1909
  // and receive presses instead of the scrim swallowing them.
1869
1910
  panel: { position: "absolute", top: 0, bottom: 0, left: 0, width: DRAWER_WIDTH, zIndex: PANEL_Z_INDEX },
1911
+ panelFull: { width: "100%" },
1912
+ panelBody: { flex: 1 },
1870
1913
  menuToggle: {
1871
1914
  minWidth: MIN_TOUCH_TARGET,
1872
1915
  minHeight: MIN_TOUCH_TARGET,
@@ -1884,10 +1927,10 @@ var MenuToggle = ({ label, hint, onOpen, testID }) => {
1884
1927
  accessibilityHint: hint,
1885
1928
  accessibilityLabel: label,
1886
1929
  ringColor: theme.palette.primary["500"],
1887
- style: styles8.menuToggle,
1930
+ style: styles9.menuToggle,
1888
1931
  testID,
1889
1932
  onPress: onOpen,
1890
- children: /* @__PURE__ */ jsx(Text, { style: [styles8.menuToggleGlyph, { color: theme.colors.text }], children: MENU_GLYPH2 })
1933
+ children: /* @__PURE__ */ jsx(Text, { style: [styles9.menuToggleGlyph, { color: theme.colors.text }], children: MENU_GLYPH2 })
1891
1934
  }
1892
1935
  );
1893
1936
  };
@@ -1896,10 +1939,14 @@ var MobileDrawer = ({
1896
1939
  labels,
1897
1940
  onClose,
1898
1941
  drawerTestID,
1899
- scrimTestID
1942
+ scrimTestID,
1943
+ header,
1944
+ width = "default"
1900
1945
  }) => {
1901
1946
  const { theme } = useUi();
1902
1947
  const panelRef = useRef(null);
1948
+ const isFull = width === "full";
1949
+ const showHeaderBar = header !== void 0 || isFull;
1903
1950
  useEffect(() => {
1904
1951
  const node = panelRef.current;
1905
1952
  if (node === null || typeof node.addEventListener !== "function") return void 0;
@@ -1913,27 +1960,39 @@ var MobileDrawer = ({
1913
1960
  node.addEventListener("click", handleClick);
1914
1961
  return () => node.removeEventListener("click", handleClick);
1915
1962
  }, [onClose]);
1916
- return /* @__PURE__ */ jsxs(View, { style: styles8.overlay, children: [
1917
- /* @__PURE__ */ jsx(
1963
+ return /* @__PURE__ */ jsxs(View, { style: styles9.overlay, children: [
1964
+ isFull ? null : /* @__PURE__ */ jsx(
1918
1965
  Pressable,
1919
1966
  {
1920
1967
  accessibilityHint: labels.closeHint,
1921
1968
  accessibilityLabel: labels.closeLabel,
1922
1969
  accessibilityRole: "button",
1923
- style: styles8.scrim,
1970
+ style: styles9.scrim,
1924
1971
  testID: scrimTestID,
1925
1972
  onPress: onClose
1926
1973
  }
1927
1974
  ),
1928
- /* @__PURE__ */ jsx(
1975
+ /* @__PURE__ */ jsxs(
1929
1976
  View,
1930
1977
  {
1931
1978
  ref: panelRef,
1932
1979
  "aria-modal": true,
1933
1980
  role: "dialog",
1934
- style: [styles8.panel, { backgroundColor: theme.colors.surface }],
1981
+ style: [styles9.panel, isFull ? styles9.panelFull : null, { backgroundColor: theme.colors.surface }],
1935
1982
  testID: drawerTestID,
1936
- children: /* @__PURE__ */ jsx(NavAccordionContext.Provider, { value: true, children: renderTextSlot(sidebar, { color: theme.colors.text }) })
1983
+ children: [
1984
+ showHeaderBar ? /* @__PURE__ */ jsx(
1985
+ DrawerHeaderBar,
1986
+ {
1987
+ brand: header,
1988
+ closeHint: labels.closeHint,
1989
+ closeLabel: labels.closeLabel,
1990
+ testID: `${drawerTestID}-header`,
1991
+ onClose
1992
+ }
1993
+ ) : null,
1994
+ /* @__PURE__ */ jsx(NavAccordionContext.Provider, { value: true, children: showHeaderBar ? /* @__PURE__ */ jsx(View, { style: styles9.panelBody, children: renderTextSlot(sidebar, { color: theme.colors.text }) }) : renderTextSlot(sidebar, { color: theme.colors.text }) })
1995
+ ]
1937
1996
  }
1938
1997
  )
1939
1998
  ] });
@@ -1949,7 +2008,7 @@ function useContentMaxWidth(width) {
1949
2008
  return resolveContentMaxWidth(width, viewport);
1950
2009
  }
1951
2010
  var DEFAULT_CONTENT_PADDING = 24;
1952
- var styles9 = StyleSheet.create({
2011
+ var styles10 = StyleSheet.create({
1953
2012
  root: { flex: 1 },
1954
2013
  // Auth-pending spinner: an opaque absolute overlay over the mounted shell, so
1955
2014
  // `children` (and any navigator they host) are never unmounted while the gate
@@ -2011,13 +2070,13 @@ var AppShell = ({
2011
2070
  }, [isUnauthenticated, gate]);
2012
2071
  const gatePending = gate?.pending === true;
2013
2072
  if (isUnauthenticated) return null;
2014
- const columnStyle = maxWidth === "full" ? styles9.columnFull : [styles9.columnCapped, { maxWidth }];
2015
- const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [styles9.chromeCapped, { maxWidth, paddingHorizontal: contentPadding }] : void 0;
2073
+ const columnStyle = maxWidth === "full" ? styles10.columnFull : [styles10.columnCapped, { maxWidth }];
2074
+ const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [styles10.chromeCapped, { maxWidth, paddingHorizontal: contentPadding }] : void 0;
2016
2075
  const scroller = /* @__PURE__ */ jsxs(
2017
2076
  ScrollView,
2018
2077
  {
2019
- contentContainerStyle: [styles9.scrollContent, { padding: contentPadding }],
2020
- style: styles9.scroll,
2078
+ contentContainerStyle: [styles10.scrollContent, { padding: contentPadding }],
2079
+ style: styles10.scroll,
2021
2080
  testID: `${testID}${APP_SHELL_SUFFIX.content}`,
2022
2081
  children: [
2023
2082
  look.band,
@@ -2025,7 +2084,7 @@ var AppShell = ({
2025
2084
  ]
2026
2085
  }
2027
2086
  );
2028
- const headerRegion = useDrawer ? /* @__PURE__ */ jsxs(View, { style: [styles9.headerRow, look.chrome], testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: [
2087
+ const headerRegion = useDrawer ? /* @__PURE__ */ jsxs(View, { style: [styles10.headerRow, look.chrome], testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: [
2029
2088
  /* @__PURE__ */ jsx(
2030
2089
  MenuToggle,
2031
2090
  {
@@ -2035,14 +2094,14 @@ var AppShell = ({
2035
2094
  onOpen: openDrawer
2036
2095
  }
2037
2096
  ),
2038
- /* @__PURE__ */ jsx(View, { style: styles9.headerFill, children: renderTextSlot(header, { color: look.chromeText }) })
2097
+ /* @__PURE__ */ jsx(View, { style: styles10.headerFill, children: renderTextSlot(header, { color: look.chromeText }) })
2039
2098
  ] }) : /* @__PURE__ */ jsx(View, { style: look.chrome, testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: renderTextSlot(header, { color: look.chromeText }) });
2040
2099
  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;
2041
- return /* @__PURE__ */ jsxs(View, { style: [styles9.root, look.root], testID, children: [
2100
+ return /* @__PURE__ */ jsxs(View, { style: [styles10.root, look.root], testID, children: [
2042
2101
  headerRegion,
2043
2102
  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,
2044
2103
  banner !== void 0 ? /* @__PURE__ */ jsx(View, { testID: `${testID}${APP_SHELL_SUFFIX.banner}`, children: renderTextSlot(banner, { color: theme.colors.text }) }) : null,
2045
- railRegion !== null ? /* @__PURE__ */ jsxs(View, { style: styles9.bodyRow, children: [
2104
+ railRegion !== null ? /* @__PURE__ */ jsxs(View, { style: styles10.bodyRow, children: [
2046
2105
  railRegion,
2047
2106
  scroller
2048
2107
  ] }) : scroller,
@@ -2051,15 +2110,17 @@ var AppShell = ({
2051
2110
  {
2052
2111
  drawerTestID: `${testID}${APP_SHELL_SUFFIX.drawer}`,
2053
2112
  labels: drawerLabels,
2113
+ header: mobileMenu?.header,
2054
2114
  scrimTestID: `${testID}${APP_SHELL_SUFFIX.scrim}`,
2055
- sidebar,
2115
+ sidebar: mobileMenu?.sidebar ?? sidebar,
2116
+ width: mobileMenu?.width,
2056
2117
  onClose: closeDrawer
2057
2118
  }
2058
2119
  ) : null,
2059
2120
  gatePending ? /* @__PURE__ */ jsx(
2060
2121
  View,
2061
2122
  {
2062
- style: [styles9.pendingOverlay, { backgroundColor: theme.colors.background }],
2123
+ style: [styles10.pendingOverlay, { backgroundColor: theme.colors.background }],
2063
2124
  testID: `${testID}${APP_SHELL_SUFFIX.pending}`,
2064
2125
  children: /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" })
2065
2126
  }
@@ -2120,6 +2181,45 @@ var CollapsedRail = ({
2120
2181
  }
2121
2182
  );
2122
2183
  };
2184
+ function renderShellSidebar({ sideRail, nav, width, showBrand }) {
2185
+ const brandSlot = sideRail.brand ?? sideRail.title;
2186
+ return /* @__PURE__ */ jsx(
2187
+ Sidebar,
2188
+ {
2189
+ collapseHint: sideRail.collapseHint,
2190
+ containerStyle: { width: SIDEBAR_WIDTH_PX[width], ...StyleSheet.flatten(sideRail.containerStyle) },
2191
+ enableInlineSearch: sideRail.enableInlineSearch,
2192
+ expandHint: sideRail.expandHint,
2193
+ footer: sideRail.footer,
2194
+ header: sideRail.header,
2195
+ items: sideRail.items,
2196
+ navigateHint: nav.navigateHint,
2197
+ paletteTrigger: sideRail.paletteTrigger,
2198
+ pathname: nav.pathname,
2199
+ regionLabel: nav.regionLabel,
2200
+ renderChevron: sideRail.renderChevron,
2201
+ search: sideRail.search,
2202
+ searchQuery: sideRail.searchQuery,
2203
+ title: showBrand ? brandSlot : null,
2204
+ onNavigate: nav.onNavigate,
2205
+ onSearchChange: sideRail.onSearchChange
2206
+ }
2207
+ );
2208
+ }
2209
+ var styles11 = StyleSheet.create({
2210
+ row: { flexDirection: "row", alignItems: "center" },
2211
+ brand: { justifyContent: "center", alignSelf: "stretch", paddingHorizontal: 12, borderBottomWidth: 1 },
2212
+ fill: { flex: 1 }
2213
+ });
2214
+ var TopbarBrandRow = ({ brand, brandWidth, testID, children }) => {
2215
+ const { width } = useWindowDimensions();
2216
+ const { colors } = useUi().theme;
2217
+ if (width < RAIL_FULL_BREAKPOINT) return /* @__PURE__ */ jsx(Fragment, { children });
2218
+ return /* @__PURE__ */ jsxs(View, { style: styles11.row, testID, children: [
2219
+ /* @__PURE__ */ jsx(View, { style: [styles11.brand, { backgroundColor: colors.background, borderBottomColor: colors.border }, brandWidth !== void 0 ? { width: brandWidth } : null], testID: `${testID}-brand`, children: brand }),
2220
+ /* @__PURE__ */ jsx(View, { style: styles11.fill, children })
2221
+ ] });
2222
+ };
2123
2223
  function wantsTopBar(layout, hasHeader) {
2124
2224
  return layout === "top" || layout === "both" || hasHeader;
2125
2225
  }
@@ -2138,6 +2238,8 @@ var NavShell = ({
2138
2238
  children,
2139
2239
  collapsedSidebar: collapsedSidebarProp,
2140
2240
  collapsedRailRange: collapsedRailRangeProp,
2241
+ brand,
2242
+ mobileMenu,
2141
2243
  ...shellProps
2142
2244
  }) => {
2143
2245
  const showTopBar = wantsTopBar(layout, header !== void 0);
@@ -2163,28 +2265,14 @@ var NavShell = ({
2163
2265
  onNavigate
2164
2266
  }
2165
2267
  ) : null;
2166
- const sidebarNode = showSideRail && sideRail !== void 0 ? /* @__PURE__ */ jsx(
2167
- Sidebar,
2168
- {
2169
- collapseHint: sideRail.collapseHint,
2170
- containerStyle: sideRail.containerStyle,
2171
- enableInlineSearch: sideRail.enableInlineSearch,
2172
- expandHint: sideRail.expandHint,
2173
- footer: sideRail.footer,
2174
- header: sideRail.header,
2175
- items: sideRail.items,
2176
- navigateHint,
2177
- paletteTrigger: sideRail.paletteTrigger,
2178
- pathname,
2179
- regionLabel,
2180
- renderChevron: sideRail.renderChevron,
2181
- search: sideRail.search,
2182
- searchQuery: sideRail.searchQuery,
2183
- title: sideRail.brand ?? sideRail.title,
2184
- onNavigate,
2185
- onSearchChange: sideRail.onSearchChange
2186
- }
2187
- ) : void 0;
2268
+ const nav = { pathname, onNavigate, regionLabel, navigateHint };
2269
+ const rail = showSideRail ? sideRail : void 0;
2270
+ const { placement, railWidth, drawerHeader, drawerWidth } = { ...NAV_BRAND_DEFAULTS, ...brand };
2271
+ const brandInBar = placement === "topbar" && rail?.brand !== void 0;
2272
+ const brandInDrawer = drawerHeader === "brand" ? rail?.brand : void 0;
2273
+ const sidebarNode = rail === void 0 ? void 0 : renderShellSidebar({ sideRail: rail, nav, width: railWidth, showBrand: !brandInBar });
2274
+ const drawerSidebar = rail !== void 0 && brandInDrawer !== void 0 && !brandInBar ? renderShellSidebar({ sideRail: rail, nav, width: railWidth, showBrand: false }) : void 0;
2275
+ const shellHeader = brandInBar ? /* @__PURE__ */ jsx(TopbarBrandRow, { brand: rail?.brand, brandWidth: SIDEBAR_WIDTH_PX[railWidth], testID: `${shellProps.testID}-topbar-brand-row`, children: headerNode }) : headerNode;
2188
2276
  const collapsedCfg = showSideRail ? sideRail?.collapsed : void 0;
2189
2277
  const collapsedNode = collapsedCfg !== void 0 && sideRail !== void 0 ? /* @__PURE__ */ jsx(
2190
2278
  CollapsedRail,
@@ -2205,7 +2293,8 @@ var NavShell = ({
2205
2293
  ...shellProps,
2206
2294
  collapsedRailRange: collapsedRange,
2207
2295
  collapsedSidebar: collapsedNode,
2208
- header: headerNode,
2296
+ header: shellHeader,
2297
+ mobileMenu: { ...mobileMenu, header: brandInDrawer, width: drawerWidth, sidebar: drawerSidebar },
2209
2298
  sidebar: sidebarNode,
2210
2299
  children
2211
2300
  }
@@ -2428,7 +2517,7 @@ var KEY_DOWN = "ArrowDown";
2428
2517
  var KEY_UP = "ArrowUp";
2429
2518
  var KEY_ENTER = "Enter";
2430
2519
  var KEY_ESCAPE = "Escape";
2431
- var styles10 = StyleSheet.create({
2520
+ var styles12 = StyleSheet.create({
2432
2521
  overlay: { ...StyleSheet.absoluteFillObject, zIndex: OVERLAY_Z_INDEX, alignItems: "center" },
2433
2522
  scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: SCRIM_COLOR2 },
2434
2523
  panel: {
@@ -2457,14 +2546,14 @@ var PaletteRow = ({ item, selected, onChoose }) => {
2457
2546
  accessibilityLabel: item.label,
2458
2547
  accessibilityRole: "button",
2459
2548
  accessibilityState: { selected },
2460
- style: [styles10.row, selected ? { backgroundColor: colors.border } : void 0],
2549
+ style: [styles12.row, selected ? { backgroundColor: colors.border } : void 0],
2461
2550
  testID: item.testID ?? item.key,
2462
2551
  onPress: () => onChoose(item),
2463
2552
  children: [
2464
2553
  typeof item.renderIcon === "function" ? item.renderIcon(colors.textSecondary, NAV_ICON_SIZE) : null,
2465
- /* @__PURE__ */ jsxs(View, { style: styles10.rowText, children: [
2466
- /* @__PURE__ */ jsx(Text, { style: [styles10.rowLabel, { color: colors.text }], children: item.label }),
2467
- item.hint ? /* @__PURE__ */ jsx(Text, { style: [styles10.rowHint, { color: colors.textSecondary }], children: item.hint }) : null
2554
+ /* @__PURE__ */ jsxs(View, { style: styles12.rowText, children: [
2555
+ /* @__PURE__ */ jsx(Text, { style: [styles12.rowLabel, { color: colors.text }], children: item.label }),
2556
+ item.hint ? /* @__PURE__ */ jsx(Text, { style: [styles12.rowHint, { color: colors.textSecondary }], children: item.hint }) : null
2468
2557
  ] })
2469
2558
  ]
2470
2559
  }
@@ -2504,14 +2593,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
2504
2593
  [results, selected, choose, onClose]
2505
2594
  );
2506
2595
  if (!open) return null;
2507
- return /* @__PURE__ */ jsxs(View, { style: styles10.overlay, children: [
2596
+ return /* @__PURE__ */ jsxs(View, { style: styles12.overlay, children: [
2508
2597
  /* @__PURE__ */ jsx(
2509
2598
  Pressable,
2510
2599
  {
2511
2600
  accessibilityHint: labels.closeHint,
2512
2601
  accessibilityLabel: labels.closeLabel,
2513
2602
  accessibilityRole: "button",
2514
- style: styles10.scrim,
2603
+ style: styles12.scrim,
2515
2604
  testID: `${testID ?? "command-palette"}-scrim`,
2516
2605
  onPress: onClose
2517
2606
  }
@@ -2522,7 +2611,7 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
2522
2611
  "aria-modal": true,
2523
2612
  "aria-label": labels.regionLabel,
2524
2613
  role: "dialog",
2525
- style: [styles10.panel, { backgroundColor: colors.surface, borderColor: colors.border }],
2614
+ style: [styles12.panel, { backgroundColor: colors.surface, borderColor: colors.border }],
2526
2615
  testID: testID ?? "command-palette",
2527
2616
  children: [
2528
2617
  /* @__PURE__ */ jsx(
@@ -2532,14 +2621,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
2532
2621
  accessibilityLabel: labels.placeholder,
2533
2622
  placeholder: labels.placeholder,
2534
2623
  placeholderTextColor: colors.textSecondary,
2535
- style: [styles10.input, { color: colors.text, borderBottomColor: colors.border }],
2624
+ style: [styles12.input, { color: colors.text, borderBottomColor: colors.border }],
2536
2625
  testID: `${testID ?? "command-palette"}-input`,
2537
2626
  value: query,
2538
2627
  onChangeText: setQuery,
2539
2628
  onKeyPress
2540
2629
  }
2541
2630
  ),
2542
- results.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles10.empty, { color: colors.textSecondary }], children: labels.emptyText }) : /* @__PURE__ */ jsx(ScrollView, { keyboardShouldPersistTaps: "handled", style: styles10.list, children: results.map((item, index) => /* @__PURE__ */ jsx(PaletteRow, { item, selected: index === selected, onChoose: choose }, item.key)) })
2631
+ results.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles12.empty, { color: colors.textSecondary }], children: labels.emptyText }) : /* @__PURE__ */ jsx(ScrollView, { keyboardShouldPersistTaps: "handled", style: styles12.list, children: results.map((item, index) => /* @__PURE__ */ jsx(PaletteRow, { item, selected: index === selected, onChoose: choose }, item.key)) })
2543
2632
  ]
2544
2633
  }
2545
2634
  )
@@ -2644,7 +2733,7 @@ var TAB_MIN_HEIGHT = 56;
2644
2733
  var LABEL_SIZE = 12;
2645
2734
  var LABEL_GAP = 2;
2646
2735
  var TAB_PADDING = 4;
2647
- var styles11 = StyleSheet.create({
2736
+ var styles13 = StyleSheet.create({
2648
2737
  tab: {
2649
2738
  flex: 1,
2650
2739
  minHeight: TAB_MIN_HEIGHT,
@@ -2681,31 +2770,31 @@ var BottomTab = ({
2681
2770
  accessibilityLabel: item.label,
2682
2771
  accessibilityRole: "link",
2683
2772
  accessibilityState: { selected: isActive },
2684
- style: [styles11.tab, { opacity: feedback.opacity }],
2773
+ style: [styles13.tab, { opacity: feedback.opacity }],
2685
2774
  testID: item.testID ?? item.key,
2686
2775
  onPress: () => onPress(item.route),
2687
2776
  onPressIn: () => setPressed(true),
2688
2777
  onPressOut: () => setPressed(false),
2689
2778
  ...ariaCurrentProps3(isActive),
2690
2779
  children: [
2691
- /* @__PURE__ */ jsxs(Animated.View, { style: [styles11.iconWrap, { transform: [{ scale }] }], children: [
2780
+ /* @__PURE__ */ jsxs(Animated.View, { style: [styles13.iconWrap, { transform: [{ scale }] }], children: [
2692
2781
  feedback.pillScale === null ? null : /* @__PURE__ */ jsx(
2693
2782
  View,
2694
2783
  {
2695
2784
  pointerEvents: "none",
2696
- style: [styles11.pill, { backgroundColor: colors.pill, transform: [{ scale: feedback.pillScale }] }, motion]
2785
+ style: [styles13.pill, { backgroundColor: colors.pill, transform: [{ scale: feedback.pillScale }] }, motion]
2697
2786
  }
2698
2787
  ),
2699
2788
  /* @__PURE__ */ jsx(View, { style: [{ transform: feedback.iconTransform }, motion], children: item.renderIcon?.(color, ICON_SIZE) })
2700
2789
  ] }),
2701
- /* @__PURE__ */ jsx(Text, { style: [styles11.label, { color }], children: item.label })
2790
+ /* @__PURE__ */ jsx(Text, { style: [styles13.label, { color }], children: item.label })
2702
2791
  ]
2703
2792
  }
2704
2793
  );
2705
2794
  };
2706
2795
  var DEFAULT_TEST_ID = "bottom-tab-bar";
2707
2796
  var SLIDER_HEIGHT = 3;
2708
- var styles12 = StyleSheet.create({
2797
+ var styles14 = StyleSheet.create({
2709
2798
  bar: { flexDirection: "row", borderTopWidth: StyleSheet.hairlineWidth },
2710
2799
  slider: { position: "absolute", top: 0, height: SLIDER_HEIGHT }
2711
2800
  });
@@ -2732,14 +2821,14 @@ var BottomTabBar = ({
2732
2821
  {
2733
2822
  "aria-label": regionLabel,
2734
2823
  role: "navigation",
2735
- style: [styles12.bar, { backgroundColor: theme.colors.surface, borderTopColor: theme.colors.border }, containerStyle],
2824
+ style: [styles14.bar, { backgroundColor: theme.colors.surface, borderTopColor: theme.colors.border }, containerStyle],
2736
2825
  testID,
2737
2826
  children: [
2738
2827
  bar === null ? null : /* @__PURE__ */ jsx(
2739
2828
  View,
2740
2829
  {
2741
2830
  pointerEvents: "none",
2742
- style: [styles12.slider, { left: bar.left, width: bar.width, backgroundColor: primary }, webTransition("left", barMs, reducedMotion)]
2831
+ style: [styles14.slider, { left: bar.left, width: bar.width, backgroundColor: primary }, webTransition("left", barMs, reducedMotion)]
2743
2832
  }
2744
2833
  ),
2745
2834
  items.map((item) => /* @__PURE__ */ jsx(
@@ -2760,6 +2849,6 @@ var BottomTabBar = ({
2760
2849
  );
2761
2850
  };
2762
2851
 
2763
- export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, AppShell, BASE_INDENT, BottomTabBar, BrandHomeLink, BrandMark, 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 };
2852
+ export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, AppShell, BASE_INDENT, BottomTabBar, BrandHomeLink, BrandMark, CHEVRON_ICON_SIZE, CollapsedRail, CommandPalette, CommandPaletteTrigger, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, HOVER_TINT_OPACITY, NAV_BRAND_DEFAULTS, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, NavExpandableItem, NavHoverFeedback, NavOverflowMenu, NavShell, PillNav, PillNavVariant, RAIL_FULL_BREAKPOINT, SIDEBAR_WIDTH_PX, Sidebar, SidebarChevron, SidebarSearch, TabFeedback, Topbar, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
2764
2853
  //# sourceMappingURL=index.mjs.map
2765
2854
  //# sourceMappingURL=index.mjs.map