linkedunion-design-kit 1.5.2 → 1.5.4

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 (349) hide show
  1. package/dist/app/layout.d.ts +1 -1
  2. package/dist/app/layout.js +7 -11
  3. package/dist/app/page.js +4 -10
  4. package/dist/index.d.ts +15 -12
  5. package/dist/index.js +15 -30
  6. package/dist/jest.config.js +15 -21
  7. package/dist/jest.setup.d.ts +0 -1
  8. package/dist/jest.setup.js +3 -12
  9. package/dist/{components/Color/TextColor/TextColor.stories.d.ts → src/components/Accordion/Accordion.stories.d.ts} +2 -2
  10. package/dist/src/components/Accordion/Accordion.stories.js +32 -0
  11. package/dist/{components → src/components}/Avatar/Avatar.d.ts +1 -1
  12. package/dist/src/components/Avatar/Avatar.js +12 -0
  13. package/dist/src/components/Avatar/Avatar.stories.js +43 -0
  14. package/dist/src/components/Avatar/Avatar.test.js +50 -0
  15. package/dist/src/components/Avatar/index.d.ts +32 -0
  16. package/dist/src/components/Avatar/index.js +32 -0
  17. package/dist/src/components/Avatar/type.d.ts +11 -0
  18. package/dist/src/components/Button/Button.d.ts +3 -0
  19. package/dist/src/components/Button/Button.js +7 -0
  20. package/dist/{components → src/components}/Button/Button.stories.d.ts +2 -1
  21. package/dist/src/components/Button/Button.stories.js +56 -0
  22. package/dist/src/components/Button/Button.test.js +62 -0
  23. package/dist/src/components/Button/IconButton.d.ts +3 -0
  24. package/dist/src/components/Button/IconButton.js +30 -0
  25. package/dist/src/components/Button/IconButton.stories.d.ts +4 -0
  26. package/dist/src/components/Button/IconButton.stories.js +53 -0
  27. package/dist/src/components/Button/IconButton.test.js +30 -0
  28. package/dist/src/components/Button/index.d.ts +39 -0
  29. package/dist/src/components/Button/index.js +39 -0
  30. package/dist/src/components/Button/type.d.ts +23 -0
  31. package/dist/src/components/ColorPicker/ColorPicker.d.ts +3 -0
  32. package/dist/src/components/ColorPicker/ColorPicker.js +27 -0
  33. package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -0
  34. package/dist/src/components/ColorPicker/ColorPicker.stories.js +24 -0
  35. package/dist/src/components/ColorPicker/type.d.ts +4 -0
  36. package/dist/src/components/Colors/color.d.ts +4 -0
  37. package/dist/src/components/Colors/color.js +6 -0
  38. package/dist/src/components/Colors/color.stories.d.ts +7 -0
  39. package/dist/src/components/Colors/color.stories.js +32 -0
  40. package/dist/src/components/Colors/color.test.js +24 -0
  41. package/dist/src/components/EditorTooltip/EditorTooltip.d.ts +5 -0
  42. package/dist/src/components/EditorTooltip/EditorTooltip.js +9 -0
  43. package/dist/src/components/EditorTooltip/EditorTooltip.stories.d.ts +6 -0
  44. package/dist/src/components/EditorTooltip/EditorTooltip.stories.js +24 -0
  45. package/dist/{components → src/components}/Icons/IconList.test.js +18 -20
  46. package/dist/src/components/Icons/IconView.js +8 -0
  47. package/dist/{components → src/components}/Icons/IconView.stories.js +6 -9
  48. package/dist/src/components/Icons/LUIcon.d.ts +3 -0
  49. package/dist/src/components/Icons/LUIcon.js +32 -0
  50. package/dist/src/components/Icons/LUIcon.stories.js +44 -0
  51. package/dist/src/components/Icons/SingleIcon.test.js +67 -0
  52. package/dist/src/components/Icons/index.d.ts +16 -0
  53. package/dist/src/components/Icons/index.js +16 -0
  54. package/dist/src/components/Icons/type.d.ts +8 -0
  55. package/dist/src/components/ImageUploader/ImageUploader.stories.d.ts +6 -0
  56. package/dist/src/components/ImageUploader/ImageUploader.stories.js +18 -0
  57. package/dist/src/components/ImageUploader/type.d.ts +8 -0
  58. package/dist/src/components/Images/LuImage.d.ts +3 -0
  59. package/dist/{components/Typography/Body/Body.js → src/components/Images/LuImage.js} +8 -9
  60. package/dist/src/components/Images/LuImage.stories.d.ts +6 -0
  61. package/dist/src/components/Images/LuImage.stories.js +166 -0
  62. package/dist/src/components/Images/LuImage.test.d.ts +1 -0
  63. package/dist/src/components/Images/LuImage.test.js +56 -0
  64. package/dist/src/components/Images/index.d.ts +19 -0
  65. package/dist/src/components/Images/index.js +19 -0
  66. package/dist/src/components/Images/type.d.ts +7 -0
  67. package/dist/src/components/Images/type.js +1 -0
  68. package/dist/src/components/Input/Input.d.ts +3 -0
  69. package/dist/{components/Typography/Headings/Headings.js → src/components/Input/Input.js} +6 -9
  70. package/dist/src/components/Input/Input.stories.d.ts +5 -0
  71. package/dist/src/components/Input/Input.stories.js +46 -0
  72. package/dist/src/components/Input/index.d.ts +10 -0
  73. package/dist/src/components/Input/index.js +10 -0
  74. package/dist/src/components/Input/type.d.ts +8 -0
  75. package/dist/src/components/Input/type.js +1 -0
  76. package/dist/src/components/Label/Label.d.ts +3 -0
  77. package/dist/{components/Typography/Display/Display.js → src/components/Label/Label.js} +6 -9
  78. package/dist/src/components/Label/Label.stories.d.ts +5 -0
  79. package/dist/src/components/Label/Label.stories.js +36 -0
  80. package/dist/src/components/Label/type.d.ts +9 -0
  81. package/dist/src/components/Label/type.js +1 -0
  82. package/dist/src/components/MediaCard/Card.d.ts +3 -0
  83. package/dist/src/components/MediaCard/Card.js +45 -0
  84. package/dist/src/components/MediaCard/Card.stories.js +57 -0
  85. package/dist/src/components/MediaCard/Card.test.js +28 -0
  86. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfile.d.ts +1 -1
  87. package/dist/src/components/MediaCard/ContactProfile/ContactProfile.js +27 -0
  88. package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.d.ts +1 -0
  89. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfile.test.js +17 -13
  90. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.d.ts +1 -1
  91. package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.js +8 -0
  92. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.test.js +15 -38
  93. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.d.ts +1 -1
  94. package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.js +8 -0
  95. package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.test.js +15 -38
  96. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategory.d.ts +1 -1
  97. package/dist/src/components/MediaCard/PostByCategory/PostByCategory.js +31 -0
  98. package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.d.ts +1 -0
  99. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategory.test.js +18 -13
  100. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.d.ts +1 -1
  101. package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +8 -0
  102. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.test.js +15 -38
  103. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.d.ts +1 -1
  104. package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +8 -0
  105. package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.test.js +16 -39
  106. package/dist/{components → src/components}/MediaCard/index.js +2 -5
  107. package/dist/src/components/MediaCard/type.d.ts +26 -0
  108. package/dist/src/components/MediaCard/type.js +1 -0
  109. package/dist/src/components/Switch/Switch.d.ts +3 -0
  110. package/dist/src/components/Switch/Switch.js +7 -0
  111. package/dist/{components/Spacing/Padding/PaddingToken.stories.d.ts → src/components/Switch/Switch.stories.d.ts} +1 -1
  112. package/dist/src/components/Switch/Switch.stories.js +78 -0
  113. package/dist/src/components/Switch/type.d.ts +5 -0
  114. package/dist/src/components/Switch/type.js +1 -0
  115. package/dist/src/components/Title/Title.js +8 -0
  116. package/dist/src/components/Title/Title.module.css +43 -0
  117. package/dist/{components → src/components}/Title/Title.stories.js +9 -15
  118. package/dist/src/components/Title/Title.test.d.ts +1 -0
  119. package/dist/src/components/Title/Title.test.js +25 -0
  120. package/dist/src/components/Typography/Typography.d.ts +3 -0
  121. package/dist/src/components/Typography/Typography.js +29 -0
  122. package/dist/src/components/Typography/Typography.stories.d.ts +5 -0
  123. package/dist/src/components/Typography/Typography.stories.js +37 -0
  124. package/dist/src/components/Typography/type.d.ts +7 -0
  125. package/dist/src/components/Typography/type.js +1 -0
  126. package/dist/src/components/ui/accordion.d.ts +7 -0
  127. package/dist/src/components/ui/accordion.js +43 -0
  128. package/dist/src/components/ui/button.d.ts +10 -0
  129. package/dist/src/components/ui/button.js +54 -0
  130. package/dist/src/components/ui/imageUploader.d.ts +3 -0
  131. package/dist/src/components/ui/imageUploader.js +68 -0
  132. package/dist/src/components/ui/input.d.ts +3 -0
  133. package/dist/src/components/ui/input.js +29 -0
  134. package/dist/src/components/ui/label.d.ts +12 -0
  135. package/dist/src/components/ui/label.js +41 -0
  136. package/dist/src/components/ui/switch.d.ts +22 -0
  137. package/dist/src/components/ui/switch.js +70 -0
  138. package/dist/src/components/ui/tooltip.d.ts +7 -0
  139. package/dist/src/components/ui/tooltip.js +42 -0
  140. package/dist/src/components/ui/typography.d.ts +26 -0
  141. package/dist/src/components/ui/typography.js +65 -0
  142. package/dist/src/lib/utils.d.ts +2 -0
  143. package/dist/src/lib/utils.js +9 -0
  144. package/dist/src/utils/colors.d.ts +70 -0
  145. package/dist/src/utils/colors.js +70 -0
  146. package/dist/{utils → src/utils}/constants.d.ts +2 -0
  147. package/dist/src/utils/constants.js +4 -0
  148. package/dist/src/utils/enums.d.ts +9 -0
  149. package/dist/src/utils/enums.js +11 -0
  150. package/dist/{utils → src/utils}/iconList.js +6 -4
  151. package/dist/src/utils/index.d.ts +18 -0
  152. package/dist/src/utils/index.js +20 -0
  153. package/dist/styles/global.css +2739 -4141
  154. package/dist/tailwind.config.js +10 -178
  155. package/package.json +19 -7
  156. package/dist/.next/types/app/page.d.ts +0 -8
  157. package/dist/.next/types/app/page.js +0 -57
  158. package/dist/app/scripts.d.ts +0 -2
  159. package/dist/app/scripts.js +0 -16
  160. package/dist/components/Avatar/Avatar.js +0 -15
  161. package/dist/components/Avatar/Avatar.stories.js +0 -52
  162. package/dist/components/Avatar/Avatar.test.js +0 -54
  163. package/dist/components/Border/BorderRadius/BorderRadius.d.ts +0 -2
  164. package/dist/components/Border/BorderRadius/BorderRadius.js +0 -11
  165. package/dist/components/Border/BorderRadius/BorderRadius.stories.d.ts +0 -4
  166. package/dist/components/Border/BorderRadius/BorderRadius.stories.js +0 -38
  167. package/dist/components/Border/BorderRadius/BorderRadius.test.js +0 -25
  168. package/dist/components/Border/BorderRadius/BorderRadiusTable.d.ts +0 -1
  169. package/dist/components/Border/BorderRadius/BorderRadiusTable.js +0 -9
  170. package/dist/components/Border/BorderRadius/BorderRadiusView.d.ts +0 -2
  171. package/dist/components/Border/BorderRadius/BorderRadiusView.js +0 -9
  172. package/dist/components/Border/BorderWidth/BorderWidth.d.ts +0 -2
  173. package/dist/components/Border/BorderWidth/BorderWidth.js +0 -11
  174. package/dist/components/Border/BorderWidth/BorderWidth.stories.d.ts +0 -4
  175. package/dist/components/Border/BorderWidth/BorderWidth.stories.js +0 -38
  176. package/dist/components/Border/BorderWidth/BorderWidth.test.js +0 -25
  177. package/dist/components/Border/BorderWidth/BorderWidthTable.d.ts +0 -1
  178. package/dist/components/Border/BorderWidth/BorderWidthTable.js +0 -9
  179. package/dist/components/Border/BorderWidth/ViewBorderWidth.d.ts +0 -2
  180. package/dist/components/Border/BorderWidth/ViewBorderWidth.js +0 -9
  181. package/dist/components/Button/Button.d.ts +0 -3
  182. package/dist/components/Button/Button.js +0 -22
  183. package/dist/components/Button/Button.stories.js +0 -160
  184. package/dist/components/Button/Button.test.d.ts +0 -1
  185. package/dist/components/Button/Button.test.js +0 -54
  186. package/dist/components/Button/index.d.ts +0 -4
  187. package/dist/components/Button/index.js +0 -8
  188. package/dist/components/Color/BackgroundColor/BackgroundColor.d.ts +0 -2
  189. package/dist/components/Color/BackgroundColor/BackgroundColor.js +0 -9
  190. package/dist/components/Color/BackgroundColor/BackgroundColor.stories.d.ts +0 -10
  191. package/dist/components/Color/BackgroundColor/BackgroundColor.stories.js +0 -103
  192. package/dist/components/Color/BackgroundColor/BackgroundColor.test.js +0 -17
  193. package/dist/components/Color/BackgroundColor/index.d.ts +0 -7
  194. package/dist/components/Color/BackgroundColor/index.js +0 -18
  195. package/dist/components/Color/Color.test.d.ts +0 -1
  196. package/dist/components/Color/Color.test.js +0 -38
  197. package/dist/components/Color/TextColor/TextColor.d.ts +0 -3
  198. package/dist/components/Color/TextColor/TextColor.js +0 -9
  199. package/dist/components/Color/TextColor/TextColor.stories.js +0 -35
  200. package/dist/components/Color/TextColor/TextColor.test.d.ts +0 -1
  201. package/dist/components/Color/TextColor/TextColor.test.js +0 -43
  202. package/dist/components/Icons/IconView.js +0 -11
  203. package/dist/components/Icons/LUIcon.d.ts +0 -3
  204. package/dist/components/Icons/LUIcon.js +0 -11
  205. package/dist/components/Icons/LUIcon.stories.js +0 -56
  206. package/dist/components/Icons/SingleIcon.test.js +0 -53
  207. package/dist/components/Images/LuImage.d.ts +0 -3
  208. package/dist/components/Images/LuImage.js +0 -14
  209. package/dist/components/Images/LuImage.stories.d.ts +0 -4
  210. package/dist/components/Images/LuImage.stories.js +0 -53
  211. package/dist/components/Images/LuImage.test.d.ts +0 -1
  212. package/dist/components/Images/LuImage.test.js +0 -68
  213. package/dist/components/MediaCard/Card.d.ts +0 -3
  214. package/dist/components/MediaCard/Card.js +0 -48
  215. package/dist/components/MediaCard/Card.stories.js +0 -61
  216. package/dist/components/MediaCard/Card.test.js +0 -33
  217. package/dist/components/MediaCard/ContactProfile/ContactProfile.js +0 -27
  218. package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.js +0 -16
  219. package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.js +0 -16
  220. package/dist/components/MediaCard/PostByCategory/PostByCategory.js +0 -27
  221. package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +0 -16
  222. package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +0 -16
  223. package/dist/components/MediaCard/card.module.css +0 -52
  224. package/dist/components/Size/MinWidthHeight.d.ts +0 -3
  225. package/dist/components/Size/MinWidthHeight.js +0 -8
  226. package/dist/components/Size/MinWidthHeight.stories.d.ts +0 -5
  227. package/dist/components/Size/MinWidthHeight.stories.js +0 -46
  228. package/dist/components/Size/MinWidthHeight.test.d.ts +0 -1
  229. package/dist/components/Size/MinWidthHeight.test.js +0 -34
  230. package/dist/components/Size/Size.d.ts +0 -4
  231. package/dist/components/Size/Size.js +0 -10
  232. package/dist/components/Size/Size.stories.d.ts +0 -6
  233. package/dist/components/Size/Size.stories.js +0 -35
  234. package/dist/components/Size/Size.test.d.ts +0 -1
  235. package/dist/components/Size/Size.test.js +0 -73
  236. package/dist/components/Size/WidthAndHeight.test.d.ts +0 -1
  237. package/dist/components/Size/WidthAndHeight.test.js +0 -34
  238. package/dist/components/Size/WidthHeight.d.ts +0 -3
  239. package/dist/components/Size/WidthHeight.js +0 -8
  240. package/dist/components/Size/WidthHeight.stories.d.ts +0 -5
  241. package/dist/components/Size/WidthHeight.stories.js +0 -46
  242. package/dist/components/Spacing/Margin/Margin.d.ts +0 -1
  243. package/dist/components/Spacing/Margin/Margin.js +0 -9
  244. package/dist/components/Spacing/Margin/MarginBottom.d.ts +0 -1
  245. package/dist/components/Spacing/Margin/MarginBottom.js +0 -9
  246. package/dist/components/Spacing/Margin/MarginLeft.d.ts +0 -1
  247. package/dist/components/Spacing/Margin/MarginLeft.js +0 -9
  248. package/dist/components/Spacing/Margin/MarginRight.d.ts +0 -1
  249. package/dist/components/Spacing/Margin/MarginRight.js +0 -9
  250. package/dist/components/Spacing/Margin/MarginToken.d.ts +0 -1
  251. package/dist/components/Spacing/Margin/MarginToken.js +0 -16
  252. package/dist/components/Spacing/Margin/MarginToken.stories.d.ts +0 -4
  253. package/dist/components/Spacing/Margin/MarginToken.stories.js +0 -22
  254. package/dist/components/Spacing/Margin/MarginToken.test.js +0 -22
  255. package/dist/components/Spacing/Margin/MarginTop.d.ts +0 -1
  256. package/dist/components/Spacing/Margin/MarginTop.js +0 -9
  257. package/dist/components/Spacing/Margin/MarginX.d.ts +0 -1
  258. package/dist/components/Spacing/Margin/MarginX.js +0 -9
  259. package/dist/components/Spacing/Margin/MarginY.d.ts +0 -1
  260. package/dist/components/Spacing/Margin/MarginY.js +0 -9
  261. package/dist/components/Spacing/Padding/Padding.d.ts +0 -1
  262. package/dist/components/Spacing/Padding/Padding.js +0 -9
  263. package/dist/components/Spacing/Padding/PaddingBottom.d.ts +0 -1
  264. package/dist/components/Spacing/Padding/PaddingBottom.js +0 -9
  265. package/dist/components/Spacing/Padding/PaddingLeft.d.ts +0 -1
  266. package/dist/components/Spacing/Padding/PaddingLeft.js +0 -9
  267. package/dist/components/Spacing/Padding/PaddingRight.d.ts +0 -1
  268. package/dist/components/Spacing/Padding/PaddingRight.js +0 -9
  269. package/dist/components/Spacing/Padding/PaddingToken.d.ts +0 -1
  270. package/dist/components/Spacing/Padding/PaddingToken.js +0 -16
  271. package/dist/components/Spacing/Padding/PaddingToken.stories.js +0 -22
  272. package/dist/components/Spacing/Padding/PaddingToken.test.js +0 -22
  273. package/dist/components/Spacing/Padding/PaddingTop.d.ts +0 -1
  274. package/dist/components/Spacing/Padding/PaddingTop.js +0 -9
  275. package/dist/components/Spacing/Padding/PaddingX.d.ts +0 -1
  276. package/dist/components/Spacing/Padding/PaddingX.js +0 -9
  277. package/dist/components/Spacing/Padding/PaddingY.d.ts +0 -1
  278. package/dist/components/Spacing/Padding/PaddingY.js +0 -9
  279. package/dist/components/Title/Title.js +0 -13
  280. package/dist/components/Title/Title.module.css +0 -56
  281. package/dist/components/Title/Title.test.js +0 -30
  282. package/dist/components/Typography/Body/Body.d.ts +0 -3
  283. package/dist/components/Typography/Body/Body.stories.d.ts +0 -6
  284. package/dist/components/Typography/Body/Body.stories.js +0 -75
  285. package/dist/components/Typography/Body/body.test.d.ts +0 -1
  286. package/dist/components/Typography/Body/body.test.js +0 -49
  287. package/dist/components/Typography/Body/index.d.ts +0 -14
  288. package/dist/components/Typography/Body/index.js +0 -53
  289. package/dist/components/Typography/Body/type.d.ts +0 -7
  290. package/dist/components/Typography/Body/type.js +0 -2
  291. package/dist/components/Typography/Display/Display.d.ts +0 -3
  292. package/dist/components/Typography/Display/Display.stories.d.ts +0 -6
  293. package/dist/components/Typography/Display/Display.stories.js +0 -79
  294. package/dist/components/Typography/Display/Display.test.d.ts +0 -1
  295. package/dist/components/Typography/Display/Display.test.js +0 -49
  296. package/dist/components/Typography/Display/index.d.ts +0 -38
  297. package/dist/components/Typography/Display/index.js +0 -64
  298. package/dist/components/Typography/Display/type.d.ts +0 -8
  299. package/dist/components/Typography/Display/type.js +0 -2
  300. package/dist/components/Typography/Headings/Heading.test.d.ts +0 -1
  301. package/dist/components/Typography/Headings/Heading.test.js +0 -49
  302. package/dist/components/Typography/Headings/Headings.d.ts +0 -3
  303. package/dist/components/Typography/Headings/Headings.stories.d.ts +0 -6
  304. package/dist/components/Typography/Headings/Headings.stories.js +0 -69
  305. package/dist/components/Typography/Headings/index.d.ts +0 -21
  306. package/dist/components/Typography/Headings/index.js +0 -71
  307. package/dist/components/Typography/Headings/type.d.ts +0 -6
  308. package/dist/components/Typography/Headings/type.js +0 -2
  309. package/dist/components/Typography/Typography.css +0 -3016
  310. package/dist/components/Typography/Typography.d.ts +0 -2
  311. package/dist/components/Typography/Typography.js +0 -9
  312. package/dist/components/Typography/Typography.stories.d.ts +0 -5
  313. package/dist/components/Typography/Typography.stories.js +0 -87
  314. package/dist/components/Typography/Typography.test.d.ts +0 -1
  315. package/dist/components/Typography/Typography.test.js +0 -42
  316. package/dist/global/components/Table/Table.d.ts +0 -14
  317. package/dist/global/components/Table/Table.js +0 -14
  318. package/dist/utils/colors.d.ts +0 -7
  319. package/dist/utils/colors.js +0 -10
  320. package/dist/utils/constants.js +0 -5
  321. package/dist/utils/enums.d.ts +0 -60
  322. package/dist/utils/enums.js +0 -69
  323. package/dist/utils/index.d.ts +0 -1448
  324. package/dist/utils/index.js +0 -1597
  325. /package/dist/{components → src/components}/Avatar/Avatar.stories.d.ts +0 -0
  326. /package/dist/{components → src/components}/Avatar/Avatar.test.d.ts +0 -0
  327. /package/dist/{components/Border/BorderRadius/BorderRadius.test.d.ts → src/components/Avatar/type.js} +0 -0
  328. /package/dist/{components/Border/BorderWidth/BorderWidth.test.d.ts → src/components/Button/Button.test.d.ts} +0 -0
  329. /package/dist/{components/Color/BackgroundColor/BackgroundColor.test.d.ts → src/components/Button/IconButton.test.d.ts} +0 -0
  330. /package/dist/{components/Icons/IconList.test.d.ts → src/components/Button/type.js} +0 -0
  331. /package/dist/{components/Icons/SingleIcon.test.d.ts → src/components/ColorPicker/type.js} +0 -0
  332. /package/dist/{components/MediaCard/ContactProfile/ContactProfile.test.d.ts → src/components/Colors/color.test.d.ts} +0 -0
  333. /package/dist/{components/MediaCard/PostByCategory/PostByCategory.test.d.ts → src/components/Icons/IconList.test.d.ts} +0 -0
  334. /package/dist/{components → src/components}/Icons/IconView.d.ts +0 -0
  335. /package/dist/{components → src/components}/Icons/IconView.stories.d.ts +0 -0
  336. /package/dist/{components → src/components}/Icons/LUIcon.stories.d.ts +0 -0
  337. /package/dist/{components/Spacing/Margin/MarginToken.test.d.ts → src/components/Icons/SingleIcon.test.d.ts} +0 -0
  338. /package/dist/{components/Spacing/Padding/PaddingToken.test.d.ts → src/components/Icons/type.js} +0 -0
  339. /package/dist/{components/Title/Title.test.d.ts → src/components/ImageUploader/type.js} +0 -0
  340. /package/dist/{components → src/components}/MediaCard/Card.stories.d.ts +0 -0
  341. /package/dist/{components → src/components}/MediaCard/Card.test.d.ts +0 -0
  342. /package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme1.test.d.ts +0 -0
  343. /package/dist/{components → src/components}/MediaCard/ContactProfile/ContactProfileTheme2.test.d.ts +0 -0
  344. /package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme1.test.d.ts +0 -0
  345. /package/dist/{components → src/components}/MediaCard/PostByCategory/PostByCategoryTheme2.test.d.ts +0 -0
  346. /package/dist/{components → src/components}/MediaCard/index.d.ts +0 -0
  347. /package/dist/{components → src/components}/Title/Title.d.ts +0 -0
  348. /package/dist/{components → src/components}/Title/Title.stories.d.ts +0 -0
  349. /package/dist/{utils → src/utils}/iconList.d.ts +0 -0
