@digigov/react-icons 2.0.0-rc.29 → 2.0.0-rc.30

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 (456) hide show
  1. package/{dist/cjs → cjs}/registry.js.map +2 -2
  2. package/{dist/index.js → index.js} +1 -1
  3. package/package.json +6 -27
  4. package/.prettierrc.js +0 -1
  5. package/CHANGELOG.json +0 -161
  6. package/dist/CHANGELOG.md +0 -52
  7. package/dist/README.md +0 -0
  8. package/dist/package.json +0 -17
  9. package/dist/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +0 -325
  10. package/dist/src/AccessibilityIcon/config.tsx +0 -24
  11. package/dist/src/AccessibilityIcon/index.test.tsx +0 -44
  12. package/dist/src/AccessibilityIcon/index.tsx +0 -10
  13. package/dist/src/ArrowIcon/__snapshots__/index.test.tsx.snap +0 -81
  14. package/dist/src/ArrowIcon/config.tsx +0 -49
  15. package/dist/src/ArrowIcon/index.test.tsx +0 -20
  16. package/dist/src/ArrowIcon/index.tsx +0 -8
  17. package/dist/src/BurgerIcon/__snapshots__/index.test.tsx.snap +0 -247
  18. package/dist/src/BurgerIcon/config.tsx +0 -42
  19. package/dist/src/BurgerIcon/index.test.tsx +0 -30
  20. package/dist/src/BurgerIcon/index.tsx +0 -8
  21. package/dist/src/CancelIcon/__snapshots__/index.test.tsx.snap +0 -141
  22. package/dist/src/CancelIcon/config.tsx +0 -19
  23. package/dist/src/CancelIcon/index.test.tsx +0 -30
  24. package/dist/src/CancelIcon/index.tsx +0 -8
  25. package/dist/src/CaretIcon/__snapshots__/index.test.tsx.snap +0 -81
  26. package/dist/src/CaretIcon/config.tsx +0 -29
  27. package/dist/src/CaretIcon/index.test.tsx +0 -20
  28. package/dist/src/CaretIcon/index.tsx +0 -8
  29. package/dist/src/ChatIcon/__snapshots__/index.test.tsx.snap +0 -161
  30. package/dist/src/ChatIcon/config.tsx +0 -32
  31. package/dist/src/ChatIcon/index.test.tsx +0 -33
  32. package/dist/src/ChatIcon/index.tsx +0 -8
  33. package/dist/src/CheckIcon/__snapshots__/index.test.tsx.snap +0 -161
  34. package/dist/src/CheckIcon/config.tsx +0 -19
  35. package/dist/src/CheckIcon/index.test.tsx +0 -33
  36. package/dist/src/CheckIcon/index.tsx +0 -8
  37. package/dist/src/ChevronIcon/__snapshots__/index.test.tsx.snap +0 -81
  38. package/dist/src/ChevronIcon/config.tsx +0 -50
  39. package/dist/src/ChevronIcon/index.test.tsx +0 -24
  40. package/dist/src/ChevronIcon/index.tsx +0 -8
  41. package/dist/src/CloseIcon/__snapshots__/index.test.tsx.snap +0 -21
  42. package/dist/src/CloseIcon/config.tsx +0 -19
  43. package/dist/src/CloseIcon/index.test.tsx +0 -8
  44. package/dist/src/CloseIcon/index.tsx +0 -8
  45. package/dist/src/DownloadIcon/__snapshots__/index.test.tsx.snap +0 -232
  46. package/dist/src/DownloadIcon/config.tsx +0 -20
  47. package/dist/src/DownloadIcon/index.test.tsx +0 -32
  48. package/dist/src/DownloadIcon/index.tsx +0 -8
  49. package/dist/src/ExclamationIcon/__snapshots__/index.test.tsx.snap +0 -190
  50. package/dist/src/ExclamationIcon/config.tsx +0 -20
  51. package/dist/src/ExclamationIcon/index.test.tsx +0 -34
  52. package/dist/src/ExclamationIcon/index.tsx +0 -8
  53. package/dist/src/GlobeIcon/__snapshots__/index.test.tsx.snap +0 -81
  54. package/dist/src/GlobeIcon/config.tsx +0 -19
  55. package/dist/src/GlobeIcon/index.test.tsx +0 -21
  56. package/dist/src/GlobeIcon/index.tsx +0 -8
  57. package/dist/src/Icon/__snapshots__/index.test.tsx.snap +0 -238
  58. package/dist/src/Icon/index.test.tsx +0 -38
  59. package/dist/src/Icon/index.tsx +0 -63
  60. package/dist/src/IconBase/index.tsx +0 -258
  61. package/dist/src/LockIcon/__snapshots__/index.test.tsx.snap +0 -141
  62. package/dist/src/LockIcon/config.tsx +0 -19
  63. package/dist/src/LockIcon/index.test.tsx +0 -30
  64. package/dist/src/LockIcon/index.tsx +0 -8
  65. package/dist/src/LoginIcon/__snapshots__/index.test.tsx.snap +0 -176
  66. package/dist/src/LoginIcon/config.tsx +0 -23
  67. package/dist/src/LoginIcon/index.test.tsx +0 -30
  68. package/dist/src/LoginIcon/index.tsx +0 -8
  69. package/dist/src/MinusIcon/__snapshots__/index.test.tsx.snap +0 -162
  70. package/dist/src/MinusIcon/config.tsx +0 -16
  71. package/dist/src/MinusIcon/index.test.tsx +0 -30
  72. package/dist/src/MinusIcon/index.tsx +0 -8
  73. package/dist/src/MoreVertIcon/__snapshots__/index.test.tsx.snap +0 -325
  74. package/dist/src/MoreVertIcon/config.tsx +0 -18
  75. package/dist/src/MoreVertIcon/index.test.tsx +0 -40
  76. package/dist/src/MoreVertIcon/index.tsx +0 -8
  77. package/dist/src/PdfFileIcon/__snapshots__/index.test.tsx.snap +0 -316
  78. package/dist/src/PdfFileIcon/config.tsx +0 -30
  79. package/dist/src/PdfFileIcon/index.test.tsx +0 -30
  80. package/dist/src/PdfFileIcon/index.tsx +0 -8
  81. package/dist/src/PlusIcon/__snapshots__/index.test.tsx.snap +0 -141
  82. package/dist/src/PlusIcon/config.tsx +0 -19
  83. package/dist/src/PlusIcon/index.test.tsx +0 -30
  84. package/dist/src/PlusIcon/index.tsx +0 -8
  85. package/dist/src/PrintIcon/__snapshots__/index.test.tsx.snap +0 -197
  86. package/dist/src/PrintIcon/config.tsx +0 -20
  87. package/dist/src/PrintIcon/index.test.tsx +0 -30
  88. package/dist/src/PrintIcon/index.tsx +0 -8
  89. package/dist/src/ReplyIcon/__snapshots__/index.test.tsx.snap +0 -141
  90. package/dist/src/ReplyIcon/config.tsx +0 -19
  91. package/dist/src/ReplyIcon/index.test.tsx +0 -30
  92. package/dist/src/ReplyIcon/index.tsx +0 -8
  93. package/dist/src/RestoreIcon/__snapshots__/index.test.tsx.snap +0 -225
  94. package/dist/src/RestoreIcon/config.tsx +0 -21
  95. package/dist/src/RestoreIcon/index.test.tsx +0 -30
  96. package/dist/src/RestoreIcon/index.tsx +0 -8
  97. package/dist/src/SearchIcon/__snapshots__/index.test.tsx.snap +0 -21
  98. package/dist/src/SearchIcon/config.tsx +0 -19
  99. package/dist/src/SearchIcon/index.test.tsx +0 -8
  100. package/dist/src/SearchIcon/index.tsx +0 -8
  101. package/dist/src/SvgIcon/__snapshots__/index.test.tsx.snap +0 -271
  102. package/dist/src/SvgIcon/index.test.tsx +0 -96
  103. package/dist/src/SvgIcon/index.tsx +0 -72
  104. package/dist/src/UncheckIcon/__snapshots__/index.test.tsx.snap +0 -181
  105. package/dist/src/UncheckIcon/config.tsx +0 -19
  106. package/dist/src/UncheckIcon/index.test.tsx +0 -36
  107. package/dist/src/UncheckIcon/index.tsx +0 -8
  108. package/dist/src/icons.ts +0 -73
  109. package/dist/src/index.ts +0 -23
  110. package/eslint.config.mjs +0 -3
  111. package/react-icons.build.log +0 -9
  112. package/rush-logs/react-icons.build.log +0 -8
  113. package/rush-logs/react-icons.lint.log +0 -9
  114. package/rush-logs/react-icons.publint.log +0 -60
  115. package/rush-logs/react-icons.test.log +0 -37
  116. package/tsconfig.json +0 -39
  117. package/tsconfig.production.json +0 -17
  118. package/{dist/AccessibilityIcon → AccessibilityIcon}/config/index.js +0 -0
  119. package/{dist/AccessibilityIcon → AccessibilityIcon}/config/package.json +0 -0
  120. package/{dist/AccessibilityIcon → AccessibilityIcon}/config.d.ts +0 -0
  121. package/{dist/AccessibilityIcon → AccessibilityIcon}/config.js.map +0 -0
  122. package/{dist/AccessibilityIcon → AccessibilityIcon}/index.d.ts +0 -0
  123. package/{dist/AccessibilityIcon → AccessibilityIcon}/index.js +0 -0
  124. package/{dist/AccessibilityIcon → AccessibilityIcon}/index.js.map +0 -0
  125. package/{dist/AccessibilityIcon → AccessibilityIcon}/index.test.d.ts +0 -0
  126. package/{dist/AccessibilityIcon → AccessibilityIcon}/package.json +0 -0
  127. package/{dist/ArrowIcon → ArrowIcon}/config/index.js +0 -0
  128. package/{dist/ArrowIcon → ArrowIcon}/config/package.json +0 -0
  129. package/{dist/ArrowIcon → ArrowIcon}/config.d.ts +0 -0
  130. package/{dist/ArrowIcon → ArrowIcon}/config.js.map +0 -0
  131. package/{dist/ArrowIcon → ArrowIcon}/index.d.ts +0 -0
  132. package/{dist/ArrowIcon → ArrowIcon}/index.js +0 -0
  133. package/{dist/ArrowIcon → ArrowIcon}/index.js.map +0 -0
  134. package/{dist/ArrowIcon → ArrowIcon}/index.test.d.ts +0 -0
  135. package/{dist/ArrowIcon → ArrowIcon}/package.json +0 -0
  136. package/{dist/BurgerIcon → BurgerIcon}/config/index.js +0 -0
  137. package/{dist/BurgerIcon → BurgerIcon}/config/package.json +0 -0
  138. package/{dist/BurgerIcon → BurgerIcon}/config.d.ts +0 -0
  139. package/{dist/BurgerIcon → BurgerIcon}/config.js.map +0 -0
  140. package/{dist/BurgerIcon → BurgerIcon}/index.d.ts +0 -0
  141. package/{dist/BurgerIcon → BurgerIcon}/index.js +0 -0
  142. package/{dist/BurgerIcon → BurgerIcon}/index.js.map +0 -0
  143. package/{dist/BurgerIcon → BurgerIcon}/index.test.d.ts +0 -0
  144. package/{dist/BurgerIcon → BurgerIcon}/package.json +0 -0
  145. package/{dist/CancelIcon → CancelIcon}/config/index.js +0 -0
  146. package/{dist/CancelIcon → CancelIcon}/config/package.json +0 -0
  147. package/{dist/CancelIcon → CancelIcon}/config.d.ts +0 -0
  148. package/{dist/CancelIcon → CancelIcon}/config.js.map +0 -0
  149. package/{dist/CancelIcon → CancelIcon}/index.d.ts +0 -0
  150. package/{dist/CancelIcon → CancelIcon}/index.js +0 -0
  151. package/{dist/CancelIcon → CancelIcon}/index.js.map +0 -0
  152. package/{dist/CancelIcon → CancelIcon}/index.test.d.ts +0 -0
  153. package/{dist/CancelIcon → CancelIcon}/package.json +0 -0
  154. package/{dist/CaretIcon → CaretIcon}/config/index.js +0 -0
  155. package/{dist/CaretIcon → CaretIcon}/config/package.json +0 -0
  156. package/{dist/CaretIcon → CaretIcon}/config.d.ts +0 -0
  157. package/{dist/CaretIcon → CaretIcon}/config.js.map +0 -0
  158. package/{dist/CaretIcon → CaretIcon}/index.d.ts +0 -0
  159. package/{dist/CaretIcon → CaretIcon}/index.js +0 -0
  160. package/{dist/CaretIcon → CaretIcon}/index.js.map +0 -0
  161. package/{dist/CaretIcon → CaretIcon}/index.test.d.ts +0 -0
  162. package/{dist/CaretIcon → CaretIcon}/package.json +0 -0
  163. package/{dist/ChatIcon → ChatIcon}/config/index.js +0 -0
  164. package/{dist/ChatIcon → ChatIcon}/config/package.json +0 -0
  165. package/{dist/ChatIcon → ChatIcon}/config.d.ts +0 -0
  166. package/{dist/ChatIcon → ChatIcon}/config.js.map +0 -0
  167. package/{dist/ChatIcon → ChatIcon}/index.d.ts +0 -0
  168. package/{dist/ChatIcon → ChatIcon}/index.js +0 -0
  169. package/{dist/ChatIcon → ChatIcon}/index.js.map +0 -0
  170. package/{dist/ChatIcon → ChatIcon}/index.test.d.ts +0 -0
  171. package/{dist/ChatIcon → ChatIcon}/package.json +0 -0
  172. package/{dist/CheckIcon → CheckIcon}/config/index.js +0 -0
  173. package/{dist/CheckIcon → CheckIcon}/config/package.json +0 -0
  174. package/{dist/CheckIcon → CheckIcon}/config.d.ts +0 -0
  175. package/{dist/CheckIcon → CheckIcon}/config.js.map +0 -0
  176. package/{dist/CheckIcon → CheckIcon}/index.d.ts +0 -0
  177. package/{dist/CheckIcon → CheckIcon}/index.js +0 -0
  178. package/{dist/CheckIcon → CheckIcon}/index.js.map +0 -0
  179. package/{dist/CheckIcon → CheckIcon}/index.test.d.ts +0 -0
  180. package/{dist/CheckIcon → CheckIcon}/package.json +0 -0
  181. package/{dist/ChevronIcon → ChevronIcon}/config/index.js +0 -0
  182. package/{dist/ChevronIcon → ChevronIcon}/config/package.json +0 -0
  183. package/{dist/ChevronIcon → ChevronIcon}/config.d.ts +0 -0
  184. package/{dist/ChevronIcon → ChevronIcon}/config.js.map +0 -0
  185. package/{dist/ChevronIcon → ChevronIcon}/index.d.ts +0 -0
  186. package/{dist/ChevronIcon → ChevronIcon}/index.js +0 -0
  187. package/{dist/ChevronIcon → ChevronIcon}/index.js.map +0 -0
  188. package/{dist/ChevronIcon → ChevronIcon}/index.test.d.ts +0 -0
  189. package/{dist/ChevronIcon → ChevronIcon}/package.json +0 -0
  190. package/{dist/CloseIcon → CloseIcon}/config/index.js +0 -0
  191. package/{dist/CloseIcon → CloseIcon}/config/package.json +0 -0
  192. package/{dist/CloseIcon → CloseIcon}/config.d.ts +0 -0
  193. package/{dist/CloseIcon → CloseIcon}/config.js.map +0 -0
  194. package/{dist/CloseIcon → CloseIcon}/index.d.ts +0 -0
  195. package/{dist/CloseIcon → CloseIcon}/index.js +0 -0
  196. package/{dist/CloseIcon → CloseIcon}/index.js.map +0 -0
  197. package/{dist/CloseIcon → CloseIcon}/index.test.d.ts +0 -0
  198. package/{dist/CloseIcon → CloseIcon}/package.json +0 -0
  199. package/{dist/DownloadIcon → DownloadIcon}/config/index.js +0 -0
  200. package/{dist/DownloadIcon → DownloadIcon}/config/package.json +0 -0
  201. package/{dist/DownloadIcon → DownloadIcon}/config.d.ts +0 -0
  202. package/{dist/DownloadIcon → DownloadIcon}/config.js.map +0 -0
  203. package/{dist/DownloadIcon → DownloadIcon}/index.d.ts +0 -0
  204. package/{dist/DownloadIcon → DownloadIcon}/index.js +0 -0
  205. package/{dist/DownloadIcon → DownloadIcon}/index.js.map +0 -0
  206. package/{dist/DownloadIcon → DownloadIcon}/index.test.d.ts +0 -0
  207. package/{dist/DownloadIcon → DownloadIcon}/package.json +0 -0
  208. package/{dist/ExclamationIcon → ExclamationIcon}/config/index.js +0 -0
  209. package/{dist/ExclamationIcon → ExclamationIcon}/config/package.json +0 -0
  210. package/{dist/ExclamationIcon → ExclamationIcon}/config.d.ts +0 -0
  211. package/{dist/ExclamationIcon → ExclamationIcon}/config.js.map +0 -0
  212. package/{dist/ExclamationIcon → ExclamationIcon}/index.d.ts +0 -0
  213. package/{dist/ExclamationIcon → ExclamationIcon}/index.js +0 -0
  214. package/{dist/ExclamationIcon → ExclamationIcon}/index.js.map +0 -0
  215. package/{dist/ExclamationIcon → ExclamationIcon}/index.test.d.ts +0 -0
  216. package/{dist/ExclamationIcon → ExclamationIcon}/package.json +0 -0
  217. package/{dist/GlobeIcon → GlobeIcon}/config/index.js +0 -0
  218. package/{dist/GlobeIcon → GlobeIcon}/config/package.json +0 -0
  219. package/{dist/GlobeIcon → GlobeIcon}/config.d.ts +0 -0
  220. package/{dist/GlobeIcon → GlobeIcon}/config.js.map +0 -0
  221. package/{dist/GlobeIcon → GlobeIcon}/index.d.ts +0 -0
  222. package/{dist/GlobeIcon → GlobeIcon}/index.js +0 -0
  223. package/{dist/GlobeIcon → GlobeIcon}/index.js.map +0 -0
  224. package/{dist/GlobeIcon → GlobeIcon}/index.test.d.ts +0 -0
  225. package/{dist/GlobeIcon → GlobeIcon}/package.json +0 -0
  226. package/{dist/Icon → Icon}/index.d.ts +0 -0
  227. package/{dist/Icon → Icon}/index.js +0 -0
  228. package/{dist/Icon → Icon}/index.js.map +0 -0
  229. package/{dist/Icon → Icon}/index.test.d.ts +0 -0
  230. package/{dist/Icon → Icon}/package.json +0 -0
  231. package/{dist/IconBase → IconBase}/index.d.ts +0 -0
  232. package/{dist/IconBase → IconBase}/index.js +0 -0
  233. package/{dist/IconBase → IconBase}/index.js.map +0 -0
  234. package/{dist/IconBase → IconBase}/package.json +0 -0
  235. package/{dist/LICENSE → LICENSE} +0 -0
  236. package/{dist/LockIcon → LockIcon}/config/index.js +0 -0
  237. package/{dist/LockIcon → LockIcon}/config/package.json +0 -0
  238. package/{dist/LockIcon → LockIcon}/config.d.ts +0 -0
  239. package/{dist/LockIcon → LockIcon}/config.js.map +0 -0
  240. package/{dist/LockIcon → LockIcon}/index.d.ts +0 -0
  241. package/{dist/LockIcon → LockIcon}/index.js +0 -0
  242. package/{dist/LockIcon → LockIcon}/index.js.map +0 -0
  243. package/{dist/LockIcon → LockIcon}/index.test.d.ts +0 -0
  244. package/{dist/LockIcon → LockIcon}/package.json +0 -0
  245. package/{dist/LoginIcon → LoginIcon}/config/index.js +0 -0
  246. package/{dist/LoginIcon → LoginIcon}/config/package.json +0 -0
  247. package/{dist/LoginIcon → LoginIcon}/config.d.ts +0 -0
  248. package/{dist/LoginIcon → LoginIcon}/config.js.map +0 -0
  249. package/{dist/LoginIcon → LoginIcon}/index.d.ts +0 -0
  250. package/{dist/LoginIcon → LoginIcon}/index.js +0 -0
  251. package/{dist/LoginIcon → LoginIcon}/index.js.map +0 -0
  252. package/{dist/LoginIcon → LoginIcon}/index.test.d.ts +0 -0
  253. package/{dist/LoginIcon → LoginIcon}/package.json +0 -0
  254. package/{dist/MinusIcon → MinusIcon}/config/index.js +0 -0
  255. package/{dist/MinusIcon → MinusIcon}/config/package.json +0 -0
  256. package/{dist/MinusIcon → MinusIcon}/config.d.ts +0 -0
  257. package/{dist/MinusIcon → MinusIcon}/config.js.map +0 -0
  258. package/{dist/MinusIcon → MinusIcon}/index.d.ts +0 -0
  259. package/{dist/MinusIcon → MinusIcon}/index.js +0 -0
  260. package/{dist/MinusIcon → MinusIcon}/index.js.map +0 -0
  261. package/{dist/MinusIcon → MinusIcon}/index.test.d.ts +0 -0
  262. package/{dist/MinusIcon → MinusIcon}/package.json +0 -0
  263. package/{dist/MoreVertIcon → MoreVertIcon}/config/index.js +0 -0
  264. package/{dist/MoreVertIcon → MoreVertIcon}/config/package.json +0 -0
  265. package/{dist/MoreVertIcon → MoreVertIcon}/config.d.ts +0 -0
  266. package/{dist/MoreVertIcon → MoreVertIcon}/config.js.map +0 -0
  267. package/{dist/MoreVertIcon → MoreVertIcon}/index.d.ts +0 -0
  268. package/{dist/MoreVertIcon → MoreVertIcon}/index.js +0 -0
  269. package/{dist/MoreVertIcon → MoreVertIcon}/index.js.map +0 -0
  270. package/{dist/MoreVertIcon → MoreVertIcon}/index.test.d.ts +0 -0
  271. package/{dist/MoreVertIcon → MoreVertIcon}/package.json +0 -0
  272. package/{dist/PdfFileIcon → PdfFileIcon}/config/index.js +0 -0
  273. package/{dist/PdfFileIcon → PdfFileIcon}/config/package.json +0 -0
  274. package/{dist/PdfFileIcon → PdfFileIcon}/config.d.ts +0 -0
  275. package/{dist/PdfFileIcon → PdfFileIcon}/config.js.map +0 -0
  276. package/{dist/PdfFileIcon → PdfFileIcon}/index.d.ts +0 -0
  277. package/{dist/PdfFileIcon → PdfFileIcon}/index.js +0 -0
  278. package/{dist/PdfFileIcon → PdfFileIcon}/index.js.map +0 -0
  279. package/{dist/PdfFileIcon → PdfFileIcon}/index.test.d.ts +0 -0
  280. package/{dist/PdfFileIcon → PdfFileIcon}/package.json +0 -0
  281. package/{dist/PlusIcon → PlusIcon}/config/index.js +0 -0
  282. package/{dist/PlusIcon → PlusIcon}/config/package.json +0 -0
  283. package/{dist/PlusIcon → PlusIcon}/config.d.ts +0 -0
  284. package/{dist/PlusIcon → PlusIcon}/config.js.map +0 -0
  285. package/{dist/PlusIcon → PlusIcon}/index.d.ts +0 -0
  286. package/{dist/PlusIcon → PlusIcon}/index.js +0 -0
  287. package/{dist/PlusIcon → PlusIcon}/index.js.map +0 -0
  288. package/{dist/PlusIcon → PlusIcon}/index.test.d.ts +0 -0
  289. package/{dist/PlusIcon → PlusIcon}/package.json +0 -0
  290. package/{dist/PrintIcon → PrintIcon}/config/index.js +0 -0
  291. package/{dist/PrintIcon → PrintIcon}/config/package.json +0 -0
  292. package/{dist/PrintIcon → PrintIcon}/config.d.ts +0 -0
  293. package/{dist/PrintIcon → PrintIcon}/config.js.map +0 -0
  294. package/{dist/PrintIcon → PrintIcon}/index.d.ts +0 -0
  295. package/{dist/PrintIcon → PrintIcon}/index.js +0 -0
  296. package/{dist/PrintIcon → PrintIcon}/index.js.map +0 -0
  297. package/{dist/PrintIcon → PrintIcon}/index.test.d.ts +0 -0
  298. package/{dist/PrintIcon → PrintIcon}/package.json +0 -0
  299. package/{dist/ReplyIcon → ReplyIcon}/config/index.js +0 -0
  300. package/{dist/ReplyIcon → ReplyIcon}/config/package.json +0 -0
  301. package/{dist/ReplyIcon → ReplyIcon}/config.d.ts +0 -0
  302. package/{dist/ReplyIcon → ReplyIcon}/config.js.map +0 -0
  303. package/{dist/ReplyIcon → ReplyIcon}/index.d.ts +0 -0
  304. package/{dist/ReplyIcon → ReplyIcon}/index.js +0 -0
  305. package/{dist/ReplyIcon → ReplyIcon}/index.js.map +0 -0
  306. package/{dist/ReplyIcon → ReplyIcon}/index.test.d.ts +0 -0
  307. package/{dist/ReplyIcon → ReplyIcon}/package.json +0 -0
  308. package/{dist/RestoreIcon → RestoreIcon}/config/index.js +0 -0
  309. package/{dist/RestoreIcon → RestoreIcon}/config/package.json +0 -0
  310. package/{dist/RestoreIcon → RestoreIcon}/config.d.ts +0 -0
  311. package/{dist/RestoreIcon → RestoreIcon}/config.js.map +0 -0
  312. package/{dist/RestoreIcon → RestoreIcon}/index.d.ts +0 -0
  313. package/{dist/RestoreIcon → RestoreIcon}/index.js +0 -0
  314. package/{dist/RestoreIcon → RestoreIcon}/index.js.map +0 -0
  315. package/{dist/RestoreIcon → RestoreIcon}/index.test.d.ts +0 -0
  316. package/{dist/RestoreIcon → RestoreIcon}/package.json +0 -0
  317. package/{dist/SearchIcon → SearchIcon}/config/index.js +0 -0
  318. package/{dist/SearchIcon → SearchIcon}/config/package.json +0 -0
  319. package/{dist/SearchIcon → SearchIcon}/config.d.ts +0 -0
  320. package/{dist/SearchIcon → SearchIcon}/config.js.map +0 -0
  321. package/{dist/SearchIcon → SearchIcon}/index.d.ts +0 -0
  322. package/{dist/SearchIcon → SearchIcon}/index.js +0 -0
  323. package/{dist/SearchIcon → SearchIcon}/index.js.map +0 -0
  324. package/{dist/SearchIcon → SearchIcon}/index.test.d.ts +0 -0
  325. package/{dist/SearchIcon → SearchIcon}/package.json +0 -0
  326. package/{dist/SvgIcon → SvgIcon}/index.d.ts +0 -0
  327. package/{dist/SvgIcon → SvgIcon}/index.js +0 -0
  328. package/{dist/SvgIcon → SvgIcon}/index.js.map +0 -0
  329. package/{dist/SvgIcon → SvgIcon}/index.test.d.ts +0 -0
  330. package/{dist/SvgIcon → SvgIcon}/package.json +0 -0
  331. package/{dist/UncheckIcon → UncheckIcon}/config/index.js +0 -0
  332. package/{dist/UncheckIcon → UncheckIcon}/config/package.json +0 -0
  333. package/{dist/UncheckIcon → UncheckIcon}/config.d.ts +0 -0
  334. package/{dist/UncheckIcon → UncheckIcon}/config.js.map +0 -0
  335. package/{dist/UncheckIcon → UncheckIcon}/index.d.ts +0 -0
  336. package/{dist/UncheckIcon → UncheckIcon}/index.js +0 -0
  337. package/{dist/UncheckIcon → UncheckIcon}/index.js.map +0 -0
  338. package/{dist/UncheckIcon → UncheckIcon}/index.test.d.ts +0 -0
  339. package/{dist/UncheckIcon → UncheckIcon}/package.json +0 -0
  340. package/{dist/cjs → cjs}/AccessibilityIcon/config/index.js +0 -0
  341. package/{dist/cjs → cjs}/AccessibilityIcon/config.js.map +0 -0
  342. package/{dist/cjs → cjs}/AccessibilityIcon/index.js +0 -0
  343. package/{dist/cjs → cjs}/AccessibilityIcon/index.js.map +0 -0
  344. package/{dist/cjs → cjs}/ArrowIcon/config/index.js +0 -0
  345. package/{dist/cjs → cjs}/ArrowIcon/config.js.map +0 -0
  346. package/{dist/cjs → cjs}/ArrowIcon/index.js +0 -0
  347. package/{dist/cjs → cjs}/ArrowIcon/index.js.map +0 -0
  348. package/{dist/cjs → cjs}/BurgerIcon/config/index.js +0 -0
  349. package/{dist/cjs → cjs}/BurgerIcon/config.js.map +0 -0
  350. package/{dist/cjs → cjs}/BurgerIcon/index.js +0 -0
  351. package/{dist/cjs → cjs}/BurgerIcon/index.js.map +0 -0
  352. package/{dist/cjs → cjs}/CancelIcon/config/index.js +0 -0
  353. package/{dist/cjs → cjs}/CancelIcon/config.js.map +0 -0
  354. package/{dist/cjs → cjs}/CancelIcon/index.js +0 -0
  355. package/{dist/cjs → cjs}/CancelIcon/index.js.map +0 -0
  356. package/{dist/cjs → cjs}/CaretIcon/config/index.js +0 -0
  357. package/{dist/cjs → cjs}/CaretIcon/config.js.map +0 -0
  358. package/{dist/cjs → cjs}/CaretIcon/index.js +0 -0
  359. package/{dist/cjs → cjs}/CaretIcon/index.js.map +0 -0
  360. package/{dist/cjs → cjs}/ChatIcon/config/index.js +0 -0
  361. package/{dist/cjs → cjs}/ChatIcon/config.js.map +0 -0
  362. package/{dist/cjs → cjs}/ChatIcon/index.js +0 -0
  363. package/{dist/cjs → cjs}/ChatIcon/index.js.map +0 -0
  364. package/{dist/cjs → cjs}/CheckIcon/config/index.js +0 -0
  365. package/{dist/cjs → cjs}/CheckIcon/config.js.map +0 -0
  366. package/{dist/cjs → cjs}/CheckIcon/index.js +0 -0
  367. package/{dist/cjs → cjs}/CheckIcon/index.js.map +0 -0
  368. package/{dist/cjs → cjs}/ChevronIcon/config/index.js +0 -0
  369. package/{dist/cjs → cjs}/ChevronIcon/config.js.map +0 -0
  370. package/{dist/cjs → cjs}/ChevronIcon/index.js +0 -0
  371. package/{dist/cjs → cjs}/ChevronIcon/index.js.map +0 -0
  372. package/{dist/cjs → cjs}/CloseIcon/config/index.js +0 -0
  373. package/{dist/cjs → cjs}/CloseIcon/config.js.map +0 -0
  374. package/{dist/cjs → cjs}/CloseIcon/index.js +0 -0
  375. package/{dist/cjs → cjs}/CloseIcon/index.js.map +0 -0
  376. package/{dist/cjs → cjs}/DownloadIcon/config/index.js +0 -0
  377. package/{dist/cjs → cjs}/DownloadIcon/config.js.map +0 -0
  378. package/{dist/cjs → cjs}/DownloadIcon/index.js +0 -0
  379. package/{dist/cjs → cjs}/DownloadIcon/index.js.map +0 -0
  380. package/{dist/cjs → cjs}/ExclamationIcon/config/index.js +0 -0
  381. package/{dist/cjs → cjs}/ExclamationIcon/config.js.map +0 -0
  382. package/{dist/cjs → cjs}/ExclamationIcon/index.js +0 -0
  383. package/{dist/cjs → cjs}/ExclamationIcon/index.js.map +0 -0
  384. package/{dist/cjs → cjs}/GlobeIcon/config/index.js +0 -0
  385. package/{dist/cjs → cjs}/GlobeIcon/config.js.map +0 -0
  386. package/{dist/cjs → cjs}/GlobeIcon/index.js +0 -0
  387. package/{dist/cjs → cjs}/GlobeIcon/index.js.map +0 -0
  388. package/{dist/cjs → cjs}/Icon/index.js +0 -0
  389. package/{dist/cjs → cjs}/Icon/index.js.map +0 -0
  390. package/{dist/cjs → cjs}/IconBase/index.js +0 -0
  391. package/{dist/cjs → cjs}/IconBase/index.js.map +0 -0
  392. package/{dist/cjs → cjs}/LockIcon/config/index.js +0 -0
  393. package/{dist/cjs → cjs}/LockIcon/config.js.map +0 -0
  394. package/{dist/cjs → cjs}/LockIcon/index.js +0 -0
  395. package/{dist/cjs → cjs}/LockIcon/index.js.map +0 -0
  396. package/{dist/cjs → cjs}/LoginIcon/config/index.js +0 -0
  397. package/{dist/cjs → cjs}/LoginIcon/config.js.map +0 -0
  398. package/{dist/cjs → cjs}/LoginIcon/index.js +0 -0
  399. package/{dist/cjs → cjs}/LoginIcon/index.js.map +0 -0
  400. package/{dist/cjs → cjs}/MinusIcon/config/index.js +0 -0
  401. package/{dist/cjs → cjs}/MinusIcon/config.js.map +0 -0
  402. package/{dist/cjs → cjs}/MinusIcon/index.js +0 -0
  403. package/{dist/cjs → cjs}/MinusIcon/index.js.map +0 -0
  404. package/{dist/cjs → cjs}/MoreVertIcon/config/index.js +0 -0
  405. package/{dist/cjs → cjs}/MoreVertIcon/config.js.map +0 -0
  406. package/{dist/cjs → cjs}/MoreVertIcon/index.js +0 -0
  407. package/{dist/cjs → cjs}/MoreVertIcon/index.js.map +0 -0
  408. package/{dist/cjs → cjs}/PdfFileIcon/config/index.js +0 -0
  409. package/{dist/cjs → cjs}/PdfFileIcon/config.js.map +0 -0
  410. package/{dist/cjs → cjs}/PdfFileIcon/index.js +0 -0
  411. package/{dist/cjs → cjs}/PdfFileIcon/index.js.map +0 -0
  412. package/{dist/cjs → cjs}/PlusIcon/config/index.js +0 -0
  413. package/{dist/cjs → cjs}/PlusIcon/config.js.map +0 -0
  414. package/{dist/cjs → cjs}/PlusIcon/index.js +0 -0
  415. package/{dist/cjs → cjs}/PlusIcon/index.js.map +0 -0
  416. package/{dist/cjs → cjs}/PrintIcon/config/index.js +0 -0
  417. package/{dist/cjs → cjs}/PrintIcon/config.js.map +0 -0
  418. package/{dist/cjs → cjs}/PrintIcon/index.js +0 -0
  419. package/{dist/cjs → cjs}/PrintIcon/index.js.map +0 -0
  420. package/{dist/cjs → cjs}/ReplyIcon/config/index.js +0 -0
  421. package/{dist/cjs → cjs}/ReplyIcon/config.js.map +0 -0
  422. package/{dist/cjs → cjs}/ReplyIcon/index.js +0 -0
  423. package/{dist/cjs → cjs}/ReplyIcon/index.js.map +0 -0
  424. package/{dist/cjs → cjs}/RestoreIcon/config/index.js +0 -0
  425. package/{dist/cjs → cjs}/RestoreIcon/config.js.map +0 -0
  426. package/{dist/cjs → cjs}/RestoreIcon/index.js +0 -0
  427. package/{dist/cjs → cjs}/RestoreIcon/index.js.map +0 -0
  428. package/{dist/cjs → cjs}/SearchIcon/config/index.js +0 -0
  429. package/{dist/cjs → cjs}/SearchIcon/config.js.map +0 -0
  430. package/{dist/cjs → cjs}/SearchIcon/index.js +0 -0
  431. package/{dist/cjs → cjs}/SearchIcon/index.js.map +0 -0
  432. package/{dist/cjs → cjs}/SvgIcon/index.js +0 -0
  433. package/{dist/cjs → cjs}/SvgIcon/index.js.map +0 -0
  434. package/{dist/cjs → cjs}/UncheckIcon/config/index.js +0 -0
  435. package/{dist/cjs → cjs}/UncheckIcon/config.js.map +0 -0
  436. package/{dist/cjs → cjs}/UncheckIcon/index.js +0 -0
  437. package/{dist/cjs → cjs}/UncheckIcon/index.js.map +0 -0
  438. package/{dist/cjs → cjs}/icons/index.js +0 -0
  439. package/{dist/cjs → cjs}/icons.js.map +0 -0
  440. package/{dist/cjs → cjs}/index.js +0 -0
  441. package/{dist/cjs → cjs}/index.js.map +0 -0
  442. package/{dist/cjs → cjs}/lazy/index.js +0 -0
  443. package/{dist/cjs → cjs}/lazy.js.map +0 -0
  444. package/{dist/cjs → cjs}/registry/index.js +16 -16
  445. package/{dist/icons → icons}/index.js +0 -0
  446. package/{dist/icons → icons}/package.json +0 -0
  447. package/{dist/icons.d.ts → icons.d.ts} +0 -0
  448. package/{dist/icons.js.map → icons.js.map} +0 -0
  449. package/{dist/index.d.ts → index.d.ts} +0 -0
  450. package/{dist/index.js.map → index.js.map} +0 -0
  451. package/{dist/lazy → lazy}/index.js +0 -0
  452. package/{dist/lazy → lazy}/package.json +0 -0
  453. package/{dist/registry → registry}/index.js +16 -16
  454. package/{dist/registry → registry}/package.json +0 -0
  455. package/{dist/src → src}/lazy.js +0 -0
  456. package/{dist/src → src}/registry.js +16 -16
