@asd20/ui-next 2.0.19 → 2.0.21
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 +9 -0
- package/package.json +1 -1
- package/src/components/molecules/Asd20Modal/index.vue +0 -16
- package/src/components/organisms/Asd20MediaSection/index.vue +2 -1
- package/src/components/organisms/Asd20PageHeader/index.vue +121 -9
- package/src/components/templates/Asd20ArticleTemplate/index.vue +1 -0
- package/src/components/utils/FocusTrap.vue +30 -26
- package/src/mixins/pageTemplateMixin.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.21](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.20...ui-next-v2.0.21) (2026-04-02)
|
|
4
|
+
|
|
5
|
+
## [2.0.20](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.19...ui-next-v2.0.20) (2026-04-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove focus-trap styles that may be interfering with moble styles ([ad2be6c](https://github.com/academydistrict20/asd20-ui-next/commit/ad2be6cfd68277861a88d8ce143f53336bda4392))
|
|
11
|
+
|
|
3
12
|
## [2.0.19](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.18...ui-next-v2.0.19) (2026-04-02)
|
|
4
13
|
|
|
5
14
|
## [2.0.18](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.17...ui-next-v2.0.18) (2026-04-02)
|
package/package.json
CHANGED
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
>
|
|
14
14
|
<focus-trap
|
|
15
15
|
:open="resolvedOpen"
|
|
16
|
-
class="asd20-modal-focus-trap"
|
|
17
|
-
:class="{ 'asd20-modal-focus-trap--windowed': windowed }"
|
|
18
16
|
>
|
|
19
17
|
<div class="asd20-modal">
|
|
20
18
|
<div
|
|
@@ -141,20 +139,6 @@ export default {
|
|
|
141
139
|
align-items: stretch;
|
|
142
140
|
}
|
|
143
141
|
|
|
144
|
-
.asd20-modal-focus-trap {
|
|
145
|
-
display: flex;
|
|
146
|
-
flex: 1 1 auto;
|
|
147
|
-
width: 100%;
|
|
148
|
-
max-width: 100%;
|
|
149
|
-
max-height: 100%;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
align-items: stretch;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.asd20-modal-focus-trap--windowed {
|
|
155
|
-
align-items: center;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
142
|
.asd20-modal {
|
|
159
143
|
position: relative;
|
|
160
144
|
flex-grow: 1;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<slot name="before" />
|
|
8
8
|
|
|
9
9
|
<asd20-image-gallery
|
|
10
|
-
v-if="images.length > 1"
|
|
10
|
+
v-if="allowSingleImageGallery ? images.length > 0 : images.length > 1"
|
|
11
11
|
title="Images"
|
|
12
12
|
:images="images"
|
|
13
13
|
>
|
|
@@ -37,6 +37,7 @@ export default {
|
|
|
37
37
|
),
|
|
38
38
|
},
|
|
39
39
|
props: {
|
|
40
|
+
allowSingleImageGallery: { type: Boolean, default: false },
|
|
40
41
|
images: { type: Array, default: () => [] },
|
|
41
42
|
videos: { type: Array, default: () => [] },
|
|
42
43
|
},
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
></asd20-organization-picker>
|
|
16
16
|
<slot name="top" />
|
|
17
17
|
</div>
|
|
18
|
-
<div
|
|
18
|
+
<div
|
|
19
|
+
class="asd20-page-header__main"
|
|
20
|
+
:class="{ 'asd20-page-header__main--has-image': imageUrl && !$slots.aside }"
|
|
21
|
+
>
|
|
19
22
|
<div
|
|
20
23
|
class="asd20-page-header__content"
|
|
21
24
|
:class="headerImageUrl ? 'new-header add-fade' : ''"
|
|
@@ -144,7 +147,7 @@
|
|
|
144
147
|
/> -->
|
|
145
148
|
<asd20-button
|
|
146
149
|
v-if="callsToAction.length >= 1"
|
|
147
|
-
:size="
|
|
150
|
+
:size="mq === 'sm' ? 'sm' : 'lg'"
|
|
148
151
|
:label="callsToAction[0].label"
|
|
149
152
|
:icon="callsToAction[0].icon"
|
|
150
153
|
:link="callsToAction[0].url"
|
|
@@ -155,7 +158,7 @@
|
|
|
155
158
|
/>
|
|
156
159
|
<asd20-button
|
|
157
160
|
v-if="callsToAction.length >= 2"
|
|
158
|
-
:size="
|
|
161
|
+
:size="mq === 'sm' ? 'sm' : 'lg'"
|
|
159
162
|
:label="callsToAction[1].label"
|
|
160
163
|
:icon="callsToAction[1].icon"
|
|
161
164
|
:link="callsToAction[1].url"
|
|
@@ -584,6 +587,15 @@ export default {
|
|
|
584
587
|
}
|
|
585
588
|
}
|
|
586
589
|
}
|
|
590
|
+
|
|
591
|
+
@media (max-width: 767px) {
|
|
592
|
+
.asd20-page-header:not(.asd20-page-header--has-cta) {
|
|
593
|
+
&::after {
|
|
594
|
+
display: none;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
587
599
|
@media (min-width: 667px) {
|
|
588
600
|
.asd20-page-header {
|
|
589
601
|
&__image {
|
|
@@ -602,7 +614,7 @@ export default {
|
|
|
602
614
|
}
|
|
603
615
|
}
|
|
604
616
|
|
|
605
|
-
@media (min-width:
|
|
617
|
+
@media (min-width: 768px) and (max-width: 1023px) {
|
|
606
618
|
.asd20-page-header {
|
|
607
619
|
.back {
|
|
608
620
|
padding: 0;
|
|
@@ -614,9 +626,113 @@ export default {
|
|
|
614
626
|
right: space(0);
|
|
615
627
|
left: space(4);
|
|
616
628
|
border-bottom-left-radius: 5rem;
|
|
629
|
+
}
|
|
630
|
+
&__main--has-image {
|
|
631
|
+
min-height: 400px;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
&__main {
|
|
635
|
+
display: flex;
|
|
636
|
+
justify-content: space-between;
|
|
637
|
+
border-bottom-left-radius: 5rem;
|
|
638
|
+
background: var(--website-header__background-color)
|
|
639
|
+
var(--website-header__background-style);
|
|
640
|
+
}
|
|
617
641
|
|
|
642
|
+
&__top {
|
|
643
|
+
display: none;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
&__tools {
|
|
647
|
+
flex-direction: row;
|
|
648
|
+
flex-wrap: wrap;
|
|
649
|
+
margin-top: 0;
|
|
650
|
+
.asd20-breadcrumb,
|
|
651
|
+
.back {
|
|
652
|
+
margin: 0 !important;
|
|
653
|
+
order: 1;
|
|
654
|
+
}
|
|
655
|
+
.language-and-tools {
|
|
656
|
+
order: 2;
|
|
657
|
+
}
|
|
658
|
+
.asd20-language-loader {
|
|
659
|
+
order: 2;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
&__content {
|
|
663
|
+
width: 100%;
|
|
664
|
+
flex-basis: 50%;
|
|
665
|
+
flex-grow: 1;
|
|
666
|
+
padding: 1rem 1rem 1rem 2rem;
|
|
667
|
+
min-height: clamp(240px, 40vh, 300px);
|
|
668
|
+
/* margin-right: space(3);*/
|
|
669
|
+
background: transparent;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
&__image {
|
|
673
|
+
display: flex;
|
|
674
|
+
max-height: 350px;
|
|
675
|
+
max-width: 45vw;
|
|
676
|
+
margin-top: 0;
|
|
677
|
+
margin-bottom: space(-1);
|
|
678
|
+
border-radius: 0;
|
|
679
|
+
border-bottom-left-radius: 2rem;
|
|
680
|
+
overflow: hidden;
|
|
681
|
+
flex-grow: 1;
|
|
682
|
+
min-width: 30vw;
|
|
683
|
+
img {
|
|
684
|
+
width: 100%;
|
|
685
|
+
height: 100%;
|
|
686
|
+
max-height: inherit;
|
|
687
|
+
object-fit: cover;
|
|
688
|
+
border-top: none;
|
|
689
|
+
/* opacity: 0;*/
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
h1 {
|
|
694
|
+
font-size: 2rem !important;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
&__title-content {
|
|
698
|
+
position: relative;
|
|
699
|
+
max-width: space(35);
|
|
700
|
+
/* .asd20-page-header__lead {*/
|
|
701
|
+
/* margin-right: 25%;*/
|
|
702
|
+
/* }*/
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
& :deep(.asd20-organization-picker) {
|
|
706
|
+
display: flex;
|
|
707
|
+
margin: space(0) auto space(0) space(0);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
&__call-to-action {
|
|
711
|
+
margin: space(-1) 60vw space(-1) space(3);
|
|
712
|
+
.asd20-button {
|
|
713
|
+
font-size: 1rem !important;
|
|
714
|
+
flex-shrink: 0;
|
|
715
|
+
padding: 0.25rem 2rem;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
@media (min-width: 1024px) {
|
|
722
|
+
.asd20-page-header {
|
|
723
|
+
.back {
|
|
724
|
+
padding: 0;
|
|
725
|
+
margin: 0;
|
|
726
|
+
}
|
|
727
|
+
&::after {
|
|
728
|
+
top: space(6);
|
|
729
|
+
bottom: space(-2);
|
|
730
|
+
right: space(0);
|
|
731
|
+
left: space(4);
|
|
732
|
+
border-bottom-left-radius: 5rem;
|
|
618
733
|
}
|
|
619
734
|
&__main {
|
|
735
|
+
display: flex;
|
|
620
736
|
justify-content: space-between;
|
|
621
737
|
border-bottom-left-radius: 5rem;
|
|
622
738
|
background: var(--website-header__background-color)
|
|
@@ -637,7 +753,7 @@ export default {
|
|
|
637
753
|
max-height: 600px;
|
|
638
754
|
margin-top: space(-1);
|
|
639
755
|
margin-bottom: space(-1);
|
|
640
|
-
border-radius: var(--website-shape__radius-
|
|
756
|
+
border-radius: var(--website-shape__radius-l);
|
|
641
757
|
border-top-right-radius: 0;
|
|
642
758
|
border-bottom-right-radius: 0;
|
|
643
759
|
overflow: hidden;
|
|
@@ -694,10 +810,6 @@ export default {
|
|
|
694
810
|
}
|
|
695
811
|
}
|
|
696
812
|
|
|
697
|
-
&__main {
|
|
698
|
-
display: flex;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
813
|
&__call-to-action {
|
|
702
814
|
margin: space(-1) 60vw space(-1) space(3);
|
|
703
815
|
.asd20-button {
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="trapRoot"
|
|
4
|
-
class="asd20-focus-trap"
|
|
5
|
-
tabindex="-1"
|
|
6
|
-
>
|
|
7
|
-
<slot />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
1
|
<script>
|
|
12
2
|
import { createFocusTrap } from 'focus-trap'
|
|
13
3
|
|
|
@@ -21,6 +11,7 @@ export default {
|
|
|
21
11
|
},
|
|
22
12
|
data: () => ({
|
|
23
13
|
trap: null,
|
|
14
|
+
addedFallbackTabindex: false,
|
|
24
15
|
}),
|
|
25
16
|
computed: {
|
|
26
17
|
enabled() {
|
|
@@ -32,7 +23,7 @@ export default {
|
|
|
32
23
|
const options = {
|
|
33
24
|
clickOutsideDeactivates: false,
|
|
34
25
|
escapeDeactivates: false,
|
|
35
|
-
fallbackFocus: () => this
|
|
26
|
+
fallbackFocus: () => this.ensureFallbackFocusTarget(),
|
|
36
27
|
}
|
|
37
28
|
|
|
38
29
|
if (this.initialFocus !== undefined) {
|
|
@@ -53,7 +44,7 @@ export default {
|
|
|
53
44
|
},
|
|
54
45
|
mounted() {
|
|
55
46
|
this.$nextTick(() => {
|
|
56
|
-
this.trap = createFocusTrap(this.$
|
|
47
|
+
this.trap = createFocusTrap(this.$el, this.focusTrapOptions)
|
|
57
48
|
this.syncTrapState()
|
|
58
49
|
})
|
|
59
50
|
},
|
|
@@ -61,6 +52,20 @@ export default {
|
|
|
61
52
|
this.disposeTrap()
|
|
62
53
|
},
|
|
63
54
|
methods: {
|
|
55
|
+
ensureFallbackFocusTarget() {
|
|
56
|
+
const root = this.$el
|
|
57
|
+
|
|
58
|
+
if (!root || typeof root.hasAttribute !== 'function') {
|
|
59
|
+
return root
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!root.hasAttribute('tabindex')) {
|
|
63
|
+
root.setAttribute('tabindex', '-1')
|
|
64
|
+
this.addedFallbackTabindex = true
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return root
|
|
68
|
+
},
|
|
64
69
|
syncTrapState() {
|
|
65
70
|
if (!this.trap) return
|
|
66
71
|
|
|
@@ -76,22 +81,21 @@ export default {
|
|
|
76
81
|
|
|
77
82
|
this.trap.deactivate()
|
|
78
83
|
this.trap = null
|
|
84
|
+
|
|
85
|
+
if (this.addedFallbackTabindex && this.$el?.removeAttribute) {
|
|
86
|
+
this.$el.removeAttribute('tabindex')
|
|
87
|
+
this.addedFallbackTabindex = false
|
|
88
|
+
}
|
|
79
89
|
},
|
|
80
90
|
},
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
render() {
|
|
92
|
+
const content = this.$slots.default ? this.$slots.default() : []
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
flex: 1 1 auto;
|
|
88
|
-
align-items: stretch;
|
|
89
|
-
min-width: 0;
|
|
90
|
-
max-width: 100%;
|
|
91
|
-
max-height: 100%;
|
|
94
|
+
if (content.length !== 1) {
|
|
95
|
+
throw new Error('FocusTrap requires exactly one child')
|
|
96
|
+
}
|
|
92
97
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
98
|
+
return content[0]
|
|
99
|
+
},
|
|
96
100
|
}
|
|
97
|
-
</
|
|
101
|
+
</script>
|