@orangesk/orange-design-system 3.6.2 → 3.8.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.
Files changed (100) hide show
  1. package/build/components/Alert/style.css +1 -1
  2. package/build/components/Alert/style.css.map +1 -1
  3. package/build/components/Bar/style.css +1 -1
  4. package/build/components/Bar/style.css.map +1 -1
  5. package/build/components/Drawer/style.css +2 -0
  6. package/build/components/Drawer/style.css.map +1 -0
  7. package/build/components/Grid/style.css.map +1 -1
  8. package/build/components/Megamenu/style.css +1 -1
  9. package/build/components/Megamenu/style.css.map +1 -1
  10. package/build/components/Modal/style.css +1 -1
  11. package/build/components/Modal/style.css.map +1 -1
  12. package/build/components/StatusIndicator/style.css +2 -0
  13. package/build/components/StatusIndicator/style.css.map +1 -0
  14. package/build/components/Table/style.css +1 -1
  15. package/build/components/Table/style.css.map +1 -1
  16. package/build/components/index.js +1 -1
  17. package/build/components/index.js.map +1 -1
  18. package/build/components/types/index.d.ts +89 -3
  19. package/build/lib/base.css +1 -1
  20. package/build/lib/base.css.map +1 -1
  21. package/build/lib/components.css +1 -1
  22. package/build/lib/components.css.map +1 -1
  23. package/build/lib/footer.js +1 -1
  24. package/build/lib/footer.js.map +1 -1
  25. package/build/lib/megamenu.css +1 -1
  26. package/build/lib/megamenu.css.map +1 -1
  27. package/build/lib/megamenu.js +1 -1
  28. package/build/lib/megamenu.js.map +1 -1
  29. package/build/lib/scripts.js +1 -1
  30. package/build/lib/scripts.js.map +1 -1
  31. package/build/lib/style.css +1 -1
  32. package/build/lib/style.css.map +1 -1
  33. package/build/lib/utilities.css +1 -1
  34. package/build/lib/utilities.css.map +1 -1
  35. package/package.json +29 -29
  36. package/src/components/Alert/Alert.tsx +2 -2
  37. package/src/components/Alert/data.ts +8 -5
  38. package/src/components/Alert/styles/config.scss +4 -4
  39. package/src/components/Alert/styles/mixins.scss +8 -1
  40. package/src/components/Alert/tests/Alert.test.jsx +11 -1
  41. package/src/components/Bar/Bar.tsx +1 -1
  42. package/src/components/Bar/styles/config.scss +1 -0
  43. package/src/components/Bar/tests/Bar.unit.test.jsx +1 -1
  44. package/src/components/Carousel/Carousel.static.ts +103 -12
  45. package/src/components/Carousel/tests/Carousel.static.test.jsx +134 -0
  46. package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +12 -4
  47. package/src/components/Drawer/Drawer.static.ts +281 -0
  48. package/src/components/Drawer/Drawer.tsx +82 -0
  49. package/src/components/Drawer/DrawerBody.tsx +21 -0
  50. package/src/components/Drawer/DrawerFooter.tsx +21 -0
  51. package/src/components/Drawer/DrawerHeader.tsx +21 -0
  52. package/src/components/Drawer/index.ts +5 -0
  53. package/src/components/Drawer/styles/config.scss +17 -0
  54. package/src/components/Drawer/styles/mixins.scss +119 -0
  55. package/src/components/Drawer/styles/style.scss +71 -0
  56. package/src/components/Drawer/tests/Drawer.unit.test.jsx +149 -0
  57. package/src/components/Footer/data.ts +4 -0
  58. package/src/components/Forms/SegmentedControl/SegmentedControl.tsx +122 -0
  59. package/src/components/Forms/SegmentedControl/index.ts +5 -0
  60. package/src/components/Forms/SegmentedControl/styles/mixins.scss +52 -0
  61. package/src/components/Forms/SegmentedControl/styles/style.scss +35 -0
  62. package/src/components/Forms/SegmentedControl/tests/SegmentedControl.conformance.test.jsx +36 -0
  63. package/src/components/Forms/SegmentedControl/tests/SegmentedControl.unit.test.jsx +125 -0
  64. package/src/components/Forms/SelectionTile/PLAN.md +206 -0
  65. package/src/components/Forms/SelectionTile/SelectionTile.tsx +145 -0
  66. package/src/components/Forms/SelectionTile/index.ts +5 -0
  67. package/src/components/Forms/SelectionTile/styles/mixins.scss +83 -0
  68. package/src/components/Forms/SelectionTile/styles/style.scss +58 -0
  69. package/src/components/Forms/SelectionTile/tests/SelectionTile.conformance.test.jsx +32 -0
  70. package/src/components/Forms/SelectionTile/tests/SelectionTile.unit.test.jsx +146 -0
  71. package/src/components/Forms/index.ts +2 -0
  72. package/src/components/Icon/index.ts +1 -0
  73. package/src/components/Megamenu/Megamenu.tsx +20 -16
  74. package/src/components/Megamenu/MegamenuBlog.tsx +10 -7
  75. package/src/components/Megamenu/MyOrangeMobilePanel.tsx +2 -3
  76. package/src/components/Megamenu/constants.ts +3 -1
  77. package/src/components/Megamenu/styles/mixins.scss +53 -18
  78. package/src/components/Megamenu/styles/style.scss +12 -4
  79. package/src/components/Megamenu/tests/Megamenu.unit.test.jsx +32 -0
  80. package/src/components/Modal/styles/config.scss +3 -2
  81. package/src/components/StatusIndicator/StatusIndicator.tsx +29 -0
  82. package/src/components/StatusIndicator/index.ts +2 -0
  83. package/src/components/StatusIndicator/styles/config.scss +12 -0
  84. package/src/components/StatusIndicator/styles/mixins.scss +36 -0
  85. package/src/components/StatusIndicator/styles/style.scss +16 -0
  86. package/src/components/StatusIndicator/tests/StatusIndicator.conformance.test.jsx +22 -0
  87. package/src/components/StatusIndicator/tests/StatusIndicator.unit.test.jsx +70 -0
  88. package/src/components/Table/Table.static.ts +23 -10
  89. package/src/components/Table/Table.tsx +7 -2
  90. package/src/components/Table/styles/mixins.scss +59 -0
  91. package/src/components/Table/styles/style.scss +25 -0
  92. package/src/components/Table/tests/Table.static.unit.test.jsx +72 -0
  93. package/src/components/Table/tests/Table.unit.test.jsx +33 -0
  94. package/src/components/index.ts +13 -0
  95. package/src/styles/tokens/overlay.scss +3 -0
  96. package/src/styles/typography/style.scss +0 -13
  97. package/src/styles/utilities/border.scss +4 -0
  98. package/src/styles/utilities/border.styles.unit.test.jsx +9 -0
  99. package/src/styles/utilities/text.scss +12 -0
  100. package/src/components/Carousel/CHANGELOG.md +0 -11