@@ -1,238 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`renders the Icon prop icon= "caret" 1`] = `
4
- <body>
5
- <div>
6
- <svg
7
- aria-hidden="true"
8
- as="svg"
9
- class="ds-svg-icon--caret ds-svg-icon"
10
- focusable="false"
11
- viewBox="0 0 24 24"
12
- >
13
- <path
14
- as="path"
15
- class=""
16
- d="M18,22V2L6,12L18,22z"
17
- />
18
- </svg>
19
- </div>
20
- </body>
21
- `;
22
-
23
- exports[`renders the Icon prop icon= "caret" and direction=left 1`] = `
24
- <body>
25
- <div>
26
- <svg
27
- aria-hidden="true"
28
- as="svg"
29
- class="ds-svg-icon--caret ds-svg-icon"
30
- focusable="false"
31
- viewBox="0 0 24 24"
32
- >
33
- <path
34
- as="path"
35
- class=""
36
- d="M18,22V2L6,12L18,22z"
37
- />
38
- </svg>
39
- </div>
40
- </body>
41
- `;
42
-
43
- exports[`renders the Icon prop icon= "check" 1`] = `
44
- <body>
45
- <div>
46
- <svg
47
- aria-hidden="true"
48
- as="svg"
49
- class="ds-svg-icon--check ds-svg-icon"
50
- focusable="false"
51
- viewBox="0 0 24 24"
52
- >
53
- <polygon
54
- as="polygon"
55
- class=""
56
- points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
57
- />
58
- </svg>
59
- </div>
60
- </body>
61
- `;
62
-
63
- exports[`renders the Icon prop icon= "close" 1`] = `
64
- <body>
65
- <div>
66
- <svg
67
- aria-hidden="true"
68
- as="svg"
69
- class="ds-svg-icon--close ds-svg-icon"
70
- focusable="false"
71
- viewBox="0 0 24 24"
72
- >
73
- <polygon
74
- as="polygon"
75
- class=""
76
- points="14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
77
- />
78
- </svg>
79
- </div>
80
- </body>
81
- `;
82
-
83
- exports[`renders the Icon prop icon= "uncheck" 1`] = `
84
- <body>
85
- <div>
86
- <svg
87
- aria-hidden="true"
88
- as="svg"
89
- class="ds-svg-icon--uncheck ds-svg-icon"
90
- focusable="false"
91
- viewBox="0 0 24 24"
92
- >
93
- <polygon
94
- as="polygon"
95
- class=""
96
- points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
97
- />
98
- </svg>
99
- </div>
100
- </body>
101
- `;
102
-
103
- exports[`renders the Icon props icon= "moreVert" 1`] = `
104
- <body>
105
- <div>
106
- <svg
107
- aria-hidden="true"
108
- as="svg"
109
- class="ds-svg-icon--moreVert ds-svg-icon"
110
- focusable="false"
111
- viewBox="0 0 24 24"
112
- >
113
- <circle
114
- as="circle"
115
- class=""
116
- cx="12"
117
- cy="5"
118
- r="2"
119
- />
120
- <circle
121
- as="circle"
122
- class=""
123
- cx="12"
124
- cy="12"
125
- r="2"
126
- />
127
- <circle
128
- as="circle"
129
- class=""
130
- cx="12"
131
- cy="19"
132
- r="2"
133
- />
134
- </svg>
135
- </div>
136
- </body>
137
- `;
138
-
139
- exports[`renders the Icon with no props 1`] = `
140
- <body>
141
- <div>
142
- <svg
143
- aria-hidden="true"
144
- as="svg"
145
- class="ds-svg-icon--chevron ds-svg-icon"
146
- focusable="false"
147
- viewBox="0 0 24 24"
148
- >
149
- <path
150
- as="path"
151
- class=""
152
- d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
153
- />
154
- </svg>
155
- </div>
156
- </body>
157
- `;
158
-
159
- exports[`renders the Icon with prop icon=arrow and direction=up 1`] = `
160
- <body>
161
- <div>
162
- <svg
163
- aria-hidden="true"
164
- as="svg"
165
- class="ds-svg-icon--chevron ds-svg-icon"
166
- focusable="false"
167
- viewBox="0 0 24 24"
168
- >
169
- <path
170
- as="path"
171
- class=""
172
- d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
173
- />
174
- </svg>
175
- </div>
176
- </body>
177
- `;
178
-
179
- exports[`renders the Icon with prop prop icon=burger 1`] = `
180
- <body>
181
- <div>
182
- <svg
183
- aria-hidden="true"
184
- as="svg"
185
- class="ds-svg-icon--burger ds-svg-icon"
186
- focusable="false"
187
- viewBox="0 0 24 24"
188
- >
189
- <g
190
- as="g"
191
- class=""
192
- >
193
- <rect
194
- as="rect"
195
- class=""
196
- height="3.3"
197
- id="ds-svg-icon--burger__line-1"
198
- width="20"
199
- />
200
- <rect
201
- as="rect"
202
- class=""
203
- height="3.3"
204
- id="ds-svg-icon--burger__line-2"
205
- width="20"
206
- />
207
- <rect
208
- as="rect"
209
- class=""
210
- height="3.3"
211
- id="ds-svg-icon--burger__line-3"
212
- width="20"
213
- />
214
- </g>
215
- </svg>
216
- </div>
217
- </body>
218
- `;
219
-
220
- exports[`renders the Icon with prop prop icon=globe 1`] = `
221
- <body>
222
- <div>
223
- <svg
224
- aria-hidden="true"
225
- as="svg"
226
- class="ds-svg-icon--globe ds-svg-icon"
227
- focusable="false"
228
- viewBox="0 0 24 24"
229
- >
230
- <path
231
- as="path"
232
- class=""
233
- d="M12,1C5.925,1,1,5.925,1,12s4.925,11,11,11,11-4.925,11-11S18.075,1,12,1ZM19.203,7.7h-2.6c-.236-1.22-.572-2.32-.98-3.267,1.49.716,2.735,1.857,3.58,3.267ZM20.4,12c0,.582-.06,1.151-.173,1.7h-3.292c.039-.556.066-1.12.066-1.7s-.026-1.145-.066-1.7h3.292c.113.549.173,1.118.173,1.7ZM12,20.378c-.484-.265-1.393-1.667-1.943-4.078h3.885c-.55,2.411-1.459,3.814-1.943,4.078ZM9.667,13.7c-.042-.537-.068-1.103-.068-1.7s.025-1.163.068-1.7h4.665c.042.537.068,1.103.068,1.7s-.025,1.163-.068,1.7h-4.665ZM3.6,12c0-.582.06-1.151.173-1.7h3.292c-.039.556-.066,1.12-.066,1.7s.026,1.145.066,1.7h-3.292c-.113-.549-.173-1.118-.173-1.7ZM12,3.622c.484.265,1.393,1.667,1.943,4.079h-3.885c.55-2.411,1.459-3.814,1.943-4.079ZM8.377,4.433c-.409.947-.745,2.047-.98,3.267h-2.6c.845-1.411,2.09-2.551,3.58-3.267ZM4.797,16.3h2.6c.236,1.22.572,2.32.98,3.267-1.49-.716-2.735-1.857-3.58-3.267ZM15.623,19.567c.409-.947.745-2.047.98-3.267h2.6c-.845,1.411-2.09,2.551-3.58,3.267Z"
234
- />
235
- </svg>
236
- </div>
237
- </body>
238
- `;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import Icon from '@digigov/react-icons/Icon';
5
-
6
- it('renders the Icon with no props', () => {
7
- expect(render(<Icon />).baseElement).toMatchSnapshot();
8
- });
9
-
10
- it('renders the Icon with prop icon=arrow and direction=up', () => {
11
- expect(render(<Icon direction="up" />).baseElement).toMatchSnapshot();
12
- });
13
- it('renders the Icon with prop prop icon=burger', () => {
14
- expect(render(<Icon icon="burger" />).baseElement).toMatchSnapshot();
15
- });
16
- it('renders the Icon prop icon= "caret"', () => {
17
- expect(render(<Icon icon="caret" />).baseElement).toMatchSnapshot();
18
- });
19
- it('renders the Icon prop icon= "caret" and direction=left', () => {
20
- expect(
21
- render(<Icon icon="caret" direction="left" />).baseElement
22
- ).toMatchSnapshot();
23
- });
24
- it('renders the Icon prop icon= "check"', () => {
25
- expect(render(<Icon icon="check" />).baseElement).toMatchSnapshot();
26
- });
27
- it('renders the Icon prop icon= "close"', () => {
28
- expect(render(<Icon icon="close" />).baseElement).toMatchSnapshot();
29
- });
30
- it('renders the Icon with prop prop icon=globe', () => {
31
- expect(render(<Icon icon="globe" />).baseElement).toMatchSnapshot();
32
- });
33
- it('renders the Icon props icon= "moreVert"', () => {
34
- expect(render(<Icon icon="moreVert" />).baseElement).toMatchSnapshot();
35
- });
36
- it('renders the Icon prop icon= "uncheck"', () => {
37
- expect(render(<Icon icon="uncheck" />).baseElement).toMatchSnapshot();
38
- });
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import * as icons from '@digigov/react-icons/icons';
4
- import type { IconTypes } from '@digigov/react-icons/icons';
5
- import SvgIcon, { SvgIconProps } from '@digigov/react-icons/SvgIcon';
6
-
7
- export type IconProps<N extends keyof IconTypes> = SvgIconProps &
8
- IconTypes[N] & {
9
- /**
10
- * ref is optional.
11
- * ref prop declares the reference of the svg icon component.
12
- * It can be used to to access the DOM element and the React element.
13
- */
14
- ref?: React.Ref<SVGSVGElement>;
15
- /**
16
- * icon is optional, but strongly recommended.
17
- * Default value is 'chevron'.
18
- * Use this prop to display the icon you want.
19
- */
20
- icon?: N;
21
- };
22
-
23
- type IconComponent = <C extends keyof IconTypes>(
24
- props: IconProps<C>
25
- ) => React.ReactNode | null;
26
- export type IconNames = keyof IconTypes;
27
- /**
28
- * Icon is used whenever we need a GOV.GR icon.
29
- * Choose the icon from the list in icon prop.
30
- */
31
- export const Icon: IconComponent = React.forwardRef<
32
- SVGSVGElement,
33
- IconProps<IconNames>
34
- >(function Icon(
35
- { icon = 'chevron', className, ...props }: IconProps<IconNames>,
36
- ref
37
- ) {
38
- const IconComponent = icons[icon];
39
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
40
- // @ts-ignore
41
- const iconProps = IconComponent?.props.reduce((compProps, propName) => {
42
- const value = props[propName];
43
- delete props[propName];
44
- return {
45
- ...compProps,
46
- [propName]: value,
47
- };
48
- }, {});
49
-
50
- return (
51
- <SvgIcon
52
- ref={ref}
53
- {...props}
54
- className={clsx(className, {
55
- [`ds-svg-icon--${icon}`]: true,
56
- })}
57
- >
58
- <IconComponent {...iconProps} />
59
- </SvgIcon>
60
- );
61
- });
62
-
63
- export default Icon;
@@ -1,258 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
-
4
- interface AsProp<C extends React.ElementType> {
5
- as?: C;
6
- }
7
-
8
- type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
9
-
10
- // This is the first reusable type utility we built
11
- type PolymorphicComponentProp<
12
- C extends React.ElementType,
13
- Props = Record<string, unknown>,
14
- > = React.PropsWithChildren<Props & AsProp<C>> &
15
- Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
16
-
17
- // This is a new type utility with ref!
18
- type PolymorphicComponentPropWithRef<
19
- C extends React.ElementType,
20
- Props = Record<string, unknown>,
21
- > = PolymorphicComponentProp<C, Props> & { ref?: any };
22
-
23
- // This is the type for the "ref" only
24
- type PolymorphicRef<C extends React.ElementType> =
25
- React.ComponentPropsWithRef<C>['ref'];
26
-
27
- /**
28
- * This is the updated component props using PolymorphicComponentPropWithRef
29
- */
30
- export type IconBaseProps<C extends React.ElementType> =
31
- PolymorphicComponentPropWithRef<
32
- C,
33
- {
34
- /** margin is optional. It has not a default value. */
35
- margin?: spacingValues;
36
- /** marginTop is optional. It has not a default value. */
37
- marginTop?: spacingValues;
38
- /** marginBottom is optional. It has not a default value. */
39
- marginBottom?: spacingValues;
40
- /** marginLeft is optional. It has not a default value. */
41
- marginLeft?: spacingValues;
42
- /** marginRight is optional. It has not a default value. */
43
- marginRight?: spacingValues;
44
- /** Alternative for margin. Margin is optional. It has not a default value. */
45
- m?: spacingValues;
46
- /** Alternative for marginTop. MarginTop is optional. It has not a default value. */
47
- mt?: spacingValues;
48
- /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
49
- mb?: spacingValues;
50
- /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
51
- ml?: spacingValues;
52
- /** Alternative for marginRight. MarginRight is optional. It has not a default value. */
53
- mr?: spacingValues;
54
- /** Alternative for marginX. MarginX is optional. It has not a default value. */
55
- mx?: spacingValues;
56
- /** Alternative for marginY. MarginY is optional. It has not a default value. */
57
- my?: spacingValues;
58
- /** padding is optional. It has not a default value. */
59
- padding?: spacingValues;
60
- /** paddingTop is optional. It has not a default value. */
61
- paddingTop?: spacingValues;
62
- /** paddingBottom is optional. It has not a default value. */
63
- paddingBottom?: spacingValues;
64
- /** paddingLeft is optional. It has not a default value. */
65
- paddingLeft?: spacingValues;
66
- /** paddingRight is optional. It has not a default value. */
67
- paddingRight?: spacingValues;
68
- /** Alternative for padding. Padding is optional. It has not a default value. */
69
- p?: spacingValues;
70
- /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
71
- pt?: spacingValues;
72
- /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
73
- pb?: spacingValues;
74
- /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
75
- pl?: spacingValues;
76
- /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
77
- pr?: spacingValues;
78
- /** Alternative for paddingX. PaddingX is optional. It has not a default value. */
79
- px?: spacingValues;
80
- /** Alternative for paddingY. PaddingY is optional. It has not a default value. */
81
- py?: spacingValues;
82
- /** printHidden is optional. Default value is false. When true, the component is hidden at print. */
83
- printHidden?: boolean;
84
- /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
85
- printVisible?: 'block' | 'inline';
86
- /** Components will be hidden at all screen sizes. */
87
- hidden?: boolean;
88
- /** Components will be hidden from 'xs' screen size and up. */
89
- xsUpHidden?: boolean;
90
- /** Components will be hidden from 'sm' screen size and up. */
91
- smUpHidden?: boolean;
92
- /** Components will be hidden from 'md' screen size and up. */
93
- mdUpHidden?: boolean;
94
- /** Components will be hidden from 'lg' screen size and up. */
95
- lgUpHidden?: boolean;
96
- /** Components will be hidden from 'xl' screen size and up. */
97
- xlUpHidden?: boolean;
98
- /** Components will be hidden between xs and sm screen size. */
99
- xsHidden?: boolean;
100
- /** Components will be hidden between sm and md screen size. */
101
- smHidden?: boolean;
102
- /** Components will be hidden between md and lg screen size. */
103
- mdHidden?: boolean;
104
- /** Components will be hidden between lg and xl screen size. */
105
- lgHidden?: boolean;
106
- /** Components will be hidden between xl and 2xl screen size. */
107
- xlHidden?: boolean;
108
- }
109
- >;
110
-
111
- type spacingValues =
112
- | 0
113
- | 0.5
114
- | 1
115
- | 1.5
116
- | 2
117
- | 2.5
118
- | 3
119
- | 3.5
120
- | 4
121
- | 5
122
- | 6
123
- | 7
124
- | 8
125
- | 9
126
- | 10
127
- | 11
128
- | 12
129
- | 14
130
- | 16
131
- | 20
132
- | 24
133
- | 28
134
- | 32
135
- | 36
136
- | 40
137
- | 44
138
- | 48
139
- | 52
140
- | 56
141
- | 60
142
- | 64
143
- | 72
144
- | 80
145
- | 96;
146
-
147
- /**
148
- * This is the type used in the type annotation for the component
149
- */
150
- type IconBaseComponent = <C extends React.ElementType = 'span'>(
151
- props: IconBaseProps<C>
152
- ) => React.ReactNode | null;
153
-
154
- export const IconBase: IconBaseComponent = React.forwardRef(function Base<
155
- C extends React.ElementType = 'span',
156
- >(
157
- {
158
- as,
159
- margin,
160
- marginTop,
161
- marginBottom,
162
- marginLeft,
163
- marginRight,
164
- m,
165
- mt,
166
- mb,
167
- ml,
168
- mr,
169
- mx,
170
- my,
171
- padding,
172
- paddingTop,
173
- paddingBottom,
174
- paddingLeft,
175
- paddingRight,
176
- p,
177
- pt,
178
- pb,
179
- pr,
180
- pl,
181
- px,
182
- py,
183
- printHidden,
184
- printVisible,
185
- hidden,
186
- xsUpHidden,
187
- smUpHidden,
188
- mdUpHidden,
189
- lgUpHidden,
190
- xlUpHidden,
191
- xsHidden,
192
- smHidden,
193
- mdHidden,
194
- lgHidden,
195
- xlHidden,
196
- children,
197
- className,
198
- ...props
199
- }: IconBaseProps<C>,
200
- ref?: PolymorphicRef<C>
201
- ) {
202
- const Component = as || 'span';
203
-
204
- return (
205
- <Component
206
- as={as}
207
- className={clsx(className, {
208
- [`ds-m-${margin}`]: margin !== undefined ? true : undefined,
209
- [`ds-mt-${marginTop}`]: marginTop !== undefined ? true : undefined,
210
- [`ds-mb-${marginBottom}`]:
211
- marginBottom !== undefined ? true : undefined,
212
- [`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,
213
- [`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,
214
- [`ds-m-${m}`]: m !== undefined ? true : undefined,
215
- [`ds-mt-${mt}`]: mt !== undefined ? true : undefined,
216
- [`ds-mb-${mb}`]: mb !== undefined ? true : undefined,
217
- [`ds-mr-${mr}`]: mr !== undefined ? true : undefined,
218
- [`ds-ml-${ml}`]: ml !== undefined ? true : undefined,
219
- [`ds-mx-${mx}`]: mx !== undefined ? true : undefined,
220
- [`ds-my-${my}`]: my !== undefined ? true : undefined,
221
- [`ds-p-${padding}`]: padding !== undefined ? true : undefined,
222
- [`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,
223
- [`ds-pb-${paddingBottom}`]:
224
- paddingBottom !== undefined ? true : undefined,
225
- [`ds-pr-${paddingRight}`]:
226
- paddingRight !== undefined ? true : undefined,
227
- [`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,
228
- [`ds-p-${p}`]: p !== undefined ? true : undefined,
229
- [`ds-pt-${pt}`]: pt !== undefined ? true : undefined,
230
- [`ds-pb-${pb}`]: pb !== undefined ? true : undefined,
231
- [`ds-pr-${pr}`]: pr !== undefined ? true : undefined,
232
- [`ds-pl-${pl}`]: pl !== undefined ? true : undefined,
233
- [`ds-px-${px}`]: px !== undefined ? true : undefined,
234
- [`ds-py-${py}`]: py !== undefined ? true : undefined,
235
- 'ds-print-hidden': !!printHidden,
236
- 'ds-print-visible-block': printVisible === 'block',
237
- 'ds-print-visible-inline': printVisible === 'inline',
238
- 'ds-hidden': !!hidden,
239
- 'ds-hidden-xs-up': !!xsUpHidden,
240
- 'ds-hidden-sm-up': !!smUpHidden,
241
- 'ds-hidden-md-up': !!mdUpHidden,
242
- 'ds-hidden-lg-up': !!lgUpHidden,
243
- 'ds-hidden-xl-up': !!xlUpHidden,
244
- 'ds-hidden-xs': !!xsHidden,
245
- 'ds-hidden-sm': !!smHidden,
246
- 'ds-hidden-md': !!mdHidden,
247
- 'ds-hidden-lg': !!lgHidden,
248
- 'ds-hidden-xl': !!xlHidden,
249
- })}
250
- ref={ref}
251
- {...props}
252
- >
253
- {children}
254
- </Component>
255
- );
256
- });
257
-
258
- export default IconBase;