@undrr/undrr-mangrove 2.0.0-alpha.2 → 2.0.0-alpha.4

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 (110) hide show
  1. package/README.md +4 -4
  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/CtaButton.js +2 -2
  7. package/components/EmbedContainer.js +2 -2
  8. package/components/Footer.js +2 -2
  9. package/components/FormAction.js +2 -2
  10. package/components/FormErrorSummary.js +2 -2
  11. package/components/FormGroup.js +2 -2
  12. package/components/FullWidth.js +2 -2
  13. package/components/Gallery.js +2 -2
  14. package/components/Hero.js +2 -2
  15. package/components/HighlightBox.js +2 -2
  16. package/components/HorizontalBookCard.js +2 -2
  17. package/components/HorizontalCard.js +2 -2
  18. package/components/IconCard.js +2 -2
  19. package/components/Loader.js +2 -2
  20. package/components/MegaMenu.js +2 -2
  21. package/components/PageHeader.js +2 -2
  22. package/components/Pager.js +2 -2
  23. package/components/QuoteHighlight.js +2 -2
  24. package/components/Radio.js +2 -2
  25. package/components/ScrollContainer.js +2 -2
  26. package/components/Select.js +2 -2
  27. package/components/ShareButtons.js +2 -2
  28. package/components/ShowMore.js +2 -2
  29. package/components/StatsCard.js +2 -2
  30. package/components/SyndicationSearchWidget.js +2 -2
  31. package/components/Tab.js +2 -2
  32. package/components/TextCta.js +2 -2
  33. package/components/TextInput.js +2 -2
  34. package/components/Textarea.js +2 -2
  35. package/components/UserFeedback.js +2 -2
  36. package/components/VerticalCard.js +2 -2
  37. package/components/hydrate.js +1 -1
  38. package/css/style-all.css +286 -42
  39. package/css/style-all.css.map +1 -1
  40. package/css/style-delta.css +286 -42
  41. package/css/style-delta.css.map +1 -1
  42. package/css/style-gutenberg.css +254 -13
  43. package/css/style-gutenberg.css.map +1 -1
  44. package/css/style-irp.css +286 -42
  45. package/css/style-irp.css.map +1 -1
  46. package/css/style-mcr.css +286 -42
  47. package/css/style-mcr.css.map +1 -1
  48. package/css/style-preventionweb.css +286 -42
  49. package/css/style-preventionweb.css.map +1 -1
  50. package/css/style.css +285 -41
  51. package/css/style.css.map +1 -1
  52. package/error-pages/401.html +1 -1
  53. package/error-pages/403.html +1 -1
  54. package/error-pages/404.html +1 -1
  55. package/error-pages/429.html +1 -1
  56. package/error-pages/500.html +1 -1
  57. package/error-pages/502.html +1 -1
  58. package/error-pages/503.html +1 -1
  59. package/error-pages/504.html +1 -1
  60. package/error-pages/5xx.html +1 -1
  61. package/error-pages/challenge.html +1 -1
  62. package/error-pages/managed-challenge.html +1 -1
  63. package/js/tabs.js +577 -401
  64. package/package.json +10 -10
  65. package/scss/Atom/BaseTypography/Code/code.scss +3 -3
  66. package/scss/Atom/EmptyState/empty-state.scss +117 -0
  67. package/scss/Atom/ReachElement/Details/details.scss +1 -1
  68. package/scss/Atom/StatusLabel/status-label.scss +64 -0
  69. package/scss/Atom/Tag/tag.scss +1 -8
  70. package/scss/Components/Boilerplate/boilerplate.scss +1 -2
  71. package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -8
  72. package/scss/Components/Buttons/Chips/chips.scss +7 -10
  73. package/scss/Components/Buttons/CtaButton/cta-button.scss +19 -22
  74. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +9 -13
  75. package/scss/Components/Cards/Card/card.scss +13 -13
  76. package/scss/Components/Cards/StatsCard/stats-card.scss +5 -14
  77. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +2 -10
  78. package/scss/Components/Footer/footer.scss +1 -8
  79. package/scss/Components/Forms/_form-base.scss +49 -37
  80. package/scss/Components/Gallery/gallery.scss +13 -16
  81. package/scss/Components/Hero/hero.scss +4 -19
  82. package/scss/Components/MegaMenu/mega-menu.scss +337 -22
  83. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +2 -10
  84. package/scss/Components/Pager/pager.scss +1 -2
  85. package/scss/Components/PreviewAccess/preview-access.scss +21 -29
  86. package/scss/Components/Snackbar/snackbar.scss +1 -1
  87. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +13 -15
  88. package/scss/Components/Tab/tab.scss +269 -123
  89. package/scss/Components/TextCta/text-cta.scss +1 -1
  90. package/scss/Components/UserFeedback/user-feedback.scss +2 -8
  91. package/scss/assets/fonts/noto-kufi-arabic/noto-kufi-arabic.scss +73 -3
  92. package/scss/assets/fonts/noto-sans-arabic/noto-sans-arabic.scss +79 -0
  93. package/scss/assets/scss/_components.scss +2 -0
  94. package/scss/assets/scss/_fonts.scss +158 -2
  95. package/scss/assets/scss/_foundational.scss +45 -30
  96. package/scss/assets/scss/_mixins.scss +53 -8
  97. package/scss/assets/scss/_theme-delta.scss +6 -63
  98. package/scss/assets/scss/_theme-irp.scss +6 -34
  99. package/scss/assets/scss/_theme-mcr.scss +7 -52
  100. package/scss/assets/scss/_theme-preventionweb.scss +6 -32
  101. package/scss/assets/scss/_tokens-data-viz.scss +300 -0
  102. package/scss/assets/scss/_tokens-tabs.scss +32 -0
  103. package/scss/assets/scss/_utility.scss +4 -6
  104. package/scss/assets/scss/_variables.scss +221 -300
  105. package/scss/assets/scss/generated/_tokens-delta.scss +248 -0
  106. package/scss/assets/scss/generated/_tokens-irp.scss +114 -0
  107. package/scss/assets/scss/generated/_tokens-mangrove.scss +607 -0
  108. package/scss/assets/scss/generated/_tokens-mcr.scss +135 -0
  109. package/scss/assets/scss/generated/_tokens-preventionweb.scss +101 -0
  110. package/scss/assets/fonts/dubai/dubai.scss +0 -9
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This is from the UNDRR Mangrove component library
3
3
  * https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
