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

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 (392) hide show
  1. package/README.md +8 -2
  2. package/build/components/Icon/style.css +1 -1
  3. package/build/components/Icon/style.css.map +1 -1
  4. package/build/components/Loader/style.css +1 -1
  5. package/build/components/Loader/style.css.map +1 -1
  6. package/build/components/PromoBanner/style.css +1 -1
  7. package/build/components/PromoBanner/style.css.map +1 -1
  8. package/build/components/Table/style.css +1 -1
  9. package/build/components/Table/style.css.map +1 -1
  10. package/build/components/index.js +1 -1
  11. package/build/components/index.js.map +1 -1
  12. package/build/components/tsconfig.tsbuildinfo +1 -1
  13. package/build/components/types/index.d.ts +737 -729
  14. package/build/components/types/src/components/Accordion/Accordion.static.d.ts +2 -0
  15. package/build/components/types/src/components/Bar/index.d.ts +1 -1
  16. package/build/components/types/src/components/BlockAction/Context.d.ts +1 -1
  17. package/build/components/types/src/components/BlockAction/index.d.ts +2 -4
  18. package/build/components/types/src/components/Button/index.d.ts +1 -1
  19. package/build/components/types/src/components/Card/index.d.ts +2 -2
  20. package/build/components/types/src/components/Carousel/Carousel.d.ts +1 -1
  21. package/build/components/types/src/components/Carousel/CarouselItem.d.ts +1 -1
  22. package/build/components/types/src/components/CarouselHero/CarouselHero.d.ts +1 -1
  23. package/build/components/types/src/components/CarouselHero/CarouselHero.static.d.ts +1 -1
  24. package/build/components/types/src/components/CarouselHero/CarouselHeroItem.d.ts +1 -1
  25. package/build/components/types/src/components/CarouselHero/index.d.ts +1 -1
  26. package/build/components/types/src/components/CartTable/CartTable.d.ts +1 -1
  27. package/build/components/types/src/components/CartTable/data.d.ts +1 -1
  28. package/build/components/types/src/components/Code/Code.d.ts +1 -1
  29. package/build/components/types/src/components/Divider/Divider.d.ts +1 -1
  30. package/build/components/types/src/components/DocumentationSidebar/index.d.ts +1 -1
  31. package/build/components/types/src/components/Dropdown/index.d.ts +1 -1
  32. package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.d.ts +3 -1
  33. package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +1 -0
  34. package/build/components/types/src/components/Forms/Group/Group.d.ts +1 -1
  35. package/build/components/types/src/components/Forms/Group/Item.d.ts +1 -1
  36. package/build/components/types/src/components/Forms/index.d.ts +1 -1
  37. package/build/components/types/src/components/Grid/GridCol.d.ts +3 -3
  38. package/build/components/types/src/components/Icon/iconSearchTags.d.ts +1 -0
  39. package/build/components/types/src/components/Icon/index.d.ts +1 -2
  40. package/build/components/types/src/components/IconList/Item.d.ts +1 -1
  41. package/build/components/types/src/components/List/ClickableControl.d.ts +1 -1
  42. package/build/components/types/src/components/List/List.d.ts +3 -3
  43. package/build/components/types/src/components/List/ListItem.d.ts +1 -1
  44. package/build/components/types/src/components/Loader/LoaderFullscreen.d.ts +7 -0
  45. package/build/components/types/src/components/Loader/index.d.ts +1 -0
  46. package/build/components/types/src/components/Megamenu/index.d.ts +1 -1
  47. package/build/components/types/src/components/Modal/ModalCloseButton.d.ts +1 -1
  48. package/build/components/types/src/components/Modal/index.d.ts +2 -2
  49. package/build/components/types/src/components/Pagination/helpers.d.ts +1 -1
  50. package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
  51. package/build/components/types/src/components/Preview/Preview.d.ts +1 -1
  52. package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +1 -1
  53. package/build/components/types/src/components/PromotionCard/PromotionCardContent.d.ts +1 -1
  54. package/build/components/types/src/components/PromotionCard/PromotionCardImageWrapper.d.ts +1 -1
  55. package/build/components/types/src/components/PromotionCard/PromotionCardTitle.d.ts +1 -1
  56. package/build/components/types/src/components/Sticker/Sticker.d.ts +3 -3
  57. package/build/components/types/src/components/Table/Table.d.ts +1 -1
  58. package/build/components/types/src/components/Table/index.d.ts +1 -1
  59. package/build/components/types/src/components/Tabs/index.d.ts +2 -2
  60. package/build/components/types/src/components/Tag/index.d.ts +1 -1
  61. package/build/components/types/src/components/Testimonial/Testimonial.d.ts +2 -2
  62. package/build/components/types/src/components/Tooltip/Tooltip.static.d.ts +6 -2
  63. package/build/components/types/src/components/Tooltip/index.d.ts +1 -1
  64. package/build/components/types/src/components/index.d.ts +21 -21
  65. package/build/components/types/src/scripts/index.d.ts +5 -5
  66. package/build/components/types/src/scripts/modules/SpacePreview/index.d.ts +1 -1
  67. package/build/components/types/src/utils/hooks.d.ts +1 -1
  68. package/build/components/types/src/utils/index.d.ts +2 -2
  69. package/build/lib/base.css +1 -1
  70. package/build/lib/base.css.map +1 -1
  71. package/build/lib/components.css +1 -1
  72. package/build/lib/components.css.map +1 -1
  73. package/build/lib/footer.js +1 -1
  74. package/build/lib/footer.js.map +1 -1
  75. package/build/lib/megamenu.js +1 -1
  76. package/build/lib/megamenu.js.map +1 -1
  77. package/build/lib/scripts.js +1 -1
  78. package/build/lib/scripts.js.map +1 -1
  79. package/build/lib/style.css +1 -1
  80. package/build/lib/style.css.map +1 -1
  81. package/build/lib/tsconfig.tsbuildinfo +1 -1
  82. package/build/sprite.svg +1 -1
  83. package/package.json +39 -30
  84. package/src/assets/icons/discount-price.svg +4 -0
  85. package/src/components/Accordion/Accordion.static.ts +44 -1
  86. package/src/components/Accordion/Accordion.tsx +2 -3
  87. package/src/components/Accordion/AccordionHeader.tsx +1 -1
  88. package/src/components/Accordion/AccordionItem.tsx +2 -1
  89. package/src/components/Accordion/HeadingContext.tsx +1 -1
  90. package/src/components/Accordion/tests/Accordion.unit.test.jsx +112 -4
  91. package/src/components/Alert/Alert.tsx +3 -4
  92. package/src/components/Alert/tests/Alert.conformance.test.jsx +2 -3
  93. package/src/components/Alert/tests/Alert.test.jsx +1 -1
  94. package/src/components/Alert/tests/Alert.visual.test.jsx +1 -2
  95. package/src/components/AnchorNavigation/AnchorNavigation.tsx +3 -3
  96. package/src/components/AnchorNavigation/tests/AnchorNavigation.conformance.test.jsx +1 -1
  97. package/src/components/Bar/Bar.tsx +1 -1
  98. package/src/components/Bar/BarBreak.tsx +1 -1
  99. package/src/components/Bar/BarItem.tsx +1 -1
  100. package/src/components/Bar/index.ts +1 -1
  101. package/src/components/Bar/tests/Bar.conformance.test.jsx +1 -1
  102. package/src/components/BlockAction/BlockAction.tsx +1 -1
  103. package/src/components/BlockAction/BlockActionControl.tsx +2 -3
  104. package/src/components/BlockAction/BlockActionIndicator.tsx +2 -3
  105. package/src/components/BlockAction/CloneElementWithClassName.tsx +1 -1
  106. package/src/components/BlockAction/Context.tsx +1 -1
  107. package/src/components/BlockAction/index.tsx +3 -8
  108. package/src/components/BlockAction/styles/config.scss +6 -6
  109. package/src/components/BlockAction/tests/BlockActionControl.unit.test.jsx +1 -1
  110. package/src/components/BodyBanner/BodyBanner.tsx +2 -2
  111. package/src/components/BodyBanner/tests/BodyBanner.conformance.test.jsx +1 -1
  112. package/src/components/Breadcrumbs/BreadcrumbItem.tsx +1 -1
  113. package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.jsx +1 -1
  114. package/src/components/Button/Button.tsx +1 -1
  115. package/src/components/Button/IconButton.tsx +7 -3
  116. package/src/components/Button/index.tsx +1 -3
  117. package/src/components/Button/tests/Button.conformance.test.jsx +1 -2
  118. package/src/components/Button/tests/Button.test.jsx +0 -1
  119. package/src/components/Button/tests/IconButton.unit.test.jsx +0 -1
  120. package/src/components/Buttons/tests/Buttons.conformance.test.jsx +1 -1
  121. package/src/components/Card/Card.tsx +1 -1
  122. package/src/components/Card/CardProductHeader.tsx +1 -1
  123. package/src/components/Card/CardSection.tsx +1 -1
  124. package/src/components/Card/index.ts +2 -2
  125. package/src/components/Card/tests/Card.conformance.test.jsx +2 -2
  126. package/src/components/Card/tests/CardProductHeader.unit.test.jsx +1 -1
  127. package/src/components/Carousel/Carousel.static.ts +15 -15
  128. package/src/components/Carousel/Carousel.tsx +9 -11
  129. package/src/components/Carousel/CarouselItem.tsx +1 -1
  130. package/src/components/Carousel/tests/Carousel.conformance.test.jsx +2 -4
  131. package/src/components/CarouselHero/CarouselHero.static.ts +15 -15
  132. package/src/components/CarouselHero/CarouselHero.tsx +12 -13
  133. package/src/components/CarouselHero/CarouselHeroItem.tsx +2 -2
  134. package/src/components/CarouselHero/index.ts +1 -1
  135. package/src/components/CarouselHero/tests/CarouselHeroItem.conformance.test.jsx +1 -1
  136. package/src/components/CarouselPromotions/CarouselPromotions.static.ts +10 -10
  137. package/src/components/CarouselPromotions/CarouselPromotions.tsx +6 -7
  138. package/src/components/CarouselPromotions/CarouselPromotionsItem.tsx +3 -3
  139. package/src/components/CarouselPromotions/tests/CarouselPromotions.conformance.test.jsx +1 -3
  140. package/src/components/CarouselPromotions/tests/CarouselPromotions.unit.test.jsx +1 -2
  141. package/src/components/CartTable/CartTable.tsx +3 -4
  142. package/src/components/CartTable/FooterPriceColumn.tsx +1 -1
  143. package/src/components/CartTable/Price.tsx +1 -1
  144. package/src/components/CartTable/data.ts +1 -1
  145. package/src/components/CartTable/generateFooter.tsx +1 -1
  146. package/src/components/CartTable/generateRow.tsx +6 -8
  147. package/src/components/CartTable/styles/mixins.scss +46 -49
  148. package/src/components/CartTable/tests/CartTable.conformance.test.jsx +1 -1
  149. package/src/components/Code/Code.tsx +1 -1
  150. package/src/components/Container/Container.tsx +1 -1
  151. package/src/components/Container/styles/config.scss +2 -2
  152. package/src/components/Container/styles/mixins.scss +4 -4
  153. package/src/components/Container/tests/Container.unit.test.jsx +3 -2
  154. package/src/components/Controls/Controls.tsx +1 -1
  155. package/src/components/Controls/tests/Controls.test.jsx +2 -2
  156. package/src/components/Cover/Cover.tsx +1 -1
  157. package/src/components/Cover/index.ts +1 -0
  158. package/src/components/Cover/tests/Cover.conformance.test.jsx +8 -9
  159. package/src/components/Cover/tests/Cover.unit.test.jsx +0 -1
  160. package/src/components/Divider/Divider.tsx +1 -1
  161. package/src/components/Divider/tests/Divider.conformance.test.jsx +1 -1
  162. package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +7 -7
  163. package/src/components/DocumentationSidebar/index.ts +2 -2
  164. package/src/components/Dropdown/Dropdown.static.ts +1 -1
  165. package/src/components/Dropdown/Dropdown.tsx +3 -5
  166. package/src/components/Dropdown/DropdownDivider.tsx +1 -1
  167. package/src/components/Dropdown/DropdownItem.tsx +1 -1
  168. package/src/components/Dropdown/DropdownToggleButton.tsx +1 -1
  169. package/src/components/Dropdown/index.ts +1 -1
  170. package/src/components/Dropdown/tests/Dropdown.conformance.test.jsx +2 -2
  171. package/src/components/Dropdown/tests/Dropdown.unit.test.jsx +1 -2
  172. package/src/components/Expander/Expander.tsx +1 -1
  173. package/src/components/Expander/tests/Expander.conformance.test.jsx +2 -4
  174. package/src/components/Expander/tests/Expander.unit.test.jsx +2 -4
  175. package/src/components/FeatureAccordion/FeatureAccordion.tsx +2 -2
  176. package/src/components/FeatureAccordion/FeatureAccordionItem.tsx +2 -1
  177. package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.jsx +1 -1
  178. package/src/components/FeatureAccordion/tests/FeatureAccordion.unit.test.jsx +2 -3
  179. package/src/components/Footer/Footer.tsx +4 -5
  180. package/src/components/Footer/static.ts +2 -2
  181. package/src/components/Footer/tests/Footer.unit.test.jsx +1 -1
  182. package/src/components/Forms/Autocomplete/Autocomplete.static.ts +1 -0
  183. package/src/components/Forms/Autocomplete/Autocomplete.tsx +8 -3
  184. package/src/components/Forms/Autocomplete/styles/config.scss +3 -3
  185. package/src/components/Forms/Checkbox/Checkbox.tsx +1 -1
  186. package/src/components/Forms/Checkbox/styles/mixins.scss +2 -2
  187. package/src/components/Forms/DatePicker/DatePicker.tsx +1 -2
  188. package/src/components/Forms/Field/Control.tsx +3 -3
  189. package/src/components/Forms/Field/Description.tsx +1 -1
  190. package/src/components/Forms/Field/Field.tsx +4 -4
  191. package/src/components/Forms/Field/Label.tsx +1 -1
  192. package/src/components/Forms/Field/Messages.tsx +2 -2
  193. package/src/components/Forms/Field/tests/Autocomplete.Field.conformance.test.jsx +1 -1
  194. package/src/components/Forms/Field/tests/Checkbox.Field.conformance.test.jsx +1 -1
  195. package/src/components/Forms/Field/tests/File.Field.conformance.test.jsx +1 -1
  196. package/src/components/Forms/Field/tests/Group.Field.conformance.test.jsx +1 -1
  197. package/src/components/Forms/Field/tests/Radio.Field.conformance.test.jsx +1 -1
  198. package/src/components/Forms/Field/tests/Rangeslider.Field.test.jsx +1 -1
  199. package/src/components/Forms/Field/tests/Select.Field.conformance.test.jsx +1 -1
  200. package/src/components/Forms/Field/tests/Text.Field.conformance.test.jsx +1 -1
  201. package/src/components/Forms/Field/tests/Textarea.Field.conformance.test.jsx +1 -1
  202. package/src/components/Forms/Field/tests/Tooltip.unit.test.jsx +1 -2
  203. package/src/components/Forms/Fieldset/Fieldset.tsx +1 -1
  204. package/src/components/Forms/File/File.tsx +4 -7
  205. package/src/components/Forms/File/styles/config.scss +5 -5
  206. package/src/components/Forms/Group/Group.tsx +2 -3
  207. package/src/components/Forms/Group/Item.tsx +1 -1
  208. package/src/components/Forms/Hint/Hint.tsx +1 -1
  209. package/src/components/Forms/Hint/styles/config.scss +1 -1
  210. package/src/components/Forms/Hint/styles/mixins.scss +2 -2
  211. package/src/components/Forms/InputStepper/InputStepper.tsx +1 -1
  212. package/src/components/Forms/Label/Label.tsx +1 -1
  213. package/src/components/Forms/Label/styles/mixins.scss +2 -2
  214. package/src/components/Forms/Message/Message.tsx +9 -5
  215. package/src/components/Forms/Radio/Radio.tsx +1 -1
  216. package/src/components/Forms/Radio/styles/mixins.scss +2 -2
  217. package/src/components/Forms/RangeSlider/RangeSlider.tsx +1 -1
  218. package/src/components/Forms/Select/Select.tsx +1 -1
  219. package/src/components/Forms/Select/styles/mixins.scss +6 -6
  220. package/src/components/Forms/TextArea/TextArea.tsx +1 -1
  221. package/src/components/Forms/TextInput/TextInput.tsx +3 -5
  222. package/src/components/Forms/TextInput/styles/mixins.scss +10 -10
  223. package/src/components/Forms/index.ts +1 -1
  224. package/src/components/Gauge/Gauge.tsx +1 -1
  225. package/src/components/Gauge/GaugeMaker.tsx +3 -3
  226. package/src/components/Gauge/tests/Gauge.unit.test.jsx +0 -1
  227. package/src/components/Grid/Grid.tsx +1 -1
  228. package/src/components/Grid/GridCol.tsx +21 -10
  229. package/src/components/Grid/tests/Grid.unit.test.jsx +0 -1
  230. package/src/components/Grid/tests/GridCol.unit.test.jsx +0 -1
  231. package/src/components/Hero/Hero.tsx +1 -1
  232. package/src/components/Hero/styles/config.scss +0 -1
  233. package/src/components/Hero/tests/Hero.conformance.test.jsx +1 -2
  234. package/src/components/Hero/tests/Hero.unit.test.jsx +0 -1
  235. package/src/components/Hero/tests/data.js +26 -26
  236. package/src/components/Icon/Icon.tsx +1 -1
  237. package/src/components/Icon/IconSearch.jsx +4 -4
  238. package/src/components/Icon/PictogramSearch.jsx +3 -14
  239. package/src/components/Icon/iconSearchTags.ts +1 -0
  240. package/src/components/Icon/index.ts +1 -2
  241. package/src/components/Icon/styles/export/size.scss +2 -2
  242. package/src/components/Icon/styles/mixins.scss +3 -3
  243. package/src/components/Icon/styles/style.scss +30 -0
  244. package/src/components/Icon/tests/Icon.conformance.test.jsx +1 -2
  245. package/src/components/Icon/tests/Icon.unit.test.jsx +1 -3
  246. package/src/components/Icon/tests/Pictogram.unit.test.jsx +1 -2
  247. package/src/components/IconList/IconList.tsx +1 -1
  248. package/src/components/IconList/Item.tsx +15 -11
  249. package/src/components/IconList/styles/config.scss +2 -2
  250. package/src/components/IconList/styles/style.scss +1 -1
  251. package/src/components/IconList/tests/IconList.conformance.test.jsx +1 -2
  252. package/src/components/IconList/tests/IconList.unit.test.jsx +29 -26
  253. package/src/components/Image/Image.tsx +1 -1
  254. package/src/components/Image/tests/Image.conformance.test.jsx +1 -1
  255. package/src/components/Image/tests/Image.unit.test.jsx +0 -1
  256. package/src/components/Link/Link.tsx +1 -1
  257. package/src/components/Link/tests/Link.conformance.test.jsx +1 -1
  258. package/src/components/Link/tests/Link.unit.test.jsx +1 -1
  259. package/src/components/List/ClickableControl.tsx +12 -12
  260. package/src/components/List/List.tsx +13 -13
  261. package/src/components/List/ListItem.tsx +11 -11
  262. package/src/components/List/tests/ClickableControl.unit.test.jsx +0 -1
  263. package/src/components/List/tests/List.conformance.test.jsx +16 -17
  264. package/src/components/List/tests/ListItem.unit.test.jsx +46 -47
  265. package/src/components/Loader/Loader.tsx +1 -1
  266. package/src/components/Loader/LoaderFullscreen.tsx +32 -0
  267. package/src/components/Loader/index.ts +1 -0
  268. package/src/components/Loader/styles/config.scss +5 -5
  269. package/src/components/Loader/styles/mixins.scss +24 -0
  270. package/src/components/Loader/styles/style.scss +9 -0
  271. package/src/components/Loader/tests/Loader.conformance.test.jsx +1 -1
  272. package/src/components/Loader/tests/LoaderFullscreen.conformance.test.jsx +21 -0
  273. package/src/components/Loader/tests/LoaderFullscreen.unit.test.jsx +41 -0
  274. package/src/components/Loader/tests/test.scss +1 -1
  275. package/src/components/Megamenu/MegaMenuIcon.tsx +1 -1
  276. package/src/components/Megamenu/Megamenu.static.ts +5 -5
  277. package/src/components/Megamenu/Megamenu.tsx +28 -29
  278. package/src/components/Megamenu/MegamenuBlog.tsx +17 -19
  279. package/src/components/Megamenu/MegamenuSearchContent.tsx +2 -2
  280. package/src/components/Megamenu/MyOrangeMobilePanel.tsx +11 -12
  281. package/src/components/Megamenu/index.ts +1 -1
  282. package/src/components/Megamenu/static.ts +2 -2
  283. package/src/components/Modal/Modal.tsx +3 -4
  284. package/src/components/Modal/ModalBody.tsx +1 -1
  285. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  286. package/src/components/Modal/ModalProductFooter.tsx +1 -1
  287. package/src/components/Modal/ModalProductHeader.tsx +1 -1
  288. package/src/components/Modal/index.ts +2 -2
  289. package/src/components/Modal/tests/Modal.conformance.test.jsx +2 -3
  290. package/src/components/Modal/tests/Modal.unit.test.jsx +0 -1
  291. package/src/components/Modal/tests/ModalProductHeader.unit.test.jsx +0 -1
  292. package/src/components/Modal/tests/ModalTitle.unit.test.jsx +0 -1
  293. package/src/components/Pagination/Pagination.tsx +2 -3
  294. package/src/components/Pagination/PaginationItem.tsx +1 -1
  295. package/src/components/Pagination/Separator.tsx +1 -1
  296. package/src/components/Pagination/helpers.ts +6 -1
  297. package/src/components/Pagination/tests/Item.unit.test.jsx +38 -39
  298. package/src/components/Pagination/tests/Pagination.conformance.test.jsx +7 -8
  299. package/src/components/Pagination/tests/Pagination.unit.test.jsx +39 -40
  300. package/src/components/Pagination/tests/Separator.unit.test.jsx +10 -11
  301. package/src/components/Pill/Pill.tsx +1 -1
  302. package/src/components/Pill/tests/Pill.conformance.test.jsx +1 -1
  303. package/src/components/Preview/CodeExample.tsx +6 -9
  304. package/src/components/Preview/Preview.tsx +2 -1
  305. package/src/components/Preview/PreviewGenerator.tsx +8 -8
  306. package/src/components/Preview/PreviewTitleBar.tsx +1 -1
  307. package/src/components/Preview/index.tsx +1 -1
  308. package/src/components/Progress/Progress.tsx +1 -1
  309. package/src/components/Progress/index.ts +1 -1
  310. package/src/components/Progress/tests/Progress.conformance.test.jsx +6 -7
  311. package/src/components/Progress/tests/Progress.unit.test.jsx +42 -39
  312. package/src/components/PromoBanner/PromoBanner.tsx +1 -1
  313. package/src/components/PromoBanner/styles/style.scss +2 -2
  314. package/src/components/PromoBanner/tests/PromoBanner.conformance.test.jsx +1 -2
  315. package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +0 -1
  316. package/src/components/PromotionCard/PromotionCard.tsx +1 -1
  317. package/src/components/PromotionCard/PromotionCardContent.tsx +8 -8
  318. package/src/components/PromotionCard/PromotionCardImageWrapper.tsx +7 -9
  319. package/src/components/PromotionCard/PromotionCardSection.tsx +1 -1
  320. package/src/components/PromotionCard/PromotionCardTitle.tsx +11 -11
  321. package/src/components/PromotionCard/constants.ts +2 -2
  322. package/src/components/PromotionCard/styles/config.scss +2 -4
  323. package/src/components/PromotionCard/tests/PromotionCard.conformance.test.jsx +1 -2
  324. package/src/components/PromotionCard/tests/PromotionCard.unit.test.jsx +0 -1
  325. package/src/components/Section/Section.tsx +1 -1
  326. package/src/components/Section/tests/Section.conformance.test.jsx +1 -2
  327. package/src/components/Section/tests/Section.unit.test.jsx +0 -1
  328. package/src/components/Skeleton/Skeleton.tsx +1 -1
  329. package/src/components/Skeleton/styles/mixins.scss +3 -3
  330. package/src/components/Skeleton/tests/Skeleton.conformance.test.jsx +1 -1
  331. package/src/components/SkipLink/SkipLink.tsx +1 -1
  332. package/src/components/SkipLink/tests/SkipLink.unit.test.jsx +0 -4
  333. package/src/components/SocialButton/SocialButton.tsx +1 -1
  334. package/src/components/SocialButton/tests/SocialButton.unit.test.jsx +1 -1
  335. package/src/components/Stepbar/Stepbar.tsx +1 -1
  336. package/src/components/Stepbar/tests/Stepbar.conformance.test.jsx +1 -1
  337. package/src/components/Sticker/Sticker.tsx +14 -8
  338. package/src/components/Sticker/index.ts +1 -0
  339. package/src/components/Sticker/styles/mixins.scss +2 -2
  340. package/src/components/Sticker/tests/Sticker.conformance.test.jsx +5 -6
  341. package/src/components/Sticker/tests/Sticker.unit.test.jsx +16 -19
  342. package/src/components/Table/Header.tsx +1 -2
  343. package/src/components/Table/Row.tsx +1 -2
  344. package/src/components/Table/Rows.tsx +1 -2
  345. package/src/components/Table/Table.tsx +4 -5
  346. package/src/components/Table/docsData.ts +0 -1
  347. package/src/components/Table/index.ts +1 -1
  348. package/src/components/Table/styles/mixins.scss +5 -0
  349. package/src/components/Table/tests/Footer.unit.test.jsx +1 -2
  350. package/src/components/Table/tests/Header.unit.test.jsx +1 -2
  351. package/src/components/Table/tests/Row.unit.test.jsx +1 -2
  352. package/src/components/Table/tests/Rows.unit.test.jsx +1 -2
  353. package/src/components/Table/tests/Table.conformance.test.jsx +6 -6
  354. package/src/components/Table/tests/Table.unit.test.jsx +1 -1
  355. package/src/components/Tabs/Tabs.tsx +2 -2
  356. package/src/components/Tabs/index.ts +2 -2
  357. package/src/components/Tabs/tests/Tabs.unit.test.jsx +2 -3
  358. package/src/components/Tag/Tag.tsx +1 -1
  359. package/src/components/Tag/TagButton.tsx +1 -1
  360. package/src/components/Tag/index.ts +1 -1
  361. package/src/components/Tag/styles/mixins.scss +1 -1
  362. package/src/components/Tag/tests/Tag.conformance.test.jsx +2 -3
  363. package/src/components/Tag/tests/Tag.unit.test.jsx +1 -3
  364. package/src/components/Tag/tests/TagButton.conformance.test.jsx +1 -1
  365. package/src/components/Tag/tests/TagButton.unit.test.jsx +1 -1
  366. package/src/components/Testimonial/Testimonial.tsx +15 -15
  367. package/src/components/Testimonial/styles/config.scss +25 -22
  368. package/src/components/Testimonial/styles/mixins.scss +36 -32
  369. package/src/components/Testimonial/tests/Testimonial.conformance.test.jsx +5 -6
  370. package/src/components/Testimonial/tests/Testimonial.unit.test.jsx +22 -23
  371. package/src/components/Tile/Tile.tsx +2 -3
  372. package/src/components/Tile/tests/Tile.conformance.test.jsx +1 -1
  373. package/src/components/Tooltip/InfoTooltip.tsx +1 -1
  374. package/src/components/Tooltip/Tooltip.static.ts +100 -66
  375. package/src/components/Tooltip/Tooltip.tsx +2 -3
  376. package/src/components/Tooltip/index.ts +1 -1
  377. package/src/components/Tooltip/styles/mixins.scss +14 -13
  378. package/src/components/Tooltip/tests/Tooltip.conformance.test.jsx +1 -1
  379. package/src/components/Tooltip/tests/Tooltip.unit.test.jsx +43 -34
  380. package/src/components/index.ts +41 -40
  381. package/src/styles/base/globals.scss +17 -1
  382. package/src/styles/export/breakpoint.scss +1 -1
  383. package/src/styles/export/breakpoint.ts +7 -7
  384. package/src/styles/export/space.scss +1 -1
  385. package/src/styles/tokens/breakpoint.scss +64 -49
  386. package/src/styles/tokens/space.scss +9 -9
  387. package/src/styles/tools/generate.scss +6 -6
  388. package/src/styles/tools/layout.scss +3 -3
  389. package/src/styles/tools/map.scss +2 -2
  390. package/src/styles/tools/text.scss +1 -1
  391. package/src/styles/utilities/index.scss +7 -7
  392. package/build/search-index.json +0 -426
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangesk/orange-design-system",
3
- "version": "2.0.0-beta.36",
3
+ "version": "2.0.0-beta.38",
4
4
  "private": false,
