vanilla-framework 3.7.0 → 3.8.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/package.json
CHANGED
|
@@ -191,12 +191,9 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
191
191
|
padding-right: 0;
|
|
192
192
|
|
|
193
193
|
@media (min-width: $threshold-4-6-col) {
|
|
194
|
+
padding-left: map-get($grid-margin-widths, default);
|
|
194
195
|
padding-right: 0;
|
|
195
196
|
}
|
|
196
|
-
|
|
197
|
-
@media (min-width: $breakpoint-navigation-threshold) {
|
|
198
|
-
padding-left: map-get($grid-margin-widths, small);
|
|
199
|
-
}
|
|
200
197
|
}
|
|
201
198
|
|
|
202
199
|
// Styles for old navigation logo
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
Side navigation in default variant.
|
|
9
9
|
.p-side-navigation--icons:
|
|
10
10
|
Side navigation with item icons.
|
|
11
|
+
.p-side-navigation--accordion:
|
|
12
|
+
Side navigation with expanding accordion items.
|
|
11
13
|
.p-side-navigation--raw-html:
|
|
12
14
|
Raw HTML version of side navigation (used with links generated by an external service).
|
|
13
15
|
"&.is-drawer-expanded":
|
|
@@ -67,6 +69,10 @@
|
|
|
67
69
|
.p-side-navigation__text:
|
|
68
70
|
Single text item in side navigation (for items that are not linked).
|
|
69
71
|
|
|
72
|
+
Item accordion button:
|
|
73
|
+
.p-side-navigation__accordion-button:
|
|
74
|
+
Single accordion button item in side navigation with `.p-side-navigation--accordion` variant.
|
|
75
|
+
|
|
70
76
|
Item icon:
|
|
71
77
|
.p-side-navigation__icon:
|
|
72
78
|
An icon in side navigation item (used with `.p-side-navigation--icons` variant).
|
|
@@ -118,15 +124,19 @@
|
|
|
118
124
|
[class*='p-side-navigation--'].is-drawer-expanded & {
|
|
119
125
|
@extend %vf-has-box-shadow;
|
|
120
126
|
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
@media (max-width: $threshold-6-12-col - 1px) {
|
|
128
|
+
animation: vf-p-side-navigation-expand map-get($animation-duration, brisk);
|
|
129
|
+
transform: translateX(0);
|
|
130
|
+
}
|
|
123
131
|
}
|
|
124
132
|
|
|
125
133
|
.p-side-navigation.is-collapsed &,
|
|
126
134
|
.p-side-navigation.is-drawer-collapsed &,
|
|
127
135
|
[class*='p-side-navigation--'].is-collapsed &,
|
|
128
136
|
[class*='p-side-navigation--'].is-drawer-collapsed & {
|
|
129
|
-
|
|
137
|
+
@media (max-width: $threshold-6-12-col - 1px) {
|
|
138
|
+
animation: vf-p-side-navigation-collapse map-get($animation-duration, brisk);
|
|
139
|
+
}
|
|
130
140
|
}
|
|
131
141
|
|
|
132
142
|
.p-side-navigation.is-drawer-hidden &,
|
|
@@ -260,6 +270,10 @@
|
|
|
260
270
|
@include vf-side-navigation-spacing-left($prop: left, $multiplier: 2, $offset: $sp-sidenav--icon-width);
|
|
261
271
|
}
|
|
262
272
|
|
|
273
|
+
.p-side-navigation--accordion &::after {
|
|
274
|
+
@include vf-side-navigation-spacing-left($prop: left, $multiplier: 2);
|
|
275
|
+
}
|
|
276
|
+
|
|
263
277
|
&:last-of-type::after {
|
|
264
278
|
content: none;
|
|
265
279
|
}
|
|
@@ -267,6 +281,26 @@
|
|
|
267
281
|
|
|
268
282
|
.p-side-navigation__list {
|
|
269
283
|
@extend %side-navigation__list;
|
|
284
|
+
|
|
285
|
+
// accordion styles
|
|
286
|
+
&[aria-expanded] {
|
|
287
|
+
@include vf-transition(#{transform, opacity}, fast);
|
|
288
|
+
&.has-tick-elements {
|
|
289
|
+
padding-left: 1em;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
&[aria-expanded='false'] {
|
|
293
|
+
height: 0;
|
|
294
|
+
opacity: 0;
|
|
295
|
+
transform: translate3d(0, -0.5rem, 0);
|
|
296
|
+
visibility: hidden;
|
|
297
|
+
}
|
|
298
|
+
&[aria-expanded='true'] {
|
|
299
|
+
height: auto;
|
|
300
|
+
opacity: 1;
|
|
301
|
+
transform: translate3d(0, 0, 0);
|
|
302
|
+
visibility: visible;
|
|
303
|
+
}
|
|
270
304
|
}
|
|
271
305
|
|
|
272
306
|
%side-navigation__text {
|
|
@@ -318,17 +352,66 @@
|
|
|
318
352
|
@extend %side-navigation__link;
|
|
319
353
|
}
|
|
320
354
|
|
|
355
|
+
.p-side-navigation__accordion-button {
|
|
356
|
+
// reset default button styles
|
|
357
|
+
border: 0;
|
|
358
|
+
border-radius: 0;
|
|
359
|
+
font-size: inherit;
|
|
360
|
+
justify-content: flex-start;
|
|
361
|
+
margin-bottom: 0;
|
|
362
|
+
text-align: left;
|
|
363
|
+
width: 100%;
|
|
364
|
+
|
|
365
|
+
&::before {
|
|
366
|
+
@extend %icon;
|
|
367
|
+
@include vf-transition($property: transform, $duration: fast);
|
|
368
|
+
|
|
369
|
+
align-self: center;
|
|
370
|
+
content: '';
|
|
371
|
+
flex-shrink: 0;
|
|
372
|
+
margin-left: calc(-1 * ($sph--large + $sp-sidenav--icon-width));
|
|
373
|
+
margin-right: $sph--large;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// aria-selected controls the open and closed state for the accordion tab
|
|
377
|
+
&[aria-expanded='true'] {
|
|
378
|
+
// override base expanded button styles
|
|
379
|
+
background-color: inherit;
|
|
380
|
+
|
|
381
|
+
&:hover {
|
|
382
|
+
background-color: $colors--light-theme--background-hover;
|
|
383
|
+
}
|
|
384
|
+
@include vf-transition(#{background-color, border-color});
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&[aria-expanded='false'] {
|
|
388
|
+
&::before {
|
|
389
|
+
transform: rotate(-90deg);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@include vf-transition(#{background-color, border-color});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
321
396
|
.p-side-navigation__heading,
|
|
322
397
|
.p-side-navigation__text,
|
|
323
|
-
.p-side-navigation__link
|
|
398
|
+
.p-side-navigation__link,
|
|
399
|
+
.p-side-navigation__accordion-button {
|
|
324
400
|
@extend %side-navigation__text;
|
|
325
401
|
|
|
402
|
+
// offset for accordion chevrons is icon size + twice spacing around it
|
|
403
|
+
// we don't use grid width spacing for accordion (as we do in icon version)
|
|
404
|
+
$sp-sidenav--accordion-offset: $sp-sidenav--icon-width + 2 * $sph--large;
|
|
405
|
+
|
|
326
406
|
.p-side-navigation--icons & {
|
|
327
407
|
@include vf-side-navigation-spacing-left($multiplier: 2, $offset: $sp-sidenav--icon-width);
|
|
328
|
-
|
|
329
408
|
position: relative;
|
|
330
409
|
}
|
|
331
410
|
|
|
411
|
+
.p-side-navigation--accordion & {
|
|
412
|
+
@include vf-side-navigation-spacing-left($multiplier: 0, $offset: $sp-sidenav--accordion-offset);
|
|
413
|
+
}
|
|
414
|
+
|
|
332
415
|
// nested 2nd level of navigation
|
|
333
416
|
.p-side-navigation__item--title .p-side-navigation__item &,
|
|
334
417
|
.p-side-navigation__item .p-side-navigation__item & {
|
|
@@ -338,6 +421,11 @@
|
|
|
338
421
|
.p-side-navigation--icons & {
|
|
339
422
|
@include vf-side-navigation-spacing-left($multiplier: 3, $offset: $sp-sidenav--icon-width);
|
|
340
423
|
}
|
|
424
|
+
|
|
425
|
+
// add spacing for variant with accordions
|
|
426
|
+
.p-side-navigation--accordion & {
|
|
427
|
+
@include vf-side-navigation-spacing-left($multiplier: 1, $offset: $sp-sidenav--accordion-offset);
|
|
428
|
+
}
|
|
341
429
|
}
|
|
342
430
|
|
|
343
431
|
// nested 3rd level of navigation
|
|
@@ -349,6 +437,11 @@
|
|
|
349
437
|
.p-side-navigation--icons & {
|
|
350
438
|
@include vf-side-navigation-spacing-left($multiplier: 4, $offset: $sp-sidenav--icon-width);
|
|
351
439
|
}
|
|
440
|
+
|
|
441
|
+
// add spacing for variant with accordions
|
|
442
|
+
.p-side-navigation--accordion & {
|
|
443
|
+
@include vf-side-navigation-spacing-left($multiplier: 2, $offset: $sp-sidenav--accordion-offset);
|
|
444
|
+
}
|
|
352
445
|
}
|
|
353
446
|
}
|
|
354
447
|
|
|
@@ -471,10 +564,6 @@
|
|
|
471
564
|
@media (min-width: $threshold-4-6-col) {
|
|
472
565
|
#{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
|
|
473
566
|
}
|
|
474
|
-
|
|
475
|
-
@media (min-width: $threshold-6-12-col) {
|
|
476
|
-
#{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
|
|
477
|
-
}
|
|
478
567
|
}
|
|
479
568
|
|
|
480
569
|
// theme
|
|
@@ -588,6 +677,19 @@
|
|
|
588
677
|
color: $color-sidenav-text-active;
|
|
589
678
|
}
|
|
590
679
|
|
|
680
|
+
.p-side-navigation__accordion-button {
|
|
681
|
+
background-color: inherit;
|
|
682
|
+
color: inherit;
|
|
683
|
+
&::before {
|
|
684
|
+
@include vf-icon-chevron($color-sidenav-toggle-icon);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
&:hover {
|
|
688
|
+
background: $color-sidenav-item-background-hover;
|
|
689
|
+
color: $color-sidenav-text-active;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
591
693
|
// styles applied when side nav is used in application layout
|
|
592
694
|
@if mixin-exists(vf-application-layout--when-collapsed) {
|
|
593
695
|
.p-side-navigation__item.has-active-child {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
$breakpoint-x-small: 460px !default;
|
|
3
3
|
$breakpoint-small: 620px !default;
|
|
4
4
|
$breakpoint-large: 1036px !default;
|
|
5
|
-
$breakpoint-navigation-threshold: $breakpoint-
|
|
5
|
+
$breakpoint-navigation-threshold: $breakpoint-large !default;
|
|
6
6
|
$breakpoint-heading-threshold: $breakpoint-large !default;
|
|
7
7
|
$breakpoint-x-large: 1681px !default; // exclude most laptops
|