4
- * Version: 2.0.0-alpha.2
4
+ * Version: 2.0.0-alpha.4
5
5
  *
6
6
  * ██╗ ██╗███╗ ██╗██████╗ ██████╗ ██████╗
7
7
  * ██║ ██║████╗ ██║██╔══██╗██╔══██╗██╔══██╗
@@ -26,6 +26,19 @@
26
26
  */
27
27
  @use "sass:math";
28
28
  @use "sass:meta";
29
+ @import "./tokens-tabs";
30
+
31
+ // Data-visualisation palettes: categorical, sequential and Sendai target
32
+ // ramps. A distinct concern from brand tokens, sourced from the DLDTS design
33
+ // system. @import must precede rule blocks, hence its position here.
34
+ @import "./tokens-data-viz";
35
+
36
+ // Brand tokens. The palette, the spacing/type/width scales, the semantic
37
+ // tier and every component token a brand can restyle are generated from
38
+ // tokens/mangrove.yaml (the brand-neutral base) merged with tokens/undrr.yaml
39
+ // (UNDRR identity). Editing a value here would be overwritten; edit the YAML
40
+ // and run `yarn build:tokens`.
41
+ @import "./generated/tokens-mangrove";
29
42
 
30
43
  // --- Mangrove 2.0 upgrade guard (build-time) ---
31
44
  // Color and spacing tokens are now CSS custom properties. Assigning the old
@@ -36,14 +49,41 @@
36
49
  // See docs/RELEASE-2.0.md (breaking change #1). This fires only for consumer
37
50
  // overrides — Mangrove itself no longer defines these SCSS variables.
38
51
  @each $_legacy in "mg-color-interactive", "mg-color-interactive-active",
