@undrr/undrr-mangrove 2.0.0 → 2.1.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 (182) hide show
  1. package/README.md +9 -5
  2. package/components/BookCard.js +2 -2
  3. package/components/Breadcrumbs.js +2 -2
  4. package/components/Checkbox.js +2 -2
  5. package/components/Chips.js +2 -2
  6. package/components/CopyButton.js +2 -2
  7. package/components/CtaButton.js +2 -2
  8. package/components/Drawer.js +3 -3
  9. package/components/Drawer.js.LICENSE.txt +3 -1
  10. package/components/EmbedContainer.js +2 -2
  11. package/components/Footer.js +2 -2
  12. package/components/FormAction.js +2 -2
  13. package/components/FormErrorSummary.js +2 -2
  14. package/components/FormGroup.js +2 -2
  15. package/components/FullWidth.js +2 -2
  16. package/components/Gallery.js +3 -3
  17. package/components/Hero.js +3 -3
  18. package/components/HighlightBox.js +2 -2
  19. package/components/HorizontalBookCard.js +3 -3
  20. package/components/HorizontalBookCard.js.LICENSE.txt +3 -1
  21. package/components/HorizontalCard.js +3 -3
  22. package/components/HorizontalCard.js.LICENSE.txt +3 -1
  23. package/components/IconCard.js +3 -3
  24. package/components/IconCard.js.LICENSE.txt +3 -1
  25. package/components/Legend.js +2 -2
  26. package/components/Loader.js +3 -3
  27. package/components/MegaMenu.js +3 -3
  28. package/components/Notice.js +2 -2
  29. package/components/PageHeader.js +2 -2
  30. package/components/Pager.js +2 -2
  31. package/components/ProgressBar.js +9 -0
  32. package/components/ProgressBar.js.LICENSE.txt +9 -0
  33. package/components/QuoteHighlight.js +3 -3
  34. package/components/QuoteHighlight.js.LICENSE.txt +3 -1
  35. package/components/Radio.js +2 -2
  36. package/components/Range.js +2 -2
  37. package/components/ScrollContainer.js +2 -2
  38. package/components/SegmentedControl.js +2 -2
  39. package/components/Select.js +2 -2
  40. package/components/ServiceNotice.js +2 -2
  41. package/components/ShareButtons.js +3 -3
  42. package/components/ShowMore.js +3 -3
  43. package/components/SkipLink.js +2 -2
  44. package/components/StatsCard.js +3 -3
  45. package/components/StatsCard.js.LICENSE.txt +3 -1
  46. package/components/SyndicationSearchWidget.js +3 -3
  47. package/components/Tab.js +2 -2
  48. package/components/TextCta.js +3 -3
  49. package/components/TextCta.js.LICENSE.txt +3 -1
  50. package/components/TextInput.js +2 -2
  51. package/components/Textarea.js +2 -2
  52. package/components/Tree.js +2 -2
  53. package/components/UserFeedback.js +2 -2
  54. package/components/VerticalCard.js +3 -3
  55. package/components/VerticalCard.js.LICENSE.txt +3 -1
  56. package/components/hydrate.js +3 -3
  57. package/css/style-all.css +147 -128
  58. package/css/style-all.css.map +1 -1
  59. package/css/style-delta.css +147 -128
  60. package/css/style-delta.css.map +1 -1
  61. package/css/style-gutenberg.css +12 -12
  62. package/css/style-gutenberg.css.map +1 -1
  63. package/css/style-irp.css +147 -128
  64. package/css/style-irp.css.map +1 -1
  65. package/css/style-mcr.css +147 -128
  66. package/css/style-mcr.css.map +1 -1
  67. package/css/style-preventionweb.css +147 -128
  68. package/css/style-preventionweb.css.map +1 -1
  69. package/css/style.css +147 -128
  70. package/css/style.css.map +1 -1
  71. package/docs/EDITORIAL-MANUAL.md +193 -0
  72. package/docs/llms-editorial-manual.txt +200 -0
  73. package/docs/llms-motion.txt +125 -0
  74. package/docs/llms-page-building.txt +1140 -0
  75. package/docs/llms-search-widget.txt +765 -0
  76. package/error-pages/401.html +1 -1
  77. package/error-pages/403.html +1 -1
  78. package/error-pages/404.html +1 -1
  79. package/error-pages/429.html +1 -1
  80. package/error-pages/500.html +1 -1
  81. package/error-pages/502.html +1 -1
  82. package/error-pages/503.html +1 -1
  83. package/error-pages/504.html +1 -1
  84. package/error-pages/5xx.html +1 -1
  85. package/error-pages/challenge.html +1 -1
  86. package/error-pages/managed-challenge.html +1 -1
  87. package/js/cite-this.js +994 -0
  88. package/js/on-this-page-nav.js +80 -1
  89. package/js/show-more.js +149 -21
  90. package/package.json +6 -1
  91. package/scss/Atom/BaseTypography/Abbr/abbr.scss +1 -1
  92. package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -1
  93. package/scss/Atom/BaseTypography/Cite/cite.scss +1 -1
  94. package/scss/Atom/BaseTypography/Code/code.scss +1 -1
  95. package/scss/Atom/BaseTypography/Mark/mark.scss +1 -1
  96. package/scss/Atom/BaseTypography/Quotation/quotation.scss +1 -1
  97. package/scss/Atom/BaseTypography/Small/small.scss +1 -1
  98. package/scss/Atom/Colors/color.scss +1 -1
  99. package/scss/Atom/EmptyState/empty-state.scss +1 -1
  100. package/scss/Atom/Icons/_icon-definitions.scss +35 -3
  101. package/scss/Atom/Icons/icons.scss +1 -1
  102. package/scss/Atom/Images/AuthorImage/author-image.scss +10 -3
  103. package/scss/Atom/Images/Image/image.scss +1 -1
  104. package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +7 -2
  105. package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
  106. package/scss/Atom/Layout/Container/container.scss +1 -1
  107. package/scss/Atom/Layout/Grid/grid.scss +1 -1
  108. package/scss/Atom/Layout/Spacing/spacing.scss +1 -1
  109. package/scss/Atom/Logo/logo.scss +1 -1
  110. package/scss/Atom/Navigation/Breadcrumb/breadcrumb.scss +1 -1
  111. package/scss/Atom/Navigation/MenuItems/menu-items.scss +1 -1
  112. package/scss/Atom/ReachElement/Details/details.scss +5 -3
  113. package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
  114. package/scss/Atom/StatusLabel/status-label.scss +1 -1
  115. package/scss/Atom/Table/table.scss +1 -1
  116. package/scss/Atom/Tag/tag.scss +1 -1
  117. package/scss/Atom/Video/video.scss +1 -1
  118. package/scss/Components/Boilerplate/boilerplate.scss +1 -1
  119. package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -1
  120. package/scss/Components/Buttons/Chips/chips.scss +1 -1
  121. package/scss/Components/Buttons/CopyButton/copy-button.scss +1 -1
  122. package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
  123. package/scss/Components/Buttons/CtaButton/cta-button.scss +1 -1
  124. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +90 -1
  125. package/scss/Components/Cards/Card/card.scss +9 -3
  126. package/scss/Components/Cards/StatsCard/stats-card.scss +9 -2
  127. package/scss/Components/CiteThis/cite-this.scss +339 -0
  128. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +1 -1
  129. package/scss/Components/DataViz/Legend/legend.scss +1 -1
  130. package/scss/Components/ErrorPages/error-pages.scss +1 -1
  131. package/scss/Components/Footer/footer.scss +1 -1
  132. package/scss/Components/Forms/Checkbox/checkbox.scss +1 -1
  133. package/scss/Components/Forms/FormAction/form-action.scss +1 -1
  134. package/scss/Components/Forms/FormGroup/form-group.scss +1 -1
  135. package/scss/Components/Forms/InputFields/input-fields.scss +1 -1
  136. package/scss/Components/Forms/Radio/radio.scss +1 -1
  137. package/scss/Components/Forms/Range/range.scss +1 -1
  138. package/scss/Components/Forms/SegmentedControl/segmented-control.scss +1 -1
  139. package/scss/Components/Forms/Select/select.scss +1 -1
  140. package/scss/Components/Forms/TextInput/text-input.scss +1 -1
  141. package/scss/Components/Forms/Textarea/textarea.scss +1 -1
  142. package/scss/Components/Forms/_form-base.scss +1 -1
  143. package/scss/Components/Gallery/gallery.scss +41 -16
  144. package/scss/Components/Hero/hero.scss +166 -1
  145. package/scss/Components/HighlightBox/highlight-box.scss +1 -1
  146. package/scss/Components/MegaMenu/mega-menu.scss +43 -122
  147. package/scss/Components/MegaMenu/megamenu.scss +1 -1
  148. package/scss/Components/Navigation/Drawer/drawer.scss +11 -1
  149. package/scss/Components/Navigation/Tree/tree.scss +1 -1
  150. package/scss/Components/Notice/notice.scss +1 -1
  151. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +109 -4
  152. package/scss/Components/PageHeader/page-header.scss +1 -1
  153. package/scss/Components/Pager/pager.scss +1 -1
  154. package/scss/Components/PreviewAccess/preview-access.scss +1 -1
  155. package/scss/Components/ProgressBar/progress-bar.scss +215 -0
  156. package/scss/Components/QuoteHighlight/quote-highlight.scss +1 -1
  157. package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
  158. package/scss/Components/Snackbar/snackbar.scss +1 -1
  159. package/scss/Components/SyndicationSearchWidget/_deprecated-teaser-hide.scss +1 -1
  160. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +253 -128
  161. package/scss/Components/Tab/tab.scss +3 -2
  162. package/scss/Components/TableOfContents/table-of-contents.scss +1 -1
  163. package/scss/Components/TextCta/text-cta.scss +1 -1
  164. package/scss/Components/TextCta/textcta.scss +1 -1
  165. package/scss/Components/UserFeedback/user-feedback.scss +1 -1
  166. package/scss/Molecules/ImageCaption/image-caption.scss +17 -3
  167. package/scss/Molecules/SectionHeader/section-header.scss +1 -1
  168. package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
  169. package/scss/Patterns/HubHeader/hub-header.scss +1 -1
  170. package/scss/Patterns/RichContent/rich-content.scss +177 -0
  171. package/scss/Patterns/_shared/pattern-demo.scss +6 -1
  172. package/scss/Utilities/EmbedContainer/embed-container.scss +1 -1
  173. package/scss/Utilities/FullWidth/full-width.scss +1 -1
  174. package/scss/Utilities/Loader/loader.scss +133 -12
  175. package/scss/Utilities/Normalize/normalize.scss +1 -1
  176. package/scss/Utilities/PagePatterns/page-patterns.scss +1 -1
  177. package/scss/Utilities/ShowMore/show-more.scss +7 -1
  178. package/scss/Utilities/SkipLink/skip-link.scss +1 -1
  179. package/scss/assets/scss/_components.scss +5 -0
  180. package/scss/assets/scss/_foundational.scss +23 -8
  181. package/scss/assets/scss/_mixins.scss +5 -0
  182. package/scss/assets/scss/_variables.scss +2 -2
