@parallelogram-js/dashboard 0.1.5 → 0.1.7
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 +25 -1
- package/README.md +34 -2
- package/dist/parallelogram-dashboard.css +92 -7
- package/dist/parallelogram-dashboard.css.map +1 -1
- package/dist/parallelogram-dashboard.min.css +1 -1
- package/package.json +1 -1
- package/scss/_datetime.scss +1 -1
- package/scss/_tokens.scss +4 -0
- package/scss/_variables.scss +9 -0
- package/scss/components/_dashboard.scss +114 -4
- package/scss/components/_input.scss +6 -2
package/package.json
CHANGED
package/scss/_datetime.scss
CHANGED
|
@@ -39,7 +39,7 @@ p-datetime.input {
|
|
|
39
39
|
position: relative;
|
|
40
40
|
min-height: #{$btn-height-md};
|
|
41
41
|
background-color: var(--bg);
|
|
42
|
-
border:
|
|
42
|
+
border: var(--control-border-width) solid var(--input);
|
|
43
43
|
border-radius: #{$radius-md};
|
|
44
44
|
font-size: #{$font-size-sm};
|
|
45
45
|
|
package/scss/_tokens.scss
CHANGED
|
@@ -174,6 +174,10 @@ $chrome-tokens: (
|
|
|
174
174
|
--radius: var(--radius-lg);
|
|
175
175
|
--control-border-width: #{$control-border-width};
|
|
176
176
|
--icon-stroke-width: #{$icon-stroke-width};
|
|
177
|
+
--navmenu-width: #{$navmenu-width};
|
|
178
|
+
--navmenu-labelled-width: #{$navmenu-labelled-width};
|
|
179
|
+
--subnav-width: #{$subnav-width};
|
|
180
|
+
--navmenu-logo-height: #{$navmenu-logo-height};
|
|
177
181
|
|
|
178
182
|
// Chrome regions
|
|
179
183
|
@each $region, $tokens in $chrome-tokens {
|
package/scss/_variables.scss
CHANGED
|
@@ -218,5 +218,14 @@ $icon-size-lg: 1.5rem !default; // 24px
|
|
|
218
218
|
$sidebar-width: 16rem !default; // 256px
|
|
219
219
|
$sidebar-width-collapsed: 4rem !default; // 64px
|
|
220
220
|
|
|
221
|
+
// Dashboard rail and section menu widths, emitted as --navmenu-width, --navmenu-labelled-width
|
|
222
|
+
// and --subnav-width so a theme can change them
|
|
223
|
+
$navmenu-width: 4rem !default; // 64px
|
|
224
|
+
$navmenu-labelled-width: 14rem !default; // 224px
|
|
225
|
+
$subnav-width: 16rem !default; // 256px
|
|
226
|
+
|
|
227
|
+
// Height of the logo in a labelled rail's header, emitted as --navmenu-logo-height
|
|
228
|
+
$navmenu-logo-height: 1.5rem !default; // 24px
|
|
229
|
+
|
|
221
230
|
// Navbar height
|
|
222
231
|
$navbar-height: 4rem !default; // 64px
|
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
display: flex;
|
|
28
28
|
min-height: 100vh;
|
|
29
29
|
background-color: var(--bg);
|
|
30
|
+
|
|
31
|
+
// The section menu and the main column are offset by the rail's width, so a labelled rail
|
|
32
|
+
// sets it for the whole shell rather than only for itself
|
|
33
|
+
&:has(> .navmenu--labelled) {
|
|
34
|
+
--navmenu-width: var(--navmenu-labelled-width);
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
// --------------------------------------------------------------------------
|
|
@@ -38,7 +44,7 @@
|
|
|
38
44
|
top: 0;
|
|
39
45
|
display: flex;
|
|
40
46
|
flex-direction: column;
|
|
41
|
-
width:
|
|
47
|
+
width: var(--navmenu-width);
|
|
42
48
|
height: 100vh;
|
|
43
49
|
@include chrome-region(navmenu);
|
|
44
50
|
border-right: 1px solid var(--border);
|
|
@@ -132,6 +138,12 @@
|
|
|
132
138
|
}
|
|
133
139
|
}
|
|
134
140
|
|
|
141
|
+
// Shown only in a labelled rail; the icon rail names its items with the tooltip
|
|
142
|
+
&__label,
|
|
143
|
+
&__section-title {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
135
147
|
// Fixed so the rail's scrolling area can't clip it. With no offsets it keeps its static position,
|
|
136
148
|
// centred on the item by the item's flex alignment, and is then moved clear of the rail's edge
|
|
137
149
|
&__tooltip {
|
|
@@ -198,6 +210,84 @@
|
|
|
198
210
|
}
|
|
199
211
|
}
|
|
200
212
|
|
|
213
|
+
// --------------------------------------------------------------------------
|
|
214
|
+
// Labelled Rail
|
|
215
|
+
// --------------------------------------------------------------------------
|
|
216
|
+
//
|
|
217
|
+
// The rail at --navmenu-labelled-width, each item an icon beside its label, with section titles
|
|
218
|
+
// and a logo that can be wider than it is tall. Below md it is the same bottom bar as the icon
|
|
219
|
+
// rail, with each label under its icon.
|
|
220
|
+
|
|
221
|
+
.navmenu--labelled {
|
|
222
|
+
.navmenu__header {
|
|
223
|
+
justify-content: flex-start;
|
|
224
|
+
padding: 0 $spacing-sm;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.navmenu__logo {
|
|
228
|
+
width: auto;
|
|
229
|
+
height: auto;
|
|
230
|
+
|
|
231
|
+
svg {
|
|
232
|
+
width: auto;
|
|
233
|
+
height: var(--navmenu-logo-height);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.navmenu__content {
|
|
238
|
+
padding: $spacing-2xs $spacing-xs;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.navmenu__section-title {
|
|
242
|
+
display: block;
|
|
243
|
+
padding: $spacing-3xs $spacing-2xs;
|
|
244
|
+
font-size: $font-size-xs;
|
|
245
|
+
font-weight: $font-weight-medium;
|
|
246
|
+
color: var(--fg-muted);
|
|
247
|
+
text-transform: uppercase;
|
|
248
|
+
letter-spacing: $letter-spacing-wide;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.navmenu__item {
|
|
252
|
+
justify-content: flex-start;
|
|
253
|
+
gap: $spacing-2xs;
|
|
254
|
+
width: auto;
|
|
255
|
+
height: auto;
|
|
256
|
+
margin: 0;
|
|
257
|
+
padding: $spacing-2xs;
|
|
258
|
+
font-size: $font-size-sm;
|
|
259
|
+
|
|
260
|
+
&[aria-current="page"],
|
|
261
|
+
&--active {
|
|
262
|
+
font-weight: $font-weight-medium;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
svg {
|
|
266
|
+
width: $icon-size-md;
|
|
267
|
+
height: $icon-size-md;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.navmenu__label {
|
|
273
|
+
display: block;
|
|
274
|
+
flex: 1;
|
|
275
|
+
@include text-truncate;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.navmenu__tooltip {
|
|
279
|
+
display: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.navmenu__footer {
|
|
283
|
+
padding: $spacing-2xs $spacing-xs;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.navmenu__avatar {
|
|
287
|
+
margin: 0;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
201
291
|
// --------------------------------------------------------------------------
|
|
202
292
|
// Sub Navigation (Expanded Sidebar)
|
|
203
293
|
// --------------------------------------------------------------------------
|
|
@@ -207,7 +297,7 @@
|
|
|
207
297
|
top: 0;
|
|
208
298
|
display: flex;
|
|
209
299
|
flex-direction: column;
|
|
210
|
-
width:
|
|
300
|
+
width: var(--subnav-width);
|
|
211
301
|
height: 100vh;
|
|
212
302
|
@include chrome-region(subnav);
|
|
213
303
|
border-right: 1px solid var(--border);
|
|
@@ -576,7 +666,7 @@
|
|
|
576
666
|
|
|
577
667
|
.subnav {
|
|
578
668
|
position: fixed;
|
|
579
|
-
left:
|
|
669
|
+
left: var(--navmenu-width);
|
|
580
670
|
top: 0;
|
|
581
671
|
bottom: 0;
|
|
582
672
|
z-index: $z-fixed + 1;
|
|
@@ -588,7 +678,7 @@
|
|
|
588
678
|
}
|
|
589
679
|
|
|
590
680
|
.dashboard__main {
|
|
591
|
-
margin-left:
|
|
681
|
+
margin-left: var(--navmenu-width);
|
|
592
682
|
}
|
|
593
683
|
}
|
|
594
684
|
|
|
@@ -644,6 +734,26 @@
|
|
|
644
734
|
}
|
|
645
735
|
}
|
|
646
736
|
|
|
737
|
+
.navmenu--labelled {
|
|
738
|
+
.navmenu__section-title {
|
|
739
|
+
display: none;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.navmenu__item {
|
|
743
|
+
flex-direction: column;
|
|
744
|
+
justify-content: center;
|
|
745
|
+
gap: 0.125rem;
|
|
746
|
+
min-width: 3.5rem;
|
|
747
|
+
padding: $spacing-3xs $spacing-2xs;
|
|
748
|
+
font-size: $font-size-xs;
|
|
749
|
+
line-height: $line-height-tight;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.navmenu__label {
|
|
753
|
+
flex: none;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
647
757
|
// Leaves a strip of the overlay showing so a tap beside the panel closes it
|
|
648
758
|
.subnav {
|
|
649
759
|
left: 0;
|
|
@@ -116,15 +116,19 @@
|
|
|
116
116
|
.checkbox,
|
|
117
117
|
.radio {
|
|
118
118
|
display: inline-flex;
|
|
119
|
-
|
|
119
|
+
// The control sits on the label's first line, so a label that wraps keeps it at the top rather
|
|
120
|
+
// than floating between the lines, and it never shrinks to make room for the words
|
|
121
|
+
align-items: flex-start;
|
|
120
122
|
gap: $spacing-2xs;
|
|
121
123
|
cursor: pointer;
|
|
122
124
|
user-select: none;
|
|
123
125
|
|
|
124
126
|
&__input {
|
|
125
127
|
appearance: none;
|
|
128
|
+
flex-shrink: 0;
|
|
126
129
|
width: 1rem;
|
|
127
130
|
height: 1rem;
|
|
131
|
+
margin-top: 0.125rem;
|
|
128
132
|
border: var(--control-border-width) solid var(--input);
|
|
129
133
|
background-color: transparent;
|
|
130
134
|
@include transition-default;
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
|
|
154
158
|
&__label {
|
|
155
159
|
font-size: $font-size-sm;
|
|
156
|
-
line-height: 1;
|
|
160
|
+
line-height: 1.25;
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
&:has(:disabled),
|