@undrr/undrr-mangrove 1.8.2 → 2.0.0-alpha.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 (139) hide show
  1. package/components/BookCard.js +2 -2
  2. package/components/BookCard.js.LICENSE.txt +2 -2
  3. package/components/Breadcrumbs.js +3 -2
  4. package/components/Checkbox.js +3 -2
  5. package/components/Chips.js +3 -2
  6. package/components/CtaButton.js +3 -2
  7. package/components/EmbedContainer.js +3 -2
  8. package/components/Footer.js +2 -2
  9. package/components/Footer.js.LICENSE.txt +1 -1
  10. package/components/FormErrorSummary.js +3 -2
  11. package/components/FormGroup.js +3 -2
  12. package/components/FullWidth.js +3 -2
  13. package/components/Gallery.js +2 -2
  14. package/components/Gallery.js.LICENSE.txt +1 -1
  15. package/components/Hero.js +2 -2
  16. package/components/Hero.js.LICENSE.txt +1 -1
  17. package/components/HighlightBox.js +3 -2
  18. package/components/HorizontalBookCard.js +2 -2
  19. package/components/HorizontalBookCard.js.LICENSE.txt +2 -2
  20. package/components/HorizontalCard.js +2 -2
  21. package/components/HorizontalCard.js.LICENSE.txt +2 -2
  22. package/components/IconCard.js +2 -2
  23. package/components/IconCard.js.LICENSE.txt +2 -2
  24. package/components/Loader.js +3 -2
  25. package/components/MegaMenu.js +2 -2
  26. package/components/MegaMenu.js.LICENSE.txt +1 -1
  27. package/components/PageHeader.js +3 -2
  28. package/components/Pager.js +2 -2
  29. package/components/Pager.js.LICENSE.txt +1 -1
  30. package/components/QuoteHighlight.js +3 -2
  31. package/components/Radio.js +3 -2
  32. package/components/ScrollContainer.js +3 -2
  33. package/components/Select.js +3 -2
  34. package/components/ShareButtons.js +2 -2
  35. package/components/ShareButtons.js.LICENSE.txt +1 -1
  36. package/components/ShowMore.js +3 -2
  37. package/components/StatsCard.js +2 -2
  38. package/components/StatsCard.js.LICENSE.txt +11 -1
  39. package/components/SyndicationSearchWidget.js +2 -2
  40. package/components/SyndicationSearchWidget.js.LICENSE.txt +1 -1
  41. package/components/Tab.js +3 -2
  42. package/components/TextCta.js +2 -2
  43. package/components/TextCta.js.LICENSE.txt +11 -1
  44. package/components/TextInput.js +3 -2
  45. package/components/Textarea.js +3 -2
  46. package/components/VerticalCard.js +2 -2
  47. package/components/VerticalCard.js.LICENSE.txt +2 -2
  48. package/components/hydrate.js +1 -1
  49. package/css/style-all.css +384 -0
  50. package/css/style-all.css.map +1 -0
  51. package/css/style-delta.css +81 -168
  52. package/css/style-delta.css.map +1 -1
  53. package/css/style-gutenberg.css +14 -85
  54. package/css/style-gutenberg.css.map +1 -1
  55. package/css/style-irp.css +81 -158
  56. package/css/style-irp.css.map +1 -1
  57. package/css/style-mcr.css +81 -158
  58. package/css/style-mcr.css.map +1 -1
  59. package/css/style-preventionweb.css +81 -158
  60. package/css/style-preventionweb.css.map +1 -1
  61. package/css/style.css +79 -150
  62. package/css/style.css.map +1 -1
  63. package/package.json +1 -1
  64. package/scss/Atom/BaseTypography/Abbr/abbr.scss +1 -1
  65. package/scss/Atom/BaseTypography/Code/code.scss +34 -34
  66. package/scss/Atom/BaseTypography/Mark/mark.scss +2 -2
  67. package/scss/Atom/Images/AuthorImage/author-image.scss +8 -8
  68. package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +9 -9
  69. package/scss/Atom/Layout/Container/container.scss +2 -4
  70. package/scss/Atom/Layout/Grid/grid.scss +15 -15
  71. package/scss/Atom/Navigation/MenuItems/menu-items.scss +3 -3
  72. package/scss/Atom/ReachElement/Details/details.scss +7 -7
  73. package/scss/Atom/Table/table.scss +8 -8
  74. package/scss/Atom/Tag/tag.scss +32 -32
  75. package/scss/Components/Boilerplate/boilerplate.scss +7 -7
  76. package/scss/Components/Breadcrumbs/breadcrumbs.scss +9 -9
  77. package/scss/Components/Buttons/Chips/chips.scss +8 -8
  78. package/scss/Components/Buttons/CtaButton/cta-button.scss +43 -16
  79. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +16 -16
  80. package/scss/Components/Cards/Card/card.scss +44 -44
  81. package/scss/Components/Cards/StatsCard/stats-card.scss +32 -32
  82. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +27 -27
  83. package/scss/Components/ErrorPages/error-pages.scss +7 -7
  84. package/scss/Components/Footer/footer.scss +12 -12
  85. package/scss/Components/Forms/FormGroup/form-group.scss +3 -3
  86. package/scss/Components/Forms/Select/select.scss +1 -1
  87. package/scss/Components/Forms/TextInput/text-input.scss +1 -1
  88. package/scss/Components/Forms/_form-base.scss +54 -54
  89. package/scss/Components/Gallery/gallery.scss +69 -69
  90. package/scss/Components/Hero/hero.scss +52 -52
  91. package/scss/Components/HighlightBox/highlight-box.scss +3 -3
  92. package/scss/Components/MegaMenu/mega-menu.scss +70 -70
  93. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +30 -30
  94. package/scss/Components/PageHeader/page-header.scss +7 -7
  95. package/scss/Components/Pager/pager.scss +43 -43
  96. package/scss/Components/Pagination/pagination.scss +2 -2
  97. package/scss/Components/PreviewAccess/preview-access.scss +35 -35
  98. package/scss/Components/QuoteHighlight/quote-highlight.scss +32 -32
  99. package/scss/Components/ScrollContainer/scroll-container.scss +16 -16
  100. package/scss/Components/Snackbar/snackbar.scss +20 -24
  101. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +135 -135
  102. package/scss/Components/Tab/tab.scss +34 -34
  103. package/scss/Components/TableOfContents/table-of-contents.scss +6 -6
  104. package/scss/Components/TextCta/text-cta.scss +21 -21
  105. package/scss/Molecules/ImageCaption/image-caption.scss +16 -16
  106. package/scss/Molecules/SectionHeader/section-header.scss +1 -1
  107. package/scss/Utilities/FullWidth/full-width.scss +1 -1
  108. package/scss/Utilities/Loader/loader.scss +4 -4
  109. package/scss/assets/scss/_components.scss +0 -1
  110. package/scss/assets/scss/_foundational.scss +20 -25
  111. package/scss/assets/scss/_mixins.scss +1 -1
  112. package/scss/assets/scss/_theme-delta.scss +68 -0
  113. package/scss/assets/scss/_theme-irp.scss +39 -0
  114. package/scss/assets/scss/_theme-mcr.scss +56 -0
  115. package/scss/assets/scss/_theme-preventionweb.scss +37 -0
  116. package/scss/assets/scss/_utility.scss +112 -112
  117. package/scss/assets/scss/_variables.scss +289 -348
  118. package/scss/assets/scss/style-all.scss +19 -0
  119. package/scss/assets/scss/style-delta.scss +1 -1
  120. package/scss/assets/scss/style-irp.scss +1 -1
  121. package/scss/assets/scss/style-mcr.scss +1 -1
  122. package/scss/assets/scss/style-preventionweb.scss +1 -1
  123. package/css/style-irp-legacy.css +0 -476
  124. package/css/style-irp-legacy.css.map +0 -1
  125. package/css/style-legacy.css +0 -469
  126. package/css/style-legacy.css.map +0 -1
  127. package/css/style-mcr-legacy.css +0 -476
  128. package/css/style-mcr-legacy.css.map +0 -1
  129. package/css/style-preventionweb-legacy.css +0 -476
  130. package/css/style-preventionweb-legacy.css.map +0 -1
  131. package/scss/Components/Forms/_form-legacy.scss +0 -152
  132. package/scss/assets/scss/_variables-delta.scss +0 -110
  133. package/scss/assets/scss/_variables-irp.scss +0 -50
  134. package/scss/assets/scss/_variables-mcr.scss +0 -65
  135. package/scss/assets/scss/_variables-preventionweb.scss +0 -48
  136. package/scss/assets/scss/style-irp-legacy.scss +0 -20
  137. package/scss/assets/scss/style-legacy.scss +0 -20
  138. package/scss/assets/scss/style-mcr-legacy.scss +0 -20
  139. package/scss/assets/scss/style-preventionweb-legacy.scss +0 -20