@@ -4,7 +4,7 @@
4
4
  * Section header block with category tag, headline, and optional action link.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Components/PageHeader/PageHeader.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Components/PageHeader/PageHeader.mdx
8
8
  */
9
9
  /* header section start */
10
10
  .mg-section-header {
@@ -4,7 +4,7 @@
4
4
  * Legacy stylesheet forwarding to section-header.scss.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Components/PageHeader/PageHeader.mdx
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
10
  @import "./section-header";
@@ -4,7 +4,7 @@
4
4
  * Content hub banner header with theme styling, breadcrumb trail, and description copy.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Patterns/ContentHub/ContentHub.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Patterns/ContentHub/ContentHub.mdx
8
8
  */
9
9
  // Deliberately not a tab set and deliberately not the mega menu topbar. Both
10
10
  // mark the active item with a 3px bottom border; so does OnThisPageNav. A
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Rich content
3
+ *
4
+ * Opt-in semantic defaults for trusted editorial HTML. Classed descendants
5
+ * keep their own presentation; classless structural wrappers pass through.
6
+ *
7
+ * Full documentation:
8
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Patterns/RichContent/RichContent.mdx
9
+ */
10
+
11
+ // The pattern's scroll wrapper is editorial structure, not a component
12
+ // island. Root classes never exclude the root's own content.
13
+ @mixin mg-editorial-element($element) {
14
+ .mg-content
15
+ #{$element}:not(
16
+ :where(
17
+ .mg-content [class]:not(.mg-content__scroll),
18
+ .mg-content [class]:not(.mg-content__scroll) *,
19
+ .mg-content
20
+ :is(
21
+ nav,
22
+ form,
23
+ fieldset,
24
+ button,
25
+ [role="navigation"],
26
+ [role="menu"],
27
+ [role="menubar"],
28
+ [role="tablist"],
29
+ [role="dialog"],
30
+ [role="toolbar"],
31
+ [role="listbox"],
32
+ [role="tree"]
33
+ ),
34
+ .mg-content
35
+ :is(
36
+ nav,
37
+ form,
38
+ fieldset,
39
+ button,
40
+ [role="navigation"],
41
+ [role="menu"],
42
+ [role="menubar"],
43
+ [role="tablist"],
44
+ [role="dialog"],
45
+ [role="toolbar"],
46
+ [role="listbox"],
47
+ [role="tree"]
48
+ )
49
+ *
50
+ )
51
+ ) {
52
+ @content;
53
+ }
54
+ }
55
+
56
+ @include mg-editorial-element(":is(p, ul, ol, dl)") {
57
+ margin-block: 0 var(--mg-spacing-150);
58
+ }
59
+
60
+ @include mg-editorial-element(":is(h1, h2, h3, h4, h5, h6)") {
61
+ margin-block: var(--mg-spacing-200) var(--mg-spacing-100);
62
+ line-height: var(--mg-font-line-height-500);
63
+ }
64
+
65
+ @include mg-editorial-element(":is(ul, ol)") {
66
+ padding-inline: 0;
67
+ padding-inline-start: var(--mg-spacing-250);
68
+ }
69
+
70
+ @include mg-editorial-element("li") {
71
+ padding-inline: 0;
72
+ margin-block-end: var(--mg-spacing-25);
73
+ }
74
+
75
+ @include mg-editorial-element("li > :is(ul, ol)") {
76
+ margin-block: var(--mg-spacing-50) 0;
77
+ }
78
+
79
+ @include mg-editorial-element(
80
+ "blockquote:not(:where(:has(.mg-highlight-box)))"
81
+ ) {
82
+ margin-block: var(--mg-spacing-200);
83
+ margin-inline: 0;
84
+ padding-inline-start: var(--mg-spacing-150);
85
+ border-inline-start: 3px solid rgb(var(--mg-color-neutral-400));
86
+ font-size: var(--mg-font-size-300);
87
+ font-weight: 400;
88
+ line-height: var(--mg-font-line-height-700);
89
+ }
90
+
91
+ @include mg-editorial-element("cite") {
92
+ display: inline;
93
+ margin: 0;
94
+ font-style: italic;
95
+ }
96
+
97
+ @include mg-editorial-element("a:not(:where([role=button]))") {
98
+ text-decoration: underline;
99
+ text-underline-offset: 0.15em;
100
+ }
101
+
102
+ @include mg-editorial-element("hr") {
103
+ margin-block: var(--mg-spacing-200);
104
+ }
105
+
106
+ @include mg-editorial-element("figure") {
107
+ margin-block: var(--mg-spacing-200);
108
+ margin-inline: 0;
109
+ }
110
+
111
+ @include mg-editorial-element("figure > img") {
112
+ display: block;
113
+ max-width: 100%;
114
+ height: auto;
115
+ padding: 0;
116
+ }
117
+
118
+ @include mg-editorial-element(":is(figcaption, caption)") {
119
+ font-size: var(--mg-font-size-250);
120
+ line-height: var(--mg-font-line-height-700);
121
+ text-align: start;
122
+ }
123
+
124
+ @include mg-editorial-element("figcaption") {
125
+ margin-block-start: var(--mg-spacing-50);
126
+ }
127
+
128
+ @include mg-editorial-element("table") {
129
+ width: 100%;
130
+ border-collapse: collapse;
131
+ margin-block: var(--mg-spacing-150);
132
+ }
133
+
134
+ @include mg-editorial-element(":is(th, td)") {
135
+ padding: var(--mg-spacing-75) var(--mg-spacing-100);
136
+ border: 1px solid rgb(var(--mg-color-neutral-400));
137
+ text-align: start;
138
+ vertical-align: top;
139
+ }
140
+
141
+ @include mg-editorial-element("caption") {
142
+ margin-block-end: var(--mg-spacing-50);
143
+ font-weight: 600;
144
+ }
145
+
146
+ @include mg-editorial-element("code:not(:where(pre code))") {
147
+ // Code is prose, not a link: use the readable text/surface pairing rather
148
+ // than interactive ink on its tinted global background in every theme.
149
+ color: rgb(var(--mg-color-text));
150
+ background: rgb(var(--mg-color-neutral-50));
151
+ }
152
+
153
+ @include mg-editorial-element("pre") {
154
+ max-width: 100%;
155
+ margin-block: var(--mg-spacing-150);
156
+ overflow-x: auto;
157
+
158
+ // Match the existing LTR code child so RTL pages can reach both ends.
159
+ direction: ltr;
160
+ unicode-bidi: isolate;
161
+ }
162
+
163
+ @include mg-editorial-element("pre:focus-visible") {
164
+ @include mg-focus-ring-inset;
165
+ }
166
+
167
+ // Only authored overflow regions become keyboard stops. Native table
168
+ // semantics remain on the table; the wrapper supplies scrolling and focus.
169
+ .mg-content .mg-content__scroll {
170
+ max-width: 100%;
171
+ overflow-x: auto;
172
+ margin-block: var(--mg-spacing-150);
173
+
174
+ &:focus-visible {
175
+ @include mg-focus-ring-inset;
176
+ }
177
+ }
@@ -4,7 +4,7 @@
4
4
  * Shared layout and scaffolding styles for Storybook page pattern demonstrations.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Patterns/LandingPages/LandingPages.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Patterns/LandingPages/LandingPages.mdx
