@orangesk/orange-design-system 3.6.0 → 3.6.2
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/BodyBanner/style.css +1 -1
- package/build/components/BodyBanner/style.css.map +1 -1
- package/build/components/Tile/style.css +1 -1
- package/build/components/Tile/style.css.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- 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/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 +17 -16
- package/src/components/BodyBanner/styles/mixins.scss +22 -6
- package/src/components/BodyBanner/tests/BodyBanner.conformance.test.jsx +7 -4
- package/src/components/Countdown/Countdown.shared.ts +5 -3
- package/src/components/Countdown/Countdown.static.ts +1 -1
- package/src/components/Countdown/tests/Countdown.static.test.jsx +19 -0
- package/src/components/Countdown/tests/CountdownTag.static.test.jsx +29 -0
- package/src/components/Tile/styles/mixins.scss +2 -4
- package/src/components/Tile/styles/style.scss +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangesk/orange-design-system",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.x"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudfour/transition-hidden-element": "^2.0.2",
|
|
28
28
|
"@mdx-js/loader": "^3.1.1",
|
|
29
29
|
"@mdx-js/react": "^3.1.1",
|
|
30
|
-
"@next/mdx": "16.3.
|
|
30
|
+
"@next/mdx": "16.3.4",
|
|
31
31
|
"@orangesk/accessible-autocomplete": "3.2.2",
|
|
32
32
|
"@popperjs/core": "^2.11.8",
|
|
33
33
|
"@types/mdx": "^2.0.14",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"html-react-parser": "6.1.7",
|
|
40
40
|
"lorem-ipsum": "3.0.0",
|
|
41
41
|
"minisearch": "7.2.0",
|
|
42
|
-
"next": "16.3.
|
|
42
|
+
"next": "16.3.4",
|
|
43
43
|
"normalize.css": "^8.0.1",
|
|
44
44
|
"nouislider": "^15.8.1",
|
|
45
45
|
"prism-react-renderer": "^2.4.1",
|
|
46
|
-
"query-string": "^9.5.
|
|
46
|
+
"query-string": "^9.5.1",
|
|
47
47
|
"react": "^19.2.8",
|
|
48
48
|
"react-dom": "^19.2.8",
|
|
49
49
|
"react-element-to-jsx-string": "^17.0.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rehype-slug": "^6.0.0",
|
|
53
53
|
"remark-gemoji": "^8.0.0",
|
|
54
54
|
"remark-gfm": "^4.0.1",
|
|
55
|
-
"swiper": "14.
|
|
55
|
+
"swiper": "14.2.0",
|
|
56
56
|
"tabbable": "^6.5.0",
|
|
57
57
|
"unescape-html": "^1.1.0",
|
|
58
58
|
"wnumb": "^1.2.0"
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
"@rollup/plugin-terser": "1.0.0",
|
|
72
72
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
73
73
|
"@rollup/plugin-url": "^8.0.2",
|
|
74
|
-
"@rollup/rollup-darwin-arm64": "^4.
|
|
74
|
+
"@rollup/rollup-darwin-arm64": "^4.63.1",
|
|
75
75
|
"@testing-library/dom": "^10.4.1",
|
|
76
76
|
"@testing-library/jest-dom": "7.0.1",
|
|
77
|
-
"@testing-library/react": "^16.3.
|
|
78
|
-
"@testing-library/user-event": "^14.6.
|
|
79
|
-
"@types/node": "26.
|
|
77
|
+
"@testing-library/react": "^16.3.3",
|
|
78
|
+
"@testing-library/user-event": "^14.6.7",
|
|
79
|
+
"@types/node": "26.4.1",
|
|
80
80
|
"@types/react": "19.2.18",
|
|
81
|
-
"@types/react-dom": "19.2.
|
|
81
|
+
"@types/react-dom": "19.2.5",
|
|
82
82
|
"@types/wnumb": "^1.2.3",
|
|
83
|
-
"@vitejs/plugin-react": "6.
|
|
83
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
84
84
|
"@vitest/browser": "^4.1.11",
|
|
85
85
|
"@vitest/browser-playwright": "^4.1.11",
|
|
86
86
|
"@vitest/coverage-v8": "^4.1.11",
|
|
@@ -88,18 +88,18 @@
|
|
|
88
88
|
"canvas": "^3.2.3",
|
|
89
89
|
"fs-extra": "^11.4.0",
|
|
90
90
|
"glob": "13.0.6",
|
|
91
|
-
"html-validate": "11.
|
|
91
|
+
"html-validate": "11.12.0",
|
|
92
92
|
"husky": "^9.1.7",
|
|
93
93
|
"identity-obj-proxy": "^3.0.0",
|
|
94
94
|
"jsdom": "30.0.1",
|
|
95
|
-
"lint-staged": "17.
|
|
95
|
+
"lint-staged": "17.4.1",
|
|
96
96
|
"playwright": "^1.62.1",
|
|
97
97
|
"prettier": "^3.9.6",
|
|
98
|
-
"rollup": "^4.
|
|
98
|
+
"rollup": "^4.63.1",
|
|
99
99
|
"rollup-plugin-copy": "^3.5.0",
|
|
100
100
|
"rollup-plugin-dts": "^6.5.1",
|
|
101
101
|
"rollup-plugin-postcss": "^4.0.2",
|
|
102
|
-
"sass": "^1.
|
|
102
|
+
"sass": "^1.103.1",
|
|
103
103
|
"svg-sprite": "^2.0.4",
|
|
104
104
|
"typescript": "6.0.3",
|
|
105
105
|
"vitest": "^4.1.11",
|
|
@@ -113,11 +113,12 @@
|
|
|
113
113
|
"scripts": {
|
|
114
114
|
"dev": "npm run build:scss-exports && npm run build:search-index && npm run build:preview-iframe && next dev",
|
|
115
115
|
"build": "npm run build:scss-exports && npm run build:search-index && npm run build:preview-iframe && next build && npm run sprite",
|
|
116
|
-
"build:bundle": "pnpm run build:scss-exports && pnpm exec rollup -c && pnpm run build:megamenu && pnpm run build:footer",
|
|
116
|
+
"build:bundle": "pnpm run build:scss-exports && pnpm exec rollup -c && pnpm run build:megamenu && pnpm run build:footer && pnpm run verify:production-bundle",
|
|
117
117
|
"build:preview-iframe": "node scripts/build-preview-iframe-bundle.mjs",
|
|
118
118
|
"build:megamenu": "pnpm run build:scss-exports && pnpm exec rollup -c rollup.megamenu.config.mjs",
|
|
119
119
|
"dev:megamenu": "npm run build:scss-exports && pnpm exec rollup -c rollup.megamenu.config.mjs --watch",
|
|
120
120
|
"build:footer": "pnpm run build:scss-exports && pnpm exec rollup -c rollup.footer.config.mjs",
|
|
121
|
+
"verify:production-bundle": "node scripts/verify-production-bundle.mjs",
|
|
121
122
|
"dev:footer": "npm run build:scss-exports && pnpm exec rollup -c rollup.footer.config.mjs --watch",
|
|
122
123
|
"build:scss-exports": "node scripts/build-scss-exports.js",
|
|
123
124
|
"build:search-index": "node scripts/mdx-search-index.js",
|
|
@@ -28,6 +28,14 @@
|
|
|
28
28
|
margin-left: 0 !important;
|
|
29
29
|
margin-right: 0 !important;
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
@include breakpoint.get("sm", "down") {
|
|
33
|
+
&:not(.body-banner--large) {
|
|
34
|
+
.body-banner__button .btn {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
@mixin content {
|
|
@@ -46,7 +54,7 @@
|
|
|
46
54
|
width: 100%;
|
|
47
55
|
display: flex;
|
|
48
56
|
padding: space.get("large");
|
|
49
|
-
gap: convert.to-rem(
|
|
57
|
+
gap: convert.to-rem(30px);
|
|
50
58
|
|
|
51
59
|
> div:not(.body-banner__button) {
|
|
52
60
|
flex: 1;
|
|
@@ -72,6 +80,10 @@
|
|
|
72
80
|
padding: 0 !important;
|
|
73
81
|
flex-shrink: 0;
|
|
74
82
|
|
|
83
|
+
@include breakpoint.get("sm", "down") {
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
img,
|
|
76
88
|
svg {
|
|
77
89
|
max-height: convert.to-rem(120px);
|
|
@@ -79,7 +91,9 @@
|
|
|
79
91
|
margin: space.get("large") 0 space.get("large") space.get("large") !important;
|
|
80
92
|
|
|
81
93
|
@include breakpoint.get("sm", "down") {
|
|
82
|
-
|
|
94
|
+
width: calc(100% - #{convert.to-rem(30px)});
|
|
95
|
+
max-height: none;
|
|
96
|
+
margin: convert.to-rem(15px) !important;
|
|
83
97
|
}
|
|
84
98
|
}
|
|
85
99
|
}
|
|
@@ -102,18 +116,20 @@
|
|
|
102
116
|
}
|
|
103
117
|
|
|
104
118
|
.body-banner__image {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: flex-start;
|
|
121
|
+
justify-content: flex-end;
|
|
122
|
+
|
|
105
123
|
> * {
|
|
106
124
|
width: fit-content;
|
|
107
125
|
max-width: 100%;
|
|
108
|
-
height:
|
|
126
|
+
height: auto;
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
img {
|
|
112
130
|
width: 100%;
|
|
113
|
-
height:
|
|
131
|
+
height: auto;
|
|
114
132
|
max-height: none;
|
|
115
|
-
object-fit: cover;
|
|
116
|
-
object-position: center;
|
|
117
133
|
margin: 0 !important;
|
|
118
134
|
display: block;
|
|
119
135
|
}
|
|
@@ -14,7 +14,10 @@ const example = (
|
|
|
14
14
|
size="large"
|
|
15
15
|
buttonText="Get Started"
|
|
16
16
|
image={
|
|
17
|
-
<img
|
|
17
|
+
<img
|
|
18
|
+
src="https://placehold.co/640x480?text=Large+banner"
|
|
19
|
+
alt="Large banner"
|
|
20
|
+
/>
|
|
18
21
|
}
|
|
19
22
|
>
|
|
20
23
|
<h3>Large Banner Example</h3>
|
|
@@ -27,7 +30,7 @@ const example = (
|
|
|
27
30
|
buttonText="Discover"
|
|
28
31
|
image={
|
|
29
32
|
<img
|
|
30
|
-
src="https://
|
|
33
|
+
src="https://placehold.co/640x480?text=Accent+banner"
|
|
31
34
|
alt="Accent banner"
|
|
32
35
|
/>
|
|
33
36
|
}
|
|
@@ -42,7 +45,7 @@ const example = (
|
|
|
42
45
|
buttonText="Explore"
|
|
43
46
|
image={
|
|
44
47
|
<img
|
|
45
|
-
src="https://
|
|
48
|
+
src="https://placehold.co/640x480?text=Subtle+banner"
|
|
46
49
|
alt="Subtle banner"
|
|
47
50
|
/>
|
|
48
51
|
}
|
|
@@ -62,7 +65,7 @@ const example = (
|
|
|
62
65
|
buttonText="Start Now"
|
|
63
66
|
image={
|
|
64
67
|
<img
|
|
65
|
-
src="https://
|
|
68
|
+
src="https://placehold.co/640x480?text=Primary+banner"
|
|
66
69
|
alt="Primary banner"
|
|
67
70
|
/>
|
|
68
71
|
}
|
|
@@ -106,6 +106,7 @@ export abstract class BaseCountdownStatic {
|
|
|
106
106
|
observer?: IntersectionObserver;
|
|
107
107
|
private instanceKey: string;
|
|
108
108
|
private defaultConfig: CountdownConfig;
|
|
109
|
+
private configOverrides: Partial<CountdownConfig>;
|
|
109
110
|
|
|
110
111
|
constructor(
|
|
111
112
|
element: HTMLElement,
|
|
@@ -118,6 +119,7 @@ export abstract class BaseCountdownStatic {
|
|
|
118
119
|
this.element = element;
|
|
119
120
|
this.defaultConfig = options.defaultConfig;
|
|
120
121
|
this.instanceKey = options.instanceKey;
|
|
122
|
+
this.configOverrides = { ...(config ?? {}) };
|
|
121
123
|
this.config = { ...options.defaultConfig, ...(config ?? {}) };
|
|
122
124
|
this.liveRegion = null;
|
|
123
125
|
|
|
@@ -183,7 +185,7 @@ export abstract class BaseCountdownStatic {
|
|
|
183
185
|
this.config = {
|
|
184
186
|
...this.defaultConfig,
|
|
185
187
|
...elementConfig,
|
|
186
|
-
...this.
|
|
188
|
+
...this.configOverrides,
|
|
187
189
|
};
|
|
188
190
|
|
|
189
191
|
this.liveRegion = this.getLiveRegion();
|
|
@@ -208,8 +210,8 @@ export abstract class BaseCountdownStatic {
|
|
|
208
210
|
this.stop();
|
|
209
211
|
this.observer?.disconnect();
|
|
210
212
|
this.destroyElements();
|
|
211
|
-
this.
|
|
212
|
-
...this.
|
|
213
|
+
this.configOverrides = {
|
|
214
|
+
...this.configOverrides,
|
|
213
215
|
...(config ?? {}),
|
|
214
216
|
};
|
|
215
217
|
this.init();
|
|
@@ -45,6 +45,25 @@ describe("Countdown static behavior", () => {
|
|
|
45
45
|
vi.useRealTimers();
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
it("sets all value layers on initial render", () => {
|
|
49
|
+
vi.useFakeTimers();
|
|
50
|
+
vi.setSystemTime(new Date("2026-07-24T00:00:00.000Z"));
|
|
51
|
+
|
|
52
|
+
const { container } = render(
|
|
53
|
+
<Countdown targetDate="2026-07-25T01:02:03.000Z" />,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const values = Array.from(
|
|
57
|
+
container
|
|
58
|
+
.querySelectorAll(".countdown__unit")[0]
|
|
59
|
+
.querySelectorAll(".countdown__value"),
|
|
60
|
+
).map((element) => element.textContent);
|
|
61
|
+
|
|
62
|
+
expect(values).toEqual(["01", "01", "01", "01"]);
|
|
63
|
+
|
|
64
|
+
vi.useRealTimers();
|
|
65
|
+
});
|
|
66
|
+
|
|
48
67
|
it("switches day label based on remaining value", () => {
|
|
49
68
|
vi.useFakeTimers();
|
|
50
69
|
vi.setSystemTime(new Date("2026-07-24T00:00:00.000Z"));
|
|
@@ -4,6 +4,35 @@ import { CountdownTag } from "../CountdownTag";
|
|
|
4
4
|
import CountdownTagStatic from "../CountdownTag.static";
|
|
5
5
|
|
|
6
6
|
describe("CountdownTag static behavior", () => {
|
|
7
|
+
it("initializes target date from data-countdown-config", () => {
|
|
8
|
+
vi.useFakeTimers();
|
|
9
|
+
vi.setSystemTime(new Date("2026-07-24T00:00:00.000Z"));
|
|
10
|
+
|
|
11
|
+
const element = document.createElement("div");
|
|
12
|
+
element.setAttribute(
|
|
13
|
+
"data-countdown-config",
|
|
14
|
+
JSON.stringify({
|
|
15
|
+
targetDate: "2026-07-24T00:00:59.000Z",
|
|
16
|
+
units: ["seconds"],
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
element.innerHTML = `
|
|
20
|
+
<span data-countdown-unit="seconds">
|
|
21
|
+
<span data-countdown-tag-value="true">00</span>
|
|
22
|
+
<span class="countdown-tag__label"></span>
|
|
23
|
+
</span>
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
new CountdownTagStatic(element);
|
|
27
|
+
|
|
28
|
+
expect(
|
|
29
|
+
element.querySelector("[data-countdown-tag-value]"),
|
|
30
|
+
).toHaveTextContent("59");
|
|
31
|
+
|
|
32
|
+
CountdownTagStatic.getInstance(element)?.destroy();
|
|
33
|
+
vi.useRealTimers();
|
|
34
|
+
});
|
|
35
|
+
|
|
7
36
|
it("updates visible value from current time", () => {
|
|
8
37
|
vi.useFakeTimers();
|
|
9
38
|
vi.setSystemTime(new Date("2026-07-24T00:00:00.000Z"));
|
|
@@ -100,11 +100,9 @@ $tile-unsized-icon-selector: build-unsized-icon-selector(">.icon") + ", " +
|
|
|
100
100
|
|
|
101
101
|
@mixin tile-action-icon {
|
|
102
102
|
flex-shrink: 0;
|
|
103
|
-
|
|
104
|
-
height: convert.to-rem(24px);
|
|
103
|
+
--icon-size: #{convert.to-rem(24px)};
|
|
105
104
|
|
|
106
105
|
@include breakpoint.get("sm") {
|
|
107
|
-
|
|
108
|
-
height: convert.to-rem(32px);
|
|
106
|
+
--icon-size: #{convert.to-rem(32px)};
|
|
109
107
|
}
|
|
110
108
|
}
|
|
@@ -23,7 +23,15 @@
|
|
|
23
23
|
@include mixins.tile-action;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.tile__body
|
|
26
|
+
.tile__body
|
|
27
|
+
> .icon:last-child:not(
|
|
28
|
+
.icon--small,
|
|
29
|
+
.icon--medium,
|
|
30
|
+
.icon--large,
|
|
31
|
+
.icon--xlarge,
|
|
32
|
+
.icon--xxlarge,
|
|
33
|
+
.icon--huge
|
|
34
|
+
) {
|
|
27
35
|
@include mixins.tile-action-icon;
|
|
28
36
|
}
|
|
29
37
|
}
|