@@ -0,0 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Label from "./Label";
14
+ import { variant } from "../ui/label";
15
+ export default {
16
+ title: "Components/Label",
17
+ component: Label,
18
+ tags: ["autodocs"],
19
+ };
20
+ var Template = function (args) { return _jsx(Label, __assign({}, args)); };
21
+ export var _Label = Template.bind({});
22
+ _Label.args = {
23
+ children: "Label",
24
+ variant: "default",
25
+ };
26
+ _Label.argTypes = {
27
+ variant: {
28
+ control: { type: "select" },
29
+ options: Object.keys(variant),
30
+ description: "Label variant",
31
+ table: {
32
+ defaultValue: { summary: "default" },
33
+ type: { summary: "string" },
34
+ },
35
+ },
36
+ };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import React from "react";
3
+ import { labelVariants } from "../ui/label";
4
+ export interface LabelProps extends React.HTMLAttributes<HTMLLabelElement> {
5
+ htmlFor?: string;
6
+ className?: string;
7
+ children: React.ReactNode;
8
+ variant?: VariantProps<typeof labelVariants>["variant"];
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { CardProps } from "./type";
2
+ declare const Card: ({ type, layout, id, className, image, heading, body, href, btnLabel, cardStyle, }: CardProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Card;
@@ -0,0 +1,45 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { PostByCategory } from "./PostByCategory/PostByCategory";
14
+ import { colors } from "../../utils/colors";
15
+ import { defaultCardProps } from "../../utils";
16
+ import { ContactProfile } from "./ContactProfile/ContactProfile";
17
+ import { SectionTypeEnum } from "./index";
18
+ import { OrientationEnum } from "../../utils/enums";
19
+ var Card = function (_a) {
20
+ var _b = _a.type, type = _b === void 0 ? SectionTypeEnum.postByCategoriesTheme : _b, _c = _a.layout, layout = _c === void 0 ? OrientationEnum.horizontal : _c, _d = _a.id, id = _d === void 0 ? 1 : _d, _e = _a.className, className = _e === void 0 ? "" : _e, _f = _a.image, image = _f === void 0 ? defaultCardProps.image : _f, _g = _a.heading, heading = _g === void 0 ? defaultCardProps.heading : _g, _h = _a.body, body = _h === void 0 ? defaultCardProps.body : _h, _j = _a.href, href = _j === void 0 ? defaultCardProps.href : _j, _k = _a.btnLabel, btnLabel = _k === void 0 ? defaultCardProps.btnLabel : _k, _l = _a.cardStyle, cardStyle = _l === void 0 ? {
21
+ card_title_color: "",
22
+ card_description_color: "",
23
+ card_shadow_toggle: 1,
24
+ card_shadow_color: "rgba(52, 52, 52, 0.15)",
25
+ card_background_color: colors.white,
26
+ card_button_background_color: colors["neutral-0"],
27
+ card_button_text_color: colors.black,
28
+ card_image_border_color: colors === null || colors === void 0 ? void 0 : colors.black,
29
+ card_image_border_radius: "0",
30
+ card_image_border: "0",
31
+ } : _l;
32
+ var data = {
33
+ id: id,
34
+ image: image,
35
+ layout: layout,
36
+ heading: heading,
37
+ body: body,
38
+ className: className,
39
+ btnLabel: btnLabel,
40
+ href: href,
41
+ cardStyle: cardStyle,
42
+ };
43
+ return (_jsxs(_Fragment, { children: [type === SectionTypeEnum.postByCategoriesTheme && (_jsx(PostByCategory, __assign({}, data))), type === SectionTypeEnum.contactsProfileTheme && (_jsx(ContactProfile, __assign({}, data)))] }));
44
+ };
45
+ export default Card;
@@ -0,0 +1,57 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Card from "./Card";
14
+ import { sectionTypeList } from "../../utils";
15
+ import { SectionTypeEnum } from ".";
16
+ import { OrientationEnum } from "../../utils/enums";
17
+ export default {
18
+ title: "Components/Card",
19
+ component: Card,
20
+ };
21
+ var Template = function (args) { return (_jsx(Card, __assign({ image: "", href: "" }, args))); };
22
+ export var _Card = Template.bind({});
23
+ _Card.args = {
24
+ type: SectionTypeEnum.postByCategoriesTheme,
25
+ image: "/images/demo-image.jpg",
26
+ heading: "Heading Text",
27
+ body: "The quick brown fox jumps over the lazy dog.",
28
+ layout: OrientationEnum.horizontal,
29
+ btnLabel: "View More",
30
+ href: "https://www.google.com/",
31
+ cardStyle: {
32
+ card_title_color: "",
33
+ card_description_color: "",
34
+ card_shadow_toggle: 0,
35
+ card_shadow_color: "",
36
+ card_background_color: "",
37
+ card_button_background_color: "",
38
+ card_button_text_color: "",
39
+ card_image_border_color: "",
40
+ card_image_border_radius: "",
41
+ card_image_border: "",
42
+ },
43
+ id: 1,
44
+ };
45
+ _Card.argTypes = {
46
+ layout: {
47
+ control: { type: "select" },
48
+ options: [OrientationEnum.horizontal, OrientationEnum.vertical],
49
+ },
50
+ type: {
51
+ control: {
52
+ type: "select",
53
+ labels: Object.fromEntries(sectionTypeList.map(function (type) { return [type.key, type.label]; })),
54
+ },
55
+ options: sectionTypeList.map(function (type) { return type.key; }),
56
+ },
57
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render, screen } from "@testing-library/react";
3
+ import "@testing-library/jest-dom";
4
+ import Card from "./Card";
5
+ import { SectionTypeEnum } from "./index";
6
+ jest.mock("./PostByCategory/PostByCategory", function () { return ({
7
+ PostByCategory: jest.fn(function () { return _jsx("div", { children: "PostByCategory Component" }); }),
8
+ }); });
9
+ jest.mock("./ContactProfile/ContactProfile", function () { return ({
10
+ ContactProfile: jest.fn(function () { return _jsx("div", { children: "ContactProfile Component" }); }),
11
+ }); });
12
+ describe("Card Component", function () {
13
+ it("renders ContactProfile when no prop pass", function () {
14
+ render(_jsx(Card, { href: "#", image: "" }));
15
+ // Check that the PostByCategory component is rendered
16
+ expect(screen.getByText("PostByCategory Component")).toBeInTheDocument();
17
+ });
18
+ it("renders PostByCategory when type is postByCategoriesTheme", function () {
19
+ render(_jsx(Card, { type: SectionTypeEnum.postByCategoriesTheme, href: "#", image: "" }));
20
+ // Check that the PostByCategory component is rendered
21
+ expect(screen.getByText("PostByCategory Component")).toBeInTheDocument();
22
+ });
23
+ it("renders ContactProfile when type is contactsProfileTheme", function () {
24
+ render(_jsx(Card, { type: SectionTypeEnum.contactsProfileTheme, href: "#", image: "" }));
25
+ // Check that the ContactProfile component is rendered
26
+ expect(screen.getByText("ContactProfile Component")).toBeInTheDocument();
27
+ });
28
+ });
@@ -1,2 +1,2 @@
1
- import { CardProps } from "@/types/interface";
1
+ import { CardProps } from "../type";
2
2
  export declare const ContactProfile: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { ContactProfileTheme1 } from "./ContactProfileTheme1";
14
+ import { ContactProfileTheme2 } from "./ContactProfileTheme2";
15
+ import { colors } from "../../../utils/colors";
16
+ import { OrientationEnum } from "../../../utils/enums";
17
+ export var ContactProfile = function (props) {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19
+ return (_jsxs("div", { children: [props.layout === OrientationEnum.horizontal ? (_jsx(ContactProfileTheme1, __assign({}, props))) : (_jsx(_Fragment, { children: _jsx(ContactProfileTheme2, __assign({}, props)) })), _jsx("style", { jsx: true, global: true, children: "\n .card_ContactProfile_title_color_".concat(props.id, " {\n color: ").concat(((_a = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color) || (colors === null || colors === void 0 ? void 0 : colors.black), ";\n }\n .card_ContactProfile_designation_color_").concat(props.id, " {\n color: ").concat(((_b = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color) ||
20
+ colors["neutral-500"], ";\n }\n .card_shadow_ContactProfile_").concat(props.id, " {\n box-shadow: ").concat(((_c = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
21
+ ? "0px 4px 12px 0px ".concat(((_d = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color) || "rgba(52, 52, 52, 0.15)") //TODO: change shadow with our color theme
22
+ : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_ContactProfile_").concat(props.id, " {\n background-color: ").concat(((_e = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color) ||
23
+ colors.white, " !important;\n }\n .card_ContactProfile_btn_").concat(props.id, " {\n background-color: ").concat(((_f = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color) || colors["neutral-0"], ";\n color: ").concat(((_g = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color) ||
24
+ colors["neutral-1000"], ";\n }\n .card_ContactProfile_btn_").concat(props.id, ":hover {\n background-color: ").concat(((_h = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_background_color) || colors["neutral-0"], " !important;\n color: ").concat(((_j = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_text_color) ||
25
+ colors["neutral-1000"], " !important;\n fill: ").concat(((_k = props === null || props === void 0 ? void 0 : props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color) ||
26
+ colors["neutral-1000"], " !important;\n }\n ") })] }));
27
+ };
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -10,14 +9,15 @@ var __assign = (this && this.__assign) || function () {
10
9
  };
11
10
  return __assign.apply(this, arguments);
12
11
  };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- var jsx_runtime_1 = require("react/jsx-runtime");
15
- var react_1 = require("@testing-library/react");
16
- var ContactProfile_1 = require("./ContactProfile");
17
- var enums_1 = require("../../../utils/enums");
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { render, screen } from "@testing-library/react";
14
+ import { ContactProfile } from "./ContactProfile";
15
+ import { OrientationEnum } from "../../../utils/enums";
18
16
  var mockProps = {
19
17
  id: 1,
20
- layout: enums_1.OrientationEnum.horizontal,
18
+ layout: OrientationEnum.horizontal,
19
+ href: "",
20
+ image: "/images/demo-image.jpg",
21
21
  cardStyle: {
22
22
  card_title_color: "#000000",
23
23
  card_description_color: "#666666",
@@ -30,15 +30,15 @@ var mockProps = {
30
30
  };
31
31
  describe("ContactProfile Component", function () {
32
32
  it("renders ContactProfileTheme1 when layout is horizontal", function () {
33
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfile_1.ContactProfile, __assign({}, mockProps)));
34
- expect(react_1.screen.getByTestId("contact-profile-theme1")).toBeInTheDocument();
33
+ render(_jsx(ContactProfile, __assign({}, mockProps)));
34
+ expect(screen.getByTestId("contact-profile-theme1")).toBeInTheDocument();
35
35
  });
36
36
  it("renders ContactProfileTheme2 when layout is vertical", function () {
37
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfile_1.ContactProfile, __assign({}, mockProps, { layout: enums_1.OrientationEnum.vertical })));
38
- expect(react_1.screen.getByTestId("contact-profile-theme2")).toBeInTheDocument();
37
+ render(_jsx(ContactProfile, __assign({}, mockProps, { layout: OrientationEnum.vertical })));
38
+ expect(screen.getByTestId("contact-profile-theme2")).toBeInTheDocument();
39
39
  });
40
40
  it("applies correct styles based on id", function () {
41
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfile_1.ContactProfile, __assign({}, mockProps)));
41
+ render(_jsx(ContactProfile, __assign({}, mockProps, { layout: OrientationEnum.vertical })));
42
42
  var styles = document.styleSheets[document.styleSheets.length - 1].cssRules;
43
43
  expect(Array.from(styles).some(function (rule) {
44
44
  return rule.cssText.includes(".card_ContactProfile_title_color_1");
@@ -48,10 +48,14 @@ describe("ContactProfile Component", function () {
48
48
  })).toBeTruthy();
49
49
  });
50
50
  it("applies default shadow when card_shadow_toggle is not 1", function () {
51
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfile_1.ContactProfile, __assign({}, mockProps, { cardStyle: __assign(__assign({}, mockProps.cardStyle), { card_shadow_toggle: 0 }) })));
51
+ render(_jsx(ContactProfile, __assign({}, mockProps, { cardStyle: __assign(__assign({}, mockProps.cardStyle), { card_shadow_toggle: 0 }) })));
52
52
  var styles = document.styleSheets[document.styleSheets.length - 1].cssRules;
53
53
  expect(Array.from(styles).some(function (rule) {
54
54
  return rule.cssText.includes("box-shadow: 0px 4px 12px 0px rgba(52, 52, 52, 0.15)");
55
55
  })).toBeTruthy();
56
56
  });
57
+ it("renders correctly when cardStyle is undefined", function () {
58
+ render(_jsx(ContactProfile, __assign({}, mockProps, { cardStyle: undefined })));
59
+ expect(screen.getByTestId("contact-profile-theme1")).toBeInTheDocument();
60
+ });
57
61
  });
@@ -1,2 +1,2 @@
1
- import { CardProps } from "@/types/interface";
1
+ import { CardProps } from "../type";
2
2
  export declare const ContactProfileTheme1: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from "next/link";
3
+ import LuImage from "../../../components/Images/LuImage";
4
+ import Button from "../../../components/Button/Button";
5
+ import LUIcon from "../../../components/Icons/LUIcon";
6
+ export var ContactProfileTheme1 = function (props) {
7
+ return (_jsxs("div", { "data-testid": "contact-profile-theme1", className: "p-5 card_bg_ContactProfile_".concat(props.id, " rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id), children: [_jsxs("div", { className: "flex gap-x-5", children: [_jsx("div", { className: "max-w-[240px] overflow-hidden aspect-square max-xs:hidden", children: _jsx(LuImage, { src: props.image, width: 160, height: 160, className: "rounded-full h-full object-cover", alt: "Contact Profile" }) }), _jsx("div", { className: "flex flex-1 flex-col", children: _jsxs("div", { className: "flex flex-col justify-center flex-1 h-full", children: [_jsx("div", { className: "card_ContactProfile_title_color_".concat(props.id, " text-2xl font-semibold capitalize line-clamp-1"), children: props.heading }), _jsx("p", { className: "text-base font-extralight line-clamp-2 max-xs:line-clamp-1 max-xs:mt-[7px] card_ContactProfile_designation_color_".concat(props.id), children: props.body })] }) })] }), _jsx(Link, { href: props.href, passHref: true, className: "w-full no-underline", children: _jsx(Button, { endIcon: _jsx(LUIcon, { icon: "angle-right", size: "sm" }), size: "lg", className: "rounded justify-between w-full mt-4 max-xs:mt-2.5 card_ContactProfile_btn_".concat(props.id), children: props.btnLabel }) })] }));
8
+ };
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -46,15 +45,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
46
  }
48
47
  };
49
- var __importDefault = (this && this.__importDefault) || function (mod) {
50
- return (mod && mod.__esModule) ? mod : { "default": mod };
51
- };
52
- Object.defineProperty(exports, "__esModule", { value: true });
53
- var jsx_runtime_1 = require("react/jsx-runtime");
54
- var react_1 = require("@testing-library/react");
55
- require("@testing-library/jest-dom");
56
- var ContactProfileTheme1_1 = require("./ContactProfileTheme1");
57
- var user_event_1 = __importDefault(require("@testing-library/user-event"));
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
+ import { render, screen } from "@testing-library/react";
50
+ import "@testing-library/jest-dom";
51
+ import { ContactProfileTheme1 } from "./ContactProfileTheme1";
52
+ import userEvent from "@testing-library/user-event";
58
53
  describe("ContactProfileTheme1 Component", function () {
59
54
  var mockProps = {
60
55
  id: 1,
@@ -65,37 +60,24 @@ describe("ContactProfileTheme1 Component", function () {
65
60
  href: "/profile",
66
61
  className: "custom-class",
67
62
  };
68
- jest.mock("next/image", function () { return ({
69
- __esModule: true,
70
- default: function (props) {
71
- var _a;
72
- return ((0, jsx_runtime_1.jsx)("img", __assign({}, props, { alt: props.btnLabel || "", id: (_a = props.id) === null || _a === void 0 ? void 0 : _a.toString() })));
73
- },
74
- }); });
75
63
  it("Render the contact profile theme1 with correct body and heading text", function () {
76
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, mockProps)));
77
- var headingElement = react_1.screen.getByText(mockProps.heading);
78
- var bodyElement = react_1.screen.getByText(mockProps.body);
64
+ render(_jsx(ContactProfileTheme1, __assign({}, mockProps)));
65
+ var headingElement = screen.getByText(mockProps.heading);
66
+ var bodyElement = screen.getByText(mockProps.body);
79
67
  expect(headingElement).toBeInTheDocument();
80
68
  expect(bodyElement).toBeInTheDocument();
81
69
  });
82
- it("renders the profile image", function () {
83
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, mockProps)));
84
- var profileImage = react_1.screen.getByAltText("Image");
85
- expect(profileImage).toBeInTheDocument();
86
- expect(profileImage).toHaveAttribute("alt", "Image"); // Matches the default alt in LuImage
87
- });
88
70
  it("renders the button with correct label and icon", function () {
89
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, mockProps)));
90
- var buttonElement = react_1.screen.getByRole("button", {
71
+ render(_jsx(ContactProfileTheme1, __assign({}, mockProps)));
72
+ var buttonElement = screen.getByRole("button", {
91
73
  name: mockProps.btnLabel,
92
74
  });
93
75
  expect(buttonElement).toBeInTheDocument();
94
76
  expect(buttonElement).toHaveTextContent(mockProps.btnLabel);
95
77
  });
96
78
  it("renders the link with the correct href", function () {
97
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, mockProps)));
98
- var linkElement = react_1.screen.getByRole("link");
79
+ render(_jsx(ContactProfileTheme1, __assign({}, mockProps)));
80
+ var linkElement = screen.getByRole("link");
99
81
  expect(linkElement).toHaveAttribute("href", mockProps.href);
100
82
  });
101
83
  it("triggers navigation when the button is clicked", function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -103,9 +85,9 @@ describe("ContactProfileTheme1 Component", function () {
103
85
  return __generator(this, function (_a) {
104
86
  switch (_a.label) {
105
87
  case 0:
106
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, mockProps)));
107
- user = user_event_1.default.setup();
108
- linkElement = react_1.screen.getByRole("link");
88
+ render(_jsx(ContactProfileTheme1, __assign({}, mockProps)));
89
+ user = userEvent.setup();
90
+ linkElement = screen.getByRole("link");
109
91
  return [4 /*yield*/, user.click(linkElement)];
110
92
  case 1:
111
93
  _a.sent();
@@ -114,9 +96,4 @@ describe("ContactProfileTheme1 Component", function () {
114
96
  }
115
97
  });
116
98
  }); });
117
- it("renders without crashing when href is undefined", function () {
118
- var propsWithoutHref = __assign(__assign({}, mockProps), { href: undefined });
119
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, propsWithoutHref)));
120
- expect(react_1.screen.getByRole("button")).toBeInTheDocument();
121
- });
122
99
  });
