@undrr/undrr-mangrove 2.0.0 → 2.0.1

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 (175) 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 +2 -2
  17. package/components/Hero.js +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  57. package/css/style-all.css +110 -90
  58. package/css/style-all.css.map +1 -1
  59. package/css/style-delta.css +110 -90
  60. package/css/style-delta.css.map +1 -1
  61. package/css/style-gutenberg.css +9 -9
  62. package/css/style-irp.css +110 -90
  63. package/css/style-irp.css.map +1 -1
  64. package/css/style-mcr.css +110 -90
  65. package/css/style-mcr.css.map +1 -1
  66. package/css/style-preventionweb.css +110 -90
  67. package/css/style-preventionweb.css.map +1 -1
  68. package/css/style.css +110 -90
  69. package/css/style.css.map +1 -1
  70. package/docs/EDITORIAL-MANUAL.md +193 -0
  71. package/docs/llms-editorial-manual.txt +200 -0
  72. package/docs/llms-page-building.txt +1140 -0
  73. package/docs/llms-search-widget.txt +765 -0
  74. package/error-pages/401.html +1 -1
  75. package/error-pages/403.html +1 -1
  76. package/error-pages/404.html +1 -1
  77. package/error-pages/429.html +1 -1
  78. package/error-pages/500.html +1 -1
  79. package/error-pages/502.html +1 -1
  80. package/error-pages/503.html +1 -1
  81. package/error-pages/504.html +1 -1
  82. package/error-pages/5xx.html +1 -1
  83. package/error-pages/challenge.html +1 -1
  84. package/error-pages/managed-challenge.html +1 -1
  85. package/js/cite-this.js +352 -0
  86. package/package.json +6 -1
  87. package/scss/Atom/BaseTypography/Abbr/abbr.scss +1 -1
  88. package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -1
  89. package/scss/Atom/BaseTypography/Cite/cite.scss +1 -1
  90. package/scss/Atom/BaseTypography/Code/code.scss +1 -1
  91. package/scss/Atom/BaseTypography/Mark/mark.scss +1 -1
  92. package/scss/Atom/BaseTypography/Quotation/quotation.scss +1 -1
  93. package/scss/Atom/BaseTypography/Small/small.scss +1 -1
  94. package/scss/Atom/Colors/color.scss +1 -1
  95. package/scss/Atom/EmptyState/empty-state.scss +1 -1
  96. package/scss/Atom/Icons/_icon-definitions.scss +35 -3
  97. package/scss/Atom/Icons/icons.scss +1 -1
  98. package/scss/Atom/Images/AuthorImage/author-image.scss +1 -1
  99. package/scss/Atom/Images/Image/image.scss +1 -1
  100. package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +7 -2
  101. package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
  102. package/scss/Atom/Layout/Container/container.scss +1 -1
  103. package/scss/Atom/Layout/Grid/grid.scss +1 -1
  104. package/scss/Atom/Layout/Spacing/spacing.scss +1 -1
  105. package/scss/Atom/Logo/logo.scss +1 -1
  106. package/scss/Atom/Navigation/Breadcrumb/breadcrumb.scss +1 -1
  107. package/scss/Atom/Navigation/MenuItems/menu-items.scss +1 -1
  108. package/scss/Atom/ReachElement/Details/details.scss +1 -1
  109. package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
  110. package/scss/Atom/StatusLabel/status-label.scss +1 -1
  111. package/scss/Atom/Table/table.scss +1 -1
  112. package/scss/Atom/Tag/tag.scss +1 -1
  113. package/scss/Atom/Video/video.scss +1 -1
  114. package/scss/Components/Boilerplate/boilerplate.scss +1 -1
  115. package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -1
  116. package/scss/Components/Buttons/Chips/chips.scss +1 -1
  117. package/scss/Components/Buttons/CopyButton/copy-button.scss +1 -1
  118. package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
  119. package/scss/Components/Buttons/CtaButton/cta-button.scss +1 -1
  120. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +90 -1
  121. package/scss/Components/Cards/Card/card.scss +1 -1
  122. package/scss/Components/Cards/StatsCard/stats-card.scss +1 -1
  123. package/scss/Components/CiteThis/cite-this.scss +186 -0
  124. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +1 -1
  125. package/scss/Components/DataViz/Legend/legend.scss +1 -1
  126. package/scss/Components/ErrorPages/error-pages.scss +1 -1
  127. package/scss/Components/Footer/footer.scss +1 -1
  128. package/scss/Components/Forms/Checkbox/checkbox.scss +1 -1
  129. package/scss/Components/Forms/FormAction/form-action.scss +1 -1
  130. package/scss/Components/Forms/FormGroup/form-group.scss +1 -1
  131. package/scss/Components/Forms/InputFields/input-fields.scss +1 -1
  132. package/scss/Components/Forms/Radio/radio.scss +1 -1
  133. package/scss/Components/Forms/Range/range.scss +1 -1
  134. package/scss/Components/Forms/SegmentedControl/segmented-control.scss +1 -1
  135. package/scss/Components/Forms/Select/select.scss +1 -1
  136. package/scss/Components/Forms/TextInput/text-input.scss +1 -1
  137. package/scss/Components/Forms/Textarea/textarea.scss +1 -1
  138. package/scss/Components/Forms/_form-base.scss +1 -1
  139. package/scss/Components/Gallery/gallery.scss +1 -1
  140. package/scss/Components/Hero/hero.scss +1 -1
  141. package/scss/Components/HighlightBox/highlight-box.scss +1 -1
  142. package/scss/Components/MegaMenu/mega-menu.scss +1 -1
  143. package/scss/Components/MegaMenu/megamenu.scss +1 -1
  144. package/scss/Components/Navigation/Drawer/drawer.scss +1 -1
  145. package/scss/Components/Navigation/Tree/tree.scss +1 -1
  146. package/scss/Components/Notice/notice.scss +1 -1
  147. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +1 -1
  148. package/scss/Components/PageHeader/page-header.scss +1 -1
  149. package/scss/Components/Pager/pager.scss +1 -1
  150. package/scss/Components/PreviewAccess/preview-access.scss +1 -1
  151. package/scss/Components/ProgressBar/progress-bar.scss +215 -0
  152. package/scss/Components/QuoteHighlight/quote-highlight.scss +1 -1
  153. package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
  154. package/scss/Components/Snackbar/snackbar.scss +1 -1
  155. package/scss/Components/SyndicationSearchWidget/_deprecated-teaser-hide.scss +1 -1
  156. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +1 -1
  157. package/scss/Components/Tab/tab.scss +1 -1
  158. package/scss/Components/TableOfContents/table-of-contents.scss +1 -1
  159. package/scss/Components/TextCta/text-cta.scss +1 -1
  160. package/scss/Components/TextCta/textcta.scss +1 -1
  161. package/scss/Components/UserFeedback/user-feedback.scss +1 -1
  162. package/scss/Molecules/ImageCaption/image-caption.scss +17 -3
  163. package/scss/Molecules/SectionHeader/section-header.scss +1 -1
  164. package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
  165. package/scss/Patterns/HubHeader/hub-header.scss +1 -1
  166. package/scss/Patterns/_shared/pattern-demo.scss +1 -1
  167. package/scss/Utilities/EmbedContainer/embed-container.scss +1 -1
  168. package/scss/Utilities/FullWidth/full-width.scss +1 -1
  169. package/scss/Utilities/Loader/loader.scss +55 -12
  170. package/scss/Utilities/Normalize/normalize.scss +1 -1
  171. package/scss/Utilities/PagePatterns/page-patterns.scss +1 -1
  172. package/scss/Utilities/ShowMore/show-more.scss +1 -1
  173. package/scss/Utilities/SkipLink/skip-link.scss +1 -1
  174. package/scss/assets/scss/_components.scss +2 -0
  175. package/scss/assets/scss/_variables.scss +2 -2
