@design-system-rte/core 1.2.1 → 1.2.2-rc1

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 (398) hide show
  1. package/common/animation.d.ts +2 -0
  2. package/common/animation.d.ts.map +1 -0
  3. package/common/animation.js +5 -0
  4. package/common/index.d.ts +3 -0
  5. package/common/index.d.ts.map +1 -0
  6. package/common/index.js +2 -0
  7. package/components/assistive-text/assistive-text.constants.d.ts +4 -0
  8. package/components/assistive-text/assistive-text.constants.d.ts.map +1 -0
  9. package/components/assistive-text/assistive-text.constants.js +5 -0
  10. package/components/assistive-text/assistive-text.utils.d.ts +2 -0
  11. package/components/assistive-text/assistive-text.utils.d.ts.map +1 -0
  12. package/components/assistive-text/assistive-text.utils.js +9 -0
  13. package/components/assistive-text/index.d.ts +4 -0
  14. package/components/assistive-text/index.d.ts.map +1 -0
  15. package/components/assistive-text/index.js +2 -0
  16. package/components/badge/badge.utils.d.ts +26 -0
  17. package/components/badge/badge.utils.d.ts.map +1 -0
  18. package/components/badge/badge.utils.js +41 -0
  19. package/components/badge/index.d.ts +3 -0
  20. package/components/badge/index.d.ts.map +1 -0
  21. package/components/badge/index.js +1 -0
  22. package/components/banner/index.d.ts +2 -0
  23. package/components/banner/index.d.ts.map +1 -0
  24. package/components/banner/index.js +1 -0
  25. package/components/breadcrumbs/breadcrumbs.constants.d.ts +2 -0
  26. package/components/breadcrumbs/breadcrumbs.constants.d.ts.map +1 -0
  27. package/components/breadcrumbs/breadcrumbs.utils.d.ts +4 -0
  28. package/components/breadcrumbs/breadcrumbs.utils.d.ts.map +1 -0
  29. package/components/breadcrumbs/breadcrumbs.utils.js +17 -0
  30. package/components/breadcrumbs/index.d.ts +4 -0
  31. package/components/breadcrumbs/index.d.ts.map +1 -0
  32. package/components/breadcrumbs/index.js +2 -0
  33. package/components/button/button.interface.d.ts +3 -5
  34. package/components/button/common/common-button.constants.d.ts +5 -0
  35. package/components/button/common/common-button.constants.d.ts.map +1 -0
  36. package/components/button/common/common-button.constants.js +10 -0
  37. package/components/button/index.d.ts +5 -0
  38. package/components/button/index.d.ts.map +1 -0
  39. package/components/button/index.js +2 -0
  40. package/components/card/card.constats.d.ts +3 -0
  41. package/components/card/card.constats.d.ts.map +1 -0
  42. package/components/card/card.constats.js +7 -0
  43. package/components/card/card.stories.shared.d.ts +52 -0
  44. package/components/card/card.stories.shared.d.ts.map +1 -0
  45. package/components/card/card.stories.shared.js +54 -0
  46. package/components/card/index.d.ts +4 -0
  47. package/components/card/index.d.ts.map +1 -0
  48. package/components/card/index.js +2 -0
  49. package/components/checkbox/index.d.ts +2 -0
  50. package/components/checkbox/index.d.ts.map +1 -0
  51. package/components/checkbox/index.js +1 -0
  52. package/components/checkbox-group/index.d.ts +2 -0
  53. package/components/checkbox-group/index.d.ts.map +1 -0
  54. package/components/checkbox-group/index.js +1 -0
  55. package/components/chip/chip.constants.d.ts +6 -0
  56. package/components/chip/chip.constants.d.ts.map +1 -0
  57. package/components/chip/chip.constants.js +5 -0
  58. package/components/chip/index.d.ts +3 -0
  59. package/components/chip/index.d.ts.map +1 -0
  60. package/components/chip/index.js +1 -0
  61. package/components/common/{common-types.ts → common-types.d.ts} +1 -0
  62. package/components/common/common-types.d.ts.map +1 -0
  63. package/components/common/common-types.js +1 -0
  64. package/components/divider/index.d.ts +2 -0
  65. package/components/divider/index.d.ts.map +1 -0
  66. package/components/divider/index.js +1 -0
  67. package/components/dropdown/DropdownManager.d.ts +13 -0
  68. package/components/dropdown/DropdownManager.d.ts.map +1 -0
  69. package/components/dropdown/DropdownManager.js +50 -0
  70. package/components/dropdown/dropdown.constants.d.ts +2 -0
  71. package/components/dropdown/dropdown.constants.d.ts.map +1 -0
  72. package/components/dropdown/dropdown.interface.d.ts +0 -1
  73. package/components/dropdown/index.d.ts +4 -0
  74. package/components/dropdown/index.d.ts.map +1 -0
  75. package/components/dropdown/index.js +2 -0
  76. package/components/grid/index.d.ts +2 -0
  77. package/components/grid/index.d.ts.map +1 -0
  78. package/components/grid/index.js +1 -0
  79. package/components/icon/icon-utils.d.ts +2 -0
  80. package/components/icon/icon-utils.d.ts.map +1 -0
  81. package/components/icon/icon-utils.js +3 -0
  82. package/components/icon/icon.constants.d.ts +4 -0
  83. package/components/icon/icon.constants.d.ts.map +1 -0
  84. package/components/icon/icon.constants.js +13 -0
  85. package/components/icon/index.d.ts +4 -0
  86. package/components/icon/index.d.ts.map +1 -0
  87. package/components/icon/index.js +2 -0
  88. package/components/link/index.d.ts +2 -0
  89. package/components/link/index.d.ts.map +1 -0
  90. package/components/link/index.js +1 -0
  91. package/components/loader/index.d.ts +3 -0
  92. package/components/loader/index.d.ts.map +1 -0
  93. package/components/loader/index.js +1 -0
  94. package/components/loader/loader.constants.d.ts +3 -0
  95. package/components/loader/loader.constants.d.ts.map +1 -0
  96. package/components/loader/loader.constants.js +5 -0
  97. package/components/modal/index.d.ts +2 -0
  98. package/components/modal/index.d.ts.map +1 -0
  99. package/components/modal/index.js +1 -0
  100. package/components/popover/index.d.ts +3 -0
  101. package/components/popover/index.d.ts.map +1 -0
  102. package/components/popover/index.js +1 -0
  103. package/components/popover/popover.constants.d.ts +3 -0
  104. package/components/popover/popover.constants.d.ts.map +1 -0
  105. package/components/radio-button/index.d.ts +3 -0
  106. package/components/radio-button/index.d.ts.map +1 -0
  107. package/components/radio-button/index.js +1 -0
  108. package/components/radio-button/radio-button.constants.d.ts +2 -0
  109. package/components/radio-button/radio-button.constants.d.ts.map +1 -0
  110. package/components/radio-button-group/index.d.ts +2 -0
  111. package/components/radio-button-group/index.d.ts.map +1 -0
  112. package/components/radio-button-group/index.js +1 -0
  113. package/components/required-indicator/index.d.ts +3 -0
  114. package/components/required-indicator/index.d.ts.map +1 -0
  115. package/components/required-indicator/index.js +2 -0
  116. package/components/required-indicator/required-indicator.constant.d.ts +3 -0
  117. package/components/required-indicator/required-indicator.constant.d.ts.map +1 -0
  118. package/components/required-indicator/required-indicator.constant.js +5 -0
  119. package/components/required-indicator/{required-indicator.interface.ts → required-indicator.interface.d.ts} +3 -3
  120. package/components/required-indicator/required-indicator.interface.d.ts.map +1 -0
  121. package/components/required-indicator/required-indicator.interface.js +1 -0
  122. package/components/searchbar/index.d.ts +3 -0
  123. package/components/searchbar/index.d.ts.map +1 -0
  124. package/components/searchbar/index.js +1 -0
  125. package/components/searchbar/searchbar.constants.d.ts +11 -0
  126. package/components/searchbar/searchbar.constants.d.ts.map +1 -0
  127. package/components/searchbar/searchbar.constants.js +15 -0
  128. package/components/segmented-control/index.d.ts +3 -0
  129. package/components/segmented-control/index.d.ts.map +1 -0
  130. package/components/segmented-control/index.js +1 -0
  131. package/components/segmented-control/segmented-control-utils.d.ts +8 -0
  132. package/components/segmented-control/segmented-control-utils.d.ts.map +1 -0
  133. package/components/segmented-control/segmented-control-utils.js +53 -0
  134. package/components/select/index.d.ts +3 -0
  135. package/components/select/index.d.ts.map +1 -0
  136. package/components/select/index.js +1 -0
  137. package/components/select/select.constants.d.ts +4 -0
  138. package/components/select/select.constants.d.ts.map +1 -0
  139. package/components/side-nav/index.d.ts +6 -0
  140. package/components/side-nav/index.d.ts.map +1 -0
  141. package/components/side-nav/index.js +2 -0
  142. package/components/side-nav/nav-item/nav-item.utils.d.ts +2 -0
  143. package/components/side-nav/nav-item/nav-item.utils.d.ts.map +1 -0
  144. package/components/side-nav/nav-item/{nav-item.utils.ts → nav-item.utils.js} +5 -6
  145. package/components/side-nav/side-nav.constants.d.ts +6 -0
  146. package/components/side-nav/side-nav.constants.d.ts.map +1 -0
  147. package/components/side-nav/side-nav.constants.js +10 -0
  148. package/components/split-button/index.d.ts +3 -0
  149. package/components/split-button/index.d.ts.map +1 -0
  150. package/components/split-button/index.js +1 -0
  151. package/components/split-button/split-button.constants.d.ts +4 -0
  152. package/components/split-button/split-button.constants.d.ts.map +1 -0
  153. package/components/split-button/split-button.constants.js +10 -0
  154. package/components/split-button/split-button.interface.d.ts +0 -3
  155. package/components/switch/index.d.ts +3 -0
  156. package/components/switch/index.d.ts.map +1 -0
  157. package/components/switch/index.js +1 -0
  158. package/components/switch/switch.constants.d.ts +3 -0
  159. package/components/switch/switch.constants.d.ts.map +1 -0
  160. package/components/switch/switch.interface.d.ts +0 -1
  161. package/components/tab/index.d.ts +3 -0
  162. package/components/tab/index.d.ts.map +1 -0
  163. package/components/tab/index.js +1 -0
  164. package/components/tab/tab.interface.d.ts +1 -3
  165. package/components/tab/tab.utils.d.ts +2 -0
  166. package/components/tab/tab.utils.d.ts.map +1 -0
  167. package/components/tab/tab.utils.js +54 -0
  168. package/components/tag/index.d.ts +2 -0
  169. package/components/tag/index.d.ts.map +1 -0
  170. package/components/tag/index.js +1 -0
  171. package/components/text-input/index.d.ts +2 -0
  172. package/components/text-input/index.d.ts.map +1 -0
  173. package/components/text-input/index.js +1 -0
  174. package/components/textarea/index.d.ts +3 -0
  175. package/components/textarea/index.d.ts.map +1 -0
  176. package/components/textarea/index.js +1 -0
  177. package/components/textarea/textarea.constants.d.ts +2 -0
  178. package/components/textarea/textarea.constants.d.ts.map +1 -0
  179. package/components/toast/index.d.ts +4 -0
  180. package/components/toast/index.d.ts.map +1 -0
  181. package/components/toast/index.js +2 -0
  182. package/components/toast/toast.constants.d.ts +6 -0
  183. package/components/toast/toast.constants.d.ts.map +1 -0
  184. package/components/toast/{toast.constants.ts → toast.constants.js} +3 -4
  185. package/components/toast/toast.utils.d.ts +5 -0
  186. package/components/toast/toast.utils.d.ts.map +1 -0
  187. package/components/toast/toast.utils.js +31 -0
  188. package/components/tooltip/index.d.ts +4 -0
  189. package/components/tooltip/index.d.ts.map +1 -0
  190. package/components/tooltip/index.js +2 -0
  191. package/components/tooltip/tooltip.constants.d.ts +5 -0
  192. package/components/tooltip/tooltip.constants.d.ts.map +1 -0
  193. package/components/tooltip/tooltip.utils.d.ts +2 -0
  194. package/components/tooltip/tooltip.utils.d.ts.map +1 -0
  195. package/components/tooltip/tooltip.utils.js +4 -0
  196. package/components/utils/auto-placement.d.ts +9 -0
  197. package/components/utils/auto-placement.d.ts.map +1 -0
  198. package/components/utils/auto-placement.js +167 -0
  199. package/components/utils/index.d.ts +2 -0
  200. package/components/utils/index.d.ts.map +1 -0
  201. package/components/utils/index.js +1 -0
  202. package/constants/dom/dom.constants.d.ts +4 -0
  203. package/constants/dom/dom.constants.d.ts.map +1 -0
  204. package/constants/dom/dom.constants.js +13 -0
  205. package/constants/dom/index.d.ts +2 -0
  206. package/constants/dom/index.d.ts.map +1 -0
  207. package/constants/dom/index.js +1 -0
  208. package/constants/keyboard/index.d.ts +3 -0
  209. package/constants/keyboard/index.d.ts.map +1 -0
  210. package/constants/keyboard/index.js +2 -0
  211. package/constants/keyboard/keyboard-test.constants.d.ts +10 -0
  212. package/constants/keyboard/keyboard-test.constants.d.ts.map +1 -0
  213. package/constants/keyboard/{keyboard-test.constants.ts → keyboard-test.constants.js} +1 -12
  214. package/constants/keyboard/keyboard.constants.d.ts +11 -0
  215. package/constants/keyboard/keyboard.constants.d.ts.map +1 -0
  216. package/index.d.ts +42 -0
  217. package/index.js +41 -0
  218. package/package.json +25 -16
  219. package/CHANGELOG.md +0 -320
  220. package/common/animation.ts +0 -5
  221. package/common/common-types.ts +0 -4
  222. package/components/assistive-text/assistive-text.constants.ts +0 -8
  223. package/components/assistive-text/assistive-text.utils.ts +0 -8
  224. package/components/badge/badge.utils.ts +0 -75
  225. package/components/badge/docs/AccessibilityTable.tsx +0 -113
  226. package/components/badge/docs/Badge.mdx +0 -127
  227. package/components/badge/docs/Behaviors.scss +0 -12
  228. package/components/badge/docs/Behaviors.tsx +0 -110
  229. package/components/badge/docs/Options.tsx +0 -90
  230. package/components/badge/docs/Usage.tsx +0 -30
  231. package/components/badge/docs/assets/doNot.svg +0 -397
  232. package/components/badge/stories/img/Accessibility.png +0 -0
  233. package/components/badge/stories/img/BadgeTypes.svg +0 -72
  234. package/components/badge/stories/img/Layout.svg +0 -86
  235. package/components/badge/stories/img/OtherComponent.svg +0 -34
  236. package/components/badge/stories/img/StructureComposant.svg +0 -40
  237. package/components/badge/stories/img/TableOfOptions.svg +0 -200
  238. package/components/badge/stories/img/Taille.svg +0 -79
  239. package/components/badge/stories/img/TextOptions.svg +0 -34
  240. package/components/breadcrumbs/breadcrumbs.utils.ts +0 -24
  241. package/components/breadcrumbs/docs/AccessibilityTable.tsx +0 -96
  242. package/components/breadcrumbs/docs/Behaviors.tsx +0 -129
  243. package/components/breadcrumbs/docs/Breadcrumbs.mdx +0 -104
  244. package/components/breadcrumbs/docs/Options.scss +0 -26
  245. package/components/breadcrumbs/docs/Options.tsx +0 -59
  246. package/components/breadcrumbs/docs/TabOfOptions.tsx +0 -19
  247. package/components/breadcrumbs/docs/Usage.scss +0 -7
  248. package/components/breadcrumbs/docs/Usage.tsx +0 -28
  249. package/components/breadcrumbs/docs/assets/doNot.svg +0 -127
  250. package/components/button/common/common-button.constants.ts +0 -15
  251. package/components/card/card.constats.ts +0 -9
  252. package/components/card/card.stories.shared.ts +0 -112
  253. package/components/chip/chip.constants.ts +0 -5
  254. package/components/chip/stories/img/ChipsAccessibility.png +0 -0
  255. package/components/chip/stories/img/ChipsInteractionsStates.svg +0 -46
  256. package/components/chip/stories/img/ChipsKeyboardInteractions.svg +0 -76
  257. package/components/chip/stories/img/ChipsLayout.svg +0 -86
  258. package/components/chip/stories/img/ChipsStructure.svg +0 -24
  259. package/components/chip/stories/img/ChipsTableOfOptions.svg +0 -146
  260. package/components/chip/stories/img/ChipsTaille.svg +0 -36
  261. package/components/chip/stories/img/ChipsTypes.svg +0 -50
  262. package/components/divider/stories/img/DividerAccessibility.png +0 -0
  263. package/components/divider/stories/img/DividerBehaviors.svg +0 -36
  264. package/components/divider/stories/img/DividerOrientation.svg +0 -34
  265. package/components/divider/stories/img/DividerStructure.png +0 -0
  266. package/components/divider/stories/img/DividerTableOfOptions.svg +0 -74
  267. package/components/divider/stories/img/DividerThickness.svg +0 -38
  268. package/components/dropdown/DropdownManager.ts +0 -59
  269. package/components/grid/grid.scss +0 -81
  270. package/components/grid/grid.stories.scss +0 -23
  271. package/components/icon/icon-utils.ts +0 -3
  272. package/components/icon/icon.constants.ts +0 -16
  273. package/components/loader/loader.constants.ts +0 -7
  274. package/components/loader/stories/img/LoaderAccessibility.png +0 -0
  275. package/components/loader/stories/img/LoaderAppearance.svg +0 -36
  276. package/components/loader/stories/img/LoaderBooleanOptions.svg +0 -26
  277. package/components/loader/stories/img/LoaderInteractions.svg +0 -36
  278. package/components/loader/stories/img/LoaderKeyboardInteractions.svg +0 -26
  279. package/components/loader/stories/img/LoaderLayout.svg +0 -56
  280. package/components/loader/stories/img/LoaderPosition.svg +0 -36
  281. package/components/loader/stories/img/LoaderSafezone.svg +0 -36
  282. package/components/loader/stories/img/LoaderStructure.svg +0 -21
  283. package/components/loader/stories/img/LoaderTableOfOptions.svg +0 -134
  284. package/components/loader/stories/img/LoaderTaille.svg +0 -46
  285. package/components/loader/stories/img/LoaderTextOptions.svg +0 -26
  286. package/components/required-indicator/required-indicator.constant.ts +0 -7
  287. package/components/searchbar/docs/AccessibilityTable.tsx +0 -119
  288. package/components/searchbar/docs/Behaviors.tsx +0 -130
  289. package/components/searchbar/docs/Options.tsx +0 -127
  290. package/components/searchbar/docs/Searchbar.mdx +0 -124
  291. package/components/searchbar/docs/Usage.tsx +0 -37
  292. package/components/searchbar/docs/assets/doNot.svg +0 -212
  293. package/components/searchbar/searchbar.constants.ts +0 -18
  294. package/components/segmented-control/segmented-control-utils.ts +0 -77
  295. package/components/segmented-control/stories/img/SegControlAccessibility.png +0 -0
  296. package/components/segmented-control/stories/img/SegControlAnimations.svg +0 -11
  297. package/components/segmented-control/stories/img/SegControlAutreHTMLNatif.svg +0 -36
  298. package/components/segmented-control/stories/img/SegControlBooleanOptions.svg +0 -26
  299. package/components/segmented-control/stories/img/SegControlContent.svg +0 -34
  300. package/components/segmented-control/stories/img/SegControlDoDont.svg +0 -141
  301. package/components/segmented-control/stories/img/SegControlFocus.svg +0 -20
  302. package/components/segmented-control/stories/img/SegControlIconOptions.svg +0 -42
  303. package/components/segmented-control/stories/img/SegControlInteractionState.svg +0 -40
  304. package/components/segmented-control/stories/img/SegControlKeyboardInteractions.svg +0 -56
  305. package/components/segmented-control/stories/img/SegControlLayout.svg +0 -36
  306. package/components/segmented-control/stories/img/SegControlNestedProperties.svg +0 -154
  307. package/components/segmented-control/stories/img/SegControlSegments.svg +0 -33
  308. package/components/segmented-control/stories/img/SegControlStructure.svg +0 -27
  309. package/components/segmented-control/stories/img/SegControlTableOfOptions.svg +0 -54
  310. package/components/segmented-control/stories/img/SegControlTextOptions.svg +0 -26
  311. package/components/select/docs/AccessibilityTable.tsx +0 -121
  312. package/components/select/docs/Behaviors.tsx +0 -155
  313. package/components/select/docs/Options.scss +0 -26
  314. package/components/select/docs/Options.tsx +0 -148
  315. package/components/select/docs/OverviewOptions.scss +0 -14
  316. package/components/select/docs/OverviewOptions.tsx +0 -67
  317. package/components/select/docs/Select.mdx +0 -132
  318. package/components/select/docs/Usage.scss +0 -7
  319. package/components/select/docs/Usage.tsx +0 -39
  320. package/components/select/docs/assets/doNot.svg +0 -394
  321. package/components/side-nav/side-nav.constants.ts +0 -16
  322. package/components/split-button/split-button.constants.ts +0 -13
  323. package/components/switch/stories/img/SwitchAccessibility.png +0 -0
  324. package/components/switch/stories/img/SwitchAnimations.svg +0 -20
  325. package/components/switch/stories/img/SwitchAppearance.svg +0 -34
  326. package/components/switch/stories/img/SwitchAutonomousLabel.svg +0 -27
  327. package/components/switch/stories/img/SwitchAutreContextuel.svg +0 -36
  328. package/components/switch/stories/img/SwitchBooleanOptions.svg +0 -46
  329. package/components/switch/stories/img/SwitchDistinctCheckbox.svg +0 -41
  330. package/components/switch/stories/img/SwitchFocus.svg +0 -46
  331. package/components/switch/stories/img/SwitchInteractionState.svg +0 -60
  332. package/components/switch/stories/img/SwitchKeyboardInteractions.svg +0 -46
  333. package/components/switch/stories/img/SwitchLayout.svg +0 -46
  334. package/components/switch/stories/img/SwitchStructure.svg +0 -22
  335. package/components/switch/stories/img/SwitchTableOfOptions.svg +0 -165
  336. package/components/switch/stories/img/SwitchTextOptions.svg +0 -34
  337. package/components/tab/tab.utils.ts +0 -60
  338. package/components/tag/stories/img/TagAccessibility.png +0 -0
  339. package/components/tag/stories/img/TagLayout.svg +0 -86
  340. package/components/tag/stories/img/TagStatus.svg +0 -52
  341. package/components/tag/stories/img/TagStructure.svg +0 -19
  342. package/components/tag/stories/img/TagTableOfOptions.svg +0 -178
  343. package/components/tag/stories/img/TagTaille.svg +0 -36
  344. package/components/tag/stories/img/TagTypes.svg +0 -38
  345. package/components/text-input/stories/img/TextInputAccessibility.png +0 -0
  346. package/components/text-input/stories/img/TextInputBooleanOptions.svg +0 -76
  347. package/components/text-input/stories/img/TextInputDoDont.svg +0 -100
  348. package/components/text-input/stories/img/TextInputKeyboardInteractions.svg +0 -46
  349. package/components/text-input/stories/img/TextInputLabelPosition.svg +0 -40
  350. package/components/text-input/stories/img/TextInputLayout.svg +0 -46
  351. package/components/text-input/stories/img/TextInputPosition.svg +0 -80
  352. package/components/text-input/stories/img/TextInputPrecisions.png +0 -0
  353. package/components/text-input/stories/img/TextInputRequiredIndicator.svg +0 -44
  354. package/components/text-input/stories/img/TextInputStructure.svg +0 -33
  355. package/components/text-input/stories/img/TextInputTableOfOptions.svg +0 -346
  356. package/components/text-input/stories/img/TextInputTextOptions.svg +0 -63
  357. package/components/textarea/stories/img/TextAreaAccessibility.png +0 -0
  358. package/components/textarea/stories/img/TextAreaBooleanOption.svg +0 -70
  359. package/components/textarea/stories/img/TextAreaDoDont.svg +0 -119
  360. package/components/textarea/stories/img/TextAreaKeyboardInteractions.svg +0 -46
  361. package/components/textarea/stories/img/TextAreaLabelPosition.svg +0 -40
  362. package/components/textarea/stories/img/TextAreaLayout.svg +0 -57
  363. package/components/textarea/stories/img/TextAreaPosition.svg +0 -80
  364. package/components/textarea/stories/img/TextAreaPrecisions.png +0 -0
  365. package/components/textarea/stories/img/TextAreaRequiredIndicator.svg +0 -44
  366. package/components/textarea/stories/img/TextAreaStructure.svg +0 -39
  367. package/components/textarea/stories/img/TextAreaTableOfOptions.svg +0 -286
  368. package/components/textarea/stories/img/TextAreaTextOptions.svg +0 -69
  369. package/components/toast/toast.utils.ts +0 -33
  370. package/components/tooltip/tooltip.utils.ts +0 -5
  371. package/components/utils/auto-placement.ts +0 -220
  372. package/constants/dom/dom.constants.ts +0 -13
  373. package/css-font-generator.ts +0 -51
  374. package/eslint.config.js +0 -1
  375. package/scripts/design-tokens/common.ts +0 -35
  376. package/scripts/design-tokens/generator.ts +0 -24
  377. package/scripts/design-tokens/primitives-generator.spec.ts +0 -84
  378. package/scripts/design-tokens/primitives-generator.ts +0 -66
  379. package/scripts/design-tokens/sourceFiles/primitives.json +0 -2075
  380. package/scripts/design-tokens/sourceFiles/tokens.json +0 -10561
  381. package/scripts/design-tokens/tokens-generator.spec.ts +0 -184
  382. package/scripts/design-tokens/tokens-generator.ts +0 -155
  383. package/scripts/design-tokens/tokens-generators/colors.ts +0 -142
  384. package/scripts/design-tokens/tokens-generators/layout.ts +0 -22
  385. package/scripts/design-tokens/tokens-generators/opacity.ts +0 -14
  386. package/scripts/design-tokens/tokens-generators/shadows.ts +0 -18
  387. package/scripts/design-tokens/tokens-generators/typography.ts +0 -58
  388. package/scripts/design-tokens/tokens-generators/zIndex.ts +0 -18
  389. package/tsconfig.json +0 -12
  390. /package/components/breadcrumbs/{breadcrumbs.constants.ts → breadcrumbs.constants.js} +0 -0
  391. /package/components/dropdown/{dropdown.constants.ts → dropdown.constants.js} +0 -0
  392. /package/components/popover/{popover.constants.ts → popover.constants.js} +0 -0
  393. /package/components/radio-button/{radio-button.constants.ts → radio-button.constants.js} +0 -0
  394. /package/components/select/{select.constants.ts → select.constants.js} +0 -0
  395. /package/components/switch/{switch.constants.ts → switch.constants.js} +0 -0
  396. /package/components/textarea/{textarea.constants.ts → textarea.constants.js} +0 -0
  397. /package/components/tooltip/{tooltip.constants.ts → tooltip.constants.js} +0 -0
  398. /package/constants/keyboard/{keyboard.constants.ts → keyboard.constants.js} +0 -0