@@ -1,2 +1,2 @@
1
- import { CardProps } from "@/types/interface";
1
+ import { CardProps } from "../type";
2
2
  export declare const ContactProfileTheme2: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from "next/link";
3
+ import LuImage from "../../../components/Images/LuImage";
4
+ import Button from "../../../components/Button/Button";
5
+ import LUIcon from "../../../components/Icons/LUIcon";
6
+ export var ContactProfileTheme2 = function (props) {
7
+ return (_jsxs("div", { "data-testid": "contact-profile-theme2", className: "p-8 card_bg_ContactProfile_".concat(props.id, " rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id, " flex flex-col items-center"), children: [_jsx("div", { className: "max-w-[160px] overflow-hidden aspect-square", children: _jsx(LuImage, { src: props.image, width: 160, height: 160, className: "h-full object-cover rounded-full", alt: "Contact Profile" }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow m-5 text-center h-[100px]", children: [_jsx("div", { className: "card_ContactProfile_title_color_".concat(props.id, " text-2xl font-semibold line-clamp-1 capitalize"), children: props.heading }), _jsx("p", { className: "text-base\tfont-extralight\tcard_ContactProfile_designation_color_".concat(props.id, " line-clamp-2"), children: props.body })] }), _jsx(Link, { href: props.href, passHref: true, className: "w-full no-underline", children: _jsx(Button, { endIcon: _jsx(LUIcon, { icon: "angle-right", size: "sm" }), size: "lg", className: "rounded justify-between w-full card_ContactProfile_btn_".concat(props.id), children: props.btnLabel }) })] }));
8
+ };
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -46,15 +45,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
46
  }