@@ -10,193 +10,134 @@
10
10
  * |___/
11
11
  */
12
12
  @use "sass:math";
13
-
14
- // Root font-size configuration
15
- // Default is 16 (browser-standard root where 1rem = 16px).
16
- // Set to 10 for legacy 10px root (1.6rem = 16px) — see style-*-legacy.scss.
17
- // New integrations should use the default; override only for backward compatibility.
18
- $mg-html-font-size: 16 !default;
19
-
20
- @if $mg-html-font-size == 0 {
21
- @error "$mg-html-font-size must not be 0 (division by zero). Use 16 (default) or 10 (legacy).";
13
+ @use "sass:meta";
14
+
15
+ // --- Mangrove 2.0 upgrade guard (build-time) ---
16
+ // Color and spacing tokens are now CSS custom properties. Assigning the old
17
+ // SCSS variables ($mg-color-* / $mg-spacing-*) before importing Mangrove no
18
+ // longer changes anything — it is a silent no-op. If a consumer still defines
19
+ // one of the commonly-overridden token variables, warn loudly at compile time
20
+ // rather than let their brand colors quietly revert to the defaults.
21
+ // See docs/RELEASE-2.0.md (breaking change #1). This fires only for consumer
22
+ // overrides — Mangrove itself no longer defines these SCSS variables.
23
+ @each $_legacy in "mg-color-interactive", "mg-color-interactive-active",
24
+ "mg-color-button-background", "mg-color-button-background--hover",
25
+ "mg-color-tag", "mg-color-form-check", "mg-color-form-focus",
26
+ "mg-color-hero--secondary", "mg-spacing-150", "mg-spacing-300" {
27
+ @if meta.variable-exists($_legacy) {
28
+ @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.";
29
+ }
22
30
  }
23
31
 
24
- // Converts an intended pixel value to rem for the configured root.
25
- // Example: mg-rem(16) → 1.6rem (root=10) or 1rem (root=16)
32
+ // Root font-size anchor: fixed at the browser-standard 16px root (1rem = 16px),
33
+ // used by mg-rem() to convert intended pixel values to rem at build time. The
34
+ // legacy 10px root — the `!default` override and the style-*-legacy.scss
35
+ // variants — was removed in 2.0; consumers use a standard 16px document root.
36
+ $mg-html-font-size: 16; // BUILD-TIME ONLY
37
+
38
+ // Converts an intended pixel value to rem for the 16px root.
39
+ // Example: mg-rem(16) → 1rem, mg-rem(24) → 1.5rem
26
40
  @function mg-rem($px) {
27
41
  @return math.div($px, $mg-html-font-size) * 1rem;
28
42
  }
29
43
 
30
44
  // font file variables
31
45
  // Path adjusted for Storybook staticDirs (serves assets/ at root, not /assets/)
32
- $mgIconFontPath: "../fonts/mangrove-icon-set/font" !default;
46
+ $mgIconFontPath: "../fonts/mangrove-icon-set/font" !default; // BUILD-TIME ONLY
33
47
 
34
48
  // image variables
35
- $img-path: "~/stories/assets/images";
36
- $img-path-Icon: "~/stories/assets/icons";
37
- $img-path-Iconback: "~/stories/assets/icons";
38
- $img-path-Iconfourback: "~/stories/assets/icons";
39
-
40
- /**
41
- * @tokens Colors - basic
42
- * @presenter Color
43
- *
44
- * https://github.com/UX-and-I/storybook-design-token
45
- */
49
+ $img-path: "~/stories/assets/images"; // BUILD-TIME ONLY
50
+ $img-path-Icon: "~/stories/assets/icons"; // BUILD-TIME ONLY
51
+ $img-path-Iconback: "~/stories/assets/icons"; // BUILD-TIME ONLY
52
+ $img-path-Iconfourback: "~/stories/assets/icons"; // BUILD-TIME ONLY
46
53
 
47
54
  // MG-COLORS BLUE SHADES (#004f91)
48
- // $mg-color-blue-0: #fff;
49
- $mg-color-blue-50: #e6edf4;
50
- $mg-color-blue-100: #ccdce9;
51
- $mg-color-blue-200: #b3cade;
52
- $mg-color-blue-300: #99b9d3;
53
- $mg-color-blue-400: #80a7c8;
54
- $mg-color-blue-500: #6695bd;
55
- $mg-color-blue-600: #4d84b2;
56
- $mg-color-blue-700: #3372a7;
57
- $mg-color-blue-800: #1a619c;
58
- $mg-color-blue-900: #004f91;
55
+ :root {
56
+ --mg-color-blue-50: 230 237 244;
57
+ --mg-color-blue-100: 204 220 233;
58
+ --mg-color-blue-200: 179 202 222;
59
+ --mg-color-blue-300: 153 185 211;
60
+ --mg-color-blue-400: 128 167 200;
61
+ --mg-color-blue-500: 102 149 189;
62
+ --mg-color-blue-600: 77 132 178;
63
+ --mg-color-blue-700: 51 114 167;
64
+ --mg-color-blue-800: 26 97 156;
65
+ --mg-color-blue-900: 0 79 145;
66
+ }
59
67
 
60
68
  // MG-COLORS ORANGE SHADES (#eb752a)
61
- // $mg-color-orange-0: #fff;
62
- $mg-color-orange-50: #fdf1ea;
63
- $mg-color-orange-100: #fbe3d4;
64
- $mg-color-orange-200: #f9d6bf;
65
- $mg-color-orange-300: #f7c8aa;
66
- $mg-color-orange-400: #f5ba95;
67
- $mg-color-orange-500: #f3ac7f;
68
- $mg-color-orange-600: #f19e6a;
69
- $mg-color-orange-700: #ef9155;
70
- $mg-color-orange-800: #ed833f;
71
- $mg-color-orange-900: #eb752a;
69
+ :root {
70
+ --mg-color-orange-50: 253 241 234;
71
+ --mg-color-orange-100: 251 227 212;
72
+ --mg-color-orange-200: 249 214 191;
73
+ --mg-color-orange-300: 247 200 170;
74
+ --mg-color-orange-400: 245 186 149;
75
+ --mg-color-orange-500: 243 172 127;
76
+ --mg-color-orange-600: 241 158 106;
77
+ --mg-color-orange-700: 239 145 85;
78
+ --mg-color-orange-800: 237 131 63;
79
+ --mg-color-orange-900: 235 117 42;
80
+ }
72
81
 
73
82
  // MG-COLORS RED SHADES (#c10920)
74
- // $mg-color-red-0: #fff;
75
- $mg-color-red-50: #f9e6e9;
76
- $mg-color-red-100: #f3ced2;
77
- $mg-color-red-200: #ecb5bc;
78
- $mg-color-red-300: #e69da6;
79
- $mg-color-red-400: #e08490;
80
- $mg-color-red-500: #da6b79;
81
- $mg-color-red-600: #d45363;
82
- $mg-color-red-700: #cd3a4d;
83
- $mg-color-red-800: #c72236;
84
- $mg-color-red-900: #c10920;
85
-
86
- /**
87
- * @tokens Colors - neutral
88
- * @presenter Color
89
- *
90
- * https://github.com/UX-and-I/storybook-design-token
91
- */
92
-
93
- $mg-color-neutral-0: #fff;
94
- $mg-color-neutral-25: #f2f2f2;
95
- $mg-color-neutral-50: #e6e6e6;
96
- $mg-color-neutral-100: #ccc;
97
- $mg-color-neutral-200: #b3b3b3;
98
- $mg-color-neutral-300: #999;
99
- $mg-color-neutral-400: #808080;
100
- $mg-color-neutral-500: #666;
101
- $mg-color-neutral-600: #4d4d4d;
102
- $mg-color-neutral-700: #333;
103
- $mg-color-neutral-800: #1a1a1a;
104
- $mg-color-neutral-900: #000;
105
- $mg-color-black: $mg-color-neutral-800;
106
- $mg-color-white: $mg-color-neutral-0;
83
+ :root {
84
+ --mg-color-red-50: 249 230 233;
85
+ --mg-color-red-100: 243 206 210;
86
+ --mg-color-red-200: 236 181 188;
87
+ --mg-color-red-300: 230 157 166;
88
+ --mg-color-red-400: 224 132 144;
89
+ --mg-color-red-500: 218 107 121;
90
+ --mg-color-red-600: 212 83 99;
91
+ --mg-color-red-700: 205 58 77;
92
+ --mg-color-red-800: 199 34 54;
93
+ --mg-color-red-900: 193 9 32;
94
+ }
107
95
 
108
- /**
109
- * @tokens Colors - accent
110
- * @presenter Color
111
- *
112
- * https://github.com/UX-and-I/storybook-design-token
113
- */
96
+ // MG-COLORS NEUTRAL
97
+ :root {
98
+ --mg-color-neutral-0: 255 255 255;
99
+ --mg-color-neutral-25: 242 242 242;
100
+ --mg-color-neutral-50: 230 230 230;
101
+ --mg-color-neutral-100: 204 204 204;
102
+ --mg-color-neutral-200: 179 179 179;
103
+ --mg-color-neutral-300: 153 153 153;
104
+ --mg-color-neutral-400: 128 128 128;
105
+ --mg-color-neutral-500: 102 102 102;
106
+ --mg-color-neutral-600: 77 77 77;
107
+ --mg-color-neutral-700: 51 51 51;
108
+ --mg-color-neutral-800: 26 26 26;
109
+ --mg-color-neutral-900: 0 0 0;
110
+ }
114
111
 
115
112
  // MG-COLORS ACCENT
116
- $mg-color-accent-100: #f4e496;
117
- $mg-color-accent-200: #d3cea9;
118
- $mg-color-accent-300: #fdf6d9;
119
- $mg-color-accent-400: #0a6969;
120
-
121
- /**
122
- * @tokens Colors - interactive
123
- * @presenter Color
124
- *
125
- * https://github.com/UX-and-I/storybook-design-token
126
- */
127
-
128
- $mg-color-interactive-active: $mg-color-blue-700 !default;
129
- $mg-color-interactive: $mg-color-blue-900 !default;
130
-
131
- /**
132
- * @tokens UNDRR Colors
133
- * @presenter Color
134
- *
135
- * https://github.com/UX-and-I/storybook-design-token
136
- */
137
-
138
- // Unclear if these are needed
139
- $undrr-color-corporate-blue: $mg-color-blue-900;
140
-
141
- /**
142
- * @tokens Sendai Framework Colors
143
- * @presenter Color
144
- *
145
- * https://github.com/UX-and-I/storybook-design-token
146
- */
147
-
148
- // SENDAI COLORS
149
- $sendai-red-400: #d45363;
150
- $sendai-red-600: #cd3a4d;
151
- $sendai-red-800: #c72236;
152
- $sendai-red-900: #c10920;
153
- $sendai-red: $sendai-red-900; // alias
154
-
155
- $sendai-orange-400: #f19e6a;
156
- $sendai-orange-600: #ef9155;
157
- $sendai-orange-800: #ed833f;
158
- $sendai-orange-900: #eb752a;
159
- $sendai-orange: $sendai-orange-900; // alias
160
-
161
- $sendai-purple-400: #b669ab;
162
- $sendai-purple-600: #ab549f;
163
- $sendai-purple-800: #a13e93;
164
- $sendai-purple-900: #962987;
165
- $sendai-purple: $sendai-purple-900; // alias
166
-
167
- $sendai-turquoise-400: #4dc7c6;
168
- $sendai-turquoise-600: #33bfbe;
169
- $sendai-turquoise-800: #1ab7b6;
170
- $sendai-turquoise-900: #00afae;
171
- $sendai-turquoise: $sendai-turquoise-900; // alias
172
-
173
- /**
174
- * @tokens Spacing
175
- * @presenter Spacing
176
- */
177
- $mg-spacing-0: 0;
178
- $mg-spacing-25: mg-rem(2.5);
179
- $mg-spacing-50: mg-rem(5);
180
- $mg-spacing-75: mg-rem(7.5);
181
- $mg-spacing-100: mg-rem(10);
182
- $mg-spacing-150: mg-rem(15);
183
- $mg-spacing-175: mg-rem(18);
184
- $mg-spacing-200: mg-rem(20);
185
- $mg-spacing-250: mg-rem(24);
186
- $mg-spacing-300: mg-rem(30);
187
- $mg-spacing-350: mg-rem(35);
188
- $mg-spacing-400: mg-rem(50);
189
- $mg-spacing-500: mg-rem(60);
190
- $mg-spacing-600: mg-rem(80);
191
- $mg-spacing-800: mg-rem(100);
192
- $mg-spacing-1000: mg-rem(400);
113
+ :root {
114
+ --mg-color-accent-100: 244 228 150;
115
+ --mg-color-accent-200: 211 206 169;
116
+ --mg-color-accent-300: 253 246 217;
117
+ --mg-color-accent-400: 10 105 105;
118
+ }
193
119
 
194
120
  /**
195
- * @tokens Font sizes
196
- * @presenter FontSize
197
- *
198
- * https://github.com/UX-and-I/storybook-design-token
121
+ * Spacing scale — CSS custom properties emitted to :root.
199
122
  */
123
+ :root {
124
+ --mg-spacing-0: 0;
125
+ --mg-spacing-25: #{mg-rem(2.5)};
126
+ --mg-spacing-50: #{mg-rem(5)};
127
+ --mg-spacing-75: #{mg-rem(7.5)};
128
+ --mg-spacing-100: #{mg-rem(10)};
129
+ --mg-spacing-150: #{mg-rem(15)};
130
+ --mg-spacing-175: #{mg-rem(18)};
131
+ --mg-spacing-200: #{mg-rem(20)};
132
+ --mg-spacing-250: #{mg-rem(24)};
133
+ --mg-spacing-300: #{mg-rem(30)};
134
+ --mg-spacing-350: #{mg-rem(35)};
135
+ --mg-spacing-400: #{mg-rem(50)};
136
+ --mg-spacing-500: #{mg-rem(60)};
137
+ --mg-spacing-600: #{mg-rem(80)};
138
+ --mg-spacing-800: #{mg-rem(100)};
139
+ --mg-spacing-1000: #{mg-rem(400)};
140
+ }
200
141
 
201
142
  $mg-font-size-100: mg-rem(10);
202
143
  $mg-font-size-150: mg-rem(11.25);
@@ -224,34 +165,27 @@ $mg-font-line-height-700: 1.5em;
224
165
  font-size: $mg-font-size-400;
225
166
  } @else if $size == "medium" {
226
167
  font-size: $mg-font-size-500;
227
- padding-top: $mg-spacing-250;
228
- padding-bottom: $mg-spacing-150;
168
+ padding-top: var(--mg-spacing-250);
169
+ padding-bottom: var(--mg-spacing-150);
229
170
  } @else if $size == "large" {
230
171
  font-size: $mg-font-size-600;
231
- padding-top: $mg-spacing-250;
232
- padding-bottom: $mg-spacing-150;
172
+ padding-top: var(--mg-spacing-250);
173
+ padding-bottom: var(--mg-spacing-150);
233
174
  } @else if $size == "xlarge" {
234
175
  font-size: $mg-font-size-900;
235
- padding-top: $mg-spacing-300;
236
- padding-bottom: $mg-spacing-175;
176
+ padding-top: var(--mg-spacing-300);
177
+ padding-bottom: var(--mg-spacing-175);
237
178
  } @else if $size == "huge" {
238
179
  font-size: $mg-font-size-1000;
239
- padding-top: $mg-spacing-300;
240
- padding-bottom: $mg-spacing-250;
180
+ padding-top: var(--mg-spacing-300);
181
+ padding-bottom: var(--mg-spacing-250);
241
182
  } @else if $size == "xhuge" {
242
183
  font-size: $mg-font-size-1100;
243
- padding-top: $mg-spacing-400;
244
- padding-bottom: $mg-spacing-300;
184
+ padding-top: var(--mg-spacing-400);
185
+ padding-bottom: var(--mg-spacing-300);
245
186
  }