8
8
  */
9
9
  // Demo-only story scaffolding (`mg-demo-*`), imported directly by pattern stories.
10
10
  @import "../../assets/scss/variables";
@@ -53,3 +53,8 @@
53
53
  .mg-demo-article-header .mg-hero__split-grid {
54
54
  max-inline-size: var(--mg-reading-with-contents-width);
55
55
  }
56
+
57
+ // CollectionPage: space between the page's sections.
58
+ .mg-demo-collection-section {
59
+ margin-block-end: var(--mg-spacing-400);
60
+ }
@@ -4,7 +4,7 @@
4
4
  * Responsive aspect-ratio wrapper for embedded video, iframes, maps, and external widgets.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/EmbedContainer/EmbedContainer.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/EmbedContainer/EmbedContainer.mdx
8
8
  */
9
9
  // Responsive embed container
10
10
  // Provides aspect-ratio wrapper for iframes, videos, and other embedded media.
@@ -4,7 +4,7 @@
4
4
  * Breakout utility allowing content within constrained containers to bleed full width to viewport edges.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/FullWidth/FullWidth.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/FullWidth/FullWidth.mdx
8
8
  */
9
9
  // Full-bleed background without moving the element's box: a 100vw pseudo-element
10
10
  // is painted behind the element, so content alignment is untouched.