39
- "mg-color-button-background", "mg-color-button-background--hover",
40
- "mg-color-tag", "mg-color-form-check", "mg-color-form-focus",
41
- "mg-color-hero--secondary", "mg-spacing-150", "mg-spacing-300" {
52
+ "mg-color-button-background", "mg-color-button-background--hover",
53
+ "mg-border-color-button", "mg-color-tag", "mg-color-form-check",
54
+ "mg-color-form-focus",
55
+ "mg-color-hero", "mg-color-hero--secondary", "mg-spacing-150",
56
+ "mg-spacing-300"
57
+ {
42
58
  @if meta.variable-exists($_legacy) {
43
59
  @warn "Mangrove 2.0: `$#{$_legacy}` no longer has any effect — color and spacing tokens are CSS custom properties now. Move the override into a `.mg-theme-* { --#{$_legacy}: ...; }` block (or `:root`). See docs/RELEASE-2.0.md.";
44
60
  }
45
61
  }
46
62
 
63
+ // The same guard for the font-family variables removed by the role model
64
+ // (unisdr/undrr-mangrove#1098). Separate loop because each name maps to a
65
+ // different replacement role and the message has to say which.
66
+ // $mg-font-family is the one a consumer is most likely to have set: it carried
67
+ // 22 declarations before the migration.
68
+ @each $_legacy, $_role
69
+ in (
70
+ "mg-font-family": "text",
71
+ "mg-font-family-headings": "ui",
72
+ "mg-font-family-condensed": "ui",
73
+ "mg-font-family-icons": "",
74
+ "mg-font-family-arabic-headings": "heading",
75
+ "mg-font-family-arabic-body": "text"
76
+ )
77
+ {
78
+ @if meta.variable-exists($_legacy) {
79
+ @if $_role == "" {
80
+ @warn "Mangrove 2.0: `$#{$_legacy}` no longer exists and has no replacement — it had no stylesheet consumer, and icons.scss names the FontAwesome family directly. See docs/RELEASE-2.0.md.";
81
+ } @else {
82
+ @warn "Mangrove 2.0: `$#{$_legacy}` no longer has any effect — font families are role custom properties now. Move the override into a `.mg-theme-* { --mg-font-family-#{$_role}: ...; }` block (or `:root`). See docs/RELEASE-2.0.md.";
83
+ }
84
+ }
85
+ }
86
+
47
87
  // Root font-size anchor: fixed at the browser-standard 16px root (1rem = 16px),
48
88
  // used by mg-rem() to convert intended pixel values to rem at build time. The
49
89
  // legacy 10px root — the `!default` override and the style-*-legacy.scss
@@ -66,106 +106,11 @@ $img-path-Icon: "~/stories/assets/icons"; // BUILD-TIME ONLY
66
106
  $img-path-Iconback: "~/stories/assets/icons"; // BUILD-TIME ONLY
67
107
  $img-path-Iconfourback: "~/stories/assets/icons"; // BUILD-TIME ONLY
68
108
 
69
- // MG-COLORS BLUE SHADES (#004f91)
70
- :root {
71
- --mg-color-blue-50: 230 237 244;
72
- --mg-color-blue-100: 204 220 233;
73
- --mg-color-blue-200: 179 202 222;
74
- --mg-color-blue-300: 153 185 211;
75
- --mg-color-blue-400: 128 167 200;
76
- --mg-color-blue-500: 102 149 189;
77
- --mg-color-blue-600: 77 132 178;
78
- --mg-color-blue-700: 51 114 167;
79
- --mg-color-blue-800: 26 97 156;
80
- --mg-color-blue-900: 0 79 145;
81
- }
82
-
83
- // MG-COLORS ORANGE SHADES (#eb752a)
84
- :root {
85
- --mg-color-orange-50: 253 241 234;
86
- --mg-color-orange-100: 251 227 212;
87
- --mg-color-orange-200: 249 214 191;
88
- --mg-color-orange-300: 247 200 170;
89
- --mg-color-orange-400: 245 186 149;
90
- --mg-color-orange-500: 243 172 127;
91
- --mg-color-orange-600: 241 158 106;
92
- --mg-color-orange-700: 239 145 85;
93
- --mg-color-orange-800: 237 131 63;
94
- --mg-color-orange-900: 235 117 42;
95
- }
96
-
97
- // MG-COLORS RED SHADES (#c10920)
98
- :root {
99
- --mg-color-red-50: 249 230 233;
100
- --mg-color-red-100: 243 206 210;
101
- --mg-color-red-200: 236 181 188;
102
- --mg-color-red-300: 230 157 166;
103
- --mg-color-red-400: 224 132 144;
104
- --mg-color-red-500: 218 107 121;
105
- --mg-color-red-600: 212 83 99;
106
- --mg-color-red-700: 205 58 77;
107
- --mg-color-red-800: 199 34 54;
108
- --mg-color-red-900: 193 9 32;
109
- }
110
-
111
- // MG-COLORS NEUTRAL
112
- :root {
113
- --mg-color-neutral-0: 255 255 255;
114
- --mg-color-neutral-25: 242 242 242;
115
- --mg-color-neutral-50: 230 230 230;
116
- --mg-color-neutral-100: 204 204 204;
117
- --mg-color-neutral-200: 179 179 179;
118
- --mg-color-neutral-300: 153 153 153;
119
- --mg-color-neutral-400: 128 128 128;
120
- --mg-color-neutral-500: 102 102 102;
121
- --mg-color-neutral-600: 77 77 77;
122
- --mg-color-neutral-700: 51 51 51;
123
- --mg-color-neutral-800: 26 26 26;
124
- --mg-color-neutral-900: 0 0 0;
125
- }
126
-
127
- // MG-COLORS ACCENT
128
109
  :root {
129
- --mg-color-accent-100: 244 228 150;
130
- --mg-color-accent-200: 211 206 169;
131
- --mg-color-accent-300: 253 246 217;
132
- --mg-color-accent-400: 10 105 105;
110
+ @include mg-tokens-mangrove;
111
+ @include mg-tokens-tabs;
133
112
  }
134
113
 
135
- /**
136
- * Spacing scale — CSS custom properties emitted to :root.
137
- */
138
- :root {
139
- --mg-spacing-0: 0;
140
- --mg-spacing-25: #{mg-rem(2.5)};
141
- --mg-spacing-50: #{mg-rem(5)};
142
- --mg-spacing-75: #{mg-rem(7.5)};
143
- --mg-spacing-100: #{mg-rem(10)};
144
- --mg-spacing-150: #{mg-rem(15)};
145
- --mg-spacing-175: #{mg-rem(18)};
146
- --mg-spacing-200: #{mg-rem(20)};
147
- --mg-spacing-250: #{mg-rem(24)};
148
- --mg-spacing-300: #{mg-rem(30)};
149
- --mg-spacing-350: #{mg-rem(35)};
150
- --mg-spacing-400: #{mg-rem(50)};
151
- --mg-spacing-500: #{mg-rem(60)};
152
- --mg-spacing-600: #{mg-rem(80)};
153
- --mg-spacing-800: #{mg-rem(100)};
154
- --mg-spacing-1000: #{mg-rem(400)};
155
- }
156
-
157
- $mg-font-size-100: mg-rem(10);
158
- $mg-font-size-150: mg-rem(11.25);
159
- $mg-font-size-200: mg-rem(12.5);
160
- $mg-font-size-250: mg-rem(14);
161
- $mg-font-size-300: mg-rem(16); // regular body text
162
- $mg-font-size-400: mg-rem(18);
163
- $mg-font-size-500: mg-rem(23);
164
- $mg-font-size-600: mg-rem(32);
165
- $mg-font-size-800: mg-rem(36);
166
- $mg-font-size-900: mg-rem(40);
167
- $mg-font-size-1000: mg-rem(48);
168
- $mg-font-size-1100: mg-rem(64);
169
114
  $mg-font-body: $mg-font-size-300;
170
115
  $mg-font-tag: $mg-font-size-250 !default;
171
116
  $mg-font-line-height-500: 1.25em;
@@ -201,17 +146,74 @@ $mg-font-line-height-700: 1.5em;
201
146
  }