246
187
  }
247
188
 
248
- /**
249
- * @tokens Font families
250
- * @presenter FontFamily
251
- *
252
- * https://github.com/UX-and-I/storybook-design-token
253
- */
254
-
255
189
  $mg-font-family: "Roboto", sans-serif;
256
190
  $mg-font-family-condensed: "Roboto Condensed", sans-serif;
257
191
  $mg-font-family-headings: $mg-font-family-condensed !default;
@@ -264,131 +198,39 @@ $mg-font-family-arabic-body: "Dubai", sans-serif;
264
198
  // $mg-font-family-icons: "mangrove-icon-set";
265
199
  // Not yet activated as we are using the FontAwesome namespace
266
200
 
267
- /**
268
- * @tokens Widths
269
- * @presenter Spacing
270
- */
271
-
272
- $mg-width-150: mg-rem(150);
273
- $mg-width-300: mg-rem(300);
274
- $mg-width-400: mg-rem(400);
275
- $mg-width-600: mg-rem(600);
276
-
277
- /**
278
- * @tokens Breakpoints
279
- * @presenter Spacing
280
- */
281
-
201
+ // BUILD-TIME ONLY — breakpoints cannot be CSS custom properties.
202
+ // @media queries require static values resolved at compile time; var() is invalid there.
203
+ // Do not add --mg-breakpoint-* custom properties.
282
204
  $mg-breakpoint-mobile: 480px;
