@undrr/undrr-mangrove 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +32 -25
  2. package/components/BarChart.js +2 -2
  3. package/components/BookCard.js +6 -0
  4. package/components/BookCard.js.LICENSE.txt +11 -0
  5. package/components/Breadcrumbs.js +6 -0
  6. package/components/Breadcrumbs.js.LICENSE.txt +9 -0
  7. package/components/Checkbox.js +6 -0
  8. package/components/Checkbox.js.LICENSE.txt +9 -0
  9. package/components/Chips.js +6 -0
  10. package/components/Chips.js.LICENSE.txt +9 -0
  11. package/components/CtaButton.js +6 -0
  12. package/components/CtaButton.js.LICENSE.txt +9 -0
  13. package/components/EmbedContainer.js +6 -0
  14. package/components/EmbedContainer.js.LICENSE.txt +9 -0
  15. package/components/Fetcher.js +2 -2
  16. package/components/Footer.js +6 -0
  17. package/components/Footer.js.LICENSE.txt +9 -0
  18. package/components/FormErrorSummary.js +6 -0
  19. package/components/FormErrorSummary.js.LICENSE.txt +9 -0
  20. package/components/FormGroup.js +6 -0
  21. package/components/FormGroup.js.LICENSE.txt +9 -0
  22. package/components/FullWidth.js +6 -0
  23. package/components/FullWidth.js.LICENSE.txt +9 -0
  24. package/components/Gallery.js +2 -2
  25. package/components/Hero.js +6 -0
  26. package/components/Hero.js.LICENSE.txt +9 -0
  27. package/components/HighlightBox.js +6 -0
  28. package/components/HighlightBox.js.LICENSE.txt +9 -0
  29. package/components/HorizontalBookCard.js +6 -0
  30. package/components/HorizontalBookCard.js.LICENSE.txt +11 -0
  31. package/components/HorizontalCard.js +6 -0
  32. package/components/HorizontalCard.js.LICENSE.txt +11 -0
  33. package/components/IconCard.js +2 -2
  34. package/components/IconCard.js.LICENSE.txt +1 -1
  35. package/components/Loader.js +6 -0
  36. package/components/Loader.js.LICENSE.txt +9 -0
  37. package/components/MapComponent.js +2 -2
  38. package/components/MegaMenu.js +2 -2
  39. package/components/PageHeader.js +6 -0
  40. package/components/PageHeader.js.LICENSE.txt +9 -0
  41. package/components/Pager.js +2 -2
  42. package/components/QuoteHighlight.js +2 -2
  43. package/components/Radio.js +6 -0
  44. package/components/Radio.js.LICENSE.txt +9 -0
  45. package/components/ScrollContainer.js +2 -2
  46. package/components/Select.js +6 -0
  47. package/components/Select.js.LICENSE.txt +9 -0
  48. package/components/ShareButtons.js +2 -2
  49. package/components/ShowMore.js +6 -0
  50. package/components/ShowMore.js.LICENSE.txt +9 -0
  51. package/components/StatsCard.js +2 -2
  52. package/components/SyndicationSearchWidget.js +2 -2
  53. package/components/Tab.js +6 -0
  54. package/components/Tab.js.LICENSE.txt +9 -0
  55. package/components/TextCta.js +6 -0
  56. package/components/TextCta.js.LICENSE.txt +11 -0
  57. package/components/TextInput.js +6 -0
  58. package/components/TextInput.js.LICENSE.txt +9 -0
  59. package/components/Textarea.js +6 -0
  60. package/components/Textarea.js.LICENSE.txt +9 -0
  61. package/components/VerticalCard.js +6 -0
  62. package/components/VerticalCard.js.LICENSE.txt +11 -0
  63. package/components/hydrate.js +5 -0
  64. package/css/style-delta.css +464 -0
  65. package/css/style-delta.css.map +1 -0
  66. package/css/style-gutenberg.css +19 -18
  67. package/css/style-gutenberg.css.map +1 -1
  68. package/css/style-irp-legacy.css +469 -0
  69. package/css/style-irp-legacy.css.map +1 -0
  70. package/css/style-irp.css +96 -103
  71. package/css/style-irp.css.map +1 -1
  72. package/css/style-legacy.css +462 -0
  73. package/css/style-legacy.css.map +1 -0
  74. package/css/style-mcr-legacy.css +469 -0
  75. package/css/style-mcr-legacy.css.map +1 -0
  76. package/css/style-mcr.css +96 -103
  77. package/css/style-mcr.css.map +1 -1
  78. package/css/style-preventionweb-legacy.css +469 -0
  79. package/css/style-preventionweb-legacy.css.map +1 -0
  80. package/css/style-preventionweb.css +96 -103
  81. package/css/style-preventionweb.css.map +1 -1
  82. package/css/style.css +96 -103
  83. package/css/style.css.map +1 -1
  84. package/error-pages/401.html +10 -11
  85. package/error-pages/403.html +11 -12
  86. package/error-pages/404.html +13 -14
  87. package/error-pages/429.html +12 -13
  88. package/error-pages/500.html +10 -11
  89. package/error-pages/502.html +12 -13
  90. package/error-pages/503.html +12 -13
  91. package/error-pages/504.html +10 -11
  92. package/error-pages/5xx.html +10 -11
  93. package/error-pages/challenge.html +12 -13
  94. package/error-pages/managed-challenge.html +12 -13
  95. package/js/tabs.js +427 -88
  96. package/package.json +1 -1
  97. package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -8
  98. package/scss/Atom/BaseTypography/Cite/cite.scss +2 -2
  99. package/scss/Atom/Images/AuthorImage/author-image.scss +4 -4
  100. package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +24 -28
  101. package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
  102. package/scss/Atom/Layout/Container/container.scss +2 -2
  103. package/scss/Atom/Layout/Grid/grid.scss +1 -1
  104. package/scss/Atom/ReachElement/Details/details.scss +6 -6
  105. package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
  106. package/scss/Atom/Table/table.scss +0 -8
  107. package/scss/Components/Boilerplate/boilerplate.scss +2 -2
  108. package/scss/Components/Breadcrumbs/breadcrumbs.scss +2 -9
  109. package/scss/Components/Buttons/Chips/chips.scss +5 -19
  110. package/scss/Components/Buttons/CtaButton/buttons.scss +3 -124
  111. package/scss/Components/Buttons/CtaButton/cta-button.scss +124 -0
  112. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +2 -2
  113. package/scss/Components/Cards/Card/card.scss +41 -2
  114. package/scss/Components/ErrorPages/error-pages.scss +12 -12
  115. package/scss/Components/Footer/footer.scss +72 -4
  116. package/scss/Components/Forms/Select/select.scss +2 -2
  117. package/scss/Components/Forms/_form-base.scss +5 -5
  118. package/scss/Components/Forms/_form-legacy.scss +1 -1
  119. package/scss/Components/Gallery/gallery.scss +4 -4
  120. package/scss/Components/Hero/hero.scss +18 -17
  121. package/scss/Components/HighlightBox/highlight-box.scss +5 -5
  122. package/scss/Components/MegaMenu/mega-menu.scss +750 -0
  123. package/scss/Components/MegaMenu/megamenu.scss +3 -659
  124. package/scss/Components/PageHeader/page-header.scss +4 -4
  125. package/scss/Components/Pagination/pagination.scss +2 -2
  126. package/scss/Components/SyndicationSearchWidget/SyndicationSearchWidget.scss +3 -1480
  127. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +1515 -0
  128. package/scss/Components/Tab/tab.scss +66 -7
  129. package/scss/Components/TextCta/text-cta.scss +129 -0
  130. package/scss/Components/TextCta/textcta.scss +3 -27
  131. package/scss/Molecules/ImageCaption/image-caption.scss +6 -16
  132. package/scss/Molecules/SectionHeader/section-header.scss +8 -0
  133. package/scss/Molecules/SectionHeader/sectionheader.scss +3 -8
  134. package/scss/Utilities/FullWidth/FullWidth.scss +3 -23
  135. package/scss/Utilities/FullWidth/full-width.scss +23 -0
  136. package/scss/Utilities/Loader/loader.scss +1 -1
  137. package/scss/Utilities/ShowMore/ShowMore.scss +3 -26
  138. package/scss/Utilities/ShowMore/show-more.scss +26 -0
  139. package/scss/assets/scss/_components.scss +14 -9
  140. package/scss/assets/scss/_foundational.scss +13 -7
  141. package/scss/assets/scss/_mixins.scss +9 -314
  142. package/scss/assets/scss/_utility.scss +19 -71
  143. package/scss/assets/scss/_variables-delta.scss +105 -0
  144. package/scss/assets/scss/_variables-irp.scss +1 -1
  145. package/scss/assets/scss/_variables-mcr.scss +1 -1
  146. package/scss/assets/scss/_variables-preventionweb.scss +1 -1
  147. package/scss/assets/scss/_variables.scss +68 -34
  148. package/scss/assets/scss/style-delta.scss +8 -0
  149. package/scss/assets/scss/style-gutenberg.scss +2 -2
  150. package/scss/assets/scss/style-irp-legacy.scss +20 -0
  151. package/scss/assets/scss/style-legacy.scss +20 -0
  152. package/scss/assets/scss/style-mcr-legacy.scss +20 -0
  153. package/scss/assets/scss/style-preventionweb-legacy.scss +20 -0
  154. package/scss/Components/BlockquoteComponent/blockquotecomp.scss +0 -31
  155. package/scss/Components/Buttons/CtaLink/cta-link.scss +0 -61
  156. /package/scss/Components/TableOfContents/{TableOfContents.scss → table-of-contents.scss} +0 -0
