@undrr/undrr-mangrove 2.1.1 → 2.2.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.
Files changed (200) hide show
  1. package/README.md +1 -1
  2. package/components/BookCard.js +1 -1
  3. package/components/Breadcrumbs.js +1 -1
  4. package/components/Checkbox.js +1 -1
  5. package/components/Chips.js +1 -1
  6. package/components/ContentCard.js +9 -0
  7. package/components/ContentCard.js.LICENSE.txt +9 -0
  8. package/components/ContentTeaser.js +9 -0
  9. package/components/ContentTeaser.js.LICENSE.txt +9 -0
  10. package/components/CopyButton.js +1 -1
  11. package/components/CtaButton.js +1 -1
  12. package/components/Drawer.js +1 -1
  13. package/components/DrupalContentPatterns.js +8 -0
  14. package/components/EmbedContainer.js +1 -1
  15. package/components/Footer.js +1 -1
  16. package/components/FormAction.js +1 -1
  17. package/components/FormErrorSummary.js +1 -1
  18. package/components/FormGroup.js +1 -1
  19. package/components/FullWidth.js +1 -1
  20. package/components/Gallery.js +1 -1
  21. package/components/Hero.js +1 -1
  22. package/components/HighlightBox.js +1 -1
  23. package/components/HorizontalBookCard.js +1 -1
  24. package/components/HorizontalCard.js +1 -1
  25. package/components/IconCard.js +1 -1
  26. package/components/Legend.js +1 -1
  27. package/components/Loader.js +1 -1
  28. package/components/MegaMenu.js +1 -1
  29. package/components/Notice.js +1 -1
  30. package/components/PageHeader.js +1 -1
  31. package/components/Pager.js +1 -1
  32. package/components/ProgressBar.js +1 -1
  33. package/components/QuoteHighlight.js +1 -1
  34. package/components/Radio.js +1 -1
  35. package/components/Range.js +1 -1
  36. package/components/ScrollContainer.js +1 -1
  37. package/components/SegmentedControl.js +1 -1
  38. package/components/Select.js +1 -1
  39. package/components/ServiceNotice.js +1 -1
  40. package/components/ShareButtons.js +1 -1
  41. package/components/ShowMore.js +1 -1
  42. package/components/SkipLink.js +1 -1
  43. package/components/StatsCard.js +1 -1
  44. package/components/SyndicationSearchWidget.js +2 -2
  45. package/components/Tab.js +1 -1
  46. package/components/TextCta.js +1 -1
  47. package/components/TextInput.js +1 -1
  48. package/components/Textarea.js +1 -1
  49. package/components/Tree.js +1 -1
  50. package/components/UserFeedback.js +1 -1
  51. package/components/VerticalCard.js +1 -1
  52. package/components/hydrate.js +1 -1
  53. package/css/style-all.css +16 -11
  54. package/css/style-all.css.map +1 -1
  55. package/css/style-delta.css +16 -11
  56. package/css/style-delta.css.map +1 -1
  57. package/css/style-gutenberg.css +4 -8
  58. package/css/style-gutenberg.css.map +1 -1
  59. package/css/style-irp.css +16 -11
  60. package/css/style-irp.css.map +1 -1
  61. package/css/style-mcr.css +16 -11
  62. package/css/style-mcr.css.map +1 -1
  63. package/css/style-preventionweb.css +16 -11
  64. package/css/style-preventionweb.css.map +1 -1
  65. package/css/style.css +17 -11
  66. package/css/style.css.map +1 -1
  67. package/docs/EDITORIAL-MANUAL.md +1 -1
  68. package/docs/llms-page-building.txt +5 -3
  69. package/error-pages/401.html +1 -1
  70. package/error-pages/403.html +1 -1
  71. package/error-pages/404.html +1 -1
  72. package/error-pages/429.html +1 -1
  73. package/error-pages/500.html +1 -1
  74. package/error-pages/502.html +1 -1
  75. package/error-pages/503.html +1 -1
  76. package/error-pages/504.html +1 -1
  77. package/error-pages/5xx.html +1 -1
  78. package/error-pages/challenge.html +1 -1
  79. package/error-pages/managed-challenge.html +1 -1
  80. package/js/preview-access.js +180 -30
  81. package/package.json +1 -1
  82. package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +2 -0
  83. package/scss/Atom/BaseTypography/Cite/cite.scss +2 -0
  84. package/scss/Atom/BaseTypography/Code/code.scss +2 -0
  85. package/scss/Atom/BaseTypography/Mark/mark.scss +2 -0
  86. package/scss/Atom/BaseTypography/Small/small.scss +2 -0
  87. package/scss/Atom/Icons/icons.scss +3 -2
  88. package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +3 -0
  89. package/scss/Atom/Images/ImageCredit/image-credit.scss +2 -0
  90. package/scss/Atom/Layout/Container/container.scss +2 -0
  91. package/scss/Atom/Layout/Grid/grid.scss +2 -0
  92. package/scss/Atom/Logo/logo.scss +2 -0
  93. package/scss/Atom/Navigation/MenuItems/menu-items.scss +2 -0
  94. package/scss/Atom/ReachElement/Details/details.scss +3 -0
  95. package/scss/Atom/ReachElement/Figcaption/figcaption.scss +3 -0
  96. package/scss/Atom/StatusLabel/status-label.scss +2 -0
  97. package/scss/Atom/Table/table.scss +4 -0
  98. package/scss/Atom/Tag/tag.scss +3 -0
  99. package/scss/Components/Boilerplate/boilerplate.scss +3 -0
  100. package/scss/Components/Breadcrumbs/breadcrumbs.scss +2 -0
  101. package/scss/Components/Buttons/Chips/chips.scss +3 -0
  102. package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
  103. package/scss/Components/Buttons/CtaButton/cta-button.scss +4 -0
  104. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +3 -0
  105. package/scss/Components/Cards/Card/card.scss +156 -3
  106. package/scss/Components/Cards/StatsCard/stats-card.scss +14 -2
  107. package/scss/Components/CiteThis/cite-this.scss +2 -0
  108. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +2 -0
  109. package/scss/Components/DataViz/Legend/legend.scss +1 -0
  110. package/scss/Components/ErrorPages/error-pages.scss +2 -0
  111. package/scss/Components/Footer/footer.scss +2 -0
  112. package/scss/Components/Forms/FormAction/form-action.scss +2 -0
  113. package/scss/Components/Forms/FormGroup/form-group.scss +2 -0
  114. package/scss/Components/Forms/Range/range.scss +1 -0
  115. package/scss/Components/Forms/SegmentedControl/segmented-control.scss +2 -0
  116. package/scss/Components/Forms/Select/select.scss +2 -0
  117. package/scss/Components/Forms/_form-base.scss +3 -0
  118. package/scss/Components/Gallery/gallery.scss +4 -0
  119. package/scss/Components/Hero/hero.scss +3 -0
  120. package/scss/Components/HighlightBox/highlight-box.scss +3 -0
  121. package/scss/Components/MegaMenu/mega-menu.scss +3 -0
  122. package/scss/Components/MegaMenu/megamenu.scss +1 -1
  123. package/scss/Components/Navigation/Drawer/drawer.scss +1 -0
  124. package/scss/Components/Navigation/Tree/tree.scss +1 -0
  125. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +3 -0
  126. package/scss/Components/PageHeader/page-header.scss +3 -0
  127. package/scss/Components/Pager/pager.scss +3 -0
  128. package/scss/Components/PreviewAccess/preview-access.scss +3 -0
  129. package/scss/Components/QuoteHighlight/quote-highlight.scss +2 -0
  130. package/scss/Components/ScrollContainer/scroll-container.scss +4 -0
  131. package/scss/Components/Snackbar/snackbar.scss +1 -0
  132. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +52 -1
  133. package/scss/Components/Tab/tab.scss +4 -0
  134. package/scss/Components/TableOfContents/table-of-contents.scss +2 -0
  135. package/scss/Components/TextCta/text-cta.scss +3 -0
  136. package/scss/Components/TextCta/textcta.scss +1 -1
  137. package/scss/Components/UserFeedback/user-feedback.scss +3 -0
  138. package/scss/Molecules/ImageCaption/image-caption.scss +2 -0
  139. package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
  140. package/scss/Patterns/ContentCard/content-card.scss +79 -0
  141. package/scss/Patterns/ContentTeaser/content-teaser.scss +174 -0
  142. package/scss/Patterns/HubHeader/hub-header.scss +3 -0
  143. package/scss/Patterns/RichContent/rich-content.scss +1 -0
  144. package/scss/Patterns/_shared/pattern-demo.scss +1 -1
  145. package/scss/Utilities/Loader/loader.scss +2 -0
  146. package/scss/Utilities/ShowMore/show-more.scss +2 -0
  147. package/scss/Utilities/SkipLink/skip-link.scss +2 -0
  148. package/scss/assets/fonts/noto-kufi-arabic/noto-kufi-arabic.scss +2 -0
  149. package/scss/assets/fonts/noto-sans-arabic/noto-sans-arabic.scss +2 -0
  150. package/scss/assets/fonts/roboto/roboto.scss +12 -12
  151. package/scss/assets/fonts/roboto/sass/_Black.scss +4 -0
  152. package/scss/assets/fonts/roboto/sass/_BlackItalic.scss +4 -0
  153. package/scss/assets/fonts/roboto/sass/_Bold.scss +4 -0
  154. package/scss/assets/fonts/roboto/sass/_BoldItalic.scss +4 -0
  155. package/scss/assets/fonts/roboto/sass/_Italic.scss +4 -0
  156. package/scss/assets/fonts/roboto/sass/_Light.scss +4 -0
  157. package/scss/assets/fonts/roboto/sass/_LightItalic.scss +4 -0
  158. package/scss/assets/fonts/roboto/sass/_Medium.scss +4 -0
  159. package/scss/assets/fonts/roboto/sass/_MediumItalic.scss +4 -0
  160. package/scss/assets/fonts/roboto/sass/_Regular.scss +4 -0
  161. package/scss/assets/fonts/roboto/sass/_variables.scss +1 -2
  162. package/scss/assets/fonts/roboto/sass/roboto.scss +12 -12
  163. package/scss/assets/fonts/roboto-condensed/roboto-condensed.scss +8 -8
  164. package/scss/assets/fonts/roboto-condensed/sass/_Bold.scss +4 -0
  165. package/scss/assets/fonts/roboto-condensed/sass/_BoldItalic.scss +4 -0
  166. package/scss/assets/fonts/roboto-condensed/sass/_Italic.scss +4 -0
  167. package/scss/assets/fonts/roboto-condensed/sass/_Light.scss +4 -0
  168. package/scss/assets/fonts/roboto-condensed/sass/_LightItalic.scss +4 -0
  169. package/scss/assets/fonts/roboto-condensed/sass/_Regular.scss +4 -0
  170. package/scss/assets/fonts/roboto-condensed/sass/_variables.scss +1 -1
  171. package/scss/assets/scss/_components.scss +79 -77
  172. package/scss/assets/scss/_config.scss +183 -0
  173. package/scss/assets/scss/_font-paths.scss +10 -0
  174. package/scss/assets/scss/_fonts.import.scss +2 -0
  175. package/scss/assets/scss/_fonts.scss +13 -55
  176. package/scss/assets/scss/_foundational.scss +6 -3
  177. package/scss/assets/scss/_legacy-warnings.scss +37 -0
  178. package/scss/assets/scss/_mixins.scss +2 -0
  179. package/scss/assets/scss/_style-all.import.scss +11 -0
  180. package/scss/assets/scss/_style-delta.import.scss +11 -0
  181. package/scss/assets/scss/_style-gutenberg.import.scss +11 -0
  182. package/scss/assets/scss/_style-irp.import.scss +11 -0
  183. package/scss/assets/scss/_style-mcr.import.scss +11 -0
  184. package/scss/assets/scss/_style-preventionweb.import.scss +11 -0
  185. package/scss/assets/scss/_style.import.scss +11 -0
  186. package/scss/assets/scss/_theme-delta.scss +2 -1
  187. package/scss/assets/scss/_theme-irp.scss +2 -1
  188. package/scss/assets/scss/_theme-mcr.scss +2 -1
  189. package/scss/assets/scss/_theme-preventionweb.scss +2 -1
  190. package/scss/assets/scss/_utility.scss +3 -0
  191. package/scss/assets/scss/_variables.import.scss +11 -0
  192. package/scss/assets/scss/_variables.scss +5 -230
  193. package/scss/assets/scss/generated/_tokens-mangrove.scss +87 -0
  194. package/scss/assets/scss/style-all.scss +14 -11
  195. package/scss/assets/scss/style-delta.scss +11 -8
  196. package/scss/assets/scss/style-gutenberg.scss +15 -12
  197. package/scss/assets/scss/style-irp.scss +11 -8
  198. package/scss/assets/scss/style-mcr.scss +11 -8
  199. package/scss/assets/scss/style-preventionweb.scss +11 -8
  200. 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: 0 var(--mg-spacing-100);
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: 1fr auto;
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-300);
148
+ padding: var(--mg-spacing-150);
149
+ gap: var(--mg-spacing-50);
146
150
 