5
5
  "engines": {
6
6
  "node": ">=20.x"
@@ -26,15 +26,23 @@
26
26
  "scripts": {
27
27
  "dev": "npm run build:scss-exports && npm run build:search-index && next dev",
28
28
  "build": "npm run build:scss-exports && npm run build:search-index && next build && npm run sprite",
29
- "build:bundle": "npm run build:scss-exports && npx rollup -c && npm run build:megamenu && npm run build:footer",
30
- "build:megamenu": "npm run build:scss-exports && npx rollup -c rollup.megamenu.config.mjs",
31
- "dev:megamenu": "npm run build:scss-exports && npx rollup -c rollup.megamenu.config.mjs --watch",
32
- "build:footer": "npm run build:scss-exports && npx rollup -c rollup.footer.config.mjs",
33
- "dev:footer": "npm run build:scss-exports && npx rollup -c rollup.footer.config.mjs --watch",
29
+ "build:bundle": "npm run build:scss-exports && pnpm exec rollup -c && npm run build:megamenu && npm run build:footer",
30
+ "build:megamenu": "npm run build:scss-exports && pnpm exec rollup -c rollup.megamenu.config.mjs",
31
+ "dev:megamenu": "npm run build:scss-exports && pnpm exec rollup -c rollup.megamenu.config.mjs --watch",
32
+ "build:footer": "npm run build:scss-exports && pnpm exec rollup -c rollup.footer.config.mjs",
33
+ "dev:footer": "npm run build:scss-exports && pnpm exec rollup -c rollup.footer.config.mjs --watch",
34
34
  "build:scss-exports": "node scripts/build-scss-exports.js",
35
35
  "build:search-index": "node scripts/mdx-search-index.js",
36
36
  "start": "next start",
37
- "lint": "next lint",
37
+ "lint": "biome lint .",
38
+ "lint:fix": "biome lint --write .",
39
+ "lint:fix:unsafe": "biome lint --write --unsafe .",
40
+ "check": "biome check .",
41
+ "check:fix": "biome check --write .",
42
+ "imports:fix": "biome check --write --only=assist/source/organizeImports .",
43
+ "format": "biome format --write . && prettier --write '**/*.{mdx,scss}'",
44
+ "format:biome": "biome format --write .",
45
+ "format:prettier": "prettier --write '**/*.{mdx,scss}'",
38
46
  "test": "vitest",
39
47
  "test:visual:docker": "docker run --rm --init --ipc=host -e CI=1 -v \"$PWD\":/work -w /work mcr.microsoft.com/playwright:v1.58.2-noble bash -lc \"corepack enable && pnpm install --frozen-lockfile --ignore-scripts && pnpm run test:visual\"",
40
48
  "test:visual:docker:update": "docker run --rm --init --ipc=host -e CI=1 -v \"$PWD\":/work -w /work mcr.microsoft.com/playwright:v1.58.2-noble bash -lc \"corepack enable && pnpm install --frozen-lockfile --ignore-scripts && pnpm run test:visual:update\"",
@@ -47,8 +55,8 @@
47
55
  "@cloudfour/transition-hidden-element": "^2.0.2",
48
56
  "@mdx-js/loader": "^3.1.1",
49
57
  "@mdx-js/react": "^3.1.1",
50
- "@next/mdx": "16.1.6",
51
- "@orangesk/accessible-autocomplete": "^3.1.2",
58
+ "@next/mdx": "16.2.1",
59
+ "@orangesk/accessible-autocomplete": "3.2.0",
52
60
  "@popperjs/core": "^2.11.8",
53
61
  "@types/mdx": "^2.0.13",
54
62
  "a11y-dialog": "^8.1.5",
@@ -59,7 +67,7 @@
59
67
  "html-react-parser": "^5.2.17",
60
68
  "lorem-ipsum": "^2.0.8",
61
69
  "minisearch": "7.2.0",
62
- "next": "16.1.6",
70
+ "next": "16.2.1",
63
71
  "normalize.css": "^8.0.1",
64
72
  "nouislider": "^15.8.1",
65
73
  "prism-react-renderer": "^2.4.1",
@@ -79,10 +87,10 @@
79
87
  },
80
88
  "devDependencies": {
81
89
  "@babel/core": "^7.29.0",
82
- "@babel/preset-env": "^7.29.0",
90
+ "@babel/preset-env": "^7.29.2",
83
91
  "@babel/preset-react": "^7.28.5",
84
92
  "@babel/preset-typescript": "^7.28.5",
85
- "@eslint/eslintrc": "3.3.5",
93
+ "@biomejs/biome": "latest",
86
94
  "@rollup/plugin-alias": "6.0.0",
87
95
  "@rollup/plugin-babel": "7.0.0",
88
96
  "@rollup/plugin-commonjs": "29.0.2",
@@ -91,7 +99,7 @@
91
99
  "@rollup/plugin-terser": "1.0.0",
92
100
  "@rollup/plugin-typescript": "^12.3.0",
93
101
  "@rollup/plugin-url": "^8.0.2",
94
- "@rollup/rollup-darwin-arm64": "^4.59.0",
102
+ "@rollup/rollup-darwin-arm64": "^4.60.0",
95
103
  "@testing-library/dom": "^10.4.1",
96
104
  "@testing-library/jest-dom": "^6.9.1",
97
105
  "@testing-library/react": "^16.3.2",
@@ -100,33 +108,34 @@
100
108
  "@types/react": "19.2.14",
101
109
  "@types/react-dom": "19.2.3",
102
110
  "@types/wnumb": "^1.2.3",
103
- "@vitejs/plugin-react": "^5.1.4",
104
- "@vitest/browser": "^4.1.0",
105
- "@vitest/browser-playwright": "^4.1.0",
106
- "@vitest/coverage-v8": "^4.0.18",
107
- "@vitest/ui": "^4.0.18",
108
- "canvas": "^3.2.1",
109
- "eslint": "latest",
110
- "eslint-config-next": "16.1.6",
111
- "eslint-config-prettier": "^10.1.8",
112
- "eslint-plugin-unused-imports": "^4.4.1",
111
+ "@vitejs/plugin-react": "6.0.1",
112
+ "@vitest/browser": "^4.1.1",
113
+ "@vitest/browser-playwright": "^4.1.1",
114
+ "@vitest/coverage-v8": "^4.1.1",
115
+ "@vitest/ui": "^4.1.1",
116
+ "canvas": "^3.2.2",
113
117
  "fs-extra": "^11.3.4",
114
118
  "glob": "13.0.6",
115
- "html-validate": "10.11.1",
119
+ "html-validate": "10.11.2",
116
120
  "husky": "^9.1.7",
117
121
  "identity-obj-proxy": "^3.0.0",
118
- "jsdom": "28.1.0",
119
- "lint-staged": "16.3.3",
122
+ "jsdom": "29.0.1",
123
+ "lint-staged": "16.4.0",
120
124
  "playwright": "^1.58.2",
121
125
  "prettier": "^3.8.1",
126
+ "rollup": "^4.60.0",
122
127
  "rollup-plugin-copy": "^3.5.0",
123
- "rollup-plugin-dts": "^6.4.0",
128
+ "rollup-plugin-dts": "^6.4.1",
124
129
  "rollup-plugin-postcss": "^4.0.2",
125
130
  "sass": "^1.98.0",
126
131
  "svg-sprite": "^2.0.4",
127
- "typescript": "^5.9.3",
128
- "vitest": "^4.1.0",
132
+ "typescript": "6.0.2",
133
+ "vitest": "^4.1.1",
129
134
  "vitest-axe": "^0.1.0",
130
- "vitest-browser-react": "^2.0.5"
135
+ "vitest-browser-react": "^2.1.0"
136
+ },
137
+ "lint-staged": {
138
+ "*.{js,jsx,ts,tsx,json,css}": "biome check --write --no-errors-on-unmatched",
139
+ "*.{mdx,scss}": "prettier --write"
131
140
  }
132
141
  }