283
205
  $mg-breakpoint-tablet: 900px;
284
- $mg-breakpoint-desktop: 1164px; // see the docs: this is our main target but we also have a "wide" breakpoint as a secondary use case
206
+ $mg-breakpoint-desktop: 1164px;
285
207
  $mg-breakpoint-desktop-wide: 1440px;
286
208
 
287
- /**
288
- * @tokens Colors - component
289
- * @presenter Color
290
- *
291
- * https://github.com/UX-and-I/storybook-design-token
292
- */
293
-
294
- // page container
295
- $mg-container-spacer: $mg-spacing-150;
296
-
297
- // text
298
- $mg-color-text: $mg-color-neutral-800;
299
-
300
- // tag
301
- $mg-color-tag: $mg-color-interactive !default;
302
- $mg-color-tag--hover: $mg-color-interactive-active !default;
303
- $mg-color-tag-secondary: $mg-color-neutral-500 !default;
304
- $mg-color-tag-secondary--hover: $mg-color-neutral-600 !default;
305
- $mg-color-tag-accent: $mg-color-orange-900 !default;
306
- $mg-color-tag-accent--hover: $mg-color-orange-800 !default;
307
- $mg-radius-tag: $mg-spacing-0 !default;
308
-
309
- // button
310
- $mg-color-button: $mg-color-white !default;
311
- $mg-color-button--hover: $mg-color-white !default;
312
- $mg-color-button-background: $mg-color-interactive !default;
313
- $mg-color-button-background--hover: $mg-color-interactive-active !default;
314
- $mg-color-button-secondary-background: $mg-color-blue-800 !default;
315
- $mg-color-button-secondary-background--hover: $mg-color-blue-700 !default;
316
- $mg-radius-button: $mg-spacing-0 !default;
317
- $mg-border-width-button: 1px !default;
318
- $mg-color-text-button: $mg-color-white !default;
319
- $mg-border-color-button: $mg-color-text-button !default;
320
- $mg-padding-button: $mg-spacing-100 $mg-spacing-150 !default;
321
- $mg-font-size-button: $mg-font-size-250 !default;
322
-
323
- // form check (checkbox / radio)
324
- $mg-color-form-check: $mg-color-interactive !default;
325
- $mg-color-form-check--hover: $mg-color-interactive-active !default;
326
- $mg-color-form-check--checked: $mg-color-interactive !default;
327
-
328
- // form inputs (text, textarea, select)
329
- $mg-color-form-focus: $mg-color-interactive !default;
330
- $mg-radius-form-input: $mg-spacing-0 !default;
331
-
332
- // card
333
- $mg-card-background: none !default;
334
- $mg-card-padding: 0rem !default;
335
- $mg-card-border-radius: 0 !default;
336
- $mg-card-icon-badge-radius: 20% !default;
337
-
338
- // CTA banner
339
- $mg-cta-padding: $mg-spacing-400 0 !default;
340
-
341
- // shared variant accent colours (used by hero, cards, and other components)
342
- $mg-color-secondary: $mg-color-orange-800 !default;
343
- $mg-color-tertiary: $mg-color-neutral-900 !default;
344
- $mg-color-quaternary: $mg-color-red-800 !default;
345
-
346
- // hero (aliases for backward compatibility)
347
- $mg-color-hero: $mg-color-interactive !default;
348
- $mg-color-hero--secondary: $mg-color-secondary !default;
349
- $mg-color-hero--tertiary: $mg-color-tertiary !default;
350
- $mg-color-hero--quaternary: $mg-color-quaternary !default;
351
- $mg-opacity-hero: 0.85 !default;
352
- $mg-color-hero-title: $mg-color-neutral-0 !default;
353
- $mg-spacing-hero-overlay: 0 !default;
354
- $mg-hero-overlay-max-width: $mg-width-400 !default;
355
- $mg-hero-overlay-padding: $mg-spacing-200 !default;
356
- $mg-color-hero-button-secondary-background: rgba(
357
- $mg-color-neutral-0,
358
- 0.9
359
- ) !default;
360
- $mg-color-hero-button-secondary-color: $mg-color-hero !default;
361
- $mg-border-color-hero-button-secondary: $mg-color-neutral-0 !default;
362
-
363
- // mega menu
364
- $mg-color-mega-content-bg: $mg-color-button !default;
365
-
366
209
  // tabs
