@orangesk/orange-design-system 2.0.0-beta.34 → 2.0.0-beta.36

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 (211) hide show
  1. package/README.md +9 -3
  2. package/build/components/BodyBanner/style.css +1 -1
  3. package/build/components/BodyBanner/style.css.map +1 -1
  4. package/build/components/Megamenu/style.css +1 -1
  5. package/build/components/Megamenu/style.css.map +1 -1
  6. package/build/components/Table/style.css +1 -1
  7. package/build/components/Table/style.css.map +1 -1
  8. package/build/components/index.js +1 -1
  9. package/build/components/index.js.map +1 -1
  10. package/build/components/tsconfig.tsbuildinfo +1 -1
  11. package/build/components/types/index.d.ts +11 -1
  12. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +2 -0
  13. package/build/components/types/src/components/Forms/TextInput/TextInput.d.ts +3 -0
  14. package/build/components/types/src/components/Icon/index.d.ts +1 -0
  15. package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +2 -0
  16. package/build/components/types/src/components/Megamenu/constants.d.ts +4 -0
  17. package/build/components/types/src/components/index.d.ts +2 -2
  18. package/build/lib/components.css +1 -1
  19. package/build/lib/components.css.map +1 -1
  20. package/build/lib/footer.js.map +1 -1
  21. package/build/lib/megamenu.css +1 -1
  22. package/build/lib/megamenu.css.map +1 -1
  23. package/build/lib/megamenu.js +1 -1
  24. package/build/lib/megamenu.js.map +1 -1
  25. package/build/lib/scripts.js +1 -1
  26. package/build/lib/scripts.js.map +1 -1
  27. package/build/lib/style.css +1 -1
  28. package/build/lib/style.css.map +1 -1
  29. package/build/lib/tsconfig.tsbuildinfo +1 -1
  30. package/build/search-index.json +4 -4
  31. package/package.json +22 -13
  32. package/src/components/Accordion/tests/{Accordion.static.test.js → Accordion.static.test.jsx} +23 -23
  33. package/src/components/Accordion/tests/{Accordion.unit.test.js → Accordion.unit.test.jsx} +1 -1
  34. package/src/components/Alert/tests/{Alert.conformance.test.js → Alert.conformance.test.jsx} +1 -1
  35. package/src/components/Alert/tests/{Alert.test.js → Alert.test.jsx} +1 -1
  36. package/src/components/Alert/tests/Alert.visual.test.jsx +138 -0
  37. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-custom-title-chromium-linux.png +0 -0
  38. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-danger-chromium-linux.png +0 -0
  39. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-full-width-chromium-linux.png +0 -0
  40. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-success-chromium-linux.png +0 -0
  41. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-buttons-chromium-linux.png +0 -0
  42. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-chromium-linux.png +0 -0
  43. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-description-buttons-chromium-linux.png +0 -0
  44. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-description-chromium-linux.png +0 -0
  45. package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-warning-chromium-linux.png +0 -0
  46. package/src/components/AnchorNavigation/tests/{AnchorNavigation.conformance.test.js → AnchorNavigation.conformance.test.jsx} +1 -1
  47. package/src/components/Bar/tests/{Bar.conformance.test.js → Bar.conformance.test.jsx} +1 -1
  48. package/src/components/BlockAction/tests/{BlockAction.conformance.test.js → BlockAction.conformance.test.jsx} +1 -1
  49. package/src/components/BlockAction/tests/{BlockActionControl.unit.test.js → BlockActionControl.unit.test.jsx} +2 -2
  50. package/src/components/BodyBanner/styles/mixins.scss +1 -5
  51. package/src/components/BodyBanner/tests/{BodyBanner.conformance.test.js → BodyBanner.conformance.test.jsx} +1 -1
  52. package/src/components/Breadcrumbs/tests/{Breadcrumbs.conformance.test.js → Breadcrumbs.conformance.test.jsx} +1 -1
  53. package/src/components/Button/tests/{Button.conformance.test.js → Button.conformance.test.jsx} +1 -1
  54. package/src/components/Button/tests/{Button.test.js → Button.test.jsx} +1 -1
  55. package/src/components/Buttons/tests/{Buttons.conformance.test.js → Buttons.conformance.test.jsx} +1 -1
  56. package/src/components/Card/tests/{Card.conformance.test.js → Card.conformance.test.jsx} +1 -1
  57. package/src/components/Carousel/Carousel.static.ts +40 -0
  58. package/src/components/Carousel/tests/{Carousel.conformance.test.js → Carousel.conformance.test.jsx} +1 -1
  59. package/src/components/Carousel/tests/{Carousel.static.test.js → Carousel.static.test.jsx} +74 -42
  60. package/src/components/CarouselHero/tests/{CarouselHero.conformance.test.js → CarouselHero.conformance.test.jsx} +25 -9
  61. package/src/components/CarouselHero/tests/{CarouselHeroItem.conformance.test.js → CarouselHeroItem.conformance.test.jsx} +1 -1
  62. package/src/components/CarouselPromotions/tests/{CarouselPromotions.conformance.test.js → CarouselPromotions.conformance.test.jsx} +12 -3
  63. package/src/components/CarouselPromotions/tests/{CarouselPromotions.unit.test.js → CarouselPromotions.unit.test.jsx} +2 -3
  64. package/src/components/CartTable/tests/{CartTable.conformance.test.js → CartTable.conformance.test.jsx} +1 -1
  65. package/src/components/Container/tests/{Container.conformance.test.js → Container.conformance.test.jsx} +2 -6
  66. package/src/components/Container/tests/{Container.unit.test.js → Container.unit.test.jsx} +2 -2
  67. package/src/components/Controls/tests/{Controls.test.js → Controls.test.jsx} +12 -12
  68. package/src/components/Cover/tests/{Cover.conformance.test.js → Cover.conformance.test.jsx} +1 -1
  69. package/src/components/Divider/tests/{Divider.conformance.test.js → Divider.conformance.test.jsx} +1 -1
  70. package/src/components/Dropdown/tests/{Dropdown.conformance.test.js → Dropdown.conformance.test.jsx} +1 -1
  71. package/src/components/Expander/tests/{Expander.conformance.test.js → Expander.conformance.test.jsx} +1 -1
  72. package/src/components/FeatureAccordion/tests/{FeatureAccordion.conformance.test.js → FeatureAccordion.conformance.test.jsx} +1 -1
  73. package/src/components/Footer/tests/{Footer.conformance.test.js → Footer.conformance.test.jsx} +1 -5
  74. package/src/components/Forms/Autocomplete/Autocomplete.static.ts +36 -0
  75. package/src/components/Forms/Autocomplete/styles/style.scss +42 -0
  76. package/src/components/Forms/Field/tests/{Autocomplete.Field.conformance.test.js → Autocomplete.Field.conformance.test.jsx} +1 -1
  77. package/src/components/Forms/Field/tests/{Checkbox.Field.conformance.test.js → Checkbox.Field.conformance.test.jsx} +1 -1
  78. package/src/components/Forms/Field/tests/{File.Field.conformance.test.js → File.Field.conformance.test.jsx} +2 -2
  79. package/src/components/Forms/Field/tests/{Group.Field.conformance.test.js → Group.Field.conformance.test.jsx} +1 -1
  80. package/src/components/Forms/Field/tests/{Radio.Field.conformance.test.js → Radio.Field.conformance.test.jsx} +1 -1
  81. package/src/components/Forms/Field/tests/{Rangeslider.Field.test.js → Rangeslider.Field.test.jsx} +1 -1
  82. package/src/components/Forms/Field/tests/{Select.Field.conformance.test.js → Select.Field.conformance.test.jsx} +1 -1
  83. package/src/components/Forms/Field/tests/{Text.Field.conformance.test.js → Text.Field.conformance.test.jsx} +1 -1
  84. package/src/components/Forms/Field/tests/{Textarea.Field.conformance.test.js → Textarea.Field.conformance.test.jsx} +1 -1
  85. package/src/components/Forms/TextInput/TextInput.tsx +30 -3
  86. package/src/components/Forms/TextInput/styles/style.scss +62 -0
  87. package/src/components/Grid/tests/{GridCol.unit.test.js → GridCol.unit.test.jsx} +1 -1
  88. package/src/components/Hero/tests/{Hero.conformance.test.js → Hero.conformance.test.jsx} +1 -1
  89. package/src/components/Icon/index.ts +1 -0
  90. package/src/components/Icon/tests/{Icon.conformance.test.js → Icon.conformance.test.jsx} +1 -1
  91. package/src/components/Icon/tests/{Icon.unit.test.js → Icon.unit.test.jsx} +1 -1
  92. package/src/components/Icon/tests/{Pictogram.unit.test.js → Pictogram.unit.test.jsx} +2 -20
  93. package/src/components/IconList/tests/{IconList.conformance.test.js → IconList.conformance.test.jsx} +2 -2
  94. package/src/components/IconList/tests/{IconList.unit.test.js → IconList.unit.test.jsx} +1 -1
  95. package/src/components/IconList/tests/{Item.unit.test.js → Item.unit.test.jsx} +1 -1
  96. package/src/components/Image/tests/{Image.conformance.test.js → Image.conformance.test.jsx} +1 -1
  97. package/src/components/Image/tests/{Image.unit.test.js → Image.unit.test.jsx} +12 -3
  98. package/src/components/Link/tests/{Link.conformance.test.js → Link.conformance.test.jsx} +2 -2
  99. package/src/components/Link/tests/{Link.unit.test.js → Link.unit.test.jsx} +5 -5
  100. package/src/components/List/tests/{List.conformance.test.js → List.conformance.test.jsx} +1 -1
  101. package/src/components/Loader/tests/{Loader.conformance.test.js → Loader.conformance.test.jsx} +1 -1
  102. package/src/components/Megamenu/Megamenu.static.ts +59 -8
  103. package/src/components/Megamenu/MegamenuBlog.tsx +5 -1
  104. package/src/components/Megamenu/MegamenuSearchContent.tsx +22 -14
  105. package/src/components/Megamenu/constants.ts +4 -0
  106. package/src/components/Megamenu/styles/mixins.scss +48 -3
  107. package/src/components/Megamenu/styles/style.scss +8 -0
  108. package/src/components/Modal/tests/{Modal.conformance.test.js → Modal.conformance.test.jsx} +2 -2
  109. package/src/components/Pagination/tests/{Item.unit.test.js → Item.unit.test.jsx} +1 -1
  110. package/src/components/Pagination/tests/{Pagination.conformance.test.js → Pagination.conformance.test.jsx} +1 -1
  111. package/src/components/Pagination/tests/{Separator.unit.test.js → Separator.unit.test.jsx} +1 -1
  112. package/src/components/Pill/tests/{Pill.conformance.test.js → Pill.conformance.test.jsx} +1 -1
  113. package/src/components/Progress/tests/{Progress.conformance.test.js → Progress.conformance.test.jsx} +1 -1
  114. package/src/components/PromoBanner/tests/{PromoBanner.conformance.test.js → PromoBanner.conformance.test.jsx} +7 -7
  115. package/src/components/PromoBanner/tests/{PromoBanner.unit.test.js → PromoBanner.unit.test.jsx} +1 -1
  116. package/src/components/PromotionCard/tests/{PromotionCard.conformance.test.js → PromotionCard.conformance.test.jsx} +4 -4
  117. package/src/components/PromotionCard/tests/{PromotionCard.unit.test.js → PromotionCard.unit.test.jsx} +1 -1
  118. package/src/components/Section/tests/{Section.conformance.test.js → Section.conformance.test.jsx} +4 -4
  119. package/src/components/Section/tests/{Section.unit.test.js → Section.unit.test.jsx} +1 -1
  120. package/src/components/Skeleton/tests/{Skeleton.conformance.test.js → Skeleton.conformance.test.jsx} +1 -1
  121. package/src/components/SkipLink/tests/{SkipLink.unit.test.js → SkipLink.unit.test.jsx} +2 -2
  122. package/src/components/SocialButton/tests/{SocialButton.unit.test.js → SocialButton.unit.test.jsx} +2 -2
  123. package/src/components/Stepbar/tests/{Stepbar.conformance.test.js → Stepbar.conformance.test.jsx} +1 -1
  124. package/src/components/Sticker/tests/{Sticker.conformance.test.js → Sticker.conformance.test.jsx} +1 -1
  125. package/src/components/Table/styles/mixins.scss +0 -4
  126. package/src/components/Table/styles/style.scss +0 -4
  127. package/src/components/Table/tests/{Table.conformance.test.js → Table.conformance.test.jsx} +1 -1
  128. package/src/components/Tabs/tests/{Tabs.unit.test.js → Tabs.unit.test.jsx} +1 -1
  129. package/src/components/Tag/tests/{Tag.conformance.test.js → Tag.conformance.test.jsx} +1 -1
  130. package/src/components/Tag/tests/{Tag.unit.test.js → Tag.unit.test.jsx} +4 -4
  131. package/src/components/Tag/tests/{TagButton.conformance.test.js → TagButton.conformance.test.jsx} +1 -1
  132. package/src/components/Tag/tests/{TagButton.unit.test.js → TagButton.unit.test.jsx} +3 -2
  133. package/src/components/Testimonial/tests/{Testimonial.conformance.test.js → Testimonial.conformance.test.jsx} +1 -1
  134. package/src/components/Tile/tests/{Tile.conformance.test.js → Tile.conformance.test.jsx} +1 -1
  135. package/src/components/Tile/tests/{Tile.unit.test.js → Tile.unit.test.jsx} +2 -2
  136. package/src/components/Tooltip/tests/{Tooltip.conformance.test.js → Tooltip.conformance.test.jsx} +1 -1
  137. package/src/components/Tooltip/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +9 -5
  138. package/src/components/index.ts +3 -1
  139. /package/src/components/AnchorNavigation/tests/{AnchorNavigation.unit.test.js → AnchorNavigation.unit.test.jsx} +0 -0
  140. /package/src/components/Bar/tests/{Bar.unit.test.js → Bar.unit.test.jsx} +0 -0
  141. /package/src/components/Bar/tests/{BarBreak.unit.test.js → BarBreak.unit.test.jsx} +0 -0
  142. /package/src/components/Bar/tests/{BarItem.unit.test.js → BarItem.unit.test.jsx} +0 -0
  143. /package/src/components/BlockAction/tests/{BlockAction.unit.test.js → BlockAction.unit.test.jsx} +0 -0
  144. /package/src/components/BlockAction/tests/{BlockActionIndicator.unit.test.js → BlockActionIndicator.unit.test.jsx} +0 -0
  145. /package/src/components/BlockAction/tests/{CloneElementWithClassName.unit.test.js → CloneElementWithClassName.unit.test.jsx} +0 -0
  146. /package/src/components/BodyBanner/tests/{BodyBanner.unit.test.js → BodyBanner.unit.test.jsx} +0 -0
  147. /package/src/components/Breadcrumbs/tests/{BreadcrumbItem.unit.test.js → BreadcrumbItem.unit.test.jsx} +0 -0
  148. /package/src/components/Breadcrumbs/tests/{Breadcrumbs.integration.test.js → Breadcrumbs.integration.test.jsx} +0 -0
  149. /package/src/components/Breadcrumbs/tests/{Breadcrumbs.unit.test.js → Breadcrumbs.unit.test.jsx} +0 -0
  150. /package/src/components/Button/tests/{IconButton.unit.test.js → IconButton.unit.test.jsx} +0 -0
  151. /package/src/components/Buttons/tests/{Buttons.unit.test.js → Buttons.unit.test.jsx} +0 -0
  152. /package/src/components/Card/tests/{Card.unit.test.js → Card.unit.test.jsx} +0 -0
  153. /package/src/components/Card/tests/{CardProductHeader.unit.test.js → CardProductHeader.unit.test.jsx} +0 -0
  154. /package/src/components/Card/tests/{CardSection.unit.test.js → CardSection.unit.test.jsx} +0 -0
  155. /package/src/components/Carousel/tests/{Carousel.unit.test.js → Carousel.unit.test.jsx} +0 -0
  156. /package/src/components/Carousel/tests/{CarouselItem.unit.test.js → CarouselItem.unit.test.jsx} +0 -0
  157. /package/src/components/CarouselHero/tests/{CarouselHero.unit.test.js → CarouselHero.unit.test.jsx} +0 -0
  158. /package/src/components/CarouselHero/tests/{CarouselHeroItem.unit.test.js → CarouselHeroItem.unit.test.jsx} +0 -0
  159. /package/src/components/CarouselPromotions/tests/{CarouselPromotionsItem.unit.test.js → CarouselPromotionsItem.unit.test.jsx} +0 -0
  160. /package/src/components/Cover/tests/{Cover.unit.test.js → Cover.unit.test.jsx} +0 -0
  161. /package/src/components/Divider/tests/{Divider.unit.test.js → Divider.unit.test.jsx} +0 -0
  162. /package/src/components/Dropdown/tests/{Dropdown.unit.test.js → Dropdown.unit.test.jsx} +0 -0
  163. /package/src/components/Expander/tests/{Expander.unit.test.js → Expander.unit.test.jsx} +0 -0
  164. /package/src/components/FeatureAccordion/tests/{FeatureAccordion.unit.test.js → FeatureAccordion.unit.test.jsx} +0 -0
  165. /package/src/components/Footer/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +0 -0
  166. /package/src/components/Forms/Checkbox/tests/{Checkbox.unit.test.js → Checkbox.unit.test.jsx} +0 -0
  167. /package/src/components/Forms/DatePicker/tests/{DatePicker.unit.test.js → DatePicker.unit.test.jsx} +0 -0
  168. /package/src/components/Forms/Field/tests/{Field.unit.test.js → Field.unit.test.jsx} +0 -0
  169. /package/src/components/Forms/Field/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
  170. /package/src/components/Forms/Field/tests/{Messages.unit.test.js → Messages.unit.test.jsx} +0 -0
  171. /package/src/components/Forms/Field/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +0 -0
  172. /package/src/components/Forms/Fieldset/tests/{Fieldset.unit.test.js → Fieldset.unit.test.jsx} +0 -0
  173. /package/src/components/Forms/Group/tests/{Group.unit.test.js → Group.unit.test.jsx} +0 -0
  174. /package/src/components/Forms/Group/tests/{Item.unit.test.js → Item.unit.test.jsx} +0 -0
  175. /package/src/components/Forms/Hint/tests/{Hint.unit.test.js → Hint.unit.test.jsx} +0 -0
  176. /package/src/components/Forms/InputStepper/tests/{InputStepper.unit.test.js → InputStepper.unit.test.jsx} +0 -0
  177. /package/src/components/Forms/Label/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
  178. /package/src/components/Forms/Message/tests/{Message.unit.test.js → Message.unit.test.jsx} +0 -0
  179. /package/src/components/Forms/Radio/tests/{Radio.unit.test.js → Radio.unit.test.jsx} +0 -0
  180. /package/src/components/Forms/Select/tests/{Select.unit.test.js → Select.unit.test.jsx} +0 -0
  181. /package/src/components/Forms/TextArea/tests/{TextArea.unit.test.js → TextArea.unit.test.jsx} +0 -0
  182. /package/src/components/Forms/TextInput/tests/{TextInput.unit.test.js → TextInput.unit.test.jsx} +0 -0
  183. /package/src/components/Gauge/tests/{Gauge.conformance.test.js → Gauge.conformance.test.jsx} +0 -0
  184. /package/src/components/Gauge/tests/{Gauge.unit.test.js → Gauge.unit.test.jsx} +0 -0
  185. /package/src/components/Grid/tests/{Grid.unit.test.js → Grid.unit.test.jsx} +0 -0
  186. /package/src/components/Hero/tests/{Hero.unit.test.js → Hero.unit.test.jsx} +0 -0
  187. /package/src/components/List/tests/{ClickableControl.unit.test.js → ClickableControl.unit.test.jsx} +0 -0
  188. /package/src/components/List/tests/{List.unit.test.js → List.unit.test.jsx} +0 -0
  189. /package/src/components/List/tests/{ListItem.unit.test.js → ListItem.unit.test.jsx} +0 -0
  190. /package/src/components/Loader/tests/{Loader.unit.test.js → Loader.unit.test.jsx} +0 -0
  191. /package/src/components/Modal/tests/{Modal.unit.test.js → Modal.unit.test.jsx} +0 -0
  192. /package/src/components/Modal/tests/{ModalBody.unit.test.js → ModalBody.unit.test.jsx} +0 -0
  193. /package/src/components/Modal/tests/{ModalCloseButton.unit.test.js → ModalCloseButton.unit.test.jsx} +0 -0
  194. /package/src/components/Modal/tests/{ModalProductHeader.unit.test.js → ModalProductHeader.unit.test.jsx} +0 -0
  195. /package/src/components/Modal/tests/{ModalTitle.unit.test.js → ModalTitle.unit.test.jsx} +0 -0
  196. /package/src/components/Pagination/tests/{Pagination.unit.test.js → Pagination.unit.test.jsx} +0 -0
  197. /package/src/components/Pill/tests/{Pill.unit.test.js → Pill.unit.test.jsx} +0 -0
  198. /package/src/components/Progress/tests/{Progress.unit.test.js → Progress.unit.test.jsx} +0 -0
  199. /package/src/components/Skeleton/tests/{Skeleton.unit.test.js → Skeleton.unit.test.jsx} +0 -0
  200. /package/src/components/Stepbar/tests/{Stepbar.unit.test.js → Stepbar.unit.test.jsx} +0 -0
  201. /package/src/components/Sticker/tests/{Sticker.unit.test.js → Sticker.unit.test.jsx} +0 -0
  202. /package/src/components/Table/tests/{Cell.unit.test.js → Cell.unit.test.jsx} +0 -0
  203. /package/src/components/Table/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +0 -0
  204. /package/src/components/Table/tests/{Header.unit.test.js → Header.unit.test.jsx} +0 -0
  205. /package/src/components/Table/tests/{Row.unit.test.js → Row.unit.test.jsx} +0 -0
  206. /package/src/components/Table/tests/{Rows.unit.test.js → Rows.unit.test.jsx} +0 -0
  207. /package/src/components/Table/tests/{Table.unit.test.js → Table.unit.test.jsx} +0 -0
  208. /package/src/components/Tabs/tests/{Tab.unit.test.js → Tab.unit.test.jsx} +0 -0
  209. /package/src/components/Tabs/tests/{TabPanel.unit.test.js → TabPanel.unit.test.jsx} +0 -0
  210. /package/src/components/Testimonial/tests/{Testimonial.unit.test.js → Testimonial.unit.test.jsx} +0 -0
  211. /package/src/components/Tooltip/tests/{InfoTooltip.unit.test.js → InfoTooltip.unit.test.jsx} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from "vitest-axe";