48
47
  };
49
- var __importDefault = (this && this.__importDefault) || function (mod) {
50
- return (mod && mod.__esModule) ? mod : { "default": mod };
51
- };
52
- Object.defineProperty(exports, "__esModule", { value: true });
53
- var jsx_runtime_1 = require("react/jsx-runtime");
54
- var react_1 = require("@testing-library/react");
55
- require("@testing-library/jest-dom");
56
- var ContactProfileTheme2_1 = require("./ContactProfileTheme2");
57
- var user_event_1 = __importDefault(require("@testing-library/user-event"));
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
+ import { render, screen } from "@testing-library/react";
50
+ import "@testing-library/jest-dom";
51
+ import { ContactProfileTheme2 } from "./ContactProfileTheme2";
52
+ import userEvent from "@testing-library/user-event";
58
53
  describe("ContactProfileTheme1 Component", function () {
59
54
  var mockProps = {
60
55
  id: 1,
@@ -65,37 +60,24 @@ describe("ContactProfileTheme1 Component", function () {
65
60
  href: "/profile",
66
61
  className: "custom-class",
67
62
  };
68
- jest.mock("next/image", function () { return ({
69
- __esModule: true,
70
- default: function (props) {
71
- var _a;
72
- return ((0, jsx_runtime_1.jsx)("img", __assign({}, props, { alt: props.btnLabel || "", id: (_a = props.id) === null || _a === void 0 ? void 0 : _a.toString() })));
73
- }, // Renders a normal <img> tag
74
- }); });
75
63
  it("Render the contact profile theme1 with correct body and heading text", function () {
76
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, mockProps)));
77
- var headingElement = react_1.screen.getByText(mockProps.heading);
78
- var bodyElement = react_1.screen.getByText(mockProps.body);
64
+ render(_jsx(ContactProfileTheme2, __assign({}, mockProps)));
65
+ var headingElement = screen.getByText(mockProps.heading);
66
+ var bodyElement = screen.getByText(mockProps.body);
79
67
  expect(headingElement).toBeInTheDocument();
80
68
  expect(bodyElement).toBeInTheDocument();
81
69
  });
82
- it("renders the profile image", function () {
83
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, mockProps)));
84
- var profileImage = react_1.screen.getByAltText("Image");
85
- expect(profileImage).toBeInTheDocument();
86
- expect(profileImage).toHaveAttribute("alt", "Image"); // Matches the default alt in LuImage
87
- });
88
70
  it("renders the button with correct label and icon", function () {
89
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, mockProps)));
90
- var buttonElement = react_1.screen.getByRole("button", {
71
+ render(_jsx(ContactProfileTheme2, __assign({}, mockProps)));
72
+ var buttonElement = screen.getByRole("button", {
91
73
  name: mockProps.btnLabel,
92
74
  });
93
75
  expect(buttonElement).toBeInTheDocument();
94
76
  expect(buttonElement).toHaveTextContent(mockProps.btnLabel);
95
77
  });