367
- $mg-color-tabbar-background: $mg-color-blue-50 !default;
368
- $mg-color-tab-background: $mg-color-blue-200 !default;
369
- $mg-color-tab-background--inactive: $mg-color-tabbar-background !default;
370
- $mg-color-tab-border: $mg-color-neutral-700 !default;
371
- $mg-color-tab-border--hover: $mg-color-neutral-900 !default;
372
- $mg-color-tab-border--active: $mg-color-blue-800 !default;
373
- $mg-color-tab-background--hover: $mg-color-blue-800 !default;
374
- $mg-radius-tab: $mg-spacing-0 !default;
375
- $mg-padding-tab: $mg-spacing-75 $mg-spacing-150 !default;
376
- $mg-color-text-tab: $mg-color-neutral-700 !default;
377
- $mg-color-text-tab--hover: $mg-color-white !default;
378
- $mg-color-text-tab-active: $mg-color-neutral-700 !default;
379
- $mg-color-text-tab-no-results: $mg-color-neutral-500 !default;
380
- $mg-color-tab-section-background: $mg-color-neutral-0 !default;
381
- $mg-padding-tab-section: $mg-spacing-100 $mg-spacing-0 !default;
382
- $mg-radius-tab-section: $mg-spacing-0 !default;
383
- $mg-box-shadow-tab-section: none !default;
210
+ // BUILD-TIME ONLY: $mg-tabs-border-bottom drives @if conditional in tab.scss.
211
+ // Cannot become a CSS custom property — no runtime conditional equivalent exists.
212
+ // All sub-brands use true. To disable, set to false before @use.
384
213
  $mg-tabs-border-bottom: true !default;
