@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
package/LICENSE
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
166
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
const componentCssClassName = "ds application-layout";
|
|
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
|
+
const ApplicationLayout = ({ className, children, navigation, ...props }) => {
|
|
12
|
+
return (_jsxs("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [navigation != null && _jsx("div", { className: "navigation", children: navigation }), _jsx("div", { className: "content", children: children })] }));
|
|
13
|
+
};
|
|
14
|
+
export default ApplicationLayout;
|
|
15
|
+
//# sourceMappingURL=ApplicationLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationLayout.js","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/ApplicationLayout.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,GAAG,KAAK,EACe,EAAsB,EAAE;IAC/C,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,aAER,UAAU,IAAI,IAAI,IAAI,cAAK,SAAS,EAAC,YAAY,YAAE,UAAU,GAAO,EACrE,cAAK,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAO,IACrC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.application-layout {
|
|
4
|
+
/* Application shell: navigation rail (min-content) + content (1fr), per
|
|
5
|
+
the ontology instance apps.layout.application_layout. The rail/content
|
|
6
|
+
gutter follows the design reference (#421: 1rem) via the container gap
|
|
7
|
+
token; --application-layout-gap overrides (0 for a flush shell). */
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: min-content 1fr;
|
|
10
|
+
gap: var(--application-layout-gap, var(--container-gap-default, 1rem));
|
|
11
|
+
block-size: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Without a navigation slot, drop the rail column entirely so neither the
|
|
15
|
+
empty track nor the gap offsets the content. */
|
|
16
|
+
.ds.application-layout:not(:has(> .navigation)) {
|
|
17
|
+
grid-template-columns: 1fr;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* min-size 0 lets each region scroll internally instead of stretching the
|
|
21
|
+
shell beyond the viewport. The navigation slot owns its inline size. */
|
|
22
|
+
.ds.application-layout > .navigation {
|
|
23
|
+
min-block-size: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ds.application-layout > .content {
|
|
27
|
+
min-block-size: 0;
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/ApplicationLayout/types.ts"],"names":[],"mappings":"AAAA,wDAAwD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
const componentCssClassName = "ds content-layout";
|
|
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
|
+
const ContentLayout = ({ className, children, grid = "responsive", ...props }) => {
|
|
14
|
+
return (_jsx("div", { className: [componentCssClassName, "grid", grid, className]
|
|
15
|
+
.filter(Boolean)
|
|
16
|
+
.join(" "), ...props, children: children }));
|
|
17
|
+
};
|
|
18
|
+
export default ContentLayout;
|
|
19
|
+
//# sourceMappingURL=ContentLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,aAAa,GAAG,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,IAAI,GAAG,YAAY,EACnB,GAAG,KAAK,EACW,EAAsB,EAAE;IAC3C,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;aACxD,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,KACR,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.content-layout {
|
|
4
|
+
/* Column templates and gaps come from the .grid presets in
|
|
5
|
+
@canonical/styles (.responsive: breakpoint-driven 4/8/12 columns;
|
|
6
|
+
.intrinsic: fluid auto-fill groups of four minmax(--grid-col-min, 1fr)
|
|
7
|
+
columns). Knobs: --grid-gap (or per-axis --grid-row-gap /
|
|
8
|
+
--grid-column-gap), --grid-col-min for the intrinsic mode. */
|
|
9
|
+
|
|
10
|
+
/* Rows size to content; the grid grows downwards and scrolls in whatever
|
|
11
|
+
region contains it (e.g. ViewLayout's content slot). */
|
|
12
|
+
align-content: start;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/ContentLayout/types.ts"],"names":[],"mappings":"AAAA,wDAAwD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useId, useState } from "react";
|
|
3
|
+
import { Content, Footer, Header } from "./common/index.js";
|
|
4
|
+
import "./styles.css";
|
|
5
|
+
const componentCssClassName = "ds side-navigation";
|
|
6
|
+
/**
|
|
7
|
+
* SideNavigation — full-height application navigation rendered from a WD405
|
|
8
|
+
* Item tree. Owns its expand/collapse (rail) state — uncontrolled, seeded by
|
|
9
|
+
* `defaultExpanded` — and wires the header's collapse toggle to the content
|
|
10
|
+
* region it controls.
|
|
11
|
+
*
|
|
12
|
+
* Routing-agnostic: navigable items render via `LinkComponent` (default `"a"`);
|
|
13
|
+
* pass a router `Link` to integrate client-side navigation. The active item is
|
|
14
|
+
* resolved from `currentUrl`.
|
|
15
|
+
*
|
|
16
|
+
* @implements ds:apps.pattern.side-navigation
|
|
17
|
+
*/
|
|
18
|
+
const SideNavigation = ({ className, brand, applicationName, root, footerRoot, LinkComponent = "a", currentUrl,
|
|
19
|
+
// Controlled circuit — not official yet.
|
|
20
|
+
// expanded: expandedProp,
|
|
21
|
+
defaultExpanded = true,
|
|
22
|
+
// onExpandedChange,
|
|
23
|
+
...props }) => {
|
|
24
|
+
const contentId = useId();
|
|
25
|
+
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
26
|
+
const handleToggle = useCallback(() => {
|
|
27
|
+
setExpanded((current) => !current);
|
|
28
|
+
}, []);
|
|
29
|
+
// --- Controlled circuit (not official yet) -------------------------------
|
|
30
|
+
// const [uncontrolledExpanded, setUncontrolledExpanded] =
|
|
31
|
+
// useState(defaultExpanded);
|
|
32
|
+
// const isControlled = expandedProp !== undefined;
|
|
33
|
+
// const expanded = isControlled ? expandedProp : uncontrolledExpanded;
|
|
34
|
+
//
|
|
35
|
+
// const handleToggle = useCallback(() => {
|
|
36
|
+
// const next = !expanded;
|
|
37
|
+
// if (!isControlled) setUncontrolledExpanded(next);
|
|
38
|
+
// onExpandedChange?.(next);
|
|
39
|
+
// }, [expanded, isControlled, onExpandedChange]);
|
|
40
|
+
// -------------------------------------------------------------------------
|
|
41
|
+
return (_jsxs("div", { className: [componentCssClassName, !expanded && "collapsed", className]
|
|
42
|
+
.filter(Boolean)
|
|
43
|
+
.join(" "), "data-expanded": expanded, ...props, children: [_jsx(Header, { brand: brand, applicationName: applicationName, expanded: expanded, onToggle: handleToggle, collapseControls: contentId }), _jsx(Content, { id: contentId, root: root, LinkComponent: LinkComponent, currentUrl: currentUrl }), footerRoot && (_jsx(Footer, { root: footerRoot, LinkComponent: LinkComponent, currentUrl: currentUrl }))] }));
|
|
44
|
+
};
|
|
45
|
+
export default SideNavigation;
|
|
46
|
+
//# sourceMappingURL=SideNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,KAAK,EACL,eAAe,EACf,IAAI,EACJ,UAAU,EACV,aAAa,GAAG,GAAG,EACnB,UAAU;AACV,yCAAyC;AACzC,0BAA0B;AAC1B,eAAe,GAAG,IAAI;AACtB,oBAAoB;AACpB,GAAG,KAAK,EACY,EAAsB,EAAE;IAC5C,MAAM,SAAS,GAAG,KAAK,EAAE,CAAC;IAE1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,4EAA4E;IAC5E,0DAA0D;IAC1D,+BAA+B;IAC/B,mDAAmD;IACnD,uEAAuE;IACvE,EAAE;IACF,2CAA2C;IAC3C,4BAA4B;IAC5B,sDAAsD;IACtD,8BAA8B;IAC9B,kDAAkD;IAClD,4EAA4E;IAE5E,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,CAAC,QAAQ,IAAI,WAAW,EAAE,SAAS,CAAC;aACpE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,mBACG,QAAQ,KACnB,KAAK,aAET,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,SAAS,GAC3B,EACF,KAAC,OAAO,IACN,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,GACtB,EACD,UAAU,IAAI,CACb,KAAC,MAAM,IACL,IAAI,EAAE,UAAU,EAChB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,GACtB,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "@canonical/react-ds-global";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
const componentCssClassName = "ds collapse-toggle";
|
|
5
|
+
/**
|
|
6
|
+
* SideNavigation.CollapseToggle — icon-only button that expands or collapses
|
|
7
|
+
* the navigation rail. Carries the disclosure ARIA contract: `aria-expanded`
|
|
8
|
+
* reflects the current state and `aria-controls` should point at the id of the
|
|
9
|
+
* navigation region it toggles.
|
|
10
|
+
*
|
|
11
|
+
* @implements ds:apps.subcomponent.side-navigation-collapse-toggle
|
|
12
|
+
*/
|
|
13
|
+
const CollapseToggle = ({ className, expanded = true, "aria-label": ariaLabel, ...props }) => {
|
|
14
|
+
return (_jsx("button", { type: "button", className: [componentCssClassName, className].filter(Boolean).join(" "), "aria-expanded": expanded, "aria-label": ariaLabel ?? (expanded ? "Collapse navigation" : "Expand navigation"), ...props, children: _jsx(Icon, { icon: expanded ? "collapse-side-nav" : "expand-side-nav" }) }));
|
|
15
|
+
};
|
|
16
|
+
export default CollapseToggle;
|
|
17
|
+
//# sourceMappingURL=CollapseToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapseToggle.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/CollapseToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,QAAQ,GAAG,IAAI,EACf,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACY,EAAsB,EAAE;IAC5C,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,mBACxD,QAAQ,gBAErB,SAAS,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAEnE,KAAK,YAET,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,GAAI,GAC3D,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NavTree } from "../NavTree/index.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
const componentCssClassName = "ds content";
|
|
5
|
+
/**
|
|
6
|
+
* SideNavigation.Content — main navigation region. Renders the direct children
|
|
7
|
+
* of its `root` Item via useNavigationTree (selection, active state, keyboard
|
|
8
|
+
* traversal). Falls back to `children` when no `root` is given.
|
|
9
|
+
*
|
|
10
|
+
* @implements ds:apps.subcomponent.side-navigation-content
|
|
11
|
+
*/
|
|
12
|
+
const Content = ({ className, root, LinkComponent = "a", currentUrl, children, ...props }) => {
|
|
13
|
+
return (_jsx("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: root ? (_jsx(NavTree, { root: root, currentUrl: currentUrl, LinkComponent: LinkComponent })) : (children) }));
|
|
14
|
+
};
|
|
15
|
+
export default Content;
|
|
16
|
+
//# sourceMappingURL=Content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/Content.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,SAAS,EACT,IAAI,EACJ,aAAa,GAAG,GAAG,EACnB,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,YAER,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,OAAO,IACN,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.content {
|
|
4
|
+
position: relative;
|
|
5
|
+
flex: 1;
|
|
6
|
+
/* min-height:0 lets this flex item shrink below its content height so it can
|
|
7
|
+
scroll internally (flex items default to min-height:auto, which refuses to
|
|
8
|
+
shrink and would push the whole nav taller instead). Vertical scroll only;
|
|
9
|
+
never horizontal (long labels must not cause sideways scroll). */
|
|
10
|
+
min-height: 0;
|
|
11
|
+
overflow: hidden auto;
|
|
12
|
+
|
|
13
|
+
/* Tree structure (.group/.header/.list) is owned by NavTree's own styles.
|
|
14
|
+
Content only reserves room for the overflow fade so the last item of the
|
|
15
|
+
last group is never permanently hidden behind it. */
|
|
16
|
+
& .nav-tree > .group:last-child > .list {
|
|
17
|
+
padding-block-end: var(--overflow-gradient-height);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Overflow fade: a sticky bar pinned to the bottom of the scroll viewport,
|
|
21
|
+
painting the surface-aware gradient over content scrolling underneath. */
|
|
22
|
+
&::after {
|
|
23
|
+
content: "";
|
|
24
|
+
position: sticky;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
display: block;
|
|
27
|
+
block-size: var(--overflow-gradient-height);
|
|
28
|
+
/* Pull the bar back over the reserved padding so it overlays content. */
|
|
29
|
+
margin-block-start: calc(-1 * var(--overflow-gradient-height));
|
|
30
|
+
background: var(--surface-overflow-gradient);
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NavTree } from "../NavTree/index.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
const componentCssClassName = "ds footer";
|
|
5
|
+
/**
|
|
6
|
+
* SideNavigation.Footer — optional region pinned to the bottom, holding
|
|
7
|
+
* account-level or global actions. Drives its own useNavigationTree over its
|
|
8
|
+
* `root` (independent of Content). Falls back to `children` when no `root`.
|
|
9
|
+
*
|
|
10
|
+
* @implements ds:apps.subcomponent.side-navigation-footer
|
|
11
|
+
*/
|
|
12
|
+
const Footer = ({ className, root, LinkComponent = "a", currentUrl, children, ...props }) => {
|
|
13
|
+
return (_jsx("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: root ? (_jsx(NavTree, { root: root, currentUrl: currentUrl, LinkComponent: LinkComponent })) : (children) }));
|
|
14
|
+
};
|
|
15
|
+
export default Footer;
|
|
16
|
+
//# sourceMappingURL=Footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/Footer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,CAAC,EACd,SAAS,EACT,IAAI,EACJ,aAAa,GAAG,GAAG,EACnB,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACI,EAAsB,EAAE;IACpC,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,YAER,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,OAAO,IACN,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CollapseToggle } from "../CollapseToggle/index.js";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
const componentCssClassName = "ds side-navigation-header";
|
|
5
|
+
/**
|
|
6
|
+
* SideNavigation.Header — top region holding the brand (the `brand` node, at the
|
|
7
|
+
* start) and the collapse toggle (at the end). The toggle is omitted when no
|
|
8
|
+
* `onToggle` handler is provided.
|
|
9
|
+
*
|
|
10
|
+
* @implements ds:apps.subcomponent.side-navigation-header
|
|
11
|
+
*/
|
|
12
|
+
const Header = ({ className, brand, applicationName, expanded, onToggle, collapseControls, ...props }) => {
|
|
13
|
+
return (_jsxs("header", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [_jsx("div", { className: "brand", children: brand }), applicationName != null && (_jsx("span", { className: "title p", children: applicationName })), onToggle && (_jsx(CollapseToggle, { expanded: expanded, "aria-controls": collapseControls, onClick: onToggle }))] }));
|
|
14
|
+
};
|
|
15
|
+
export default Header;
|
|
16
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/Header.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,CAAC,EACd,SAAS,EACT,KAAK,EACL,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,GAAG,KAAK,EACI,EAAsB,EAAE;IACpC,OAAO,CACL,kBACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,aAET,cAAK,SAAS,EAAC,OAAO,YAAE,KAAK,GAAO,EAGnC,eAAe,IAAI,IAAI,IAAI,CAC1B,eAAM,SAAS,EAAC,SAAS,YAAE,eAAe,GAAQ,CACnD,EACA,QAAQ,IAAI,CACX,KAAC,cAAc,IACb,QAAQ,EAAE,QAAQ,mBACH,gBAAgB,EAC/B,OAAO,EAAE,QAAQ,GACjB,CACH,IACM,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
2
|
+
|
|
3
|
+
.ds.side-navigation-header {
|
|
4
|
+
/* Shared row template with Item so the brand/logo aligns with item icons. */
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: var(--sidenav-row-columns);
|
|
7
|
+
/* Baseline grid: a fixed box height of whole baseline units (5bU/40px, the
|
|
8
|
+
same row height as the items below) keeps the header on the rail's rhythm.
|
|
9
|
+
align-items: start tops every cell so the brand rectangle fills from the
|
|
10
|
+
top and the title/toggle sit at the top of the row. */
|
|
11
|
+
block-size: calc(var(--space-baseline) * 5); /* 40px — 5bU */
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
align-items: start;
|
|
14
|
+
gap: var(--dimension-100); /* 0.5rem */
|
|
15
|
+
|
|
16
|
+
/* Pin each part to its column explicitly so the toggle stays in the end
|
|
17
|
+
column even when the optional title is absent. */
|
|
18
|
+
.brand {
|
|
19
|
+
/* Start column, aligned with the item icons below. Tops-align with the rest
|
|
20
|
+
of the row (align-items: start); the brand's own margin/padding handles
|
|
21
|
+
its vertical placement, not a stretched cell. */
|
|
22
|
+
grid-column: 1;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.title {
|
|
28
|
+
/* Middle (1fr) column. Optional. */
|
|
29
|
+
grid-column: 2;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& > .ds.collapse-toggle {
|
|
34
|
+
/* End column. */
|
|
35
|
+
grid-column: 3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Header/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "@canonical/react-ds-global";
|
|
3
|
+
import "./styles.css";
|
|
4
|
+
const componentCssClassName = "ds side-navigation-item";
|
|
5
|
+
/**
|
|
6
|
+
* SideNavigation.Item — the default renderer for a single navigation item.
|
|
7
|
+
*
|
|
8
|
+
* A flat leaf row, NOT recursive: traversal lives in NavTree's two loops. The
|
|
9
|
+
* row is `[icon] [label] [end]` over a shared grid template (so the icon aligns
|
|
10
|
+
* with the header logo). An item with a `url` renders as a link via
|
|
11
|
+
* `LinkComponent` (default `"a"`); otherwise a non-navigable label.
|
|
12
|
+
*
|
|
13
|
+
* End slot is derived, not authored:
|
|
14
|
+
* - has subitems → a disclosure caret (static affordance in PR1; expand/collapse
|
|
15
|
+
* behaviour is deferred);
|
|
16
|
+
* - leaf → the optional `slot` (a badge, count, …), or nothing.
|
|
17
|
+
*
|
|
18
|
+
* @implements ds:apps.subcomponent.side-navigation-item
|
|
19
|
+
*/
|
|
20
|
+
const Item = ({ url, label, icon, slot, disabled = false, active = false, LinkComponent = "a",
|
|
21
|
+
// NavItem fields not spread to the DOM.
|
|
22
|
+
key: _key, items, className, ...props }) => {
|
|
23
|
+
const Link = LinkComponent;
|
|
24
|
+
const hasSubitems = (items?.length ?? 0) > 0;
|
|
25
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("span", { className: "start p", children: icon ? _jsx(Icon, { icon: icon }) : null }), _jsx("span", { className: "label p", children: label }), hasSubitems ? (_jsx(Icon, { icon: "chevron-down", className: "end caret" })) : slot ? (_jsx("span", { className: "end slot", children: slot })) : null] }));
|
|
26
|
+
return (_jsx("li", { className: [componentCssClassName, className].filter(Boolean).join(" "), "data-disabled": disabled || undefined, "data-active": active || undefined, ...props, children: url ? (_jsx(Link, { className: "row", href: disabled ? undefined : url, "aria-current": active ? "page" : undefined, children: content })) : (_jsx("span", { className: "row", "aria-current": active ? "page" : undefined, children: content })) }));
|
|
27
|
+
};
|
|
28
|
+
export default Item;
|
|
29
|
+
//# sourceMappingURL=Item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/Item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAExD;;;;;;;;;;;;;;GAcG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,GAAG,EACH,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,KAAK,EACd,aAAa,GAAG,GAAG;AACnB,wCAAwC;AACxC,GAAG,EAAE,IAAI,EACT,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACE,EAAsB,EAAE;IAClC,MAAM,IAAI,GAAG,aAAa,CAAC;IAC3B,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,CACd,8BAGE,eAAM,SAAS,EAAC,SAAS,YAAE,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,GAAQ,EACrE,eAAM,SAAS,EAAC,SAAS,YAAE,KAAK,GAAQ,EAEvC,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,WAAW,GAAG,CACnD,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACT,eAAM,SAAS,EAAC,UAAU,YAAE,IAAI,GAAQ,CACzC,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;IAEF,OAAO,CACL,aACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,mBACxD,QAAQ,IAAI,SAAS,iBACvB,MAAM,IAAI,SAAS,KAC5B,KAAK,YAER,GAAG,CAAC,CAAC,CAAC,CACL,KAAC,IAAI,IACH,SAAS,EAAC,KAAK,EACf,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,kBAClB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAExC,OAAO,GACH,CACR,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,KAAK,kBAAe,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAC5D,OAAO,GACH,CACR,GACE,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|