96
78
  it("renders the link with the correct href", function () {
97
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, mockProps)));
98
- var linkElement = react_1.screen.getByRole("link");
79
+ render(_jsx(ContactProfileTheme2, __assign({}, mockProps)));
80
+ var linkElement = screen.getByRole("link");
99
81
  expect(linkElement).toHaveAttribute("href", mockProps.href);
100
82
  });
101
83
  it("triggers navigation when the button is clicked", function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -103,9 +85,9 @@ describe("ContactProfileTheme1 Component", function () {
103
85
  return __generator(this, function (_a) {
104
86
  switch (_a.label) {
105
87
  case 0:
106
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, mockProps)));
107
- user = user_event_1.default.setup();
108
- linkElement = react_1.screen.getByRole("link");
88
+ render(_jsx(ContactProfileTheme2, __assign({}, mockProps)));
89
+ user = userEvent.setup();
90
+ linkElement = screen.getByRole("link");
109
91
  return [4 /*yield*/, user.click(linkElement)];
110
92
  case 1:
111
93
  _a.sent();
@@ -114,9 +96,4 @@ describe("ContactProfileTheme1 Component", function () {
114
96
  }
115
97
  });
116
98
  }); });
117
- it("renders without crashing when href is undefined", function () {
118
- var propsWithoutHref = __assign(__assign({}, mockProps), { href: undefined });
119
- (0, react_1.render)((0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, propsWithoutHref)));
120
- expect(react_1.screen.getByRole("button")).toBeInTheDocument();
121
- });
122
99
  });
