@orangesk/orange-design-system 3.3.1 → 3.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 (68) hide show
  1. package/build/apple--dark.svg +4 -0
  2. package/build/apple--white.svg +5 -0
  3. package/build/apple.svg +4 -0
  4. package/build/components/BodyBanner/style.css +1 -1
  5. package/build/components/BodyBanner/style.css.map +1 -1
  6. package/build/components/FeatureAccordion/style.css +1 -1
  7. package/build/components/FeatureAccordion/style.css.map +1 -1
  8. package/build/components/Footer/style.css +1 -1
  9. package/build/components/Footer/style.css.map +1 -1
  10. package/build/components/Megamenu/style.css +1 -1
  11. package/build/components/Megamenu/style.css.map +1 -1
  12. package/build/components/PromoBanner/style.css +1 -1
  13. package/build/components/PromoBanner/style.css.map +1 -1
  14. package/build/components/index.js +1 -1
  15. package/build/components/index.js.map +1 -1
  16. package/build/components/tsconfig.tsbuildinfo +1 -1
  17. package/build/components/types/index.d.ts +16 -3
  18. package/build/components/types/src/components/Megamenu/Megamenu.d.ts +8 -2
  19. package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +1 -1
  20. package/build/components/types/src/components/Megamenu/MyOrangeMobilePanel.d.ts +2 -1
  21. package/build/components/types/src/components/Megamenu/constants.d.ts +19 -2
  22. package/build/components/types/src/components/Megamenu/data.d.ts +8 -0
  23. package/build/components/types/src/components/Megamenu/shared.d.ts +40 -0
  24. package/build/huawei--dark.svg +4 -0
  25. package/build/huawei--white.svg +5 -0
  26. package/build/huawei.svg +4 -0
  27. package/build/images/phones.png +0 -0
  28. package/build/lib/base.css +1 -1
  29. package/build/lib/base.css.map +1 -1
  30. package/build/lib/components.css +1 -1
  31. package/build/lib/components.css.map +1 -1
  32. package/build/lib/footer.css +1 -1
  33. package/build/lib/footer.css.map +1 -1
  34. package/build/lib/megamenu.css +1 -1
  35. package/build/lib/megamenu.css.map +1 -1
  36. package/build/lib/megamenu.js +1 -1
  37. package/build/lib/megamenu.js.map +1 -1
  38. package/build/lib/scripts.js +1 -1
  39. package/build/lib/scripts.js.map +1 -1
  40. package/build/lib/style.css +1 -1
  41. package/build/lib/style.css.map +1 -1
  42. package/build/lib/utilities.css +1 -1
  43. package/build/lib/utilities.css.map +1 -1
  44. package/build/play--dark.svg +7 -0
  45. package/build/play--white.svg +7 -0
  46. package/build/play.svg +7 -0
  47. package/package.json +10 -10
  48. package/src/components/BodyBanner/styles/mixins.scss +6 -0
  49. package/src/components/FeatureAccordion/styles/mixins.scss +6 -0
  50. package/src/components/Megamenu/LogoJeTu.tsx +12 -7
  51. package/src/components/Megamenu/Megamenu.static.ts +1 -1
  52. package/src/components/Megamenu/Megamenu.tsx +420 -316
  53. package/src/components/Megamenu/MegamenuBlog.tsx +90 -123
  54. package/src/components/Megamenu/MyOrangeMobilePanel.tsx +116 -84
  55. package/src/components/Megamenu/constants.ts +19 -2
  56. package/src/components/Megamenu/data.ts +53 -15
  57. package/src/components/Megamenu/shared.tsx +154 -0
  58. package/src/components/Megamenu/styles/mixins.scss +307 -28
  59. package/src/components/Megamenu/styles/style.scss +91 -8
  60. package/src/components/Megamenu/tests/Megamenu.unit.test.jsx +77 -4
  61. package/src/components/PromoBanner/PromoBanner.tsx +0 -2
  62. package/src/components/PromoBanner/styles/mixins.scss +3 -4
  63. package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +3 -3
  64. package/src/styles/base/globals.scss +5 -5
  65. package/src/styles/base/styleguide.scss +1 -1
  66. package/src/styles/export/color.js +1 -1
  67. package/src/styles/shame.scss +1 -1
  68. package/src/styles/tokens/color.scss +1 -1
@@ -1,6 +1,5 @@
1
1
  import cx from "classnames";
2
2
  import React from "react";