202
147
  }
203
148
 
204
- $mg-font-family: "Roboto", sans-serif;
205
- $mg-font-family-condensed: "Roboto Condensed", sans-serif;
206
- $mg-font-family-headings: $mg-font-family-condensed !default;
207
- $mg-font-family-icons: "fontawesome";
149
+ // --- Font faces ---
150
+ // A font stack, rendered for a custom property value with its quoting intact.
151
+
152
+ // Plain interpolation of a Sass list strips the quotes from its quoted
153
+ // members, and a custom property value is parsed as a token stream rather than
154
+ // as a font-family. An override such as
155
+ // `$mg-font-face-sans: "Frutiger 55 Roman", sans-serif` would emit
156
+ // `Frutiger 55 Roman`; `55` is not a valid custom-ident, so the declaration is
157
+ // invalid at computed-value time, the role is never defined, and every element
158
+ // referencing it falls back to the browser's default serif. Frutiger, Univers
159
+ // and Helvetica Neue LT Std all name weights numerically, so this is the
160
+ // common case for the licensed brand faces the `!default` escape hatch exists
161
+ // to admit. `meta.inspect()` renders the list the way Sass wrote it.
162
+
163
+ // It lives here, and _fonts.scss calls it rather than importing `sass:meta`
164
+ // itself: both files are pulled into one scope by the legacy `@import` chain,
165
+ // and two `@use "sass:meta"` rules in that scope collide.
166
+ // See unisdr/undrr-mangrove#1098.
167
+ @function mg-font-stack($stack) {
168
+ @return meta.inspect($stack);
169
+ }
170
+
171
+ // Faces name what fonts exist. Roles (--mg-font-family-text / -heading /
172
+ // -display / -ui / -code) name the reader's task and are mapped onto these
173
+ // faces per script in _fonts.scss. No component stylesheet may name a
174
+ // face: it references a role. See unisdr/undrr-mangrove#1098.
175
+
176
+ // Faces keep `!default` so a consumer compiling Mangrove from source can swap
177
+ // in a licensed brand face before the import. That is the only way to introduce
178
+ // a face Mangrove does not ship: a runtime role override
179
+ // (`.mg-theme-* { --mg-font-family-ui: ...; }`) can only re-point a role among
180
+ // the faces _fonts.scss already loads @font-face rules for.
181
+ // These variables live outside the brand mixin, so a Sass override applies to
182
+ // every brand in the combined style-all.css. Per-brand faces need the runtime
183
+ // override instead.
184
+ // Quote any family name that is not a plain CSS identifier — anything with a
185
+ // space, a digit-leading word or punctuation. The `:root` block below
186
+ // round-trips these through `mg-font-stack()` so the quotes survive into the
187
+ // emitted custom property; see the note on that function.
188
+ $mg-font-face-sans: "Roboto", sans-serif !default;
189
+ $mg-font-face-sans-condensed: "Roboto Condensed", sans-serif !default;
190
+ $mg-font-face-mono: ui-monospace, "SFMono-Regular", "Consolas",
191
+ "Liberation Mono", "Menlo", monospace !default;
208
192
 
209
193
  // Arabic fonts
