@orangesk/orange-design-system 2.0.0-beta.30 → 2.0.0-beta.32
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 +7 -7
- package/build/appstore.svg +31 -0
- package/build/components/Breadcrumbs/style.css +1 -1
- package/build/components/Breadcrumbs/style.css.map +1 -1
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Carousel/style.css.map +1 -1
- package/build/components/Footer/style.css +1 -1
- package/build/components/Footer/style.css.map +1 -1
- package/build/components/Megamenu/style.css +1 -1
- package/build/components/Megamenu/style.css.map +1 -1
- package/build/components/Preview/style.css +1 -1
- package/build/components/Preview/style.css.map +1 -1
- package/build/components/PromoBanner/style.css +1 -1
- package/build/components/PromoBanner/style.css.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +17 -2
- package/build/components/types/src/components/Carousel/Carousel.static.d.ts +1 -11
- package/build/components/types/src/components/Footer/Footer.static.d.ts +21 -0
- package/build/components/types/src/components/Footer/constants.d.ts +12 -2
- package/build/components/types/src/components/Footer/data.d.ts +5 -0
- package/build/components/types/src/components/Footer/static.d.ts +21 -0
- package/build/components/types/src/components/Megamenu/Megamenu.d.ts +4 -2
- package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +16 -5
- package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +1 -1
- package/build/components/types/src/components/Megamenu/MegamenuSearchContent.d.ts +10 -0
- package/build/components/types/src/components/Megamenu/MyOrangeMobilePanel.d.ts +6 -0
- package/build/components/types/src/components/Megamenu/constants.d.ts +15 -0
- package/build/components/types/src/components/Megamenu/data.d.ts +21 -0
- package/build/components/types/src/components/Megamenu/ids.d.ts +11 -0
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +5 -1
- package/build/components/types/src/components/index.d.ts +2 -1
- package/build/googleplay.svg +52 -0
- package/build/lib/base.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.css +1 -1
- package/build/lib/footer.css.map +1 -1
- package/build/lib/footer.js +2 -0
- package/build/lib/footer.js.map +1 -0
- package/build/lib/megamenu.css +1 -1
- package/build/lib/megamenu.css.map +1 -1
- package/build/lib/megamenu.js +1 -1
- package/build/lib/megamenu.js.map +1 -1
- package/build/lib/scripts.js +1 -1
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/build/lib/utilities.css +1 -1
- package/build/lib/utilities.css.map +1 -1
- package/build/search-index.json +8 -4
- package/package.json +12 -12
- package/src/components/Breadcrumbs/styles/mixins.scss +6 -1
- package/src/components/Carousel/Carousel.static.ts +60 -89
- package/src/components/Carousel/styles/mixins.scss +4 -12
- package/src/components/Footer/Footer.static.ts +130 -0
- package/src/components/Footer/Footer.tsx +142 -62
- package/src/components/Footer/constants.ts +12 -2
- package/src/components/Footer/data.ts +13 -0
- package/src/components/Footer/static.ts +59 -0
- package/src/components/Footer/styles/mixins.scss +122 -18
- package/src/components/Footer/styles/style.scss +63 -4
- package/src/components/Footer/tests/Footer.unit.test.js +2 -2
- package/src/components/Megamenu/Megamenu.static.ts +200 -90
- package/src/components/Megamenu/Megamenu.tsx +363 -615
- package/src/components/Megamenu/MegamenuBlog.tsx +192 -73
- package/src/components/Megamenu/MegamenuSearchContent.tsx +74 -0
- package/src/components/Megamenu/MyOrangeMobilePanel.tsx +127 -0
- package/src/components/Megamenu/constants.ts +15 -0
- package/src/components/Megamenu/data.ts +231 -0
- package/src/components/Megamenu/ids.ts +35 -0
- package/src/components/Megamenu/styles/mixins.scss +223 -16
- package/src/components/Megamenu/styles/style.scss +64 -0
- package/src/components/Preview/styles/style.scss +2 -1
- package/src/components/PromoBanner/PromoBanner.tsx +12 -1
- package/src/components/PromoBanner/styles/mixins.scss +31 -7
- package/src/components/PromoBanner/styles/style.scss +41 -0
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.js +44 -0
- package/src/components/index.ts +3 -0
- package/src/styles/utilities/horizontal-scroll.scss +28 -11
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import cx from "classnames";
|
|
2
2
|
|
|
3
3
|
import { MegamenuIcon } from "./MegaMenuIcon";
|
|
4
|
+
import { MegamenuSearchContent } from "./MegamenuSearchContent";
|
|
5
|
+
import { MyOrangeMobilePanel } from "./MyOrangeMobilePanel";
|
|
6
|
+
import { getMegamenuIds } from "./ids";
|
|
4
7
|
import {
|
|
5
8
|
CLASS_CONTAINER,
|
|
6
9
|
CLASS_HIDE_MD_DOWN,
|
|
@@ -11,8 +14,10 @@ import {
|
|
|
11
14
|
CLASS_NAV_DROPDOWN,
|
|
12
15
|
CLASS_NAV_ICON,
|
|
13
16
|
CLASS_NAV_ITEM,
|
|
17
|
+
CLASS_NAV_VERTICAL,
|
|
14
18
|
CLASS_NAV_ITEM_MAIN,
|
|
15
19
|
CLASS_NAV_LINK,
|
|
20
|
+
CLASS_NAV_LINK_NO_LINE,
|
|
16
21
|
CLASS_NAV_LOGO,
|
|
17
22
|
CLASS_NAV_SPACER,
|
|
18
23
|
CLASS_ROOT,
|
|
@@ -24,25 +29,43 @@ import {
|
|
|
24
29
|
CLASS_MOBILE_HEADER,
|
|
25
30
|
CLASS_MOBILE_BODY,
|
|
26
31
|
CLASS_OVERLAY,
|
|
27
|
-
CLASS_INPUT,
|
|
28
|
-
CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER,
|
|
29
32
|
CLASS_NAV_SPACE_SMALL,
|
|
30
|
-
CLASS_ACCORDION,
|
|
31
|
-
CLASS_ACCORDION_BUTTON,
|
|
32
|
-
CLASS_ACCORDION_HEADER,
|
|
33
|
-
CLASS_ACCORDION_ITEM,
|
|
34
|
-
CLASS_ACCORDION_TITLE,
|
|
35
33
|
CLASS_SPACER_SMALL,
|
|
36
34
|
CLASS_LIST_INLINE,
|
|
35
|
+
CLASS_LIST_GAP_SMALL,
|
|
37
36
|
CLASS_TAG,
|
|
37
|
+
CLASS_TAG_LARGE,
|
|
38
|
+
CLASS_TAG_TRANSPARENT,
|
|
38
39
|
} from "./constants";
|
|
39
|
-
import {
|
|
40
|
+
import { MegamenuProps } from "./Megamenu";
|
|
41
|
+
|
|
42
|
+
const blogCategories = [
|
|
43
|
+
"Kategória 1",
|
|
44
|
+
"Kategória 2",
|
|
45
|
+
"Kategória 3",
|
|
46
|
+
"Kategória 4",
|
|
47
|
+
"Kategória 5",
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
export const MegamenuBlog = ({
|
|
51
|
+
className,
|
|
52
|
+
title = "Človek",
|
|
53
|
+
isSticky = true,
|
|
54
|
+
searchEmpty,
|
|
55
|
+
searchFilled,
|
|
56
|
+
}: MegamenuProps) => {
|
|
57
|
+
const ids = getMegamenuIds("blog");
|
|
58
|
+
const hasSearchEmpty = Boolean(searchEmpty);
|
|
59
|
+
const hasSearchFilled = Boolean(searchFilled);
|
|
60
|
+
const showSearchState = hasSearchEmpty || hasSearchFilled;
|
|
61
|
+
const searchValue = hasSearchEmpty ? "" : hasSearchFilled ? "apple" : "";
|
|
40
62
|
|
|
41
|
-
export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
42
63
|
return (
|
|
43
64
|
<header>
|
|
44
65
|
<nav
|
|
45
|
-
className={cx(CLASS_ROOT, className
|
|
66
|
+
className={cx(CLASS_ROOT, className, {
|
|
67
|
+
"is-sticky": isSticky,
|
|
68
|
+
})}
|
|
46
69
|
data-megamenu
|
|
47
70
|
aria-label="Main navigation"
|
|
48
71
|
>
|
|
@@ -53,7 +76,7 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
53
76
|
<a
|
|
54
77
|
href="#"
|
|
55
78
|
className={CLASS_NAV_LOGO}
|
|
56
|
-
aria-label=
|
|
79
|
+
aria-label={`${title} - Domovská stránka`}
|
|
57
80
|
>
|
|
58
81
|
<svg
|
|
59
82
|
viewBox="0 0 40 40"
|
|
@@ -67,7 +90,7 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
67
90
|
fill="white"
|
|
68
91
|
/>
|
|
69
92
|
</svg>
|
|
70
|
-
<span
|
|
93
|
+
<span>{title}</span>
|
|
71
94
|
</a>
|
|
72
95
|
</li>
|
|
73
96
|
|
|
@@ -78,7 +101,10 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
78
101
|
CLASS_HIDE_MD_DOWN,
|
|
79
102
|
)}
|
|
80
103
|
>
|
|
81
|
-
<a
|
|
104
|
+
<a
|
|
105
|
+
href="#"
|
|
106
|
+
className={cx(CLASS_NAV_LINK, CLASS_NAV_LINK_NO_LINE)}
|
|
107
|
+
>
|
|
82
108
|
Naspať na Orange
|
|
83
109
|
</a>
|
|
84
110
|
</li>
|
|
@@ -90,7 +116,7 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
90
116
|
type="button"
|
|
91
117
|
className={CLASS_NAV_BUTTON}
|
|
92
118
|
aria-label="Vyhľadávanie"
|
|
93
|
-
aria-controls=
|
|
119
|
+
aria-controls={ids.searchDropdownId}
|
|
94
120
|
aria-expanded="false"
|
|
95
121
|
aria-haspopup="true"
|
|
96
122
|
>
|
|
@@ -102,57 +128,30 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
102
128
|
/>
|
|
103
129
|
</button>
|
|
104
130
|
|
|
105
|
-
<div
|
|
131
|
+
<div
|
|
132
|
+
className={cx(CLASS_NAV_DROPDOWN, "is-spaced")}
|
|
133
|
+
id={ids.searchDropdownId}
|
|
134
|
+
>
|
|
106
135
|
<div className={CLASS_CONTAINER}>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
type="text"
|
|
114
|
-
placeholder="Search"
|
|
115
|
-
name="search"
|
|
116
|
-
defaultValue={searchEmpty ? "" : "apple"}
|
|
136
|
+
<MegamenuSearchContent
|
|
137
|
+
inputId={ids.searchInputDesktopId}
|
|
138
|
+
inputLabel="Vyhľadávanie v blog menu"
|
|
139
|
+
searchValue={searchValue}
|
|
140
|
+
hasSearchEmpty={hasSearchEmpty}
|
|
141
|
+
hasSearchFilled={hasSearchFilled}
|
|
117
142
|
/>
|
|
118
|
-
{searchEmpty ? (
|
|
119
|
-
<>
|
|
120
|
-
<p>Najhľadanejši výrazy</p>
|
|
121
|
-
<ul className={CLASS_LIST_INLINE}>
|
|
122
|
-
{list.map((item) => (
|
|
123
|
-
<a key={item}>
|
|
124
|
-
<span className={cx(CLASS_TAG)}>{item}</span>
|
|
125
|
-
</a>
|
|
126
|
-
))}
|
|
127
|
-
</ul>
|
|
128
|
-
</>
|
|
129
|
-
) : (
|
|
130
|
-
<ul className={CLASS_SUBNAV}>
|
|
131
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
132
|
-
<a href="#">apple</a>
|
|
133
|
-
</li>
|
|
134
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
135
|
-
<a href="#">apple hodinky</a>
|
|
136
|
-
</li>
|
|
137
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
138
|
-
<a href="#">apple iphone</a>
|
|
139
|
-
</li>
|
|
140
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
141
|
-
<a href="#">apple 16</a>
|
|
142
|
-
</li>
|
|
143
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
144
|
-
<a href="#">apple pro</a>
|
|
145
|
-
</li>
|
|
146
|
-
<li className={CLASS_SUBNAV_ITEM}>
|
|
147
|
-
<a href="#">apple watch</a>
|
|
148
|
-
</li>
|
|
149
|
-
</ul>
|
|
150
|
-
)}
|
|
151
143
|
</div>
|
|
152
144
|
</div>
|
|
153
145
|
</li>
|
|
154
146
|
<li className={CLASS_NAV_ITEM}>
|
|
155
|
-
<
|
|
147
|
+
<button
|
|
148
|
+
type="button"
|
|
149
|
+
className={CLASS_NAV_BUTTON}
|
|
150
|
+
data-megamenu-mobile-toggle
|
|
151
|
+
data-megamenu-mobile-target="my-orange"
|
|
152
|
+
aria-haspopup="dialog"
|
|
153
|
+
aria-expanded="false"
|
|
154
|
+
>
|
|
156
155
|
<MegamenuIcon
|
|
157
156
|
width={24}
|
|
158
157
|
height={24}
|
|
@@ -161,14 +160,73 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
161
160
|
aria-hidden="true"
|
|
162
161
|
/>
|
|
163
162
|
Môj Orange
|
|
164
|
-
</
|
|
163
|
+
</button>
|
|
165
164
|
</li>
|
|
165
|
+
|
|
166
|
+
<li className={cx(CLASS_NAV_ITEM, CLASS_HIDE_MD_DOWN)}>
|
|
167
|
+
<button
|
|
168
|
+
type="button"
|
|
169
|
+
className={cx(
|
|
170
|
+
CLASS_NAV_BUTTON,
|
|
171
|
+
"megamenu__nav-button--toggle",
|
|
172
|
+
)}
|
|
173
|
+
aria-label="Kategórie"
|
|
174
|
+
aria-controls="megamenu-blog-categories"
|
|
175
|
+
aria-expanded="false"
|
|
176
|
+
aria-haspopup="true"
|
|
177
|
+
>
|
|
178
|
+
<span className="megamenu__nav-button-icon-open">
|
|
179
|
+
<MegamenuIcon
|
|
180
|
+
width={24}
|
|
181
|
+
height={24}
|
|
182
|
+
name="menu"
|
|
183
|
+
aria-hidden="true"
|
|
184
|
+
/>
|
|
185
|
+
</span>
|
|
186
|
+
<span className="megamenu__nav-button-icon-close">
|
|
187
|
+
<MegamenuIcon
|
|
188
|
+
width={24}
|
|
189
|
+
height={24}
|
|
190
|
+
name="close"
|
|
191
|
+
aria-hidden="true"
|
|
192
|
+
/>
|
|
193
|
+
</span>
|
|
194
|
+
</button>
|
|
195
|
+
|
|
196
|
+
<div
|
|
197
|
+
className={cx(CLASS_NAV_DROPDOWN, "is-spaced")}
|
|
198
|
+
id="megamenu-blog-categories"
|
|
199
|
+
>
|
|
200
|
+
<div className={CLASS_CONTAINER}>
|
|
201
|
+
<p>Kategórie</p>
|
|
202
|
+
<ul className={CLASS_LIST_INLINE}>
|
|
203
|
+
{blogCategories.map((category) => (
|
|
204
|
+
<li key={category}>
|
|
205
|
+
<a
|
|
206
|
+
href="#"
|
|
207
|
+
className={cx(
|
|
208
|
+
CLASS_TAG,
|
|
209
|
+
CLASS_TAG_TRANSPARENT,
|
|
210
|
+
CLASS_TAG_LARGE,
|
|
211
|
+
)}
|
|
212
|
+
>
|
|
213
|
+
{category}
|
|
214
|
+
</a>
|
|
215
|
+
</li>
|
|
216
|
+
))}
|
|
217
|
+
</ul>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</li>
|
|
221
|
+
|
|
166
222
|
<li className={cx(CLASS_NAV_ITEM, CLASS_HIDE_LG_UP)}>
|
|
167
223
|
<button
|
|
168
224
|
type="button"
|
|
169
225
|
className={CLASS_NAV_BUTTON}
|
|
170
226
|
aria-label="Otvoriť menu"
|
|
171
|
-
|
|
227
|
+
data-megamenu-mobile-toggle
|
|
228
|
+
data-megamenu-mobile-target="main"
|
|
229
|
+
aria-haspopup="dialog"
|
|
172
230
|
aria-expanded="false"
|
|
173
231
|
>
|
|
174
232
|
<MegamenuIcon
|
|
@@ -256,11 +314,14 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
256
314
|
<div
|
|
257
315
|
// className={cx(CLASS_MOBILE, "is-active")}
|
|
258
316
|
className={cx(CLASS_MOBILE)}
|
|
317
|
+
data-megamenu-mobile-panel="main"
|
|
318
|
+
id={ids.mobileMainPanelId}
|
|
259
319
|
role="dialog"
|
|
260
320
|
aria-modal="true"
|
|
261
|
-
aria-labelledby=
|
|
321
|
+
aria-labelledby={ids.mobileMainTitleId}
|
|
322
|
+
aria-hidden="true"
|
|
262
323
|
>
|
|
263
|
-
<h2 id=
|
|
324
|
+
<h2 id={ids.mobileMainTitleId} className="sr-only">
|
|
264
325
|
Hlavné menu
|
|
265
326
|
</h2>
|
|
266
327
|
<button
|
|
@@ -273,12 +334,35 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
273
334
|
<div className={CLASS_MOBILE_HEADER}>
|
|
274
335
|
<div className={CLASS_CONTAINER}>
|
|
275
336
|
<ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
|
|
337
|
+
<li className={CLASS_NAV_ITEM}>
|
|
338
|
+
<a
|
|
339
|
+
href="#"
|
|
340
|
+
className={CLASS_NAV_LOGO}
|
|
341
|
+
aria-label={`${title} - Domovská stránka`}
|
|
342
|
+
>
|
|
343
|
+
<svg
|
|
344
|
+
viewBox="0 0 40 40"
|
|
345
|
+
fill="none"
|
|
346
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
347
|
+
aria-hidden="true"
|
|
348
|
+
>
|
|
349
|
+
<path d="M40 0H0V40H40V0Z" fill="#FF7900" />
|
|
350
|
+
<path
|
|
351
|
+
d="M34.2897 28.57H5.71973V34.28H34.2897V28.57Z"
|
|
352
|
+
fill="white"
|
|
353
|
+
/>
|
|
354
|
+
</svg>
|
|
355
|
+
<span>{title}</span>
|
|
356
|
+
</a>
|
|
357
|
+
</li>
|
|
358
|
+
|
|
276
359
|
<li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
|
|
277
360
|
|
|
278
361
|
<li className={CLASS_NAV_ITEM}>
|
|
279
362
|
<button
|
|
280
363
|
type="button"
|
|
281
364
|
data-megamenu-close-button
|
|
365
|
+
data-megamenu-mobile-target="main"
|
|
282
366
|
className={CLASS_NAV_BUTTON}
|
|
283
367
|
aria-label="Zatvoriť menu"
|
|
284
368
|
>
|
|
@@ -295,22 +379,57 @@ export const MegamenuBlog = ({ className, searchEmpty }: MegamenuProps) => {
|
|
|
295
379
|
</div>
|
|
296
380
|
<div className={CLASS_MOBILE_BODY}>
|
|
297
381
|
<div className={CLASS_CONTAINER}>
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
382
|
+
<MegamenuSearchContent
|
|
383
|
+
inputId={ids.searchInputMobileId}
|
|
384
|
+
inputLabel="Vyhľadávanie v mobilnom blog menu"
|
|
385
|
+
searchValue={searchValue}
|
|
386
|
+
hasSearchEmpty={hasSearchEmpty}
|
|
387
|
+
hasSearchFilled={hasSearchFilled}
|
|
388
|
+
/>
|
|
389
|
+
|
|
390
|
+
{!showSearchState ? (
|
|
391
|
+
<>
|
|
392
|
+
<p>
|
|
393
|
+
<b>Kategórie</b>
|
|
394
|
+
</p>
|
|
395
|
+
<ul className={cx(CLASS_SUBNAV, CLASS_LIST_GAP_SMALL)}>
|
|
396
|
+
{blogCategories.map((category) => (
|
|
397
|
+
<li key={category}>
|
|
398
|
+
<a
|
|
399
|
+
href="#"
|
|
400
|
+
className={cx(
|
|
401
|
+
CLASS_TAG,
|
|
402
|
+
CLASS_TAG_TRANSPARENT,
|
|
403
|
+
CLASS_TAG_LARGE,
|
|
404
|
+
)}
|
|
405
|
+
>
|
|
406
|
+
{category}
|
|
407
|
+
</a>
|
|
408
|
+
</li>
|
|
409
|
+
))}
|
|
410
|
+
</ul>
|
|
411
|
+
|
|
412
|
+
<hr className="mt-none" />
|
|
413
|
+
|
|
414
|
+
<ul className={cx(CLASS_NAV, CLASS_NAV_VERTICAL)}>
|
|
415
|
+
<li className={CLASS_NAV_ITEM}>
|
|
416
|
+
<a href="#" className={CLASS_NAV_BUTTON}>
|
|
303
417
|
Naspať na Orange
|
|
304
|
-
</
|
|
305
|
-
</
|
|
306
|
-
</
|
|
307
|
-
|
|
308
|
-
|
|
418
|
+
</a>
|
|
419
|
+
</li>
|
|
420
|
+
</ul>
|
|
421
|
+
</>
|
|
422
|
+
) : null}
|
|
309
423
|
</div>
|
|
310
424
|
</div>
|
|
311
425
|
</div>
|
|
312
426
|
</div>
|
|
313
427
|
|
|
428
|
+
<MyOrangeMobilePanel
|
|
429
|
+
panelId={ids.myOrangePanelId}
|
|
430
|
+
titleId={ids.myOrangeTitleId}
|
|
431
|
+
/>
|
|
432
|
+
|
|
314
433
|
<button
|
|
315
434
|
aria-label="Zatvoriť dropdown menu"
|
|
316
435
|
className={CLASS_OVERLAY}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CLASS_INPUT,
|
|
5
|
+
CLASS_INPUT_SEARCH_RESPONSIVE,
|
|
6
|
+
CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER,
|
|
7
|
+
CLASS_LIST_INLINE,
|
|
8
|
+
CLASS_SUBNAV,
|
|
9
|
+
CLASS_SUBNAV_ITEM,
|
|
10
|
+
CLASS_TAG,
|
|
11
|
+
} from "./constants";
|
|
12
|
+
import { searchResultItems, searchTerms } from "./data";
|
|
13
|
+
|
|
14
|
+
type MegamenuSearchContentProps = {
|
|
15
|
+
inputId: string;
|
|
16
|
+
inputLabel: string;
|
|
17
|
+
searchValue: string;
|
|
18
|
+
hasSearchEmpty: boolean;
|
|
19
|
+
hasSearchFilled: boolean;
|
|
20
|
+
emptyStateLinkHref?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const MegamenuSearchContent = ({
|
|
24
|
+
inputId,
|
|
25
|
+
inputLabel,
|
|
26
|
+
searchValue,
|
|
27
|
+
hasSearchEmpty,
|
|
28
|
+
hasSearchFilled,
|
|
29
|
+
emptyStateLinkHref = "#",
|
|
30
|
+
}: MegamenuSearchContentProps) => {
|
|
31
|
+
return (
|
|
32
|
+
<>
|
|
33
|
+
<label htmlFor={inputId} className="sr-only">
|
|
34
|
+
{inputLabel}
|
|
35
|
+
</label>
|
|
36
|
+
|
|
37
|
+
<input
|
|
38
|
+
className={cx(
|
|
39
|
+
CLASS_INPUT,
|
|
40
|
+
CLASS_INPUT_SEARCH_RESPONSIVE,
|
|
41
|
+
CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER,
|
|
42
|
+
)}
|
|
43
|
+
id={inputId}
|
|
44
|
+
type="text"
|
|
45
|
+
placeholder="Hľadať"
|
|
46
|
+
name="search"
|
|
47
|
+
defaultValue={searchValue}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
{hasSearchEmpty ? (
|
|
51
|
+
<>
|
|
52
|
+
<p>Najhľadanejši výrazy</p>
|
|
53
|
+
<ul className={CLASS_LIST_INLINE}>
|
|
54
|
+
{searchTerms.map((item) => (
|
|
55
|
+
<li key={item}>
|
|
56
|
+
<a href={emptyStateLinkHref} className={cx(CLASS_TAG)}>
|
|
57
|
+
{item}
|
|
58
|
+
</a>
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ul>
|
|
62
|
+
</>
|
|
63
|
+
) : hasSearchFilled ? (
|
|
64
|
+
<ul className={CLASS_SUBNAV}>
|
|
65
|
+
{searchResultItems.map((item) => (
|
|
66
|
+
<li key={item} className={CLASS_SUBNAV_ITEM}>
|
|
67
|
+
<a href="#">{item}</a>
|
|
68
|
+
</li>
|
|
69
|
+
))}
|
|
70
|
+
</ul>
|
|
71
|
+
) : null}
|
|
72
|
+
</>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
|
|
3
|
+
import { MegamenuIcon } from "./MegaMenuIcon";
|
|
4
|
+
import {
|
|
5
|
+
CLASS_CONTAINER,
|
|
6
|
+
CLASS_MOBILE,
|
|
7
|
+
CLASS_MOBILE_OVERLAY,
|
|
8
|
+
CLASS_MOBILE_WRAPPER,
|
|
9
|
+
CLASS_MOBILE_HEADER,
|
|
10
|
+
CLASS_MOBILE_BODY,
|
|
11
|
+
CLASS_MOBILE_ACCOUNT,
|
|
12
|
+
CLASS_MOBILE_ACCOUNT_AVATAR,
|
|
13
|
+
CLASS_MOBILE_ACCOUNT_NAME,
|
|
14
|
+
CLASS_MOBILE_ACCOUNT_PHONE,
|
|
15
|
+
CLASS_MOBILE_ACCOUNT_LOGOUT,
|
|
16
|
+
CLASS_MOBILE_ACCOUNT_CTA,
|
|
17
|
+
CLASS_MOBILE_ACCOUNT_LINKS,
|
|
18
|
+
CLASS_MOBILE_ACCOUNT_LINK,
|
|
19
|
+
CLASS_NAV,
|
|
20
|
+
CLASS_NAV_SPACE_SMALL,
|
|
21
|
+
CLASS_NAV_SPACER,
|
|
22
|
+
CLASS_NAV_ITEM,
|
|
23
|
+
CLASS_NAV_BUTTON,
|
|
24
|
+
CLASS_SUBNAV,
|
|
25
|
+
CLASS_SUBNAV_ITEM,
|
|
26
|
+
} from "./constants";
|
|
27
|
+
|
|
28
|
+
type MyOrangeMobilePanelProps = {
|
|
29
|
+
titleId: string;
|
|
30
|
+
panelId?: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const MyOrangeMobilePanel = ({
|
|
34
|
+
titleId,
|
|
35
|
+
panelId,
|
|
36
|
+
}: MyOrangeMobilePanelProps) => {
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
className={cx(CLASS_MOBILE)}
|
|
40
|
+
data-megamenu-mobile-panel="my-orange"
|
|
41
|
+
id={panelId}
|
|
42
|
+
role="dialog"
|
|
43
|
+
aria-modal="true"
|
|
44
|
+
aria-labelledby={titleId}
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>
|
|
47
|
+
<h2 id={titleId} className="sr-only">
|
|
48
|
+
Môj Orange
|
|
49
|
+
</h2>
|
|
50
|
+
<button
|
|
51
|
+
aria-label="Zatvoriť panel Môj Orange"
|
|
52
|
+
className={CLASS_MOBILE_OVERLAY}
|
|
53
|
+
type="button"
|
|
54
|
+
data-megamenu-close-button
|
|
55
|
+
data-megamenu-mobile-target="my-orange"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<div className={CLASS_MOBILE_WRAPPER}>
|
|
59
|
+
<div className={CLASS_MOBILE_HEADER}>
|
|
60
|
+
<div className={CLASS_CONTAINER}>
|
|
61
|
+
<ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
|
|
62
|
+
<li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
|
|
63
|
+
<li className={CLASS_NAV_ITEM}>
|
|
64
|
+
<button
|
|
65
|
+
type="button"
|
|
66
|
+
data-megamenu-close-button
|
|
67
|
+
data-megamenu-mobile-target="my-orange"
|
|
68
|
+
className={CLASS_NAV_BUTTON}
|
|
69
|
+
aria-label="Zatvoriť panel Môj Orange"
|
|
70
|
+
>
|
|
71
|
+
<MegamenuIcon
|
|
72
|
+
name="close"
|
|
73
|
+
width={20}
|
|
74
|
+
height={20}
|
|
75
|
+
aria-hidden="true"
|
|
76
|
+
/>
|
|
77
|
+
</button>
|
|
78
|
+
</li>
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className={CLASS_MOBILE_BODY}>
|
|
83
|
+
<div className={CLASS_CONTAINER}>
|
|
84
|
+
<section className={CLASS_MOBILE_ACCOUNT}>
|
|
85
|
+
<div className={CLASS_MOBILE_ACCOUNT_AVATAR} aria-hidden="true">
|
|
86
|
+
<MegamenuIcon name="user" width={72} height={72} />
|
|
87
|
+
</div>
|
|
88
|
+
<p className={CLASS_MOBILE_ACCOUNT_NAME}>Martin Prihlásený</p>
|
|
89
|
+
<p className={CLASS_MOBILE_ACCOUNT_PHONE}>0905 123 456</p>
|
|
90
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_LOGOUT}>
|
|
91
|
+
Odhlásiť
|
|
92
|
+
</a>
|
|
93
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_CTA}>
|
|
94
|
+
My Orange
|
|
95
|
+
</a>
|
|
96
|
+
</section>
|
|
97
|
+
|
|
98
|
+
<nav aria-label="Môj Orange rýchle akcie">
|
|
99
|
+
<ul className={cx(CLASS_SUBNAV, CLASS_MOBILE_ACCOUNT_LINKS)}>
|
|
100
|
+
<li className={CLASS_SUBNAV_ITEM}>
|
|
101
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_LINK}>
|
|
102
|
+
Zaplatiť faktúru
|
|
103
|
+
</a>
|
|
104
|
+
</li>
|
|
105
|
+
<li className={CLASS_SUBNAV_ITEM}>
|
|
106
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_LINK}>
|
|
107
|
+
Pozrieť spotrebu
|
|
108
|
+
</a>
|
|
109
|
+
</li>
|
|
110
|
+
<li className={CLASS_SUBNAV_ITEM}>
|
|
111
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_LINK}>
|
|
112
|
+
Aktivovať služby
|
|
113
|
+
</a>
|
|
114
|
+
</li>
|
|
115
|
+
<li className={CLASS_SUBNAV_ITEM}>
|
|
116
|
+
<a href="#" className={CLASS_MOBILE_ACCOUNT_LINK}>
|
|
117
|
+
Dobiť kredit
|
|
118
|
+
</a>
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
121
|
+
</nav>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
@@ -9,9 +9,13 @@ export const CLASS_CARD = `${CLASS_ROOT}__card`;
|
|
|
9
9
|
export const CLASS_NAV = `${CLASS_ROOT}__nav`;
|
|
10
10
|
export const CLASS_NAV_VERTICAL = `${CLASS_ROOT}__nav--vertical`;
|
|
11
11
|
export const CLASS_NAV_SPACE_SMALL = `${CLASS_ROOT}__nav--space-small`;
|
|
12
|
+
export const CLASS_NAV_MOBILE_LOCALE = `${CLASS_ROOT}__nav--mobile-locale`;
|
|
12
13
|
export const CLASS_NAV_ITEM = `${CLASS_ROOT}__nav-item`;
|
|
14
|
+
export const CLASS_NAV_ITEM_LEAD = `${CLASS_ROOT}__nav-item--lead`;
|
|
13
15
|
export const CLASS_NAV_ITEM_MAIN = `${CLASS_ROOT}__nav-item--main`;
|
|
14
16
|
export const CLASS_NAV_LINK = `${CLASS_ROOT}__nav-link`;
|
|
17
|
+
export const CLASS_NAV_LINK_LOCALE = `${CLASS_ROOT}__nav-link--locale`;
|
|
18
|
+
export const CLASS_NAV_LINK_NO_LINE = `${CLASS_ROOT}__nav-link--no-line`;
|
|
15
19
|
export const CLASS_NAV_CART_ICON = `${CLASS_ROOT}__nav-cart-icon`;
|
|
16
20
|
export const CLASS_NAV_SPACER = `${CLASS_ROOT}__nav-spacer`;
|
|
17
21
|
export const CLASS_NAV_ICON = `${CLASS_ROOT}__nav-icon`;
|
|
@@ -26,6 +30,8 @@ export const CLASS_SPACER = `${CLASS_ROOT}-spacer`;
|
|
|
26
30
|
export const CLASS_SPACER_SMALL = `${CLASS_ROOT}-spacer--small`;
|
|
27
31
|
|
|
28
32
|
export const CLASS_TEXT_LARGE = `${CLASS_ROOT}__text--large`;
|
|
33
|
+
export const CLASS_CAPTION = `${CLASS_ROOT}__caption`;
|
|
34
|
+
export const CLASS_CAPTION_LARGE = `${CLASS_ROOT}__caption--large`;
|
|
29
35
|
export const CLASS_HIDE_MD_DOWN = `${CLASS_ROOT}--hide-md-down`;
|
|
30
36
|
export const CLASS_HIDE_LG_UP = `${CLASS_ROOT}--hide-lg-up`;
|
|
31
37
|
export const CLASS_ALIGN_CENTER = `${CLASS_ROOT}--align-center`;
|
|
@@ -35,6 +41,14 @@ export const CLASS_MOBILE_OVERLAY = `${CLASS_ROOT}__mobile-overlay`;
|
|
|
35
41
|
export const CLASS_MOBILE_WRAPPER = `${CLASS_ROOT}__mobile-wrapper`;
|
|
36
42
|
export const CLASS_MOBILE_HEADER = `${CLASS_ROOT}__mobile-header`;
|
|
37
43
|
export const CLASS_MOBILE_BODY = `${CLASS_ROOT}__mobile-body`;
|
|
44
|
+
export const CLASS_MOBILE_ACCOUNT = `${CLASS_ROOT}__mobile-account`;
|
|
45
|
+
export const CLASS_MOBILE_ACCOUNT_AVATAR = `${CLASS_ROOT}__mobile-account-avatar`;
|
|
46
|
+
export const CLASS_MOBILE_ACCOUNT_NAME = `${CLASS_ROOT}__mobile-account-name`;
|
|
47
|
+
export const CLASS_MOBILE_ACCOUNT_PHONE = `${CLASS_ROOT}__mobile-account-phone`;
|
|
48
|
+
export const CLASS_MOBILE_ACCOUNT_LOGOUT = `${CLASS_ROOT}__mobile-account-logout`;
|
|
49
|
+
export const CLASS_MOBILE_ACCOUNT_CTA = `${CLASS_ROOT}__mobile-account-cta`;
|
|
50
|
+
export const CLASS_MOBILE_ACCOUNT_LINKS = `${CLASS_ROOT}__mobile-account-links`;
|
|
51
|
+
export const CLASS_MOBILE_ACCOUNT_LINK = `${CLASS_ROOT}__mobile-account-link`;
|
|
38
52
|
|
|
39
53
|
// Accordion classes for mobile menu
|
|
40
54
|
export const CLASS_ACCORDION = `${CLASS_ROOT}__accordion`;
|
|
@@ -47,6 +61,7 @@ export const CLASS_ACCORDION_BODY = `${CLASS_ROOT}__accordion-body`;
|
|
|
47
61
|
|
|
48
62
|
export const CLASS_INPUT = `${CLASS_ROOT}__input`;
|
|
49
63
|
export const CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input--search-icon-with-placeholder`;
|
|
64
|
+
export const CLASS_INPUT_SEARCH_RESPONSIVE = `${CLASS_ROOT}__input--search-responsive`;
|
|
50
65
|
|
|
51
66
|
export const CLASS_TAG = `${CLASS_ROOT}__tag`;
|
|
52
67
|
export const CLASS_TAG_ORANGE = `${CLASS_ROOT}__tag--orange`;
|