@dloizides/ui-nav 1.16.0 → 1.16.1
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/CHANGELOG.md +13 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.16.1
|
|
4
|
+
|
|
5
|
+
- **Fix (NavShell forwards inline-search props to the inner `Sidebar`).** 1.16.0 added
|
|
6
|
+
desktop inline search to `Sidebar` (`enableInlineSearch`, `search`, controlled
|
|
7
|
+
`searchQuery` / `onSearchChange`), but all seven portals consume the higher-level
|
|
8
|
+
`NavShell` (via `sideRail`), which did **not** forward those props — so inline search was
|
|
9
|
+
unreachable by every real consumer. `NavShellSideRail` now carries the same four fields
|
|
10
|
+
(`enableInlineSearch?`, `search?: SidebarSearchConfig`, `searchQuery?`, `onSearchChange?`)
|
|
11
|
+
and threads them onto the `<Sidebar>` it builds. Desktop-vs-mobile resolution is unchanged
|
|
12
|
+
(inline ≥768, ⌘K palette <768 via `resolveSearchAffordance`).
|
|
13
|
+
- **Purely additive / backward compatible**: with the fields unset, `NavShell` renders
|
|
14
|
+
exactly as 1.16.0. No breaking change; no styling touched.
|
|
15
|
+
|
|
3
16
|
## 1.16.0
|
|
4
17
|
|
|
5
18
|
- **Feature (docs-style sidebar rail — hover wash, tinted active pill, rotating chevron).**
|
package/dist/index.d.mts
CHANGED
|
@@ -728,6 +728,19 @@ interface NavShellSideRail {
|
|
|
728
728
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
729
729
|
/** Optional collapsed (icon-only) rail config → the intermediate tablet tier. */
|
|
730
730
|
collapsed?: NavShellCollapsedRail;
|
|
731
|
+
/**
|
|
732
|
+
* Opt the inner `Sidebar` into its persistent desktop inline-search field.
|
|
733
|
+
* Requires `search` labels; when omitted the rail renders exactly as before.
|
|
734
|
+
* The ⌘K palette remains the search affordance on narrow viewports
|
|
735
|
+
* (see {@link resolveSearchAffordance}). Forwarded to `Sidebar.enableInlineSearch`.
|
|
736
|
+
*/
|
|
737
|
+
enableInlineSearch?: boolean;
|
|
738
|
+
/** Pre-localized inline-search strings — required for `enableInlineSearch`. Forwarded to `Sidebar.search`. */
|
|
739
|
+
search?: SidebarSearchConfig;
|
|
740
|
+
/** Controlled search query (optional — the Sidebar owns the state when omitted). Forwarded to `Sidebar.searchQuery`. */
|
|
741
|
+
searchQuery?: string;
|
|
742
|
+
/** Called on each query change (controlled or internal). Forwarded to `Sidebar.onSearchChange`. */
|
|
743
|
+
onSearchChange?: (query: string) => void;
|
|
731
744
|
}
|
|
732
745
|
/**
|
|
733
746
|
* `AppShell` props NavShell forwards straight through. It composes the `header`
|
package/dist/index.d.ts
CHANGED
|
@@ -728,6 +728,19 @@ interface NavShellSideRail {
|
|
|
728
728
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
729
729
|
/** Optional collapsed (icon-only) rail config → the intermediate tablet tier. */
|
|
730
730
|
collapsed?: NavShellCollapsedRail;
|
|
731
|
+
/**
|
|
732
|
+
* Opt the inner `Sidebar` into its persistent desktop inline-search field.
|
|
733
|
+
* Requires `search` labels; when omitted the rail renders exactly as before.
|
|
734
|
+
* The ⌘K palette remains the search affordance on narrow viewports
|
|
735
|
+
* (see {@link resolveSearchAffordance}). Forwarded to `Sidebar.enableInlineSearch`.
|
|
736
|
+
*/
|
|
737
|
+
enableInlineSearch?: boolean;
|
|
738
|
+
/** Pre-localized inline-search strings — required for `enableInlineSearch`. Forwarded to `Sidebar.search`. */
|
|
739
|
+
search?: SidebarSearchConfig;
|
|
740
|
+
/** Controlled search query (optional — the Sidebar owns the state when omitted). Forwarded to `Sidebar.searchQuery`. */
|
|
741
|
+
searchQuery?: string;
|
|
742
|
+
/** Called on each query change (controlled or internal). Forwarded to `Sidebar.onSearchChange`. */
|
|
743
|
+
onSearchChange?: (query: string) => void;
|
|
731
744
|
}
|
|
732
745
|
/**
|
|
733
746
|
* `AppShell` props NavShell forwards straight through. It composes the `header`
|
package/dist/index.js
CHANGED
|
@@ -1601,6 +1601,7 @@ var NavShell = ({
|
|
|
1601
1601
|
{
|
|
1602
1602
|
collapseHint: sideRail.collapseHint,
|
|
1603
1603
|
containerStyle: sideRail.containerStyle,
|
|
1604
|
+
enableInlineSearch: sideRail.enableInlineSearch,
|
|
1604
1605
|
expandHint: sideRail.expandHint,
|
|
1605
1606
|
footer: sideRail.footer,
|
|
1606
1607
|
header: sideRail.header,
|
|
@@ -1609,8 +1610,11 @@ var NavShell = ({
|
|
|
1609
1610
|
pathname,
|
|
1610
1611
|
regionLabel,
|
|
1611
1612
|
renderChevron: sideRail.renderChevron,
|
|
1613
|
+
search: sideRail.search,
|
|
1614
|
+
searchQuery: sideRail.searchQuery,
|
|
1612
1615
|
title: sideRail.title,
|
|
1613
|
-
onNavigate
|
|
1616
|
+
onNavigate,
|
|
1617
|
+
onSearchChange: sideRail.onSearchChange
|
|
1614
1618
|
}
|
|
1615
1619
|
) : void 0;
|
|
1616
1620
|
const collapsedCfg = showSideRail ? sideRail?.collapsed : void 0;
|