@parallelogram-js/dashboard 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +113 -0
- package/LICENSE +21 -0
- package/README.md +1390 -2
- package/dist/parallelogram-dashboard.css +9401 -0
- package/dist/parallelogram-dashboard.css.map +1 -0
- package/dist/parallelogram-dashboard.min.css +1 -0
- package/package.json +72 -4
- package/scss/_base.scss +403 -0
- package/scss/_datetime.scss +50 -0
- package/scss/_icon.scss +40 -0
- package/scss/_index.scss +60 -0
- package/scss/_mixins.scss +396 -0
- package/scss/_tokens.scss +340 -0
- package/scss/_utilities.scss +464 -0
- package/scss/_variables.scss +219 -0
- package/scss/components/_accordion.scss +297 -0
- package/scss/components/_actionbar.scss +333 -0
- package/scss/components/_alert.scss +183 -0
- package/scss/components/_avatar.scss +203 -0
- package/scss/components/_badge.scss +176 -0
- package/scss/components/_banner.scss +344 -0
- package/scss/components/_breadcrumb.scss +220 -0
- package/scss/components/_button.scss +264 -0
- package/scss/components/_card.scss +256 -0
- package/scss/components/_chart.scss +246 -0
- package/scss/components/_command.scss +267 -0
- package/scss/components/_dashboard.scss +681 -0
- package/scss/components/_data-list.scss +280 -0
- package/scss/components/_dropdown.scss +318 -0
- package/scss/components/_empty.scss +226 -0
- package/scss/components/_filebrowser.scss +906 -0
- package/scss/components/_form-layout.scss +332 -0
- package/scss/components/_input.scss +310 -0
- package/scss/components/_list.scss +130 -0
- package/scss/components/_media.scss +239 -0
- package/scss/components/_modal.scss +298 -0
- package/scss/components/_navbar.scss +312 -0
- package/scss/components/_notification.scss +59 -0
- package/scss/components/_pageheader.scss +99 -0
- package/scss/components/_pagination.scss +165 -0
- package/scss/components/_progress.scss +333 -0
- package/scss/components/_separator.scss +129 -0
- package/scss/components/_sheet.scss +286 -0
- package/scss/components/_sidebar.scss +324 -0
- package/scss/components/_skeleton.scss +246 -0
- package/scss/components/_stat.scss +218 -0
- package/scss/components/_table.scss +589 -0
- package/scss/components/_tabs.scss +266 -0
- package/scss/components/_timeline.scss +339 -0
- package/scss/components/_toast.scss +259 -0
- package/scss/components/_toolbar.scss +301 -0
- package/scss/components/_tooltip.scss +250 -0
- package/scss/main.scss +6 -0
- package/src/js/behaviours/accordion.js +58 -0
- package/src/js/behaviours/action-bar-list.js +406 -0
- package/src/js/behaviours/action-bar.js +29 -0
- package/src/js/behaviours/chart.js +339 -0
- package/src/js/behaviours/collapsible.js +34 -0
- package/src/js/behaviours/editable-table.js +91 -0
- package/src/js/behaviours/expandable.js +80 -0
- package/src/js/behaviours/overflow-actions.js +137 -0
- package/src/js/behaviours/publish-schedule.js +91 -0
- package/src/js/behaviours/search-clear.js +19 -0
- package/src/js/behaviours/segmented-control.js +43 -0
- package/src/js/behaviours/submenu.js +73 -0
- package/src/js/behaviours/table-columns.js +77 -0
- package/src/js/behaviours/table-paste.js +305 -0
- package/src/js/behaviours/table-reorder.js +252 -0
- package/src/js/behaviours/table-sort.js +101 -0
- package/src/js/behaviours/tabs.js +148 -0
- package/src/js/behaviours/toast-manager.js +106 -0
- package/src/js/behaviours/toggle.js +186 -0
- package/src/js/behaviours/unsaved-guard.js +88 -0
- package/src/js/core-loader.js +26 -0
- package/src/js/index.js +85 -0
- package/src/js/polyfills/dialog-commands.js +20 -0
- package/src/js/util/dom.js +39 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Sheet/Drawer Component
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
@use "../variables" as *;
|
|
6
|
+
@use "../mixins" as *;
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------------------------
|
|
9
|
+
// Sheet Overlay
|
|
10
|
+
// --------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
.sheet {
|
|
13
|
+
// Where the panel sits while closed; each edge modifier sets its own
|
|
14
|
+
--sheet-from: translateX(100%);
|
|
15
|
+
--sheet-duration: calc(var(--framework-transition-duration) * 2);
|
|
16
|
+
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset: 0;
|
|
19
|
+
z-index: $z-modal;
|
|
20
|
+
display: flex;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
visibility: hidden;
|
|
23
|
+
// Closing a <dialog> applies display: none and drops it from the top layer at once; easing
|
|
24
|
+
// display and overlay as discrete values keeps it on screen until the slide out has finished
|
|
25
|
+
transition:
|
|
26
|
+
opacity var(--sheet-duration) var(--framework-transition-easing),
|
|
27
|
+
visibility var(--sheet-duration) allow-discrete,
|
|
28
|
+
display var(--sheet-duration) allow-discrete,
|
|
29
|
+
overlay var(--sheet-duration) allow-discrete;
|
|
30
|
+
|
|
31
|
+
&[open],
|
|
32
|
+
&--open {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
visibility: visible;
|
|
35
|
+
|
|
36
|
+
// Fade in from the closed state when a <dialog> is first shown
|
|
37
|
+
@starting-style {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// --------------------------------------------------------------------------
|
|
43
|
+
// Backdrop
|
|
44
|
+
// --------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
&__backdrop {
|
|
47
|
+
position: absolute;
|
|
48
|
+
inset: 0;
|
|
49
|
+
// Often a <button command="close">, so clear the button chrome
|
|
50
|
+
padding: 0;
|
|
51
|
+
border: 0;
|
|
52
|
+
cursor: default;
|
|
53
|
+
background-color: rgb(0 0 0 / 0.5);
|
|
54
|
+
backdrop-filter: blur(2px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// --------------------------------------------------------------------------
|
|
58
|
+
// Sheet Panel
|
|
59
|
+
// --------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
&__panel {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
bottom: 0;
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
width: 100%;
|
|
69
|
+
max-width: 24rem;
|
|
70
|
+
background-color: var(--bg);
|
|
71
|
+
box-shadow: $shadow-xl;
|
|
72
|
+
transform: var(--sheet-from);
|
|
73
|
+
transition: transform var(--sheet-duration) var(--framework-transition-easing);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:is([open], .sheet--open) &__panel {
|
|
77
|
+
transform: none;
|
|
78
|
+
|
|
79
|
+
// Slide in from the edge when a <dialog> is first shown
|
|
80
|
+
@starting-style {
|
|
81
|
+
transform: var(--sheet-from);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--right {
|
|
86
|
+
--sheet-from: translateX(100%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--left {
|
|
90
|
+
--sheet-from: translateX(-100%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--left &__panel {
|
|
94
|
+
left: 0;
|
|
95
|
+
right: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--top {
|
|
99
|
+
--sheet-from: translateY(-100%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&--bottom {
|
|
103
|
+
--sheet-from: translateY(100%);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--sm &__panel {
|
|
107
|
+
max-width: 20rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&--lg &__panel {
|
|
111
|
+
max-width: 32rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--xl &__panel {
|
|
115
|
+
max-width: 40rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--full &__panel {
|
|
119
|
+
max-width: none;
|
|
120
|
+
width: 100%;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// After the widths so a size modifier never caps a full-width top or bottom panel
|
|
124
|
+
&--top &__panel,
|
|
125
|
+
&--bottom &__panel {
|
|
126
|
+
left: 0;
|
|
127
|
+
right: 0;
|
|
128
|
+
width: 100%;
|
|
129
|
+
max-width: none;
|
|
130
|
+
height: auto;
|
|
131
|
+
max-height: 80vh;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--top &__panel {
|
|
135
|
+
bottom: auto;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&--bottom &__panel {
|
|
139
|
+
top: auto;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// --------------------------------------------------------------------------
|
|
143
|
+
// Sheet Parts
|
|
144
|
+
// --------------------------------------------------------------------------
|
|
145
|
+
|
|
146
|
+
&__header {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: flex-start;
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
gap: $spacing-sm;
|
|
151
|
+
padding: $spacing-lg;
|
|
152
|
+
border-bottom: 1px solid var(--border);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&__title {
|
|
156
|
+
font-size: $font-size-lg;
|
|
157
|
+
font-weight: $font-weight-semibold;
|
|
158
|
+
color: var(--fg);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__description {
|
|
162
|
+
font-size: $font-size-sm;
|
|
163
|
+
color: var(--fg-muted);
|
|
164
|
+
margin-top: $spacing-3xs;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&__close {
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
@include flex-center;
|
|
170
|
+
width: 2rem;
|
|
171
|
+
height: 2rem;
|
|
172
|
+
padding: 0;
|
|
173
|
+
background: transparent;
|
|
174
|
+
border: none;
|
|
175
|
+
border-radius: $radius-sm;
|
|
176
|
+
color: var(--fg-muted);
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
@include transition-colors;
|
|
179
|
+
|
|
180
|
+
&:hover {
|
|
181
|
+
color: var(--fg);
|
|
182
|
+
background-color: var(--bg-muted);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
svg {
|
|
186
|
+
width: $icon-size-md;
|
|
187
|
+
height: $icon-size-md;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__content {
|
|
192
|
+
flex: 1;
|
|
193
|
+
overflow-y: auto;
|
|
194
|
+
padding: $spacing-lg;
|
|
195
|
+
@include scrollbar-thin;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&__footer {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: flex-end;
|
|
202
|
+
gap: $spacing-xs;
|
|
203
|
+
padding: $spacing-sm $spacing-lg;
|
|
204
|
+
border-top: 1px solid var(--border);
|
|
205
|
+
background-color: var(--bg-muted);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// --------------------------------------------------------------------------
|
|
210
|
+
// Drawer: a sheet whose panel has a border on its inner edge
|
|
211
|
+
//
|
|
212
|
+
// Usable on its own with drawer__* elements and drawer--* modifiers, or added alongside
|
|
213
|
+
// .sheet classes on the same markup.
|
|
214
|
+
// --------------------------------------------------------------------------
|
|
215
|
+
|
|
216
|
+
.drawer {
|
|
217
|
+
@extend .sheet;
|
|
218
|
+
|
|
219
|
+
@each $modifier in (right, left, top, bottom, sm, lg, xl, full) {
|
|
220
|
+
&--#{$modifier} {
|
|
221
|
+
@extend .sheet--#{$modifier};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@each $element in (backdrop, panel, header, title, description, close, content, footer, handle) {
|
|
226
|
+
&__#{$element} {
|
|
227
|
+
@extend .sheet__#{$element};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&__panel {
|
|
232
|
+
border-left: 1px solid var(--border);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&--left .drawer__panel {
|
|
236
|
+
border-left: none;
|
|
237
|
+
border-right: 1px solid var(--border);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&--top .drawer__panel,
|
|
241
|
+
&--bottom .drawer__panel {
|
|
242
|
+
border-left: none;
|
|
243
|
+
border-right: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&--top .drawer__panel {
|
|
247
|
+
border-bottom: 1px solid var(--border);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&--bottom .drawer__panel {
|
|
251
|
+
border-top: 1px solid var(--border);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// --------------------------------------------------------------------------
|
|
256
|
+
// Mobile Drawer Handle
|
|
257
|
+
// --------------------------------------------------------------------------
|
|
258
|
+
|
|
259
|
+
.sheet__handle {
|
|
260
|
+
display: none;
|
|
261
|
+
width: 3rem;
|
|
262
|
+
height: 0.25rem;
|
|
263
|
+
margin: $spacing-xs auto;
|
|
264
|
+
background-color: var(--border);
|
|
265
|
+
border-radius: $radius-full;
|
|
266
|
+
|
|
267
|
+
.sheet--bottom &,
|
|
268
|
+
.sheet--top & {
|
|
269
|
+
display: block;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// --------------------------------------------------------------------------
|
|
274
|
+
// Responsive
|
|
275
|
+
// --------------------------------------------------------------------------
|
|
276
|
+
|
|
277
|
+
@include max-md {
|
|
278
|
+
.sheet {
|
|
279
|
+
&--right &__panel,
|
|
280
|
+
&--left &__panel,
|
|
281
|
+
&__panel {
|
|
282
|
+
max-width: 100%;
|
|
283
|
+
width: 100%;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Sidebar Component
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
@use "../variables" as *;
|
|
6
|
+
@use "../mixins" as *;
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------------------------
|
|
9
|
+
// Base Sidebar
|
|
10
|
+
// --------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
.sidebar {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
width: $sidebar-width;
|
|
16
|
+
height: 100vh;
|
|
17
|
+
background-color: var(--sidebar);
|
|
18
|
+
border-right: 1px solid var(--sidebar-border);
|
|
19
|
+
position: fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
z-index: $z-fixed;
|
|
23
|
+
@include transition-default;
|
|
24
|
+
@include scrollbar-thin;
|
|
25
|
+
|
|
26
|
+
// --------------------------------------------------------------------------
|
|
27
|
+
// Variants
|
|
28
|
+
// --------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
// Collapsible sidebar
|
|
31
|
+
&--collapsed {
|
|
32
|
+
width: $sidebar-width-collapsed;
|
|
33
|
+
|
|
34
|
+
.sidebar__logo-text,
|
|
35
|
+
.sidebar__item-text,
|
|
36
|
+
.sidebar__section-title,
|
|
37
|
+
.sidebar__footer-text {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sidebar__item {
|
|
42
|
+
justify-content: center;
|
|
43
|
+
padding: $spacing-2xs;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sidebar__section {
|
|
47
|
+
padding: $spacing-2xs;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Right side
|
|
52
|
+
&--right {
|
|
53
|
+
left: auto;
|
|
54
|
+
right: 0;
|
|
55
|
+
border-right: none;
|
|
56
|
+
border-left: 1px solid var(--sidebar-border);
|
|
57
|
+
|
|
58
|
+
.sidebar__toggle {
|
|
59
|
+
right: auto;
|
|
60
|
+
left: -1rem;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// --------------------------------------------------------------------------
|
|
65
|
+
// Elements
|
|
66
|
+
// --------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
&__header {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: $spacing-xs;
|
|
72
|
+
padding: $spacing-sm;
|
|
73
|
+
height: $navbar-height;
|
|
74
|
+
border-bottom: 1px solid var(--sidebar-border);
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__logo {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: $spacing-xs;
|
|
82
|
+
font-weight: $font-weight-semibold;
|
|
83
|
+
font-size: $font-size-lg;
|
|
84
|
+
color: var(--sidebar-fg);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__logo-icon {
|
|
88
|
+
width: $icon-size-lg;
|
|
89
|
+
height: $icon-size-lg;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__logo-text {
|
|
94
|
+
@include text-truncate;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__content {
|
|
98
|
+
flex: 1;
|
|
99
|
+
overflow-y: auto;
|
|
100
|
+
padding: $spacing-2xs;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&__section {
|
|
104
|
+
padding: $spacing-2xs $spacing-xs;
|
|
105
|
+
|
|
106
|
+
& + & {
|
|
107
|
+
margin-top: $spacing-2xs;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__section-title {
|
|
112
|
+
font-size: $font-size-xs;
|
|
113
|
+
font-weight: $font-weight-medium;
|
|
114
|
+
color: var(--sidebar-muted);
|
|
115
|
+
text-transform: uppercase;
|
|
116
|
+
letter-spacing: $letter-spacing-wide;
|
|
117
|
+
padding: $spacing-2xs $spacing-xs;
|
|
118
|
+
margin-bottom: $spacing-3xs;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__nav {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
gap: $spacing-3xs;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__item {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: $spacing-xs;
|
|
131
|
+
padding: $spacing-2xs $spacing-xs;
|
|
132
|
+
font-size: $font-size-sm;
|
|
133
|
+
color: var(--sidebar-fg);
|
|
134
|
+
border-radius: $radius-md;
|
|
135
|
+
@include interactive;
|
|
136
|
+
|
|
137
|
+
&:hover {
|
|
138
|
+
background-color: var(--sidebar-accent);
|
|
139
|
+
color: var(--sidebar-accent-fg);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&[aria-current="page"],
|
|
143
|
+
&--active {
|
|
144
|
+
background-color: var(--sidebar-accent);
|
|
145
|
+
color: var(--sidebar-accent-fg);
|
|
146
|
+
font-weight: $font-weight-medium;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&:disabled,
|
|
150
|
+
&[aria-disabled="true"],
|
|
151
|
+
&--disabled {
|
|
152
|
+
@include disabled;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&__item-icon {
|
|
157
|
+
width: $icon-size-md;
|
|
158
|
+
height: $icon-size-md;
|
|
159
|
+
flex-shrink: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&__item-text {
|
|
163
|
+
flex: 1;
|
|
164
|
+
@include text-truncate;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&__item-badge {
|
|
168
|
+
font-size: $font-size-xs;
|
|
169
|
+
padding: 0.125rem $spacing-2xs;
|
|
170
|
+
background-color: var(--primary);
|
|
171
|
+
color: var(--primary-fg);
|
|
172
|
+
border-radius: $radius-full;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__divider {
|
|
176
|
+
height: 1px;
|
|
177
|
+
background-color: var(--sidebar-border);
|
|
178
|
+
margin: $spacing-2xs $spacing-xs;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&__footer {
|
|
182
|
+
padding: $spacing-sm;
|
|
183
|
+
border-top: 1px solid var(--sidebar-border);
|
|
184
|
+
flex-shrink: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&__footer-text {
|
|
188
|
+
font-size: $font-size-sm;
|
|
189
|
+
color: var(--sidebar-muted);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Toggle button for collapse
|
|
193
|
+
&__toggle {
|
|
194
|
+
position: absolute;
|
|
195
|
+
top: 50%;
|
|
196
|
+
right: -1rem;
|
|
197
|
+
transform: translateY(-50%);
|
|
198
|
+
width: 2rem;
|
|
199
|
+
height: 2rem;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
background-color: var(--bg);
|
|
204
|
+
border: 1px solid var(--border);
|
|
205
|
+
border-radius: $radius-full;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
@include transition-default;
|
|
208
|
+
|
|
209
|
+
&:hover {
|
|
210
|
+
background-color: var(--accent);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
svg {
|
|
214
|
+
width: $icon-size-sm;
|
|
215
|
+
height: $icon-size-sm;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// --------------------------------------------------------------------------
|
|
221
|
+
// Main Content Offset
|
|
222
|
+
// --------------------------------------------------------------------------
|
|
223
|
+
|
|
224
|
+
.sidebarlayout {
|
|
225
|
+
display: flex;
|
|
226
|
+
min-height: 100vh;
|
|
227
|
+
|
|
228
|
+
&__main {
|
|
229
|
+
flex: 1;
|
|
230
|
+
margin-left: $sidebar-width;
|
|
231
|
+
@include transition-default;
|
|
232
|
+
|
|
233
|
+
.sidebar--collapsed + &,
|
|
234
|
+
&--collapsed {
|
|
235
|
+
margin-left: $sidebar-width-collapsed;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// A right-hand sidebar offsets the other side
|
|
240
|
+
&:has(> .sidebar--right) > &__main {
|
|
241
|
+
margin-left: 0;
|
|
242
|
+
margin-right: $sidebar-width;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&:has(> .sidebar--right.sidebar--collapsed) > &__main,
|
|
246
|
+
&:has(> .sidebar--right) > &__main--collapsed {
|
|
247
|
+
margin-right: $sidebar-width-collapsed;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// --------------------------------------------------------------------------
|
|
252
|
+
// Mobile Sidebar (overlay)
|
|
253
|
+
// --------------------------------------------------------------------------
|
|
254
|
+
|
|
255
|
+
@include max-lg {
|
|
256
|
+
.sidebar {
|
|
257
|
+
transform: translateX(-100%);
|
|
258
|
+
|
|
259
|
+
&--open {
|
|
260
|
+
transform: translateX(0);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&--right {
|
|
264
|
+
transform: translateX(100%);
|
|
265
|
+
|
|
266
|
+
&.sidebar--open {
|
|
267
|
+
transform: translateX(0);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.sidebaroverlay {
|
|
273
|
+
position: fixed;
|
|
274
|
+
inset: 0;
|
|
275
|
+
background-color: rgb(0 0 0 / 0.5);
|
|
276
|
+
z-index: $z-fixed - 1;
|
|
277
|
+
opacity: 0;
|
|
278
|
+
visibility: hidden;
|
|
279
|
+
@include transition-opacity;
|
|
280
|
+
|
|
281
|
+
&--visible {
|
|
282
|
+
opacity: 1;
|
|
283
|
+
visibility: visible;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.sidebarlayout__main,
|
|
288
|
+
.sidebarlayout:has(> .sidebar--right) > .sidebarlayout__main {
|
|
289
|
+
margin-left: 0;
|
|
290
|
+
margin-right: 0;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// --------------------------------------------------------------------------
|
|
295
|
+
// Submenu / Nested Navigation
|
|
296
|
+
// --------------------------------------------------------------------------
|
|
297
|
+
|
|
298
|
+
.sidebar__submenu {
|
|
299
|
+
display: none;
|
|
300
|
+
flex-direction: column;
|
|
301
|
+
gap: $spacing-3xs;
|
|
302
|
+
padding-left: $spacing-xl;
|
|
303
|
+
margin-top: $spacing-3xs;
|
|
304
|
+
|
|
305
|
+
[aria-expanded="true"] + &,
|
|
306
|
+
&--open {
|
|
307
|
+
display: flex;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.sidebar__item--expandable {
|
|
312
|
+
.sidebar__item-arrow {
|
|
313
|
+
width: $icon-size-sm;
|
|
314
|
+
height: $icon-size-sm;
|
|
315
|
+
margin-left: auto;
|
|
316
|
+
@include transition-transform;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[aria-expanded="true"] {
|
|
320
|
+
.sidebar__item-arrow {
|
|
321
|
+
transform: rotate(180deg);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|