@@ -0,0 +1,4 @@
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none"
2
+ xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M19.2154 18.6031C18.7324 18.6031 18.3358 18.9997 18.3358 19.5173C18.3358 20.0176 18.7324 20.4316 19.2154 20.4316C19.6983 20.4316 20.0949 20.0176 20.0949 19.5173C20.0949 18.9997 19.6983 18.6031 19.2154 18.6031ZM13.6783 12.4277C13.6783 11.9101 13.2643 11.5135 12.7813 11.5135C12.2984 11.5135 11.9018 11.9101 11.9018 12.4277C11.9018 12.928 12.2984 13.342 12.7813 13.342C13.2643 13.342 13.6783 12.928 13.6783 12.4277ZM28.7874 13.8422C29.4953 12.6224 29.0044 11.0578 27.7265 10.4612L26.48 9.87897C25.1911 9.27703 24.2352 8.13481 23.8702 6.75994L23.5169 5.43041C23.155 4.06721 21.7015 3.30829 20.3759 3.78991L19.083 4.25953C17.7462 4.74515 16.2623 4.61349 15.0321 3.89956L13.8422 3.2093C12.6224 2.50137 11.0578 2.99232 10.4612 4.27019L9.87897 5.51674C9.27703 6.80561 8.13481 7.76151 6.75994 8.12647L5.43041 8.47977C4.06721 8.84174 3.30829 10.2953 3.78991 11.6208L4.25953 12.9137C4.74515 14.2505 4.61349 15.7344 3.89956 16.9646L3.2093 18.1545C2.50137 19.3743 2.99232 20.9389 4.27019 21.5355L5.51674 22.1177C6.80561 22.7197 7.76151 23.8619 8.12647 25.2368L8.47977 26.5663C8.84174 27.9295 10.2953 28.6884 11.6208 28.2068L12.9137 27.7372C14.2505 27.2516 15.7344 27.3832 16.9646 28.0971L18.1545 28.7874C19.3743 29.4953 20.9389 29.0044 21.5355 27.7265L22.1177 26.48C22.7197 25.1911 23.8619 24.2352 25.2368 23.8702L26.5663 23.5169C27.9295 23.155 28.6884 21.7015 28.2068 20.3759L27.7372 19.083C27.2516 17.7462 27.3832 16.2623 28.0971 15.0321L28.7874 13.8422ZM10.1423 12.4277C10.1423 10.8752 11.3325 9.68499 12.7813 9.68499C14.2302 9.68499 15.4204 10.8925 15.4204 12.4277C15.4204 13.9629 14.2302 15.1704 12.7813 15.1704C11.3152 15.1704 10.1423 13.9802 10.1423 12.4277ZM14.0922 21.4145C13.7126 22.0701 13.3333 22.3977 12.8847 22.3977C12.3327 22.3977 11.9014 21.9664 11.9014 21.3971C11.9014 21.1212 11.9878 20.8279 12.1774 20.5002L17.8695 10.5649C18.2318 9.94396 18.5594 9.59899 19.077 9.59899C19.629 9.59899 20.0603 9.99562 20.0603 10.5649C20.0603 10.8235 19.9566 11.1342 19.767 11.4791L14.0922 21.4145ZM19.2154 22.2597C17.7492 22.2597 16.5763 21.0695 16.5763 19.517C16.5763 17.9645 17.7665 16.7743 19.2154 16.7743C20.6642 16.7743 21.8544 17.9818 21.8544 19.517C21.8544 21.0522 20.6642 22.2597 19.2154 22.2597Z" fill="currentColor" />
4
+ </svg>
@@ -46,7 +46,7 @@ export default class Accordion {
46
46
  private toggleAccordionItem(button: HTMLElement): void {
47
47
  const sectionId = button.getAttribute("aria-controls");
48
48
  const section = sectionId
49
- ? this.element.querySelector(`#${sectionId}`)
49
+ ? this.element.querySelector<HTMLElement>(`#${sectionId}`)
50
50
  : null;
51
51
 
52
52
  if (!section) return;
@@ -61,11 +61,54 @@ export default class Accordion {
61
61
  // Toggle section visibility
62
62
  if (newState) {
63
63
  section.removeAttribute("hidden");
64
+ this.scrollTriggerIntoModalView(button);
64
65
  } else {
65
66
  section.setAttribute("hidden", "");
66
67
  }
67
68
  }
68
69
 
70
+ private scrollTriggerIntoModalView(button: HTMLElement): void {
71
+ const modalDialog = button.closest<HTMLElement>(".modal__dialog");
72
+
73
+ if (!modalDialog) return;
74
+
75
+ const scrollToTrigger = () => {
76
+ const dialogRect = modalDialog.getBoundingClientRect();
77
+ const buttonRect = button.getBoundingClientRect();
78
+ const stickyHeaderOffset = this.getStickyHeaderOffset(modalDialog);
79
+ const gap = 8;
80
+ const top =
81
+ buttonRect.top -
82
+ dialogRect.top +
83
+ modalDialog.scrollTop -
84
+ stickyHeaderOffset -
85
+ gap;
86
+
87
+ modalDialog.scrollTo({
88
+ top: Math.max(0, top),
89
+ behavior: "smooth",
90
+ });
91
+ };
92
+
93
+ if (typeof window.requestAnimationFrame === "function") {
94
+ window.requestAnimationFrame(scrollToTrigger);
95
+ return;
96
+ }
97
+
98
+ setTimeout(scrollToTrigger, 0);
99
+ }
100
+
101
+ private getStickyHeaderOffset(modalDialog: HTMLElement): number {
102
+ const modalHeader =
103
+ modalDialog.querySelector<HTMLElement>(".modal__header");
104
+
105
+ if (!modalHeader) return 0;
106
+
107
+ const dialogRect = modalDialog.getBoundingClientRect();
108
+ const headerRect = modalHeader.getBoundingClientRect();
109
+ return Math.max(0, headerRect.bottom - dialogRect.top);
110
+ }
111
+
69
112
  private init(): void {
70
113
  this.buttons = Array.from(
71
114
  this.element.querySelectorAll(this.config.buttonSelector),
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
 
3
- import React, { ReactNode } from "react";
4
3
  import cx from "classnames";
5
-
4
+ import React, { ReactNode } from "react";
5
+ import { useStatic } from "@/utils/hooks";
6
6
  import AccordionStatic from "./Accordion.static";
7
7
  import HeadingContext from "./HeadingContext";
8
- import { useStatic } from "@/utils/hooks";
9
8
 
10
9
  const CLASS_ROOT = "accordion";
11
10
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import React from "react";
4
3
  import cx from "classnames";
4
+ import React from "react";
5
5
 
6
6
  import { Icon } from "../Icon";
7
7
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import React, { ReactNode } from "react";
4
3
  import cx from "classnames";
4
+ import React, { ReactNode } from "react";
5
5
 
6
6
  import { useHydrationSafeId } from "../../utils/hooks";
7
7
 
@@ -67,4 +67,5 @@ const AccordionItem: React.FC<AccordionItemProps> = ({
67
67
  };
68
68
 
69
69
  AccordionItem.displayName = "AccordionItem";
70
+
70
71
  export { AccordionItem };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
 
3
- import { createContext } from 'react';
3
+ import { createContext } from "react";
4
4
 
5
5
  export default createContext<number | null>(null);
@@ -1,11 +1,10 @@
1
- import { render, fireEvent } from "@testing-library/react";
1
+ import { fireEvent, render } from "@testing-library/react";
2
2
  import userEvent from "@testing-library/user-event";
3
-
4
- import { AccordionItem } from "../AccordionItem";
5
3
  import { Accordion } from "../Accordion";
4
+ import AccordionStatic from "../Accordion.static";
6
5
  import AccordionHeader from "../AccordionHeader";
6
+ import { AccordionItem } from "../AccordionItem";
7
7
  import HeadingContext from "../HeadingContext";
8
- import AccordionStatic from "../Accordion.static";
9
8
  import testData from "./data";
10
9
 
11
10
  // Helper function to initialize accordion static behavior
@@ -179,6 +178,115 @@ describe("Accordion Component Tests", () => {
179
178
  getByTestId("item-test-id-2").getAttribute("aria-expanded"),
180
179
  ).toBe("true");
181
180
  });
181
+
182
+ it("scrolls modal dialog to clicked accordion button when inside modal", async () => {
183
+ accordion.unmount();
184
+
185
+ const { container, getByTestId } = render(
186
+ <div className="modal__dialog">
187
+ <div className="modal__header" />
188
+ <TestingAccordion />
189
+ </div>,
190
+ );
191
+
192
+ await waitForAccordionInteractivity(container);
193
+
194
+ const modalDialog = container.querySelector(".modal__dialog");
195
+ const modalHeader = container.querySelector(".modal__header");
196
+ const button = getByTestId("item-test-id-1");
197
+
198
+ modalDialog.scrollTop = 120;
199
+ modalDialog.getBoundingClientRect = vi.fn(() => ({
200
+ top: 40,
201
+ }));
202
+ modalHeader.getBoundingClientRect = vi.fn(() => ({
203
+ bottom: 120,
204
+ }));
205
+ button.getBoundingClientRect = vi.fn(() => ({
206
+ top: 170,
207
+ }));
208
+ modalDialog.scrollTo = vi.fn();
209
+
210
+ const rafSpy = vi
211
+ .spyOn(window, "requestAnimationFrame")
212
+ .mockImplementation((callback) => {
213
+ callback();
214
+ return 1;
215
+ });
216
+
217
+ fireEvent.click(getByTestId("item-test-id-1"));
218
+
219
+ expect(modalDialog.scrollTo).toHaveBeenCalledWith({
220
+ top: 162,
221
+ behavior: "smooth",
222
+ });
223
+
224
+ rafSpy.mockRestore();
225
+ });
226
+
227
+ it("does not scroll when accordion is outside modal dialog", async () => {
228
+ const { getByTestId } = accordion;
229
+
230
+ const rafSpy = vi.spyOn(window, "requestAnimationFrame");
231
+
232
+ fireEvent.click(getByTestId("item-test-id-1"));
233
+
234
+ expect(rafSpy).not.toHaveBeenCalled();
235
+
236
+ rafSpy.mockRestore();
237
+ });
238
+
239
+ it("scrolls to the clicked button when multiple items are open", async () => {
240
+ accordion.unmount();
241
+
242
+ const { container, getByTestId } = render(
243
+ <div className="modal__dialog">
244
+ <div className="modal__header" />
245
+ <TestingAccordion />
246
+ </div>,
247
+ );
248
+
249
+ await waitForAccordionInteractivity(container);
250
+
251
+ const modalDialog = container.querySelector(".modal__dialog");
252
+ const modalHeader = container.querySelector(".modal__header");
253
+ const firstButton = getByTestId("item-test-id-1");
254
+ const secondButton = getByTestId("item-test-id-2");
255
+
256
+ modalDialog.scrollTop = 50;
257
+ modalDialog.getBoundingClientRect = vi.fn(() => ({
258
+ top: 20,
259
+ }));
260
+ modalHeader.getBoundingClientRect = vi.fn(() => ({
261
+ bottom: 100,
262
+ }));
263
+ firstButton.getBoundingClientRect = vi.fn(() => ({
264
+ top: 120,
265
+ }));
266
+ secondButton.getBoundingClientRect = vi.fn(() => ({
267
+ top: 260,
268
+ }));
269
+ modalDialog.scrollTo = vi.fn();
270
+
271
+ const rafSpy = vi
272
+ .spyOn(window, "requestAnimationFrame")
273
+ .mockImplementation((callback) => {
274
+ callback();
275
+ return 1;
276
+ });
277
+
278
+ fireEvent.click(firstButton);
279
+ fireEvent.click(secondButton);
280
+
281
+ expect(firstButton.getAttribute("aria-expanded")).toBe("true");
282
+ expect(secondButton.getAttribute("aria-expanded")).toBe("true");
283
+ expect(modalDialog.scrollTo).toHaveBeenLastCalledWith({
284
+ top: 202,
285
+ behavior: "smooth",
286
+ });
287
+
288
+ rafSpy.mockRestore();
289
+ });
182
290
  });
183
291
 
184
292
  describe("keyboard interactions", () => {
@@ -1,9 +1,8 @@
1
- import React, { JSX } from "react";
2
1
  import cx from "classnames";
3
-
4
- import { Icon } from "../Icon";
5
- import { Buttons } from "../Buttons";
2
+ import React, { JSX } from "react";
6
3
  import ConditionalWrapper from "../../utils/ConditionalWrapper";
4
+ import { Buttons } from "../Buttons";
5
+ import { Icon } from "../Icon";
7
6
 
8
7
  import data from "./data";
9
8
 
@@ -1,8 +1,7 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from 'vitest-axe';
3
-
4
- import { Alert } from "../";
2
+ import { axe } from "vitest-axe";
5
3
  import { Link } from "../../Link";
4
+ import { Alert } from "../";
6
5
 
7
6
  const example = (
8
7
  <Alert
@@ -1,4 +1,4 @@
1
- import { render, fireEvent } from "@testing-library/react";
1
+ import { fireEvent, render } from "@testing-library/react";
2
2
 
3
3
  import { Alert } from "../";
4
4
 
@@ -1,9 +1,8 @@
1
1
  import { beforeEach, describe, expect, test } from "vitest";
2
2
  import { page } from "vitest/browser";
3
3
  import { render } from "vitest-browser-react";
4
-
5
- import { Alert } from "../";
6
4
  import { Button } from "../../Button";
5
+ import { Alert } from "../";
7
6
 
8
7
  describe("Alert visual regression", () => {
9
8
  beforeEach(async () => {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
 
3
- import React from "react";
4
3
  import cx from "classnames";
5
- import { Link } from "../Link";
6
- import { Container } from "../Container";
4
+ import React from "react";
7
5
  import { useStatic } from "../../utils/hooks";
6
+ import { Container } from "../Container";
7
+ import { Link } from "../Link";
8
8
  import AnchorNavigationStatic from "./AnchorNavigation.static";
9
9
 
10
10
  interface AnchorNavigationItem {
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from 'vitest-axe';
2
+ import { axe } from "vitest-axe";
3
3
 
4
4
  import { AnchorNavigation } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
 
4
4
  type BarAlign = "start" | "end" | "center";
5
5
  type BarSpace = "small" | "large";
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
 
4
4
  interface BarBreakProps extends React.HTMLAttributes<HTMLElement> {
5
5
  /** HTML tag to render the compontent with */
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
 
4
4
  interface CommonProps {
5
5
  /** Bar item could shrink and wrap content if there is not enough empty space */
@@ -1,3 +1,3 @@
1
1
  export { Bar } from "./Bar";
2
- export { BarItem } from "./BarItem";
3
2
  export { BarBreak } from "./BarBreak";
3
+ export { BarItem } from "./BarItem";
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from 'vitest-axe';
2
+ import { axe } from "vitest-axe";
3
3
 
4
4
  import { Bar, BarItem } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
- import React, { ReactElement } from "react";
2
1
  import cx from "classnames";
2
+ import React, { ReactElement } from "react";
3
3
 
4
4
  import { CloneElementWithClassName } from "./CloneElementWithClassName";
5
5
  import { Provider } from "./Context";
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
 
3
- import React, { useContext, ReactElement } from "react";
4
-
5
- import { Context } from "./Context";
3
+ import React, { ReactElement, useContext } from "react";
6
4
  import { CloneElementWithClassName } from "./CloneElementWithClassName";
5
+ import { Context } from "./Context";
7
6
 
8
7
  export interface BlockActionControlProps {
9
8
  /** 1 and only one single element */
@@ -1,10 +1,9 @@
1
1
  "use client";
2
2
 
3
- import React, { useContext, ReactElement } from "react";
4
3
  import cx from "classnames";
5
-
6
- import { Context } from "./Context";
4
+ import React, { ReactElement, useContext } from "react";
7
5
  import { CloneElementWithClassName } from "./CloneElementWithClassName";
6
+ import { Context } from "./Context";
8
7
 
9
8
  export interface BlockActionIndicatorProps {
10
9
  /** 1 and only one single element */
@@ -1,5 +1,5 @@
1
- import React, { ReactElement } from "react";
2
1
  import cx from "classnames";
2
+ import React, { ReactElement } from "react";
3
3
 
4
4
  interface CloneElementWithClassNameProps {
5
5
  className?: string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import React, { useState, ReactNode, Dispatch, SetStateAction } from "react";
3
+ import React, { Dispatch, ReactNode, SetStateAction, useState } from "react";
4
4
 
5
5
  interface ContextType {
6
6
  isIndicating: boolean;
@@ -1,9 +1,8 @@
1
1
  import React, { ReactElement } from "react";
2
-
3
- import { CloneElementWithClassName } from "./CloneElementWithClassName";
4
2
  import { BlockAction } from "./BlockAction";
5
3
  import { BlockActionControl } from "./BlockActionControl";
6
4
  import { BlockActionIndicator } from "./BlockActionIndicator";
5
+ import { CloneElementWithClassName } from "./CloneElementWithClassName";
7
6
 
8
7
  export interface BlockActionOverrideProps {
9
8
  /** 1 and only one single element */
@@ -12,9 +11,7 @@ export interface BlockActionOverrideProps {
12
11
  [key: string]: any;
13
12
  }
14
13
 
15
- export { BlockAction };
16
-
17
- export { BlockActionControl };
14
+ export { BlockAction, BlockActionControl };
18
15
 
19
16
  const BlockActionOverride: React.FC<BlockActionOverrideProps> = (props) => (
20
17
  <CloneElementWithClassName {...props} className="block-action__override" />
@@ -22,6 +19,4 @@ const BlockActionOverride: React.FC<BlockActionOverrideProps> = (props) => (
22
19
 
23
20
  BlockActionOverride.displayName = "BlockActionOverride";
24
21
 
25
- export { BlockActionOverride };
26
-
27
- export { BlockActionIndicator };
22
+ export { BlockActionIndicator, BlockActionOverride };
@@ -1,10 +1,10 @@
1
- @use '../../../styles/tokens/color';
1
+ @use "../../../styles/tokens/color";
2
2
 
3
3
  /// Generates indicator hover colors. Each key is a background color and matching hover color.
4
4
  /// @type Map
5
5
  $indicator-colors: (
6
- 'default': color.$orange-dark,
7
- 'black': color.$orange,
8
- 'orange': color.$white,
9
- 'orange-dark': color.$black,
10
- )
6
+ "default": color.$orange-dark,
7
+ "black": color.$orange,
8
+ "orange": color.$white,
9
+ "orange-dark": color.$black,
10
+ );
@@ -1,4 +1,4 @@
1
- import { render, fireEvent } from "@testing-library/react";
1
+ import { fireEvent, render } from "@testing-library/react";
2
2
 
3
3
  import { BlockActionControl } from "../BlockActionControl";
4
4
  import { Context } from "../Context";
@@ -1,8 +1,8 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
  import { Grid } from "@/components/Grid/Grid";
4
- import { GridCol } from "../Grid/GridCol";
5
4
  import { Button } from "../Button/Button";
5
+ import { GridCol } from "../Grid/GridCol";
6
6
 
7
7
  const CLASS_ROOT = "body-banner";
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from 'vitest-axe';
2
+ import { axe } from "vitest-axe";
3
3
 
4
4
  import { BodyBanner } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
 
4
4
  interface BreadcrumbItemProps {
5
5
  /** Additional CSS classes */
@@ -1,5 +1,5 @@
1
1
  import { render } from "@testing-library/react";
2
- import { axe } from 'vitest-axe';
2
+ import { axe } from "vitest-axe";
3
3
 
4
4
  import { Breadcrumbs } from "../";
5
5
 
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import cx from "classnames";
2
+ import React from "react";
3
3
 
4
4
  export type ButtonSize = "small" | "large";
5
5
  export type ButtonType = "primary" | "fill" | "ghost";