385
214
 
386
- /**
387
- * @tokens Component sizing
388
- * @presenter Spacing
389
- */
390
-
391
- $author-image-radius: 50%;
215
+ :root {
216
+ --mg-color-tabbar-background: rgb(var(--mg-color-blue-50));
217
+ --mg-color-tab-background: rgb(var(--mg-color-blue-200));
218
+ --mg-color-tab-background--inactive: rgb(var(--mg-color-blue-50));
219
+ --mg-color-tab-border: rgb(var(--mg-color-neutral-700));
220
+ --mg-color-tab-border--hover: rgb(var(--mg-color-neutral-900));
221
+ --mg-color-tab-border--active: rgb(var(--mg-color-blue-800));
222
+ --mg-color-tab-background--hover: rgb(var(--mg-color-blue-800));
223
+ --mg-radius-tab: 0;
224
+ --mg-padding-tab: var(--mg-spacing-75) var(--mg-spacing-150);
225
+ --mg-color-text-tab: rgb(var(--mg-color-neutral-700));
226
+ --mg-color-text-tab--hover: rgb(var(--mg-color-neutral-0));
227
+ --mg-color-text-tab-active: rgb(var(--mg-color-neutral-700));
228
+ --mg-color-text-tab-no-results: rgb(var(--mg-color-neutral-500));
229
+ --mg-color-tab-section-background: rgb(var(--mg-color-neutral-0));
230
+ --mg-padding-tab-section: var(--mg-spacing-100) var(--mg-spacing-0);
231
+ --mg-radius-tab-section: 0;
232
+ --mg-box-shadow-tab-section: none;
233
+ }
392
234
 
