@orangesk/orange-design-system 2.0.0-beta.31 → 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/build/appstore.svg +31 -0
- 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/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/search-index.json +7 -3
- package/package.json +10 -10
- 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 +9 -1
- package/src/components/PromoBanner/styles/mixins.scss +21 -9
- package/src/components/PromoBanner/styles/style.scss +35 -6
- package/src/components/PromoBanner/tests/PromoBanner.conformance.test.js +0 -11
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.js +29 -10
- package/src/components/index.ts +3 -0
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
|
|
31
31
|
&-item {
|
|
32
32
|
@include mixins.nav-item;
|
|
33
|
+
|
|
34
|
+
&--lead {
|
|
35
|
+
@include mixins.nav-item-lead;
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
&--vertical {
|
|
@@ -40,6 +44,10 @@
|
|
|
40
44
|
@include mixins.nav-space-small;
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
&--mobile-locale {
|
|
48
|
+
@include mixins.nav-mobile-locale;
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
&-dropdown {
|
|
44
52
|
@include mixins.nav-dropdown;
|
|
45
53
|
|
|
@@ -54,6 +62,14 @@
|
|
|
54
62
|
|
|
55
63
|
&-link {
|
|
56
64
|
@include mixins.nav-link;
|
|
65
|
+
|
|
66
|
+
&--locale {
|
|
67
|
+
@include mixins.nav-link-locale;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&--no-line {
|
|
71
|
+
@include mixins.nav-link-no-line;
|
|
72
|
+
}
|
|
57
73
|
}
|
|
58
74
|
|
|
59
75
|
&-cart-icon {
|
|
@@ -85,6 +101,10 @@
|
|
|
85
101
|
}
|
|
86
102
|
}
|
|
87
103
|
|
|
104
|
+
&__divider {
|
|
105
|
+
@include mixins.divider;
|
|
106
|
+
}
|
|
107
|
+
|
|
88
108
|
&__top {
|
|
89
109
|
@include mixins.top;
|
|
90
110
|
}
|
|
@@ -115,6 +135,38 @@
|
|
|
115
135
|
&-body {
|
|
116
136
|
@include mixins.mobile-body;
|
|
117
137
|
}
|
|
138
|
+
|
|
139
|
+
&-account {
|
|
140
|
+
@include mixins.mobile-account;
|
|
141
|
+
|
|
142
|
+
&-avatar {
|
|
143
|
+
@include mixins.mobile-account-avatar;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&-name {
|
|
147
|
+
@include mixins.mobile-account-name;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&-phone {
|
|
151
|
+
@include mixins.mobile-account-phone;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&-logout {
|
|
155
|
+
@include mixins.mobile-account-logout;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&-cta {
|
|
159
|
+
@include mixins.mobile-account-cta;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&-links {
|
|
163
|
+
@include mixins.mobile-account-links;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&-link {
|
|
167
|
+
@include mixins.mobile-account-link;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
118
170
|
}
|
|
119
171
|
|
|
120
172
|
&__container {
|
|
@@ -133,6 +185,14 @@
|
|
|
133
185
|
@include mixins.text-large;
|
|
134
186
|
}
|
|
135
187
|
|
|
188
|
+
&__caption {
|
|
189
|
+
@include mixins.caption;
|
|
190
|
+
|
|
191
|
+
&--large {
|
|
192
|
+
@include mixins.caption-large;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
136
196
|
&-icon {
|
|
137
197
|
@include mixins.icon;
|
|
138
198
|
}
|
|
@@ -184,6 +244,10 @@
|
|
|
184
244
|
&__tag {
|
|
185
245
|
@include mixins.tag;
|
|
186
246
|
|
|
247
|
+
&--orange {
|
|
248
|
+
@include mixins.tag-orange;
|
|
249
|
+
}
|
|
250
|
+
|
|
187
251
|
&--transparent {
|
|
188
252
|
@include mixins.tag-transparent;
|
|
189
253
|
}
|
|
@@ -53,11 +53,12 @@
|
|
|
53
53
|
padding: 24px;
|
|
54
54
|
border-radius: 0 !important;
|
|
55
55
|
margin-bottom: 0 !important;
|
|
56
|
-
overflow: visible;
|
|
56
|
+
overflow: visible !important;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.previewLive {
|
|
60
60
|
transition: all 200ms ease-in-out;
|
|
61
|
+
overflow: visible;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
.selectWrapper {
|
|
@@ -7,6 +7,10 @@ interface PromoBannerProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
image?: string;
|
|
9
9
|
alignImage?: "bottom" | "top";
|
|
10
|
+
/** Remove top padding from item on sm and smaller breakpoints */
|
|
11
|
+
flushTopSmDown?: boolean;
|
|
12
|
+
/** Remove bottom padding from item on sm and smaller breakpoints */
|
|
13
|
+
flushBottomSmDown?: boolean;
|
|
10
14
|
imageFullWidth?: boolean;
|
|
11
15
|
/** Make image extend to the edge of viewport even when inside container */
|
|
12
16
|
bleedImage?: boolean;
|
|
@@ -21,6 +25,8 @@ export const PromoBanner = ({
|
|
|
21
25
|
image,
|
|
22
26
|
className,
|
|
23
27
|
alignImage,
|
|
28
|
+
flushTopSmDown,
|
|
29
|
+
flushBottomSmDown,
|
|
24
30
|
bleedImage,
|
|
25
31
|
children,
|
|
26
32
|
itemClassName,
|
|
@@ -29,7 +35,9 @@ export const PromoBanner = ({
|
|
|
29
35
|
imageFullWidth,
|
|
30
36
|
}: PromoBannerProps) => {
|
|
31
37
|
const classes = cx(CLASS_ROOT, className, {
|
|
32
|
-
[`${CLASS_ROOT}--
|
|
38
|
+
[`${CLASS_ROOT}--flush-top-sm-down`]: flushTopSmDown,
|
|
39
|
+
[`${CLASS_ROOT}--flush-bottom-sm-down`]: flushBottomSmDown,
|
|
40
|
+
[`${CLASS_ROOT}--reverse`]: variant === "reverse" && !!image,
|
|
33
41
|
[`${CLASS_ROOT}--vertical`]: variant === "vertical",
|
|
34
42
|
});
|
|
35
43
|
return (
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use "sass:map" as sassmap;
|
|
2
|
-
@use "./../../../styles/tools/convert";
|
|
3
2
|
@use "./../../../styles/tools/generate";
|
|
4
3
|
@use "./../../../styles/tokens/breakpoint";
|
|
5
4
|
@use "./../../../styles/tokens/space";
|
|
@@ -15,22 +14,31 @@
|
|
|
15
14
|
padding-bottom: space.get("large");
|
|
16
15
|
}
|
|
17
16
|
|
|
17
|
+
&.grid__col {
|
|
18
|
+
@include breakpoint.get("sm", "down") {
|
|
19
|
+
padding-right: 0 !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
padding-left: 0 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
display: flex;
|
|
19
26
|
flex-direction: column;
|
|
20
27
|
justify-content: center;
|
|
28
|
+
min-width: 0;
|
|
21
29
|
|
|
22
30
|
> * {
|
|
23
31
|
width: fit-content;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
|
|
27
|
-
@mixin promo-banner-item-
|
|
35
|
+
@mixin promo-banner-item-no-top-padding-sm-down() {
|
|
28
36
|
@include breakpoint.get("sm", "down") {
|
|
29
37
|
padding-top: 0;
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
|
|
33
|
-
@mixin promo-banner-item-
|
|
41
|
+
@mixin promo-banner-item-no-bottom-padding-sm-down() {
|
|
34
42
|
@include breakpoint.get("sm", "down") {
|
|
35
43
|
padding-bottom: 0;
|
|
36
44
|
}
|
|
@@ -46,6 +54,14 @@
|
|
|
46
54
|
padding-top: 0;
|
|
47
55
|
padding-bottom: 0;
|
|
48
56
|
}
|
|
57
|
+
|
|
58
|
+
&.grid__col {
|
|
59
|
+
@include breakpoint.get("sm", "down") {
|
|
60
|
+
padding-left: 0 !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
padding-right: 0 !important;
|
|
64
|
+
}
|
|
49
65
|
}
|
|
50
66
|
|
|
51
67
|
@mixin promo-banner-image-bleed-right() {
|
|
@@ -55,14 +71,10 @@
|
|
|
55
71
|
|
|
56
72
|
> * {
|
|
57
73
|
// Extend image to the right edge of viewport even when inside .container
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@include breakpoint.get("md", "down") {
|
|
61
|
-
margin-right: calc((65vw - 100%) * -1);
|
|
62
|
-
}
|
|
74
|
+
transform: translateX(calc(50vw - 100% + -20px));
|
|
63
75
|
|
|
64
76
|
@include breakpoint.get("sm", "down") {
|
|
65
|
-
|
|
77
|
+
transform: translate(10px);
|
|
66
78
|
}
|
|
67
79
|
}
|
|
68
80
|
}
|
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
@use "./mixins";
|
|
2
|
+
@use "./../../../styles/tokens/breakpoint";
|
|
3
|
+
@use "./../../../styles/tokens/space";
|
|
2
4
|
|
|
3
5
|
@layer components {
|
|
4
6
|
.promo-banner {
|
|
5
|
-
|
|
7
|
+
.grid {
|
|
8
|
+
margin-left: 0 !important;
|
|
9
|
+
margin-right: 0 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__item {
|
|
13
|
+
@include mixins.promo-banner-item;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&--flush-top-sm-down {
|
|
6
17
|
.promo-banner__item {
|
|
7
|
-
@include mixins.promo-banner-item-
|
|
18
|
+
@include mixins.promo-banner-item-no-top-padding-sm-down;
|
|
8
19
|
}
|
|
9
20
|
}
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
&--flush-bottom-sm-down {
|
|
12
23
|
.promo-banner__item {
|
|
13
|
-
@include mixins.promo-banner-item-
|
|
24
|
+
@include mixins.promo-banner-item-no-bottom-padding-sm-down;
|
|
14
25
|
}
|
|
15
26
|
}
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
&--vertical {
|
|
29
|
+
.promo-banner__item.grid__col,
|
|
30
|
+
.promo-banner__image.grid__col:not(.promo-banner__image--bleed-right) {
|
|
31
|
+
padding-left: 0 !important;
|
|
32
|
+
padding-right: 0 !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--reverse {
|
|
37
|
+
@include breakpoint.get("md") {
|
|
38
|
+
.promo-banner__item.grid__col {
|
|
39
|
+
padding-left: space.get("medium") !important;
|
|
40
|
+
padding-right: 0 !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.promo-banner__image.grid__col {
|
|
44
|
+
padding-left: 0 !important;
|
|
45
|
+
padding-right: space.get("medium") !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
19
48
|
}
|
|
20
49
|
|
|
21
50
|
&__image {
|
|
@@ -355,21 +355,10 @@ describe("PromoBanner Component Conformance Tests", () => {
|
|
|
355
355
|
const horizontalItem = horizontalContainer.querySelector(
|
|
356
356
|
".promo-banner__item",
|
|
357
357
|
);
|
|
358
|
-
const horizontalBanner =
|
|
359
|
-
horizontalContainer.querySelector(".promo-banner");
|
|
360
358
|
const verticalItem = verticalContainer.querySelector(
|
|
361
359
|
".promo-banner__item",
|
|
362
360
|
);
|
|
363
|
-
const verticalBanner = verticalContainer.querySelector(".promo-banner");
|
|
364
361
|
const reverseItem = reverseContainer.querySelector(".promo-banner__item");
|
|
365
|
-
const reverseBanner = reverseContainer.querySelector(".promo-banner");
|
|
366
|
-
|
|
367
|
-
expect(horizontalBanner).not.toHaveClass("promo-banner--vertical");
|
|
368
|
-
expect(horizontalBanner).not.toHaveClass("promo-banner--reverse");
|
|
369
|
-
expect(verticalBanner).toHaveClass("promo-banner--vertical");
|
|
370
|
-
expect(verticalBanner).not.toHaveClass("promo-banner--reverse");
|
|
371
|
-
expect(reverseBanner).toHaveClass("promo-banner--reverse");
|
|
372
|
-
expect(reverseBanner).not.toHaveClass("promo-banner--vertical");
|
|
373
362
|
|
|
374
363
|
expect(horizontalItem).not.toHaveClass(
|
|
375
364
|
"align-items-center",
|
|
@@ -124,17 +124,38 @@ describe("PromoBanner", () => {
|
|
|
124
124
|
expect(item).toHaveClass("promo-banner__item", "custom-item-class");
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
|
-
});
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
describe("flushTopSmDown", () => {
|
|
129
|
+
it("applies explicit top flush modifier class", () => {
|
|
130
|
+
render(<PromoBanner flushTopSmDown>Content</PromoBanner>);
|
|
131
|
+
const banner = document.querySelector(".promo-banner");
|
|
132
|
+
expect(banner).toHaveClass("promo-banner--flush-top-sm-down");
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("does not apply explicit top flush modifier class when disabled", () => {
|
|
136
|
+
render(<PromoBanner>Content</PromoBanner>);
|
|
137
|
+
const banner = document.querySelector(".promo-banner");
|
|
138
|
+
expect(banner).not.toHaveClass("promo-banner--flush-top-sm-down");
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
describe("flushBottomSmDown", () => {
|
|
143
|
+
it("applies explicit bottom flush modifier class", () => {
|
|
144
|
+
render(<PromoBanner flushBottomSmDown>Content</PromoBanner>);
|
|
145
|
+
const banner = document.querySelector(".promo-banner");
|
|
146
|
+
expect(banner).toHaveClass("promo-banner--flush-bottom-sm-down");
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("does not apply explicit bottom flush modifier class when disabled", () => {
|
|
132
150
|
render(<PromoBanner>Content</PromoBanner>);
|
|
133
151
|
const banner = document.querySelector(".promo-banner");
|
|
134
|
-
expect(banner).not.toHaveClass("promo-banner--
|
|
135
|
-
expect(banner).not.toHaveClass("promo-banner--vertical");
|
|
152
|
+
expect(banner).not.toHaveClass("promo-banner--flush-bottom-sm-down");
|
|
136
153
|
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
137
156
|
|
|
157
|
+
describe("variant", () => {
|
|
158
|
+
describe("default (horizontal) variant", () => {
|
|
138
159
|
it("uses correct column sizes without image", () => {
|
|
139
160
|
render(<PromoBanner>Content</PromoBanner>);
|
|
140
161
|
const contentCol = document
|
|
@@ -167,11 +188,10 @@ describe("PromoBanner", () => {
|
|
|
167
188
|
});
|
|
168
189
|
|
|
169
190
|
describe("vertical variant", () => {
|
|
170
|
-
it("applies vertical modifier class
|
|
191
|
+
it("applies vertical modifier class to root", () => {
|
|
171
192
|
render(<PromoBanner variant="vertical">Content</PromoBanner>);
|
|
172
193
|
const banner = document.querySelector(".promo-banner");
|
|
173
194
|
expect(banner).toHaveClass("promo-banner--vertical");
|
|
174
|
-
expect(banner).not.toHaveClass("promo-banner--reverse");
|
|
175
195
|
});
|
|
176
196
|
|
|
177
197
|
it("applies vertical variant column layout", () => {
|
|
@@ -216,7 +236,7 @@ describe("PromoBanner", () => {
|
|
|
216
236
|
});
|
|
217
237
|
|
|
218
238
|
describe("reverse variant", () => {
|
|
219
|
-
it("applies reverse modifier class
|
|
239
|
+
it("applies reverse modifier class to root", () => {
|
|
220
240
|
render(
|
|
221
241
|
<PromoBanner variant="reverse" image="test.jpg">
|
|
222
242
|
Content
|
|
@@ -224,7 +244,6 @@ describe("PromoBanner", () => {
|
|
|
224
244
|
);
|
|
225
245
|
const banner = document.querySelector(".promo-banner");
|
|
226
246
|
expect(banner).toHaveClass("promo-banner--reverse");
|
|
227
|
-
expect(banner).not.toHaveClass("promo-banner--vertical");
|
|
228
247
|
});
|
|
229
248
|
|
|
230
249
|
it("applies reverse variant column layout", () => {
|
package/src/components/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { Grid, GridCol } from "./Grid";
|
|
|
41
41
|
import { Image } from "./Image";
|
|
42
42
|
import { Link } from "./Link";
|
|
43
43
|
import { Loader } from "./Loader";
|
|
44
|
+
import { Megamenu, MegamenuBlog } from "./Megamenu";
|
|
44
45
|
import {
|
|
45
46
|
Modal,
|
|
46
47
|
ModalBody,
|
|
@@ -154,6 +155,8 @@ export {
|
|
|
154
155
|
List,
|
|
155
156
|
ListItem,
|
|
156
157
|
Loader,
|
|
158
|
+
Megamenu,
|
|
159
|
+
MegamenuBlog,
|
|
157
160
|
Message,
|
|
158
161
|
Modal,
|
|
159
162
|
ModalBody,
|