3
3
 
4
4
  import { CarouselPromotions } from "..";
5
5
  import { CarouselPromotionsItem } from "..";
@@ -21,10 +21,19 @@ const example = (
21
21
 
22
22
  it("is valid html", () => {
23
23
  const { container } = render(example);
24
- expect(container).toHTMLValidate({ rules: { "no-inline-style": "off" } });
24
+ expect(container).toHTMLValidate({
25
+ rules: {
26
+ "no-inline-style": "off",
27
+ "aria-label-misuse": "off",
28
+ },
29
+ });
25
30
  });
26
31
 
27
32
  it("is accessible", async () => {
28
33
  const { container } = render(example);
29
- expect(await axe(container)).toHaveNoViolations();
34
+ expect(
35
+ await axe(container, {
36
+ rules: { "aria-required-children": { enabled: false } },
37
+ }),
38
+ ).toHaveNoViolations();
30
39
  });
@@ -178,15 +178,14 @@ describe("rendering CarouselPromotions", () => {
178
178
  expect(pagination).toHaveAttribute("role", "tablist");
179
179
  });
180
180
 
181
- it("pagination container is empty initially (buttons are rendered by Swiper after initialization)", () => {
181
+ it("pagination container includes rendered buttons", () => {
182
182
  const { container } = render(
183
183
  <CarouselPromotions>{items}</CarouselPromotions>,
184
184
  );
185
- // Pagination buttons are dynamically created by Swiper.js after initialization
186
185
  const pagination = container.querySelector(
187
186
  ".carousel-promotions__pagination",
188
187
  );
189
- expect(pagination.children.length).toBe(0);
188
+ expect(pagination.children.length).toBeGreaterThan(0);
190
189
  });
191
190
  });
192
191
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { CartTable } from "../";
5
5
 
@@ -24,14 +24,10 @@
24
24
  * - Verifies all standard HTML div props are properly forwarded
25
25
  */
26
26
  import { render } from "@testing-library/react";
27
- import { axe, toHaveNoViolations } from "jest-axe";
28
- import "jest-axe/extend-expect";
27
+ import { axe } from "vitest-axe";
29
28
 
30
29
  import { Container } from "../";
31
30
 
32
- // Extension of expect for axe
33
- expect.extend(toHaveNoViolations);
34
-
35
31
  describe("Container Conformance Tests", () => {
36
32
  describe("HTML Validity", () => {
37
33
  it("should render valid HTML structure", () => {
@@ -203,7 +199,7 @@ describe("Container Conformance Tests", () => {
203
199
  });
204
200
 
205
201
  it("should handle event handlers correctly", () => {
206
- const handleClick = jest.fn();
202
+ const handleClick = vi.fn();
207
203
  const { container } = render(<Container onClick={handleClick} />);
208
204
  const containerElement = container.firstChild;
209
205
 
@@ -151,8 +151,8 @@ describe("Container Component", () => {
151
151
 
152
152
  it("should forward event handlers", async () => {
153
153
  const user = userEvent.setup();
154
- const handleClick = jest.fn();
155
- const handleMouseEnter = jest.fn();
154
+ const handleClick = vi.fn();
155
+ const handleMouseEnter = vi.fn();
156
156
 
157
157
  render(
158
158
  <Container
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { render, screen, fireEvent } from "@testing-library/react";
3
3
  import userEvent from "@testing-library/user-event";
4
- import "@testing-library/jest-dom";
4
+ import "@testing-library/jest-dom/vitest";
5
5
  import { Controls } from "../Controls";
6
6
 
7
7
  describe("Controls Component", () => {
@@ -97,7 +97,7 @@ describe("Controls Component", () => {
97
97
  describe("Button Functionality", () => {
98
98
  it("should be clickable and trigger onClick handler", () => {
99
99
  // Test that the button can be clicked and triggers the onClick handler
100
- const handleClick = jest.fn();
100
+ const handleClick = vi.fn();
101
101
  render(<Controls icon="close" onClick={handleClick} />);
102
102
 
103
103
  const button = screen.getByRole("button");
@@ -119,7 +119,7 @@ describe("Controls Component", () => {
119
119
  it("should be keyboard accessible", async () => {
120
120
  // Test that the button responds to keyboard events
121
121
  const user = userEvent.setup();
122
- const handleClick = jest.fn();
122
+ const handleClick = vi.fn();
123
123
  render(<Controls icon="search" onClick={handleClick} />);
124
124
 
125
125
  const button = screen.getByRole("button");
@@ -131,7 +131,7 @@ describe("Controls Component", () => {
131
131
  it("should support Enter key press", async () => {
132
132
  // Test that Enter key triggers the onClick handler
133
133
  const user = userEvent.setup();
134
- const handleClick = jest.fn();
134
+ const handleClick = vi.fn();
135
135
  render(<Controls icon="close" onClick={handleClick} />);
136
136
 
137
137
  const button = screen.getByRole("button");
@@ -144,7 +144,7 @@ describe("Controls Component", () => {
144
144
  it("should support Space key press", async () => {
145
145
  // Test that Space key triggers the onClick handler
146
146
  const user = userEvent.setup();
147
- const handleClick = jest.fn();
147
+ const handleClick = vi.fn();
148
148
  render(<Controls icon="menu" onClick={handleClick} />);
149
149
 
150
150
  const button = screen.getByRole("button");
@@ -175,7 +175,7 @@ describe("Controls Component", () => {
175
175
 
176
176
  it("should not trigger onClick when disabled", () => {
177
177
  // Test that onClick is not triggered when button is disabled
178
- const handleClick = jest.fn();
178
+ const handleClick = vi.fn();
179
179
  render(<Controls icon="search" isDisabled onClick={handleClick} />);
180
180
 
181
181
  const button = screen.getByRole("button");
@@ -299,7 +299,7 @@ describe("Controls Component", () => {
299
299
  describe("Form Integration", () => {
300
300
  it("should work within a form context", () => {
301
301
  // Test that the button works properly within a form
302
- const handleSubmit = jest.fn((e) => e.preventDefault());
302
+ const handleSubmit = vi.fn((e) => e.preventDefault());
303
303
 
304
304
  render(
305
305
  <form onSubmit={handleSubmit}>
@@ -326,7 +326,7 @@ describe("Controls Component", () => {
326
326
  describe("Event Handling", () => {
327
327
  it("should handle onFocus event", () => {
328
328
  // Test that the button handles onFocus event
329
- const handleFocus = jest.fn();
329
+ const handleFocus = vi.fn();
330
330
  render(<Controls icon="close" onFocus={handleFocus} />);
331
331
 
332
332
  const button = screen.getByRole("button");
@@ -337,7 +337,7 @@ describe("Controls Component", () => {
337
337
 
338
338
  it("should handle onBlur event", () => {
339
339
  // Test that the button handles onBlur event
340
- const handleBlur = jest.fn();
340
+ const handleBlur = vi.fn();
341
341
  render(<Controls icon="menu" onBlur={handleBlur} />);
342
342
 
343
343
  const button = screen.getByRole("button");
@@ -348,7 +348,7 @@ describe("Controls Component", () => {
348
348
 
349
349
  it("should handle onMouseEnter event", () => {
350
350
  // Test that the button handles onMouseEnter event
351
- const handleMouseEnter = jest.fn();
351
+ const handleMouseEnter = vi.fn();
352
352
  render(<Controls icon="search" onMouseEnter={handleMouseEnter} />);
353
353
 
354
354
  const button = screen.getByRole("button");
@@ -359,7 +359,7 @@ describe("Controls Component", () => {
359
359
 
360
360
  it("should handle onMouseLeave event", () => {
361
361
  // Test that the button handles onMouseLeave event
362
- const handleMouseLeave = jest.fn();
362
+ const handleMouseLeave = vi.fn();
363
363
  render(<Controls icon="close" onMouseLeave={handleMouseLeave} />);
364
364
 
365
365
  const button = screen.getByRole("button");
@@ -370,7 +370,7 @@ describe("Controls Component", () => {
370
370
 
371
371
  it("should handle onKeyDown event", () => {
372
372
  // Test that the button handles onKeyDown event
373
- const handleKeyDown = jest.fn();
373
+ const handleKeyDown = vi.fn();
374
374
  render(<Controls icon="menu" onKeyDown={handleKeyDown} />);
375
375
 
376
376
  const button = screen.getByRole("button");
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
- import { axe } from 'jest-axe';
3
+ import { axe } from 'vitest-axe';
4
4
 
5
5
  import { Cover } from '../';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Divider } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Dropdown, DropdownItem, DropdownDivider } from "../";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { render } from "@testing-library/react";
3
- import { axe } from "jest-axe";
3
+ import { axe } from 'vitest-axe';
4
4
 
5
5
  import { Expander } from "../Expander";
6
6
  import { Icon } from "../../Icon";
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
  import { FeatureAccordion } from "../FeatureAccordion";
4
4
  import { FeatureAccordionItem } from "../FeatureAccordionItem";
5
5
 
@@ -20,14 +20,10 @@
20
20
  * - Tests dark theme context
21
21
  */
22
22
  import { render } from "@testing-library/react";
23
- import { axe, toHaveNoViolations } from "jest-axe";
24
- import "jest-axe/extend-expect";
23
+ import { axe } from "vitest-axe";
25
24
 
26
25
  import { Footer } from "../Footer";
27
26
 
28
- // Extension of expect for axe
29
- expect.extend(toHaveNoViolations);
30
-
31
27
  describe("Footer Conformance Tests", () => {
32
28
  describe("HTML Validity", () => {
33
29
  it("is valid html with default props", () => {
@@ -50,6 +50,42 @@ export default class Autocomplete {
50
50
  }
51
51
  this.config = { ...this.config, ...elementConfig };
52
52
 
53
+ const customInputClassName = this.config.customInputClassName || "";
54
+ const customInputClassTokens = customInputClassName
55
+ .split(/\s+/)
56
+ .filter(Boolean);
57
+
58
+ const hasSearchIcon = customInputClassTokens.includes("input--search-icon");
59
+ const hasSearchIconWithPlaceholder = customInputClassTokens.includes(
60
+ "input--search-icon-with-placeholder",
61
+ );
62
+
63
+ this.config.customInputClassName = customInputClassTokens
64
+ .filter(
65
+ (token) =>
66
+ token !== "input--search-icon" &&
67
+ token !== "input--search-icon-with-placeholder",
68
+ )
69
+ .join(" ");
70
+
71
+ if (hasSearchIcon) {
72
+ this.config.wrapperClassName = [
73
+ this.config.wrapperClassName,
74
+ "autocomplete__wrapper--search-icon",
75
+ ]
76
+ .filter(Boolean)
77
+ .join(" ");
78
+ }
79
+
80
+ if (hasSearchIconWithPlaceholder) {
81
+ this.config.wrapperClassName = [
82
+ this.config.wrapperClassName,
83
+ "autocomplete__wrapper--search-icon-with-placeholder",
84
+ ]
85
+ .filter(Boolean)
86
+ .join(" ");
87
+ }
88
+
53
89
  // Dynamic import to avoid SSR issues
54
90
  const accessibleAutocomplete = (
55
91
  await import("@orangesk/accessible-autocomplete")
@@ -1,8 +1,10 @@
1
1
  @use "./config";
2
2
  @use "./mixins";
3
3
  @use "../../TextInput/styles/mixins" as textMixins;
4
+ @use "../../TextInput/styles/config" as textConfig;
4
5
  @use "../../styles/config" as commonConfig;
5
6
  @use "../../../../styles/tools/generate";
7
+ @use "../../../../styles/tools/convert";
6
8
 
7
9
  @layer components {
8
10
  .autocomplete {
@@ -15,6 +17,46 @@
15
17
 
16
18
  &__wrapper {
17
19
  @include mixins.wrapper();
20
+
21
+ &--search-icon,
22
+ &--search-icon-with-placeholder {
23
+ isolation: isolate;
24
+
25
+ &::before {
26
+ content: "";
27
+ position: absolute;
28
+ top: 50%;
29
+ left: convert.to-rem(8px);
30
+ width: convert.to-rem(20px);
31
+ height: convert.to-rem(20px);
32
+ transform: translateY(-50%);
33
+ background-image: textConfig.$background-image-search-icon;
34
+ background-repeat: no-repeat;
35
+ pointer-events: none;
36
+ z-index: 3;
37
+ }
38
+
39
+ .autocomplete__input {
40
+ background-image: none !important;
41
+ padding-left: convert.to-rem(40px);
42
+ position: relative;
43
+ z-index: 1;
44
+ }
45
+
46
+ .autocomplete__hint {
47
+ padding-left: convert.to-rem(40px);
48
+ }
49
+ }
50
+
51
+ &--search-icon {
52
+ &::before {
53
+ opacity: 0;
54
+ }
55
+
56
+ &:has(.autocomplete__input:not(:focus):placeholder-shown)::before {
57
+ opacity: 1;
58
+ }
59
+ }
18
60
  }
19
61
 
20
62
  &__input {
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "..";
5
5
 
@@ -28,7 +28,7 @@ const example = (
28
28
  );
29
29
 
30
30
  beforeAll(() => {
31
- global.DataTransfer = jest.fn(() => ({ files: undefined }));
31
+ global.DataTransfer = vi.fn(() => ({ files: undefined }));
32
32
  });
33
33
 
34
34
  it("is valid html", () => {
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Button } from "../../../Button";
5
5
  import { Field } from "..";
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from "jest-axe";
2
+ import { axe } from 'vitest-axe';
3
3
 
4
4
  import { Field } from "../";
5
5
 
@@ -15,8 +15,12 @@ export type TextInputType =
15
15
  | "text"
16
16
  | "url";
17
17
 
18
- export interface TextInputProps
19
- extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
18
+ export type TextInputSearchIcon = "none" | "transient" | "persistent";
19
+
20
+ export interface TextInputProps extends Omit<
21
+ React.InputHTMLAttributes<HTMLInputElement>,
22
+ "size"
23
+ > {
20
24
  /** Input html type. */
21
25
  htmlType?: TextInputType;
22
26
  /** Html id attribute. */
@@ -41,12 +45,15 @@ export interface TextInputProps
41
45
  width?: TextInputWidth;
42
46
  /** Additional CSS classes */
43
47
  className?: string;
48
+ /** Search icon mode. `transient` shows icon only on empty unfocused input, `persistent` keeps it visible with placeholder. */
49
+ searchIcon?: TextInputSearchIcon;
44
50
  }
45
51
 
46
52
  const defaultProps = {
47
53
  htmlType: "text" as TextInputType,
48
54
  size: "default" as TextInputSize,
49
55
  width: "default" as TextInputWidth,
56
+ searchIcon: "none" as TextInputSearchIcon,
50
57
  };
51
58
 
52
59
  const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
@@ -62,11 +69,15 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
62
69
  size = defaultProps.size,
63
70
  htmlType = defaultProps.htmlType,
64
71
  width = defaultProps.width,
72
+ searchIcon = defaultProps.searchIcon,
65
73
  name,
66
74
  ...other
67
75
  },
68
76
  ref,
69
77
  ) => {
78
+ const hasSearchIcon = searchIcon === "transient";
79
+ const hasSearchIconWithPlaceholder = searchIcon === "persistent";
80
+
70
81
  const classes = cx(
71
82
  CLASS_ROOT,
72
83
  {
@@ -80,7 +91,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
80
91
 
81
92
  const inputName = name || id;
82
93
 
83
- return (
94
+ const inputElement = (
84
95
  <input
85
96
  className={classes}
86
97
  id={id}
@@ -93,6 +104,22 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
93
104
  {...other}
94
105
  />
95
106
  );
107
+
108
+ if (hasSearchIcon || hasSearchIconWithPlaceholder) {
109
+ return (
110
+ <span
111
+ className={cx("text-input__wrapper", {
112
+ "text-input__wrapper--search-icon": hasSearchIcon,
113
+ "text-input__wrapper--search-icon-with-placeholder":
114
+ hasSearchIconWithPlaceholder,
115
+ })}
116
+ >
117
+ {inputElement}
118
+ </span>
119
+ );
120
+ }
121
+
122
+ return inputElement;
96
123
  },
97
124
  );
98
125
 
@@ -3,6 +3,68 @@
3
3
  @use "./mixins";
4
4
 
5
5
  @layer components {
6
+ .text-input__wrapper {
7
+ position: relative;
8
+
9
+ &--search-icon,
10
+ &--search-icon-with-placeholder {
11
+ display: inline-block;
12
+
13
+ &:has(> .text-input--3ch) {
14
+ @include mixins.width(3ch);
15
+ }
16
+
17
+ &:has(> .text-input--8ch) {
18
+ @include mixins.width(8ch);
19
+ }
20
+
21
+ &:has(> .text-input--12ch) {
22
+ @include mixins.width(12ch);
23
+ }
24
+
25
+ &:has(> .text-input--fullwidth) {
26
+ @include mixins.width(fullwidth);
27
+ }
28
+
29
+ &:has(
30
+ > .text-input:not(.text-input--3ch):not(.text-input--8ch):not(
31
+ .text-input--12ch
32
+ ):not(.text-input--fullwidth)
33
+ ) {
34
+ @include mixins.width(default);
35
+ }
36
+
37
+ &::before {
38
+ content: "";
39
+ position: absolute;
40
+ top: 50%;
41
+ left: 0.5rem;
42
+ width: 1.25rem;
43
+ height: 1.25rem;
44
+ transform: translateY(-50%);
45
+ background-image: config.$background-image-search-icon;
46
+ background-repeat: no-repeat;
47
+ pointer-events: none;
48
+ z-index: 1;
49
+ }
50
+
51
+ > .text-input {
52
+ background-image: none !important;
53
+ padding-left: 2.5rem;
54
+ }
55
+ }
56
+
57
+ &--search-icon {
58
+ &::before {
59
+ opacity: 0;
60
+ }
61
+
62
+ &:has(> .text-input:not(:focus):placeholder-shown)::before {
63
+ opacity: 1;
64
+ }
65
+ }
66
+ }
67
+
6
68
  .text-input {
7
69
  @include mixins.base();
8
70
  @include mixins.states();
@@ -189,7 +189,7 @@ describe("GridCol complex scenarios", () => {
189
189
  });
190
190
 
191
191
  it("renders with event handlers", () => {
192
- const handleClick = jest.fn();
192
+ const handleClick = vi.fn();
193
193
  const { getByTestId } = render(
194
194
  <GridCol
195
195
  data-testid="test-id"
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { render } from "@testing-library/react";
3
- import { axe } from "jest-axe";
3
+ import { axe } from 'vitest-axe';
4
4
 
5
5
  import { Hero } from "../";
6
6
 
@@ -1,3 +1,4 @@
1
1
  export { SpritePathContext } from "./SpritePathContext";
2
+ export { SpritePathProvider } from "./SpritePathContext";
2
3
  export { Icon } from "./Icon";
3
4
  export { Pictogram } from "./Pictogram";
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { render } from "@testing-library/react";
3
- import { axe } from "jest-axe";
3
+ import { axe } from 'vitest-axe';
4
4
 
5
5
  import { Icon } from "../";
6
6
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @jest-environment jsdom
2
+ * @vitest-environment jsdom
3
3
  */
4
4
 
5
5
  import React from "react";
@@ -1,28 +1,10 @@
1
1
  /**
2
- * @jest-environm it("renders it("light use points to base name, dark use points to name with --dark suffix", () => {
3
- const { container } = render(<Pictogram name="pictogram-skylink" />);
4
- const lightUse = container.querySelector(".icon__use--light");
5
- const darkUse = container.querySelector(".icon__use--dark");
6
-
7
- expect(lightUse?.getAttribute("xlink:href")).toBe(
8
- "/sprite.svg#pictogram-skylink",
9
- );
10
- expect(darkUse?.getAttribute("xlink:href")).toBe(
11
- "/sprite.svg#pictogram-skylink--dark",
12
- );
13
- });nd dark use elements", () => {
14
- const { container } = render(<Pictogram name="pictogram-skylink" />);
15
- const lightUse = container.querySelector(".icon__use--light");
16
- const darkUse = container.querySelector(".icon__use--dark");
17
-
18
- expect(lightUse).toBeInTheDocument();
19
- expect(darkUse).toBeInTheDocument();
20
- });m
2
+ * Unit tests for the Pictogram component.
21
3
  */
22
4
 
23
5
  import React from "react";
24
6
  import { render } from "@testing-library/react";
25
- import { axe } from "jest-axe";
7
+ import { axe } from 'vitest-axe';
26
8
 
27
9
  import { Pictogram } from "../Pictogram";
28
10