@canonical/react-ds-app 0.27.1-experimental.0 → 0.30.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/LICENSE +166 -0
- package/dist/esm/lib/ApplicationLayout/ApplicationLayout.js +15 -0
- package/dist/esm/lib/ApplicationLayout/ApplicationLayout.js.map +1 -0
- package/dist/esm/lib/ApplicationLayout/index.js +3 -0
- package/dist/esm/lib/ApplicationLayout/index.js.map +1 -0
- package/dist/esm/lib/ApplicationLayout/styles.css +29 -0
- package/dist/esm/lib/ApplicationLayout/types.js +3 -0
- package/dist/esm/lib/ApplicationLayout/types.js.map +1 -0
- package/dist/esm/lib/ContentLayout/ContentLayout.js +19 -0
- package/dist/esm/lib/ContentLayout/ContentLayout.js.map +1 -0
- package/dist/esm/lib/ContentLayout/index.js +3 -0
- package/dist/esm/lib/ContentLayout/index.js.map +1 -0
- package/dist/esm/lib/ContentLayout/styles.css +13 -0
- package/dist/esm/lib/ContentLayout/types.js +3 -0
- package/dist/esm/lib/ContentLayout/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/SideNavigation.js +46 -0
- package/dist/esm/lib/SideNavigation/SideNavigation.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js +17 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/index.js +3 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/styles.css +5 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Content/Content.js +16 -0
- package/dist/esm/lib/SideNavigation/common/Content/Content.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Content/index.js +3 -0
- package/dist/esm/lib/SideNavigation/common/Content/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Content/styles.css +33 -0
- package/dist/esm/lib/SideNavigation/common/Content/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Content/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Footer/Footer.js +16 -0
- package/dist/esm/lib/SideNavigation/common/Footer/Footer.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Footer/index.js +3 -0
- package/dist/esm/lib/SideNavigation/common/Footer/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Footer/styles.css +6 -0
- package/dist/esm/lib/SideNavigation/common/Footer/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Footer/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Header/Header.js +16 -0
- package/dist/esm/lib/SideNavigation/common/Header/Header.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Header/index.js +3 -0
- package/dist/esm/lib/SideNavigation/common/Header/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Header/styles.css +37 -0
- package/dist/esm/lib/SideNavigation/common/Header/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Header/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Item/Item.js +29 -0
- package/dist/esm/lib/SideNavigation/common/Item/Item.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Item/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Item/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Item/styles.css +54 -0
- package/dist/esm/lib/SideNavigation/common/Item/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Item/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js +39 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/styles.css +31 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/index.js +7 -0
- package/dist/esm/lib/SideNavigation/common/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/index.js +3 -0
- package/dist/esm/lib/SideNavigation/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/styles.css +25 -0
- package/dist/esm/lib/SideNavigation/types.js +2 -0
- package/dist/esm/lib/SideNavigation/types.js.map +1 -0
- package/dist/esm/lib/ViewLayout/ViewLayout.js +15 -0
- package/dist/esm/lib/ViewLayout/ViewLayout.js.map +1 -0
- package/dist/esm/lib/ViewLayout/index.js +3 -0
- package/dist/esm/lib/ViewLayout/index.js.map +1 -0
- package/dist/esm/lib/ViewLayout/styles.css +27 -0
- package/dist/esm/lib/ViewLayout/types.js +3 -0
- package/dist/esm/lib/ViewLayout/types.js.map +1 -0
- package/dist/esm/lib/index.js +4 -1
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/types/lib/ApplicationLayout/ApplicationLayout.d.ts +13 -0
- package/dist/types/lib/ApplicationLayout/ApplicationLayout.d.ts.map +1 -0
- package/dist/types/lib/ApplicationLayout/index.d.ts +3 -0
- package/dist/types/lib/ApplicationLayout/index.d.ts.map +1 -0
- package/dist/types/lib/ApplicationLayout/types.d.ts +12 -0
- package/dist/types/lib/ApplicationLayout/types.d.ts.map +1 -0
- package/dist/types/lib/ContentLayout/ContentLayout.d.ts +15 -0
- package/dist/types/lib/ContentLayout/ContentLayout.d.ts.map +1 -0
- package/dist/types/lib/ContentLayout/index.d.ts +3 -0
- package/dist/types/lib/ContentLayout/index.d.ts.map +1 -0
- package/dist/types/lib/ContentLayout/types.d.ts +17 -0
- package/dist/types/lib/ContentLayout/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/SideNavigation.d.ts +18 -0
- package/dist/types/lib/SideNavigation/SideNavigation.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts +14 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts +9 -0
- package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Content/Content.d.ts +13 -0
- package/dist/types/lib/SideNavigation/common/Content/Content.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Content/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/Content/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Content/types.d.ts +14 -0
- package/dist/types/lib/SideNavigation/common/Content/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts +13 -0
- package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Footer/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/Footer/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Footer/types.d.ts +14 -0
- package/dist/types/lib/SideNavigation/common/Footer/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Header/Header.d.ts +13 -0
- package/dist/types/lib/SideNavigation/common/Header/Header.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Header/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/Header/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Header/types.d.ts +14 -0
- package/dist/types/lib/SideNavigation/common/Header/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Item/Item.d.ts +21 -0
- package/dist/types/lib/SideNavigation/common/Item/Item.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Item/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/Item/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Item/types.d.ts +17 -0
- package/dist/types/lib/SideNavigation/common/Item/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts +20 -0
- package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/NavTree/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/NavTree/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts +11 -0
- package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/index.d.ts +6 -0
- package/dist/types/lib/SideNavigation/common/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/types.d.ts +53 -0
- package/dist/types/lib/SideNavigation/types.d.ts.map +1 -0
- package/dist/types/lib/ViewLayout/ViewLayout.d.ts +13 -0
- package/dist/types/lib/ViewLayout/ViewLayout.d.ts.map +1 -0
- package/dist/types/lib/ViewLayout/index.d.ts +3 -0
- package/dist/types/lib/ViewLayout/index.d.ts.map +1 -0
- package/dist/types/lib/ViewLayout/types.d.ts +12 -0
- package/dist/types/lib/ViewLayout/types.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +4 -1
- package/dist/types/lib/index.d.ts.map +1 -1
- package/package.json +19 -20
- package/dist/esm/lib/Button/Button.js +0 -10
- package/dist/esm/lib/Button/Button.js.map +0 -1
- package/dist/esm/lib/Button/index.js +0 -2
- package/dist/esm/lib/Button/index.js.map +0 -1
- package/dist/esm/lib/Button/styles.css +0 -63
- package/dist/esm/lib/Button/types.js +0 -12
- package/dist/esm/lib/Button/types.js.map +0 -1
- package/dist/esm/ui/Button/Button.js +0 -10
- package/dist/esm/ui/Button/Button.js.map +0 -1
- package/dist/esm/ui/Button/index.js +0 -2
- package/dist/esm/ui/Button/index.js.map +0 -1
- package/dist/esm/ui/Button/styles.css +0 -63
- package/dist/esm/ui/Button/types.js +0 -12
- package/dist/esm/ui/Button/types.js.map +0 -1
- package/dist/esm/ui/index.js +0 -2
- package/dist/esm/ui/index.js.map +0 -1
- package/dist/types/lib/Button/Button.d.ts +0 -6
- package/dist/types/lib/Button/Button.d.ts.map +0 -1
- package/dist/types/lib/Button/index.d.ts +0 -3
- package/dist/types/lib/Button/index.d.ts.map +0 -1
- package/dist/types/lib/Button/types.d.ts +0 -18
- package/dist/types/lib/Button/types.d.ts.map +0 -1
- package/dist/types/ui/Button/Button.d.ts +0 -6
- package/dist/types/ui/Button/Button.d.ts.map +0 -1
- package/dist/types/ui/Button/index.d.ts +0 -3
- package/dist/types/ui/Button/index.d.ts.map +0 -1
- package/dist/types/ui/Button/types.d.ts +0 -18
- package/dist/types/ui/Button/types.d.ts.map +0 -1
- package/dist/types/ui/index.d.ts +0 -2
- package/dist/types/ui/index.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* PR1: structural layout only. Colour/visual state (hover/active fills,
|
|
5
|
+
* text/icon colour) is deferred to PR2 (token pairings). A bare focus outline
|
|
6
|
+
* is included for keyboard focus visibility.
|
|
7
|
+
*/
|
|
8
|
+
.ds.side-navigation-item {
|
|
9
|
+
list-style: none;
|
|
10
|
+
|
|
11
|
+
/* The row: link or label. Shares the SideNavigation row template so the
|
|
12
|
+
leading icon aligns with the header logo. [icon] [label] [end].
|
|
13
|
+
Baseline grid: a fixed 5bU/40px row height (matching the header) carries the
|
|
14
|
+
vertical rhythm. Every cell top-anchors (align-items: start) so the .p line
|
|
15
|
+
boxes (icon + label) start at the same row top with equal line-height — their
|
|
16
|
+
baselines line up on the grid. No block padding — the fixed height owns it. */
|
|
17
|
+
& > .row {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: var(--sidenav-row-columns);
|
|
20
|
+
align-items: start;
|
|
21
|
+
gap: var(--dimension-100); /* 0.5rem */
|
|
22
|
+
width: 100%;
|
|
23
|
+
block-size: calc(var(--space-baseline) * 5); /* 40px — 5bU */
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding-block: 0;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Leading icon → start column. A .p line box: the icon is inline and rides the
|
|
30
|
+
baseline-snapped line like a text glyph, so it shares the label baseline. */
|
|
31
|
+
& .start {
|
|
32
|
+
text-align: center;
|
|
33
|
+
|
|
34
|
+
& > .ds.icon {
|
|
35
|
+
vertical-align: sub;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Label → middle (1fr) column. .p line box, top-anchored like .start. */
|
|
40
|
+
& .label {
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Trailing caret / slot → end (auto) column, top-anchored. */
|
|
45
|
+
& .end {
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Keyboard focus visibility (structural a11y; styling refined in PR2). */
|
|
50
|
+
& > .row:focus-visible {
|
|
51
|
+
outline: 2px solid currentColor;
|
|
52
|
+
outline-offset: -2px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigationTree } from "@canonical/react-hooks";
|
|
3
|
+
import { getItemId } from "@canonical/utils";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { Item } from "../Item/index.js";
|
|
6
|
+
import "./styles.css";
|
|
7
|
+
/**
|
|
8
|
+
* Internal: renders a navigation tree with two explicit loops (no recursion),
|
|
9
|
+
* deriving active state from useNavigationTree. Shared by Content and Footer —
|
|
10
|
+
* each region drives its own hook instance over its own root.
|
|
11
|
+
*
|
|
12
|
+
* Loop 1 — level-1 groups: each direct child of the root is a group; its
|
|
13
|
+
* label renders as a header (omitted when absent), wrapping its items.
|
|
14
|
+
* Loop 2 — level-2 items: each child of a group maps to a (flat) Item.
|
|
15
|
+
*
|
|
16
|
+
* The hook is generic over NavItem, so `icon`/`slot` survive typed onto the
|
|
17
|
+
* annotated nodes. `currentUrl` seeds initial selection and re-syncs it on
|
|
18
|
+
* navigation (the hook's `initialUrl` is mount-only), so the active item stays
|
|
19
|
+
* in sync with the consumer's router.
|
|
20
|
+
*/
|
|
21
|
+
const NavTree = ({ root, currentUrl, LinkComponent = "a", }) => {
|
|
22
|
+
const nav = useNavigationTree({ root, initialUrl: currentUrl });
|
|
23
|
+
const { index, selectItem } = nav;
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (currentUrl === undefined)
|
|
26
|
+
return;
|
|
27
|
+
const match = index[currentUrl];
|
|
28
|
+
if (match)
|
|
29
|
+
selectItem(match);
|
|
30
|
+
}, [currentUrl, index, selectItem]);
|
|
31
|
+
const groups = nav.annotatedRoot.items ?? [];
|
|
32
|
+
return (_jsx("div", { className: "ds nav-tree", children: groups.map((group) => {
|
|
33
|
+
const groupId = getItemId(group);
|
|
34
|
+
const items = group.items ?? [];
|
|
35
|
+
return (_jsxs("section", { className: "group", "data-depth": group.depth, children: [group.label ? (_jsx("span", { className: "header p", children: group.label })) : null, _jsx("ul", { className: "list", children: items.map((item) => (_jsx(Item, { ...item, active: nav.getNodeStatus(item).selected, LinkComponent: LinkComponent }, getItemId(item)))) })] }, groupId));
|
|
36
|
+
}) }));
|
|
37
|
+
};
|
|
38
|
+
export default NavTree;
|
|
39
|
+
//# sourceMappingURL=NavTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavTree.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/NavTree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,IAAI,EACJ,UAAU,EACV,aAAa,GAAG,GAAG,GACN,EAAsB,EAAE;IACrC,MAAM,GAAG,GAAG,iBAAiB,CAAU,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IACzE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;IAElC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,KAAK;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAEpC,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC;IAE7C,OAAO,CACL,cAAK,SAAS,EAAC,aAAa,YAEzB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACpB,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;YACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;YAChC,OAAO,CACL,mBAAS,SAAS,EAAC,OAAO,gBAA2B,KAAK,CAAC,KAAK,aAC7D,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACb,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,CAAC,KAAK,GAAQ,CAChD,CAAC,CAAC,CAAC,IAAI,EACR,aAAI,SAAS,EAAC,MAAM,YAEjB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,KAAC,IAAI,OAEC,IAAI,EACR,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,QAAQ,EACxC,aAAa,EAAE,aAAa,IAHvB,SAAS,CAAC,IAAI,CAAC,CAIpB,CACH,CAAC,GACC,KAdyB,OAAO,CAe7B,CACX,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SideNavigation NavTree — domain styles for the rendered tree structure
|
|
3
|
+
* (level-1 groups → header + level-2 item list). Owned here so Content and
|
|
4
|
+
* Footer can compose NavTree without re-declaring its internals. Structural
|
|
5
|
+
* only; colour/visual tokens are deferred to PR2.
|
|
6
|
+
*/
|
|
7
|
+
.ds.nav-tree {
|
|
8
|
+
display: contents;
|
|
9
|
+
|
|
10
|
+
& > .group {
|
|
11
|
+
> .header {
|
|
12
|
+
/* Group header sits on the baseline grid like a row: a fixed bU-multiple
|
|
13
|
+
height (4bU) with the .p label baseline-snapped, and inline padding that
|
|
14
|
+
aligns the header text with the item labels below (past the start column
|
|
15
|
+
+ its gap). */
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: baseline;
|
|
18
|
+
block-size: calc(var(--space-baseline) * 4); /* 32px — 4bU */
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
padding-inline-start: calc(var(--sidenav-start) + var(--dimension-100));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> .list {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
list-style: none;
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Generated by @canonical/summon-component:react v0.1.0
|
|
2
|
+
export * from "./CollapseToggle/index.js";
|
|
3
|
+
export * from "./Content/index.js";
|
|
4
|
+
export * from "./Footer/index.js";
|
|
5
|
+
export * from "./Header/index.js";
|
|
6
|
+
export * from "./Item/index.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/SideNavigation/common/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.side-navigation {
|
|
4
|
+
/* Component styles */
|
|
5
|
+
background: var(--color-foreground-navigation-primary);
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
/* Gap between Header / Content / Footer, in baseline units (2bU). */
|
|
9
|
+
gap: calc(var(--space-baseline) * 2);
|
|
10
|
+
/* Cap to the parent's height so the nav never overflows the screen; Header
|
|
11
|
+
and Footer pin (flex auto) and Content (flex:1, min-height:0) takes the
|
|
12
|
+
leftover space and scrolls internally.
|
|
13
|
+
KNOWN (parked, see K.02): Content is flex:1, so it absorbs *leftover*
|
|
14
|
+
height. If the nav's outer height isn't itself a whole baseline multiple,
|
|
15
|
+
that leftover is fractional and the Footer can seat a sub-pixel off the
|
|
16
|
+
grid. Not solved in this pass. */
|
|
17
|
+
max-height: 100%;
|
|
18
|
+
|
|
19
|
+
/* Shared row template: [start] [label/title] [end]. The Header and each Item
|
|
20
|
+
row use this so the logo aligns with the item icons down the rail. The
|
|
21
|
+
start column is a fixed width (3bU) matching the icon box; the logo sits in
|
|
22
|
+
it. */
|
|
23
|
+
--sidenav-start: calc(var(--space-baseline) * 3); /* 1.5rem — 3bU */
|
|
24
|
+
--sidenav-row-columns: var(--sidenav-start) 1fr auto;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
const componentCssClassName = "ds view-layout";
|
|
4
|
+
/**
|
|
5
|
+
* ViewLayout — a single view within the application shell.
|
|
6
|
+
*
|
|
7
|
+
* Divides its space between the view content (default slot, `1fr`) and an
|
|
8
|
+
* optional contextual aside (named slot, `min-content`), per the ontology
|
|
9
|
+
* instance `apps.layout.view_layout`.
|
|
10
|
+
*/
|
|
11
|
+
const ViewLayout = ({ className, children, aside, ...props }) => {
|
|
12
|
+
return (_jsxs("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [_jsx("div", { className: "content", children: children }), aside != null && _jsx("div", { className: "aside", children: aside })] }));
|
|
13
|
+
};
|
|
14
|
+
export default ViewLayout;
|
|
15
|
+
//# sourceMappingURL=ViewLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewLayout.js","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/ViewLayout.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACQ,EAAsB,EAAE;IACxC,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,aAET,cAAK,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAO,EACxC,KAAK,IAAI,IAAI,IAAI,cAAK,SAAS,EAAC,OAAO,YAAE,KAAK,GAAO,IAClD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAGxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.view-layout {
|
|
4
|
+
/* View: content (1fr) + contextual aside (min-content), per the ontology
|
|
5
|
+
instance apps.layout.view_layout. */
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: 1fr min-content;
|
|
8
|
+
gap: var(--view-layout-gap, var(--container-gap-default, 1rem));
|
|
9
|
+
block-size: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Without an aside slot, drop the trailing column entirely so neither the
|
|
13
|
+
empty track nor the gap offsets the content. */
|
|
14
|
+
.ds.view-layout:not(:has(> .aside)) {
|
|
15
|
+
grid-template-columns: 1fr;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* min-size 0 lets each region scroll internally instead of stretching the
|
|
19
|
+
view. The aside slot owns its inline size. */
|
|
20
|
+
.ds.view-layout > .content {
|
|
21
|
+
min-block-size: 0;
|
|
22
|
+
min-inline-size: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ds.view-layout > .aside {
|
|
26
|
+
min-block-size: 0;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/types.ts"],"names":[],"mappings":"AAAA,wDAAwD"}
|
package/dist/esm/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ApplicationLayoutProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* ApplicationLayout — the application shell.
|
|
6
|
+
*
|
|
7
|
+
* Divides the viewport between a leading navigation rail (named slot,
|
|
8
|
+
* `min-content`) and the main content area (default slot, `1fr`), per the
|
|
9
|
+
* ontology instance `apps.layout.application_layout`.
|
|
10
|
+
*/
|
|
11
|
+
declare const ApplicationLayout: ({ className, children, navigation, ...props }: ApplicationLayoutProps) => React.ReactElement;
|
|
12
|
+
export default ApplicationLayout;
|
|
13
|
+
//# sourceMappingURL=ApplicationLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationLayout.d.ts","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/ApplicationLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,iBAAiB,GAAI,+CAKxB,sBAAsB,KAAG,KAAK,CAAC,YAUjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface ApplicationLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Main content (default slot). Typically a ViewLayout. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Application navigation (named slot), rendered in the leading
|
|
7
|
+
* `min-content` column. Slot-agnostic by design: pass any ReactNode
|
|
8
|
+
* (e.g. a SideNavigation) — the layout does not import or assume one.
|
|
9
|
+
*/
|
|
10
|
+
navigation?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC5E,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ContentLayoutProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* ContentLayout — the responsive content grid of a view.
|
|
6
|
+
*
|
|
7
|
+
* Lays its children (default slot) on one of the design system's grid
|
|
8
|
+
* presets, per the ontology instance `apps.layout.content_layout`:
|
|
9
|
+
* fixed-responsive breakpoint columns by default, or the intrinsic
|
|
10
|
+
* (fluid auto-fill) grid via `grid="intrinsic"`. Children are grid items;
|
|
11
|
+
* span them via `grid-column`/`grid-row` where a card needs more room.
|
|
12
|
+
*/
|
|
13
|
+
declare const ContentLayout: ({ className, children, grid, ...props }: ContentLayoutProps) => React.ReactElement;
|
|
14
|
+
export default ContentLayout;
|
|
15
|
+
//# sourceMappingURL=ContentLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,QAAA,MAAM,aAAa,GAAI,yCAKpB,kBAAkB,KAAG,KAAK,CAAC,YAW7B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GridPreset } from "@canonical/ds-types";
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* The grid preset laying out the content items — `GridPreset` from
|
|
5
|
+
* \@canonical/ds-types, rendered by the `.grid` presets in
|
|
6
|
+
* \@canonical/styles: `responsive` (fixed-responsive, breakpoint-driven
|
|
7
|
+
* 4/8/12 columns) or `intrinsic` (fluid auto-fill groups of four
|
|
8
|
+
* `minmax(--grid-col-min, 1fr)` columns).
|
|
9
|
+
*/
|
|
10
|
+
export type ContentLayoutGrid = GridPreset;
|
|
11
|
+
export interface ContentLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/** Content items (default slot) — direct grid items. */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
/** Grid preset. Defaults to `responsive` (fixed-responsive). */
|
|
15
|
+
grid?: ContentLayoutGrid;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,wDAAwD;IACxD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gEAAgE;IAChE,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SideNavigationProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation — full-height application navigation rendered from a WD405
|
|
6
|
+
* Item tree. Owns its expand/collapse (rail) state — uncontrolled, seeded by
|
|
7
|
+
* `defaultExpanded` — and wires the header's collapse toggle to the content
|
|
8
|
+
* region it controls.
|
|
9
|
+
*
|
|
10
|
+
* Routing-agnostic: navigable items render via `LinkComponent` (default `"a"`);
|
|
11
|
+
* pass a router `Link` to integrate client-side navigation. The active item is
|
|
12
|
+
* resolved from `currentUrl`.
|
|
13
|
+
*
|
|
14
|
+
* @implements ds:apps.pattern.side-navigation
|
|
15
|
+
*/
|
|
16
|
+
declare const SideNavigation: ({ className, brand, applicationName, root, footerRoot, LinkComponent, currentUrl, defaultExpanded, ...props }: SideNavigationProps) => React.ReactElement;
|
|
17
|
+
export default SideNavigation;
|
|
18
|
+
//# sourceMappingURL=SideNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,cAAc,GAAI,+GAarB,mBAAmB,KAAG,KAAK,CAAC,YAoD9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { CollapseToggleProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.CollapseToggle — icon-only button that expands or collapses
|
|
6
|
+
* the navigation rail. Carries the disclosure ARIA contract: `aria-expanded`
|
|
7
|
+
* reflects the current state and `aria-controls` should point at the id of the
|
|
8
|
+
* navigation region it toggles.
|
|
9
|
+
*
|
|
10
|
+
* @implements ds:apps.subcomponent.side-navigation-collapse-toggle
|
|
11
|
+
*/
|
|
12
|
+
declare const CollapseToggle: ({ className, expanded, "aria-label": ariaLabel, ...props }: CollapseToggleProps) => React.ReactElement;
|
|
13
|
+
export default CollapseToggle;
|
|
14
|
+
//# sourceMappingURL=CollapseToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapseToggle.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/CollapseToggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAItB;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc,GAAI,4DAKrB,mBAAmB,KAAG,KAAK,CAAC,YAc9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
2
|
+
export interface CollapseToggleProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the navigation is currently expanded. Drives `aria-expanded` and
|
|
5
|
+
* the default `aria-label`. Controlled by the parent SideNavigation.
|
|
6
|
+
*/
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,mBACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ContentProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.Content — main navigation region. Renders the direct children
|
|
6
|
+
* of its `root` Item via useNavigationTree (selection, active state, keyboard
|
|
7
|
+
* traversal). Falls back to `children` when no `root` is given.
|
|
8
|
+
*
|
|
9
|
+
* @implements ds:apps.subcomponent.side-navigation-content
|
|
10
|
+
*/
|
|
11
|
+
declare const Content: ({ className, root, LinkComponent, currentUrl, children, ...props }: ContentProps) => React.ReactElement;
|
|
12
|
+
export default Content;
|
|
13
|
+
//# sourceMappingURL=Content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,GAAI,oEAOd,YAAY,KAAG,KAAK,CAAC,YAiBvB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Item as NavItem } from "@canonical/ds-types";
|
|
2
|
+
import type { ComponentType, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import type { LinkComponentProps } from "../../types.js";
|
|
4
|
+
export interface ContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Root item whose direct children are rendered as the nav item list. */
|
|
6
|
+
root?: NavItem;
|
|
7
|
+
/** Component used to render navigable items. Defaults to `"a"`. */
|
|
8
|
+
LinkComponent?: ComponentType<LinkComponentProps> | "a";
|
|
9
|
+
/** Live current location; resolves and keeps the active item in sync. */
|
|
10
|
+
currentUrl?: string;
|
|
11
|
+
/** Fallback content when no `root` is provided. */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAClE,yEAAyE;IACzE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { FooterProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.Footer — optional region pinned to the bottom, holding
|
|
6
|
+
* account-level or global actions. Drives its own useNavigationTree over its
|
|
7
|
+
* `root` (independent of Content). Falls back to `children` when no `root`.
|
|
8
|
+
*
|
|
9
|
+
* @implements ds:apps.subcomponent.side-navigation-footer
|
|
10
|
+
*/
|
|
11
|
+
declare const Footer: ({ className, root, LinkComponent, currentUrl, children, ...props }: FooterProps) => React.ReactElement;
|
|
12
|
+
export default Footer;
|
|
13
|
+
//# sourceMappingURL=Footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,GAAI,oEAOb,WAAW,KAAG,KAAK,CAAC,YAiBtB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Item as NavItem } from "@canonical/ds-types";
|
|
2
|
+
import type { ComponentType, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import type { LinkComponentProps } from "../../types.js";
|
|
4
|
+
export interface FooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Root item whose direct children are rendered as the footer nav list. */
|
|
6
|
+
root?: NavItem;
|
|
7
|
+
/** Component used to render navigable items. Defaults to `"a"`. */
|
|
8
|
+
LinkComponent?: ComponentType<LinkComponentProps> | "a";
|
|
9
|
+
/** Live current location; resolves and keeps the active item in sync. */
|
|
10
|
+
currentUrl?: string;
|
|
11
|
+
/** Fallback content when no `root` is provided. */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { HeaderProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.Header — top region holding the brand (the `brand` node, at the
|
|
6
|
+
* start) and the collapse toggle (at the end). The toggle is omitted when no
|
|
7
|
+
* `onToggle` handler is provided.
|
|
8
|
+
*
|
|
9
|
+
* @implements ds:apps.subcomponent.side-navigation-header
|
|
10
|
+
*/
|
|
11
|
+
declare const Header: ({ className, brand, applicationName, expanded, onToggle, collapseControls, ...props }: HeaderProps) => React.ReactElement;
|
|
12
|
+
export default Header;
|
|
13
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,GAAI,uFAQb,WAAW,KAAG,KAAK,CAAC,YAqBtB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Brand content (logo mark) rendered at the start of the header. */
|
|
4
|
+
brand?: ReactNode;
|
|
5
|
+
/** Optional application name/wordmark shown beside the brand. Omitted when absent. */
|
|
6
|
+
applicationName?: ReactNode;
|
|
7
|
+
/** Whether the navigation is currently expanded. Passed to the collapse toggle. */
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
/** Handler invoked when the collapse toggle is activated. When omitted, the toggle is not rendered. */
|
|
10
|
+
onToggle?: () => void;
|
|
11
|
+
/** id of the navigation region the collapse toggle controls (`aria-controls`). */
|
|
12
|
+
collapseControls?: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,qEAAqE;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,sFAAsF;IACtF,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|