@axa-fr/design-system-slash-react 0.2.0-beta.278

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 (511) hide show
  1. package/dist/Accordion/Client/Accordion.d.ts +8 -0
  2. package/dist/Accordion/Client/Accordion.js +7 -0
  3. package/dist/Accordion/Client/Accordion.stories.d.ts +8 -0
  4. package/dist/Accordion/Client/Accordion.stories.js +24 -0
  5. package/dist/Accordion/Client/AccordionItem.d.ts +6 -0
  6. package/dist/Accordion/Client/AccordionItem.js +10 -0
  7. package/dist/Action/Action.d.ts +8 -0
  8. package/dist/Action/Action.js +7 -0
  9. package/dist/Action/Action.stories.d.ts +6 -0
  10. package/dist/Action/Action.stories.js +30 -0
  11. package/dist/Alert/Alert.agent.d.ts +16 -0
  12. package/dist/Alert/Alert.agent.js +15 -0
  13. package/dist/Alert/Alert.agent.stories.d.ts +9 -0
  14. package/dist/Alert/Alert.agent.stories.js +54 -0
  15. package/dist/Alert/Alert.client.d.ts +11 -0
  16. package/dist/Alert/Alert.client.js +24 -0
  17. package/dist/Alert/Alert.client.stories.d.ts +5 -0
  18. package/dist/Alert/Alert.client.stories.js +25 -0
  19. package/dist/Badge/Badge.d.ts +8 -0
  20. package/dist/Badge/Badge.js +9 -0
  21. package/dist/Badge/Badge.stories.d.ts +7 -0
  22. package/dist/Badge/Badge.stories.js +69 -0
  23. package/dist/Button/Button.agent.d.ts +7 -0
  24. package/dist/Button/Button.agent.js +10 -0
  25. package/dist/Button/Button.agent.stories.d.ts +18 -0
  26. package/dist/Button/Button.agent.stories.js +97 -0
  27. package/dist/Button/Button.client.d.ts +17 -0
  28. package/dist/Button/Button.client.js +15 -0
  29. package/dist/Button/Button.client.stories.d.ts +22 -0
  30. package/dist/Button/Button.client.stories.js +99 -0
  31. package/dist/Card/Card.client.d.ts +6 -0
  32. package/dist/Card/Card.client.js +9 -0
  33. package/dist/Card/Card.client.stories.d.ts +6 -0
  34. package/dist/Card/Card.client.stories.js +40 -0
  35. package/dist/Card/__tests__/Card.client.test.d.ts +1 -0
  36. package/dist/Card/__tests__/Card.client.test.js +27 -0
  37. package/dist/Card/index.d.ts +2 -0
  38. package/dist/Card/index.js +2 -0
  39. package/dist/Form/Checkbox/Agent/Checkbox.d.ts +23 -0
  40. package/dist/Form/Checkbox/Agent/Checkbox.js +30 -0
  41. package/dist/Form/Checkbox/Agent/Checkbox.stories.d.ts +18 -0
  42. package/dist/Form/Checkbox/Agent/Checkbox.stories.js +108 -0
  43. package/dist/Form/Checkbox/Agent/CheckboxInput.d.ts +6 -0
  44. package/dist/Form/Checkbox/Agent/CheckboxInput.js +15 -0
  45. package/dist/Form/Checkbox/Agent/CheckboxItem.d.ts +10 -0
  46. package/dist/Form/Checkbox/Agent/CheckboxItem.js +13 -0
  47. package/dist/Form/Checkbox/Agent/CheckboxModes.d.ts +7 -0
  48. package/dist/Form/Checkbox/Agent/CheckboxModes.js +8 -0
  49. package/dist/Form/Checkbox/Agent/index.d.ts +4 -0
  50. package/dist/Form/Checkbox/Agent/index.js +4 -0
  51. package/dist/Form/Checkbox/Client/Checkbox.d.ts +7 -0
  52. package/dist/Form/Checkbox/Client/Checkbox.js +15 -0
  53. package/dist/Form/Checkbox/Client/Checkbox.stories.d.ts +6 -0
  54. package/dist/Form/Checkbox/Client/Checkbox.stories.js +38 -0
  55. package/dist/Form/Checkbox/Client/CheckboxSelect.d.ts +15 -0
  56. package/dist/Form/Checkbox/Client/CheckboxSelect.js +7 -0
  57. package/dist/Form/Checkbox/Client/CheckboxSelect.stories.d.ts +6 -0
  58. package/dist/Form/Checkbox/Client/CheckboxSelect.stories.js +55 -0
  59. package/dist/Form/Checkbox/Client/index.d.ts +2 -0
  60. package/dist/Form/Checkbox/Client/index.js +2 -0
  61. package/dist/Form/Choice/Choice.d.ts +12 -0
  62. package/dist/Form/Choice/Choice.js +17 -0
  63. package/dist/Form/Choice/Choice.stories.d.ts +9 -0
  64. package/dist/Form/Choice/Choice.stories.js +27 -0
  65. package/dist/Form/Choice/ChoiceInput.d.ts +6 -0
  66. package/dist/Form/Choice/ChoiceInput.js +19 -0
  67. package/dist/Form/Choice/ChoiceInput.stories.d.ts +9 -0
  68. package/dist/Form/Choice/ChoiceInput.stories.js +33 -0
  69. package/dist/Form/Choice/index.d.ts +2 -0
  70. package/dist/Form/Choice/index.js +2 -0
  71. package/dist/Form/Date/Date.d.ts +9 -0
  72. package/dist/Form/Date/Date.js +21 -0
  73. package/dist/Form/Date/Date.stories.d.ts +9 -0
  74. package/dist/Form/Date/Date.stories.js +28 -0
  75. package/dist/Form/Date/DateInput.d.ts +10 -0
  76. package/dist/Form/Date/DateInput.js +11 -0
  77. package/dist/Form/Date/DateInput.stories.d.ts +9 -0
  78. package/dist/Form/Date/DateInput.stories.js +54 -0
  79. package/dist/Form/Date/index.d.ts +2 -0
  80. package/dist/Form/Date/index.js +2 -0
  81. package/dist/Form/FileUpload/Client/FIleUpload.stories.d.ts +6 -0
  82. package/dist/Form/FileUpload/Client/FIleUpload.stories.js +54 -0
  83. package/dist/Form/FileUpload/Client/FileUpload.d.ts +32 -0
  84. package/dist/Form/FileUpload/Client/FileUpload.js +52 -0
  85. package/dist/Form/FileUpload/Client/index.d.ts +1 -0
  86. package/dist/Form/FileUpload/Client/index.js +1 -0
  87. package/dist/Form/InputError/InputError.d.ts +6 -0
  88. package/dist/Form/InputError/InputError.js +5 -0
  89. package/dist/Form/InputError/InputError.stories.d.ts +5 -0
  90. package/dist/Form/InputError/InputError.stories.js +12 -0
  91. package/dist/Form/InputError/index.d.ts +1 -0
  92. package/dist/Form/InputError/index.js +1 -0
  93. package/dist/Form/MultiSelect/MultiSelect.d.ts +20 -0
  94. package/dist/Form/MultiSelect/MultiSelect.js +54 -0
  95. package/dist/Form/MultiSelect/MultiSelect.stories.d.ts +10 -0
  96. package/dist/Form/MultiSelect/MultiSelect.stories.js +89 -0
  97. package/dist/Form/MultiSelect/MultiSelectInput.d.ts +9 -0
  98. package/dist/Form/MultiSelect/MultiSelectInput.js +12 -0
  99. package/dist/Form/MultiSelect/__tests__/MultiSelect.spec.d.ts +10 -0
  100. package/dist/Form/MultiSelect/__tests__/MultiSelect.spec.js +15 -0
  101. package/dist/Form/MultiSelect/__tests__/MultiSelectInput.spec.d.ts +1 -0
  102. package/dist/Form/MultiSelect/__tests__/MultiSelectInput.spec.js +9 -0
  103. package/dist/Form/MultiSelect/index.d.ts +2 -0
  104. package/dist/Form/MultiSelect/index.js +2 -0
  105. package/dist/Form/Number/Number.d.ts +7 -0
  106. package/dist/Form/Number/Number.js +12 -0
  107. package/dist/Form/Number/Number.stories.d.ts +9 -0
  108. package/dist/Form/Number/Number.stories.js +31 -0
  109. package/dist/Form/Number/NumberInput.d.ts +12 -0
  110. package/dist/Form/Number/NumberInput.js +13 -0
  111. package/dist/Form/Number/NumberInput.stories.d.ts +9 -0
  112. package/dist/Form/Number/NumberInput.stories.js +39 -0
  113. package/dist/Form/Number/index.d.ts +2 -0
  114. package/dist/Form/Number/index.js +2 -0
  115. package/dist/Form/Pass/Pass.d.ts +9 -0
  116. package/dist/Form/Pass/Pass.js +10 -0
  117. package/dist/Form/Pass/Pass.stories.d.ts +5 -0
  118. package/dist/Form/Pass/Pass.stories.js +32 -0
  119. package/dist/Form/Pass/PassInput.d.ts +10 -0
  120. package/dist/Form/Pass/PassInput.js +34 -0
  121. package/dist/Form/Pass/PassInput.stories.d.ts +5 -0
  122. package/dist/Form/Pass/PassInput.stories.js +59 -0
  123. package/dist/Form/Radio/Agent/Radio.d.ts +14 -0
  124. package/dist/Form/Radio/Agent/Radio.js +25 -0
  125. package/dist/Form/Radio/Agent/Radio.stories.d.ts +9 -0
  126. package/dist/Form/Radio/Agent/Radio.stories.js +44 -0
  127. package/dist/Form/Radio/Agent/RadioInput.d.ts +47 -0
  128. package/dist/Form/Radio/Agent/RadioInput.js +12 -0
  129. package/dist/Form/Radio/Agent/RadioInput.stories.d.ts +9 -0
  130. package/dist/Form/Radio/Agent/RadioInput.stories.js +46 -0
  131. package/dist/Form/Radio/Agent/RadioItem.d.ts +10 -0
  132. package/dist/Form/Radio/Agent/RadioItem.js +13 -0
  133. package/dist/Form/Radio/Agent/RadioItem.stories.d.ts +9 -0
  134. package/dist/Form/Radio/Agent/RadioItem.stories.js +28 -0
  135. package/dist/Form/Radio/Agent/index.d.ts +3 -0
  136. package/dist/Form/Radio/Agent/index.js +3 -0
  137. package/dist/Form/Radio/Client/Radio.d.ts +7 -0
  138. package/dist/Form/Radio/Client/Radio.js +14 -0
  139. package/dist/Form/Radio/Client/Radio.stories.d.ts +6 -0
  140. package/dist/Form/Radio/Client/Radio.stories.js +38 -0
  141. package/dist/Form/Radio/Client/RadioSelect.d.ts +17 -0
  142. package/dist/Form/Radio/Client/RadioSelect.js +16 -0
  143. package/dist/Form/Radio/Client/RadioSelect.stories.d.ts +6 -0
  144. package/dist/Form/Radio/Client/RadioSelect.stories.js +52 -0
  145. package/dist/Form/Radio/Client/index.d.ts +2 -0
  146. package/dist/Form/Radio/Client/index.js +2 -0
  147. package/dist/Form/Select/Agent/Select.d.ts +7 -0
  148. package/dist/Form/Select/Agent/Select.js +10 -0
  149. package/dist/Form/Select/Agent/Select.stories.d.ts +8 -0
  150. package/dist/Form/Select/Agent/Select.stories.js +35 -0
  151. package/dist/Form/Select/Agent/SelectBase.d.ts +8 -0
  152. package/dist/Form/Select/Agent/SelectBase.js +10 -0
  153. package/dist/Form/Select/Agent/SelectDefault.d.ts +8 -0
  154. package/dist/Form/Select/Agent/SelectDefault.js +19 -0
  155. package/dist/Form/Select/Agent/SelectInput.d.ts +8 -0
  156. package/dist/Form/Select/Agent/SelectInput.js +12 -0
  157. package/dist/Form/Select/Agent/SelectInput.stories.d.ts +9 -0
  158. package/dist/Form/Select/Agent/SelectInput.stories.js +82 -0
  159. package/dist/Form/Select/Agent/index.d.ts +3 -0
  160. package/dist/Form/Select/Agent/index.js +3 -0
  161. package/dist/Form/Select/Client/CustomOption.d.ts +4 -0
  162. package/dist/Form/Select/Client/CustomOption.js +8 -0
  163. package/dist/Form/Select/Client/DropdownIndicator.d.ts +4 -0
  164. package/dist/Form/Select/Client/DropdownIndicator.js +11 -0
  165. package/dist/Form/Select/Client/Select.d.ts +23 -0
  166. package/dist/Form/Select/Client/Select.js +27 -0
  167. package/dist/Form/Select/Client/Select.stories.d.ts +10 -0
  168. package/dist/Form/Select/Client/Select.stories.js +31 -0
  169. package/dist/Form/Select/Client/index.d.ts +1 -0
  170. package/dist/Form/Select/Client/index.js +1 -0
  171. package/dist/Form/Slider/Slider.agent.d.ts +24 -0
  172. package/dist/Form/Slider/Slider.agent.js +33 -0
  173. package/dist/Form/Slider/Slider.agent.stories.d.ts +10 -0
  174. package/dist/Form/Slider/Slider.agent.stories.js +39 -0
  175. package/dist/Form/Slider/SliderInput.agent.d.ts +8 -0
  176. package/dist/Form/Slider/SliderInput.agent.js +10 -0
  177. package/dist/Form/Slider/SliderInput.agent.stories.d.ts +10 -0
  178. package/dist/Form/Slider/SliderInput.agent.stories.js +45 -0
  179. package/dist/Form/Slider/index.d.ts +3 -0
  180. package/dist/Form/Slider/index.js +3 -0
  181. package/dist/Form/Text/Agent/Text.d.ts +7 -0
  182. package/dist/Form/Text/Agent/Text.js +10 -0
  183. package/dist/Form/Text/Agent/Text.stories.d.ts +9 -0
  184. package/dist/Form/Text/Agent/Text.stories.js +36 -0
  185. package/dist/Form/Text/Agent/TextInput.d.ts +11 -0
  186. package/dist/Form/Text/Agent/TextInput.js +15 -0
  187. package/dist/Form/Text/Agent/TextInput.stories.d.ts +9 -0
  188. package/dist/Form/Text/Agent/TextInput.stories.js +127 -0
  189. package/dist/Form/Text/Agent/index.d.ts +2 -0
  190. package/dist/Form/Text/Agent/index.js +2 -0
  191. package/dist/Form/Text/Agent/inputTypes.d.ts +2 -0
  192. package/dist/Form/Text/Agent/inputTypes.js +5 -0
  193. package/dist/Form/Text/Client/Text.d.ts +12 -0
  194. package/dist/Form/Text/Client/Text.js +12 -0
  195. package/dist/Form/Text/Client/Text.stories.d.ts +8 -0
  196. package/dist/Form/Text/Client/Text.stories.js +46 -0
  197. package/dist/Form/Text/Client/index.d.ts +1 -0
  198. package/dist/Form/Text/Client/index.js +1 -0
  199. package/dist/Form/Textarea/Textarea.d.ts +5 -0
  200. package/dist/Form/Textarea/Textarea.js +12 -0
  201. package/dist/Form/Textarea/Textarea.stories.d.ts +9 -0
  202. package/dist/Form/Textarea/Textarea.stories.js +31 -0
  203. package/dist/Form/Textarea/TextareaInput.d.ts +11 -0
  204. package/dist/Form/Textarea/TextareaInput.js +16 -0
  205. package/dist/Form/Textarea/TextareaInput.stories.d.ts +6 -0
  206. package/dist/Form/Textarea/TextareaInput.stories.js +35 -0
  207. package/dist/Form/Textarea/index.d.ts +2 -0
  208. package/dist/Form/Textarea/index.js +2 -0
  209. package/dist/Form/core/Field.d.ts +16 -0
  210. package/dist/Form/core/Field.js +12 -0
  211. package/dist/Form/core/FieldError.d.ts +7 -0
  212. package/dist/Form/core/FieldError.js +8 -0
  213. package/dist/Form/core/FieldForm.d.ts +59 -0
  214. package/dist/Form/core/FieldForm.js +151 -0
  215. package/dist/Form/core/FieldInput.d.ts +9 -0
  216. package/dist/Form/core/FieldInput.js +9 -0
  217. package/dist/Form/core/FormClassManager.d.ts +7 -0
  218. package/dist/Form/core/FormClassManager.js +33 -0
  219. package/dist/Form/core/HelpMessage.d.ts +7 -0
  220. package/dist/Form/core/HelpMessage.js +2 -0
  221. package/dist/Form/core/InputList.d.ts +8 -0
  222. package/dist/Form/core/InputList.js +4 -0
  223. package/dist/Form/core/MessageTypes.d.ts +5 -0
  224. package/dist/Form/core/MessageTypes.js +6 -0
  225. package/dist/Form/core/getComponentClassName.d.ts +1 -0
  226. package/dist/Form/core/getComponentClassName.js +27 -0
  227. package/dist/Form/core/getFirstId.d.ts +2 -0
  228. package/dist/Form/core/getFirstId.js +1 -0
  229. package/dist/Form/core/getOptionClassName.d.ts +1 -0
  230. package/dist/Form/core/getOptionClassName.js +10 -0
  231. package/dist/Form/core/index.d.ts +31 -0
  232. package/dist/Form/core/index.js +13 -0
  233. package/dist/Form/core/useInputClassModifier.d.ts +4 -0
  234. package/dist/Form/core/useInputClassModifier.js +12 -0
  235. package/dist/Form/core/useOptionsWithId.d.ts +2 -0
  236. package/dist/Form/core/useOptionsWithId.js +13 -0
  237. package/dist/IconBg/IconBg.client.d.ts +9 -0
  238. package/dist/IconBg/IconBg.client.js +13 -0
  239. package/dist/IconBg/IconBg.client.stories.d.ts +5 -0
  240. package/dist/IconBg/IconBg.client.stories.js +23 -0
  241. package/dist/IconBg/__tests__/IconBg.client.test.d.ts +1 -0
  242. package/dist/IconBg/__tests__/IconBg.client.test.js +22 -0
  243. package/dist/IconBg/index.d.ts +2 -0
  244. package/dist/IconBg/index.js +2 -0
  245. package/dist/Layout/Footer/Agent/Footer.d.ts +12 -0
  246. package/dist/Layout/Footer/Agent/Footer.js +6 -0
  247. package/dist/Layout/Footer/Agent/Footer.stories.d.ts +10 -0
  248. package/dist/Layout/Footer/Agent/Footer.stories.js +18 -0
  249. package/dist/Layout/Footer/Agent/index.d.ts +1 -0
  250. package/dist/Layout/Footer/Agent/index.js +1 -0
  251. package/dist/Layout/Footer/Client/DynamicIcons.d.ts +4 -0
  252. package/dist/Layout/Footer/Client/DynamicIcons.js +20 -0
  253. package/dist/Layout/Footer/Client/Footer.d.ts +14 -0
  254. package/dist/Layout/Footer/Client/Footer.js +16 -0
  255. package/dist/Layout/Footer/Client/Footer.stories.d.ts +14 -0
  256. package/dist/Layout/Footer/Client/Footer.stories.js +48 -0
  257. package/dist/Layout/Footer/Client/MenuIcons.d.ts +9 -0
  258. package/dist/Layout/Footer/Client/MenuIcons.js +8 -0
  259. package/dist/Layout/Footer/Client/MenuLink.d.ts +11 -0
  260. package/dist/Layout/Footer/Client/MenuLink.js +11 -0
  261. package/dist/Layout/Header/Agent/Header.agent.d.ts +9 -0
  262. package/dist/Layout/Header/Agent/Header.agent.js +9 -0
  263. package/dist/Layout/Header/Agent/Header.agent.stories.d.ts +6 -0
  264. package/dist/Layout/Header/Agent/Header.agent.stories.js +26 -0
  265. package/dist/Layout/Header/Agent/Infos/Infos.d.ts +14 -0
  266. package/dist/Layout/Header/Agent/Infos/Infos.js +10 -0
  267. package/dist/Layout/Header/Agent/Infos/Infos.stories.d.ts +5 -0
  268. package/dist/Layout/Header/Agent/Infos/Infos.stories.js +15 -0
  269. package/dist/Layout/Header/Agent/MenuTitleWrapper/MenuTitleWrapper.d.ts +8 -0
  270. package/dist/Layout/Header/Agent/MenuTitleWrapper/MenuTitleWrapper.js +14 -0
  271. package/dist/Layout/Header/Agent/MenuTitleWrapper/MenuTitleWrapper.stories.d.ts +6 -0
  272. package/dist/Layout/Header/Agent/MenuTitleWrapper/MenuTitleWrapper.stories.js +25 -0
  273. package/dist/Layout/Header/Agent/Name/Name.d.ts +16 -0
  274. package/dist/Layout/Header/Agent/Name/Name.js +10 -0
  275. package/dist/Layout/Header/Agent/Name/Name.stories.d.ts +5 -0
  276. package/dist/Layout/Header/Agent/Name/Name.stories.js +18 -0
  277. package/dist/Layout/Header/Agent/NavBar/NavBar.d.ts +12 -0
  278. package/dist/Layout/Header/Agent/NavBar/NavBar.helpers.d.ts +1 -0
  279. package/dist/Layout/Header/Agent/NavBar/NavBar.helpers.js +12 -0
  280. package/dist/Layout/Header/Agent/NavBar/NavBar.js +34 -0
  281. package/dist/Layout/Header/Agent/NavBar/NavBar.stories.d.ts +9 -0
  282. package/dist/Layout/Header/Agent/NavBar/NavBar.stories.js +32 -0
  283. package/dist/Layout/Header/Agent/NavBar/NavBarBase.d.ts +20 -0
  284. package/dist/Layout/Header/Agent/NavBar/NavBarBase.js +15 -0
  285. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItem.d.ts +8 -0
  286. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItem.js +54 -0
  287. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItem.stories.d.ts +11 -0
  288. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItem.stories.js +43 -0
  289. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemBase.d.ts +10 -0
  290. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemBase.helpers.d.ts +1 -0
  291. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemBase.helpers.js +11 -0
  292. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemBase.js +16 -0
  293. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemLink.d.ts +8 -0
  294. package/dist/Layout/Header/Agent/NavBar/NavBarItem/NavBarItemLink.js +4 -0
  295. package/dist/Layout/Header/Agent/NavBar/NavBarItem/index.d.ts +3 -0
  296. package/dist/Layout/Header/Agent/NavBar/NavBarItem/index.js +3 -0
  297. package/dist/Layout/Header/Agent/NavBar/index.d.ts +4 -0
  298. package/dist/Layout/Header/Agent/NavBar/index.js +4 -0
  299. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.d.ts +13 -0
  300. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.helpers.d.ts +1 -0
  301. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.helpers.js +8 -0
  302. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.js +12 -0
  303. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.stories.d.ts +7 -0
  304. package/dist/Layout/Header/Agent/TitleHeader/TitleHeader.stories.js +45 -0
  305. package/dist/Layout/Header/Agent/ToggleButton/ToggleButton.d.ts +7 -0
  306. package/dist/Layout/Header/Agent/ToggleButton/ToggleButton.js +8 -0
  307. package/dist/Layout/Header/Agent/ToggleButton/ToggleButton.stories.d.ts +6 -0
  308. package/dist/Layout/Header/Agent/ToggleButton/ToggleButton.stories.js +19 -0
  309. package/dist/Layout/Header/Agent/User/InnerUser.d.ts +5 -0
  310. package/dist/Layout/Header/Agent/User/InnerUser.js +3 -0
  311. package/dist/Layout/Header/Agent/User/User.d.ts +18 -0
  312. package/dist/Layout/Header/Agent/User/User.js +10 -0
  313. package/dist/Layout/Header/Agent/User/User.stories.d.ts +6 -0
  314. package/dist/Layout/Header/Agent/User/User.stories.js +23 -0
  315. package/dist/Layout/Header/Agent/index.d.ts +7 -0
  316. package/dist/Layout/Header/Agent/index.js +7 -0
  317. package/dist/Layout/Header/Client/Header.client.d.ts +10 -0
  318. package/dist/Layout/Header/Client/Header.client.js +11 -0
  319. package/dist/Layout/Header/Client/Header.client.stories.d.ts +9 -0
  320. package/dist/Layout/Header/Client/Header.client.stories.js +57 -0
  321. package/dist/Layout/Header/Client/NavBar/NavBar.d.ts +8 -0
  322. package/dist/Layout/Header/Client/NavBar/NavBar.js +13 -0
  323. package/dist/Layout/Header/Client/NavBar/NavBar.stories.d.ts +8 -0
  324. package/dist/Layout/Header/Client/NavBar/NavBar.stories.js +22 -0
  325. package/dist/Layout/Header/Client/NavBar/index.d.ts +1 -0
  326. package/dist/Layout/Header/Client/NavBar/index.js +1 -0
  327. package/dist/Layout/Header/Client/PreviousLink/PreviousLink.d.ts +7 -0
  328. package/dist/Layout/Header/Client/PreviousLink/PreviousLink.js +13 -0
  329. package/dist/Layout/Header/Client/PreviousLink/PreviousLink.stories.d.ts +8 -0
  330. package/dist/Layout/Header/Client/PreviousLink/PreviousLink.stories.js +16 -0
  331. package/dist/Layout/Header/Client/PreviousLink/index.d.ts +1 -0
  332. package/dist/Layout/Header/Client/PreviousLink/index.js +1 -0
  333. package/dist/Layout/Header/Client/index.d.ts +1 -0
  334. package/dist/Layout/Header/Client/index.js +1 -0
  335. package/dist/Link/Link.client.d.ts +7 -0
  336. package/dist/Link/Link.client.js +11 -0
  337. package/dist/Link/Link.client.stories.d.ts +5 -0
  338. package/dist/Link/Link.client.stories.js +14 -0
  339. package/dist/List/ClickList/ClickList.client.d.ts +11 -0
  340. package/dist/List/ClickList/ClickList.client.js +6 -0
  341. package/dist/List/ClickList/ClickList.client.stories.d.ts +6 -0
  342. package/dist/List/ClickList/ClickList.client.stories.js +60 -0
  343. package/dist/List/ClickList/__tests__/ClickList.client.test.d.ts +1 -0
  344. package/dist/List/ClickList/__tests__/ClickList.client.test.js +18 -0
  345. package/dist/List/ClickList/index.d.ts +1 -0
  346. package/dist/List/ClickList/index.js +1 -0
  347. package/dist/List/ContentTabList/ContentTabItem/ContentTabItem.client.d.ts +6 -0
  348. package/dist/List/ContentTabList/ContentTabItem/ContentTabItem.client.js +6 -0
  349. package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.client.test.d.ts +1 -0
  350. package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.client.test.js +100 -0
  351. package/dist/List/ContentTabList/ContentTabItem/index.d.ts +2 -0
  352. package/dist/List/ContentTabList/ContentTabItem/index.js +1 -0
  353. package/dist/List/ContentTabList/ContentTabList.client.d.ts +8 -0
  354. package/dist/List/ContentTabList/ContentTabList.client.js +10 -0
  355. package/dist/List/ContentTabList/ContentTabList.client.stories.d.ts +7 -0
  356. package/dist/List/ContentTabList/ContentTabList.client.stories.js +78 -0
  357. package/dist/List/ContentTabList/__tests__/ContentTabList.client.test.d.ts +1 -0
  358. package/dist/List/ContentTabList/__tests__/ContentTabList.client.test.js +57 -0
  359. package/dist/List/ContentTabList/index.d.ts +1 -0
  360. package/dist/List/ContentTabList/index.js +1 -0
  361. package/dist/List/List.d.ts +6 -0
  362. package/dist/List/List.js +9 -0
  363. package/dist/List/List.stories.d.ts +5 -0
  364. package/dist/List/List.stories.js +52 -0
  365. package/dist/List/__tests__/List.test.d.ts +1 -0
  366. package/dist/List/__tests__/List.test.js +30 -0
  367. package/dist/List/index.d.ts +1 -0
  368. package/dist/List/index.js +1 -0
  369. package/dist/Loader/Client/Loader.d.ts +11 -0
  370. package/dist/Loader/Client/Loader.js +10 -0
  371. package/dist/Loader/Client/Loader.stories.d.ts +6 -0
  372. package/dist/Loader/Client/Loader.stories.js +15 -0
  373. package/dist/Loader/Client/index.d.ts +1 -0
  374. package/dist/Loader/Client/index.js +1 -0
  375. package/dist/ModalAgent/BooleanModal.d.ts +15 -0
  376. package/dist/ModalAgent/BooleanModal.js +11 -0
  377. package/dist/ModalAgent/Modal.d.ts +11 -0
  378. package/dist/ModalAgent/Modal.js +9 -0
  379. package/dist/ModalAgent/Modal.stories.d.ts +31 -0
  380. package/dist/ModalAgent/Modal.stories.js +84 -0
  381. package/dist/ModalAgent/components/Body.d.ts +5 -0
  382. package/dist/ModalAgent/components/Body.js +7 -0
  383. package/dist/ModalAgent/components/Footer.d.ts +5 -0
  384. package/dist/ModalAgent/components/Footer.js +7 -0
  385. package/dist/ModalAgent/components/Header.d.ts +10 -0
  386. package/dist/ModalAgent/components/Header.js +7 -0
  387. package/dist/ModalAgent/components/HeaderBase.d.ts +5 -0
  388. package/dist/ModalAgent/components/HeaderBase.js +7 -0
  389. package/dist/ModalAgent/index.d.ts +7 -0
  390. package/dist/ModalAgent/index.js +7 -0
  391. package/dist/ModalClient/Modal.client.d.ts +22 -0
  392. package/dist/ModalClient/Modal.client.js +39 -0
  393. package/dist/ModalClient/Modal.client.stories.d.ts +20 -0
  394. package/dist/ModalClient/Modal.client.stories.js +33 -0
  395. package/dist/Pagination/Pagination.client.d.ts +9 -0
  396. package/dist/Pagination/Pagination.client.js +15 -0
  397. package/dist/Pagination/Pagination.client.stories.d.ts +11 -0
  398. package/dist/Pagination/Pagination.client.stories.js +19 -0
  399. package/dist/Pagination/PaginationDesktop.client.d.ts +9 -0
  400. package/dist/Pagination/PaginationDesktop.client.js +31 -0
  401. package/dist/Pagination/PaginationMobile.client.d.ts +9 -0
  402. package/dist/Pagination/PaginationMobile.client.js +10 -0
  403. package/dist/Stepper/Stepper.client.d.ts +12 -0
  404. package/dist/Stepper/Stepper.client.js +22 -0
  405. package/dist/Stepper/Stepper.client.stories.d.ts +16 -0
  406. package/dist/Stepper/Stepper.client.stories.js +23 -0
  407. package/dist/Steps/Step.d.ts +8 -0
  408. package/dist/Steps/Step.js +15 -0
  409. package/dist/Steps/StepBase.d.ts +10 -0
  410. package/dist/Steps/StepBase.js +7 -0
  411. package/dist/Steps/StepCurrent.d.ts +5 -0
  412. package/dist/Steps/StepCurrent.js +4 -0
  413. package/dist/Steps/StepDisabled.d.ts +5 -0
  414. package/dist/Steps/StepDisabled.js +4 -0
  415. package/dist/Steps/StepLink.d.ts +10 -0
  416. package/dist/Steps/StepLink.js +7 -0
  417. package/dist/Steps/StepNoLink.d.ts +7 -0
  418. package/dist/Steps/StepNoLink.js +4 -0
  419. package/dist/Steps/Steps.d.ts +8 -0
  420. package/dist/Steps/Steps.js +8 -0
  421. package/dist/Steps/Steps.stories.d.ts +11 -0
  422. package/dist/Steps/Steps.stories.js +31 -0
  423. package/dist/Steps/__tests__/Step.spec.d.ts +1 -0
  424. package/dist/Steps/__tests__/Step.spec.js +9 -0
  425. package/dist/Steps/index.d.ts +4 -0
  426. package/dist/Steps/index.js +4 -0
  427. package/dist/Svg/Svg.agent.stories.d.ts +7 -0
  428. package/dist/Svg/Svg.agent.stories.js +38 -0
  429. package/dist/Svg/Svg.client.stories.d.ts +7 -0
  430. package/dist/Svg/Svg.client.stories.js +38 -0
  431. package/dist/Svg/Svg.d.ts +7 -0
  432. package/dist/Svg/Svg.js +47 -0
  433. package/dist/Svg/__tests__/Svg.test.d.ts +1 -0
  434. package/dist/Svg/__tests__/Svg.test.js +38 -0
  435. package/dist/Svg/index.d.ts +1 -0
  436. package/dist/Svg/index.js +1 -0
  437. package/dist/Svg/svgInjector.d.ts +12 -0
  438. package/dist/Svg/svgInjector.js +28 -0
  439. package/dist/Table/Pagination/Items.d.ts +14 -0
  440. package/dist/Table/Pagination/Items.js +13 -0
  441. package/dist/Table/Pagination/Li.d.ts +10 -0
  442. package/dist/Table/Pagination/Li.js +17 -0
  443. package/dist/Table/Pagination/LiPoint.d.ts +7 -0
  444. package/dist/Table/Pagination/LiPoint.js +8 -0
  445. package/dist/Table/Pagination/Pager.d.ts +15 -0
  446. package/dist/Table/Pagination/Pager.js +16 -0
  447. package/dist/Table/Pagination/PaginationButton.d.ts +12 -0
  448. package/dist/Table/Pagination/PaginationButton.js +14 -0
  449. package/dist/Table/Pagination/Paging.d.ts +14 -0
  450. package/dist/Table/Pagination/Paging.js +21 -0
  451. package/dist/Table/TBody.d.ts +6 -0
  452. package/dist/Table/TBody.js +7 -0
  453. package/dist/Table/THead.d.ts +6 -0
  454. package/dist/Table/THead.js +7 -0
  455. package/dist/Table/Table.d.ts +30 -0
  456. package/dist/Table/Table.js +20 -0
  457. package/dist/Table/Table.stories.d.ts +7 -0
  458. package/dist/Table/Table.stories.js +33 -0
  459. package/dist/Table/Td.d.ts +6 -0
  460. package/dist/Table/Td.js +7 -0
  461. package/dist/Table/Th.d.ts +6 -0
  462. package/dist/Table/Th.js +7 -0
  463. package/dist/Table/Tr.d.ts +6 -0
  464. package/dist/Table/Tr.js +7 -0
  465. package/dist/Table/index.d.ts +7 -0
  466. package/dist/Table/index.js +7 -0
  467. package/dist/Tabs/Agent/Tabs.agent.d.ts +8 -0
  468. package/dist/Tabs/Agent/Tabs.agent.js +6 -0
  469. package/dist/Tabs/Agent/Tabs.agent.stories.d.ts +6 -0
  470. package/dist/Tabs/Agent/Tabs.agent.stories.js +29 -0
  471. package/dist/Tabs/Agent/components/Pane.d.ts +8 -0
  472. package/dist/Tabs/Agent/components/Pane.js +8 -0
  473. package/dist/Tabs/Agent/components/Tab.d.ts +10 -0
  474. package/dist/Tabs/Agent/components/Tab.js +4 -0
  475. package/dist/Tabs/Agent/components/TabsCore.d.ts +10 -0
  476. package/dist/Tabs/Agent/components/TabsCore.js +17 -0
  477. package/dist/Tabs/Agent/components/TabsStateless.d.ts +13 -0
  478. package/dist/Tabs/Agent/components/TabsStateless.js +10 -0
  479. package/dist/Tabs/Agent/components/Title.d.ts +15 -0
  480. package/dist/Tabs/Agent/components/Title.js +13 -0
  481. package/dist/Tabs/Client/Tabs.client.d.ts +16 -0
  482. package/dist/Tabs/Client/Tabs.client.js +48 -0
  483. package/dist/Tabs/Client/Tabs.client.stories.d.ts +17 -0
  484. package/dist/Tabs/Client/Tabs.client.stories.js +89 -0
  485. package/dist/Tag/Tag.client.d.ts +6 -0
  486. package/dist/Tag/Tag.client.js +7 -0
  487. package/dist/Tag/Tag.client.stories.d.ts +5 -0
  488. package/dist/Tag/Tag.client.stories.js +22 -0
  489. package/dist/Tag/__test__/Tag.client.test.d.ts +1 -0
  490. package/dist/Tag/__test__/Tag.client.test.js +18 -0
  491. package/dist/Tag/index.d.ts +2 -0
  492. package/dist/Tag/index.js +2 -0
  493. package/dist/Title/Title.agent.d.ts +9 -0
  494. package/dist/Title/Title.agent.js +9 -0
  495. package/dist/Title/Title.agent.stories.d.ts +13 -0
  496. package/dist/Title/Title.agent.stories.js +58 -0
  497. package/dist/Title/__tests__/Title.test.d.ts +1 -0
  498. package/dist/Title/__tests__/Title.test.js +40 -0
  499. package/dist/agent.d.ts +25 -0
  500. package/dist/agent.js +25 -0
  501. package/dist/assets/svg/facebook.svg +1 -0
  502. package/dist/assets/svg/linkedin.svg +1 -0
  503. package/dist/assets/svg/twitterx.svg +1 -0
  504. package/dist/assets/svg/youtube.svg +1 -0
  505. package/dist/client.d.ts +26 -0
  506. package/dist/client.js +24 -0
  507. package/dist/utilities/hooks/useIsSmallScreen.d.ts +1 -0
  508. package/dist/utilities/hooks/useIsSmallScreen.js +14 -0
  509. package/dist/utilities.d.ts +1 -0
  510. package/dist/utilities.js +1 -0
  511. package/package.json +123 -0