@@ -1,33 +0,0 @@
1
- export const getToastPriority = (toast: {
2
- hasActionButton: boolean;
3
- type: "info" | "success" | "warning" | "error" | "neutral";
4
- }) => {
5
- const { hasActionButton: hasButtonAction, type } = toast;
6
- if (hasButtonAction) {
7
- switch (type) {
8
- case "error":
9
- return 1;
10
- case "warning":
11
- return 3;
12
- case "success":
13
- return 5;
14
- case "info":
15
- return 6;
16
- default:
17
- return 7;
18
- }
19
- } else {
20
- switch (type) {
21
- case "error":
22
- return 2;
23
- case "warning":
24
- return 4;
25
- case "success":
26
- return 8;
27
- case "info":
28
- return 9;
29
- default:
30
- return 10;
31
- }
32
- }
33
- };
@@ -1,5 +0,0 @@
1
- import { TOOLTIP_GAP, TOOLTIP_GAP_ARROW } from "@design-system-rte/core/components/tooltip/tooltip.constants";
2
-
3
- export function getTooltipGap(arrow: boolean, customGap: number = TOOLTIP_GAP): number {
4
- return arrow ? TOOLTIP_GAP_ARROW + customGap : customGap;
5
- }
@@ -1,220 +0,0 @@
1
- import { Alignment, Position } from "../common/common-types";
2
-
3
- export const getAutoPlacement = (
4
- hostElement: HTMLElement,
5
- castedElement: Element,
6
- defaultPosition: Exclude<Position, "auto">,
7
- offset: number = 0,
8
- hasParent: boolean = false,
9
- ): Exclude<Position, "auto"> => {
10
- let sides: Record<Exclude<Position, "auto">, boolean>;
11
- const triggerRect = hostElement.getBoundingClientRect();
12
- if (hasParent) {
13
- const triggerParent = hostElement.parentElement;
14
- if (!triggerParent) {
15
- return defaultPosition;
16
- }
17
-
18
- const maxWidth = parseInt(getComputedStyle(castedElement).getPropertyValue("max-width"));
19
- const maxHeight = parseInt(getComputedStyle(castedElement).getPropertyValue("max-height"));
20
- const parentRect = triggerParent.getBoundingClientRect();
21
- sides = {
22
- top: triggerRect.top - parentRect.top > maxHeight + offset,
23
- right: parentRect.right - triggerRect.right > maxWidth + offset,
24
- bottom: parentRect.bottom - triggerRect.bottom >= maxHeight + offset,
25
- left: triggerRect.left - parentRect.left > maxWidth + offset,
26
- } as const;
27
- } else {
28
- const elementRect = castedElement.getBoundingClientRect();
29
- sides = {
30
- top: elementRect.height + offset < triggerRect.top,
31
- right: elementRect.width + offset < window.innerWidth - triggerRect.right,
32
- bottom: elementRect.height + offset < window.innerHeight - triggerRect.bottom,
33
- left: elementRect.width + offset < triggerRect.left,
34
- } as const;
35
- }
36
-
37
- if (sides.top) return "top";
38
- if (sides.bottom) return "bottom";
39
- if (sides.left) return "left";
40
- if (sides.right) return "right";
41
-
42
- return defaultPosition;
43
- };
44
-
45
- export const getAutoPlacementDropdown = (
46
- hostElement: HTMLElement,
47
- castedElement: Element,
48
- defaultPosition: Exclude<Position, "auto">,
49
- offset: number = 0,
50
- hasDropdownParent: boolean = false,
51
- ): Exclude<Position, "auto"> => {
52
- const triggerRect = hostElement.getBoundingClientRect();
53
- const elementRect = castedElement.getBoundingClientRect();
54
- const sides = {
55
- top: elementRect.height + offset < triggerRect.top,
56
- right: elementRect.width + offset < window.innerWidth - triggerRect.right,
57
- bottom: elementRect.height + offset < window.innerHeight - triggerRect.bottom,
58
- left: elementRect.width + offset < triggerRect.left,
59
- } as const;
60
-
61
- if (hasDropdownParent) {
62
- return getAutoPlacementDropdownWithParent(sides, defaultPosition);
63
- }
64
-
65
- return getAutoPlacementDropdownWithoutParent(sides, defaultPosition);
66
- };
67
-
68
- const getAutoPlacementDropdownWithParent = (
69
- sides: Record<Exclude<Position, "auto">, boolean>,
70
- defaultPosition: Exclude<Position, "auto">,
71
- ) => {
72
- if (sides.right) return "right";
73
- if (sides.left) return "left";
74
- if (sides.bottom) return "bottom";
75
- if (sides.top) return "top";
76
-
77
- return defaultPosition;
78
- };
79
-
80
- const getAutoPlacementDropdownWithoutParent = (
81
- sides: Record<Exclude<Position, "auto">, boolean>,
82
- defaultPosition: Exclude<Position, "auto">,
83
- ) => {
84
- if (sides.bottom) return "bottom";
85
- if (sides.right) return "right";
86
- if (sides.left) return "left";
87
- if (sides.top) return "top";
88
-
89
- return defaultPosition;
90
- };
91
-
92
- export const getAutoAlignment = (
93
- hostElement: HTMLElement,
94
- castedElement: Element,
95
- position: Exclude<Position, "auto">,
96
- ) => {
97
- const defaultPosition = "center";
98
- const triggerParent = hostElement.parentElement;
99
- if (!triggerParent) {
100
- return defaultPosition;
101
- }
102
- const triggerRect = hostElement.getBoundingClientRect();
103
- const castedRect = castedElement.getBoundingClientRect();
104
-
105
- const alignments = {
106
- end:
107
- position === "top" || position === "bottom"
108
- ? triggerRect.right >= castedRect.width
109
- : window.innerHeight - triggerRect.bottom >= castedRect.height,
110
- start:
111
- position === "top" || position === "bottom"
112
- ? window.innerWidth - triggerRect.left >= castedRect.width
113
- : window.innerHeight - triggerRect.top >= castedRect.height,
114
- } as const;
115
- if (alignments.start) return "start";
116
- if (alignments.end) return "end";
117
- return defaultPosition;
118
- };
119
-
120
- export const getCoordinates = (
121
- position: Exclude<Position, "auto">,
122
- triggerElement: HTMLElement,
123
- castedElement: HTMLElement,
124
- offset: number = 0,
125
- alignment: Alignment = "center",
126
- ) => {
127
- const triggerElementRect = triggerElement.getBoundingClientRect();
128
- const castedElementRect = castedElement.getBoundingClientRect();
129
-
130
- if (position === "bottom") {
131
- return handleBottomPosition(triggerElementRect, castedElementRect, offset, alignment);
132
- } else if (position === "left") {
133
- return handleLeftPosition(triggerElementRect, castedElementRect, offset, alignment);
134
- } else if (position === "right") {
135
- return handleRightPosition(triggerElementRect, castedElementRect, offset, alignment);
136
- } else {
137
- return handleTopPosition(triggerElementRect, castedElementRect, offset, alignment);
138
- }
139
- };
140
-
141
- const handleBottomPosition = (
142
- triggerElementRect: DOMRect,
143
- castedElementRect: DOMRect,
144
- offset: number,
145
- alignment: Alignment,
146
- ) => {
147
- const top = triggerElementRect.bottom + offset + window.scrollY;
148
- let left = 0;
149
-
150
- if (alignment === "start") {
151
- left = triggerElementRect.left + window.scrollX;
152
- } else if (alignment === "end") {
153
- left = triggerElementRect.right - castedElementRect.width + window.scrollX;
154
- } else {
155
- left = triggerElementRect.left + triggerElementRect.width / 2 - castedElementRect.width / 2 + window.scrollX;
156
- }
157
-
158
- return { top, left };
159
- };
160
-
161
- const handleLeftPosition = (
162
- triggerElementRect: DOMRect,
163
- castedElementRect: DOMRect,
164
- offset: number,
165
- alignment: Alignment,
166
- ) => {
167
- const left = triggerElementRect.left - castedElementRect.width - offset + window.scrollX;
168
- let top = 0;
169
-
170
- if (alignment === "start") {
171
- top = triggerElementRect.top + window.scrollY;
172
- } else if (alignment === "end") {
173
- top = triggerElementRect.bottom - castedElementRect.height + window.scrollY;
174
- } else {
175
- top = triggerElementRect.top + triggerElementRect.height / 2 - castedElementRect.height / 2 + window.scrollY;
176
- }
177
-
178
- return { top, left };
179
- };
180
-
181
- const handleRightPosition = (
182
- triggerElementRect: DOMRect,
183
- castedElementRect: DOMRect,
184
- offset: number,
185
- alignment: Alignment,
186
- ) => {
187
- const left = triggerElementRect.right + offset + window.scrollX;
188
- let top = 0;
189
-
190
- if (alignment === "start") {
191
- top = triggerElementRect.top + window.scrollY;
192
- } else if (alignment === "end") {
193
- top = triggerElementRect.bottom - castedElementRect.height + window.scrollY;
194
- } else {
195
- top = triggerElementRect.top + triggerElementRect.height / 2 - castedElementRect.height / 2 + window.scrollY;
196
- }
197
-
198
- return { top, left };
199
- };
200
-
201
- const handleTopPosition = (
202
- triggerElementRect: DOMRect,
203
- castedElementRect: DOMRect,
204
- offset: number,
205
- alignment: Alignment,
206
- ) => {
207
- const top = triggerElementRect.top - castedElementRect.height - offset + window.scrollY;
208
-
209
- let left = 0;
210
-
211
- if (alignment === "start") {
212
- left = triggerElementRect.left + window.scrollX;
213
- } else if (alignment === "end") {
214
- left = triggerElementRect.right - castedElementRect.width + window.scrollX;
215
- } else {
216
- left = triggerElementRect.left + triggerElementRect.width / 2 - castedElementRect.width / 2 + window.scrollX;
217
- }
218
-
219
- return { top, left };
220
- };
@@ -1,13 +0,0 @@
1
- export const FOCUSABLE_ELEMENTS = [
2
- "button",
3
- "a[href]",
4
- "input",
5
- "select",
6
- "textarea",
7
- "details",
8
- '[tabindex]:not([tabindex="-1"])',
9
- ];
10
-
11
- export const FOCUSABLE_ELEMENTS_QUERY = FOCUSABLE_ELEMENTS.map(
12
- (element) => element + ":not([disabled]):not([aria-hidden])",
13
- ).join(",");
@@ -1,51 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- import sass from "sass";
5
-
6
- const outputDir = path.resolve(__dirname, "css");
7
-
8
- if (!fs.existsSync(outputDir)) {
9
- fs.mkdirSync(outputDir);
10
- }
11
-
12
- const fontFile = `
13
- @font-face {
14
- font-display: swap;
15
- font-family: 'Nunito';
16
- font-style: normal;
17
- font-weight: 300;
18
- src: url('@design-system-rte/core/assets/fonts/nunito-light-300.woff2') format('woff2');
19
- }
20
-
21
- @font-face {
22
- font-display: swap;
23
- font-family: 'Nunito';
24
- font-style: normal;
25
- font-weight: 400;
26
- src: url('@design-system-rte/core/assets/fonts/nunito-regular-400.woff2') format('woff2');
27
- }
28
-
29
- @font-face {
30
- font-display: swap;
31
- font-family: 'Nunito';
32
- font-style: normal;
33
- font-weight: 600;
34
- src: url('@design-system-rte/core/assets/fonts/nunito-semi-bold-600.woff2') format('woff2');
35
- }
36
-
37
- @font-face {
38
- font-display: swap;
39
- font-family: 'Nunito';
40
- font-style: normal;
41
- font-weight: 700;
42
- src: url('@design-system-rte/core/assets/fonts/nunito-bold-700.woff2') format('woff2');
43
- }
44
- `;
45
-
46
- const fontResult = sass.compileString(fontFile, {
47
- loadPaths: [path.resolve(__dirname)],
48
- style: "compressed",
49
- });
50
-
51
- fs.writeFileSync(path.join(outputDir, "rte-fonts.css"), fontResult.css);
package/eslint.config.js DELETED
@@ -1 +0,0 @@
1
- export { default } from "../../eslint.config.js";
@@ -1,35 +0,0 @@
1
- import fs from "fs";
2
- import path, { resolve } from "path";
3
-
4
- export interface TokenValue {
5
- $type: string;
6
- $scopes: string[];
7
- $value: string | number;
8
- }
9
-
10
- export const UNIT = "px";
11
- export const INDENT = " ".repeat(2);
12
-
13
- export enum PrivacyLevel {
14
- PUBLIC = "public",
15
- PRIVATE = "private",
16
- }
17
-
18
- const rootDir = path.join(resolve(__dirname), "../../design-tokens");
19
- const tokensDir = "tokens";
20
- const primitivesDir = "primitives";
21
-
22
- export const tokensOutputDir = path.join(rootDir, tokensDir);
23
- export const primitivesOutputDir = path.join(rootDir, primitivesDir);
24
-
25
- export function buildScssVariable(variableName: string[], value: string): string {
26
- return `$${variableName.join("-")}: ${value};\n`.toLowerCase();
27
- }
28
-
29
- export function generateScssFile(scss: string, filePath: string) {
30
- fs.writeFileSync(filePath, scss);
31
- }
32
-
33
- export function buildScssFileName(collection: string): string {
34
- return `_${collection.toLowerCase()}.scss`;
35
- }
@@ -1,24 +0,0 @@
1
- import fs from "fs";
2
- import { resolve } from "path";
3
-
4
- import { generatePrimitivesScssFiles } from "./primitives-generator";
5
- import { generateTokensScssFiles, TokenItem } from "./tokens-generator";
6
-
7
- console.log("🔧 Generating design tokens...\n");
8
-
9
- const currentDir = resolve(__dirname);
10
-
11
- const inputPrimitivesSource = resolve(currentDir, "sourceFiles/primitives.json");
12
- const inputTokensSource = resolve(currentDir, "sourceFiles/tokens.json");
13
-
14
- const rawPrimitives = JSON.parse(fs.readFileSync(inputPrimitivesSource, "utf8"));
15
- console.log("📦 Generating primitives... ");
16
- generatePrimitivesScssFiles(rawPrimitives);
17
- console.log("✅ Primitives generated successfully.\n");
18
-
19
- const rawTokens: TokenItem[] = JSON.parse(fs.readFileSync(inputTokensSource, "utf8"));
20
- console.log("📦 Generating tokens... ");
21
- generateTokensScssFiles(rawTokens);
22
- console.log("✅ Tokens generated successfully.\n");
23
-
24
- console.log("✅ All design tokens generated successfully. ");
@@ -1,84 +0,0 @@
1
- import fs from "fs";
2
-
3
- import { describe, it, expect, vi, beforeEach } from "vitest";
4
-
5
- import { Collection, generatePrimitivesScssFiles } from "./primitives-generator";
6
-
7
- vi.mock("fs");
8
-
9
- describe("primitives-generator", () => {
10
- beforeEach(() => {
11
- vi.clearAllMocks();
12
- });
13
-
14
- it("génère correctement les variables SCSS pour les couleurs", () => {
15
- const colorCollection = [
16
- {
17
- collection: Collection.COLORS,
18
- variables: {
19
- bleu: {
20
- 100: { $value: "#abcdef" },
21
- 200: { $value: "#123456" },
22
- },
23
- rouge: {
24
- 500: { $value: "#ff0000" },
25
- },
26
- },
27
- },
28
- ];
29
-
30
- const writeSpy = vi.spyOn(fs, "writeFileSync");
31
-
32
- vi.spyOn(fs, "existsSync").mockReturnValue(true);
33
-
34
- vi.spyOn(fs, "readFileSync").mockReturnValue(colorCollection.toString());
35
-
36
- generatePrimitivesScssFiles(colorCollection);
37
-
38
- expect(writeSpy).toHaveBeenCalledWith(
39
- expect.stringContaining("_colors.scss"),
40
- expect.stringContaining("$bleu-100: #abcdef;"),
41
- );
42
- expect(writeSpy).toHaveBeenCalledWith(
43
- expect.stringContaining("_colors.scss"),
44
- expect.stringContaining("$rouge-500: #ff0000;"),
45
- );
46
- });
47
-
48
- it("génère correctement les variables SCSS pour la typo", () => {
49
- const typoCollection = [
50
- {
51
- collection: Collection.TYPOGRAPHY,
52
- variables: {
53
- "font-weight": {
54
- bold: { $value: "700" },
55
- },
56
- "font-family": {
57
- main: { $value: "Nunito" },
58
- },
59
- "font-size": {
60
- small: { $value: "12" },
61
- },
62
- },
63
- },
64
- ];
65
-
66
- const writeSpy = vi.spyOn(fs, "writeFileSync");
67
- vi.spyOn(fs, "existsSync").mockReturnValue(true);
68
-
69
- generatePrimitivesScssFiles(typoCollection);
70
-
71
- expect(writeSpy).toHaveBeenCalledWith(
72
- expect.stringContaining("_typography.scss"),
73
- expect.stringContaining("$font-weight-bold: 700;"),
74
- );
75
- expect(writeSpy).toHaveBeenCalledWith(
76
- expect.stringContaining("_typography.scss"),
77
- expect.stringContaining('$font-family-main: "Nunito";'),
78
- );
79
- expect(writeSpy).toHaveBeenCalledWith(
80
- expect.stringContaining("_typography.scss"),
81
- expect.stringContaining("$font-size-small: 12px;"),
82
- );
83
- });
84
- });
@@ -1,66 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- import { generateScssFile, primitivesOutputDir, UNIT } from "./common";
5
-
6
- export enum Collection {
7
- COLORS = "Primitive : Colors",
8
- TYPOGRAPHY = "Primitive : Type",
9
- }
10
-
11
- interface CollectionItem {
12
- collection: Collection;
13
- variables: Record<string, Record<string, { $value: string }>>;
14
- }
15
-
16
- if (!fs.existsSync(primitivesOutputDir)) {
17
- fs.mkdirSync(primitivesOutputDir);
18
- }
19
-
20
- export function generatePrimitivesScssFiles(json: CollectionItem[]) {
21
- for (const tokenItem of json) {
22
- let scss = "// This file is auto-generated. Do not edit directly.\n\n";
23
- let filename = "";
24
- switch (tokenItem.collection) {
25
- case Collection.COLORS:
26
- filename = "_colors.scss";
27
- scss += extractColors(tokenItem);
28
- generateScssFile(scss, path.join(primitivesOutputDir, filename));
29
- break;
30
-
31
- case Collection.TYPOGRAPHY:
32
- filename = "_typography.scss";
33
- scss += extractTypography(tokenItem);
34
- generateScssFile(scss, path.join(primitivesOutputDir, filename));
35
- break;
36
- }
37
- }
38
- }
39
-
40
- function extractColors(colorCollection: CollectionItem): string {
41
- let scss = "";
42
- for (const color in colorCollection.variables) {
43
- for (const colorValue in colorCollection.variables[color]) {
44
- const colorVariable = colorCollection.variables[color][colorValue];
45
- scss += `$${color}-${colorValue}: ${colorVariable.$value};\n`.toLowerCase();
46
- }
47
- }
48
- return scss;
49
- }
50
-
51
- function extractTypography(typographyCollection: CollectionItem): string {
52
- let scss = "";
53
- for (const category in typographyCollection.variables) {
54
- for (const subCategory in typographyCollection.variables[category]) {
55
- const typographyVariable = typographyCollection.variables[category][subCategory];
56
- if (category === "font-weight") {
57
- scss += `$${category}-${subCategory}: ${typographyVariable.$value};\n`.toLowerCase();
58
- } else if (category === "font-family") {
59
- scss += `$${category}-${subCategory}: "${typographyVariable.$value}";\n`;
60
- } else {
61
- scss += `$${category}-${subCategory}: ${typographyVariable.$value}${UNIT};\n`.toLowerCase();
62
- }
63
- }
64
- }
65
- return scss;
66
- }