@undrr/undrr-mangrove 2.1.1 → 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 +9 -0
- package/components/ContentCard.js.LICENSE.txt +9 -0
- package/components/ContentTeaser.js +9 -0
- package/components/ContentTeaser.js.LICENSE.txt +9 -0
- 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 +8 -0
- 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 +19 -14
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +19 -14
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +4 -8
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +19 -14
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +19 -14
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +19 -14
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +20 -14
- package/css/style.css.map +1 -1
- package/docs/EDITORIAL-MANUAL.md +1 -1
- package/docs/llms-page-building.txt +5 -3
- 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/js/preview-access.js +180 -30
- package/package.json +1 -1
- package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +2 -0
- package/scss/Atom/BaseTypography/Cite/cite.scss +2 -0
- package/scss/Atom/BaseTypography/Code/code.scss +2 -0
- package/scss/Atom/BaseTypography/Mark/mark.scss +2 -0
- package/scss/Atom/BaseTypography/Small/small.scss +2 -0
- package/scss/Atom/Icons/icons.scss +3 -2
- package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +3 -0
- package/scss/Atom/Images/ImageCredit/image-credit.scss +2 -0
- package/scss/Atom/Layout/Container/container.scss +2 -0
- package/scss/Atom/Layout/Grid/grid.scss +2 -0
- package/scss/Atom/Logo/logo.scss +2 -0
- package/scss/Atom/Navigation/MenuItems/menu-items.scss +2 -0
- package/scss/Atom/ReachElement/Details/details.scss +3 -0
- package/scss/Atom/ReachElement/Figcaption/figcaption.scss +3 -0
- package/scss/Atom/StatusLabel/status-label.scss +2 -0
- package/scss/Atom/Table/table.scss +4 -0
- package/scss/Atom/Tag/tag.scss +3 -0
- package/scss/Components/Boilerplate/boilerplate.scss +3 -0
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +2 -0
- package/scss/Components/Buttons/Chips/chips.scss +3 -0
- package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
- package/scss/Components/Buttons/CtaButton/cta-button.scss +4 -0
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +3 -0
- package/scss/Components/Cards/Card/card.scss +156 -3
- package/scss/Components/Cards/StatsCard/stats-card.scss +14 -2
- package/scss/Components/CiteThis/cite-this.scss +2 -0
- package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +2 -0
- package/scss/Components/DataViz/Legend/legend.scss +1 -0
- package/scss/Components/ErrorPages/error-pages.scss +2 -0
- package/scss/Components/Footer/footer.scss +2 -0
- package/scss/Components/Forms/FormAction/form-action.scss +2 -0
- package/scss/Components/Forms/FormGroup/form-group.scss +2 -0
- package/scss/Components/Forms/Range/range.scss +1 -0
- package/scss/Components/Forms/SegmentedControl/segmented-control.scss +2 -0
- package/scss/Components/Forms/Select/select.scss +2 -0
- package/scss/Components/Forms/_form-base.scss +3 -0
- package/scss/Components/Gallery/gallery.scss +4 -0
- package/scss/Components/Hero/hero.scss +3 -0
- package/scss/Components/HighlightBox/highlight-box.scss +3 -0
- package/scss/Components/MegaMenu/mega-menu.scss +60 -33
- package/scss/Components/MegaMenu/megamenu.scss +1 -1
- package/scss/Components/Navigation/Drawer/drawer.scss +1 -0
- package/scss/Components/Navigation/Tree/tree.scss +1 -0
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +3 -0
- package/scss/Components/PageHeader/page-header.scss +3 -0
- package/scss/Components/Pager/pager.scss +3 -0
- package/scss/Components/PreviewAccess/preview-access.scss +3 -0
- package/scss/Components/QuoteHighlight/quote-highlight.scss +2 -0
- package/scss/Components/ScrollContainer/scroll-container.scss +4 -0
- package/scss/Components/Snackbar/snackbar.scss +1 -0
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +52 -1
- package/scss/Components/Tab/tab.scss +4 -0
- package/scss/Components/TableOfContents/table-of-contents.scss +2 -0
- package/scss/Components/TextCta/text-cta.scss +3 -0
- package/scss/Components/TextCta/textcta.scss +1 -1
- package/scss/Components/UserFeedback/user-feedback.scss +3 -0
- package/scss/Molecules/ImageCaption/image-caption.scss +2 -0
- package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
- package/scss/Patterns/ContentCard/content-card.scss +79 -0
- package/scss/Patterns/ContentTeaser/content-teaser.scss +174 -0
- package/scss/Patterns/HubHeader/hub-header.scss +3 -0
- package/scss/Patterns/RichContent/rich-content.scss +1 -0
- package/scss/Patterns/_shared/pattern-demo.scss +1 -1
- package/scss/Utilities/Loader/loader.scss +2 -0
- package/scss/Utilities/ShowMore/show-more.scss +2 -0
- package/scss/Utilities/SkipLink/skip-link.scss +2 -0
- package/scss/assets/fonts/noto-kufi-arabic/noto-kufi-arabic.scss +2 -0
- package/scss/assets/fonts/noto-sans-arabic/noto-sans-arabic.scss +2 -0
- package/scss/assets/fonts/roboto/roboto.scss +12 -12
- package/scss/assets/fonts/roboto/sass/_Black.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_BlackItalic.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_Bold.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_BoldItalic.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_Italic.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_Light.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_LightItalic.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_Medium.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_MediumItalic.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_Regular.scss +4 -0
- package/scss/assets/fonts/roboto/sass/_variables.scss +1 -2
- package/scss/assets/fonts/roboto/sass/roboto.scss +12 -12
- package/scss/assets/fonts/roboto-condensed/roboto-condensed.scss +8 -8
- package/scss/assets/fonts/roboto-condensed/sass/_Bold.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_BoldItalic.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_Italic.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_Light.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_LightItalic.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_Regular.scss +4 -0
- package/scss/assets/fonts/roboto-condensed/sass/_variables.scss +1 -1
- package/scss/assets/scss/_components.scss +79 -77
- package/scss/assets/scss/_config.scss +183 -0
- package/scss/assets/scss/_font-paths.scss +10 -0
- package/scss/assets/scss/_fonts.import.scss +2 -0
- package/scss/assets/scss/_fonts.scss +13 -55
- package/scss/assets/scss/_foundational.scss +6 -3
- package/scss/assets/scss/_legacy-warnings.scss +37 -0
- package/scss/assets/scss/_mixins.scss +2 -0
- package/scss/assets/scss/_style-all.import.scss +11 -0
- package/scss/assets/scss/_style-delta.import.scss +11 -0
- package/scss/assets/scss/_style-gutenberg.import.scss +11 -0
- package/scss/assets/scss/_style-irp.import.scss +11 -0
- package/scss/assets/scss/_style-mcr.import.scss +11 -0
- package/scss/assets/scss/_style-preventionweb.import.scss +11 -0
- package/scss/assets/scss/_style.import.scss +11 -0
- package/scss/assets/scss/_theme-delta.scss +2 -1
- package/scss/assets/scss/_theme-irp.scss +2 -1
- package/scss/assets/scss/_theme-mcr.scss +2 -1
- package/scss/assets/scss/_theme-preventionweb.scss +2 -1
- package/scss/assets/scss/_utility.scss +3 -0
- package/scss/assets/scss/_variables.import.scss +11 -0
- package/scss/assets/scss/_variables.scss +5 -230
- package/scss/assets/scss/generated/_tokens-mangrove.scss +87 -0
- package/scss/assets/scss/style-all.scss +14 -11
- package/scss/assets/scss/style-delta.scss +11 -8
- package/scss/assets/scss/style-gutenberg.scss +15 -12
- package/scss/assets/scss/style-irp.scss +11 -8
- package/scss/assets/scss/style-mcr.scss +11 -8
- package/scss/assets/scss/style-preventionweb.scss +11 -8
- package/scss/assets/scss/style.scss +10 -7
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Cards/Card/VerticalCard.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
/* content-card start */
|
|
10
13
|
|
|
11
14
|
// MG CARD using CSS GRID
|
|
@@ -144,6 +147,12 @@
|
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
&__hc.mg-card-book__hc {
|
|
150
|
+
> .mg-card__content {
|
|
151
|
+
grid-column: 1 / -1;
|
|
152
|
+
grid-row: auto;
|
|
153
|
+
min-inline-size: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
147
156
|
.mg-card__visual {
|
|
148
157
|
align-self: flex-start;
|
|
149
158
|
border: 1px solid rgb(var(--mg-color-neutral-600) / 0.2);
|
|
@@ -157,11 +166,16 @@
|
|
|
157
166
|
|
|
158
167
|
&:has(.mg-card__visual) {
|
|
159
168
|
grid-template-rows: unset;
|
|
160
|
-
gap:
|
|
169
|
+
gap: var(--mg-spacing-150);
|
|
161
170
|
|
|
162
171
|
@media (min-width: $mg-breakpoint-mobile) {
|
|
163
|
-
grid-template-columns: 160px 1fr;
|
|
164
|
-
grid-template-rows:
|
|
172
|
+
grid-template-columns: 160px minmax(0, 1fr);
|
|
173
|
+
grid-template-rows: auto;
|
|
174
|
+
|
|
175
|
+
> .mg-card__content {
|
|
176
|
+
grid-column: 2;
|
|
177
|
+
grid-row: 1;
|
|
178
|
+
}
|
|
165
179
|
}
|
|
166
180
|
}
|
|
167
181
|
}
|
|
@@ -264,6 +278,85 @@
|
|
|
264
278
|
}
|
|
265
279
|
}
|
|
266
280
|
|
|
281
|
+
// Photo media forms the card edge; publication teasers preserve complete covers.
|
|
282
|
+
// Clip only the visual so content focus rings can extend beyond the surface.
|
|
283
|
+
.mg-card__vc:not(.mg-card__book),
|
|
284
|
+
.mg-card__hc:not(.mg-card-book__hc) {
|
|
285
|
+
padding: 0;
|
|
286
|
+
gap: 0;
|
|
287
|
+
|
|
288
|
+
> .mg-card__content {
|
|
289
|
+
min-inline-size: 0;
|
|
290
|
+
padding: var(--mg-card-padding);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
> .mg-card__visual {
|
|
294
|
+
min-inline-size: 0;
|
|
295
|
+
border-radius: 0;
|
|
296
|
+
border-start-start-radius: var(--mg-card-border-radius);
|
|
297
|
+
border-start-end-radius: var(--mg-card-border-radius);
|
|
298
|
+
outline-offset: -1px;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.mg-card__vc:not(.mg-card__book):has(> .mg-card__visual) {
|
|
303
|
+
> .mg-card__content {
|
|
304
|
+
padding-block-start: calc(var(--mg-card-padding) + var(--mg-spacing-50));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.mg-card__hc:not(.mg-card-book__hc) {
|
|
309
|
+
grid-template-columns: minmax(0, 1fr);
|
|
310
|
+
|
|
311
|
+
> .mg-card__content {
|
|
312
|
+
grid-column: 1;
|
|
313
|
+
grid-row: auto;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
&:has(> .mg-card__visual) {
|
|
317
|
+
grid-template-rows: 300px auto;
|
|
318
|
+
|
|
319
|
+
> .mg-card__content {
|
|
320
|
+
padding-block-start: calc(var(--mg-card-padding) + var(--mg-spacing-100));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@media (min-width: $mg-breakpoint-mobile) {
|
|
324
|
+
grid-template-columns: 160px minmax(0, 1fr);
|
|
325
|
+
grid-template-rows: auto;
|
|
326
|
+
|
|
327
|
+
> .mg-card__visual {
|
|
328
|
+
border-start-end-radius: 0;
|
|
329
|
+
border-end-start-radius: var(--mg-card-border-radius);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
> .mg-card__content {
|
|
333
|
+
grid-column: 2;
|
|
334
|
+
padding-block-start: var(--mg-card-padding);
|
|
335
|
+
padding-inline-start: calc(
|
|
336
|
+
var(--mg-card-padding) + var(--mg-spacing-100)
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@media (min-width: $mg-breakpoint-tablet) {
|
|
342
|
+
grid-template-columns: 330px minmax(0, 1fr);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// Without metadata, the title starts at the content inset. Do not stack the
|
|
348
|
+
// media gap and the title's label-separation padding above the first text.
|
|
349
|
+
.mg-card__vc:not(.mg-card__book),
|
|
350
|
+
.mg-card__hc:not(.mg-card-book__hc) {
|
|
351
|
+
> .mg-card__content:has(> .mg-card__title:first-child) {
|
|
352
|
+
padding-block-start: var(--mg-card-padding);
|
|
353
|
+
|
|
354
|
+
> .mg-card__title {
|
|
355
|
+
padding-block-start: 0;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
267
360
|
// RTL chevron — flip direction
|
|
268
361
|
[dir="rtl"] .mg-card__title a::after {
|
|
269
362
|
transform: rotate(225deg);
|
|
@@ -420,6 +513,61 @@ span.mg-card__label {
|
|
|
420
513
|
}
|
|
421
514
|
}
|
|
422
515
|
|
|
516
|
+
// Publication teasers: the cover is the object, without a second raised frame.
|
|
517
|
+
.mg-card.mg-card__book,
|
|
518
|
+
.mg-card.mg-card-book__hc {
|
|
519
|
+
background: var(--mg-card-publication-background);
|
|
520
|
+
padding: var(--mg-card-publication-padding);
|
|
521
|
+
border-radius: var(--mg-card-publication-border-radius);
|
|
522
|
+
box-shadow: var(--mg-card-publication-shadow);
|
|
523
|
+
|
|
524
|
+
&:hover {
|
|
525
|
+
box-shadow: var(--mg-card-publication-shadow-hover);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
> .mg-card__visual {
|
|
529
|
+
aspect-ratio: auto;
|
|
530
|
+
border-radius: 0;
|
|
531
|
+
outline: none;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.mg-card__image {
|
|
535
|
+
block-size: auto;
|
|
536
|
+
object-fit: contain;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
&:hover .mg-card__image {
|
|
540
|
+
opacity: 1;
|
|
541
|
+
transform: none;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.mg-card__title:first-child {
|
|
545
|
+
padding-block-start: 0;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
&.mg-card--secondary {
|
|
549
|
+
padding-inline-start: var(--mg-card-padding);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// An unlinked teaser never advertises elevation on hover, including themed surfaces.
|
|
554
|
+
.mg-card.mg-card__book.mg-card--no-link:hover,
|
|
555
|
+
.mg-card.mg-card-book__hc.mg-card--no-link:hover,
|
|
556
|
+
.mg-card:is(.mg-card__book, .mg-card-book__hc):has(
|
|
557
|
+
.mg-card__title a:not([href])
|
|
558
|
+
):hover,
|
|
559
|
+
.mg-card:is(.mg-card__book, .mg-card-book__hc):has(
|
|
560
|
+
.mg-card__title a[href=""]
|
|
561
|
+
):hover {
|
|
562
|
+
box-shadow: var(--mg-card-publication-shadow);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.mg-card__book {
|
|
566
|
+
display: grid;
|
|
567
|
+
align-content: start;
|
|
568
|
+
gap: var(--mg-spacing-100);
|
|
569
|
+
}
|
|
570
|
+
|
|
423
571
|
// END of CARD
|
|
424
572
|
|
|
425
573
|
// Icon Card variant
|
|
@@ -481,6 +629,11 @@ span.mg-card__label {
|
|
|
481
629
|
aspect-ratio: 1/1;
|
|
482
630
|
}
|
|
483
631
|
|
|
632
|
+
// Small glyphs and fixed-size badges do not need the illustration frame.
|
|
633
|
+
&:has(.mg-card__icon-wrap--small) {
|
|
634
|
+
aspect-ratio: auto;
|
|
635
|
+
}
|
|
636
|
+
|
|
484
637
|
// Fixed-size badges do not need the full illustration frame.
|
|
485
638
|
&:has(.mg-card__icon-wrap--colored) {
|
|
486
639
|
aspect-ratio: auto;
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Cards/StatsCard/StatsCard.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../../assets/scss/breakpoints" as *;
|
|
10
|
+
@use "../../../assets/scss/mixins" as *;
|
|
11
|
+
|
|
9
12
|
/* Stats Card Component */
|
|
10
13
|
.mg-stats-card {
|
|
11
14
|
width: 100%;
|
|
@@ -142,10 +145,19 @@
|
|
|
142
145
|
/* Variant: Compact */
|
|
143
146
|
.mg-stats-card--compact {
|
|
144
147
|
.mg-stats-card-item {
|
|
145
|
-
padding: var(--mg-spacing-
|
|
148
|
+
padding: var(--mg-spacing-150);
|
|
149
|
+
gap: var(--mg-spacing-50);
|
|
146
150
|
|
|
147
151
|
@include devicebreak(small) {
|
|
148
|
-
padding: var(--mg-spacing-
|
|
152
|
+
padding: var(--mg-spacing-100);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Compact spacing is owned by the gap, without child margins stacking up.
|
|
156
|
+
&__icon,
|
|
157
|
+
&__value,
|
|
158
|
+
&__bottom-label,
|
|
159
|
+
&__summary {
|
|
160
|
+
margin: 0;
|
|
149
161
|
}
|
|
150
162
|
|
|
151
163
|
&__value {
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/CookieConsentBanner/CookieConsentBanner.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
|
|
9
11
|
// Mangrove theme bridge for the externally loaded vanilla-cookieconsent UI.
|
|
10
12
|
// The CDN stylesheet is appended after the local bundle and declares the same
|
|
11
13
|
// custom properties, so these token mappings intentionally carry importance.
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/ErrorPages/ErrorPage.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/config" as *;
|
|
10
|
+
|
|
9
11
|
.mg-error-page {
|
|
10
12
|
min-height: 100vh;
|
|
11
13
|
background-color: rgb(var(--mg-color-blue-900));
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/FormGroup/FormGroup.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../../assets/scss/mixins" as *;
|
|
10
|
+
|
|
9
11
|
// FormGroup — styled fieldset/legend for grouping related form controls.
|
|
10
12
|
|
|
11
13
|
.mg-form-group {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* Full documentation:
|
|
9
9
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/SegmentedControl/SegmentedControl.mdx
|
|
10
10
|
*/
|
|
11
|
+
@use "../../../assets/scss/mixins" as *;
|
|
12
|
+
@use "../../../assets/scss/config" as *;
|
|
11
13
|
|
|
12
14
|
// The control is a presentation layer over a native radio group: a fieldset, a
|
|
13
15
|
// legend and one <input type="radio"> per segment, each followed by its own
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/Select/Select.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../../assets/scss/config" as *;
|
|
10
|
+
|
|
9
11
|
// Select-specific overrides.
|
|
10
12
|
// Shared form styles live in _form-base.scss (.mg-form-select).
|
|
11
13
|
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/TextInput/TextInput.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// Shared BEM-scoped form styles for Mangrove form components.
|
|
10
13
|
// All form components import this partial for consistent base styling.
|
|
11
14
|
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Gallery/Gallery.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/breakpoints" as *;
|
|
10
|
+
@use "../../assets/scss/mixins" as *;
|
|
11
|
+
@use "../../assets/scss/config" as *;
|
|
12
|
+
|
|
9
13
|
/* Photo Gallery Component */
|
|
10
14
|
.mg-gallery {
|
|
11
15
|
position: relative;
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Hero/Hero.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// The veil between the photograph and the copy, in two layers.
|
|
10
13
|
|
|
11
14
|
// The lower layer is the brand tint that has always been here: the hero
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/HighlightBox/HighlightBox.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/breakpoints" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// Highlight box component (RTL-safe)
|
|
10
13
|
// https://gitlab.com/undrr/web-backlog/-/issues/1678
|
|
11
14
|
// Variables and mixins are imported at the theme level via @use in mangrove.scss
|
|
@@ -6,10 +6,15 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/MegaMenu/MegaMenu.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
.mg-mega-wrapper {
|
|
10
13
|
position: relative;
|
|
11
14
|
background: rgb(var(--mg-color-white));
|
|
12
|
-
|
|
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);
|
|
13
18
|
z-index: var(--mg-z-index-nav);
|
|
14
19
|
}
|
|
15
20
|
|
|
@@ -19,9 +24,7 @@
|
|
|
19
24
|
align-items: flex-start;
|
|
20
25
|
z-index: var(--mg-z-index-nav);
|
|
21
26
|
|
|
22
|
-
//
|
|
23
|
-
// variant puts it on a wrapping <div> and uses &__nav for the list), so it
|
|
24
|
-
// is a list class and carries the house rule.
|
|
27
|
+
// Plain HTML consumers can use this class directly on a navigation list.
|
|
25
28
|
@include mg-list-unmarked;
|
|
26
29
|
|
|
27
30
|
padding: 0;
|
|
@@ -33,17 +36,38 @@
|
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
// Kept max-width based to avoid a Firefox glitch with .mg-container-full-width.
|
|
36
|
-
@media screen and (
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
}
|
|
39
63
|
}
|
|
40
64
|
|
|
41
65
|
// --- Branded variant (with inline logo) ---
|
|
42
66
|
&--branded {
|
|
43
67
|
align-items: center;
|
|
44
68
|
|
|
45
|
-
@media screen and (
|
|
46
|
-
padding-
|
|
69
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
70
|
+
padding-inline-start: 0; // logo replaces the left padding
|
|
47
71
|
overflow-x: hidden;
|
|
48
72
|
}
|
|
49
73
|
|
|
@@ -69,6 +93,10 @@
|
|
|
69
93
|
justify-content: flex-end;
|
|
70
94
|
flex: 1;
|
|
71
95
|
|
|
96
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
97
|
+
justify-content: flex-start;
|
|
98
|
+
}
|
|
99
|
+
|
|
72
100
|
@include mg-list-unmarked;
|
|
73
101
|
|
|
74
102
|
margin: 0;
|
|
@@ -106,11 +134,23 @@
|
|
|
106
134
|
|
|
107
135
|
@include mg-list-unmarked;
|
|
108
136
|
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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;
|
|
114
154
|
flex: 1;
|
|
115
155
|
min-width: 0;
|
|
116
156
|
}
|
|
@@ -145,6 +185,7 @@
|
|
|
145
185
|
}
|
|
146
186
|
}
|
|
147
187
|
|
|
188
|
+
flex-shrink: 0;
|
|
148
189
|
font-size: var(--mg-font-size-300);
|
|
149
190
|
color: rgb(var(--mg-color-interactive));
|
|
150
191
|
font-weight: bold;
|
|
@@ -685,6 +726,7 @@
|
|
|
685
726
|
.mg-mega-topbar-mobile__icon-button {
|
|
686
727
|
// Mobile-first: Display by default
|
|
687
728
|
position: absolute;
|
|
729
|
+
inset-block: 0;
|
|
688
730
|
|
|
689
731
|
// Anchored to both edges of the topbar rather than assumed to be
|
|
690
732
|
// viewport-wide: a `100vw` overlay overhangs and is clipped by the parent's
|
|
@@ -698,7 +740,8 @@
|
|
|
698
740
|
color: rgb(var(--mg-color-interactive));
|
|
699
741
|
font-size: mg-rem(20);
|
|
700
742
|
width: auto;
|
|
701
|
-
height:
|
|
743
|
+
height: auto;
|
|
744
|
+
min-height: mg-rem(44);
|
|
702
745
|
padding: var(--mg-spacing-100);
|
|
703
746
|
border: none;
|
|
704
747
|
cursor: pointer;
|
|
@@ -790,24 +833,8 @@
|
|
|
790
833
|
box-shadow: 3px 0 6px -2px rgb(0 0 0 / 0.15);
|
|
791
834
|
}
|
|
792
835
|
|
|
793
|
-
// Full JS mega menu — sidebar handles mobile nav, so topbar items must NOT be
|
|
794
|
-
// interactive on small screens. This class is added by the React component on
|
|
795
|
-
// mount (useEffect), so it is absent when JS fails or has not yet hydrated,
|
|
796
|
-
// preserving a clickable fallback for server-rendered nav markup.
|
|
797
|
-
.mg-mega-wrapper--js-active {
|
|
798
|
-
@media screen and (max-width: $mg-breakpoint-tablet) {
|
|
799
|
-
.mg-mega-topbar__nav {
|
|
800
|
-
pointer-events: none;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
.mg-mega-topbar__item {
|
|
804
|
-
pointer-events: none;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
|
|
809
836
|
// Mobile progressive navigation: one stable surface at every depth. Existing
|
|
810
|
-
// desktop classes
|
|
837
|
+
// desktop classes remain compatible; the rail opens individual sections.
|
|
811
838
|
.mg-mega-mobile-sidebar--progressive {
|
|
812
839
|
position: fixed;
|
|
813
840
|
inset: 0 0 auto;
|
|
@@ -1091,7 +1118,7 @@
|
|
|
1091
1118
|
|
|
1092
1119
|
// Existing plain HTML navigation needs no hamburger gutter or JS enhancement.
|
|
1093
1120
|
// Keep overflow local to the rail so every destination remains reachable.
|
|
1094
|
-
@media screen and (
|
|
1121
|
+
@media screen and (width < $mg-breakpoint-tablet) {
|
|
1095
1122
|
.mg-mega-topbar:not(
|
|
1096
1123
|
.mg-mega-topbar--branded,
|
|
1097
1124
|
:has(.mg-mega-topbar-mobile__icon-button)
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/MegaMenu/MegaMenu.mdx
|
|
8
8
|
*/
|
|
9
9
|
// megamenu.scss — DEPRECATED, use mega-menu.scss
|
|
10
|
-
@
|
|
10
|
+
@forward "./mega-menu";
|
|
11
11
|
@warn "megamenu.scss is deprecated. Import mega-menu.scss instead.";
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Navigation/Tree/Tree.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../../assets/scss/mixins" as *;
|
|
9
10
|
|
|
10
11
|
.mg-tree {
|
|
11
12
|
// The selected label uses the text colour, not the interactive colour: IRP's
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/OnThisPageNav/OnThisPageNav.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// On this page nav
|
|
10
13
|
// https://gitlab.com/undrr/web-backlog/-/issues/337
|
|
11
14
|
// A sticky horizontal navigation bar that links to page sections.
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/PageHeader/PageHeader.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
.mg-page-header {
|
|
10
13
|
// Base styles for page header
|
|
11
14
|
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Pager/Pager.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// ========================================
|
|
10
13
|
// Pager — standalone pagination component
|
|
11
14
|
// ========================================
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/PreviewAccess/PreviewAccess.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/mixins" as *;
|
|
10
|
+
@use "../../assets/scss/config" as *;
|
|
11
|
+
|
|
9
12
|
// Preview access
|
|
10
13
|
// Soft preview gate for unfinished UNDRR pages. CSS hides the page on parse
|
|
11
14
|
// (via :has()); the runtime layers a modal over it and asks for a PIN.
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* Full documentation:
|
|
7
7
|
* https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/ScrollContainer/ScrollContainer.mdx
|
|
8
8
|
*/
|
|
9
|
+
@use "../../assets/scss/breakpoints" as *;
|
|
10
|
+
@use "../../assets/scss/mixins" as *;
|
|
11
|
+
@use "../../assets/scss/config" as *;
|
|
12
|
+
|
|
9
13
|
.mg-scroll {
|
|
10
14
|
position: relative;
|
|
11
15
|
display: flex;
|