@@ -1,39 +1,82 @@
1
1
  /**
2
2
  * Loader / Spinner
3
3
  *
4
- * Animated loading spinner indicator with brand-themed animation for asynchronous states.
4
+ * Animated loading spinner 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
+ // Under reduced motion the site-wide reset cuts every animation to 0.01ms
63
+ // and one iteration, which would freeze the spinner and make it look as if
64
+ // loading has stopped. A slow, steady rotation still says "working" without
65
+ // the speed. The !important is needed to outrank the reset's own
66
+ // !important, and is scoped to the loader.
67
+ @media (prefers-reduced-motion: reduce) {
68
+ animation-duration: calc(var(--mg-loader-duration) * 3) !important;
69
+ animation-iteration-count: infinite !important;
70
+ }
71
+
72
+ // Forced colours would paint every side of the border in one system colour,
73
+ // a full ring whose rotation cannot be seen. Opt out and use system colours
74
+ // for the arc and the track.
75
+ @media (forced-colors: active) {
76
+ border-color: GrayText;
77
+ border-top-color: CanvasText;
78
+ forced-color-adjust: none;
79
+ }
37
80
  }
38
81
 
39
82
  // * 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;
@@ -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";
@@ -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.0.1
8
8
  *
9
9
  * ██╗ ██╗███╗ ██╗██████╗ ██████╗ ██████╗
10
10
  * ██║ ██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