@canonical/react-ds-app 0.38.0 → 0.40.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/esm/lib/SideNavigation/SideNavigation.js +51 -9
- package/dist/esm/lib/SideNavigation/SideNavigation.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js +14 -6
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/CollapseToggle/styles.css +48 -2
- package/dist/esm/lib/SideNavigation/common/Content/Content.js +9 -5
- package/dist/esm/lib/SideNavigation/common/Content/Content.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/Content/styles.css +45 -21
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.js +70 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/styles.css +94 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ContextSwitcher/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Footer/Footer.js +46 -6
- package/dist/esm/lib/SideNavigation/common/Footer/Footer.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/Footer/styles.css +13 -3
- package/dist/esm/lib/SideNavigation/common/Group/Group.js +14 -0
- package/dist/esm/lib/SideNavigation/common/Group/Group.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Group/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Group/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Group/styles.css +18 -0
- package/dist/esm/lib/SideNavigation/common/Group/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/Group/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/GroupHeader.js +17 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/GroupHeader.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/styles.css +31 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/GroupHeader/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/Header/Header.js +4 -2
- package/dist/esm/lib/SideNavigation/common/Header/Header.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/Header/styles.css +66 -28
- package/dist/esm/lib/SideNavigation/common/Item/Item.js +9 -13
- package/dist/esm/lib/SideNavigation/common/Item/Item.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/Item/styles.css +71 -36
- package/dist/esm/lib/SideNavigation/common/ItemButton/ItemButton.js +18 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/ItemButton.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/styles.css +79 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ItemButton/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/ItemExpandable.js +71 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/ItemExpandable.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/index.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/styles.css +121 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/types.js +2 -0
- package/dist/esm/lib/SideNavigation/common/ItemExpandable/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js +63 -21
- package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js.map +1 -1
- package/dist/esm/lib/SideNavigation/common/NavTree/styles.css +7 -30
- package/dist/esm/lib/SideNavigation/common/index.js +5 -0
- package/dist/esm/lib/SideNavigation/common/index.js.map +1 -1
- package/dist/esm/lib/SideNavigation/helpItem.js +29 -0
- package/dist/esm/lib/SideNavigation/helpItem.js.map +1 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/index.js +2 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/index.js.map +1 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/types.js +2 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/types.js.map +1 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/useCollapseShortcut.js +45 -0
- package/dist/esm/lib/SideNavigation/hooks/useCollapseShortcut/useCollapseShortcut.js.map +1 -0
- package/dist/esm/lib/SideNavigation/index.js +1 -0
- package/dist/esm/lib/SideNavigation/index.js.map +1 -1
- package/dist/esm/lib/SideNavigation/styles.css +272 -19
- package/dist/types/lib/SideNavigation/SideNavigation.d.ts +22 -1
- package/dist/types/lib/SideNavigation/SideNavigation.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts +9 -2
- package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts +6 -1
- package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Content/Content.d.ts +8 -4
- package/dist/types/lib/SideNavigation/common/Content/Content.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Content/types.d.ts +5 -8
- package/dist/types/lib/SideNavigation/common/Content/types.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.d.ts +20 -0
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/types.d.ts +52 -0
- package/dist/types/lib/SideNavigation/common/ContextSwitcher/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts +8 -4
- package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Footer/types.d.ts +5 -8
- package/dist/types/lib/SideNavigation/common/Footer/types.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Group/Group.d.ts +13 -0
- package/dist/types/lib/SideNavigation/common/Group/Group.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Group/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/Group/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Group/types.d.ts +10 -0
- package/dist/types/lib/SideNavigation/common/Group/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/GroupHeader.d.ts +13 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/GroupHeader.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/types.d.ts +8 -0
- package/dist/types/lib/SideNavigation/common/GroupHeader/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/Header/Header.d.ts +3 -1
- package/dist/types/lib/SideNavigation/common/Header/Header.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Item/Item.d.ts +8 -9
- package/dist/types/lib/SideNavigation/common/Item/Item.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/Item/types.d.ts +18 -7
- package/dist/types/lib/SideNavigation/common/Item/types.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/ItemButton/ItemButton.d.ts +17 -0
- package/dist/types/lib/SideNavigation/common/ItemButton/ItemButton.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ItemButton/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/ItemButton/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ItemButton/types.d.ts +17 -0
- package/dist/types/lib/SideNavigation/common/ItemButton/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/ItemExpandable.d.ts +26 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/ItemExpandable.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/types.d.ts +32 -0
- package/dist/types/lib/SideNavigation/common/ItemExpandable/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts +12 -13
- package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts +7 -5
- package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/common/index.d.ts +5 -0
- package/dist/types/lib/SideNavigation/common/index.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/helpItem.d.ts +20 -0
- package/dist/types/lib/SideNavigation/helpItem.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/index.d.ts +3 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/index.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/types.d.ts +14 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/types.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/useCollapseShortcut.d.ts +14 -0
- package/dist/types/lib/SideNavigation/hooks/useCollapseShortcut/useCollapseShortcut.d.ts.map +1 -0
- package/dist/types/lib/SideNavigation/index.d.ts +1 -0
- package/dist/types/lib/SideNavigation/index.d.ts.map +1 -1
- package/dist/types/lib/SideNavigation/types.d.ts +168 -24
- package/dist/types/lib/SideNavigation/types.d.ts.map +1 -1
- package/package.json +17 -17
|
@@ -1,28 +1,281 @@
|
|
|
1
1
|
/* Generated by @canonical/summon-component:react v0.1.0
|
|
2
2
|
* Layer: ds.components.apps (@canonical/styles README, "Cascade layers"). */
|
|
3
|
-
|
|
4
3
|
@layer ds.components.apps {
|
|
4
|
+
:root {
|
|
5
|
+
/* ── Rail ───────────────────────────────────────────────────────── */
|
|
6
|
+
/* 240px on all breakpoints ≥ small. */
|
|
7
|
+
--sidenav-rail-inline-size: 15rem;
|
|
8
|
+
|
|
9
|
+
/* Derived: logo width + one spacing unit
|
|
10
|
+
(--dimension-200, 1rem) on each side, with the logo horizontally
|
|
11
|
+
centred. */
|
|
12
|
+
--sidenav-rail-inline-size-collapsed: calc(
|
|
13
|
+
var(--sidenav-logo-inline-size) +
|
|
14
|
+
2 *
|
|
15
|
+
var(--dimension-200)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/* ── Logo ───────────────────────────────────────────────────────── */
|
|
19
|
+
/* Deliberate deviation from the upstream 24.04 design's 2.25rem: this
|
|
20
|
+
ships 2.5rem (the design's own 1:2 aspect ratio kept, both sides
|
|
21
|
+
scaled). Width follows the same ratio: 1.25rem. */
|
|
22
|
+
--sidenav-logo-block-size: 2.5rem;
|
|
23
|
+
--sidenav-logo-inline-size: 1.25rem;
|
|
24
|
+
|
|
25
|
+
/* ── Row insets (Header + Item, shared so icons/logo/toggle line up) ─ */
|
|
26
|
+
/* 0.5rem from the left and the right (aligns with the collapse
|
|
27
|
+
toggle / context-switcher chevron beyond it). */
|
|
28
|
+
--sidenav-inset-inline: var(--dimension-100);
|
|
29
|
+
/* 0.5rem between a leading icon and its label. */
|
|
30
|
+
--sidenav-icon-gap: var(--dimension-100);
|
|
31
|
+
/* Fixed leading-icon column so labels align down the rail with or
|
|
32
|
+
without an icon — matches the Icon component's default rendered size
|
|
33
|
+
(1rem). No design token names it, so this stays a provisional value
|
|
34
|
+
scoped here rather than reusing a spacing token for a sizing concern. */
|
|
35
|
+
--sidenav-icon-column-inline-size: 1.5rem;
|
|
36
|
+
|
|
37
|
+
/* ── Row background channel ────────────────────────────────────────
|
|
38
|
+
Item/ItemButton/ItemExpandable/CollapseToggle consume THIS, not the
|
|
39
|
+
navigation-primary token directly, so every row retints from one
|
|
40
|
+
place (an inherited custom-property override on any ancestor) instead
|
|
41
|
+
of threading an "is this retinted?" flag through every row component. */
|
|
42
|
+
--sidenav-row-background: var(--color-foreground-navigation-primary);
|
|
43
|
+
--sidenav-row-background-hover: var(
|
|
44
|
+
--color-foreground-navigation-primary-hover
|
|
45
|
+
);
|
|
46
|
+
--sidenav-row-background-active: var(
|
|
47
|
+
--color-foreground-navigation-primary-active
|
|
48
|
+
);
|
|
49
|
+
--sidenav-row-background-disabled: var(
|
|
50
|
+
--color-foreground-navigation-primary-disabled
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
/* ── Collapsed-rail popover ──────────────────────────────────────── */
|
|
54
|
+
/* No design token names an elevated-popover shadow; component-scoped
|
|
55
|
+
(overridable by any ancestor) rather than a phantom reference to a
|
|
56
|
+
`--box-shadow-high` token that does not exist. */
|
|
57
|
+
--sidenav-popover-shadow: 0 0.25rem 0.5rem rgb(0 0 0 / 20%);
|
|
58
|
+
}
|
|
59
|
+
|
|
5
60
|
.ds.side-navigation {
|
|
6
|
-
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
/* Skip-link's absolute overlay anchors to this box. */
|
|
63
|
+
position: relative;
|
|
7
64
|
background: var(--color-foreground-navigation-primary);
|
|
8
65
|
display: flex;
|
|
9
66
|
flex-direction: column;
|
|
10
|
-
/* Gap between Header / Content / Footer
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
67
|
+
/* Gap between Header / Content / Footer. Deliberate deviation from the
|
|
68
|
+
upstream 24.04 design's per-seam 1rem (below the logo, above the
|
|
69
|
+
first footer item): a single flex gap applies one value
|
|
70
|
+
between every adjacent child, and this ships 0.5rem so the rail reads
|
|
71
|
+
tight. */
|
|
72
|
+
gap: var(--dimension-100); /* 0.5rem */
|
|
73
|
+
|
|
74
|
+
inline-size: var(--sidenav-rail-inline-size);
|
|
75
|
+
padding-inline: var(--sidenav-inset-inline); /* 0.5rem */
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
|
|
78
|
+
/* The nav spans the full viewport height. Content (flex:1, min-height:0)
|
|
79
|
+
absorbs the remainder and scrolls internally so Footer stays pinned
|
|
80
|
+
to the bottom. */
|
|
81
|
+
block-size: 100%;
|
|
82
|
+
|
|
83
|
+
/* Per-component override of the shared overflow-fade token (default 2rem
|
|
84
|
+
in @canonical/styles/overflow.css): the upstream 24.04 design calls
|
|
85
|
+
for 1.75rem specifically at the Header/Content and Content/Footer
|
|
86
|
+
seams. */
|
|
87
|
+
--overflow-gradient-height: 1.75rem;
|
|
88
|
+
|
|
89
|
+
/* Collapsed: the rail narrows to fit just
|
|
90
|
+
the logo, and no navigation items show — a deliberate scope cut. The
|
|
91
|
+
footer stays visible (icon-only); only Content is hidden. The width
|
|
92
|
+
change animates over --motion-duration-medium — a deliberate
|
|
93
|
+
deviation from the upstream 24.04 design's no-animation stance:
|
|
94
|
+
the resize reads as motion, and it honours reduced motion (the
|
|
95
|
+
motion tokens are zeroed under prefers-reduced-motion by
|
|
96
|
+
@canonical/styles/motion.css). Both the physical and logical
|
|
97
|
+
properties transition, for engines that implement only one of
|
|
98
|
+
them. */
|
|
99
|
+
|
|
100
|
+
transition:
|
|
101
|
+
width var(--motion-duration-medium) ease-in-out,
|
|
102
|
+
inline-size var(--motion-duration-medium) ease-in-out;
|
|
103
|
+
|
|
104
|
+
/* Skip navigation — visually hidden until keyboard focus, then it
|
|
105
|
+
overlays the rail so keyboard users can bypass the block. */
|
|
106
|
+
|
|
107
|
+
& .skip-link {
|
|
108
|
+
position: absolute;
|
|
109
|
+
inset-block-start: 0;
|
|
110
|
+
inset-inline-start: 0;
|
|
111
|
+
z-index: var(--z-index-overlay, 100);
|
|
112
|
+
|
|
113
|
+
width: 1px;
|
|
114
|
+
height: 1px;
|
|
115
|
+
margin: -1px;
|
|
116
|
+
padding: 0;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
clip-path: inset(50%);
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
|
|
121
|
+
&:focus {
|
|
122
|
+
width: auto;
|
|
123
|
+
height: auto;
|
|
124
|
+
margin: 0;
|
|
125
|
+
padding: var(--dimension-100) var(--dimension-200);
|
|
126
|
+
overflow: visible;
|
|
127
|
+
clip-path: none;
|
|
128
|
+
white-space: normal;
|
|
129
|
+
|
|
130
|
+
color: var(--color-text-default, #111);
|
|
131
|
+
background: var(--color-background-default, #fff);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&[data-expanded="false"] {
|
|
136
|
+
inline-size: var(--sidenav-rail-inline-size-collapsed);
|
|
137
|
+
justify-content: space-between;
|
|
138
|
+
|
|
139
|
+
& > .ds.content {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* The ContextSwitcher region hides with Content: its rows are
|
|
144
|
+
label-driven (the switcher has no icon form), so nothing survives
|
|
145
|
+
icon-only degradation. */
|
|
146
|
+
& > .ds.side-navigation-context-switcher-region {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Footer stays visible, icon-only. The collapsed footer's labels
|
|
151
|
+
show in tooltips on hover after 800ms — a documented follow-up;
|
|
152
|
+
this is the icon-only layout half. */
|
|
153
|
+
& > .ds.footer {
|
|
154
|
+
.label,
|
|
155
|
+
.end {
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.row {
|
|
160
|
+
grid-template-columns: var(--sidenav-icon-column-inline-size);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Every ItemExpandable in the collapsed rail degrades its sub-items
|
|
165
|
+
into a floating popover on the inline-end. Native <details>
|
|
166
|
+
disclosure: the tree stays in the DOM and Tab reaches the panel's
|
|
167
|
+
links from the summary; the expanded state keeps its inline
|
|
168
|
+
disclosure (rules here are scoped to the collapsed state). */
|
|
169
|
+
.ds.side-navigation-item-expandable {
|
|
170
|
+
position: relative;
|
|
171
|
+
|
|
172
|
+
.children {
|
|
173
|
+
position: absolute;
|
|
174
|
+
inset-block-start: 0;
|
|
175
|
+
inset-inline-start: calc(100% + var(--dimension-100));
|
|
176
|
+
z-index: var(--z-index-overlay, 100);
|
|
177
|
+
|
|
178
|
+
display: none;
|
|
179
|
+
inline-size: max-content;
|
|
180
|
+
min-inline-size: calc(var(--sidenav-rail-inline-size) / 2);
|
|
181
|
+
margin: 0;
|
|
182
|
+
|
|
183
|
+
background: var(--color-background-default, #fff);
|
|
184
|
+
border: var(--dimension-stroke-thickness-medium) solid
|
|
185
|
+
var(--color-border-muted);
|
|
186
|
+
border-radius: var(--dimension-radius-small);
|
|
187
|
+
box-shadow: var(--sidenav-popover-shadow);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.details[open] .children {
|
|
191
|
+
display: block;
|
|
192
|
+
|
|
193
|
+
/* Undo the icon-only compression for popover rows: full grid and
|
|
194
|
+
visible titles inside the panel. */
|
|
195
|
+
.row {
|
|
196
|
+
margin: 0;
|
|
197
|
+
grid-template-columns:
|
|
198
|
+
var(--sidenav-icon-column-inline-size) 1fr
|
|
199
|
+
auto;
|
|
200
|
+
padding-inline: var(--sidenav-inset-inline);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.label {
|
|
204
|
+
display: inline-block;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.end {
|
|
208
|
+
display: flex;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Anchor-positioned popover (Baseline 2026; ~86% support): the
|
|
213
|
+
children panel is fixed against its summary's anchor (inline
|
|
214
|
+
styles from ItemExpandable) and position-try-fallbacks flips it
|
|
215
|
+
above the trigger on viewport overflow — browser-measured, moving
|
|
216
|
+
up exactly what it needs plus the mirrored 0.5rem gap. Browsers
|
|
217
|
+
without the feature keep the absolute top-anchored popover above.
|
|
218
|
+
|
|
219
|
+
NOTE: pinned to the summary's own edges via anchor(), not
|
|
220
|
+
position-area — position-area regions are whole strips reaching
|
|
221
|
+
the viewport edges, so a start-aligned panel would land pinned to
|
|
222
|
+
the viewport's top-right corner, not beside the trigger. */
|
|
223
|
+
@supports (anchor-name: --a) and (position-try-fallbacks: flip-block) {
|
|
224
|
+
.children {
|
|
225
|
+
position: fixed;
|
|
226
|
+
|
|
227
|
+
/* Panel's top-left at the summary's top-right corner, growing
|
|
228
|
+
down/right. Physical anchor() sides — the rail is
|
|
229
|
+
horizontal-tb and they have the widest shipped support. */
|
|
230
|
+
inset-block-start: anchor(top);
|
|
231
|
+
inset-inline-start: anchor(right);
|
|
232
|
+
inset-block-end: auto;
|
|
233
|
+
inset-inline-end: auto;
|
|
234
|
+
|
|
235
|
+
margin-inline-start: var(--dimension-100);
|
|
236
|
+
|
|
237
|
+
position-try-fallbacks: flip-block;
|
|
238
|
+
|
|
239
|
+
/* Both sides overflowing (taller than the viewport): flip-block
|
|
240
|
+
reverts to the default position, so cap the panel and scroll
|
|
241
|
+
internally rather than clip. */
|
|
242
|
+
max-block-size: 100dvh;
|
|
243
|
+
overflow-y: auto;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Responsive: below Vanilla's "small" breakpoint
|
|
250
|
+
($breakpoint-small, 620px) the rail stops being a rail — the header is
|
|
251
|
+
always shown; the body (Content AND Footer, unlike the desktop
|
|
252
|
+
collapsed state which keeps the footer) is hidden until Menu is
|
|
253
|
+
activated, then takes over the full screen. Same `data-expanded`
|
|
254
|
+
attribute as desktop. Drill-down navigation is out of scope. */
|
|
255
|
+
@media (width < 620px) {
|
|
256
|
+
inline-size: 100%;
|
|
257
|
+
flex-shrink: 1;
|
|
258
|
+
block-size: auto;
|
|
259
|
+
|
|
260
|
+
/* :not() form — a consumer shell that omits the attribute defaults
|
|
261
|
+
open, matching the desktop rule's semantics. */
|
|
262
|
+
&:not([data-expanded="false"]) {
|
|
263
|
+
position: fixed;
|
|
264
|
+
inset: 0;
|
|
265
|
+
z-index: var(--z-index-overlay, 100);
|
|
266
|
+
inline-size: 100%;
|
|
267
|
+
block-size: 100dvh;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&[data-expanded="false"] {
|
|
271
|
+
inline-size: 100%;
|
|
272
|
+
|
|
273
|
+
/* Overrides the desktop collapsed rule above: the body is hidden
|
|
274
|
+
entirely on mobile, not shown icon-only. */
|
|
275
|
+
& > .ds.footer {
|
|
276
|
+
display: none;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
27
280
|
}
|
|
28
281
|
}
|
|
@@ -7,12 +7,33 @@ import "./styles.css";
|
|
|
7
7
|
* `defaultExpanded` — and wires the header's collapse toggle to the content
|
|
8
8
|
* region it controls.
|
|
9
9
|
*
|
|
10
|
+
* Four regions: Header (branding, collapse toggle), the optional
|
|
11
|
+
* ContextSwitcher region (a `role="menu"` select-like widget — not
|
|
12
|
+
* navigation, so it sits outside the landmark in a plain `<div>` between
|
|
13
|
+
* Header and Content; hidden when collapsed, where labels are unviable),
|
|
14
|
+
* Content (the main `<nav>` landmark) and Footer (user profile, settings
|
|
15
|
+
* and non-navigational actions). The root element is a plain `<div>` and
|
|
16
|
+
* the component's single *navigation* landmark is Content's `<nav>`, so
|
|
17
|
+
* screen readers announce exactly one navigation region; the regions
|
|
18
|
+
* themselves are `<header>`/`<footer>` elements, which additionally
|
|
19
|
+
* expose banner/contentinfo landmarks. `aria-label` is forwarded to the
|
|
20
|
+
* `<nav>` and defaults to `"Main navigation"`.
|
|
21
|
+
*
|
|
22
|
+
* A visually hidden "Skip to main content" link is the first element in the
|
|
23
|
+
* component's DOM order, so keyboard users can bypass the navigation block;
|
|
24
|
+
* target it with `skipTo` (default `"#main-content"`).
|
|
25
|
+
*
|
|
10
26
|
* Routing-agnostic: navigable items render via `LinkComponent` (default `"a"`);
|
|
11
27
|
* pass a router `Link` to integrate client-side navigation. The active item is
|
|
12
28
|
* resolved from `currentUrl`.
|
|
13
29
|
*
|
|
30
|
+
* Consumption pattern: data-driven only. Pass props and all four regions
|
|
31
|
+
* build; row-level and region components are private
|
|
32
|
+
* (`cs:react.component.subcomponent_export_api` — no dot-static exports),
|
|
33
|
+
* and render exclusively from data.
|
|
34
|
+
*
|
|
14
35
|
* @implements ds:apps.pattern.side-navigation
|
|
15
36
|
*/
|
|
16
|
-
declare const SideNavigation: ({ className, brand, applicationName, root, footerRoot, LinkComponent, currentUrl, defaultExpanded, ...props }: SideNavigationProps) => React.ReactElement;
|
|
37
|
+
declare const SideNavigation: ({ className, brand, applicationName, root, contextSwitcher, footerRoot, LinkComponent, currentUrl, skipTo, defaultExpanded: defaultExpandedProp, keyboardShortcut, "aria-label": ariaLabel, ...props }: SideNavigationProps) => React.ReactElement;
|
|
17
38
|
export default SideNavigation;
|
|
18
39
|
//# sourceMappingURL=SideNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,cAAc,GAAI,wMAiBrB,mBAAmB,KAAG,KAAK,CAAC,YAkF9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -5,10 +5,17 @@ import "./styles.css";
|
|
|
5
5
|
* SideNavigation.CollapseToggle — icon-only button that expands or collapses
|
|
6
6
|
* the navigation rail. Carries the disclosure ARIA contract: `aria-expanded`
|
|
7
7
|
* reflects the current state and `aria-controls` should point at the id of the
|
|
8
|
-
* navigation region it toggles.
|
|
8
|
+
* navigation region it toggles. Hovering for 1s shows a tooltip naming the
|
|
9
|
+
* action ("Collapse"/"Expand"); the `<button>`'s own
|
|
10
|
+
* `aria-label` carries the fuller "Collapse/Expand navigation" text.
|
|
11
|
+
*
|
|
12
|
+
* Rendered through `TooltipEngine` (not `withTooltip`) so the tooltip's
|
|
13
|
+
* message follows the `expanded` prop as a live prop: one stable element
|
|
14
|
+
* type across state changes, so the button — and with it keyboard focus
|
|
15
|
+
* and hover state — survives every toggle instead of remounting.
|
|
9
16
|
*
|
|
10
17
|
* @implements ds:apps.subcomponent.side-navigation-collapse-toggle
|
|
11
18
|
*/
|
|
12
|
-
declare const CollapseToggle: ({
|
|
19
|
+
declare const CollapseToggle: ({ expanded, ...props }: CollapseToggleProps) => React.ReactElement;
|
|
13
20
|
export default CollapseToggle;
|
|
14
21
|
//# sourceMappingURL=CollapseToggle.d.ts.map
|
|
@@ -1 +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;
|
|
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;AA8BtB;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,GAAI,wBAGrB,mBAAmB,KAAG,KAAK,CAAC,YAO9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -6,6 +6,11 @@ type OwnProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* `type` is excluded in addition to `OwnProps`: this is always a disclosure
|
|
11
|
+
* trigger, never a form submit/reset control, so the DS fixes it to
|
|
12
|
+
* `"button"` rather than exposing it.
|
|
13
|
+
*/
|
|
14
|
+
export type CollapseToggleProps = OwnProps & Omit<ComponentProps<"button">, keyof OwnProps | "type">;
|
|
10
15
|
export {};
|
|
11
16
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC"}
|
|
@@ -2,12 +2,16 @@ import type React from "react";
|
|
|
2
2
|
import type { ContentProps } from "./types.js";
|
|
3
3
|
import "./styles.css";
|
|
4
4
|
/**
|
|
5
|
-
* SideNavigation.Content — main
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* SideNavigation.Content — the component's main `<nav>` landmark, and the
|
|
6
|
+
* only one: navigation rows are links and expandable items exclusively
|
|
7
|
+
* (actions are Footer's job). Data-only — rows render exclusively from the
|
|
8
|
+
* `root` tree (row components are private; there is no children escape
|
|
9
|
+
* hatch into the landmark). `aria-label` defaults to `"Main navigation"`
|
|
10
|
+
* and may be overridden by the consumer; with no `root`, the landmark
|
|
11
|
+
* renders empty (the landmark contract stays stable).
|
|
8
12
|
*
|
|
9
13
|
* @implements ds:apps.subcomponent.side-navigation-content
|
|
10
14
|
*/
|
|
11
|
-
declare const Content: ({ className, root, LinkComponent, currentUrl,
|
|
15
|
+
declare const Content: ({ className, root, LinkComponent, currentUrl, ...props }: ContentProps) => React.ReactElement;
|
|
12
16
|
export default Content;
|
|
13
17
|
//# sourceMappingURL=Content.d.ts.map
|
|
@@ -1 +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
|
|
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;;;;;;;;;;GAUG;AACH,QAAA,MAAM,OAAO,GAAI,0DAMd,YAAY,KAAG,KAAK,CAAC,YAevB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { LinkComponentProps } from "../../types.js";
|
|
1
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
2
|
+
import type { LinkComponentProps, NavRoot } from "../../types.js";
|
|
4
3
|
type OwnProps = {
|
|
5
|
-
/** Root
|
|
6
|
-
root?:
|
|
4
|
+
/** Root whose direct children render as groups — see NavRoot. Data-only: rows render exclusively from this tree (there is no children escape hatch into the landmark). */
|
|
5
|
+
root?: NavRoot;
|
|
7
6
|
/** Component used to render navigable items. Defaults to `"a"`. */
|
|
8
7
|
LinkComponent?: ComponentType<LinkComponentProps> | "a";
|
|
9
8
|
/** Live current location; resolves and keeps the active item in sync. */
|
|
10
9
|
currentUrl?: string;
|
|
11
|
-
/** Fallback content when no `root` is provided. */
|
|
12
|
-
children?: ReactNode;
|
|
13
10
|
};
|
|
14
|
-
export type ContentProps = OwnProps & Omit<ComponentProps<"
|
|
11
|
+
export type ContentProps = OwnProps & Omit<ComponentProps<"nav">, keyof OwnProps>;
|
|
15
12
|
export {};
|
|
16
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,QAAQ,GAAG;IACd,0KAA0K;IAC1K,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;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ContextSwitcherProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.ContextSwitcher — a dropdown for products that divide
|
|
6
|
+
* into contexts, projects, users, or similar. Renders via
|
|
7
|
+
* `ContextualMenu`: a real `<button>` trigger
|
|
8
|
+
* (`aria-haspopup="menu"`/`aria-expanded`) and a `role="menu"` popup with
|
|
9
|
+
* full roving-focus keyboard navigation. `title`, when given, renders via
|
|
10
|
+
* `SideNavigation.GroupHeader` as a sibling above the dropdown field.
|
|
11
|
+
*
|
|
12
|
+
* Not part of the `NavRoot`/`NavGroup` content-tree data model — its
|
|
13
|
+
* position is content-defined: compose this component directly where
|
|
14
|
+
* the consumer wants it. See SPEC.md's known issues.
|
|
15
|
+
*
|
|
16
|
+
* @implements ds:apps.subcomponent.side-navigation-context-switcher
|
|
17
|
+
*/
|
|
18
|
+
declare const ContextSwitcher: ({ title, currentContext, contexts, onContextChange, onCreateContext, createContextLabel, className, open, onOpenChange, preferredDirections, distance, gutter, maxWidth, autoFit, ...props }: ContextSwitcherProps) => React.ReactElement;
|
|
19
|
+
export default ContextSwitcher;
|
|
20
|
+
//# sourceMappingURL=ContextSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,cAAc,CAAC;AAmDtB;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,eAAe,GAAI,8LAgBtB,oBAAoB,KAAG,KAAK,CAAC,YAkE/B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/ContextSwitcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAClE,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ContextualMenuProps } from "@canonical/react-ds-global";
|
|
2
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
/** A single entry in the context switcher's list — user-generated. */
|
|
4
|
+
export interface ContextSwitcherItem {
|
|
5
|
+
/** Stable identity for the context (list key and selection matching). */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Display name — also shown in the dropdown field when current. */
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional route for the context. No render target for a
|
|
11
|
+
* `LinkComponent` exists inside a `role="menu"` (every row is a
|
|
12
|
+
* `<div role="menuitem">`), so when given the url rides through
|
|
13
|
+
* `onContextChange` and the consumer routes with their own router.
|
|
14
|
+
* Omitted, the context stays a pure action.
|
|
15
|
+
*/
|
|
16
|
+
url?: string;
|
|
17
|
+
/** Optional supporting text shown under the name in the list. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Optional badge for dynamic/actionable information. */
|
|
20
|
+
badge?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
type OwnProps = Pick<ContextualMenuProps, "open" | "onOpenChange" | "preferredDirections" | "distance" | "gutter" | "maxWidth" | "autoFit"> & {
|
|
23
|
+
/**
|
|
24
|
+
* A caption rendered above the dropdown field (e.g. "Context") via
|
|
25
|
+
* `SideNavigation.GroupHeader` — intrinsic to the component in the Figma
|
|
26
|
+
* source, not a consumer composition. Omitted renders no caption.
|
|
27
|
+
*/
|
|
28
|
+
title?: ReactNode;
|
|
29
|
+
/** The currently selected context, shown in the dropdown field. */
|
|
30
|
+
currentContext: ContextSwitcherItem;
|
|
31
|
+
/** The user-generated list of available contexts. */
|
|
32
|
+
contexts: ContextSwitcherItem[];
|
|
33
|
+
/** Called when the user selects a different context from the list. */
|
|
34
|
+
onContextChange?: (context: ContextSwitcherItem) => void;
|
|
35
|
+
/** Called when the "create context" action is activated. Omit to hide it. */
|
|
36
|
+
onCreateContext?: () => void;
|
|
37
|
+
/** Label for the "create context" action. Defaults to `"Create context"`. */
|
|
38
|
+
createContextLabel?: ReactNode;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Renders via `ContextualMenu` — a real `<button>` trigger with
|
|
42
|
+
* `aria-haspopup="menu"`/`aria-expanded`, and a `role="menu"` popup with
|
|
43
|
+
* full roving-focus keyboard navigation — a "select"-like widget, not a
|
|
44
|
+
* bare disclosure. Extends `<div>` — the component's own wrapper, which
|
|
45
|
+
* carries the caption (`title`) and the dropdown field. `onSelect` — a
|
|
46
|
+
* native `<div>` text-selection event — is excluded: it would collide with
|
|
47
|
+
* this component's own item-selection callback (`onContextChange`) under
|
|
48
|
+
* one name with two incompatible signatures.
|
|
49
|
+
*/
|
|
50
|
+
export type ContextSwitcherProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps | "onSelect">;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/ContextSwitcher/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,KAAK,QAAQ,GAAG,IAAI,CAClB,mBAAmB,EACjB,MAAM,GACN,cAAc,GACd,qBAAqB,GACrB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,CACZ,GAAG;IACF;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mEAAmE;IACnE,cAAc,EAAE,mBAAmB,CAAC;IACpC,qDAAqD;IACrD,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,sEAAsE;IACtE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GACzC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC"}
|
|
@@ -2,12 +2,16 @@ import type React from "react";
|
|
|
2
2
|
import type { FooterProps } from "./types.js";
|
|
3
3
|
import "./styles.css";
|
|
4
4
|
/**
|
|
5
|
-
* SideNavigation.Footer — optional region pinned to the bottom,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* SideNavigation.Footer — optional region pinned to the bottom, reserved
|
|
6
|
+
* for user-related content. Data-only: `root` is the footer's only data
|
|
7
|
+
* surface — free-form leaves (`LeafFooterItem`, buttons via
|
|
8
|
+
* `control`/`onClick`) and depth-1 expandables (`ExpandableFooterItem`,
|
|
9
|
+
* whose children disclose through the same native `<details>` disclosure
|
|
10
|
+
* the content tree uses). A certificate-user application, for instance,
|
|
11
|
+
* composes the `certificate` icon and omits the logout item itself.
|
|
8
12
|
*
|
|
9
13
|
* @implements ds:apps.subcomponent.side-navigation-footer
|
|
10
14
|
*/
|
|
11
|
-
declare const Footer: ({ className, root, LinkComponent, currentUrl,
|
|
15
|
+
declare const Footer: ({ className, root, LinkComponent, currentUrl, ...props }: FooterProps) => React.ReactElement;
|
|
12
16
|
export default Footer;
|
|
13
17
|
//# sourceMappingURL=Footer.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,CAAC;AA6DtB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,MAAM,GAAI,0DAMb,WAAW,KAAG,KAAK,CAAC,YAwCtB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { LinkComponentProps } from "../../types.js";
|
|
1
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
2
|
+
import type { FooterRoot, LinkComponentProps } from "../../types.js";
|
|
4
3
|
type OwnProps = {
|
|
5
|
-
/**
|
|
6
|
-
root?:
|
|
4
|
+
/** The footer's items — the footer's only data surface. See FooterRoot. */
|
|
5
|
+
root?: FooterRoot;
|
|
7
6
|
/** Component used to render navigable items. Defaults to `"a"`. */
|
|
8
7
|
LinkComponent?: ComponentType<LinkComponentProps> | "a";
|
|
9
|
-
/** Live current location; resolves
|
|
8
|
+
/** Live current location; resolves the active row and seeds expandables. */
|
|
10
9
|
currentUrl?: string;
|
|
11
|
-
/** Fallback content when no `root` is provided. */
|
|
12
|
-
children?: ReactNode;
|
|
13
10
|
};
|
|
14
11
|
export type FooterProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
15
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAErE,KAAK,QAAQ,GAAG;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAChC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { GroupProps } from "./types.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
/**
|
|
5
|
+
* SideNavigation.Group — a named collection of navigation entries, with an
|
|
6
|
+
* optional SideNavigation.GroupHeader. One of NavTree's direct content
|
|
7
|
+
* entries.
|
|
8
|
+
*
|
|
9
|
+
* @implements ds:apps.subcomponent.side-navigation-group
|
|
10
|
+
*/
|
|
11
|
+
declare const Group: ({ label, children, className, ...props }: GroupProps) => React.ReactElement;
|
|
12
|
+
export default Group;
|
|
13
|
+
//# sourceMappingURL=Group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Group/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,KAAK,GAAI,0CAKZ,UAAU,KAAG,KAAK,CAAC,YAQrB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
type OwnProps = {
|
|
3
|
+
/** Group header text, rendered via GroupHeader. Omitted when absent. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** The group's navigation entries (Item / ItemExpandable / consumer-supplied). */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type GroupProps = OwnProps & Omit<ComponentProps<"section">, keyof OwnProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|