210
- $mg-font-family-arabic-headings: "Noto Kufi Arabic", sans-serif;
211
- $mg-font-family-arabic-body: "Dubai", sans-serif;
212
-
213
- // $mg-font-family-icons: "mangrove-icon-set";
214
- // Not yet activated as we are using the FontAwesome namespace
194
+ // Noto Kufi Arabic for headings, Noto Sans Arabic for body. Decided in
195
+ // unisdr/undrr-mangrove#1089, which replaced Dubai across every brand.
196
+
197
+ // Dubai was inherited from OCHA, but the inheritance was weaker than it looked
198
+ // and had gone out of date on both halves. Dubai was OCHA's ALTERNATIVE
199
+ // subtheme pairing (body only, never headings, Regular only), not their base
200
+ // theme, which used Noto Kufi Arabic. And on 2026-05-28 OCHA's brand guidance
201
+ // moved to Almarai for display and Noto Sans Arabic for body.
202
+
203
+ // Both Noto families are SIL Open Font License 1.1.
204
+
205
+ // This is two Arabic families where 2.0.0-alpha.3 had one. Kufi is a display
206
+ // style -- angular, high contrast, architectural -- so it earns its place in
207
+ // headings and is the wrong choice at body size; Noto Sans Arabic carries the
208
+ // running text and shares Noto Sans' proportions. The second download is
209
+ // subset by unicode-range, so a page pays for the scripts it actually renders.
210
+
211
+ // Only Regular and Bold exist upstream for both families, so Arabic has a
212
+ // 400/700 binary where Latin has a ladder. Nothing is faux bolded: the 600
213
+ // used in _foundational.scss resolves UP to the real Bold. The cost is a lost
214
+ // tier of emphasis, not a rendering defect.
215
+ $mg-font-face-arabic-display: "Noto Kufi Arabic", sans-serif !default;
216
+ $mg-font-face-arabic-sans: "Noto Sans Arabic", sans-serif !default;
215
217
 
216
218
  // BUILD-TIME ONLY — breakpoints cannot be CSS custom properties.
217
219
  // @media queries require static values resolved at compile time; var() is invalid there.
@@ -227,203 +229,122 @@ $mg-breakpoint-desktop-wide: 1440px;
227
229
  // All sub-brands use true. To disable, set to false before @use.
228
230
  $mg-tabs-border-bottom: true !default;
229
231
 