147
151
  @include devicebreak(small) {
148
- padding: var(--mg-spacing-200);
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/CiteThis/CiteThis.mdx
8
8
  */
9
+ @use "../../assets/scss/mixins" as *;
10
+ @use "../../assets/scss/config" as *;
9
11
 
10
12
  .mg-cite-this {
11
13
  max-inline-size: 48rem;
@@ -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,7 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/DataViz/Legend/Legend.mdx
8
8
  */
9
+ @use "../../../assets/scss/mixins" as *;
9
10
 
10
11
  .mg-legend {
11
12
  display: flex;
@@ -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/Footer/Footer.mdx
8
8
  */
9
+ @use "../../assets/scss/config" as *;
10
+
9
11
  .mg-footer {
10
12
  --mg-gutenberg-spacer: 0;
11
13
  }
@@ -6,6 +6,8 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/FormAction/FormAction.mdx
8
8
  */
9
+ @use "../../../assets/scss/config" as *;
10
+
9
11
  .mg-form-action {
10
12
  align-items: stretch;
11
13
  display: flex;
@@ -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 {
@@ -6,6 +6,7 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Forms/Range/Range.mdx
8
8
  */
9
+ @use "../../../assets/scss/mixins" as *;
9
10
 
10
11
  @mixin mg-range-thumb {
11
12
  appearance: none;
@@ -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,6 +6,9 @@
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));
@@ -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
- @import "./mega-menu";
10
+ @forward "./mega-menu";
11
11
  @warn "megamenu.scss is deprecated. Import mega-menu.scss instead.";
@@ -7,6 +7,7 @@
7
7
  * Full documentation:
8
8
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Navigation/Drawer/Drawer.mdx
9
9
  */
10
+ @use "../../../assets/scss/config" as *;
10
11
 
11
12
  .mg-drawer,
12
13
  .mg-floating-panel {
@@ -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,8 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/QuoteHighlight/QuoteHighlight.mdx
8
8
  */
9
+ @use "../../assets/scss/breakpoints" as *;
10
+
9
11
  .mg-quote-highlight {
10
12
  display: flex;
11
13
  flex-direction: column;
@@ -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;
@@ -7,6 +7,7 @@
7
7
  * Full documentation:
8
8
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Snackbar/Snackbar.mdx
9
9
  */
10
+ @use "../../assets/scss/config" as *;
10
11
 
11
12
  .mg-snackbar-wrapper {
12
13
  position: fixed;
@@ -6,7 +6,10 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/SyndicationSearchWidget/SyndicationSearchWidget.mdx
8
8
  */
9
- @import "deprecated-teaser-hide";
9
+ @use "../Forms/form-base";
10
+ @use "deprecated-teaser-hide" as *;
11
+ @use "../../assets/scss/mixins" as *;
12
+ @use "../../assets/scss/config" as *;
10
13
 
11
14
  // Component-specific variables (using Mangrove tokens)
12
15
  // Colors
@@ -855,15 +858,63 @@ $search-input-padding-x: mg-rem(44);
855
858
  // The book card's existing start alignment keeps cover rows intrinsic.
856
859
  .mg-card__book {
857
860
  block-size: 100%;
861
+ max-width: none;
862
+ inline-size: 100%;
858
863
  }
859
864
 
860
865
  // Remove list-style dividers in grid/card mode
861
866
  .mg-search__result {
867
+ inline-size: 100%;
868
+ min-inline-size: 0;
862
869
  padding-bottom: 0;
863
870
  border-bottom: 0;
864
871
  }
865
872
  }
866
873
 
874
+ // A catalogue aligns captions through a shared media stage, without cropping
875
+ // supplied artwork or inventing a cover for a result that has none. Only search
876
+ // galleries use this staging; standalone publication teasers remain intrinsic.
877
+ .mg-search__results-grid--book {
878
+ @media (min-width: $mg-breakpoint-tablet) {
879
+ &:has(.mg-card__visual) {
880
+ .mg-card__book > .mg-card__visual,
881
+ .mg-card__book:not(:has(.mg-card__visual))::before {
882
+ inline-size: 100%;
883
+ block-size: var(--mg-search-book-cover-height);
884
+ }
885
+
886
+ .mg-card__book:not(:has(.mg-card__visual))::before {
887
+ content: "";
888
+ }
889
+
890
+ .mg-card__book > .mg-card__visual {
891
+ aspect-ratio: auto;
892
+ border: 0;
893
+ align-items: flex-end;
894
+ justify-content: flex-start;
895
+
896
+ > a {
897
+ display: flex;
898
+ align-items: flex-end;
899
+ justify-content: flex-start;
900
+ inline-size: 100%;
901
+ block-size: 100%;
902
+ }
903
+
904
+ img {
905
+ align-self: flex-end;
906
+ inline-size: auto;
907
+ block-size: auto;
908
+ max-inline-size: 100%;
909
+ max-block-size: 100%;
910
+ object-fit: contain;
911
+ border: 1px solid rgb(var(--mg-color-neutral-600) / 0.2);
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+
867
918
  // ========================================
868
919
  // Result Animations
869
920
  // Sequential fade-in and slide from left for search results.
@@ -6,6 +6,10 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/Tab/Tab.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-tabs__list {
10
14
  background: var(--mg-color-tabbar-background);
11
15
  width: 100%;
@@ -6,6 +6,8 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/TableOfContents/TableOfContents.mdx
8
8
  */
9
+ @use "../../assets/scss/mixins" as *;
10
+
9
11
  .mg-table-of-contents {
10
12
  padding-inline-start: var(--mg-spacing-200);
11
13
  border-inline-start: 2px solid rgb(var(--mg-color-neutral-300));
@@ -6,6 +6,9 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/TextCta/TextCta.mdx
8
8
  */
9
+ @use "../../assets/scss/breakpoints" as *;
10
+ @use "../../assets/scss/config" as *;
11
+
9
12
  /* CTA banner start */
10
13
 
11
14
  .mg-cta {
@@ -7,5 +7,5 @@
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/TextCta/TextCta.mdx
8
8
  */
9
9
  // textcta.scss — DEPRECATED, use text-cta.scss
10
- @import "./text-cta";
10
+ @forward "./text-cta";
11
11
  @warn "textcta.scss is deprecated. Import text-cta.scss instead.";
@@ -6,6 +6,9 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/UserFeedback/UserFeedback.mdx
8
8
  */
9
+ @use "../../assets/scss/mixins" as *;
10
+ @use "../../assets/scss/config" as *;
11
+
9
12
  .mg-user-feedback {
10
13
  align-items: center;
11
14
  box-sizing: border-box;
@@ -6,6 +6,8 @@
6
6
  * Full documentation:
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Atom/Images/ImageCaptionCredit/ImageCaptionCredit.mdx
8
8
  */
9
+ @use "../../assets/scss/breakpoints" as *;
10
+
9
11
  /* image caption start */
10
12
  .mg-image-caption {
11
13
  border-bottom: 2px solid rgb(var(--mg-color-black));
@@ -7,5 +7,5 @@
7
7
  * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/PageHeader/PageHeader.mdx
8
8
  */
9
9
  // sectionheader.scss — DEPRECATED, use section-header.scss
10
- @import "./section-header";
10
+ @forward "./section-header";
11
11
  @warn "sectionheader.scss is deprecated. Import section-header.scss instead.";