@@ -1,659 +1,3 @@
1
- .mg-mega-wrapper {
2
- position: relative;
3
- background: $mg-color-white;
4
- box-shadow: 0 2px 3px 0 rgb(51 51 51 / 0.31);
5
- z-index: 10;
6
- }
7
-
8
- .mg-mega-topbar {
9
- width: 100%;
10
- display: flex;
11
- align-items: flex-start;
12
- z-index: 10;
13
- padding: 0;
14
- max-width: $mg-breakpoint-desktop;
15
- margin: 0 auto;
16
-
17
- @media screen and (min-width: $mg-breakpoint-desktop-wide) {
18
- max-width: $mg-breakpoint-desktop-wide;
19
- }
20
-
21
- // these are note "mobile first" as they seem to cause a glitch with firefox and .mg-container-full-width
22
- @media screen and (max-width: $mg-breakpoint-tablet) {
23
- padding-left: 4rem; // space for the icon button
24
- overflow-x: hidden; // primarily for mobile
25
- }
26
-
27
- // Hide desktop menu items on mobile/tablet, show on desktop
28
- &__item {
29
- pointer-events: none; // on mobile we only advertise the buttons, but not clickable
30
-
31
- @media screen and (min-width: $mg-breakpoint-tablet) {
32
- display: block;
33
- pointer-events: unset;
34
- }
35
-
36
- .mg-mega-content {
37
- display: none;
38
- }
39
-
40
- font-size: $mg-font-size-300;
41
- color: $mg-color-interactive;
42
- font-weight: bold;
43
- list-style: none;
44
- padding: 0;
45
- margin: 0;
46
-
47
- p {
48
- font-weight: normal;
49
- }
50
-
51
- > a,
52
- > button {
53
- padding: $mg-spacing-150;
54
- display: block;
55
- cursor: pointer;
56
- line-height: 1.75rem; // normalization
57
- width: max-content; // overflow menu style on mobile
58
-
59
- @media screen and (min-width: $mg-breakpoint-tablet) {
60
- width: unset;
61
- }
62
- }
63
-
64
- @media screen and (min-width: $mg-breakpoint-tablet) {
65
- &--active {
66
- background: rgba($mg-color-interactive, 0.2);
67
-
68
- a,
69
- .mg-mega-topbar__item-link {
70
- color: $mg-color-interactive;
71
- text-decoration: none;
72
- }
73
-
74
- a.mg-button-primary {
75
- color: $mg-color-white;
76
- text-decoration: none;
77
- }
78
-
79
- .mg-mega-content {
80
- display: flex;
81
- }
82
- }
83
- }
84
- }
85
-
86
- &__item-link {
87
- font-family: $mg-font-family-condensed;
88
- color: $mg-color-interactive;
89
- background: none;
90
- border: none;
91
- font-weight: bold;
92
- cursor: pointer;
93
- list-style: none;
94
- }
95
-
96
- // Desktop: Make the top level button links larger
97
- @media screen and (min-width: $mg-breakpoint-tablet) {
98
- &__item-link {
99
- font-size: $mg-font-size-400;
100
- }
101
- }
102
- }
103
-
104
- .mg-mega-content {
105
- // Mobile-first: Start with mobile styles
106
- display: flex;
107
- flex-direction: column;
108
- height: auto;
109
- position: relative;
110
- top: 1px;
111
- align-items: flex-start;
112
- justify-content: start;
113
- background-color: rgba($mg-color-button, 0.7);
114
- backdrop-filter: blur(10px);
115
- border-radius: $mg-radius-tab;
116
- box-shadow: -1px 5px 10px -1px rgb(0 0 0 / 0.25);
117
- inset-inline-start: 0;
118
- z-index: 1;
119
- width: 100%;
120
-
121
- // Desktop: Float over content with horizontal layout
122
- @media screen and (min-width: $mg-breakpoint-tablet) {
123
- display: none;
124
- flex-direction: row; // Horizontal layout for left/right sections
125
- height: 35rem;
126
- overflow: hidden;
127
- top: 4.8rem;
128
- position: absolute;
129
- }
130
-
131
- &.mg-container-full-width {
132
- position: absolute;
133
- }
134
-
135
- &__left {
136
- height: 100%;
137
- width: 100%; // mobile-first
138
- background-color: rgba($mg-color-button, 0.8);
139
-
140
- @media screen and (min-width: $mg-breakpoint-tablet) {
141
- flex-basis: 33%;
142
- }
143
- }
144
- &__banner {
145
- padding: $mg-spacing-250;
146
- header {
147
- font-size: $mg-font-size-500;
148
- font-weight: bold;
149
- padding-bottom: $mg-spacing-100;
150
- }
151
- p {
152
- a {
153
- text-decoration: underline;
154
- }
155
- a:hover {
156
- text-decoration: none;
157
- }
158
- }
159
- }
160
- }
161
-
162
- .mg-mega-content,
163
- .mg-mega-content__left,
164
- .mg-mega-content__right,
165
- .mg-mega-topbar__item-link {
166
- &:focus-visible {
167
- outline: -webkit-focus-ring-color auto 1px;
168
- outline-offset: 1px;
169
- }
170
- }
171
-
172
- .mg-mega-content__left {
173
- box-shadow: inset 0 5px 5px -3px rgb(0 0 0 / 0.2);
174
-
175
- // RTL-friendly border
176
- border-inline-end: 2px solid rgba($mg-color-black, 0.2);
177
-
178
- // Mobile-first: Hide section list on mobile
179
- .mg-mega-content__section-list {
180
- display: none;
181
-
182
- @media screen and (min-width: $mg-breakpoint-tablet) {
183
- display: block;
184
- }
185
- }
186
-
187
- .mg-mega-content__section-list-link:hover,
188
- .mg-mega-content__section-list-link {
189
- color: $mg-color-interactive-active;
190
- }
191
- }
192
-
193
- .mg-mega-content__section-list {
194
- padding-inline: $mg-spacing-200;
195
- }
196
-
197
- .mg-mega-content__section-list-item {
198
- list-style: none;
199
- padding: 0;
200
- margin: 0;
201
-
202
- .mg-mega-content__section-list-link {
203
- text-decoration: none;
204
- display: block;
205
-
206
- // RTL-friendly: Use logical properties for better improvements
207
- letter-spacing: 0.2px;
208
- position: relative;
209
- padding: $mg-spacing-150 $mg-spacing-250;
210
- margin-inline: -$mg-spacing-200; // extend hit area to both edges
211
- font-weight: 600;
212
- transition:
213
- background-color 150ms ease,
214
- color 150ms ease,
215
- transform 150ms ease;
216
-
217
- &:hover,
218
- &:focus-visible {
219
- background: rgba($mg-color-interactive, 0.15);
220
- text-decoration: underline;
221
- }
222
-
223
- // RTL-friendly chevron indicator
224
- &::after {
225
- content: "›";
226
- display: inline-block;
227
- position: absolute;
228
- font-size: 3rem;
229
- inset-inline-end: auto;
230
- padding-inline-start: $mg-spacing-150;
231
- margin-inline-end: $mg-spacing-150;
232
- transition:
233
- transform 150ms ease,
234
- inset-inline-start 200ms cubic-bezier(0.4, 0, 0.2, 1),
235
- inset-inline-end 200ms cubic-bezier(0.4, 0, 0.2, 1),
236
- opacity 150ms ease;
237
- opacity: 0.55;
238
- }
239
-
240
- &--active {
241
- padding: $mg-spacing-150 $mg-spacing-250;
242
- margin-inline-start: -$mg-spacing-200;
243
- border-inline-start: 4px solid $mg-color-interactive; // RTL-friendly vertical rule
244
- text-decoration: underline;
245
- background: rgba($mg-color-interactive, 0.15);
246
-
247
- &::after {
248
- opacity: 1;
249
- inset-inline-end: 0;
250
- }
251
- }
252
- }
253
- }
254
-
255
- // RTL: Flip chevron direction
256
- [dir="rtl"]
257
- .mg-mega-content__section-list-item
258
- .mg-mega-content__section-list-link::after {
259
- content: "‹";
260
- }
261
-
262
- /* Brief pulse to draw attention when active becomes visible */
263
- @keyframes mg-mega-tab-pulse {
264
- 0% {
265
- box-shadow:
266
- inset 4px 0 0 0 $mg-color-button,
267
- 0 0 0 0 rgba($mg-color-interactive, 0);
268
- }
269
- 60% {
270
- box-shadow:
271
- inset 4px 0 0 0 $mg-color-button,
272
- 0 0 0 8px rgba($mg-color-interactive, 0.12);
273
- }
274
- 100% {
275
- box-shadow:
276
- inset 4px 0 0 0 $mg-color-button,
277
- 0 0 0 0 rgba($mg-color-interactive, 0);
278
- }
279
- }
280
-
281
- .mg-mega-content__section-list-link--active {
282
- animation: mg-mega-tab-pulse 700ms ease-out 1;
283
- }
284
-
285
- /* Slide motion for right content when tab changes */
286
- @keyframes mg-mega-content-swap {
287
- 0% {
288
- transform: translateX(8px);
289
- opacity: 0.98;
290
- }
291
- 100% {
292
- transform: translateX(0);
293
- opacity: 1;
294
- }
295
- }
296
-
297
- .mg-mega-content__right--sliding {
298
- animation: mg-mega-content-swap 180ms ease-out;
299
- }
300
-
301
- /* Stronger keyboard focus ring for accessibility */
302
- .mg-mega-content__section-list-link:focus-visible {
303
- outline: 2px solid $mg-color-white;
304
- outline-offset: -2px;
305
- }
306
-
307
- .mg-mega-content__right {
308
- box-shadow: inset 0 5px 5px -3px rgb(0 0 0 / 0.2);
309
- flex: 1;
310
- height: 100%;
311
- display: flex;
312
-
313
- // Mobile-first: full width by default
314
- width: 100%;
315
-
316
- // Mobile-first: Show mobile menu, hide desktop menu
317
- .mg-mega-content__menu--mobile {
318
- display: block;
319
- }
320
-
321
- .mg-mega-content__menu--desktop {
322
- display: none;
323
- }
324
-
325
- // Desktop: Hide mobile menu, show desktop menu
326
- @media screen and (min-width: $mg-breakpoint-tablet) {
327
- .mg-mega-content__menu--mobile {
328
- display: none;
329
- }
330
-
331
- .mg-mega-content__menu--desktop {
332
- display: block;
333
-
334
- // Blue flash background that fades out (retriggered via React key)
335
- animation: mg-mega-right-flash 400ms ease-out;
336
-
337
- // Staggered slide-in for menu items
338
- li {
339
- animation: mg-mega-item-slide-in 250ms ease-out both;
340
-
341
- @for $i from 1 through 25 {
342
- &:nth-child(#{$i}) {
343
- animation-delay: #{($i - 1) * 30}ms;
344
- }
345
- }
346
- }
347
- }
348
- }
349
-
350
- ul {
351
- flex: 1;
352
- padding: $mg-spacing-150;
353
- list-style: none;
354
- column-count: auto;
355
- column-width: 300px;
356
- column-gap: $mg-spacing-200;
357
- column-fill: balance;
358
-
359
- // nested menus - RTL-friendly
360
- ul {
361
- padding-block: 0;
362
- padding-inline: $mg-spacing-150;
363
- opacity: 0.8;
364
- break-inside: avoid;
365
- }
366
-
367
- li {
368
- padding: 0;
369
- margin: 0;
370
- break-inside: avoid;
371
-
372
- a {
373
- display: block;
374
- padding: $mg-spacing-50;
375
- overflow: hidden;
376
- white-space: wrap;
377
- text-overflow: clip;
378
- color: $mg-color-black;
379
- font-weight: bold;
380
-
381
- &:hover {
382
- color: $mg-color-black;
383
- text-decoration: underline;
384
- }
385
- }
386
- }
387
- }
388
- }
389
-
390
- /* Subtle blue gradient flash that fades to transparent on right content area */
391
- @keyframes mg-mega-right-flash {
392
- 0% {
393
- background: linear-gradient(
394
- to bottom,
395
- rgba($mg-color-interactive, 0.06) 0%,
396
- transparent 100%
397
- );
398
- }
399
- 100% {
400
- background: transparent;
401
- }
402
- }
403
-
404
- /* Menu items slide in from the left */
405
- @keyframes mg-mega-item-slide-in {
406
- 0% {
407
- opacity: 0;
408
- transform: translateX(-12px);
409
- }
410
- 100% {
411
- opacity: 1;
412
- transform: translateX(0);
413
- }
414
- }
415
-
416
- .mg-icon-button {
417
- padding: $mg-spacing-100;
418
- background-color: transparent;
419
- border: none;
420
- cursor: pointer;
421
- display: flex;
422
- align-items: center;
423
- justify-content: center;
424
-
425
- &:hover {
426
- background-color: $mg-color-interactive-active;
427
- }
428
- }
429
-
430
- .mg-mega-sidebar-section {
431
- list-style: none;
432
-
433
- ol {
434
- list-style: none;
435
- margin: 0;
436
-
437
- li {
438
- margin: 0;
439
- }
440
-
441
- ol li {
442
- list-style: none;
443
- padding-block: $mg-spacing-50;
444
- padding-inline-start: $mg-spacing-350; // RTL-friendly
445
- margin: 0;
446
-
447
- a {
448
- color: $mg-color-white;
449
- text-decoration: none;
450
- }
451
-
452
- &:hover {
453
- background: $mg-color-interactive-active;
454
- }
455
- }
456
- }
457
- }
458
-
459
- .mg-mega-sidebar-section__item {
460
- display: flex;
461
- align-items: center;
462
- justify-content: space-between;
463
- color: $mg-color-white;
464
- cursor: pointer;
465
- padding: $mg-spacing-100 $mg-spacing-250;
466
-
467
- // Mobile-first: Start with mobile styles
468
- background: $mg-color-interactive;
469
- width: 100%;
470
- border: none;
471
- border-block-end: 1px solid $mg-color-white; // RTL-friendly
472
-
473
- // Desktop: Remove mobile-specific styles
474
- @media screen and (min-width: $mg-breakpoint-tablet) {
475
- background: transparent;
476
- border-block-end: none;
477
- }
478
-
479
- &:hover {
480
- background: $mg-color-interactive-active;
481
- color: $mg-color-white;
482
- }
483
-
484
- &:focus-visible {
485
- outline: -webkit-focus-ring-color auto 2px;
486
- outline-offset: -1px;
487
- }
488
-
489
- // Rotate arrow icon when section is expanded
490
- &[aria-expanded="true"] {
491
- .mg-icon-angle-circled-left {
492
- transform: rotate(-90deg);
493
- transition: transform 0.3s ease-in-out;
494
- }
495
- }
496
-
497
- // Ensure smooth transition for icon default state
498
- .mg-icon-angle-circled-left {
499
- transition: transform 0.3s ease-in-out;
500
- }
501
- }
502
-
503
- // RTL: Flip rotation direction
504
- [dir="rtl"]
505
- .mg-mega-sidebar-section__item[aria-expanded="true"]
506
- .mg-icon-angle-circled-left {
507
- transform: rotate(90deg);
508
- }
509
-
510
- .mg-mega-sidebar {
511
- position: absolute;
512
- overflow: auto;
513
- background-color: $mg-color-interactive-active;
514
- z-index: 10;
515
-
516
- // Mobile-first: Full-width mobile sidebar
517
- width: 100%;
518
- height: auto;
519
- max-height: 80vh;
520
- top: -100%;
521
- inset-inline: 0; // RTL-friendly
522
- transition: top 0.4s ease-in-out;
523
- box-shadow: 0 5px 8px -4px rgb(0 0 0 / 0.25);
524
-
525
- &.mg-sidebar-open {
526
- top: 0;
527
- }
528
-
529
- // Desktop: Side panel from end (right in LTR, left in RTL)
530
- @media screen and (min-width: $mg-breakpoint-tablet) {
531
- width: 300px;
532
- height: 100vh;
533
- top: 0;
534
- inset-inline-start: auto;
535
- inset-inline-end: 0; // RTL-friendly: appears from right in LTR, left in RTL
536
- box-shadow: -5px 0 8px -4px rgb(0 0 0 / 0.25);
537
- }
538
- }
539
-
540
- // RTL: Flip box shadow direction on desktop
541
- [dir="rtl"] .mg-mega-sidebar {
542
- @media screen and (min-width: $mg-breakpoint-tablet) {
543
- box-shadow: 5px 0 8px -4px rgb(0 0 0 / 0.25);
544
- }
545
- }
546
-
547
- .mg-mega-sidebar__list {
548
- background: $mg-color-white;
549
- display: flex;
550
- flex-direction: column;
551
- padding: 0;
552
- margin-bottom: 0;
553
- width: 100%;
554
- position: relative;
555
- inset-inline-end: auto; // RTL-friendly
556
- }
557
-
558
- .mg-mega-sidebar__section {
559
- display: flex;
560
- align-items: center;
561
- justify-content: space-between;
562
- padding: $mg-spacing-150 $mg-spacing-350;
563
- color: $mg-color-white;
564
- cursor: pointer;
565
-
566
- &:hover {
567
- background: $mg-color-interactive-active;
568
- }
569
- }
570
-
571
- .mg-mega-topbar-mobile__icon-button {
572
- // Mobile-first: Display by default
573
- position: absolute;
574
- inset-inline-end: 0; // RTL-friendly
575
- background: rgb(0 0 0 / 0); // we let the menu items show through to advertise the contents
576
- color: $mg-color-interactive;
577
- font-size: 2rem;
578
- width: 100vw;
579
- height: 100%;
580
- padding: $mg-spacing-100;
581
- border: none;
582
- cursor: pointer;
583
- align-items: start;
584
- justify-content: start;
585
- z-index: 14;
586
- display: flex;
587
-
588
- // Hide mobile button on desktop
589
- @media screen and (min-width: $mg-breakpoint-tablet) {
590
- display: none;
591
- }
592
-
593
- &:hover {
594
- // background: $mg-color-interactive-active;
595
- color: rgba($mg-color-interactive, 0.9);
596
- }
597
-
598
- .mg-mega-topbar {
599
- position: relative;
600
- }
601
-
602
- &:has(.mg-icon-angle-circled-left) {
603
- background: rgb(255 255 255 / 0.8);
604
- color: $mg-color-interactive-active;
605
- box-shadow: 0 0 4px rgb(0 0 0 / 0.2);
606
- }
607
- }
608
-
609
- // Mobile sidebar (slides down/up from the top)
610
- .mg-mega-mobile-sidebar {
611
- // Mobile-first: Show on mobile, hide on desktop
612
- width: 100%;
613
- position: absolute;
614
- top: 0;
615
- inset-inline-start: 0; // RTL-friendly
616
- z-index: 9;
617
- display: block;
618
- overflow: auto;
619
- background-color: $mg-color-interactive;
620
- max-height: 80vh;
621
- height: 80vh;
622
- transform: translateY(-100vh);
623
- transition: transform 0.4s ease-in-out;
624
- box-shadow: 0 5px 8px -4px rgb(0 0 0 / 0.25);
625
-
626
- &.mg-mega-mobile-sidebar--open {
627
- transform: translateY(calc(5rem - 2px)); // mystery math?
628
- }
629
-
630
- // Desktop: Hide completely
631
- @media screen and (min-width: $mg-breakpoint-tablet) {
632
- display: none;
633
- }
634
- }
635
-
636
- // Overlay backdrop (only shown when sidebar open)
637
- .mg-mega-mobile-sidebar-overlay {
638
- // Mobile-first: Show on mobile
639
- display: block;
640
- position: fixed;
641
- inset: 0; // Already RTL-friendly logical property
642
- background: rgb(0 0 0 / 0.4);
643
- border: none;
644
- padding: 0;
645
- cursor: pointer;
646
- z-index: 9; // just below sidebar which has 10
647
-
648
- // Desktop: Hide
649
- @media screen and (min-width: $mg-breakpoint-tablet) {
650
- display: none;
651
- }
652
- }
653
-
654
- // Arabic
655
- :lang(ar) {
656
- .mg-mega-menu__item-link {
657
- font-family: $mg-font-family-arabic-body;
658
- }
659
- }
1
+ // megamenu.scss — DEPRECATED, use mega-menu.scss
2
+ @import "./mega-menu";
3
+ @warn "megamenu.scss is deprecated. Import mega-menu.scss instead.";
@@ -24,7 +24,7 @@
24
24
  &__region--toolbar {
25
25
  display: flex;
26
26
  align-items: center;
27
- gap: 1rem;
27
+ gap: mg-rem(10);
28
28
 
29
29
  a {
30
30
  color: #fff;
@@ -41,7 +41,7 @@
41
41
 
42
42
  &__block--logo {
43
43
  flex-grow: 1;
44
- padding: 0.5rem 0 0.5rem 0.1rem;
44
+ padding: mg-rem(5) 0 mg-rem(5) 1px;
45
45
  }
46
46
 
47
47
  &__logo-img {
@@ -85,11 +85,11 @@
85
85
  padding-right: 30px;
86
86
  border: none;
87
87
  border-radius: 0;
88
- font-size: 1.65rem;
88
+ font-size: $mg-font-size-300;
89
89
  background-color: transparent;
90
90
  color: #fff;
91
91
  direction: rtl;
92
- line-height: 2rem;
92
+ line-height: mg-rem(20);
93
93
 
94
94
  option {
95
95
  color: #333;
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  span {
23
- margin: 0 0.375rem;
23
+ margin: 0 mg-rem(4);
24
24
 
25
25
  &:last-of-type {
26
26
  margin-right: 0;
@@ -102,7 +102,7 @@
102
102
  span {
103
103
  &:last-of-type {
104
104
  margin-left: 0;
105
- margin-right: 0.375rem;
105
+ margin-right: mg-rem(4);
106
106
  }
107
107
  }
108
108
  }