@@ -1,39 +1,160 @@
1
1
  /**
2
2
  * Loader / Spinner
3
3
  *
4
- * Animated loading spinner indicator with brand-themed animation for asynchronous states.
4
+ * Loading indicator for asynchronous states, in a default size for
5
+ * pages and regions and a 1em inline size for text, buttons and form fields.
5
6
  *
6
7
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/Loader/Loader.mdx
8
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/Loader/Loader.mdx
8
9
  */
9
10
  // * loader start *//
10
11
 
11
- // loader animation
12
- @keyframes loader-animation {
13
- 0% {
14
- transform: rotate(0deg);
15
- }
16
-
17
- 100% {
12
+ @keyframes mg-spin {
13
+ to {
18
14
  transform: rotate(360deg);
19
15
  }
20
16
  }
21
17
 
22
18
  .mg-loader {
23
- @include animation(loader-animation 2s linear infinite);
19
+ // One turn. Under a second keeps a small spinner looking busy; at 2s a 16px
20
+ // spinner reads as stalled.
21
+ --mg-loader-duration: 0.9s;
24
22
 
25
- border: 8px solid rgb(var(--mg-color-blue-600));
23
+ animation: mg-spin var(--mg-loader-duration) linear infinite;
24
+ border: 8px solid rgb(var(--mg-color-interactive));
26
25
  border-radius: 50%;
27
26
  border-top: 8px solid rgb(var(--mg-color-neutral-300));
27
+ box-sizing: border-box;
28
28
  height: 40px;
29
29
  width: 40px;
30
30
 
31
31
  @include devicebreak(medium) {
32
- border: 14px solid rgb(var(--mg-color-blue-600));
32
+ border: 14px solid rgb(var(--mg-color-interactive));
33
33
  border-top: 14px solid rgb(var(--mg-color-neutral-300));
34
34
  height: 96px;
35
35
  width: 96px;
36
36
  }
37
+
38
+ // Compact inline size. It is sized in em so it follows the font size of the
39
+ // text or button it sits in, and it does not grow at the medium breakpoint:
40
+ // this rule comes after the breakpoint rule above, so it wins there too.
41
+ // The arc is currentColor and the track a quarter-strength currentColor, so
42
+ // the spinner takes the text colour of its context, including filled and
43
+ // outline buttons and text on dark backgrounds. Where color-mix() is not
44
+ // supported the track is transparent and the arc still shows.
45
+ &--inline {
46
+ border: max(2px, 0.125em) solid transparent;
47
+ border-color: color-mix(in oklab, currentColor 25%, transparent);
48
+ border-top-color: currentColor;
49
+ display: inline-block;
50
+ flex-shrink: 0;
51
+ height: 1em;
52
+
53
+ // A box with no text has its baseline at its bottom edge, so baseline
54
+ // alignment would stand the spinner on the text baseline and lift it above
55
+ // the letters. -0.125em centres it on the letters, as icon fonts do. In a
56
+ // flex container such as .mg-button the spinner is a flex item instead,
57
+ // centred by align-items, and vertical-align does not apply.
58
+ vertical-align: -0.125em;
59
+ width: 1em;
60
+ }
61
+
62
+ // Forced colours would paint every side of the border in one system colour,
63
+ // a full ring whose rotation cannot be seen. Opt out and use system colours
64
+ // for the arc and the track.
65
+ @media (forced-colors: active) {
66
+ border-color: GrayText;
67
+ border-top-color: CanvasText;
68
+ forced-color-adjust: none;
69
+ }
70
+
71
+ @media (prefers-reduced-motion: reduce) {
72
+ // A complete dashed ring is a deliberate pending marker, not a frozen
73
+ // frame of the asymmetric spinner. Its label carries the state meaning.
74
+ animation: none !important;
75
+ transform: none;
76
+ border-style: dashed;
77
+ border-color: rgb(var(--mg-color-interactive));
78
+
79
+ &--inline {
80
+ border-color: currentColor;
81
+ }
82
+
83
+ // The same existing markup works for React and CSS-only consumers. The
84
+ // status label joins normal flow; only the marker keeps the old size.
85
+ &:not([aria-hidden="true"]) {
86
+ display: inline-flex;
87
+ flex-direction: column;
88
+ align-items: center;
89
+ gap: var(--mg-spacing-50);
90
+ width: fit-content;
91
+ max-width: 100%;
92
+ height: auto;
93
+ border: 0;
94
+ border-radius: 0;
95
+ vertical-align: middle;
96
+ text-align: center;
97
+
98
+ &::before {
99
+ content: "";
100
+ display: block;
101
+ flex-shrink: 0;
102
+ box-sizing: border-box;
103
+ width: 40px;
104
+ max-width: 100%;
105
+ aspect-ratio: 1;
106
+ border: 8px dashed rgb(var(--mg-color-interactive));
107
+ border-radius: 50%;
108
+
109
+ @include devicebreak(medium) {
110
+ width: 96px;
111
+ border-width: 14px;
112
+ }
113
+ }
114
+
115
+ > .mg-u-sr-only {
116
+ position: static;
117
+ width: auto;
118
+ min-width: 0;
119
+ max-width: 100%;
120
+ height: auto;
121
+ margin: 0;
122
+ overflow: visible;
123
+ clip-path: none;
124
+ white-space: normal;
125
+ overflow-wrap: anywhere;
126
+ line-height: var(--mg-font-line-height-700);
127
+ }
128
+ }
129
+
130
+ &--inline:not([aria-hidden="true"]) {
131
+ flex-direction: row;
132
+ align-items: baseline;
133
+ text-align: start;
134
+
135
+ &::before {
136
+ width: 1em;
137
+ height: 1em;
138
+ border-width: max(2px, 0.125em);
139
+ border-color: currentColor;
140
+ }
141
+ }
142
+
143
+ @media (forced-colors: active) {
144
+ border-color: CanvasText;
145
+
146
+ &:not([aria-hidden="true"]) {
147
+ // Let the visible label use the user's text colours. Only the
148
+ // decorative marker opts out to keep its dashed outline distinct.
149
+ forced-color-adjust: auto;
150
+
151
+ &::before {
152
+ border-color: CanvasText;
153
+ forced-color-adjust: none;
154
+ }
155
+ }
156
+ }
157
+ }
37
158
  }
38
159
 
39
160
  // * loader end *//
@@ -4,7 +4,7 @@
4
4
  * Cross-browser HTML element reset and foundational base styles ensuring consistent baseline rendering.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/Normalize/Normalize.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/Normalize/Normalize.mdx
8
8
  */
9
9
  /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
10
10
 
@@ -4,7 +4,7 @@
4
4
  * Composite page layout pattern utilities for standard UNDRR editorial templates.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/PagePatterns/PagePatterns.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/PagePatterns/PagePatterns.mdx
8
8
  */
9
9
  // Reading-page layout tokens and placement rules.
10
10
 
@@ -4,7 +4,7 @@
4
4
  * Collapsible content container with progressive Show more / Show less disclosure toggle.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/ShowMore/ShowMore.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/ShowMore/ShowMore.mdx
8
8
  */
9
9
  :root {
10
10
  --mg-show-more-height: 200px;
@@ -32,3 +32,9 @@
32
32
  z-index: 2; // button sits above the gradient fade-out overlay — local to show-more context
33
33
  padding: mg-rem(10) mg-rem(40);
34
34
  }
35
+
36
+ // `.mg-button` sets `display`, which beats the `hidden` attribute the
37
+ // threshold option puts on a toggle with nothing to reveal.
38
+ .mg-show-more--button[hidden] {
39
+ display: none;
40
+ }
@@ -4,7 +4,7 @@
4
4
  * Accessible skip-to-main-content navigation link that reveals on keyboard focus.
5
5
  *
6
6
  * Full documentation:
7
- * https://github.com/unisdr/undrr-mangrove/blob/main/stories/Utilities/SkipLink/SkipLink.mdx
7
+ * https://github.com/PreventionWeb/undrr-mangrove/blob/main/stories/Utilities/SkipLink/SkipLink.mdx
8
8
  */
9
9
  // Skip link.
10
10
 
@@ -60,6 +60,7 @@
60
60
  @import "../../Components/Buttons/CopyButton/copy-button";
61
61
  @import "../../Components/MegaMenu/mega-menu";
62
62
  @import "../../Patterns/HubHeader/hub-header";
63
+ @import "../../Components/CiteThis/cite-this";
63
64
  @import "../../Utilities/PagePatterns/page-patterns";
64
65
  @import "../../Components/PageHeader/page-header";
65
66
  @import "../../Components/Cards/Card/card";
@@ -69,6 +70,7 @@
69
70
  @import "../../Components/Hero/hero";
70
71
  @import "../../Components/TextCta/text-cta";
71
72
  @import "../../Components/Notice/notice";
73
+ @import "../../Components/ProgressBar/progress-bar";
72
74
  @import "../../Components/ScrollContainer/scroll-container";
73
75
  @import "../../Components/Tab/tab";
74
76
  @import "../../Components/UserFeedback/user-feedback";
@@ -95,3 +97,6 @@
95
97
  @import "../../Components/DataViz/Legend/legend";
96
98
  @import "../../Components/Navigation/Drawer/drawer";
97
99
  @import "../../Components/Navigation/Tree/tree";
100
+
101
+ // Opt-in editorial defaults follow component styles; classed islands opt out.
102
+ @import "../../Patterns/RichContent/rich-content";
@@ -191,7 +191,10 @@ a {
191
191
  // Long-form and WYSIWYG content opt into this boundary. Navigation, cards and
192
192
  // button-like links carry their purpose through their component treatment;
193
193
  // prose links do not, so colour alone is insufficient (WCAG 1.4.1).
194
- .mg-content p a {
194
+ // Retain the reach through CMS classes, with low specificity so component
195
+ // links (including paragraph-wrapped buttons) can own their treatment.
196
+ :where(.mg-content p)
197
+ a:not(:where(.mg-button, .mg-icon-button, [role="button"])) {
195
198
  text-decoration: underline;
196
199
  }
197
200
 
@@ -206,9 +209,22 @@ a {
206
209
  }
207
210
  }
208
211
 
209
- [dir="rtl"] {
212
+ // RTL list indentation. The direction is wrapped in :where() so these rules
213
+ // carry exactly the specificity of the LTR `ul`, `ol` and `ul li` rules they
214
+ // mirror. A bare [dir="rtl"] made them outrank a component's own list reset
215
+ // (a class rule), so in RTL every unmarked component list (On this page nav,
216
+ // hero tags, breadcrumbs, pager, tabs and more) picked up the prose indent and
217
+ // sat 9-22px inside its content edge. LTR is untouched: these rules only match
218
+ // under an RTL ancestor, and the custom property is only read here.
219
+ :where([dir="rtl"]) {
210
220
  ul,
211
221
  ol {
222
+ // The item indent below aligns Arabic text with its bullets. A list
223
+ // with no bullets (mg-list-unmarked) sets this to 0 on itself; each
224
+ // list declares its own default, so a bulleted list nested inside an
225
+ // unmarked one keeps its indent.
226
+ --mg-list-item-indent-rtl: #{mg-rem(9)};
227
+
212
228
  direction: rtl;
213
229
  padding-left: 0;
214
230
  padding-right: mg-rem(11);
@@ -219,16 +235,15 @@ a {
219
235
 
220
236
  li {
221
237
  padding-left: 0;
222
- padding-right: mg-rem(9);
223
238
 
224
- @include devicebreak(medium) {
225
- // Keep RTL list item text aligned with bullets at medium
226
- // https://gitlab.com/undrr/web-backlog/-/issues/2444
227
- padding-right: mg-rem(9);
228
- }
239
+ // Keep RTL list item text aligned with bullets
240
+ // https://gitlab.com/undrr/web-backlog/-/issues/2444
241
+ padding-right: var(--mg-list-item-indent-rtl);
229
242
  }
230
243
  }
244
+ }
231
245
 
246
+ [dir="rtl"] {
232
247
  // 900 weight Roboto does not work well with Arabic
233
248
  // https://gitlab.com/undrr/web-backlog/-/issues/1711
234
249
  h1,
@@ -176,6 +176,11 @@
176
176
  // (`tree`, `group`, `menu`, `listbox`, `tablist`): that role already replaces
177
177
  // list semantics, and there is nothing to preserve.
178
178
  @mixin mg-list-unmarked {
179
+ // A list with no bullets has nothing to align its items with, so it opts
180
+ // out of the RTL item indent in _foundational.scss. Read only under
181
+ // [dir="rtl"]; no effect in LTR.
182
+ --mg-list-item-indent-rtl: 0;
183
+
179
184
  list-style: none;
180
185
  list-style-type: "";
181
186
  }
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Storybook: https://mangrove.undrr.org/
5
5
  * LLMs context: https://mangrove.undrr.org/llms.txt
6
- * Repository: https://github.com/unisdr/undrr-mangrove
7
- * Version: 2.0.0
6
+ * Repository: https://github.com/PreventionWeb/undrr-mangrove
7
+ * Version: 2.1.0
8
8
  *
9
9
  * ██╗ ██╗███╗ ██╗██████╗ ██████╗ ██████╗
10
10
  * ██║ ██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