@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.
- package/README.md +4 -4
- package/components/BookCard.js +2 -2
- package/components/Breadcrumbs.js +2 -2
- package/components/Checkbox.js +2 -2
- package/components/Chips.js +2 -2
- package/components/CtaButton.js +2 -2
- package/components/EmbedContainer.js +2 -2
- package/components/Footer.js +2 -2
- package/components/FormAction.js +2 -2
- package/components/FormErrorSummary.js +2 -2
- package/components/FormGroup.js +2 -2
- package/components/FullWidth.js +2 -2
- package/components/Gallery.js +2 -2
- package/components/Hero.js +2 -2
- package/components/HighlightBox.js +2 -2
- package/components/HorizontalBookCard.js +2 -2
- package/components/HorizontalCard.js +2 -2
- package/components/IconCard.js +2 -2
- package/components/Loader.js +2 -2
- package/components/MegaMenu.js +2 -2
- package/components/PageHeader.js +2 -2
- package/components/Pager.js +2 -2
- package/components/QuoteHighlight.js +2 -2
- package/components/Radio.js +2 -2
- package/components/ScrollContainer.js +2 -2
- package/components/Select.js +2 -2
- package/components/ShareButtons.js +2 -2
- package/components/ShowMore.js +2 -2
- package/components/StatsCard.js +2 -2
- package/components/SyndicationSearchWidget.js +2 -2
- package/components/Tab.js +2 -2
- package/components/TextCta.js +2 -2
- package/components/TextInput.js +2 -2
- package/components/Textarea.js +2 -2
- package/components/UserFeedback.js +2 -2
- package/components/VerticalCard.js +2 -2
- package/components/hydrate.js +1 -1
- package/css/style-all.css +286 -42
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +286 -42
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +254 -13
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +286 -42
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +286 -42
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +286 -42
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +285 -41
- package/css/style.css.map +1 -1
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +1 -1
- package/error-pages/managed-challenge.html +1 -1
- package/js/tabs.js +577 -401
- package/package.json +10 -10
- package/scss/Atom/BaseTypography/Code/code.scss +3 -3
- package/scss/Atom/EmptyState/empty-state.scss +117 -0
- package/scss/Atom/ReachElement/Details/details.scss +1 -1
- package/scss/Atom/StatusLabel/status-label.scss +64 -0
- package/scss/Atom/Tag/tag.scss +1 -8
- package/scss/Components/Boilerplate/boilerplate.scss +1 -2
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -8
- package/scss/Components/Buttons/Chips/chips.scss +7 -10
- package/scss/Components/Buttons/CtaButton/cta-button.scss +19 -22
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +9 -13
- package/scss/Components/Cards/Card/card.scss +13 -13
- package/scss/Components/Cards/StatsCard/stats-card.scss +5 -14
- package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +2 -10
- package/scss/Components/Footer/footer.scss +1 -8
- package/scss/Components/Forms/_form-base.scss +49 -37
- package/scss/Components/Gallery/gallery.scss +13 -16
- package/scss/Components/Hero/hero.scss +4 -19
- package/scss/Components/MegaMenu/mega-menu.scss +337 -22
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +2 -10
- package/scss/Components/Pager/pager.scss +1 -2
- package/scss/Components/PreviewAccess/preview-access.scss +21 -29
- package/scss/Components/Snackbar/snackbar.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +13 -15
- package/scss/Components/Tab/tab.scss +269 -123
- package/scss/Components/TextCta/text-cta.scss +1 -1
- package/scss/Components/UserFeedback/user-feedback.scss +2 -8
- package/scss/assets/fonts/noto-kufi-arabic/noto-kufi-arabic.scss +73 -3
- package/scss/assets/fonts/noto-sans-arabic/noto-sans-arabic.scss +79 -0
- package/scss/assets/scss/_components.scss +2 -0
- package/scss/assets/scss/_fonts.scss +158 -2
- package/scss/assets/scss/_foundational.scss +45 -30
- package/scss/assets/scss/_mixins.scss +53 -8
- package/scss/assets/scss/_theme-delta.scss +6 -63
- package/scss/assets/scss/_theme-irp.scss +6 -34
- package/scss/assets/scss/_theme-mcr.scss +7 -52
- package/scss/assets/scss/_theme-preventionweb.scss +6 -32
- package/scss/assets/scss/_tokens-data-viz.scss +300 -0
- package/scss/assets/scss/_tokens-tabs.scss +32 -0
- package/scss/assets/scss/_utility.scss +4 -6
- package/scss/assets/scss/_variables.scss +221 -300
- package/scss/assets/scss/generated/_tokens-delta.scss +248 -0
- package/scss/assets/scss/generated/_tokens-irp.scss +114 -0
- package/scss/assets/scss/generated/_tokens-mangrove.scss +607 -0
- package/scss/assets/scss/generated/_tokens-mcr.scss +135 -0
- package/scss/assets/scss/generated/_tokens-preventionweb.scss +101 -0
- 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.
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
130
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
//
|
|
214
|
-
//
|
|
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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
--mg-
|
|
237
|
-
--mg-
|
|
238
|
-
--mg-
|
|
239
|
-
--mg-
|
|
240
|
-
--mg-
|
|
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:
|
|
321
|
-
--mg-color-green-light:
|
|
322
|
-
--mg-color-green-dark:
|
|
323
|
-
--mg-color-yellow:
|
|
324
|
-
--mg-color-yellow-light:
|
|
325
|
-
--mg-color-yellow-dark:
|
|
326
|
-
--mg-color-azure:
|
|
327
|
-
--mg-color-azure-dark:
|
|
328
|
-
--mg-color-azure-light:
|
|
329
|
-
--mg-color-ebony-clay:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
--sendai-
|
|
338
|
-
--sendai-
|
|
339
|
-
--sendai-
|
|
340
|
-
--sendai-
|
|
341
|
-
--sendai-
|
|
342
|
-
--sendai-
|
|
343
|
-
--sendai-
|
|
344
|
-
--sendai-
|
|
345
|
-
--sendai-
|
|
346
|
-
--sendai-
|
|
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:
|
|
352
|
-
|
|
353
|
-
//
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
//
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
//
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
--mg-
|
|
366
|
-
--mg-
|
|
367
|
-
--mg-
|
|
368
|
-
--mg-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
--mg-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
--mg-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
--mg-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
//
|
|
387
|
-
--mg-
|
|
388
|
-
--mg-
|
|
389
|
-
--mg-
|
|
390
|
-
--mg-
|
|
391
|
-
--mg-
|
|
392
|
-
--mg-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
//
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
--mg-
|
|
402
|
-
--mg-
|
|
403
|
-
--mg-
|
|
404
|
-
--mg-
|
|
405
|
-
--mg-
|
|
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
|