@@ -0,0 +1,9 @@
1
+ import "@axa-fr/design-system-slash-css/dist/Pagination/PaginationMobile.client.scss";
2
+ import { ComponentPropsWithoutRef } from "react";
3
+ type PropsPaginationMobile = {
4
+ numberPage: number;
5
+ currentPage: number;
6
+ setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
7
+ } & ComponentPropsWithoutRef<"div">;
8
+ export declare const PaginationMobile: ({ numberPage, currentPage, setCurrentPage, }: PropsPaginationMobile) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-slash-css/dist/Pagination/PaginationMobile.client.scss";
3
+ import arrowBackIos from "@material-symbols/svg-400/outlined/arrow_back_ios.svg";
4
+ import arrowForwardIos from "@material-symbols/svg-400/outlined/arrow_forward_ios.svg";
5
+ import { Svg } from "../Svg";
6
+ export const PaginationMobile = ({ numberPage, currentPage, setCurrentPage, }) => {
7
+ const isFirstPage = currentPage === 1;
8
+ const isLastPage = currentPage === numberPage;
9
+ return (_jsxs("div", { className: "af-pagination-mobile", children: [_jsx("button", { type: "button", onClick: () => setCurrentPage(currentPage - 1), disabled: isFirstPage, "aria-label": "Page pr\u00E9c\u00E9dente", children: _jsx(Svg, { src: arrowBackIos, className: "arrow" }) }), _jsxs("span", { children: [currentPage, " sur ", numberPage] }), _jsx("button", { type: "button", onClick: () => setCurrentPage(currentPage + 1), disabled: isLastPage, "aria-label": "Page suivant", children: _jsx(Svg, { src: arrowForwardIos, className: "arrow" }) })] }));
10
+ };
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes } from "react";
2
+ import "@axa-fr/design-system-slash-css/dist/Stepper/Stepper.client.scss";
3
+ export type StepperProps = {
4
+ currentStepProgress?: number;
5
+ currentStep: number;
6
+ currentSubtitle?: string;
7
+ currentTitle?: string;
8
+ nbSteps: 2 | 3 | 4 | 5 | 6;
9
+ isTitleVisible?: boolean;
10
+ isSubtitleVisible?: boolean;
11
+ } & Omit<HTMLAttributes<HTMLDivElement>, "role">;
12
+ export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible, isSubtitleVisible, className, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useId } from "react";
3
+ import classNames from "classnames";
4
+ import "@axa-fr/design-system-slash-css/dist/Stepper/Stepper.client.scss";
5
+ const INITIAL_STEPPER_PROGRESS = 10;
6
+ const MAX_STEPPER_PROGRESS = 100;
7
+ export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible = true, isSubtitleVisible = true, className, ...props }) => {
8
+ const stepperId = useId();
9
+ const getCurrentProgress = useCallback((index) => {
10
+ if (index < currentStep) {
11
+ return MAX_STEPPER_PROGRESS;
12
+ }
13
+ if (index === currentStep) {
14
+ if (currentStepProgress === 0) {
15
+ return INITIAL_STEPPER_PROGRESS;
16
+ }
17
+ return currentStepProgress;
18
+ }
19
+ return 0;
20
+ }, [currentStep, currentStepProgress]);
21
+ return (_jsxs("div", { className: "af-stepper-client", ...props, children: [isTitleVisible && currentTitle && (_jsx("h2", { className: "af-stepper-client__title", "aria-describedby": stepperId, children: currentTitle })), isSubtitleVisible && currentSubtitle && (_jsx("p", { className: "af-stepper-client__subtitle", children: currentSubtitle })), _jsx("div", { id: stepperId, role: "group", "aria-label": currentTitle, className: classNames("af-stepper-client__content", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx("div", { className: "af-stepper-client__progressbar", "aria-current": index === currentStep, "aria-hidden": index !== currentStep, "aria-label": `${getCurrentProgress(index)}%`, children: _jsx("div", { className: "af-stepper-client__progress", style: { width: `${getCurrentProgress(index)}%` } }) }, `${stepperId}-${index}`))) })] }));
22
+ };
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ComponentProps } from "react";
3
+ import { Stepper } from "./Stepper.client";
4
+ declare const meta: Meta<typeof Stepper>;
5
+ export default meta;
6
+ type StoryProps = Omit<ComponentProps<typeof Stepper>, "currentStep" | "currentStepProgress" | "isTitleVisible" | "isSubtitleVisible" | "currentTitle" | "nbSteps"> & {
7
+ currentStep: number;
8
+ currentSubtitle: string;
9
+ currentStepProgress: number;
10
+ isTitleVisible: boolean;
11
+ isSubtitleVisible: boolean;
12
+ currentTitle: string;
13
+ nbSteps: 2 | 3 | 4 | 5 | 6;
14
+ };
15
+ type Story = StoryObj<StoryProps>;
16
+ export declare const Playground: Story;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Stepper } from "./Stepper.client";
3
+ const meta = {
4
+ component: Stepper,
5
+ title: "Client/Components/Stepper",
6
+ parameters: {
7
+ layout: "centered",
8
+ },
9
+ };
10
+ export default meta;
11
+ export const Playground = {
12
+ name: "Stepper",
13
+ render: (props) => (_jsx("div", { style: { minWidth: "70vw" }, children: _jsx(Stepper, { ...props }) })),
14
+ args: {
15
+ nbSteps: 3,
16
+ currentTitle: "Step title",
17
+ currentStep: 2,
18
+ currentSubtitle: "Step subtitle",
19
+ currentStepProgress: 50,
20
+ isTitleVisible: true,
21
+ isSubtitleVisible: true,
22
+ },
23
+ };
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ import { StepLink } from "./StepLink";
3
+ type Props = Omit<ComponentPropsWithoutRef<typeof StepLink>, "href"> & {
4
+ href?: string;
5
+ mode?: "link" | "active" | "disabled";
6
+ };
7
+ declare const Step: ({ number, id, title, classModifier, href, onClick, mode, className, }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export { Step };
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StepCurrent } from "./StepCurrent";
3
+ import { StepDisabled } from "./StepDisabled";
4
+ import { StepLink } from "./StepLink";
5
+ const Step = ({ number, id, title, classModifier, href, onClick, mode = "link", className, }) => {
6
+ switch (mode) {
7
+ case "link":
8
+ return (_jsx(StepLink, { id: id, href: href ?? "#", number: number, classModifier: classModifier, className: className, title: title, onClick: onClick }));
9
+ case "active":
10
+ return (_jsx(StepCurrent, { id: id, title: title, classModifier: classModifier, className: className, number: number }));
11
+ default:
12
+ return (_jsx(StepDisabled, { id: id, title: title, classModifier: classModifier, className: className, number: number }));
13
+ }
14
+ };
15
+ export { Step };
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ id: string;
4
+ title: string;
5
+ children?: ReactNode;
6
+ className?: string;
7
+ classModifier?: string;
8
+ };
9
+ declare const StepBase: ({ children, id, title, className, classModifier }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export { StepBase };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getComponentClassName } from "../agent";
3
+ const StepBase = ({ children, id, title, className, classModifier }) => {
4
+ const componentClassName = getComponentClassName(className, classModifier, "af-steps-list-step");
5
+ return (_jsx("li", { className: componentClassName, title: title, children: children }, id));
6
+ };
7
+ export { StepBase };
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ import { StepNoLink } from "./StepNoLink";
3
+ type Props = ComponentPropsWithoutRef<typeof StepNoLink>;
4
+ declare const StepCurrent: ({ className, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export { StepCurrent };
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StepNoLink } from "./StepNoLink";
3
+ const StepCurrent = ({ className = "on af-steps-list-step", ...otherProps }) => _jsx(StepNoLink, { className: className, ...otherProps });
4
+ export { StepCurrent };
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ import { StepNoLink } from "./StepNoLink";
3
+ type Props = ComponentPropsWithoutRef<typeof StepNoLink>;
4
+ declare const StepDisabled: ({ className, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export { StepDisabled };
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StepNoLink } from "./StepNoLink";
3
+ const StepDisabled = ({ className = "disabled af-steps-list-step", ...otherProps }) => _jsx(StepNoLink, { className: className, ...otherProps });
4
+ export { StepDisabled };
@@ -0,0 +1,10 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import { StepBase } from "./StepBase";
3
+ import type { CustomClickEvent } from "./types";
4
+ type Props = ComponentPropsWithoutRef<typeof StepBase> & {
5
+ href: string;
6
+ number?: ReactNode;
7
+ onClick?: (e: CustomClickEvent) => void;
8
+ };
9
+ declare const StepLink: ({ id, href, number, title, className, onClick, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export { StepLink };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StepBase } from "./StepBase";
3
+ const StepLink = ({ id, href, number, title, className = "past af-steps-list-step", onClick, ...otherProps }) => (_jsx(StepBase, { id: id, className: `${className} ${number ? "number" : ""}`, title: title, ...otherProps, children: _jsxs("a", { className: "af-steps-list-step__label", href: href, onClick: (e) => {
4
+ e.preventDefault();
5
+ onClick?.({ href, id, title, number });
6
+ }, children: [Boolean(number) && (_jsx("div", { className: "af-steps-list-step__number", children: number })), _jsx("div", { className: "af-steps-list-step__title", children: title })] }) }));
7
+ export { StepLink };
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import { StepBase } from "./StepBase";
3
+ type Props = ComponentPropsWithoutRef<typeof StepBase> & {
4
+ number?: ReactNode;
5
+ };
6
+ declare const StepNoLink: ({ number, title, className, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export { StepNoLink };
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StepBase } from "./StepBase";
3
+ const StepNoLink = ({ number, title, className = "af-steps-list-step", ...otherProps }) => (_jsx(StepBase, { className: `${className} ${number ? "number" : ""}`, title: title, ...otherProps, children: _jsxs("div", { className: "af-steps-list-step__label", children: [Boolean(number) && (_jsx("div", { className: "af-steps-list-step__number", children: number })), _jsx("div", { className: "af-steps-list-step__title", children: title })] }) }));
4
+ export { StepNoLink };
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ children: ReactNode;
4
+ className?: string;
5
+ classModifier?: string;
6
+ };
7
+ declare const Steps: ({ children, className, classModifier, }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export { Steps };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getComponentClassName } from "../agent";
3
+ const defaultClassName = "af-steps-new";
4
+ const Steps = ({ children, className = defaultClassName, classModifier, }) => {
5
+ const componentClassName = getComponentClassName(className, classModifier, defaultClassName);
6
+ return (_jsx("div", { className: componentClassName, children: _jsx("ol", { className: "af-steps-list", children: children }) }));
7
+ };
8
+ export { Steps };
@@ -0,0 +1,11 @@
1
+ import { Meta, type StoryObj } from "@storybook/react";
2
+ import { Steps } from ".";
3
+ import type { CustomClickEvent } from "./types";
4
+ type StoryProps = React.ComponentProps<typeof Steps> & {
5
+ onClick: (e: CustomClickEvent | React.MouseEvent) => void;
6
+ mode?: "link" | "active" | "disabled";
7
+ };
8
+ declare const meta: Meta<StoryProps>;
9
+ export default meta;
10
+ type Story = StoryObj<StoryProps>;
11
+ export declare const NewStepsStory: Story;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Step, StepBase, Steps } from ".";
3
+ const meta = {
4
+ component: Steps,
5
+ title: "Agent/Components/Steps",
6
+ args: {
7
+ mode: "link",
8
+ },
9
+ argTypes: {
10
+ onClick: { action: "onClick" },
11
+ mode: {
12
+ options: ["link", "active", "disabled"],
13
+ control: {
14
+ type: "select",
15
+ },
16
+ },
17
+ },
18
+ };
19
+ export default meta;
20
+ const withPreventDefaultClick = (next) => (e) => {
21
+ e.preventDefault();
22
+ next?.(e);
23
+ };
24
+ export const NewStepsStory = {
25
+ name: "New Design Steps",
26
+ render: ({ classModifier, className, mode, onClick }) => (_jsxs(Steps, { classModifier: classModifier, className: className, children: [_jsx(Step, { id: "id1", href: "/etape1", onClick: onClick, number: "1", mode: mode, title: "Previous step" }), _jsx(Step, { id: "id2", href: "/etape2", number: "2", onClick: onClick, title: "Previous step", mode: "link" }), _jsx(Step, { id: "id3", number: "3", onClick: onClick, title: "Current step", mode: "active" }), _jsx(StepBase, { id: "idf4", title: "Un titre", children: _jsxs("a", { className: "af-steps-list-step__label", href: "#/", onClick: withPreventDefaultClick(onClick), children: [_jsx("span", { className: "af-steps-list-step__number", children: _jsx("i", { className: "glyphicon glyphicon-ok" }) }), _jsx("span", { className: "af-steps-list-step__title", children: "Custom" })] }) }), _jsx(Step, { id: "id5", number: "5", title: "Final step", mode: "disabled" })] })),
27
+ args: {
28
+ classModifier: "",
29
+ className: "",
30
+ },
31
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { render } from "@testing-library/react";
3
+ import { Step, StepBase, Steps } from "../index";
4
+ describe("<Steps>", () => {
5
+ it("renders Steps correctly", () => {
6
+ const { asFragment } = render(_jsxs(Steps, { children: [_jsx(Step, { id: "id1", href: "/etape1", onClick: vi.fn(), number: "1", mode: "link", title: "Previous step" }), _jsx(StepBase, { id: "idf4", title: "Un titre", children: _jsxs("a", { className: "af-steps-list-step__label", href: "/#", onClick: vi.fn(), children: [_jsx("span", { className: "af-steps-list-step__number", children: _jsx("i", { className: "glyphicon glyphicon-ok" }) }), _jsx("span", { className: "af-steps-list-step__title", children: "Custom" })] }) }), _jsx(Step, { id: "id5", number: "5", title: "Final step", mode: "disabled" })] }));
7
+ expect(asFragment()).toMatchSnapshot();
8
+ });
9
+ });
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-slash-css/dist/Steps/Steps.scss";
2
+ export { Step } from "./Step";
3
+ export { StepBase } from "./StepBase";
4
+ export { Steps } from "./Steps";
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-slash-css/dist/Steps/Steps.scss";
2
+ export { Step } from "./Step";
3
+ export { StepBase } from "./StepBase";
4
+ export { Steps } from "./Steps";
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import "./Svg.stories.css";
3
+ import { Svg } from "./index";
4
+ declare const meta: Meta;
5
+ export default meta;
6
+ export declare const Default: StoryObj<typeof Svg>;
7
+ export declare const Headphones: StoryObj<typeof Svg>;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import headphonesIcons from "@material-symbols/svg-400/outlined/headphones.svg";
3
+ import homeIcons from "@material-symbols/svg-400/outlined/home.svg";
4
+ import saveIcons from "@material-symbols/svg-400/outlined/save.svg";
5
+ import closeIcons from "@material-symbols/svg-400/outlined/close.svg";
6
+ import "./Svg.stories.css";
7
+ import { Svg } from "./index";
8
+ const meta = {
9
+ title: "Agent/Components/Svg",
10
+ component: Svg,
11
+ };
12
+ export default meta;
13
+ const MODIFIERS = {
14
+ "/public/headphones.svg": headphonesIcons,
15
+ "/public/home.svg": homeIcons,
16
+ "/public/save.svg": saveIcons,
17
+ "/public/close.svg": closeIcons,
18
+ "simulate svg error": "foo",
19
+ };
20
+ export const Default = {
21
+ name: "Svg",
22
+ render: ({ src, ...args }) => _jsx(Svg, { src: MODIFIERS[src], ...args }),
23
+ args: {
24
+ src: "/public/headphones.svg",
25
+ fill: "#00008f",
26
+ alt: "error",
27
+ },
28
+ argTypes: {
29
+ src: {
30
+ options: Object.keys(MODIFIERS),
31
+ control: { type: "select" },
32
+ },
33
+ },
34
+ };
35
+ export const Headphones = {
36
+ name: "Svg Headphones",
37
+ render: () => _jsx(Svg, { src: headphonesIcons, fill: "#00008f" }),
38
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import "./Svg.stories.css";
3
+ import { Svg } from "./index";
4
+ declare const meta: Meta;
5
+ export default meta;
6
+ export declare const Default: StoryObj<typeof Svg>;
7
+ export declare const Headphones: StoryObj<typeof Svg>;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import headphonesIcons from "@material-symbols/svg-400/outlined/headphones.svg";
3
+ import homeIcons from "@material-symbols/svg-400/outlined/home.svg";
4
+ import saveIcons from "@material-symbols/svg-400/outlined/save.svg";
5
+ import closeIcons from "@material-symbols/svg-400/outlined/close.svg";
6
+ import "./Svg.stories.css";
7
+ import { Svg } from "./index";
8
+ const meta = {
9
+ title: "Client/Components/Svg",
10
+ component: Svg,
11
+ };
12
+ export default meta;
13
+ const MODIFIERS = {
14
+ "/public/headphones.svg": headphonesIcons,
15
+ "/public/home.svg": homeIcons,
16
+ "/public/save.svg": saveIcons,
17
+ "/public/close.svg": closeIcons,
18
+ "simulate svg error": "foo",
19
+ };
20
+ export const Default = {
21
+ name: "Svg",
22
+ render: ({ src, ...args }) => _jsx(Svg, { src: MODIFIERS[src], ...args }),
23
+ args: {
24
+ src: "/public/headphones.svg",
25
+ fill: "#00008f",
26
+ alt: "error",
27
+ },
28
+ argTypes: {
29
+ src: {
30
+ options: Object.keys(MODIFIERS),
31
+ control: { type: "select" },
32
+ },
33
+ },
34
+ };
35
+ export const Headphones = {
36
+ name: "Svg Headphones",
37
+ render: () => _jsx(Svg, { src: headphonesIcons, fill: "#00008f" }),
38
+ };
@@ -0,0 +1,7 @@
1
+ import { type SVGAttributes } from "react";
2
+ type SvgProps = SVGAttributes<SVGSVGElement> & {
3
+ src: string;
4
+ alt?: string;
5
+ };
6
+ export declare const Svg: ({ src, alt, width, height, ...props }: SvgProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useLayoutEffect, useRef, useState, } from "react";
3
+ import { svgInjector } from "./svgInjector";
4
+ const cloneAttributes = (from, to) => {
5
+ const attributes = from.getAttributeNames();
6
+ attributes.forEach((attribute) => {
7
+ to.setAttribute(attribute, from.getAttribute(attribute));
8
+ });
9
+ };
10
+ export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
11
+ const rootRef = useRef(null);
12
+ const [hasError, setHasError] = useState(false);
13
+ useLayoutEffect(() => {
14
+ if (hasError) {
15
+ setHasError(false);
16
+ }
17
+ }, [src]);
18
+ useLayoutEffect(() => {
19
+ if (hasError) {
20
+ return;
21
+ }
22
+ const root = rootRef.current;
23
+ if (root) {
24
+ const parent = document.createElement("div");
25
+ const svg = document.createElement("svg");
26
+ parent.appendChild(svg);
27
+ cloneAttributes(root, svg);
28
+ svg.setAttribute("width", width.toString());
29
+ svg.setAttribute("height", height.toString());
30
+ svgInjector(svg, {
31
+ afterEach: (error, svgInject) => {
32
+ if (error) {
33
+ setHasError(true);
34
+ }
35
+ if (svgInject) {
36
+ root.innerHTML = svgInject.innerHTML;
37
+ cloneAttributes(svgInject, root);
38
+ }
39
+ },
40
+ });
41
+ }
42
+ }, [src, width, height, hasError]);
43
+ if (hasError) {
44
+ return alt ? (_jsx("span", { ...props, children: alt })) : null;
45
+ }
46
+ return _jsx("svg", { ref: rootRef, "data-src": src, ...props });
47
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render, screen } from "@testing-library/react";
3
+ import { axe } from "jest-axe";
4
+ import { Svg } from "../Svg";
5
+ const mocks = vi.hoisted(() => {
6
+ return {
7
+ SVGInjector: vi.fn(),
8
+ };
9
+ });
10
+ vi.mock("@tanem/svg-injector", () => mocks);
11
+ describe("<Svg />", () => {
12
+ describe("render", () => {
13
+ it("renders correctly", () => {
14
+ mocks.SVGInjector.mockImplementationOnce((el, { afterEach }) => {
15
+ afterEach(undefined, el);
16
+ });
17
+ const svgSrc = "svgSrc";
18
+ render(_jsx(Svg, { src: "svgSrc", alt: "foo", "aria-label": "test" }));
19
+ const svg = screen.getByLabelText("test");
20
+ expect(svg).toBeInTheDocument();
21
+ expect(svg).toHaveAttribute("data-src", svgSrc);
22
+ });
23
+ it("renders fallback when src not found", async () => {
24
+ mocks.SVGInjector.mockImplementationOnce((_, { afterEach }) => {
25
+ afterEach("error");
26
+ });
27
+ render(_jsx(Svg, { src: "fake", alt: "foo", "aria-label": "test" }));
28
+ const svg = screen.getByText("foo");
29
+ expect(svg).toBeInTheDocument();
30
+ });
31
+ });
32
+ describe("A11Y", () => {
33
+ it("shouldn't have an accessibility violation <Svg />", async () => {
34
+ const { container } = render(_jsx(Svg, { src: "svgSrc", alt: "foo" }));
35
+ expect(await axe(container)).toHaveNoViolations();
36
+ });
37
+ });
38
+ });
@@ -0,0 +1 @@
1
+ export { Svg } from "./Svg";
@@ -0,0 +1 @@
1
+ export { Svg } from "./Svg";
@@ -0,0 +1,12 @@
1
+ import { type AfterAll, type BeforeEach, type Errback, type EvalScripts } from "@tanem/svg-injector";
2
+ type Options = {
3
+ afterAll?: AfterAll;
4
+ afterEach?: Errback;
5
+ beforeEach?: BeforeEach;
6
+ cacheRequests?: boolean;
7
+ evalScripts?: EvalScripts;
8
+ httpRequestWithCredentials?: boolean;
9
+ renumerateIRIElements?: boolean;
10
+ };
11
+ export declare const svgInjector: (element: HTMLElement | SVGSVGElement | null, { beforeEach, ...options }?: Options) => void;
12
+ export {};
@@ -0,0 +1,28 @@
1
+ import { SVGInjector, } from "@tanem/svg-injector";
2
+ import DOMPurify from "dompurify";
3
+ const attributesToRestore = ["fill", "stroke"];
4
+ const restoreAttributes = (element, svg) => {
5
+ const attributes = {};
6
+ element?.getAttributeNames().forEach((attribute) => {
7
+ if (attribute.startsWith("aria-") ||
8
+ attributesToRestore.includes(attribute)) {
9
+ attributes[attribute] = element.getAttribute(attribute);
10
+ }
11
+ });
12
+ Object.keys(attributes).forEach((attribute) => {
13
+ svg.setAttribute(attribute, attributes[attribute]);
14
+ });
15
+ };
16
+ export const svgInjector = (element, { beforeEach = () => { }, ...options } = {}) => {
17
+ SVGInjector(element, {
18
+ ...options,
19
+ beforeEach: (svg) => {
20
+ DOMPurify.sanitize(svg, {
21
+ USE_PROFILES: { svg: true, svgFilters: true },
22
+ IN_PLACE: true,
23
+ });
24
+ restoreAttributes(element, svg);
25
+ beforeEach(svg);
26
+ },
27
+ });
28
+ };
@@ -0,0 +1,14 @@
1
+ export type Props = {
2
+ id?: string;
3
+ className?: string;
4
+ classModifier?: string;
5
+ displayLabel?: string;
6
+ elementsLabel?: string;
7
+ items?: number[];
8
+ numberItems?: number;
9
+ onChange: (e: {
10
+ value: number;
11
+ }) => void;
12
+ };
13
+ declare const Items: ({ className, classModifier, onChange, displayLabel, elementsLabel, id, items, numberItems, }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ export { Items };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from "react";
3
+ import { getComponentClassName } from "../../Form/core";
4
+ const Items = ({ className, classModifier, onChange, displayLabel = "Afficher", elementsLabel = "éléments", id, items = [5, 10, 25, 50, 100], numberItems = 10, }) => {
5
+ const defaultIdName = useId();
6
+ const newId = id ?? defaultIdName;
7
+ const componentClassName = getComponentClassName(className, classModifier, "af-paging__form");
8
+ return (_jsx("div", { className: "af-paging__limit", children: _jsx("form", { className: componentClassName, children: _jsxs("div", { className: "af-form__group", children: [_jsx("div", { className: "col col-sm-2 col-md-2 col-lg-2 col-xl-2", children: _jsx("label", { className: "af-form__group-label", htmlFor: newId, children: displayLabel }) }), _jsx("div", { className: "col col-sm-10 col-md-10 col-lg-10 col-xl-10", children: _jsxs("div", { className: "af-form__select", children: [_jsxs("div", { className: "af-form__select-container", children: [_jsx("select", { id: newId, className: "af-form__input-select", value: numberItems, onChange: (e) => {
9
+ e.preventDefault();
10
+ onChange({ value: Number(e.target.value) });
11
+ }, children: items.map((item) => (_jsx("option", { value: item, children: item }, item))) }), _jsx("span", { className: "glyphicon glyphicon-menu-down" })] }), _jsx("span", { className: "af-form__input-cmplt", children: elementsLabel })] }) })] }) }) }));
12
+ };
13
+ export { Items };
@@ -0,0 +1,10 @@
1
+ type LiProps = {
2
+ isVisible?: boolean;
3
+ active?: boolean;
4
+ value: number;
5
+ onChange: (e: {
6
+ value: number;
7
+ }) => void;
8
+ };
9
+ declare const Li: ({ isVisible, active, value, ...props }: LiProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export { Li };
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ const onClick = ({ onChange, value }) => (event) => {
4
+ event.preventDefault();
5
+ onChange({
6
+ value: Number(value),
7
+ });
8
+ };
9
+ const Li = ({ isVisible, active, value, ...props }) => {
10
+ if (!isVisible) {
11
+ return null;
12
+ }
13
+ return (_jsx("li", { className: classNames("af-pager__item", {
14
+ "af-pager__item--active": active,
15
+ }), children: _jsx("a", { className: "af-pager__item-link", href: "/#", onClick: onClick({ ...props, value }), children: _jsx("span", { children: value }) }) }));
16
+ };
17
+ export { Li };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from "react";
2
+ type LiPointProps = {
3
+ isVisible?: boolean;
4
+ children?: ReactNode;
5
+ };
6
+ declare const LiPoint: ({ isVisible, children }: LiPointProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export { LiPoint };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const LiPoint = ({ isVisible, children }) => {
3
+ if (!isVisible) {
4
+ return null;
5
+ }
6
+ return (_jsx("li", { className: "af-pager__item af-pager__item--disabled", children: _jsx("span", { className: "af-pager__item-link", children: children }) }));
7
+ };
8
+ export { LiPoint };