@orangesk/orange-design-system 3.6.1 → 3.7.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/BodyBanner/style.css +1 -1
- package/build/components/BodyBanner/style.css.map +1 -1
- package/build/components/Grid/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/components/types/index.d.ts +35 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.js +1 -1
- package/build/lib/footer.js.map +1 -1
- 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/package.json +22 -22
- package/src/components/BodyBanner/styles/mixins.scss +7 -5
- 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/Footer/data.ts +4 -0
- package/src/components/Forms/SelectionTile/PLAN.md +206 -0
- package/src/components/Forms/SelectionTile/SelectionTile.tsx +145 -0
- package/src/components/Forms/SelectionTile/index.ts +5 -0
- package/src/components/Forms/SelectionTile/styles/mixins.scss +83 -0
- package/src/components/Forms/SelectionTile/styles/style.scss +58 -0
- package/src/components/Forms/SelectionTile/tests/SelectionTile.conformance.test.jsx +32 -0
- package/src/components/Forms/SelectionTile/tests/SelectionTile.unit.test.jsx +146 -0
- package/src/components/Forms/index.ts +1 -0
- package/src/components/Megamenu/Megamenu.tsx +20 -16
- package/src/components/Megamenu/MegamenuBlog.tsx +10 -7
- package/src/components/Megamenu/MyOrangeMobilePanel.tsx +2 -3
- package/src/components/Megamenu/constants.ts +3 -1
- package/src/components/Megamenu/styles/mixins.scss +38 -4
- package/src/components/Megamenu/styles/style.scss +12 -4
- package/src/components/Megamenu/tests/Megamenu.unit.test.jsx +32 -0
- package/src/components/index.ts +2 -0
|
@@ -4,6 +4,38 @@ import "@testing-library/jest-dom/vitest";
|
|
|
4
4
|
import { Megamenu, MegamenuBlog } from "../";
|
|
5
5
|
|
|
6
6
|
describe("Megamenu logo markup", () => {
|
|
7
|
+
it("separates top links from the language switcher without a spacer item", () => {
|
|
8
|
+
const { container } = render(<Megamenu notSticky />);
|
|
9
|
+
const topContent = container.querySelector(".megamenu__top-content");
|
|
10
|
+
const lists = topContent?.querySelectorAll(":scope > ul");
|
|
11
|
+
|
|
12
|
+
expect(lists).toHaveLength(2);
|
|
13
|
+
expect(lists?.[1]).toHaveAttribute("aria-label", "Výber jazyka");
|
|
14
|
+
expect(
|
|
15
|
+
topContent?.querySelector(".megamenu__nav-spacer"),
|
|
16
|
+
).not.toBeInTheDocument();
|
|
17
|
+
expect(
|
|
18
|
+
topContent?.querySelector(".megamenu__nav-item--push"),
|
|
19
|
+
).toHaveTextContent("Velké firmy");
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("pushes mobile utility controls after the main logo", () => {
|
|
23
|
+
const { container, rerender } = render(<Megamenu notSticky />);
|
|
24
|
+
const mainLogoItem = container.querySelector(
|
|
25
|
+
".megamenu__main .megamenu__nav-item--main:first-child",
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
expect(mainLogoItem).toHaveClass("megamenu__nav-item--push");
|
|
29
|
+
|
|
30
|
+
rerender(<MegamenuBlog notSticky />);
|
|
31
|
+
|
|
32
|
+
expect(
|
|
33
|
+
container.querySelector(
|
|
34
|
+
".megamenu__main .megamenu__nav-item--main:first-child",
|
|
35
|
+
),
|
|
36
|
+
).toHaveClass("megamenu__nav-item--push");
|
|
37
|
+
});
|
|
38
|
+
|
|
7
39
|
it("is sticky by default and supports disabling stickiness", () => {
|
|
8
40
|
const { container, rerender } = render(<Megamenu />);
|
|
9
41
|
const nav = container.querySelector("[data-megamenu]");
|
package/src/components/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
Radio,
|
|
52
52
|
RangeSlider,
|
|
53
53
|
Select,
|
|
54
|
+
SelectionTile,
|
|
54
55
|
TextArea,
|
|
55
56
|
TextInput,
|
|
56
57
|
} from "./Forms";
|
|
@@ -186,6 +187,7 @@ export {
|
|
|
186
187
|
RangeSlider,
|
|
187
188
|
Section,
|
|
188
189
|
Select,
|
|
190
|
+
SelectionTile,
|
|
189
191
|
Skeleton,
|
|
190
192
|
SkipLink,
|
|
191
193
|
SocialButton,
|