@@ -0,0 +1,58 @@
1
+ @use "./mixins";
2
+
3
+ @layer components {
4
+ .selection-tile {
5
+ @include mixins.selection-tile-base;
6
+
7
+ &__control {
8
+ @include mixins.selection-tile-control;
9
+ }
10
+ &__body {
11
+ @include mixins.selection-tile-body;
12
+ }
13
+
14
+ &:has(input:hover) {
15
+ @include mixins.selection-tile-hover;
16
+ }
17
+ &:has(input:focus-visible) {
18
+ @include mixins.selection-tile-focus;
19
+ }
20
+ &:has(input:checked) {
21
+ @include mixins.selection-tile-selected;
22
+ }
23
+
24
+ &--warning {
25
+ @include mixins.selection-tile-warning;
26
+ }
27
+ &--error,
28
+ &--invalid {
29
+ @include mixins.selection-tile-error;
30
+ }
31
+
32
+ &:has(input:disabled) {
33
+ @include mixins.selection-tile-disabled;
34
+
35
+ input:disabled {
36
+ cursor: default;
37
+ }
38
+
39
+ input:disabled:not(:checked) + .checkbox-display,
40
+ input:disabled:not(:checked) + .radio-display {
41
+ @include mixins.selection-tile-disabled-control;
42
+ }
43
+ }
44
+
45
+ .expander,
46
+ .block-action__override {
47
+ @include mixins.selection-tile-interactive;
48
+ }
49
+ .message {
50
+ @include mixins.selection-tile-message;
51
+ }
52
+
53
+ .expander__summary,
54
+ .expander__summary--opened {
55
+ @include mixins.selection-tile-expander-summary;
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,32 @@
1
+ import { render } from "@testing-library/react";
2
+ import { axe } from "vitest-axe";
3
+
4
+ import { BlockActionOverride } from "../../../BlockAction";
5
+ import { Expander } from "../../../Expander";
6
+ import { SelectionTile } from "..";
7
+
8
+ it("is valid and accessible with radio, checkbox, and Expander content", async () => {
9
+ const { container } = render(
10
+ <fieldset>
11
+ <legend>Choose options</legend>
12
+ <SelectionTile
13
+ type="radio"
14
+ id="radio-a"
15
+ name="options"
16
+ label="Radio option"
17
+ >
18
+ <BlockActionOverride>
19
+ <Expander summary="Detail">Radio details</Expander>
20
+ </BlockActionOverride>
21
+ </SelectionTile>
22
+ <SelectionTile type="checkbox" id="check-a" label="Checkbox option">
23
+ Checkbox details
24
+ </SelectionTile>
25
+ </fieldset>,
26
+ );
27
+
28
+ expect(container).toHTMLValidate({
29
+ rules: { "element-permitted-content": "off" },
30
+ });
31
+ expect(await axe(container)).toHaveNoViolations();
32
+ });
@@ -0,0 +1,146 @@
1
+ import { fireEvent, render, screen } from "@testing-library/react";
2
+ import { BlockActionOverride } from "../../../BlockAction";
3
+ import { Expander } from "../../../Expander";
4
+ import { SelectionTile } from "..";
5
+
6
+ describe("SelectionTile", () => {
7
+ it("renders a radio with an associated label", () => {
8
+ render(
9
+ <SelectionTile type="radio" id="choice-a" name="choices" label="Choice A">
10
+ <p>Additional content</p>
11
+ </SelectionTile>,
12
+ );
13
+
14
+ expect(screen.getByRole("radio", { name: "Choice A" })).toBeInTheDocument();
15
+ expect(screen.getByText("Additional content")).toBeInTheDocument();
16
+ expect(screen.getByRole("radio")).toHaveClass("radiocheck--fill");
17
+ expect(
18
+ screen.getByText("Additional content").closest(".block-action"),
19
+ ).toHaveClass("block-action");
20
+ });
21
+
22
+ it("renders a checkbox and preserves native interaction", () => {
23
+ render(<SelectionTile type="checkbox" id="choice-b" label="Choice B" />);
24
+ const checkbox = screen.getByRole("checkbox", { name: "Choice B" });
25
+
26
+ expect(checkbox).not.toBeChecked();
27
+ fireEvent.click(checkbox);
28
+ expect(checkbox).toBeChecked();
29
+ });
30
+
31
+ it("renders a disabled native checkbox", () => {
32
+ render(
33
+ <SelectionTile
34
+ type="checkbox"
35
+ id="choice-disabled"
36
+ label="Unavailable choice"
37
+ isDisabled
38
+ />,
39
+ );
40
+
41
+ expect(screen.getByRole("checkbox")).toBeDisabled();
42
+ });
43
+
44
+ it("selects the option through its tile label", () => {
45
+ render(
46
+ <SelectionTile type="checkbox" id="choice-label" label="Choice label">
47
+ <p>Tile content</p>
48
+ </SelectionTile>,
49
+ );
50
+ const checkbox = screen.getByRole("checkbox", { name: "Choice label" });
51
+
52
+ fireEvent.click(screen.getByText("Choice label"));
53
+
54
+ expect(checkbox).toBeChecked();
55
+ });
56
+
57
+ it("renders optional predefined slots and arbitrary children", () => {
58
+ render(
59
+ <SelectionTile
60
+ type="checkbox"
61
+ id="choice-slots"
62
+ inputProps={{ "aria-label": "Slot choice" }}
63
+ price="€9.99"
64
+ message="Feedback"
65
+ >
66
+ <span>Custom content</span>
67
+ <span>More details</span>
68
+ </SelectionTile>,
69
+ );
70
+
71
+ expect(
72
+ screen.getByRole("checkbox", { name: "Slot choice" }),
73
+ ).toBeInTheDocument();
74
+ expect(screen.getByRole("checkbox")).toHaveAttribute(
75
+ "aria-describedby",
76
+ "choice-slots-message",
77
+ );
78
+ expect(screen.getByText("€9.99")).toHaveClass(
79
+ "caption",
80
+ "text-accent",
81
+ "bold",
82
+ );
83
+ expect(screen.getByText("Feedback")).toHaveClass("selection-tile__message");
84
+ expect(screen.getByText("Custom content")).toBeInTheDocument();
85
+ expect(screen.getByText("More details")).toBeInTheDocument();
86
+ });
87
+
88
+ it("marks error status invalid and warning status advisory", () => {
89
+ const { rerender } = render(
90
+ <SelectionTile
91
+ type="radio"
92
+ id="choice-c"
93
+ name="choices"
94
+ label="Choice C"
95
+ status="error"
96
+ />,
97
+ );
98
+ expect(screen.getByRole("radio")).toHaveAttribute("aria-invalid", "true");
99
+
100
+ rerender(
101
+ <SelectionTile
102
+ type="radio"
103
+ id="choice-c"
104
+ name="choices"
105
+ label="Choice C"
106
+ status="warning"
107
+ />,
108
+ );
109
+ expect(screen.getByRole("radio")).not.toHaveAttribute("aria-invalid");
110
+ });
111
+
112
+ it("forwards explicit description relationships to the native input", () => {
113
+ render(
114
+ <SelectionTile
115
+ type="checkbox"
116
+ id="choice-message"
117
+ label="Choice with feedback"
118
+ inputProps={{ "aria-describedby": "choice-message-feedback" }}
119
+ message={<p id="choice-message-feedback">Additional feedback</p>}
120
+ />,
121
+ );
122
+
123
+ expect(screen.getByRole("checkbox")).toHaveAttribute(
124
+ "aria-describedby",
125
+ "choice-message-feedback",
126
+ );
127
+ });
128
+
129
+ it("keeps an Expander in the override layer", () => {
130
+ render(
131
+ <SelectionTile type="checkbox" id="choice-d" label="Choice D">
132
+ <BlockActionOverride>
133
+ <Expander summary="Detail">Details</Expander>
134
+ </BlockActionOverride>
135
+ </SelectionTile>,
136
+ );
137
+
138
+ const checkbox = screen.getByRole("checkbox");
139
+ const summary = screen.getByText("Detail");
140
+
141
+ expect(summary.closest(".block-action__override")).toBeInTheDocument();
142
+ fireEvent.click(summary);
143
+
144
+ expect(checkbox).not.toBeChecked();
145
+ });
146
+ });
@@ -11,6 +11,8 @@ export { Label } from "./Label";
11
11
  export { Message } from "./Message";
12
12
  export { Radio } from "./Radio";
13
13
  export { RangeSlider } from "./RangeSlider";
14
+ export { SegmentedControl, SegmentedControlItem } from "./SegmentedControl";
14
15
  export { Select } from "./Select";
16
+ export { SelectionTile } from "./SelectionTile";
15
17
  export { TextArea } from "./TextArea";
16
18
  export { TextInput } from "./TextInput";
@@ -1,3 +1,4 @@
1
+ export type { IconColor } from "./Icon";
1
2
  export { Icon } from "./Icon";
2
3
  export { Pictogram } from "./Pictogram";
3
4
  export { SpritePathContext, SpritePathProvider } from "./SpritePathContext";
@@ -12,7 +12,6 @@ import {
12
12
  CLASS_CARD,
13
13
  CLASS_CONTAINER,
14
14
  CLASS_GRID,
15
- CLASS_HIDE_LG_ONLY,
16
15
  CLASS_HIDE_LG_UP,
17
16
  CLASS_HIDE_MD_DOWN,
18
17
  CLASS_MAIN,
@@ -29,14 +28,15 @@ import {
29
28
  CLASS_NAV_ITEM,
30
29
  CLASS_NAV_ITEM_LEAD,
31
30
  CLASS_NAV_ITEM_MAIN,
31
+ CLASS_NAV_ITEM_PUSH,
32
32
  CLASS_NAV_LINK,
33
33
  CLASS_NAV_LINK_CTA,
34
34
  CLASS_NAV_LINK_LOCALE,
35
+ CLASS_NAV_LOCALE,
35
36
  CLASS_NAV_MOBILE_LOCALE,
36
37
  CLASS_NAV_SELECT,
37
38
  CLASS_NAV_SELECT_WRAPPER,
38
39
  CLASS_NAV_SPACE_SMALL,
39
- CLASS_NAV_SPACER,
40
40
  CLASS_NAV_VERTICAL,
41
41
  CLASS_OVERLAY,
42
42
  CLASS_ROOT,
@@ -53,6 +53,7 @@ import {
53
53
  CLASS_TILE_LABEL,
54
54
  CLASS_TILES,
55
55
  CLASS_TOP,
56
+ CLASS_TOP_CONTENT,
56
57
  } from "./constants";
57
58
  import type { MegamenuTile, MenuItem, MenuSection } from "./data";
58
59
  import { megamenuTiles, menuSections } from "./data";
@@ -251,10 +252,10 @@ export const Megamenu = ({
251
252
  className={cx(CLASS_TOP, CLASS_HIDE_MD_DOWN)}
252
253
  data-hide-when-sticky="true"
253
254
  >
254
- <div className={CLASS_CONTAINER}>
255
+ <div className={cx(CLASS_CONTAINER, CLASS_TOP_CONTENT)}>
255
256
  <ul
256
257
  className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}
257
- aria-label="Top menu"
258
+ aria-label="Zákaznícke a kontaktné odkazy"
258
259
  >
259
260
  <li className={CLASS_NAV_ITEM}>
260
261
  <a
@@ -270,14 +271,12 @@ export const Megamenu = ({
270
271
  Podnikatelia a malé firmy
271
272
  </a>
272
273
  </li>
273
- <li className={CLASS_NAV_ITEM}>
274
+ <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_PUSH)}>
274
275
  <a href="/" className={CLASS_NAV_LINK}>
275
276
  Velké firmy
276
277
  </a>
277
278
  </li>
278
279
 
279
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
280
-
281
280
  <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_LEAD)}>
282
281
  <a href="/" className={CLASS_NAV_LINK}>
283
282
  <MegamenuIcon
@@ -290,6 +289,11 @@ export const Megamenu = ({
290
289
  Kontakt
291
290
  </a>
292
291
  </li>
292
+ </ul>
293
+ <ul
294
+ className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL, CLASS_NAV_LOCALE)}
295
+ aria-label="Výber jazyka"
296
+ >
293
297
  <li className={CLASS_NAV_ITEM}>
294
298
  <a href="/" className={cx(CLASS_NAV_LINK, "is-active")}>
295
299
  SK
@@ -307,7 +311,13 @@ export const Megamenu = ({
307
311
  <div className={CLASS_MAIN}>
308
312
  <div className={CLASS_CONTAINER}>
309
313
  <ul className={CLASS_NAV} aria-label="Hlavné menu">
310
- <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_MAIN)}>
314
+ <li
315
+ className={cx(
316
+ CLASS_NAV_ITEM,
317
+ CLASS_NAV_ITEM_MAIN,
318
+ CLASS_NAV_ITEM_PUSH,
319
+ )}
320
+ >
311
321
  <MegamenuLogoLink
312
322
  compactLogoOnly={compactLogoOnly}
313
323
  title={title}
@@ -373,6 +383,7 @@ export const Megamenu = ({
373
383
  className={cx(
374
384
  CLASS_NAV_ITEM,
375
385
  CLASS_NAV_ITEM_MAIN,
386
+ CLASS_NAV_ITEM_PUSH,
376
387
  CLASS_HIDE_MD_DOWN,
377
388
  )}
378
389
  >
@@ -388,11 +399,6 @@ export const Megamenu = ({
388
399
  </a>
389
400
  </li>
390
401
 
391
- <li
392
- className={cx(CLASS_NAV_SPACER, CLASS_HIDE_LG_ONLY)}
393
- aria-hidden="true"
394
- ></li>
395
-
396
402
  <li className={cx(CLASS_NAV_ITEM, CLASS_HIDE_MD_DOWN)}>
397
403
  <button
398
404
  type="button"
@@ -515,7 +521,7 @@ export const Megamenu = ({
515
521
  <div className={CLASS_MOBILE_HEADER}>
516
522
  <div className={CLASS_CONTAINER}>
517
523
  <ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
518
- <li className={CLASS_NAV_ITEM}>
524
+ <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_PUSH)}>
519
525
  <div
520
526
  className={cx(
521
527
  CLASS_NAV_BUTTON,
@@ -535,8 +541,6 @@ export const Megamenu = ({
535
541
  </div>
536
542
  </li>
537
543
 
538
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
539
-
540
544
  <li className={CLASS_NAV_ITEM}>
541
545
  <MegamenuCloseButton
542
546
  ariaLabel="Zatvoriť menu"
@@ -16,10 +16,10 @@ import {
16
16
  CLASS_NAV_ICON_NO_GAP_MD_DOWN,
17
17
  CLASS_NAV_ITEM,
18
18
  CLASS_NAV_ITEM_MAIN,
19
+ CLASS_NAV_ITEM_PUSH,
19
20
  CLASS_NAV_LINK,
20
21
  CLASS_NAV_LINK_NO_LINE,
21
22
  CLASS_NAV_SPACE_SMALL,
22
- CLASS_NAV_SPACER,
23
23
  CLASS_NAV_VERTICAL,
24
24
  CLASS_OVERLAY,
25
25
  CLASS_ROOT,
@@ -75,7 +75,13 @@ export const MegamenuBlog = ({
75
75
  <div className={CLASS_MAIN}>
76
76
  <div className={CLASS_CONTAINER}>
77
77
  <ul className={CLASS_NAV} aria-label="Hlavné menu">
78
- <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_MAIN)}>
78
+ <li
79
+ className={cx(
80
+ CLASS_NAV_ITEM,
81
+ CLASS_NAV_ITEM_MAIN,
82
+ CLASS_NAV_ITEM_PUSH,
83
+ )}
84
+ >
79
85
  <MegamenuLogoLink
80
86
  compactLogoOnly={compactLogoOnly}
81
87
  title={title}
@@ -88,6 +94,7 @@ export const MegamenuBlog = ({
88
94
  className={cx(
89
95
  CLASS_NAV_ITEM,
90
96
  CLASS_NAV_ITEM_MAIN,
97
+ CLASS_NAV_ITEM_PUSH,
91
98
  CLASS_HIDE_MD_DOWN,
92
99
  )}
93
100
  >
@@ -99,8 +106,6 @@ export const MegamenuBlog = ({
99
106
  </a>
100
107
  </li>
101
108
 
102
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
103
-
104
109
  <li className={cx(CLASS_NAV_ITEM, CLASS_HIDE_MD_DOWN)}>
105
110
  <button
106
111
  type="button"
@@ -309,7 +314,7 @@ export const MegamenuBlog = ({
309
314
  <div className={CLASS_MOBILE_HEADER}>
310
315
  <div className={CLASS_CONTAINER}>
311
316
  <ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
312
- <li className={CLASS_NAV_ITEM}>
317
+ <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_PUSH)}>
313
318
  <MegamenuLogoLink
314
319
  compactLogoOnly={compactLogoOnly}
315
320
  title={title}
@@ -318,8 +323,6 @@ export const MegamenuBlog = ({
318
323
  </MegamenuLogoLink>
319
324
  </li>
320
325
 
321
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
322
-
323
326
  <li className={CLASS_NAV_ITEM}>
324
327
  <MegamenuCloseButton
325
328
  ariaLabel="Zatvoriť menu"
@@ -19,8 +19,8 @@ import {
19
19
  CLASS_MOBILE_HEADER,
20
20
  CLASS_NAV,
21
21
  CLASS_NAV_ITEM,
22
+ CLASS_NAV_ITEM_PUSH,
22
23
  CLASS_NAV_SPACE_SMALL,
23
- CLASS_NAV_SPACER,
24
24
  CLASS_SUBNAV,
25
25
  CLASS_SUBNAV_ITEM,
26
26
  } from "./constants";
@@ -51,8 +51,7 @@ export const MyOrangeMobilePanel = ({
51
51
  <div className={CLASS_MOBILE_HEADER}>
52
52
  <div className={CLASS_CONTAINER}>
53
53
  <ul className={cx(CLASS_NAV, CLASS_NAV_SPACE_SMALL)}>
54
- <li className={CLASS_NAV_SPACER} aria-hidden="true"></li>
55
- <li className={CLASS_NAV_ITEM}>
54
+ <li className={cx(CLASS_NAV_ITEM, CLASS_NAV_ITEM_PUSH)}>
56
55
  <MegamenuCloseButton
57
56
  ariaLabel="Zatvoriť panel Môj Orange"
58
57
  target="my-orange"
@@ -1,6 +1,7 @@
1
1
  export const CLASS_ROOT = "megamenu";
2
2
 
3
3
  export const CLASS_TOP = `${CLASS_ROOT}__top`;
4
+ export const CLASS_TOP_CONTENT = `${CLASS_ROOT}__top-content`;
4
5
  export const CLASS_MAIN = `${CLASS_ROOT}__main`;
5
6
  export const CLASS_SUBMAIN = `${CLASS_ROOT}__submain`;
6
7
  export const CLASS_CONTAINER = `${CLASS_ROOT}__container`;
@@ -14,9 +15,11 @@ export const CLASS_TILE_LABEL = `${CLASS_ROOT}__tile-label`;
14
15
  export const CLASS_NAV = `${CLASS_ROOT}__nav`;
15
16
  export const CLASS_NAV_VERTICAL = `${CLASS_ROOT}__nav--vertical`;
16
17
  export const CLASS_NAV_SPACE_SMALL = `${CLASS_ROOT}__nav--space-small`;
18
+ export const CLASS_NAV_LOCALE = `${CLASS_ROOT}__nav--locale`;
17
19
  export const CLASS_NAV_MOBILE_LOCALE = `${CLASS_ROOT}__nav--mobile-locale`;
18
20
  export const CLASS_NAV_ITEM = `${CLASS_ROOT}__nav-item`;
19
21
  export const CLASS_NAV_ITEM_LEAD = `${CLASS_ROOT}__nav-item--lead`;
22
+ export const CLASS_NAV_ITEM_PUSH = `${CLASS_ROOT}__nav-item--push`;
20
23
  export const CLASS_NAV_ITEM_MAIN = `${CLASS_ROOT}__nav-item--main`;
21
24
  export const CLASS_NAV_LINK = `${CLASS_ROOT}__nav-link`;
22
25
  export const CLASS_NAV_LINK_LOCALE = `${CLASS_ROOT}__nav-link--locale`;
@@ -24,7 +27,6 @@ export const CLASS_NAV_LINK_NO_LINE = `${CLASS_ROOT}__nav-link--no-line`;
24
27
  export const CLASS_NAV_LINK_CTA = `${CLASS_ROOT}__nav-link--cta`;
25
28
  export const CLASS_NAV_SELECT = `${CLASS_ROOT}__nav-select`;
26
29
  export const CLASS_NAV_CART_ICON = `${CLASS_ROOT}__nav-cart-icon`;
27
- export const CLASS_NAV_SPACER = `${CLASS_ROOT}__nav-spacer`;
28
30
  export const CLASS_NAV_ICON = `${CLASS_ROOT}__nav-icon`;
29
31
  export const CLASS_NAV_ICON_NO_GAP_MD_DOWN = `${CLASS_NAV_ICON}--no-gap-md-down`;
30
32
  export const CLASS_NAV_ICON_CTA = `${CLASS_NAV_ICON}--cta`;
@@ -17,6 +17,7 @@
17
17
  @use "../../Button/styles/mixins" as button;
18
18
  @use "../../Card/styles/mixins" as card;
19
19
  @use "../../../styles/typography/mixins" as typography;
20
+ @use "../../../styles/tokens/overlay";
20
21
 
21
22
  @use "./config";
22
23
 
@@ -233,6 +234,10 @@
233
234
  gap: convert.to-rem(15px);
234
235
  }
235
236
 
237
+ @mixin nav-locale {
238
+ flex: 0 0 auto;
239
+ }
240
+
236
241
  @mixin nav-mobile-locale {
237
242
  position: relative;
238
243
  padding: convert.to-rem(15px) 0 !important;
@@ -261,6 +266,16 @@
261
266
  margin-right: convert.to-rem(10px);
262
267
  }
263
268
 
269
+ @mixin nav-item-push {
270
+ margin-inline-end: auto;
271
+
272
+ &#{config.$class-root}__nav-item--main:first-child {
273
+ @include breakpoint.get("lg") {
274
+ margin-inline-end: 0;
275
+ }
276
+ }
277
+ }
278
+
264
279
  @mixin nav-dropdown {
265
280
  position: absolute;
266
281
  top: calc(100% + 1px);
@@ -607,10 +622,25 @@
607
622
  }
608
623
  }
609
624
 
610
- @mixin nav-spacer {
611
- display: flex;
612
- flex: 1 0 1px;
613
- visibility: hidden;
625
+ @mixin top-content {
626
+ flex-direction: row;
627
+ align-items: center;
628
+ gap: convert.to-rem(15px);
629
+
630
+ > #{config.$class-root}__nav {
631
+ height: 100%;
632
+ margin-bottom: 0;
633
+ }
634
+
635
+ > #{config.$class-root}__nav:first-child {
636
+ flex: 1 1 0;
637
+ min-width: 0;
638
+ }
639
+
640
+ > #{config.$class-root}__nav:last-child {
641
+ flex: 0 0 auto;
642
+ width: auto;
643
+ }
614
644
  }
615
645
 
616
646
  @mixin subnav {
@@ -623,10 +653,16 @@
623
653
 
624
654
  @mixin subnav-item {
625
655
  display: flex;
626
- gap: convert.to-rem(10px);
656
+ column-gap: convert.to-rem(10px);
627
657
  margin-bottom: convert.to-rem(10px) !important;
628
658
 
659
+ > #{config.$class-root}__tag {
660
+ align-self: flex-start;
661
+ }
662
+
629
663
  a {
664
+ min-width: 0;
665
+
630
666
  &:hover,
631
667
  &:focus,
632
668
  &:focus-visible,
@@ -686,13 +722,9 @@
686
722
  left: 0;
687
723
  width: 100%;
688
724
  height: 100%;
689
- background-color: color-mix(
690
- in srgb,
691
- var(--color-surface-contrast) 75%,
692
- transparent
693
- );
725
+ background-color: overlay.$background;
694
726
  opacity: 0;
695
- transition: opacity 0.2s ease-out;
727
+ transition: opacity overlay.$transition;
696
728
  }
697
729
 
698
730
  &.is-active {
@@ -755,6 +787,11 @@
755
787
  height: convert.to-rem(80px);
756
788
  border-bottom: 1px solid var(--color-border-subtle);
757
789
 
790
+ #{config.$class-root}__nav-item--push:only-child {
791
+ margin-inline-start: auto;
792
+ margin-inline-end: 0;
793
+ }
794
+
758
795
  @include breakpoint.get("md", "down") {
759
796
  height: convert.to-rem(60px);
760
797
  }
@@ -1101,11 +1138,7 @@
1101
1138
  left: 0;
1102
1139
  width: 100%;
1103
1140
  height: 0;
1104
- background-color: color-mix(
1105
- in srgb,
1106
- var(--color-surface-contrast) 75%,
1107
- transparent
1108
- );
1141
+ background-color: overlay.$background;
1109
1142
  border: none;
1110
1143
  appearance: none;
1111
1144
  -webkit-appearance: none;
@@ -1114,8 +1147,8 @@
1114
1147
  opacity: 0;
1115
1148
  visibility: hidden;
1116
1149
  transition:
1117
- opacity 0.15s ease-out,
1118
- visibility 0.15s ease-out;
1150
+ opacity overlay.$transition,
1151
+ visibility overlay.$transition;
1119
1152
  outline: none;
1120
1153
 
1121
1154
  &.is-active {
@@ -1293,6 +1326,8 @@
1293
1326
 
1294
1327
  @mixin tag {
1295
1328
  @include tag.base;
1329
+ flex: 0 0 auto;
1330
+ white-space: nowrap;
1296
1331
  text-decoration: none !important;
1297
1332
 
1298
1333
  @each $name, $props in tagConfig.$sizes {
@@ -36,6 +36,10 @@
36
36
  &--lead {
37
37
  @include mixins.nav-item-lead;
38
38
  }
39
+
40
+ &--push {
41
+ @include mixins.nav-item-push;
42
+ }
39
43
  }
40
44
 
41
45
  &--vertical {
@@ -46,6 +50,10 @@
46
50
  @include mixins.nav-space-small;
47
51
  }
48
52
 
53
+ &--locale {
54
+ @include mixins.nav-locale;
55
+ }
56
+
49
57
  &--mobile-locale {
50
58
  @include mixins.nav-mobile-locale;
51
59
  }
@@ -109,10 +117,6 @@
109
117
  @include mixins.nav-icon-cta;
110
118
  }
111
119
  }
112
-
113
- &-spacer {
114
- @include mixins.nav-spacer;
115
- }
116
120
  }
117
121
 
118
122
  &__subnav {
@@ -222,6 +226,10 @@
222
226
 
223
227
  &__container {
224
228
  @include mixins.container;
229
+
230
+ &#{config.$class-root}__top-content {
231
+ @include mixins.top-content;
232
+ }
225
233
  }
226
234
 
227
235
  &__grid {