393
235
  // Z-index layers: use these named tokens for global stacking contexts
394
236
  // (fixed, sticky, or portaled elements). One token per UI concept — backdrops
@@ -397,55 +239,154 @@ $author-image-radius: 50%;
397
239
  // isolated context uses raw values with an explanatory comment.
398
240
  // Pick the nearest existing layer; open a GitHub discussion before adding one.
399
241
 
400
- /**
401
- * @tokens Z-index layers
402
- */
403
-
404
- // Background utility — pseudo-element placed behind all sibling content
405
- $mg-z-index-behind: -1; // ::before backgrounds (e.g. mg-container-full-width)
406
-
407
- // Navigation zone — ⚠ FROZEN: Drupal themes depend on these exact values
408
- $mg-z-index-nav: 10; // MegaMenu (mobile sidebar/overlay uses nav - 1 = 9)
409
- $mg-z-index-sticky: 11; // Secondary sticky bars, e.g. OnThisPageNav
410
- $mg-z-index-nav-toggle: 14; // Mobile nav hamburger toggle (above all nav layers)
411
- $mg-z-index-header: 22; // PageHeader (above nav and sticky bar)
412
-
413
- // Overlay zone — floats above page content
414
- $mg-z-index-drawer: 2000; // Drawer / side panel (backdrop uses drawer - 1 = 1999)
415
- $mg-z-index-dropdown: 2500; // Dropdowns and inline menus (above drawers)
416
-
417
- // Modal zone — portaled to <body>, must clear all page chrome
418
- $mg-z-index-modal: 5000; // Modal and dialog (backdrop uses modal - 1 = 4999)
419
- $mg-z-index-toast: 5500; // Toast notifications (Snackbar), above modals
420
-
421
- // Modal scrim. Neutral-tinted by default so it reads as backdrop across all
422
- // themes; child themes can override for a branded scrim if desired.
423
- $mg-color-modal-scrim: rgba($mg-color-neutral-900, 0.85) !default;
242
+ :root {
243
+ // Interactive
244
+ --mg-color-interactive: var(--mg-color-blue-900);
245
+ --mg-color-interactive-active: var(--mg-color-blue-700);
246
+
247
+ // Text + aliases
248
+ --mg-color-text: var(--mg-color-neutral-800);
249
+ --mg-color-black: var(--mg-color-neutral-800);
250
+ --mg-color-white: var(--mg-color-neutral-0);
251
+
252
+ // Tags
253
+ --mg-color-tag: var(--mg-color-interactive);
254
+ --mg-color-tag--hover: var(--mg-color-interactive-active);
255
+ --mg-color-tag-secondary: var(--mg-color-neutral-500);
256
+ --mg-color-tag-secondary--hover: var(--mg-color-neutral-600);
257
+ --mg-color-tag-accent: var(--mg-color-orange-900);
258
+ --mg-color-tag-accent--hover: var(--mg-color-orange-800);
259
+
260
+ // Buttons
261
+ --mg-color-button: var(--mg-color-neutral-0);
262
+ --mg-color-button--hover: var(--mg-color-neutral-0);
263
+ --mg-color-button-background: var(--mg-color-interactive);
264
+ --mg-color-button-background--hover: var(--mg-color-interactive-active);
265
+ --mg-color-button-secondary-background: var(--mg-color-blue-800);
266
+ --mg-color-button-secondary-background--hover: var(--mg-color-blue-700);
267
+ --mg-color-button-outline-primary: var(--mg-color-interactive);
268
+ --mg-color-button-outline-primary--hover: var(--mg-color-interactive-active);
269
+ --mg-color-button-outline-secondary: var(--mg-color-button-secondary-background);
270
+ --mg-color-button-outline-secondary--hover: var(--mg-color-button-secondary-background--hover);
271
+ --mg-color-text-button: var(--mg-color-neutral-0);
272
+ --mg-border-color-button: var(--mg-color-text-button);
273
+
274
+ // Form
275
+ --mg-color-form-check: var(--mg-color-interactive);
276
+ --mg-color-form-check--hover: var(--mg-color-interactive-active);
277
+ --mg-color-form-check--checked: var(--mg-color-interactive);
278
+ --mg-color-form-focus: var(--mg-color-interactive);
279
+
280
+ // Brand hierarchy
281
+ --mg-color-secondary: var(--mg-color-orange-800);
282
+ --mg-color-tertiary: var(--mg-color-neutral-900);
283
+ --mg-color-quaternary: var(--mg-color-red-800);
284
+
285
+ // Hero
286
+ --mg-color-hero: var(--mg-color-interactive);
287
+ --mg-color-hero--secondary: var(--mg-color-secondary);
288
+ --mg-color-hero--tertiary: var(--mg-color-tertiary);
289
+ --mg-color-hero--quaternary: var(--mg-color-quaternary);
290
+ --mg-color-hero-title: var(--mg-color-neutral-0);
291
+ --mg-color-hero-button-secondary-background: rgb(var(--mg-color-neutral-0) / 0.9);
292
+ --mg-color-hero-button-secondary-color: var(--mg-color-hero);
293
+ --mg-border-color-hero-button-secondary: var(--mg-color-neutral-0);
294
+
295
+ // Mega menu
296
+ --mg-color-mega-content-bg: var(--mg-color-button);
297
+
298
+ // Modal
299
+ --mg-color-modal-scrim: rgb(var(--mg-color-neutral-900) / 0.85);
300
+
301
+ // Legacy one-off colors (hardcoded — no palette backing)
302
+ --mg-color-green: #008484;
303
+ --mg-color-green-light: #90ee90;
304
+ --mg-color-green-dark: #006400;
305
+ --mg-color-yellow: #ff0;
306
+ --mg-color-yellow-light: lightyellow;
307
+ --mg-color-yellow-dark: #d6d624;
308
+ --mg-color-azure: #f0ffff;
309
+ --mg-color-azure-dark: #d4e3e3;
310
+ --mg-color-azure-light: #f0f8f8;
311
+ --mg-color-ebony-clay: #3d4242;
312
+
313
+ // Sendai Framework
314
+ --sendai-red-400: #d45363;
315
+ --sendai-red-600: #cd3a4d;
316
+ --sendai-red-800: #c72236;
317
+ --sendai-red-900: #c10920;
318
+ --sendai-red: var(--sendai-red-900);
319
+ --sendai-orange-400: #f19e6a;
320
+ --sendai-orange-600: #ef9155;
321
+ --sendai-orange-800: #ed833f;
322
+ --sendai-orange-900: #eb752a;
323
+ --sendai-orange: var(--sendai-orange-900);
324
+ --sendai-purple-400: #b669ab;
325
+ --sendai-purple-600: #ab549f;
326
+ --sendai-purple-800: #a13e93;
327
+ --sendai-purple-900: #962987;
328
+ --sendai-purple: var(--sendai-purple-900);
329
+ --sendai-turquoise-400: #4dc7c6;
330
+ --sendai-turquoise-600: #33bfbe;
331
+ --sendai-turquoise-800: #1ab7b6;
332
+ --sendai-turquoise-900: #00afae;
333
+ --sendai-turquoise: var(--sendai-turquoise-900);
334
+
335
+ // UNDRR
336
+ --undrr-color-corporate-blue: var(--mg-color-blue-900);
337
+ }
424
338
 
