@pharos-ds/core 1.0.10-canary.2189f39 → 1.0.10
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/SideNav/SideNav.d.ts +1 -5
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +2 -8
- package/dist/pharos.umd.js +12 -12
- package/dist/pharos.umd.js.map +3 -3
- package/package.json +1 -1
- package/src/SideNav/SideNav.doc.mjs +4 -13
- package/src/SideNav/SideNav.test.tsx +0 -65
- package/src/SideNav/SideNav.tsx +3 -11
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Sidebar navigation container with five zones: header + topContent (sticky together),
|
|
8
8
|
* children (scrollable), footer, and footerIcons (sticky bottom).
|
|
9
|
-
* When collapsed to the icon rail, `footer` is hidden; `footerIcons` and the
|
|
10
|
-
* collapse button remain.
|
|
11
9
|
*
|
|
12
10
|
* Supports optional resize via drag handle at the inline-end edge.
|
|
13
11
|
*
|
|
@@ -45,9 +43,7 @@ export interface SideNavProps extends BaseProps<HTMLElement> {
|
|
|
45
43
|
*/
|
|
46
44
|
children: ReactNode;
|
|
47
45
|
/**
|
|
48
|
-
* Footer area above icon bar (e.g., promo cards).
|
|
49
|
-
* sidebar is collapsed to the icon rail (full-width content doesn't fit);
|
|
50
|
-
* use `footerIcons` for actions that must stay visible in the rail.
|
|
46
|
+
* Footer area above icon bar (e.g., promo cards).
|
|
51
47
|
*/
|
|
52
48
|
footer?: ReactNode;
|
|
53
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNav.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNav.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAKL,KAAK,S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AE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACP;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAmB,EACnB,SAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,+BAiQd;yBAhRe,OAAO"}
|
package/dist/SideNav/SideNav.js
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Sidebar navigation container with five zones: header + topContent (sticky together),
|
|
12
12
|
* children (scrollable), footer, and footerIcons (sticky bottom).
|
|
13
|
-
* When collapsed to the icon rail, `footer` is hidden; `footerIcons` and the
|
|
14
|
-
* collapse button remain.
|
|
15
13
|
*
|
|
16
14
|
* Supports optional resize via drag handle at the inline-end edge.
|
|
17
15
|
*
|
|
@@ -257,11 +255,7 @@ export function SideNav({
|
|
|
257
255
|
// Default mode — full sidebar
|
|
258
256
|
// =========================================================================
|
|
259
257
|
const hasStickyTop = !!(header || topContent);
|
|
260
|
-
|
|
261
|
-
// full-width (promo cards, segmented controls, account blocks) and doesn't
|
|
262
|
-
// fit the icon-only rail. `footerIcons` and the collapse button stay.
|
|
263
|
-
const visibleFooter = collapsed ? null : footer;
|
|
264
|
-
const hasStickyBottom = !!(visibleFooter || footerIcons);
|
|
258
|
+
const hasStickyBottom = !!(footer || footerIcons);
|
|
265
259
|
// The built-in collapse button only renders when collapse is enabled and it
|
|
266
260
|
// hasn't been opted out via `collapsible.hasButton: false` (e.g. when the
|
|
267
261
|
// consumer places a SideNavCollapseButton in the header instead).
|
|
@@ -329,7 +323,7 @@ export function SideNav({
|
|
|
329
323
|
className: "x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu"
|
|
330
324
|
}
|
|
331
325
|
}[!!collapsed << 0],
|
|
332
|
-
children: [
|
|
326
|
+
children: [footer, /*#__PURE__*/_jsxs("div", {
|
|
333
327
|
...{
|
|
334
328
|
0: {
|
|
335
329
|
className: "x78zum5 x6s0dn4 xzye2dw"
|