@orangesk/orange-design-system 3.11.0 → 3.12.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.
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Carousel/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/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/megamenu.css +1 -1
- package/build/lib/megamenu.css.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/package.json +20 -21
- package/src/assets/icons/age-rating-3.svg +0 -0
- package/src/assets/icons/assistent.svg +0 -0
- package/src/assets/icons/boxes.svg +0 -0
- package/src/assets/icons/business-lounge.svg +0 -0
- package/src/assets/icons/calendar-30.svg +0 -0
- package/src/assets/icons/calendar-month.svg +0 -0
- package/src/assets/icons/communication-settings.svg +0 -0
- package/src/assets/icons/cookies.svg +0 -0
- package/src/assets/icons/currency-euro.svg +0 -0
- package/src/assets/icons/data-services.svg +0 -0
- package/src/assets/icons/device-mobile-package.svg +0 -0
- package/src/assets/icons/futher-education.svg +0 -0
- package/src/assets/icons/modifier-delete.svg +0 -0
- package/src/assets/icons/orange-experts-orange-business-consultant.svg +0 -0
- package/src/assets/icons/orange-messenger.svg +0 -0
- package/src/assets/icons/orange-reflect.svg +0 -0
- package/src/assets/icons/personal-smartphone-trainer.svg +0 -0
- package/src/assets/icons/unlimited-calls.svg +0 -0
- package/src/components/Carousel/Carousel.static.ts +3 -0
- package/src/components/Carousel/styles/mixins.scss +8 -7
- package/src/components/Carousel/tests/Carousel.interactions.test.ts +102 -0
- package/src/components/CarouselHero/CarouselHero.static.ts +3 -0
- package/src/components/CarouselPromotions/CarouselPromotions.static.ts +3 -0
- package/src/components/Megamenu/styles/mixins.scss +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangesk/orange-design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.x"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@cloudfour/transition-hidden-element": "^2.0.2",
|
|
29
29
|
"@mdx-js/loader": "^3.1.1",
|
|
30
30
|
"@mdx-js/react": "^3.1.1",
|
|
31
|
-
"@next/mdx": "16.4.
|
|
31
|
+
"@next/mdx": "16.4.3",
|
|
32
32
|
"@orangesk/accessible-autocomplete": "3.2.2",
|
|
33
33
|
"@popperjs/core": "^2.11.8",
|
|
34
34
|
"@types/mdx": "^2.0.14",
|
|
@@ -37,42 +37,41 @@
|
|
|
37
37
|
"daypickr": "^0.3.4",
|
|
38
38
|
"diff2html": "^3.4.56",
|
|
39
39
|
"dompurify": "^3.4.17",
|
|
40
|
-
"html-react-parser": "6.1.
|
|
40
|
+
"html-react-parser": "6.1.9",
|
|
41
41
|
"lorem-ipsum": "3.0.0",
|
|
42
42
|
"minisearch": "7.2.0",
|
|
43
|
-
"next": "16.4.
|
|
43
|
+
"next": "16.4.3",
|
|
44
44
|
"normalize.css": "^8.0.1",
|
|
45
45
|
"nouislider": "^15.8.1",
|
|
46
46
|
"prism-react-renderer": "^2.4.1",
|
|
47
|
-
"
|
|
48
|
-
"react": "^19.3.
|
|
49
|
-
"react-dom": "^19.3.0",
|
|
47
|
+
"react": "^19.3.1",
|
|
48
|
+
"react-dom": "^19.3.1",
|
|
50
49
|
"react-element-to-jsx-string": "18.0.0",
|
|
51
|
-
"react-is": "^19.3.
|
|
50
|
+
"react-is": "^19.3.1",
|
|
52
51
|
"rehype-autolink-headings": "^7.1.0",
|
|
53
52
|
"rehype-slug": "^6.0.0",
|
|
54
53
|
"remark-gemoji": "^8.0.0",
|
|
55
54
|
"remark-gfm": "^4.0.1",
|
|
56
55
|
"swiper": "14.3.0",
|
|
57
|
-
"tabbable": "^6.5.
|
|
56
|
+
"tabbable": "^6.5.1",
|
|
58
57
|
"unescape-html": "^1.1.0",
|
|
59
58
|
"wnumb": "^1.2.0"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
62
|
-
"@babel/core": "8.0.
|
|
61
|
+
"@babel/core": "8.0.9",
|
|
63
62
|
"@babel/preset-env": "8.0.7",
|
|
64
63
|
"@babel/preset-react": "8.0.1",
|
|
65
64
|
"@babel/preset-typescript": "8.0.7",
|
|
66
65
|
"@biomejs/biome": "latest",
|
|
67
|
-
"@rollup/plugin-alias": "6.0.
|
|
66
|
+
"@rollup/plugin-alias": "6.0.1",
|
|
68
67
|
"@rollup/plugin-babel": "7.1.0",
|
|
69
68
|
"@rollup/plugin-commonjs": "29.0.3",
|
|
70
69
|
"@rollup/plugin-json": "^6.1.0",
|
|
71
70
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
72
|
-
"@rollup/plugin-terser": "1.0.
|
|
73
|
-
"@rollup/plugin-typescript": "^12.3.
|
|
71
|
+
"@rollup/plugin-terser": "1.0.2",
|
|
72
|
+
"@rollup/plugin-typescript": "^12.3.1",
|
|
74
73
|
"@rollup/plugin-url": "^8.0.2",
|
|
75
|
-
"@rollup/rollup-darwin-arm64": "^4.
|
|
74
|
+
"@rollup/rollup-darwin-arm64": "^4.65.0",
|
|
76
75
|
"@testing-library/dom": "^10.4.2",
|
|
77
76
|
"@testing-library/jest-dom": "7.0.1",
|
|
78
77
|
"@testing-library/react": "^16.3.3",
|
|
@@ -82,25 +81,25 @@
|
|
|
82
81
|
"@types/react-dom": "19.3.0",
|
|
83
82
|
"@types/wnumb": "^1.2.3",
|
|
84
83
|
"@vitejs/plugin-react": "6.1.2",
|
|
85
|
-
"@vitest/coverage-v8": "5.0.
|
|
86
|
-
"@vitest/ui": "5.0.
|
|
84
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
85
|
+
"@vitest/ui": "5.0.5",
|
|
87
86
|
"canvas": "^3.2.3",
|
|
88
87
|
"fs-extra": "^11.4.1",
|
|
89
88
|
"glob": "13.0.6",
|
|
90
|
-
"html-validate": "11.
|
|
89
|
+
"html-validate": "11.17.0",
|
|
91
90
|
"husky": "^9.1.7",
|
|
92
91
|
"identity-obj-proxy": "^3.0.0",
|
|
93
|
-
"jsdom": "30.1.
|
|
92
|
+
"jsdom": "30.1.3",
|
|
94
93
|
"lint-staged": "17.6.0",
|
|
95
94
|
"prettier": "^3.9.10",
|
|
96
|
-
"rollup": "^4.
|
|
95
|
+
"rollup": "^4.65.0",
|
|
97
96
|
"rollup-plugin-copy": "^3.5.0",
|
|
98
97
|
"rollup-plugin-dts": "^6.5.1",
|
|
99
98
|
"rollup-plugin-postcss": "^4.0.2",
|
|
100
|
-
"sass": "^1.
|
|
99
|
+
"sass": "^1.106.1",
|
|
101
100
|
"svg-sprite": "^2.0.4",
|
|
102
101
|
"typescript": "6.0.3",
|
|
103
|
-
"vitest": "5.0.
|
|
102
|
+
"vitest": "5.0.5",
|
|
104
103
|
"vitest-axe": "^0.1.0"
|
|
105
104
|
},
|
|
106
105
|
"lint-staged": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -40,6 +40,9 @@ interface ExternalControlsState {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export const defaultConfig: SwiperOptions = {
|
|
43
|
+
// Keep pointer selection and click handlers available to CMS editors and integrations.
|
|
44
|
+
touchStartPreventDefault: false,
|
|
45
|
+
preventClicksPropagation: false,
|
|
43
46
|
navigation: {
|
|
44
47
|
nextEl: SELECTOR_NEXT,
|
|
45
48
|
prevEl: SELECTOR_PREV,
|
|
@@ -35,13 +35,6 @@
|
|
|
35
35
|
min-width: 0;
|
|
36
36
|
width: 100%;
|
|
37
37
|
max-width: 100%;
|
|
38
|
-
margin-bottom: convert.to-rem(30px);
|
|
39
|
-
|
|
40
|
-
.carousel--scrollbar & {
|
|
41
|
-
@include breakpoint.get("md", "down") {
|
|
42
|
-
margin-bottom: convert.to-rem(20px);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
38
|
|
|
46
39
|
&.is-draggable {
|
|
47
40
|
user-select: none;
|
|
@@ -56,6 +49,7 @@
|
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
@mixin navigation {
|
|
52
|
+
margin-top: convert.to-rem(30px);
|
|
59
53
|
display: grid;
|
|
60
54
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
61
55
|
align-items: center;
|
|
@@ -217,8 +211,15 @@
|
|
|
217
211
|
}
|
|
218
212
|
|
|
219
213
|
@mixin scrollbar-base {
|
|
214
|
+
margin-top: convert.to-rem(30px);
|
|
220
215
|
position: relative;
|
|
221
216
|
overflow: visible;
|
|
217
|
+
|
|
218
|
+
.carousel--scrollbar & {
|
|
219
|
+
@include breakpoint.get("md", "down") {
|
|
220
|
+
margin-top: convert.to-rem(20px);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
@mixin scrollbar-horizontal {
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
import CarouselHero from "../../CarouselHero/CarouselHero.static";
|
|
3
|
+
import CarouselPromotions from "../../CarouselPromotions/CarouselPromotions.static";
|
|
4
|
+
import Carousel from "../Carousel.static";
|
|
5
|
+
|
|
6
|
+
describe.each([
|
|
7
|
+
{ name: "Carousel", Module: Carousel, prefix: "carousel" },
|
|
8
|
+
{ name: "CarouselHero", Module: CarouselHero, prefix: "carousel-hero" },
|
|
9
|
+
{
|
|
10
|
+
name: "CarouselPromotions",
|
|
11
|
+
Module: CarouselPromotions,
|
|
12
|
+
prefix: "carousel-promotions",
|
|
13
|
+
},
|
|
14
|
+
])("$name pointer interactions with real Swiper", ({ Module, prefix }) => {
|
|
15
|
+
let carousel: Carousel | CarouselHero | CarouselPromotions;
|
|
16
|
+
let icon: SVGElement;
|
|
17
|
+
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
vi.useFakeTimers();
|
|
20
|
+
document.body.innerHTML = `<div class="${prefix}" data-${prefix}>
|
|
21
|
+
<div class="${prefix}__viewport-wrapper"><div class="${prefix}__viewport"><div class="${prefix}__track">
|
|
22
|
+
<div class="${prefix}__slide"><a href="#card"><svg><path d="M0 0h10v10z" /></svg></a></div>
|
|
23
|
+
<div class="${prefix}__slide">Second</div><div class="${prefix}__slide">Third</div>
|
|
24
|
+
</div></div></div>
|
|
25
|
+
</div>`;
|
|
26
|
+
const element = document.body.firstElementChild as HTMLElement;
|
|
27
|
+
for (const node of [
|
|
28
|
+
element,
|
|
29
|
+
element.querySelector(`.${prefix}__viewport`)!,
|
|
30
|
+
]) {
|
|
31
|
+
Object.defineProperty(node, "clientWidth", { value: 600 });
|
|
32
|
+
Object.defineProperty(node, "clientHeight", { value: 200 });
|
|
33
|
+
}
|
|
34
|
+
carousel = new Module(element, { loop: false, breakpoints: {} });
|
|
35
|
+
vi.advanceTimersByTime(100);
|
|
36
|
+
icon = element.querySelector("path")!;
|
|
37
|
+
expect(carousel.instance.enabled).toBe(true);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
afterEach(() => {
|
|
41
|
+
carousel?.destroy();
|
|
42
|
+
vi.clearAllTimers();
|
|
43
|
+
vi.useRealTimers();
|
|
44
|
+
document.body.innerHTML = "";
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
function pointer(type: string, x: number, pointerType = "mouse") {
|
|
48
|
+
const event = new MouseEvent(type, {
|
|
49
|
+
bubbles: true,
|
|
50
|
+
cancelable: true,
|
|
51
|
+
clientX: x,
|
|
52
|
+
clientY: 20,
|
|
53
|
+
button: 0,
|
|
54
|
+
});
|
|
55
|
+
Object.assign(event, { pointerId: 1, pointerType });
|
|
56
|
+
icon.dispatchEvent(event);
|
|
57
|
+
return event;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
it.each(["mouse", "touch", "pen"])(
|
|
61
|
+
"allows SVG icon selection with %s without canceling pointerdown",
|
|
62
|
+
(pointerType) => {
|
|
63
|
+
const onPointerDown = vi.fn();
|
|
64
|
+
carousel.element.addEventListener("pointerdown", onPointerDown);
|
|
65
|
+
const event = pointer("pointerdown", 400, pointerType);
|
|
66
|
+
expect(onPointerDown).toHaveBeenCalledOnce();
|
|
67
|
+
expect(event.defaultPrevented).toBe(false);
|
|
68
|
+
},
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
it("delivers an ordinary icon click without canceling it", () => {
|
|
72
|
+
const onClick = vi.fn();
|
|
73
|
+
carousel.element.addEventListener("click", onClick);
|
|
74
|
+
pointer("pointerdown", 400);
|
|
75
|
+
pointer("pointerup", 400);
|
|
76
|
+
const click = new MouseEvent("click", { bubbles: true, cancelable: true });
|
|
77
|
+
icon.dispatchEvent(click);
|
|
78
|
+
expect(onClick).toHaveBeenCalledOnce();
|
|
79
|
+
expect(click.defaultPrevented).toBe(false);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("keeps swipe navigation and link protection while letting click handlers run", () => {
|
|
83
|
+
const onIconClick = vi.fn();
|
|
84
|
+
const onClick = vi.fn();
|
|
85
|
+
icon.addEventListener("click", onIconClick);
|
|
86
|
+
carousel.element.addEventListener("click", onClick);
|
|
87
|
+
// The initial translation is zero; jsdom cannot parse CSS transforms with DOMMatrixReadOnly.
|
|
88
|
+
carousel.instance.wrapperEl.style.transform = "none";
|
|
89
|
+
pointer("pointerdown", 400);
|
|
90
|
+
pointer("pointermove", 350);
|
|
91
|
+
pointer("pointermove", 100);
|
|
92
|
+
pointer("pointerup", 100);
|
|
93
|
+
expect(carousel.instance.activeIndex).toBe(1);
|
|
94
|
+
expect(carousel.instance.animating).toBe(true);
|
|
95
|
+
|
|
96
|
+
const click = new MouseEvent("click", { bubbles: true, cancelable: true });
|
|
97
|
+
icon.dispatchEvent(click);
|
|
98
|
+
expect(onIconClick).toHaveBeenCalledOnce();
|
|
99
|
+
expect(onClick).toHaveBeenCalledOnce();
|
|
100
|
+
expect(click.defaultPrevented).toBe(true);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
@@ -27,6 +27,9 @@ import {
|
|
|
27
27
|
} from "./constants";
|
|
28
28
|
|
|
29
29
|
export const defaultConfig: SwiperOptions = {
|
|
30
|
+
// Keep pointer selection and click handlers available to CMS editors and integrations.
|
|
31
|
+
touchStartPreventDefault: false,
|
|
32
|
+
preventClicksPropagation: false,
|
|
30
33
|
pagination: {
|
|
31
34
|
clickable: true,
|
|
32
35
|
bulletClass: CLASS_PAGINATION_ITEM,
|
|
@@ -22,6 +22,9 @@ import {
|
|
|
22
22
|
} from "./constants";
|
|
23
23
|
|
|
24
24
|
export const defaultConfig: SwiperOptions = {
|
|
25
|
+
// Keep pointer selection and click handlers available to CMS editors and integrations.
|
|
26
|
+
touchStartPreventDefault: false,
|
|
27
|
+
preventClicksPropagation: false,
|
|
25
28
|
pagination: {
|
|
26
29
|
el: SELECTOR_DOTS,
|
|
27
30
|
clickable: true,
|