232
+ // Tokens deliberately NOT in the token sources.
233
+ // - The font roles are bound to faces here because every supported build path
234
+ // reaches _variables.scss, including the per-component Sass recipe in
235
+ // SassIntegration.mdx. A role reference with no definition is invalid at
236
+ // computed-value time, so the whole declaration is dropped and the element
237
+ // loses its family. Component stylesheets carry no var() fallbacks, so this
238
+ // block is what makes that safe. Script routing stays in _fonts.scss, which
239
+ // that recipe imports for the @font-face blocks anyway.
240
+ // - The Sendai ramp and the legacy one-off colours predate the naming
241
+ // convention, carry their own prefixes, and no theme overrides them.
242
+ // - The status-label and empty-state blocks are component tokens with no
243
+ // brand overrides; they read the generated tokens at runtime.
230
244
  :root {
231
- --mg-color-tabbar-background: rgb(var(--mg-color-blue-50));
232
- --mg-color-tab-background: rgb(var(--mg-color-blue-200));
233
- --mg-color-tab-background--inactive: rgb(var(--mg-color-blue-50));
234
- --mg-color-tab-border: rgb(var(--mg-color-neutral-700));
235
- --mg-color-tab-border--hover: rgb(var(--mg-color-neutral-900));
236
- --mg-color-tab-border--active: rgb(var(--mg-color-blue-800));
237
- --mg-color-tab-background--hover: rgb(var(--mg-color-blue-800));
238
- --mg-radius-tab: 0;
239
- --mg-padding-tab: var(--mg-spacing-75) var(--mg-spacing-150);
240
- --mg-color-text-tab: rgb(var(--mg-color-neutral-700));
241
- --mg-color-text-tab--hover: rgb(var(--mg-color-neutral-0));
242
- --mg-color-text-tab-active: rgb(var(--mg-color-neutral-700));
243
- --mg-color-text-tab-no-results: rgb(var(--mg-color-neutral-500));
244
- --mg-color-tab-section-background: rgb(var(--mg-color-neutral-0));
245
- --mg-padding-tab-section: var(--mg-spacing-100) var(--mg-spacing-0);
246
- --mg-radius-tab-section: 0;
247
- --mg-box-shadow-tab-section: none;
248
- }
249
-
250
- // Z-index layers: use these named tokens for global stacking contexts
251
- // (fixed, sticky, or portaled elements). One token per UI concept — backdrops
252
- // and sub-layers use $token - 1 / $token + 1 arithmetic within the component
253
- // SCSS rather than separate variables. Local stacking within a component's own
254
- // isolated context uses raw values with an explanatory comment.
255
- // Pick the nearest existing layer; open a GitHub discussion before adding one.
256
-
257
- :root {
258
- // Interactive
259
- --mg-color-interactive: var(--mg-color-blue-900);
260
- --mg-color-interactive-active: var(--mg-color-blue-700);
261
-
262
- // Text + aliases
263
- --mg-color-text: var(--mg-color-neutral-800);
264
- --mg-color-black: var(--mg-color-neutral-800);
265
- --mg-color-white: var(--mg-color-neutral-0);
266
-
267
- // Tags
268
- --mg-color-tag: var(--mg-color-interactive);
269
- --mg-color-tag--hover: var(--mg-color-interactive-active);
270
- --mg-color-tag-secondary: var(--mg-color-neutral-500);
271
- --mg-color-tag-secondary--hover: var(--mg-color-neutral-600);
272
- --mg-color-tag-accent: var(--mg-color-orange-900);
273
- --mg-color-tag-accent--hover: var(--mg-color-orange-800);
274
-
275
- // Buttons
276
- --mg-color-button: var(--mg-color-neutral-0);
277
- --mg-color-button--hover: var(--mg-color-neutral-0);
278
- --mg-color-button-background: var(--mg-color-interactive);
279
- --mg-color-button-background--hover: var(--mg-color-interactive-active);
280
- --mg-color-button-secondary-background: var(--mg-color-blue-800);
281
- --mg-color-button-secondary-background--hover: var(--mg-color-blue-700);
282
- --mg-color-button-outline-primary: var(--mg-color-interactive);
283
- --mg-color-button-outline-primary--hover: var(--mg-color-interactive-active);
284
- --mg-color-button-outline-secondary: var(--mg-color-button-secondary-background);
285
- --mg-color-button-outline-secondary--hover: var(--mg-color-button-secondary-background--hover);
286
- --mg-color-text-button: var(--mg-color-neutral-0);
287
- --mg-border-color-button: var(--mg-color-text-button);
288
-
289
- // Form
290
- --mg-color-form-check: var(--mg-color-interactive);
291
- --mg-color-form-check--hover: var(--mg-color-interactive-active);
292
- --mg-color-form-check--checked: var(--mg-color-interactive);
293
- --mg-color-form-focus: var(--mg-color-interactive);
294
-
295
- // Focus ring
296
- --mg-color-focus-ring: var(--mg-color-interactive);
297
-
298
- // Brand hierarchy
299
- --mg-color-secondary: var(--mg-color-orange-800);
300
- --mg-color-tertiary: var(--mg-color-neutral-900);
301
- --mg-color-quaternary: var(--mg-color-red-800);
302
-
303
- // Hero
304
- --mg-color-hero: var(--mg-color-interactive);
305
- --mg-color-hero--secondary: var(--mg-color-secondary);
306
- --mg-color-hero--tertiary: var(--mg-color-tertiary);
307
- --mg-color-hero--quaternary: var(--mg-color-quaternary);
308
- --mg-color-hero-title: var(--mg-color-neutral-0);
309
- --mg-color-hero-button-secondary-background: rgb(var(--mg-color-neutral-0) / 0.9);
310
- --mg-color-hero-button-secondary-color: var(--mg-color-hero);
311
- --mg-border-color-hero-button-secondary: var(--mg-color-neutral-0);
312
-
313
- // Mega menu
314
- --mg-color-mega-content-bg: var(--mg-color-button);
315
-
316
- // Modal
317
- --mg-color-modal-scrim: rgb(var(--mg-color-neutral-900) / 0.85);
245
+ // Font roles. Faces above say what fonts exist; roles say what job the type
246
+ // is doing. Latin: text and heading are both Roboto, display and ui are both
247
+ // Roboto Condensed, so this indirection renders identically to the faces it
248
+ // replaced. _fonts.scss re-points these per script.
249
+ // See unisdr/undrr-mangrove#1098.
250
+ --mg-font-family-text: #{mg-font-stack($mg-font-face-sans)};
251
+ --mg-font-family-heading: #{mg-font-stack($mg-font-face-sans)};
252
+ --mg-font-family-display: #{mg-font-stack($mg-font-face-sans-condensed)};
253
+ --mg-font-family-ui: #{mg-font-stack($mg-font-face-sans-condensed)};
254
+ --mg-font-family-code: #{mg-font-stack($mg-font-face-mono)};
318
255
 
319
256
  // Legacy one-off colors (hardcoded — no palette backing)
320
- --mg-color-green: #008484;
321
- --mg-color-green-light: #90ee90;
322
- --mg-color-green-dark: #006400;
323
- --mg-color-yellow: #ff0;
324
- --mg-color-yellow-light: lightyellow;
325
- --mg-color-yellow-dark: #d6d624;
326
- --mg-color-azure: #f0ffff;
327
- --mg-color-azure-dark: #d4e3e3;
328
- --mg-color-azure-light: #f0f8f8;
329
- --mg-color-ebony-clay: #3d4242;
330
-
331
- // Sendai Framework
332
- --sendai-red-400: #d45363;
333
- --sendai-red-600: #cd3a4d;
334
- --sendai-red-800: #c72236;
335
- --sendai-red-900: #c10920;
336
- --sendai-red: var(--sendai-red-900);
337
- --sendai-orange-400: #f19e6a;
338
- --sendai-orange-600: #ef9155;
339
- --sendai-orange-800: #ed833f;
340
- --sendai-orange-900: #eb752a;
341
- --sendai-orange: var(--sendai-orange-900);
342
- --sendai-purple-400: #b669ab;
343
- --sendai-purple-600: #ab549f;
344
- --sendai-purple-800: #a13e93;
345
- --sendai-purple-900: #962987;
346
- --sendai-purple: var(--sendai-purple-900);
257
+ --mg-color-green: #008484;
258
+ --mg-color-green-light: #90ee90;
259
+ --mg-color-green-dark: #006400;
260
+ --mg-color-yellow: #ff0;
261
+ --mg-color-yellow-light: lightyellow;
262
+ --mg-color-yellow-dark: #d6d624;
263
+ --mg-color-azure: #f0ffff;
264
+ --mg-color-azure-dark: #d4e3e3;
265
+ --mg-color-azure-light: #f0f8f8;
266
+ --mg-color-ebony-clay: #3d4242;
267
+
268
+ /* Sendai Framework accents -- DEPRECATED, removal in 2.1.
269
+ * Named by colour, not by Sendai meaning: --sendai-red-900 is byte-identical
270
+ * to --mg-color-red-900, three of the seven framework targets have no
271
+ * counterpart here, and --sendai-turquoise sits 16.0 dE00 from Target D as
272
+ * the framework's own design system defines it. For target semantics use
273
+ * --mg-sendai-target-a through -g. These keep working until removal. */
274
+ --sendai-red-400: #d45363;
275
+ --sendai-red-600: #cd3a4d;
276
+ --sendai-red-800: #c72236;
277
+ --sendai-red-900: #c10920;
278
+ --sendai-red: var(--sendai-red-900);
279
+ --sendai-orange-400: #f19e6a;
280
+ --sendai-orange-600: #ef9155;
281
+ --sendai-orange-800: #ed833f;
282
+ --sendai-orange-900: #eb752a;
283
+ --sendai-orange: var(--sendai-orange-900);
284
+ --sendai-purple-400: #b669ab;
285
+ --sendai-purple-600: #ab549f;
286
+ --sendai-purple-800: #a13e93;
287
+ --sendai-purple-900: #962987;
288
+ --sendai-purple: var(--sendai-purple-900);
347
289
  --sendai-turquoise-400: #4dc7c6;
348
290
  --sendai-turquoise-600: #33bfbe;
349
291
  --sendai-turquoise-800: #1ab7b6;
350
292
  --sendai-turquoise-900: #00afae;
351
- --sendai-turquoise: var(--sendai-turquoise-900);
352
-
353
- // UNDRR
354
- --undrr-color-corporate-blue: var(--mg-color-blue-900);
355
- }
356
-
357
- :root {
358
- // Container
359
- --mg-container-spacer: var(--mg-spacing-150);
360
-
361
- // Tag
362
- --mg-radius-tag: var(--mg-spacing-0);
363
-
364
- // Button
365
- --mg-radius-button: var(--mg-spacing-50);
366
- --mg-border-width-button: 1px;
367
- --mg-padding-button: var(--mg-spacing-100) var(--mg-spacing-150);
368
- --mg-font-size-button: #{$mg-font-size-250};
369
-
370
- // Form
371
- --mg-radius-form-input: var(--mg-spacing-50);
372
-
373
- // Focus ring
374
- --mg-focus-ring-width: 2px;
375
- --mg-focus-ring-offset: 2px;
376
- --mg-focus-ring-radius: 2px;
377
-
378
- // Modernisation: shared surface, elevation, and motion semantics
379
- --mg-surface-raised: rgb(var(--mg-color-neutral-0));
380
- --mg-shadow-raised: inset 0 0 0 1px rgb(var(--mg-color-neutral-600) / 0.24);
381
- --mg-shadow-raised-hover: inset 0 0 0 2px rgb(var(--mg-color-interactive));
382
- --mg-motion-duration-fast: 160ms;
383
- --mg-motion-duration-medium: 300ms;
384
- --mg-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
385
-
386
- // Card
387
- --mg-card-background: var(--mg-surface-raised);
388
- --mg-card-padding: var(--mg-spacing-150);
389
- --mg-card-border-radius: var(--mg-spacing-50);
390
- --mg-card-shadow: var(--mg-shadow-raised);
391
- --mg-card-shadow-hover: var(--mg-shadow-raised-hover);
392
- --mg-card-icon-badge-radius: 20%;
393
-
394
- // CTA
395
- --mg-cta-padding: var(--mg-spacing-400);
396
-
397
- // Author image
398
- --mg-author-image-radius: 50%;
399
-
400
- // Hero
401
- --mg-opacity-hero: 0.85;
402
- --mg-spacing-hero-overlay: 0;
403
- --mg-hero-overlay-max-width: #{mg-rem(600)};
404
- --mg-hero-overlay-padding: var(--mg-spacing-300);
405
- --mg-hero-overlay-radius: var(--mg-spacing-50);
406
- --mg-hero-overlay-shadow: 0 18px 55px rgb(var(--mg-color-neutral-900) / 0.22);
407
- --mg-hero-gradient-start-opacity: 0.98;
408
- --mg-hero-gradient-middle-opacity: 0.82;
409
- --mg-hero-gradient-end-opacity: 0.08;
410
-
411
- // Widths (build-time resolved)
412
- --mg-width-150: #{mg-rem(150)};
413
- --mg-width-300: #{mg-rem(300)};
414
- --mg-width-400: #{mg-rem(400)};
415
- --mg-width-600: #{mg-rem(600)};
416
-
417
- // Z-index (named stacking contexts)
418
- --mg-z-index-behind: -1;
419
- --mg-z-index-nav: 10;
420
- --mg-z-index-sticky: 11;
421
- --mg-z-index-nav-toggle: 14;
422
- --mg-z-index-header: 22;
423
- --mg-z-index-drawer: 2000;
424
- --mg-z-index-dropdown: 2500;
425
- --mg-z-index-modal: 5000;
426
- --mg-z-index-toast: 5500;
293
+ --sendai-turquoise: var(--sendai-turquoise-900);
294
+
295
+ // Status label
296
+ // Geometry and the four status colours come from the DELTA design system
297
+ // board "Status Labels for Records and Events" (14px dot, 8px gap, 16px
298
+ // label text). The colour-to-label mapping was read off the board's own
299
+ // swatch/label pairs, which are vertically centred on each other.
300
+ // -
301
+ // The dots are decoration, not the message — the label text always names the
302
+ // status, so SC 1.4.1 does not depend on them. They still need a boundary:
303
+ // the pale swatches sit at 1.3-2.2:1 against a white page, so a neutral-500
304
+ // ring (5.74:1 on white) gives every indicator a visible edge. Set
305
+ // --mg-status-label-indicator-border-width to 0 to drop it.
306
+ --mg-status-label-gap: var(--mg-spacing-75);
307
+ --mg-status-label-font-size: #{$mg-font-size-300};
308
+ --mg-status-label-color: rgb(var(--mg-color-text));
309
+ --mg-status-label-indicator-size: #{mg-rem(14)};
310
+ --mg-status-label-indicator-radius: 50%;
311
+ --mg-status-label-indicator-border-width: 1px;
312
+ --mg-status-label-indicator-border-color: rgb(var(--mg-color-neutral-500));
313
+ --mg-status-label-indicator: rgb(var(--mg-color-neutral-100));
314
+ --mg-status-label-indicator--draft: rgb(var(--mg-color-accent-100));
315
+ --mg-status-label-indicator--waiting-information: rgb(
316
+ var(--mg-color-accent-600)
317
+ );
318
+ --mg-status-label-indicator--waiting-validation: rgb(
319
+ var(--mg-color-accent-500)
320
+ );
321
+ --mg-status-label-indicator--published: rgb(var(--mg-color-accent-400));
322
+
323
+ // Empty state
324
+ // Layout follows the DELTA "Empty State" boards (centred glyph above a short
325
+ // message, compact variant for indicator tiles and chart wells). The boards
326
+ // set the "No data" text in black at 25% opacity, which is 1.6:1 — that one
327
+ // value is deliberately not reproduced; neutral-500 is the nearest Mangrove
328
+ // token that clears 4.5:1.
329
+ --mg-empty-state-gap: var(--mg-spacing-100);
330
+ --mg-empty-state-padding: var(--mg-spacing-300) var(--mg-spacing-150);
331
+ --mg-empty-state-max-inline-size: #{mg-rem(440)};
332
+ --mg-empty-state-title-font-size: #{$mg-font-size-400};
333
+ --mg-empty-state-title-color: rgb(var(--mg-color-text));
334
+ --mg-empty-state-text-font-size: #{$mg-font-size-300};
335
+ --mg-empty-state-text-color: rgb(var(--mg-color-neutral-500));
336
+ --mg-empty-state-media-size: #{mg-rem(56)};
337
+
338
+ // DELTA draws the glyph at #d9d9d9 (1.5:1). The glyph is decorative and
339
+ // always sits above the message, so SC 1.4.11 exempts it — neutral-400 is
340
+ // used anyway so it clears 3:1 (3.96:1) and stays legible on a tinted panel.
341
+ --mg-empty-state-media-color: rgb(var(--mg-color-neutral-400));
342
+ --mg-empty-state-actions-gap: var(--mg-spacing-100);
343
+ --mg-empty-state-panel-background: rgb(var(--mg-color-neutral-25));
344
+ --mg-empty-state-panel-radius: var(--mg-card-border-radius);
345
+ --mg-empty-state-compact-padding: var(--mg-spacing-150);
346
+ --mg-empty-state-compact-media-size: #{mg-rem(34)};
347
+ --mg-empty-state-compact-font-size: #{$mg-font-size-250};
427
348
  }
428
349
 
429
350
  // Header height