3
- import { BrandMark } from "./BrandMark";
4
3
  import {
5
4
  CLASS_ACCORDION,
6
5
  CLASS_ACCORDION_BODY,
@@ -13,27 +12,29 @@ import {
13
12
  CLASS_CARD,
14
13
  CLASS_CONTAINER,
15
14
  CLASS_GRID,
15
+ CLASS_HIDE_LG_ONLY,
16
16
  CLASS_HIDE_LG_UP,
17
17
  CLASS_HIDE_MD_DOWN,
18
18
  CLASS_MAIN,
19
- CLASS_MOBILE,
20
19
  CLASS_MOBILE_BODY,
20
+ CLASS_MOBILE_CTA,
21
21
  CLASS_MOBILE_HEADER,
22
- CLASS_MOBILE_OVERLAY,
23
- CLASS_MOBILE_WRAPPER,
24
22
  CLASS_NAV,
25
23
  CLASS_NAV_BUTTON,
26
24
  CLASS_NAV_BUTTON_INDICATOR,
27
25
  CLASS_NAV_CART_ICON,
28
26
  CLASS_NAV_DROPDOWN,
29
27
  CLASS_NAV_ICON,
28
+ CLASS_NAV_ICON_CTA,
30
29
  CLASS_NAV_ITEM,
31
30
  CLASS_NAV_ITEM_LEAD,
32
31
  CLASS_NAV_ITEM_MAIN,
33
32
  CLASS_NAV_LINK,
33
+ CLASS_NAV_LINK_CTA,
34
34
  CLASS_NAV_LINK_LOCALE,
35
- CLASS_NAV_LOGO,
36
35
  CLASS_NAV_MOBILE_LOCALE,
36
+ CLASS_NAV_SELECT,
37
+ CLASS_NAV_SELECT_WRAPPER,
37
38
  CLASS_NAV_SPACE_SMALL,
38
39
  CLASS_NAV_SPACER,
39
40
  CLASS_NAV_VERTICAL,
@@ -46,22 +47,44 @@ import {
46
47
  CLASS_TAG_ORANGE,
47
48
  CLASS_TAG_SMALL,
48
49
  CLASS_TEXT_LARGE,
50
+ CLASS_TILE,
51
+ CLASS_TILE_BODY,
52
+ CLASS_TILE_CONTENT,
53
+ CLASS_TILE_LABEL,
54
+ CLASS_TILES,
49
55
  CLASS_TOP,
50
56
  } from "./constants";
51
- import { MenuItem, MenuSection, menuSections } from "./data";
57
+ import {
58
+ MegamenuTile,
59
+ MenuItem,
60
+ MenuSection,
61
+ megamenuTiles,
62
+ menuSections,
63
+ } from "./data";
52
64
  import { getMegamenuIds } from "./ids";
53
- import { Logo } from "./Logo";
54
65
  import { MegamenuIcon } from "./MegaMenuIcon";
55
66
  import { MegamenuSearchContent } from "./MegamenuSearchContent";
56
67
  import { MyOrangeMobilePanel } from "./MyOrangeMobilePanel";
68
+ import {
69
+ getMegamenuSearchState,
70
+ MegamenuCloseButton,
71
+ MegamenuLogoLink,
72
+ MegamenuMobilePanel,
73
+ MegamenuSearchDropdown,
74
+ } from "./shared";
57
75
 
58
76
  export type MegamenuProps = {
59
77
  className?: string;
60
78
  title?: string;
61
- isSticky?: boolean;
79
+ notSticky?: boolean;
62
80
  searchEmpty?: boolean;
63
81
  searchFilled?: boolean;
64
82
  compactLogoOnly?: boolean;
83
+ isB2B?: boolean;
84
+ /** Optional number of items displayed on the cart badge. */
85
+ cartItems?: number;
86
+ /** Tiles displayed below every desktop and mobile menu section. */
87
+ tiles?: MegamenuTile[];
65
88
  };
66
89
 
67
90
  const renderMenuItems = (items: MenuItem[]) => (
@@ -84,54 +107,71 @@ const renderMenuItems = (items: MenuItem[]) => (
84
107
  </>
85
108
  );
86
109
 
110
+ const renderMenuTiles = (tiles: MegamenuTile[]) => (
111
+ <div className={CLASS_TILES} aria-label="Rýchly prístup">
112
+ {tiles.map((tile, index) => {
113
+ const isActive = tile.isActive ?? index === 0;
114
+
115
+ return (
116
+ <a
117
+ className={cx(CLASS_TILE, { "is-active": isActive })}
118
+ href={tile.href ?? "/"}
119
+ key={tile.label}
120
+ >
121
+ <div className={CLASS_TILE_BODY}>
122
+ <MegamenuIcon
123
+ name={tile.icon}
124
+ width={32}
125
+ height={32}
126
+ aria-hidden="true"
127
+ />
128
+ <span className={CLASS_TILE_CONTENT}>
129
+ <strong className={CLASS_TILE_LABEL}>{tile.label}</strong>
130
+ {tile.tag ? (
131
+ <span
132
+ className={cx(CLASS_TAG, CLASS_TAG_ORANGE, CLASS_TAG_SMALL)}
133
+ >
134
+ {tile.tag}
135
+ </span>
136
+ ) : null}
137
+ </span>
138
+ </div>
139
+ </a>
140
+ );
141
+ })}
142
+ </div>
143
+ );
144
+
87
145
  const renderMenuSectionGrid = (
88
146
  section: MenuSection,
89
147
  idPrefix: string,
90
148
  captionClass: string,
91
149
  mergeColumnsToSingleCard = false,
150
+ tiles: MegamenuTile[] = megamenuTiles,
151
+ tilesBeforeGrid = false,
92
152
  ) => {
93
153
  const featuredHeadingId = `${idPrefix}-${section.id}-${section.featured.id}`;
94
154
 
95
155
  return (
96
- <div className={CLASS_GRID}>
97
- <div className={cx(CLASS_CARD, "is-highlighted")}>
98
- <h3 id={featuredHeadingId} className="sr-only">
99
- {section.featured.heading}
100
- </h3>
101
- <ul
102
- className={CLASS_SUBNAV}
103
- role="group"
104
- aria-labelledby={featuredHeadingId}
105
- >
106
- {renderMenuItems(section.featured.items)}
107
- </ul>
108
- </div>
109
-
110
- {mergeColumnsToSingleCard ? (
111
- <div className={CLASS_CARD}>
112
- {section.columns.flat().map((group) => {
113
- const headingId = `${idPrefix}-${section.id}-${group.id}-heading`;
114
-
115
- return (
116
- <React.Fragment key={group.id}>
117
- <p id={headingId} className={captionClass}>
118
- {group.heading}
119
- </p>
120
- <ul
121
- className={CLASS_SUBNAV}
122
- role="group"
123
- aria-labelledby={headingId}
124
- >
125
- {renderMenuItems(group.items)}
126
- </ul>
127
- </React.Fragment>
128
- );
129
- })}
156
+ <>
157
+ <div className={CLASS_GRID}>
158
+ {tilesBeforeGrid ? renderMenuTiles(tiles) : null}
159
+ <div className={cx(CLASS_CARD, "is-highlighted")}>
160
+ <h3 id={featuredHeadingId} className="sr-only">
161
+ {section.featured.heading}
162
+ </h3>
163
+ <ul
164
+ className={CLASS_SUBNAV}
165
+ role="group"
166
+ aria-labelledby={featuredHeadingId}
167
+ >
168
+ {renderMenuItems(section.featured.items)}
169
+ </ul>
130
170
  </div>
131
- ) : (
132
- section.columns.map((groups, columnIndex) => (
133
- <div className={CLASS_CARD} key={`${section.id}-${columnIndex}`}>
134
- {groups.map((group) => {
171
+
172
+ {mergeColumnsToSingleCard ? (
173
+ <div className={CLASS_CARD}>
174
+ {section.columns.flat().map((group) => {
135
175
  const headingId = `${idPrefix}-${section.id}-${group.id}-heading`;
136
176
 
137
177
  return (
@@ -150,31 +190,57 @@ const renderMenuSectionGrid = (
150
190
  );
151
191
  })}
152
192
  </div>
153
- ))
154
- )}
155
- </div>
193
+ ) : (
194
+ section.columns.map((groups, columnIndex) => (
195
+ <div className={CLASS_CARD} key={`${section.id}-${columnIndex}`}>
196
+ {groups.map((group) => {
197
+ const headingId = `${idPrefix}-${section.id}-${group.id}-heading`;
198
+
199
+ return (
200
+ <React.Fragment key={group.id}>
201
+ <p id={headingId} className={captionClass}>
202
+ {group.heading}
203
+ </p>
204
+ <ul
205
+ className={CLASS_SUBNAV}
206
+ role="group"
207
+ aria-labelledby={headingId}
208
+ >
209
+ {renderMenuItems(group.items)}
210
+ </ul>
211
+ </React.Fragment>
212
+ );
213
+ })}
214
+ </div>
215
+ ))
216
+ )}
217
+ </div>
218
+ {!tilesBeforeGrid ? renderMenuTiles(tiles) : null}
219
+ </>
156
220
  );
157
221
  };
158
222
 
159
223
  export const Megamenu = ({
160
224
  className,
161
225
  title = "Človek",
162
- isSticky = true,
226
+ notSticky = false,
163
227
  searchEmpty,
164
228
  searchFilled,
165
229
  compactLogoOnly = false,
230
+ isB2B = false,
231
+ cartItems,
232
+ tiles = megamenuTiles,
166
233
  }: MegamenuProps) => {
167
234
  const ids = getMegamenuIds("main");
168
- const hasSearchEmpty = Boolean(searchEmpty);
169
- const hasSearchFilled = Boolean(searchFilled);
170
- const showSearchState = hasSearchEmpty || hasSearchFilled;
171
- const searchValue = hasSearchEmpty ? "" : hasSearchFilled ? "apple" : "";
235
+ const { hasSearchEmpty, hasSearchFilled, showSearchState, searchValue } =
236
+ getMegamenuSearchState(searchEmpty, searchFilled);
237
+ const hasCartItems = cartItems !== undefined;
172
238
 
173
239
  return (
174
240
  <header>
175
241
  <nav
176
242
  className={cx(CLASS_ROOT, className, {
177
- "is-sticky": isSticky,
243
+ "non-sticky": notSticky,
178
244
  })}
179
245
  data-megamenu
180
246
  aria-label="Main navigation"
@@ -199,7 +265,12 @@ export const Megamenu = ({
199
265
  </li>
200
266
  <li className={CLASS_NAV_ITEM}>
201
267
  <a href="/" className={CLASS_NAV_LINK}>
202
- Pre biznis
268
+ Podnikatelia a malé firmy
269
+ </a>
270
+ </li>
271
+ <li className={CLASS_NAV_ITEM}>
272
+ <a href="/" className={CLASS_NAV_LINK}>
273
+ Velké firmy
203
274
  </a>
204
275
  </li>
205
276
 
@@ -235,13 +306,10 @@ export const Megamenu = ({
235
306
  <div className={CLASS_CONTAINER}>
236
307
  <ul className={CLASS_NAV} aria-label="Hlavné menu">
237
308
  <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_MAIN)}>
238
- <a
239
- href="/"
240
- className={CLASS_NAV_LOGO}
241
- aria-label={`${title} - Domovská stránka`}
242
- >
243
- {compactLogoOnly ? <Logo /> : <BrandMark />}
244
- </a>
309
+ <MegamenuLogoLink
310
+ compactLogoOnly={compactLogoOnly}
311
+ title={title}
312
+ />
245
313
  </li>
246
314
  {menuSections.map((section) => (
247
315
  <li
@@ -270,6 +338,8 @@ export const Megamenu = ({
270
338
  section,
271
339
  "megamenu",
272
340
  CLASS_CAPTION,
341
+ false,
342
+ tiles,
273
343
  )}
274
344
  </div>
275
345
  </div>
@@ -297,8 +367,29 @@ export const Megamenu = ({
297
367
  Pomoc
298
368
  </a>
299
369
  </li>
370
+ <li
371
+ className={cx(
372
+ CLASS_NAV_ITEM,
373
+ CLASS_NAV_ITEM_MAIN,
374
+ CLASS_HIDE_MD_DOWN,
375
+ )}
376
+ >
377
+ <a href="/" className={CLASS_NAV_LINK_CTA}>
378
+ <MegamenuIcon
379
+ width={16}
380
+ height={16}
381
+ name="rewards"
382
+ className={CLASS_NAV_ICON_CTA}
383
+ aria-hidden="true"
384
+ />
385
+ Prejdite k nám
386
+ </a>
387
+ </li>
300
388
 
301
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
389
+ <li
390
+ className={cx(CLASS_NAV_SPACER, CLASS_HIDE_LG_ONLY)}
391
+ aria-hidden="true"
392
+ ></li>
302
393
 
303
394
  <li className={cx(CLASS_NAV_ITEM, CLASS_HIDE_MD_DOWN)}>
304
395
  <button
@@ -317,41 +408,52 @@ export const Megamenu = ({
317
408
  />
318
409
  </button>
319
410
 
320
- <div
321
- className={cx(CLASS_NAV_DROPDOWN, "is-spaced")}
322
- id={ids.searchDropdownId}
323
- >
324
- <div className={CLASS_CONTAINER}>
325
- <MegamenuSearchContent
326
- inputId={ids.searchInputDesktopId}
327
- inputLabel="Vyhľadávanie v hlavnom menu"
328
- searchValue={searchValue}
329
- hasSearchEmpty={hasSearchEmpty}
330
- hasSearchFilled={hasSearchFilled}
331
- emptyStateLinkHref="/"
332
- />
333
- </div>
334
- </div>
411
+ <MegamenuSearchDropdown
412
+ dropdownId={ids.searchDropdownId}
413
+ inputId={ids.searchInputDesktopId}
414
+ inputLabel="Vyhľadávanie v hlavnom menu"
415
+ searchValue={searchValue}
416
+ hasSearchEmpty={hasSearchEmpty}
417
+ hasSearchFilled={hasSearchFilled}
418
+ emptyStateLinkHref="/"
419
+ />
335
420
  </li>
336
421
  <li className={cx(CLASS_NAV_ITEM)}>
337
422
  <a
338
423
  href="/"
339
424
  className={cx(CLASS_NAV_LINK)}
340
- aria-label="Košík, 1 položka"
425
+ aria-label={
426
+ hasCartItems ? `Košík, ${cartItems} položka` : "Košík"
427
+ }
341
428
  >
342
- <span
343
- className={CLASS_NAV_CART_ICON}
344
- data-items-in-cart="1"
345
- aria-hidden="true"
346
- >
347
- <MegamenuIcon
348
- width={24}
349
- height={24}
350
- name="buy"
429
+ {hasCartItems ? (
430
+ <span
431
+ className={CLASS_NAV_CART_ICON}
432
+ data-items-in-cart={cartItems}
351
433
  aria-hidden="true"
352
- />
353
- </span>
354
- <span className="sr-only">1 položka v košíku</span>
434
+ >
435
+ <MegamenuIcon
436
+ width={24}
437
+ height={24}
438
+ name="buy"
439
+ aria-hidden="true"
440
+ />
441
+ </span>
442
+ ) : (
443
+ <span className={CLASS_NAV_CART_ICON} aria-hidden="true">
444
+ <MegamenuIcon
445
+ width={24}
446
+ height={24}
447
+ name="buy"
448
+ aria-hidden="true"
449
+ />
450
+ </span>
451
+ )}
452
+ {hasCartItems ? (
453
+ <span className="sr-only">
454
+ {cartItems} položka v košíku
455
+ </span>
456
+ ) : null}
355
457
  </a>
356
458
  </li>
357
459
  <li className={CLASS_NAV_ITEM}>
@@ -397,250 +499,252 @@ export const Megamenu = ({
397
499
 
398
500
  {/* MOBILE MENU */}
399
501
 
400
- <div
401
- // className={cx(CLASS_MOBILE, "is-active")}
402
- className={cx(CLASS_MOBILE)}
403
- data-megamenu-mobile-panel="main"
404
- id={ids.mobileMainPanelId}
405
- role="dialog"
406
- aria-modal="true"
407
- aria-labelledby={ids.mobileMainTitleId}
408
- aria-hidden="true"
502
+ <MegamenuMobilePanel
503
+ panelId={ids.mobileMainPanelId}
504
+ titleId={ids.mobileMainTitleId}
505
+ target="main"
506
+ title="Hlavné menu"
507
+ overlayAriaLabel="Zatvoriť menu"
409
508
  >
410
- <span id={ids.mobileMainTitleId} className="sr-only">
411
- Hlavné menu
412
- </span>
413
- <button
414
- aria-label="Zatvoriť menu"
415
- className={CLASS_MOBILE_OVERLAY}
416
- type="button"
417
- />
418
-
419
- <div className={CLASS_MOBILE_WRAPPER}>
420
- <div className={CLASS_MOBILE_HEADER}>
421
- <div className={CLASS_CONTAINER}>
422
- <ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
423
- <li className={CLASS_NAV_ITEM}>
424
- <a
425
- href="/"
426
- className={cx(CLASS_NAV_LINK, "is-active")}
427
- aria-current="page"
509
+ <div className={CLASS_MOBILE_HEADER}>
510
+ <div className={CLASS_CONTAINER}>
511
+ <ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
512
+ <li className={CLASS_NAV_ITEM}>
513
+ <div
514
+ className={cx(
515
+ CLASS_NAV_BUTTON,
516
+ CLASS_NAV_BUTTON_INDICATOR,
517
+ CLASS_NAV_SELECT_WRAPPER,
518
+ )}
519
+ >
520
+ <select
521
+ className={CLASS_NAV_SELECT}
522
+ defaultValue="/"
523
+ aria-label="Vyberte typ zákazníka"
428
524
  >
429
- Pre vás
430
- </a>
431
- </li>
432
- <li className={CLASS_NAV_ITEM}>
433
- <a href="/" className={CLASS_NAV_LINK}>
434
- Pre biznis
435
- </a>
436
- </li>
525
+ <option value="/">Pre vás</option>
526
+ <option value="/">Podnikatelia a malé firmy</option>
527
+ <option value="/">Velké firmy</option>
528
+ </select>
529
+ </div>
530
+ </li>
437
531
 
438
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
532
+ <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
439
533
 
440
- <li className={CLASS_NAV_ITEM}>
441
- <button
442
- type="button"
443
- data-megamenu-close-button
444
- data-megamenu-mobile-target="main"
445
- className={CLASS_NAV_BUTTON}
446
- aria-label="Zatvoriť menu"
447
- >
448
- <MegamenuIcon
449
- name="close"
450
- width={20}
451
- height={20}
452
- aria-hidden="true"
453
- />
454
- </button>
455
- </li>
456
- </ul>
457
- </div>
534
+ <li className={CLASS_NAV_ITEM}>
535
+ <MegamenuCloseButton
536
+ ariaLabel="Zatvoriť menu"
537
+ target="main"
538
+ />
539
+ </li>
540
+ </ul>
541
+ </div>
542
+ </div>
543
+ <div className={CLASS_MOBILE_BODY}>
544
+ <div className={CLASS_CONTAINER}>
545
+ <MegamenuSearchContent
546
+ inputId={ids.searchInputMobileId}
547
+ inputLabel="Vyhľadávanie v mobilnom menu"
548
+ searchValue={searchValue}
549
+ hasSearchEmpty={hasSearchEmpty}
550
+ hasSearchFilled={hasSearchFilled}
551
+ />
458
552
  </div>
459
- <div className={CLASS_MOBILE_BODY}>
460
- <div className={CLASS_CONTAINER}>
461
- <MegamenuSearchContent
462
- inputId={ids.searchInputMobileId}
463
- inputLabel="Vyhľadávanie v mobilnom menu"
464
- searchValue={searchValue}
465
- hasSearchEmpty={hasSearchEmpty}
466
- hasSearchFilled={hasSearchFilled}
467
- />
468
553
 
469
- {!showSearchState ? (
470
- <>
471
- <ul className={CLASS_ACCORDION}>
472
- {menuSections.map((section) => {
473
- const accordionId = `mobile-accordion-${section.id}`;
474
- const buttonId = `mobile-${section.id}-button`;
554
+ <div className={CLASS_CONTAINER}>
555
+ {!showSearchState ? (
556
+ <>
557
+ <ul className={CLASS_ACCORDION}>
558
+ {menuSections.map((section) => {
559
+ const accordionId = `mobile-accordion-${section.id}`;
560
+ const buttonId = `mobile-${section.id}-button`;
475
561
 
476
- return (
477
- <li className={CLASS_ACCORDION_ITEM} key={section.id}>
478
- <div className={CLASS_ACCORDION_HEADER}>
479
- <button
480
- type="button"
481
- className={CLASS_ACCORDION_BUTTON}
482
- aria-controls={accordionId}
483
- aria-expanded="false"
484
- data-accordion-toggle
485
- id={buttonId}
486
- >
487
- <span className={CLASS_ACCORDION_TITLE}>
488
- {section.label}
489
- </span>
490
- <MegamenuIcon
491
- name="chevron-right"
492
- width={24}
493
- height={24}
494
- className={CLASS_ACCORDION_ICON}
495
- aria-hidden="true"
496
- />
497
- </button>
498
- </div>
499
- <div
500
- className={CLASS_ACCORDION_BODY}
501
- id={accordionId}
502
- role="region"
503
- aria-labelledby={buttonId}
562
+ return (
563
+ <li className={CLASS_ACCORDION_ITEM} key={section.id}>
564
+ <div className={CLASS_ACCORDION_HEADER}>
565
+ <button
566
+ type="button"
567
+ className={CLASS_ACCORDION_BUTTON}
568
+ aria-controls={accordionId}
569
+ aria-expanded="false"
570
+ data-accordion-toggle
571
+ id={buttonId}
504
572
  >
505
- {renderMenuSectionGrid(
506
- section,
507
- "mobile",
508
- CLASS_CAPTION,
509
- true,
510
- )}
511
- </div>
512
- </li>
513
- );
514
- })}
515
-
516
- <li className={CLASS_ACCORDION_ITEM}>
517
- <div className={CLASS_ACCORDION_HEADER}>
518
- <a href="/" className={CLASS_ACCORDION_BUTTON}>
519
- <span className={CLASS_ACCORDION_TITLE}>Akcie</span>
520
- </a>
521
- </div>
522
- </li>
523
-
524
- <li className={CLASS_ACCORDION_ITEM}>
525
- <div className={CLASS_ACCORDION_HEADER}>
526
- <a href="/" className={CLASS_ACCORDION_BUTTON}>
527
- <span className={CLASS_ACCORDION_TITLE}>Pomoc</span>
528
- </a>
529
- </div>
530
- </li>
531
- </ul>
573
+ <span className={CLASS_ACCORDION_TITLE}>
574
+ {section.label}
575
+ </span>
576
+ <MegamenuIcon
577
+ name="chevron-right"
578
+ width={24}
579
+ height={24}
580
+ className={CLASS_ACCORDION_ICON}
581
+ aria-hidden="true"
582
+ />
583
+ </button>
584
+ </div>
585
+ <div
586
+ className={CLASS_ACCORDION_BODY}
587
+ id={accordionId}
588
+ role="region"
589
+ aria-labelledby={buttonId}
590
+ >
591
+ {renderMenuSectionGrid(
592
+ section,
593
+ "mobile",
594
+ CLASS_CAPTION,
595
+ true,
596
+ tiles,
597
+ true,
598
+ )}
599
+ </div>
600
+ </li>
601
+ );
602
+ })}
532
603
 
533
- <ul
534
- className={cx(
535
- CLASS_NAV,
536
- CLASS_NAV_SPACE_SMALL,
537
- CLASS_NAV_MOBILE_LOCALE,
538
- )}
539
- aria-label="Výber jazyka"
540
- >
541
- <li className={CLASS_NAV_ITEM}>
542
- <a
543
- href="/"
544
- className={cx(
545
- CLASS_NAV_LINK,
546
- CLASS_NAV_LINK_LOCALE,
547
- "is-active",
548
- )}
549
- >
550
- SK
604
+ <li className={CLASS_ACCORDION_ITEM}>
605
+ <div className={CLASS_ACCORDION_HEADER}>
606
+ <a href="/" className={CLASS_ACCORDION_BUTTON}>
607
+ <span className={CLASS_ACCORDION_TITLE}>Akcie</span>
551
608
  </a>
552
- </li>
553
- <li className={CLASS_NAV_ITEM}>
554
- <a
555
- href="/"
556
- className={cx(CLASS_NAV_LINK, CLASS_NAV_LINK_LOCALE)}
557
- >
558
- EN
559
- </a>
560
- </li>
561
- </ul>
562
- </>
563
- ) : null}
564
- </div>
609
+ </div>
610
+ </li>
565
611
 
566
- {!showSearchState ? (
567
- <>
568
- <hr className="mt-none" />
569
- <div className={CLASS_CONTAINER}>
570
- <h3 id="mobile-quick-access-heading" className="sr-only">
571
- Rýchly prístup
572
- </h3>
573
- <ul
574
- className={cx(CLASS_NAV, CLASS_NAV_VERTICAL)}
575
- role="group"
576
- aria-labelledby="mobile-quick-access-heading"
577
- >
578
- <li className={CLASS_NAV_ITEM}>
579
- <button
580
- type="button"
581
- className={CLASS_NAV_BUTTON}
582
- data-megamenu-mobile-toggle
583
- data-megamenu-mobile-target="my-orange"
584
- aria-haspopup="dialog"
585
- aria-expanded="false"
586
- >
587
- <MegamenuIcon
588
- width={24}
589
- height={24}
590
- name="user"
591
- className={CLASS_NAV_ICON}
592
- aria-hidden="true"
593
- />
594
- Môj Orange
595
- </button>
596
- </li>
597
- <li className={CLASS_NAV_ITEM}>
598
- <a href="/" className={CLASS_NAV_BUTTON}>
599
- <MegamenuIcon
600
- width={24}
601
- height={24}
602
- name="call"
603
- className={CLASS_NAV_ICON}
604
- aria-hidden="true"
605
- />
606
- Kontakt
607
- </a>
608
- </li>
609
- <li className={CLASS_NAV_ITEM}>
610
- <a href="/" className={CLASS_NAV_BUTTON}>
611
- <MegamenuIcon
612
- width={24}
613
- height={24}
614
- name="advertising"
615
- className={CLASS_NAV_ICON}
616
- aria-hidden="true"
617
- />
618
- Akcie
612
+ <li className={CLASS_ACCORDION_ITEM}>
613
+ <div className={CLASS_ACCORDION_HEADER}>
614
+ <a href="/" className={CLASS_ACCORDION_BUTTON}>
615
+ <span className={CLASS_ACCORDION_TITLE}>Pomoc</span>
619
616
  </a>
620
- </li>
621
- <li className={CLASS_NAV_ITEM}>
622
- <a href="/" className={CLASS_NAV_BUTTON}>
623
- <MegamenuIcon
624
- width={24}
625
- height={24}
626
- name="newspaper"
627
- className={CLASS_NAV_ICON}
628
- aria-hidden="true"
629
- />
630
- Pomoc
631
- </a>
632
- </li>
633
- </ul>
634
- </div>
617
+ </div>
618
+ </li>
619
+ </ul>
635
620
  </>
636
621
  ) : null}
637
622
  </div>
623
+
624
+ {!showSearchState ? (
625
+ <>
626
+ <div className={CLASS_CONTAINER}>
627
+ <div className={CLASS_MOBILE_CTA}>
628
+ <a href="/" className={CLASS_NAV_LINK_CTA}>
629
+ <MegamenuIcon
630
+ width={16}
631
+ height={16}
632
+ name="rewards"
633
+ className={CLASS_NAV_ICON_CTA}
634
+ aria-hidden="true"
635
+ />
636
+ Prejdite k nám
637
+ </a>
638
+ </div>
639
+ </div>
640
+
641
+ <div className={CLASS_CONTAINER}>
642
+ <h3 id="mobile-quick-access-heading" className="sr-only">
643
+ Rýchly prístup
644
+ </h3>
645
+ <ul
646
+ className={cx(CLASS_NAV, CLASS_NAV_VERTICAL)}
647
+ role="group"
648
+ aria-labelledby="mobile-quick-access-heading"
649
+ >
650
+ <li className={CLASS_NAV_ITEM}>
651
+ <button
652
+ type="button"
653
+ className={CLASS_NAV_BUTTON}
654
+ data-megamenu-mobile-toggle
655
+ data-megamenu-mobile-target="my-orange"
656
+ aria-haspopup="dialog"
657
+ aria-expanded="false"
658
+ >
659
+ <MegamenuIcon
660
+ width={24}
661
+ height={24}
662
+ name="user"
663
+ className={CLASS_NAV_ICON}
664
+ aria-hidden="true"
665
+ />
666
+ Môj Orange
667
+ </button>
668
+ </li>
669
+ <li className={CLASS_NAV_ITEM}>
670
+ <a href="/" className={CLASS_NAV_BUTTON}>
671
+ <MegamenuIcon
672
+ width={24}
673
+ height={24}
674
+ name="call"
675
+ className={CLASS_NAV_ICON}
676
+ aria-hidden="true"
677
+ />
678
+ Kontakt
679
+ </a>
680
+ </li>
681
+ <li className={CLASS_NAV_ITEM}>
682
+ <a href="/" className={CLASS_NAV_BUTTON}>
683
+ <MegamenuIcon
684
+ width={24}
685
+ height={24}
686
+ name="advertising"
687
+ className={CLASS_NAV_ICON}
688
+ aria-hidden="true"
689
+ />
690
+ Akcie
691
+ </a>
692
+ </li>
693
+ <li className={CLASS_NAV_ITEM}>
694
+ <a href="/" className={CLASS_NAV_BUTTON}>
695
+ <MegamenuIcon
696
+ width={24}
697
+ height={24}
698
+ name="newspaper"
699
+ className={CLASS_NAV_ICON}
700
+ aria-hidden="true"
701
+ />
702
+ Pomoc
703
+ </a>
704
+ </li>
705
+ </ul>
706
+ </div>
707
+
708
+ <div className={CLASS_CONTAINER}>
709
+ <ul
710
+ className={cx(
711
+ CLASS_NAV,
712
+ CLASS_NAV_SPACE_SMALL,
713
+ CLASS_NAV_MOBILE_LOCALE,
714
+ )}
715
+ aria-label="Výber jazyka"
716
+ >
717
+ <li className={CLASS_NAV_ITEM}>
718
+ <a
719
+ href="/"
720
+ className={cx(
721
+ CLASS_NAV_LINK,
722
+ CLASS_NAV_LINK_LOCALE,
723
+ "is-active",
724
+ )}
725
+ >
726
+ SK
727
+ </a>
728
+ </li>
729
+ <li className={CLASS_NAV_ITEM}>
730
+ <a
731
+ href="/"
732
+ className={cx(CLASS_NAV_LINK, CLASS_NAV_LINK_LOCALE)}
733
+ >
734
+ EN
735
+ </a>
736
+ </li>
737
+ </ul>
738
+ </div>
739
+ </>
740
+ ) : null}
638
741
  </div>
639
- </div>
742
+ </MegamenuMobilePanel>
640
743
 
641
744
  <MyOrangeMobilePanel
642
745
  panelId={ids.myOrangePanelId}
643
746
  titleId={ids.myOrangeTitleId}
747
+ isB2B={isB2B}
644
748
  />
645
749
 
646
750
  <button