@@ -1,2 +1,2 @@
1
- import { CardProps } from "@/types/interface";
1
+ import { CardProps } from "../type";
2
2
  export declare const PostByCategory: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { colors } from "../../../utils/colors";
14
+ import { PostByCategoryTheme1 } from "./PostByCategoryTheme1";
15
+ import { PostByCategoryTheme2 } from "./PostByCategoryTheme2";
16
+ import { OrientationEnum } from "../../../utils/enums";
17
+ export var PostByCategory = function (props) {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
19
+ return (_jsxs("div", { children: [props.layout === OrientationEnum.horizontal ? (_jsx(PostByCategoryTheme1, __assign({}, props))) : (_jsx(PostByCategoryTheme2, __assign({}, props))), _jsx("style", { jsx: true, global: true, children: "\n .card_PostByCategory_title_color_".concat(props.id, " {\n color: ").concat(((_a = props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color) || colors.black, ";\n }\n .card_PostByCategory_description_color_").concat(props.id, " {\n color: ").concat(((_b = props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color) ||
20
+ colors["neutral-500"], ";\n }\n .card_shadow_PostByCategory_").concat(props.id, " {\n box-shadow: ").concat(((_c = props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
21
+ ? "0px 4px 12px 0px ".concat(((_d = props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color) || "rgba(52, 52, 52, 0.15)") //TODO: change shadow color with our color theme
22
+ : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_PostByCategory_").concat(props.id, " {\n background-color: ").concat(((_e = props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color) ||
23
+ colors.white, " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, " {\n background-color: ").concat(((_f = props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color) ||
24
+ colors["neutral-0"], " !important;\n color: ").concat(((_g = props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color) ||
25
+ colors["neutral-1000"], " !important;\n fill: ").concat(((_h = props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_text_color) ||
26
+ colors["neutral-1000"], " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, ":hover {\n background-color: ").concat(((_j = props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_background_color) ||
27
+ colors["neutral-0"], " !important;\n color: ").concat(((_k = props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color) ||
28
+ colors["neutral-1000"], " !important;\n fill: ").concat(((_l = props.cardStyle) === null || _l === void 0 ? void 0 : _l.card_button_text_color) ||
29
+ colors["neutral-1000"], " !important;\n }\n .card_PostByCategory_theme2_image_").concat(props === null || props === void 0 ? void 0 : props.id, " {\n border-color: ").concat(((_m = props.cardStyle) === null || _m === void 0 ? void 0 : _m.card_image_border_color) ||
30
+ (colors === null || colors === void 0 ? void 0 : colors.black), " !important;\n border-radius: ").concat(((_o = props.cardStyle) === null || _o === void 0 ? void 0 : _o.card_image_border_radius) || "0", "%;\n border: ").concat(((_p = props.cardStyle) === null || _p === void 0 ? void 0 : _p.card_image_border) || "0", "px solid;\n }\n ") })] }));
31
+ };
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -10,14 +9,15 @@ var __assign = (this && this.__assign) || function () {
10
9
  };
11
10
  return __assign.apply(this, arguments);
12
11
  };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- var jsx_runtime_1 = require("react/jsx-runtime");
15
- var react_1 = require("@testing-library/react");
16
- var PostByCategory_1 = require("./PostByCategory");
17
- var enums_1 = require("../../../utils/enums");
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { render, screen } from "@testing-library/react";
14
+ import { PostByCategory } from "./PostByCategory";
15
+ import { OrientationEnum } from "../../../utils/enums";
16
+ import { Dummy_Url } from "../../../utils/constants";
18
17
  var mockProps = {
19
18
  id: 1,
20
- layout: enums_1.OrientationEnum.horizontal,
19
+ layout: OrientationEnum.horizontal,
20
+ image: "/images/demo-image.jpg",
21
21
  cardStyle: {
22
22
  card_title_color: "#000000",
23
23
  card_description_color: "#666666",
@@ -27,18 +27,19 @@ var mockProps = {
27
27
  card_button_background_color: "#f5f5f5",
28
28
  card_button_text_color: "#333333",
29
29
  },
30
+ href: Dummy_Url,
30
31
  };
31
32
  describe("PostByCategory Component", function () {
32
33
  it("renders PostByCategoryTheme1 when layout is horizontal", function () {
33
- (0, react_1.render)((0, jsx_runtime_1.jsx)(PostByCategory_1.PostByCategory, __assign({}, mockProps)));
34
- expect(react_1.screen.getByTestId("postByCategory-theme1")).toBeInTheDocument();
34
+ render(_jsx(PostByCategory, __assign({}, mockProps)));
35
+ expect(screen.getByTestId("postByCategory-theme1")).toBeInTheDocument();
35
36
  });
36
37
  it("renders PostByCategoryTheme2 when layout is vertical", function () {
37
- (0, react_1.render)((0, jsx_runtime_1.jsx)(PostByCategory_1.PostByCategory, __assign({}, mockProps, { layout: enums_1.OrientationEnum.vertical })));
38
- expect(react_1.screen.getByTestId("postByCategory-theme2")).toBeInTheDocument();
38
+ render(_jsx(PostByCategory, __assign({}, mockProps, { layout: OrientationEnum.vertical })));
39
+ expect(screen.getByTestId("postByCategory-theme2")).toBeInTheDocument();
39
40
  });
40
41
  it("applies correct styles based on id", function () {
41
- (0, react_1.render)((0, jsx_runtime_1.jsx)(PostByCategory_1.PostByCategory, __assign({}, mockProps)));
42
+ render(_jsx(PostByCategory, __assign({}, mockProps)));
42
43
  var styles = document.styleSheets[document.styleSheets.length - 1].cssRules;
43
44
  expect(Array.from(styles).some(function (rule) {
44
45
  return rule.cssText.includes(".card_PostByCategory_title_color_1");
@@ -48,10 +49,14 @@ describe("PostByCategory Component", function () {
48
49
  })).toBeTruthy();
49
50
  });
50
51
  it("applies default shadow when card_shadow_toggle is not 1", function () {
51
- (0, react_1.render)((0, jsx_runtime_1.jsx)(PostByCategory_1.PostByCategory, __assign({}, mockProps, { cardStyle: __assign(__assign({}, mockProps.cardStyle), { card_shadow_toggle: 0 }) })));
52
+ render(_jsx(PostByCategory, __assign({}, mockProps, { cardStyle: __assign(__assign({}, mockProps.cardStyle), { card_shadow_toggle: 0 }) })));
52
53
  var styles = document.styleSheets[document.styleSheets.length - 1].cssRules;
53
54
  expect(Array.from(styles).some(function (rule) {
54
55
  return rule.cssText.includes("box-shadow: 0px 4px 12px 0px rgba(52, 52, 52, 0.15)");
55
56
  })).toBeTruthy();
56
57
  });
58
+ it("renders correctly when cardStyle is undefined", function () {
59
+ render(_jsx(PostByCategory, __assign({}, mockProps, { cardStyle: undefined })));
60
+ expect(screen.getByTestId("postByCategory-theme1")).toBeInTheDocument();
61
+ });
57
62
  });