425
- /**
426
- * @tokens-end
427
- */
428
-
429
- // @deprecated Legacy UNDP color variables — will be removed in a future major release.
430
- // Migrate to Mangrove's standard color tokens ($mg-color-{hue}-{shade}):
431
- // $mg-color-green → $mg-color-green-600 or a custom semantic variable
432
- // $mg-color-green-light → $mg-color-green-200
433
- // $mg-color-green-dark → $mg-color-green-800
434
- // $mg-color-yellow → $mg-color-yellow-500
435
- // $mg-color-yellow-light → $mg-color-yellow-100
436
- // $mg-color-yellow-dark → $mg-color-yellow-700
437
- // $mg-color-azure* → $mg-color-blue-100 / $mg-color-neutral-100
438
- // $mg-color-ebony-clay → $mg-color-neutral-700
439
- $mg-color-green: #008484;
440
- $mg-color-green-light: #90ee90;
441
- $mg-color-yellow: #ff0;
442
- $mg-color-yellow-light: lightyellow;
443
- $mg-color-yellow-dark: #d6d624;
444
- $mg-color-azure: #f0ffff;
445
- $mg-color-azure-dark: #d4e3e3;
446
- $mg-color-azure-light: #f0f8f8;
447
- $mg-color-ebony-clay: #3d4242;
448
- $mg-color-green-dark: #006400;
339
+ :root {
340
+ // Container
341
+ --mg-container-spacer: var(--mg-spacing-150);
342
+
343
+ // Tag
344
+ --mg-radius-tag: var(--mg-spacing-0);
345
+
346
+ // Button
347
+ --mg-radius-button: var(--mg-spacing-0);
348
+ --mg-border-width-button: 1px;
349
+ --mg-padding-button: var(--mg-spacing-100) var(--mg-spacing-150);
350
+ --mg-font-size-button: #{$mg-font-size-250};
351
+
352
+ // Form
353
+ --mg-radius-form-input: var(--mg-spacing-0);
354
+
355
+ // Card
356
+ --mg-card-background: none;
357
+ --mg-card-padding: 0rem;
358
+ --mg-card-border-radius: 0;
359
+ --mg-card-icon-badge-radius: 20%;
360
+
361
+ // CTA
362
+ --mg-cta-padding: var(--mg-spacing-400) 0;
363
+
364
+ // Author image
365
+ --mg-author-image-radius: 50%;
366
+
367
+ // Hero
368
+ --mg-opacity-hero: 0.85;
369
+ --mg-spacing-hero-overlay: 0;
370
+ --mg-hero-overlay-max-width: #{mg-rem(400)};
371
+ --mg-hero-overlay-padding: var(--mg-spacing-200);
372
+
373
+ // Widths (build-time resolved)
374
+ --mg-width-150: #{mg-rem(150)};
375
+ --mg-width-300: #{mg-rem(300)};
376
+ --mg-width-400: #{mg-rem(400)};
377
+ --mg-width-600: #{mg-rem(600)};
378
+
379
+ // Z-index (named stacking contexts)
380
+ --mg-z-index-behind: -1;
381
+ --mg-z-index-nav: 10;
382
+ --mg-z-index-sticky: 11;
383
+ --mg-z-index-nav-toggle: 14;
384
+ --mg-z-index-header: 22;
385
+ --mg-z-index-drawer: 2000;
386
+ --mg-z-index-dropdown: 2500;
387
+ --mg-z-index-modal: 5000;
388
+ --mg-z-index-toast: 5500;
389
+ }
449
390
 
450
391
  // Header height
451
392
  $header-height-xlarge: 115px;