@undrr/undrr-mangrove 2.2.0 → 2.3.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/README.md +1 -1
- package/components/BookCard.js +1 -1
- package/components/Breadcrumbs.js +1 -1
- package/components/Checkbox.js +1 -1
- package/components/Chips.js +1 -1
- package/components/ContentCard.js +1 -1
- package/components/ContentTeaser.js +1 -1
- package/components/CopyButton.js +2 -2
- package/components/CtaButton.js +1 -1
- package/components/Drawer.js +2 -2
- package/components/Drawer.js.LICENSE.txt +1 -1
- package/components/DrupalContentPatterns.js +1 -1
- package/components/EmbedContainer.js +1 -1
- package/components/Footer.js +1 -1
- package/components/FormAction.js +1 -1
- package/components/FormErrorSummary.js +1 -1
- package/components/FormGroup.js +1 -1
- package/components/FullWidth.js +1 -1
- package/components/Gallery.js +2 -2
- package/components/Hero.js +1 -1
- package/components/HighlightBox.js +1 -1
- package/components/HorizontalBookCard.js +2 -2
- package/components/HorizontalBookCard.js.LICENSE.txt +1 -1
- package/components/HorizontalCard.js +2 -2
- package/components/HorizontalCard.js.LICENSE.txt +1 -1
- package/components/IconCard.js +2 -2
- package/components/IconCard.js.LICENSE.txt +1 -1
- package/components/Legend.js +1 -1
- package/components/Loader.js +1 -1
- package/components/MegaMenu.js +2 -2
- package/components/Notice.js +1 -1
- package/components/PageHeader.js +1 -1
- package/components/Pager.js +1 -1
- package/components/ProgressBar.js +1 -1
- package/components/QuoteHighlight.js +2 -2
- package/components/QuoteHighlight.js.LICENSE.txt +1 -1
- package/components/Radio.js +1 -1
- package/components/Range.js +1 -1
- package/components/ScrollContainer.js +2 -2
- package/components/SegmentedControl.js +1 -1
- package/components/Select.js +1 -1
- package/components/ServiceNotice.js +2 -2
- package/components/ShareButtons.js +2 -2
- package/components/ShowMore.js +1 -1
- package/components/SkipLink.js +1 -1
- package/components/StatsCard.js +2 -2
- package/components/StatsCard.js.LICENSE.txt +1 -1
- package/components/SyndicationSearchWidget.js +2 -2
- package/components/Tab.js +2 -2
- package/components/TextCta.js +2 -2
- package/components/TextCta.js.LICENSE.txt +1 -1
- package/components/TextInput.js +1 -1
- package/components/Textarea.js +1 -1
- package/components/Tree.js +1 -1
- package/components/UserFeedback.js +2 -2
- package/components/VerticalCard.js +2 -2
- package/components/VerticalCard.js.LICENSE.txt +1 -1
- package/components/hydrate.js +1 -1
- package/css/style-all.css +4 -4
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +4 -4
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +1 -1
- package/css/style-irp.css +4 -4
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +4 -4
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +4 -4
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +4 -4
- package/css/style.css.map +1 -1
- package/docs/EDITORIAL-MANUAL.md +1 -1
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +1 -1
- package/error-pages/managed-challenge.html +1 -1
- package/package.json +1 -1
- package/scss/Components/MegaMenu/mega-menu.scss +57 -33
- package/scss/assets/scss/_variables.scss +1 -1
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
.mg-mega-wrapper {
|
|
13
13
|
position: relative;
|
|
14
14
|
background: rgb(var(--mg-color-white));
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
// Paint below the header so opaque logo/trigger surfaces cannot cover it.
|
|
17
|
+
box-shadow: 0 1px 0 rgb(var(--mg-color-neutral-600) / 0.24);
|
|
16
18
|
z-index: var(--mg-z-index-nav);
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -22,9 +24,7 @@
|
|
|
22
24
|
align-items: flex-start;
|
|
23
25
|
z-index: var(--mg-z-index-nav);
|
|
24
26
|
|
|
25
|
-
//
|
|
26
|
-
// variant puts it on a wrapping <div> and uses &__nav for the list), so it
|
|
27
|
-
// is a list class and carries the house rule.
|
|
27
|
+
// Plain HTML consumers can use this class directly on a navigation list.
|
|
28
28
|
@include mg-list-unmarked;
|
|
29
29
|
|
|
30
30
|
padding: 0;
|
|
@@ -36,17 +36,38 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// Kept max-width based to avoid a Firefox glitch with .mg-container-full-width.
|
|
39
|
-
@media screen and (
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
40
|
+
position: relative;
|
|
41
|
+
padding-inline-start: mg-rem(40); // space for the icon button
|
|
42
|
+
overflow-x: auto;
|
|
43
|
+
overscroll-behavior-inline: contain;
|
|
44
|
+
scrollbar-width: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// React keeps the hamburger outside the scrolling rail in both variants.
|
|
48
|
+
// Avoid sticky flex children: WebKit can scroll them out of view in RTL.
|
|
49
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
50
|
+
&:has(> .mg-mega-topbar__nav) {
|
|
51
|
+
padding-inline-start: 0;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
> .mg-mega-topbar-mobile__icon-button {
|
|
56
|
+
position: relative;
|
|
57
|
+
inset: auto;
|
|
58
|
+
width: mg-rem(40);
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
align-self: stretch;
|
|
61
|
+
background: rgb(var(--mg-color-white));
|
|
62
|
+
}
|
|
42
63
|
}
|
|
43
64
|
|
|
44
65
|
// --- Branded variant (with inline logo) ---
|
|
45
66
|
&--branded {
|
|
46
67
|
align-items: center;
|
|
47
68
|
|
|
48
|
-
@media screen and (
|
|
49
|
-
padding-
|
|
69
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
70
|
+
padding-inline-start: 0; // logo replaces the left padding
|
|
50
71
|
overflow-x: hidden;
|
|
51
72
|
}
|
|
52
73
|
|
|
@@ -72,6 +93,10 @@
|
|
|
72
93
|
justify-content: flex-end;
|
|
73
94
|
flex: 1;
|
|
74
95
|
|
|
96
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
97
|
+
justify-content: flex-start;
|
|
98
|
+
}
|
|
99
|
+
|
|
75
100
|
@include mg-list-unmarked;
|
|
76
101
|
|
|
77
102
|
margin: 0;
|
|
@@ -109,11 +134,23 @@
|
|
|
109
134
|
|
|
110
135
|
@include mg-list-unmarked;
|
|
111
136
|
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
// The branded rail scrolls independently of the logo and hamburger.
|
|
138
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
139
|
+
overflow-x: auto;
|
|
140
|
+
overscroll-behavior-inline: contain;
|
|
141
|
+
scrollbar-width: none;
|
|
142
|
+
cursor: grab;
|
|
143
|
+
user-select: none;
|
|
144
|
+
|
|
145
|
+
&:active {
|
|
146
|
+
cursor: grabbing;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.mg-mega-topbar__item-link {
|
|
150
|
+
cursor: inherit;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
justify-content: flex-start;
|
|
117
154
|
flex: 1;
|
|
118
155
|
min-width: 0;
|
|
119
156
|
}
|
|
@@ -148,6 +185,7 @@
|
|
|
148
185
|
}
|
|
149
186
|
}
|
|
150
187
|
|
|
188
|
+
flex-shrink: 0;
|
|
151
189
|
font-size: var(--mg-font-size-300);
|
|
152
190
|
color: rgb(var(--mg-color-interactive));
|
|
153
191
|
font-weight: bold;
|
|
@@ -688,6 +726,7 @@
|
|
|
688
726
|
.mg-mega-topbar-mobile__icon-button {
|
|
689
727
|
// Mobile-first: Display by default
|
|
690
728
|
position: absolute;
|
|
729
|
+
inset-block: 0;
|
|
691
730
|
|
|
692
731
|
// Anchored to both edges of the topbar rather than assumed to be
|
|
693
732
|
// viewport-wide: a `100vw` overlay overhangs and is clipped by the parent's
|
|
@@ -701,7 +740,8 @@
|
|
|
701
740
|
color: rgb(var(--mg-color-interactive));
|
|
702
741
|
font-size: mg-rem(20);
|
|
703
742
|
width: auto;
|
|
704
|
-
height:
|
|
743
|
+
height: auto;
|
|
744
|
+
min-height: mg-rem(44);
|
|
705
745
|
padding: var(--mg-spacing-100);
|
|
706
746
|
border: none;
|
|
707
747
|
cursor: pointer;
|
|
@@ -793,24 +833,8 @@
|
|
|
793
833
|
box-shadow: 3px 0 6px -2px rgb(0 0 0 / 0.15);
|
|
794
834
|
}
|
|
795
835
|
|
|
796
|
-
// Full JS mega menu — sidebar handles mobile nav, so topbar items must NOT be
|
|
797
|
-
// interactive on small screens. This class is added by the React component on
|
|
798
|
-
// mount (useEffect), so it is absent when JS fails or has not yet hydrated,
|
|
799
|
-
// preserving a clickable fallback for server-rendered nav markup.
|
|
800
|
-
.mg-mega-wrapper--js-active {
|
|
801
|
-
@media screen and (max-width: $mg-breakpoint-tablet) {
|
|
802
|
-
.mg-mega-topbar__nav {
|
|
803
|
-
pointer-events: none;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
.mg-mega-topbar__item {
|
|
807
|
-
pointer-events: none;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
836
|
// Mobile progressive navigation: one stable surface at every depth. Existing
|
|
813
|
-
// desktop classes
|
|
837
|
+
// desktop classes remain compatible; the rail opens individual sections.
|
|
814
838
|
.mg-mega-mobile-sidebar--progressive {
|
|
815
839
|
position: fixed;
|
|
816
840
|
inset: 0 0 auto;
|
|
@@ -1094,7 +1118,7 @@
|
|
|
1094
1118
|
|
|
1095
1119
|
// Existing plain HTML navigation needs no hamburger gutter or JS enhancement.
|
|
1096
1120
|
// Keep overflow local to the rail so every destination remains reachable.
|
|
1097
|
-
@media screen and (
|
|
1121
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
1098
1122
|
.mg-mega-topbar:not(
|
|
1099
1123
|
.mg-mega-topbar--branded,
|
|
1100
1124
|
:has(.mg-mega-topbar-mobile__icon-button)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Storybook: https://mangrove.undrr.org/
|
|
5
5
|
* LLMs context: https://mangrove.undrr.org/llms.txt
|
|
6
6
|
* Repository: https://github.com/PreventionWeb/undrr-mangrove
|
|
7
|
-
* Version: 2.
|
|
7
|
+
* Version: 2.3.0
|
|
8
8
|
*
|
|
9
9
|
* ██╗ ██╗███╗ ██╗██████╗ ██████╗ ██████╗
|
|
10
10
|
* ██║ ██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗
|