@techsio/ui-kit 0.3.1 → 0.4.0

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 (446) hide show
  1. package/README.md +59 -6
  2. package/dist/.storybook/decorator.d.ts +12 -0
  3. package/dist/.storybook/decorator.d.ts.map +1 -0
  4. package/dist/.storybook/main.d.ts +4 -0
  5. package/dist/.storybook/main.d.ts.map +1 -0
  6. package/dist/.storybook/preview.d.ts +5 -0
  7. package/dist/.storybook/preview.d.ts.map +1 -0
  8. package/dist/.storybook/test-runner.d.ts +12 -0
  9. package/dist/.storybook/test-runner.d.ts.map +1 -0
  10. package/dist/atoms/badge.js +37 -19
  11. package/dist/atoms/button.js +167 -154
  12. package/dist/atoms/checkbox.js +52 -0
  13. package/dist/atoms/figma/badge.figma.js +33 -0
  14. package/dist/atoms/figma/button.figma.js +76 -0
  15. package/dist/atoms/figma/checkbox.figma.js +35 -0
  16. package/dist/atoms/figma/icon.figma.js +33 -0
  17. package/dist/atoms/figma/image.figma.js +21 -0
  18. package/dist/atoms/figma/input.figma.js +34 -0
  19. package/dist/atoms/figma/label.figma.js +25 -0
  20. package/dist/atoms/figma/link-button.figma.js +42 -0
  21. package/dist/atoms/figma/link.figma.js +15 -0
  22. package/dist/atoms/figma/numeric-input.figma.js +52 -0
  23. package/dist/atoms/figma/rating.figma.js +38 -0
  24. package/dist/atoms/figma/skeleton.figma.js +119 -0
  25. package/dist/atoms/figma/status-text.figma.js +27 -0
  26. package/dist/atoms/figma/textarea.figma.js +38 -0
  27. package/dist/atoms/figma/tooltip.figma.js +47 -0
  28. package/dist/atoms/icon.js +17 -17
  29. package/dist/atoms/image.js +22 -4
  30. package/dist/atoms/input.js +40 -34
  31. package/dist/atoms/label.js +10 -10
  32. package/dist/atoms/link-button.js +19 -18
  33. package/dist/atoms/link.js +6 -4
  34. package/dist/atoms/numeric-input.js +98 -70
  35. package/dist/atoms/rating.js +30 -30
  36. package/dist/atoms/skeleton.js +47 -47
  37. package/dist/atoms/status-text.js +75 -0
  38. package/dist/atoms/textarea.js +48 -42
  39. package/dist/atoms/tooltip.js +17 -17
  40. package/dist/molecules/accordion.js +58 -60
  41. package/dist/molecules/breadcrumb.js +206 -124
  42. package/dist/molecules/carousel.js +139 -87
  43. package/dist/molecules/color-select.js +56 -56
  44. package/dist/molecules/combobox.js +131 -104
  45. package/dist/molecules/dialog.js +97 -97
  46. package/dist/molecules/figma/accordion.figma.js +41 -0
  47. package/dist/molecules/figma/breadcrumb.figma.js +31 -0
  48. package/dist/molecules/figma/carousel.figma.js +34 -0
  49. package/dist/molecules/figma/combobox.figma.js +38 -0
  50. package/dist/molecules/figma/dialog.figma.js +24 -0
  51. package/dist/molecules/figma/form-checkbox.figma.js +41 -0
  52. package/dist/molecules/figma/form-input.figma.js +38 -0
  53. package/dist/molecules/figma/form-numeric-input.figma.js +67 -0
  54. package/dist/molecules/figma/form-textarea.figma.js +38 -0
  55. package/dist/molecules/figma/menu.figma.js +26 -0
  56. package/dist/molecules/figma/pagination.figma.js +22 -0
  57. package/dist/molecules/figma/popover.figma.js +38 -0
  58. package/dist/molecules/figma/product-card.figma.js +34 -0
  59. package/dist/molecules/figma/radio-card.figma.js +35 -0
  60. package/dist/molecules/figma/radio-group.figma.js +45 -0
  61. package/dist/molecules/figma/search-form.figma.js +24 -0
  62. package/dist/molecules/figma/select.figma.js +46 -0
  63. package/dist/molecules/figma/slider.figma.js +30 -0
  64. package/dist/molecules/figma/steps.figma.js +33 -0
  65. package/dist/molecules/figma/switch.figma.js +33 -0
  66. package/dist/molecules/figma/tabs.figma.js +46 -0
  67. package/dist/molecules/figma/toast.figma.js +34 -0
  68. package/dist/molecules/figma/tree-view.figma.js +30 -0
  69. package/dist/molecules/form-checkbox.js +121 -48
  70. package/dist/molecules/form-input.js +15 -27
  71. package/dist/molecules/form-numeric-input.js +11 -24
  72. package/dist/molecules/form-textarea.js +15 -27
  73. package/dist/molecules/menu.js +69 -67
  74. package/dist/molecules/pagination.js +112 -76
  75. package/dist/molecules/phone-input.js +654 -0
  76. package/dist/molecules/popover.js +221 -96
  77. package/dist/molecules/product-card.js +38 -37
  78. package/dist/molecules/radio-card.js +517 -0
  79. package/dist/molecules/radio-group.js +341 -0
  80. package/dist/molecules/search-form.js +170 -91
  81. package/dist/molecules/select.js +369 -141
  82. package/dist/molecules/slider.js +72 -85
  83. package/dist/molecules/steps.js +517 -152
  84. package/dist/molecules/switch.js +37 -43
  85. package/dist/molecules/tabs.js +63 -61
  86. package/dist/molecules/toast.js +32 -32
  87. package/dist/molecules/tree-view.js +89 -83
  88. package/dist/organisms/footer.js +50 -52
  89. package/dist/organisms/gallery.js +244 -0
  90. package/dist/organisms/header.js +60 -58
  91. package/dist/organisms/table.js +52 -52
  92. package/dist/src/atoms/badge.d.ts +27 -7
  93. package/dist/src/atoms/badge.d.ts.map +1 -1
  94. package/dist/src/atoms/button.d.ts +7 -6
  95. package/dist/src/atoms/button.d.ts.map +1 -1
  96. package/dist/src/atoms/checkbox.d.ts +11 -0
  97. package/dist/src/atoms/checkbox.d.ts.map +1 -0
  98. package/dist/src/atoms/figma/badge.figma.d.ts +2 -0
  99. package/dist/src/atoms/figma/badge.figma.d.ts.map +1 -0
  100. package/dist/src/atoms/figma/button.figma.d.ts +2 -0
  101. package/dist/src/atoms/figma/button.figma.d.ts.map +1 -0
  102. package/dist/src/atoms/figma/checkbox.figma.d.ts +2 -0
  103. package/dist/src/atoms/figma/checkbox.figma.d.ts.map +1 -0
  104. package/dist/src/atoms/figma/icon.figma.d.ts +2 -0
  105. package/dist/src/atoms/figma/icon.figma.d.ts.map +1 -0
  106. package/dist/src/atoms/figma/image.figma.d.ts +2 -0
  107. package/dist/src/atoms/figma/image.figma.d.ts.map +1 -0
  108. package/dist/src/atoms/figma/input.figma.d.ts +2 -0
  109. package/dist/src/atoms/figma/input.figma.d.ts.map +1 -0
  110. package/dist/src/atoms/figma/label.figma.d.ts +2 -0
  111. package/dist/src/atoms/figma/label.figma.d.ts.map +1 -0
  112. package/dist/src/atoms/figma/link-button.figma.d.ts +2 -0
  113. package/dist/src/atoms/figma/link-button.figma.d.ts.map +1 -0
  114. package/dist/src/atoms/figma/link.figma.d.ts +2 -0
  115. package/dist/src/atoms/figma/link.figma.d.ts.map +1 -0
  116. package/dist/src/atoms/figma/numeric-input.figma.d.ts +2 -0
  117. package/dist/src/atoms/figma/numeric-input.figma.d.ts.map +1 -0
  118. package/dist/src/atoms/figma/rating.figma.d.ts +2 -0
  119. package/dist/src/atoms/figma/rating.figma.d.ts.map +1 -0
  120. package/dist/src/atoms/figma/skeleton.figma.d.ts +2 -0
  121. package/dist/src/atoms/figma/skeleton.figma.d.ts.map +1 -0
  122. package/dist/src/atoms/figma/status-text.figma.d.ts +2 -0
  123. package/dist/src/atoms/figma/status-text.figma.d.ts.map +1 -0
  124. package/dist/src/atoms/figma/textarea.figma.d.ts +2 -0
  125. package/dist/src/atoms/figma/textarea.figma.d.ts.map +1 -0
  126. package/dist/src/atoms/figma/tooltip.figma.d.ts +2 -0
  127. package/dist/src/atoms/figma/tooltip.figma.d.ts.map +1 -0
  128. package/dist/src/atoms/icon.d.ts +6 -6
  129. package/dist/src/atoms/image.d.ts +35 -9
  130. package/dist/src/atoms/image.d.ts.map +1 -1
  131. package/dist/src/atoms/input.d.ts +3 -3
  132. package/dist/src/atoms/input.d.ts.map +1 -1
  133. package/dist/src/atoms/label.d.ts +2 -2
  134. package/dist/src/atoms/link-button.d.ts +71 -12
  135. package/dist/src/atoms/link-button.d.ts.map +1 -1
  136. package/dist/src/atoms/link.d.ts +5 -5
  137. package/dist/src/atoms/link.d.ts.map +1 -1
  138. package/dist/src/atoms/numeric-input.d.ts +23 -22
  139. package/dist/src/atoms/numeric-input.d.ts.map +1 -1
  140. package/dist/src/atoms/rating.d.ts +6 -5
  141. package/dist/src/atoms/rating.d.ts.map +1 -1
  142. package/dist/src/atoms/skeleton.d.ts +15 -15
  143. package/dist/src/atoms/skeleton.d.ts.map +1 -1
  144. package/dist/src/atoms/status-text.d.ts +97 -0
  145. package/dist/src/atoms/status-text.d.ts.map +1 -0
  146. package/dist/src/atoms/textarea.d.ts +3 -3
  147. package/dist/src/atoms/textarea.d.ts.map +1 -1
  148. package/dist/src/atoms/tooltip.d.ts +3 -3
  149. package/dist/src/atoms/tooltip.d.ts.map +1 -1
  150. package/dist/src/molecules/accordion.d.ts +14 -13
  151. package/dist/src/molecules/accordion.d.ts.map +1 -1
  152. package/dist/src/molecules/breadcrumb.d.ts +132 -35
  153. package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
  154. package/dist/src/molecules/carousel.d.ts +67 -16
  155. package/dist/src/molecules/carousel.d.ts.map +1 -1
  156. package/dist/src/molecules/color-select.d.ts +4 -4
  157. package/dist/src/molecules/combobox.d.ts +36 -9
  158. package/dist/src/molecules/combobox.d.ts.map +1 -1
  159. package/dist/src/molecules/dialog.d.ts +3 -3
  160. package/dist/src/molecules/dialog.d.ts.map +1 -1
  161. package/dist/src/molecules/figma/accordion.figma.d.ts +2 -0
  162. package/dist/src/molecules/figma/accordion.figma.d.ts.map +1 -0
  163. package/dist/src/molecules/figma/breadcrumb.figma.d.ts +2 -0
  164. package/dist/src/molecules/figma/breadcrumb.figma.d.ts.map +1 -0
  165. package/dist/src/molecules/figma/carousel.figma.d.ts +2 -0
  166. package/dist/src/molecules/figma/carousel.figma.d.ts.map +1 -0
  167. package/dist/src/molecules/figma/combobox.figma.d.ts +2 -0
  168. package/dist/src/molecules/figma/combobox.figma.d.ts.map +1 -0
  169. package/dist/src/molecules/figma/dialog.figma.d.ts +2 -0
  170. package/dist/src/molecules/figma/dialog.figma.d.ts.map +1 -0
  171. package/dist/src/molecules/figma/form-checkbox.figma.d.ts +2 -0
  172. package/dist/src/molecules/figma/form-checkbox.figma.d.ts.map +1 -0
  173. package/dist/src/molecules/figma/form-input.figma.d.ts +2 -0
  174. package/dist/src/molecules/figma/form-input.figma.d.ts.map +1 -0
  175. package/dist/src/molecules/figma/form-numeric-input.figma.d.ts +2 -0
  176. package/dist/src/molecules/figma/form-numeric-input.figma.d.ts.map +1 -0
  177. package/dist/src/molecules/figma/form-textarea.figma.d.ts +2 -0
  178. package/dist/src/molecules/figma/form-textarea.figma.d.ts.map +1 -0
  179. package/dist/src/molecules/figma/menu.figma.d.ts +2 -0
  180. package/dist/src/molecules/figma/menu.figma.d.ts.map +1 -0
  181. package/dist/src/molecules/figma/pagination.figma.d.ts +2 -0
  182. package/dist/src/molecules/figma/pagination.figma.d.ts.map +1 -0
  183. package/dist/src/molecules/figma/popover.figma.d.ts +2 -0
  184. package/dist/src/molecules/figma/popover.figma.d.ts.map +1 -0
  185. package/dist/src/molecules/figma/product-card.figma.d.ts +2 -0
  186. package/dist/src/molecules/figma/product-card.figma.d.ts.map +1 -0
  187. package/dist/src/molecules/figma/radio-card.figma.d.ts +2 -0
  188. package/dist/src/molecules/figma/radio-card.figma.d.ts.map +1 -0
  189. package/dist/src/molecules/figma/radio-group.figma.d.ts +2 -0
  190. package/dist/src/molecules/figma/radio-group.figma.d.ts.map +1 -0
  191. package/dist/src/molecules/figma/search-form.figma.d.ts +2 -0
  192. package/dist/src/molecules/figma/search-form.figma.d.ts.map +1 -0
  193. package/dist/src/molecules/figma/select.figma.d.ts +2 -0
  194. package/dist/src/molecules/figma/select.figma.d.ts.map +1 -0
  195. package/dist/src/molecules/figma/slider.figma.d.ts +2 -0
  196. package/dist/src/molecules/figma/slider.figma.d.ts.map +1 -0
  197. package/dist/src/molecules/figma/steps.figma.d.ts +2 -0
  198. package/dist/src/molecules/figma/steps.figma.d.ts.map +1 -0
  199. package/dist/src/molecules/figma/switch.figma.d.ts +2 -0
  200. package/dist/src/molecules/figma/switch.figma.d.ts.map +1 -0
  201. package/dist/src/molecules/figma/tabs.figma.d.ts +2 -0
  202. package/dist/src/molecules/figma/tabs.figma.d.ts.map +1 -0
  203. package/dist/src/molecules/figma/toast.figma.d.ts +2 -0
  204. package/dist/src/molecules/figma/toast.figma.d.ts.map +1 -0
  205. package/dist/src/molecules/figma/tree-view.figma.d.ts +2 -0
  206. package/dist/src/molecules/figma/tree-view.figma.d.ts.map +1 -0
  207. package/dist/src/molecules/form-checkbox.d.ts +22 -12
  208. package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
  209. package/dist/src/molecules/form-input.d.ts +8 -6
  210. package/dist/src/molecules/form-input.d.ts.map +1 -1
  211. package/dist/src/molecules/form-numeric-input.d.ts +6 -6
  212. package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
  213. package/dist/src/molecules/form-textarea.d.ts +8 -6
  214. package/dist/src/molecules/form-textarea.d.ts.map +1 -1
  215. package/dist/src/molecules/menu.d.ts +11 -11
  216. package/dist/src/molecules/menu.d.ts.map +1 -1
  217. package/dist/src/molecules/pagination.d.ts +37 -9
  218. package/dist/src/molecules/pagination.d.ts.map +1 -1
  219. package/dist/src/molecules/phone-input.d.ts +246 -0
  220. package/dist/src/molecules/phone-input.d.ts.map +1 -0
  221. package/dist/src/molecules/popover.d.ts +76 -24
  222. package/dist/src/molecules/popover.d.ts.map +1 -1
  223. package/dist/src/molecules/product-card.d.ts +11 -10
  224. package/dist/src/molecules/product-card.d.ts.map +1 -1
  225. package/dist/src/molecules/radio-card.d.ts +429 -0
  226. package/dist/src/molecules/radio-card.d.ts.map +1 -0
  227. package/dist/src/molecules/radio-group.d.ts +245 -0
  228. package/dist/src/molecules/radio-group.d.ts.map +1 -0
  229. package/dist/src/molecules/search-form.d.ts +94 -27
  230. package/dist/src/molecules/search-form.d.ts.map +1 -1
  231. package/dist/src/molecules/select.d.ts +124 -30
  232. package/dist/src/molecules/select.d.ts.map +1 -1
  233. package/dist/src/molecules/slider.d.ts +9 -12
  234. package/dist/src/molecules/slider.d.ts.map +1 -1
  235. package/dist/src/molecules/steps.d.ts +236 -64
  236. package/dist/src/molecules/steps.d.ts.map +1 -1
  237. package/dist/src/molecules/switch.d.ts +7 -7
  238. package/dist/src/molecules/switch.d.ts.map +1 -1
  239. package/dist/src/molecules/tabs.d.ts +10 -10
  240. package/dist/src/molecules/tabs.d.ts.map +1 -1
  241. package/dist/src/molecules/toast.d.ts +6 -6
  242. package/dist/src/molecules/tree-view.d.ts +14 -14
  243. package/dist/src/molecules/tree-view.d.ts.map +1 -1
  244. package/dist/src/organisms/footer.d.ts +15 -6
  245. package/dist/src/organisms/footer.d.ts.map +1 -1
  246. package/dist/src/organisms/gallery.d.ts +147 -0
  247. package/dist/src/organisms/gallery.d.ts.map +1 -0
  248. package/dist/src/organisms/header.d.ts +9 -9
  249. package/dist/src/organisms/header.d.ts.map +1 -1
  250. package/dist/src/organisms/table.d.ts +10 -10
  251. package/dist/src/organisms/table.d.ts.map +1 -1
  252. package/dist/src/templates/accordion.d.ts +3 -3
  253. package/dist/src/templates/breadcrumb.d.ts +28 -0
  254. package/dist/src/templates/breadcrumb.d.ts.map +1 -0
  255. package/dist/src/templates/carousel.d.ts +4 -4
  256. package/dist/src/templates/carousel.d.ts.map +1 -1
  257. package/dist/src/templates/gallery.d.ts +43 -0
  258. package/dist/src/templates/gallery.d.ts.map +1 -0
  259. package/dist/src/templates/numeric-input.d.ts +5 -5
  260. package/dist/src/templates/popover.d.ts +19 -0
  261. package/dist/src/templates/popover.d.ts.map +1 -0
  262. package/dist/src/templates/product-card.d.ts +4 -4
  263. package/dist/src/templates/select.d.ts +22 -0
  264. package/dist/src/templates/select.d.ts.map +1 -0
  265. package/dist/src/templates/tabs.d.ts +4 -4
  266. package/dist/src/types/zag.d.ts +19 -18
  267. package/dist/src/types/zag.d.ts.map +1 -1
  268. package/dist/src/utils.d.ts +1 -1
  269. package/dist/src/utils.d.ts.map +1 -1
  270. package/dist/stories/atoms/badge.stories.d.ts +12 -0
  271. package/dist/stories/atoms/badge.stories.d.ts.map +1 -0
  272. package/dist/stories/atoms/button.stories.d.ts +12 -0
  273. package/dist/stories/atoms/button.stories.d.ts.map +1 -0
  274. package/dist/stories/atoms/checkbox.stories.d.ts +56 -0
  275. package/dist/stories/atoms/checkbox.stories.d.ts.map +1 -0
  276. package/dist/stories/atoms/icon.stories.d.ts +11 -0
  277. package/dist/stories/atoms/icon.stories.d.ts.map +1 -0
  278. package/dist/stories/atoms/image.stories.d.ts +8 -0
  279. package/dist/stories/atoms/image.stories.d.ts.map +1 -0
  280. package/dist/stories/atoms/input.stories.d.ts +8 -0
  281. package/dist/stories/atoms/input.stories.d.ts.map +1 -0
  282. package/dist/stories/atoms/numeric-input.stories.d.ts +23 -0
  283. package/dist/stories/atoms/numeric-input.stories.d.ts.map +1 -0
  284. package/dist/stories/atoms/rating.stories.d.ts +10 -0
  285. package/dist/stories/atoms/rating.stories.d.ts.map +1 -0
  286. package/dist/stories/atoms/skeleton.stories.d.ts +34 -0
  287. package/dist/stories/atoms/skeleton.stories.d.ts.map +1 -0
  288. package/dist/stories/atoms/status-text.stories.d.ts +15 -0
  289. package/dist/stories/atoms/status-text.stories.d.ts.map +1 -0
  290. package/dist/stories/atoms/textarea.stories.d.ts +12 -0
  291. package/dist/stories/atoms/textarea.stories.d.ts.map +1 -0
  292. package/dist/stories/atoms/tooltip.stories.d.ts +28 -0
  293. package/dist/stories/atoms/tooltip.stories.d.ts.map +1 -0
  294. package/dist/stories/helpers/icon-options.d.ts +4 -0
  295. package/dist/stories/helpers/icon-options.d.ts.map +1 -0
  296. package/dist/stories/molecules/accordion.stories.d.ts +14 -0
  297. package/dist/stories/molecules/accordion.stories.d.ts.map +1 -0
  298. package/dist/stories/molecules/breadcrumb.stories.d.ts +14 -0
  299. package/dist/stories/molecules/breadcrumb.stories.d.ts.map +1 -0
  300. package/dist/stories/molecules/carousel.stories.d.ts +19 -0
  301. package/dist/stories/molecules/carousel.stories.d.ts.map +1 -0
  302. package/dist/stories/molecules/color-select.stories.d.ts +12 -0
  303. package/dist/stories/molecules/color-select.stories.d.ts.map +1 -0
  304. package/dist/stories/molecules/combobox.stories.d.ts +11 -0
  305. package/dist/stories/molecules/combobox.stories.d.ts.map +1 -0
  306. package/dist/stories/molecules/dialog.stories.d.ts +19 -0
  307. package/dist/stories/molecules/dialog.stories.d.ts.map +1 -0
  308. package/dist/stories/molecules/form-checkbox.stories.d.ts +17 -0
  309. package/dist/stories/molecules/form-checkbox.stories.d.ts.map +1 -0
  310. package/dist/stories/molecules/form-input.stories.d.ts +12 -0
  311. package/dist/stories/molecules/form-input.stories.d.ts.map +1 -0
  312. package/dist/stories/molecules/form-numeric-input.stories.d.ts +17 -0
  313. package/dist/stories/molecules/form-numeric-input.stories.d.ts.map +1 -0
  314. package/dist/stories/molecules/form-textarea.stories.d.ts +12 -0
  315. package/dist/stories/molecules/form-textarea.stories.d.ts.map +1 -0
  316. package/dist/stories/molecules/menu.stories.d.ts +22 -0
  317. package/dist/stories/molecules/menu.stories.d.ts.map +1 -0
  318. package/dist/stories/molecules/pagination.stories.d.ts +13 -0
  319. package/dist/stories/molecules/pagination.stories.d.ts.map +1 -0
  320. package/dist/stories/molecules/phone-input.stories.d.ts +19 -0
  321. package/dist/stories/molecules/phone-input.stories.d.ts.map +1 -0
  322. package/dist/stories/molecules/popover.stories.d.ts +140 -0
  323. package/dist/stories/molecules/popover.stories.d.ts.map +1 -0
  324. package/dist/stories/molecules/product-card.stories.d.ts +41 -0
  325. package/dist/stories/molecules/product-card.stories.d.ts.map +1 -0
  326. package/dist/stories/molecules/radio-card.stories.d.ts +13 -0
  327. package/dist/stories/molecules/radio-card.stories.d.ts.map +1 -0
  328. package/dist/stories/molecules/radio-group.stories.d.ts +13 -0
  329. package/dist/stories/molecules/radio-group.stories.d.ts.map +1 -0
  330. package/dist/stories/molecules/search-form.stories.d.ts +16 -0
  331. package/dist/stories/molecules/search-form.stories.d.ts.map +1 -0
  332. package/dist/stories/molecules/select.stories.d.ts +19 -0
  333. package/dist/stories/molecules/select.stories.d.ts.map +1 -0
  334. package/dist/stories/molecules/slider.stories.d.ts +19 -0
  335. package/dist/stories/molecules/slider.stories.d.ts.map +1 -0
  336. package/dist/stories/molecules/steps.stories.d.ts +19 -0
  337. package/dist/stories/molecules/steps.stories.d.ts.map +1 -0
  338. package/dist/stories/molecules/switch.stories.d.ts +13 -0
  339. package/dist/stories/molecules/switch.stories.d.ts.map +1 -0
  340. package/dist/stories/molecules/tabs.stories.d.ts +18 -0
  341. package/dist/stories/molecules/tabs.stories.d.ts.map +1 -0
  342. package/dist/stories/molecules/toast.stories.d.ts +11 -0
  343. package/dist/stories/molecules/toast.stories.d.ts.map +1 -0
  344. package/dist/stories/molecules/tree-view.stories.d.ts +17 -0
  345. package/dist/stories/molecules/tree-view.stories.d.ts.map +1 -0
  346. package/dist/stories/organisms/footer.stories.d.ts +12 -0
  347. package/dist/stories/organisms/footer.stories.d.ts.map +1 -0
  348. package/dist/stories/organisms/gallery.stories.d.ts +73 -0
  349. package/dist/stories/organisms/gallery.stories.d.ts.map +1 -0
  350. package/dist/stories/organisms/header.stories.d.ts +12 -0
  351. package/dist/stories/organisms/header.stories.d.ts.map +1 -0
  352. package/dist/stories/organisms/table.stories.d.ts +56 -0
  353. package/dist/stories/organisms/table.stories.d.ts.map +1 -0
  354. package/dist/stories/overview/apca-contrast-test.stories.d.ts +8 -0
  355. package/dist/stories/overview/apca-contrast-test.stories.d.ts.map +1 -0
  356. package/dist/stories/overview/color-palette.stories.d.ts +8 -0
  357. package/dist/stories/overview/color-palette.stories.d.ts.map +1 -0
  358. package/dist/stories/overview/component-comparison.stories.d.ts +6 -0
  359. package/dist/stories/overview/component-comparison.stories.d.ts.map +1 -0
  360. package/dist/stories/templates/accordion.stories.d.ts +8 -0
  361. package/dist/stories/templates/accordion.stories.d.ts.map +1 -0
  362. package/dist/stories/templates/breadcrumb.stories.d.ts +12 -0
  363. package/dist/stories/templates/breadcrumb.stories.d.ts.map +1 -0
  364. package/dist/stories/templates/carousel.stories.d.ts +8 -0
  365. package/dist/stories/templates/carousel.stories.d.ts.map +1 -0
  366. package/dist/stories/templates/comprehensive-form.stories.d.ts +26 -0
  367. package/dist/stories/templates/comprehensive-form.stories.d.ts.map +1 -0
  368. package/dist/stories/templates/gallery.stories.d.ts +7 -0
  369. package/dist/stories/templates/gallery.stories.d.ts.map +1 -0
  370. package/dist/stories/templates/numeric-input.stories.d.ts +8 -0
  371. package/dist/stories/templates/numeric-input.stories.d.ts.map +1 -0
  372. package/dist/stories/templates/popover.stories.d.ts +55 -0
  373. package/dist/stories/templates/popover.stories.d.ts.map +1 -0
  374. package/dist/stories/templates/product-card.stories.d.ts +10 -0
  375. package/dist/stories/templates/product-card.stories.d.ts.map +1 -0
  376. package/dist/stories/templates/select.stories.d.ts +10 -0
  377. package/dist/stories/templates/select.stories.d.ts.map +1 -0
  378. package/dist/stories/templates/tabs.stories.d.ts +8 -0
  379. package/dist/stories/templates/tabs.stories.d.ts.map +1 -0
  380. package/dist/templates/accordion.js +9 -9
  381. package/dist/templates/breadcrumb.js +78 -0
  382. package/dist/templates/carousel.js +13 -15
  383. package/dist/templates/gallery.js +89 -0
  384. package/dist/templates/numeric-input.js +4 -4
  385. package/dist/templates/popover.js +35 -0
  386. package/dist/templates/product-card.js +10 -10
  387. package/dist/templates/select.js +43 -0
  388. package/dist/templates/tabs.js +8 -8
  389. package/dist/test/visual.spec.d.ts +2 -0
  390. package/dist/test/visual.spec.d.ts.map +1 -0
  391. package/dist/utils.js +1 -1
  392. package/package.json +41 -28
  393. package/src/tokens/_base.css +3 -3
  394. package/src/tokens/_layout.css +4 -0
  395. package/src/tokens/_semantic.css +49 -10
  396. package/src/tokens/_tokens-base.css +67 -0
  397. package/src/tokens/_typography.css +36 -6
  398. package/src/tokens/components/_form-control.css +67 -0
  399. package/src/tokens/components/atoms/_badge.css +16 -5
  400. package/src/tokens/components/atoms/_button.css +16 -10
  401. package/src/tokens/components/atoms/_checkbox.css +52 -0
  402. package/src/tokens/components/atoms/_icon.css +90 -2
  403. package/src/tokens/components/atoms/_image.css +5 -0
  404. package/src/tokens/components/atoms/_input.css +11 -32
  405. package/src/tokens/components/atoms/_label.css +11 -0
  406. package/src/tokens/components/atoms/_numeric-input.css +27 -13
  407. package/src/tokens/components/atoms/_rating.css +2 -2
  408. package/src/tokens/components/atoms/_status-text.css +32 -0
  409. package/src/tokens/components/atoms/_textarea.css +15 -17
  410. package/src/tokens/components/components.css +10 -1
  411. package/src/tokens/components/molecules/_accordion.css +1 -8
  412. package/src/tokens/components/molecules/_breadcrumb.css +42 -20
  413. package/src/tokens/components/molecules/_carousel.css +10 -2
  414. package/src/tokens/components/molecules/_color-select.css +3 -3
  415. package/src/tokens/components/molecules/_combobox.css +15 -21
  416. package/src/tokens/components/molecules/_dialog.css +0 -1
  417. package/src/tokens/components/molecules/_menu.css +0 -1
  418. package/src/tokens/components/molecules/_pagination.css +3 -3
  419. package/src/tokens/components/molecules/_phone-input.css +63 -0
  420. package/src/tokens/components/molecules/_popover.css +3 -0
  421. package/src/tokens/components/molecules/_product-card.css +9 -1
  422. package/src/tokens/components/molecules/_radio-card.css +197 -0
  423. package/src/tokens/components/molecules/_radio-group.css +150 -0
  424. package/src/tokens/components/molecules/_search-form.css +7 -3
  425. package/src/tokens/components/molecules/_select.css +41 -20
  426. package/src/tokens/components/molecules/_steps.css +115 -34
  427. package/src/tokens/components/molecules/_toast.css +5 -5
  428. package/src/tokens/components/molecules/_tree-view.css +5 -6
  429. package/src/tokens/components/organisms/_footer.css +1 -6
  430. package/src/tokens/components/organisms/_gallery.css +35 -0
  431. package/src/tokens/components/organisms/_header.css +8 -0
  432. package/src/tokens/figma/dark/variables.css +1406 -0
  433. package/src/tokens/figma/light/variables.css +1406 -0
  434. package/src/tokens/index.css +1 -65
  435. package/src/tokens/tokens-only.css +1 -64
  436. package/dist/atoms/error-text.js +0 -38
  437. package/dist/atoms/extra-text.js +0 -27
  438. package/dist/molecules/checkbox.js +0 -98
  439. package/dist/src/atoms/error-text.d.ts +0 -29
  440. package/dist/src/atoms/error-text.d.ts.map +0 -1
  441. package/dist/src/atoms/extra-text.d.ts +0 -27
  442. package/dist/src/atoms/extra-text.d.ts.map +0 -1
  443. package/dist/src/molecules/checkbox.d.ts +0 -19
  444. package/dist/src/molecules/checkbox.d.ts.map +0 -1
  445. package/src/tokens/components/molecules/_checkbox.css +0 -34
  446. package/src/tokens/components/molecules/index.css +0 -2
@@ -1,151 +1,276 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { connect, machine } from "@zag-js/popover";
3
- import { Portal, normalizeProps, useMachine } from "@zag-js/react";
4
- import { useId } from "react";
3
+ import { Portal, mergeProps, normalizeProps, useMachine } from "@zag-js/react";
4
+ import { createContext, useContext, useId } from "react";
5
5
  import { Button } from "../atoms/button.js";
6
6
  import { tv } from "../utils.js";
7
7
  const popoverVariants = tv({
8
8
  slots: {
9
9
  trigger: [
10
- 'p-popover-trigger'
10
+ "p-popover-trigger"
11
+ ],
12
+ indicator: [
13
+ "data-[state=open]:rotate-180"
11
14
  ],
12
15
  positioner: [
13
- 'absolute'
16
+ "absolute"
14
17
  ],
15
18
  content: [
16
- 'bg-popover-bg',
17
- 'text-popover-fg',
18
- 'rounded-popover',
19
- 'outline-none',
20
- 'z-50'
19
+ "bg-popover-bg",
20
+ "text-popover-fg",
21
+ "rounded-popover",
22
+ "outline-none",
23
+ "z-50",
24
+ "relative"
21
25
  ],
22
- arrow: '',
26
+ arrow: "",
27
+ arrowTip: "",
23
28
  title: [
24
- 'font-popover-title',
25
- 'leading-none',
26
- 'mb-popover-title-mb'
29
+ "font-popover-title",
30
+ "leading-none",
31
+ "mb-popover-title-mb"
27
32
  ],
28
33
  description: [
29
34
  "text-popover-description-fg text-popover-description-size",
30
- 'leading-normal'
35
+ "leading-normal"
36
+ ],
37
+ closeTrigger: [
38
+ "absolute top-2 right-2",
39
+ "text-popover-close-trigger-fg"
31
40
  ]
32
41
  },
33
42
  variants: {
34
43
  shadow: {
35
44
  true: {
36
- content: 'shadow-popover'
45
+ content: "shadow-popover"
37
46
  }
38
47
  },
39
48
  border: {
40
49
  true: {
41
- content: 'border border-popover-border',
42
- arrow: 'border-popover-border border-t border-l'
50
+ content: "border border-popover-border",
51
+ arrowTip: "border-popover-border border-t border-l"
43
52
  }
44
53
  },
45
54
  size: {
46
55
  sm: {
47
- content: 'p-popover-sm text-sm',
48
- title: 'text-popover-title-sm'
56
+ content: "p-popover-sm text-sm",
57
+ title: "text-popover-title-sm"
49
58
  },
50
59
  md: {
51
- content: 'p-popover-md',
52
- title: 'text-popover-title-md'
60
+ content: "p-popover-md",
61
+ title: "text-popover-title-md"
53
62
  },
54
63
  lg: {
55
- content: 'p-popover-lg text-lg',
56
- title: 'text-popover-title-lg'
64
+ content: "p-popover-lg text-lg",
65
+ title: "text-popover-title-lg"
57
66
  }
58
67
  }
59
68
  },
60
69
  defaultVariants: {
61
- size: 'md',
62
- shadow: true
70
+ size: "md",
71
+ shadow: true,
72
+ border: true
63
73
  }
64
74
  });
65
- function Popover({ trigger, children, open, defaultOpen, onOpenChange, placement = 'bottom', offset = {
75
+ const PopoverContext = /*#__PURE__*/ createContext(null);
76
+ function usePopoverContext() {
77
+ const context = useContext(PopoverContext);
78
+ if (!context) throw new Error("Popover components must be used within Popover.Root");
79
+ return context;
80
+ }
81
+ function Popover({ autoFocus = true, border, children, closeOnEscape = true, closeOnInteractOutside = true, defaultOpen, dir = "ltr", flip = true, gutter = 8, id, modal = false, offset = {
66
82
  mainAxis: 8,
67
83
  crossAxis: 0
68
- }, gutter = 8, sameWidth = false, slide = true, flip = true, overflowPadding = 8, modal = false, closeOnInteractOutside = true, closeOnEscape = true, showArrow = true, autoFocus = true, portalled = true, title, description, id, triggerRef, contentRef, triggerClassName, contentClassName, size = 'md', shadow = true, border = true, disabled = false, onPointerDownOutside }) {
84
+ }, onOpenChange, onPointerDownOutside, open, overflowPadding = 8, placement = "bottom", portalled = true, sameWidth = false, shadow, size, slide = true, ...props }) {
69
85
  const generatedId = useId();
70
86
  const uniqueId = id || generatedId;
71
87
  const service = useMachine(machine, {
88
+ ...props,
89
+ autoFocus,
90
+ closeOnEscape,
91
+ closeOnInteractOutside,
92
+ defaultOpen,
93
+ dir,
72
94
  id: uniqueId,
95
+ modal,
96
+ onOpenChange,
97
+ onPointerDownOutside,
73
98
  open,
74
- defaultOpen,
75
- dir: 'ltr',
99
+ portalled,
76
100
  positioning: {
77
- placement,
78
- offset,
101
+ flip,
79
102
  gutter,
103
+ offset,
104
+ overflowPadding,
105
+ placement,
80
106
  sameWidth,
81
- slide,
82
- flip,
83
- overflowPadding
84
- },
85
- modal,
86
- closeOnInteractOutside,
87
- closeOnEscape,
88
- autoFocus,
89
- portalled,
90
- onOpenChange,
91
- onPointerDownOutside
107
+ slide
108
+ }
92
109
  });
93
110
  const api = connect(service, normalizeProps);
94
- const { trigger: triggerStyles, positioner, content: contentStyles, arrow, title: titleStyles, description: descriptionStyles } = popoverVariants({
95
- size,
111
+ const styles = popoverVariants({
112
+ border,
96
113
  shadow,
97
- border
114
+ size
98
115
  });
99
- const renderContent = ()=>/*#__PURE__*/ jsx("div", {
100
- ...api.getPositionerProps(),
101
- className: positioner(),
102
- children: /*#__PURE__*/ jsxs("div", {
103
- ...api.getContentProps(),
104
- ref: contentRef,
105
- className: contentStyles({
106
- className: contentClassName
107
- }),
108
- "data-side": placement.split('-')[0],
109
- "data-state": api.open ? 'open' : 'closed',
110
- children: [
111
- showArrow && /*#__PURE__*/ jsx("div", {
112
- ...api.getArrowProps(),
113
- children: /*#__PURE__*/ jsx("div", {
114
- ...api.getArrowTipProps(),
115
- className: arrow()
116
- })
117
- }),
118
- title && /*#__PURE__*/ jsx("div", {
119
- ...api.getTitleProps(),
120
- className: titleStyles(),
121
- children: title
122
- }),
123
- description && /*#__PURE__*/ jsx("div", {
124
- ...api.getDescriptionProps(),
125
- className: descriptionStyles(),
126
- children: description
127
- }),
128
- children
129
- ]
130
- })
131
- });
132
- return /*#__PURE__*/ jsxs(Fragment, {
133
- children: [
134
- /*#__PURE__*/ jsx(Button, {
135
- theme: "borderless",
136
- disabled: disabled,
137
- ...api.getTriggerProps(),
138
- ref: triggerRef,
139
- className: triggerStyles({
140
- className: triggerClassName
141
- }),
142
- "data-state": api.open ? 'open' : 'closed',
143
- children: trigger
144
- }),
145
- portalled ? /*#__PURE__*/ jsx(Portal, {
146
- children: api.open && renderContent()
147
- }) : api.open && renderContent()
148
- ]
116
+ return /*#__PURE__*/ jsx(PopoverContext.Provider, {
117
+ value: {
118
+ api,
119
+ placement,
120
+ styles
121
+ },
122
+ children: children
149
123
  });
150
124
  }
125
+ Popover.Anchor = function({ className, ref, ...props }) {
126
+ const { api } = usePopoverContext();
127
+ const anchorProps = mergeProps(props, api.getAnchorProps());
128
+ return /*#__PURE__*/ jsx("div", {
129
+ ...anchorProps,
130
+ className: className,
131
+ ref: ref
132
+ });
133
+ };
134
+ Popover.Trigger = function({ children, className, clickBehavior = "toggle", disabled, onClick, ref, size = "current", theme = "borderless", type = "button", ...props }) {
135
+ const { api, styles } = usePopoverContext();
136
+ const { disabled: machineDisabled, onClick: onMachineClick, ...machineTriggerProps } = api.getTriggerProps();
137
+ const buttonProps = mergeProps(props, machineTriggerProps);
138
+ const isDisabled = Boolean(disabled || machineDisabled);
139
+ return /*#__PURE__*/ jsx(Button, {
140
+ ...buttonProps,
141
+ className: styles.trigger({
142
+ className
143
+ }),
144
+ "data-state": api.open ? "open" : "closed",
145
+ disabled: isDisabled,
146
+ onClick: (event)=>{
147
+ onClick?.(event);
148
+ if (!event.defaultPrevented && "toggle" === clickBehavior) onMachineClick?.(event);
149
+ },
150
+ ref: ref,
151
+ size: size,
152
+ theme: theme,
153
+ type: type,
154
+ children: children
155
+ });
156
+ };
157
+ Popover.Indicator = function({ className, ref, ...props }) {
158
+ const { api, styles } = usePopoverContext();
159
+ const indicatorProps = mergeProps(props, api.getIndicatorProps());
160
+ return /*#__PURE__*/ jsx("span", {
161
+ ...indicatorProps,
162
+ className: styles.indicator({
163
+ className
164
+ }),
165
+ "data-state": api.open ? "open" : "closed",
166
+ ref: ref
167
+ });
168
+ };
169
+ Popover.Positioner = function({ children, className, forceMount = false, ref, ...props }) {
170
+ const { api, styles } = usePopoverContext();
171
+ if (!(api.open || forceMount)) return null;
172
+ const positionerProps = mergeProps(props, api.getPositionerProps());
173
+ const positionerNode = /*#__PURE__*/ jsx("div", {
174
+ ...positionerProps,
175
+ className: styles.positioner({
176
+ className
177
+ }),
178
+ ref: ref,
179
+ children: children
180
+ });
181
+ return api.portalled ? /*#__PURE__*/ jsx(Portal, {
182
+ children: positionerNode
183
+ }) : positionerNode;
184
+ };
185
+ Popover.Content = function({ children, className, ref, ...props }) {
186
+ const { api, placement, styles } = usePopoverContext();
187
+ const machineContentProps = api.getContentProps();
188
+ const contentProps = mergeProps(props, machineContentProps);
189
+ const contentPlacement = contentProps["data-placement"];
190
+ const contentSide = "string" == typeof contentPlacement ? contentPlacement.split("-")[0] : placement.split("-")[0];
191
+ return /*#__PURE__*/ jsx("div", {
192
+ ...contentProps,
193
+ className: styles.content({
194
+ className
195
+ }),
196
+ "data-side": contentSide,
197
+ "data-state": api.open ? "open" : "closed",
198
+ ref: ref,
199
+ children: children
200
+ });
201
+ };
202
+ Popover.Arrow = function({ children, className, ref, ...props }) {
203
+ const { api, styles } = usePopoverContext();
204
+ const arrowProps = mergeProps(props, api.getArrowProps());
205
+ return /*#__PURE__*/ jsx("div", {
206
+ ...arrowProps,
207
+ className: styles.arrow({
208
+ className
209
+ }),
210
+ ref: ref,
211
+ children: children ?? /*#__PURE__*/ jsx(Popover.ArrowTip, {})
212
+ });
213
+ };
214
+ Popover.ArrowTip = function({ className, ref, ...props }) {
215
+ const { api, styles } = usePopoverContext();
216
+ const arrowTipProps = mergeProps(props, api.getArrowTipProps());
217
+ return /*#__PURE__*/ jsx("div", {
218
+ ...arrowTipProps,
219
+ className: styles.arrowTip({
220
+ className
221
+ }),
222
+ ref: ref
223
+ });
224
+ };
225
+ Popover.Title = function({ className, ref, ...props }) {
226
+ const { api, styles } = usePopoverContext();
227
+ const titleProps = mergeProps(props, api.getTitleProps());
228
+ return /*#__PURE__*/ jsx("div", {
229
+ ...titleProps,
230
+ className: styles.title({
231
+ className
232
+ }),
233
+ ref: ref
234
+ });
235
+ };
236
+ Popover.Description = function({ className, ref, ...props }) {
237
+ const { api, styles } = usePopoverContext();
238
+ const descriptionProps = mergeProps(props, api.getDescriptionProps());
239
+ return /*#__PURE__*/ jsx("div", {
240
+ ...descriptionProps,
241
+ className: styles.description({
242
+ className
243
+ }),
244
+ ref: ref
245
+ });
246
+ };
247
+ Popover.CloseTrigger = function({ children, className, icon, onClick, ref, size = "current", theme = "unstyled", type = "button", ...props }) {
248
+ const { api, styles } = usePopoverContext();
249
+ const { onClick: onMachineClick, ...machineCloseTriggerProps } = api.getCloseTriggerProps();
250
+ const buttonProps = mergeProps(props, machineCloseTriggerProps);
251
+ const closeIcon = icon ?? (children ? void 0 : "token-icon-close");
252
+ return /*#__PURE__*/ jsx(Button, {
253
+ ...buttonProps,
254
+ "aria-label": children ? void 0 : "Close popover",
255
+ className: styles.closeTrigger({
256
+ className
257
+ }),
258
+ icon: closeIcon,
259
+ onClick: (event)=>{
260
+ onClick?.(event);
261
+ if (!event.defaultPrevented) onMachineClick?.(event);
262
+ },
263
+ ref: ref,
264
+ size: size,
265
+ theme: theme,
266
+ type: type,
267
+ children: children
268
+ });
269
+ };
270
+ Popover.Context = function({ children }) {
271
+ const { api } = usePopoverContext();
272
+ return children(api);
273
+ };
274
+ Popover.Root = Popover;
275
+ Popover.displayName = "Popover";
151
276
  export { Popover };
@@ -7,56 +7,56 @@ import { tv } from "../utils.js";
7
7
  const productCardVariants = tv({
8
8
  slots: {
9
9
  root: [
10
- 'rounded-product-card p-product-card-padding',
11
- 'border-(length:--border-product-card-width) border-product-card-border bg-product-card-bg max-w-product-card-max shadow-sm'
10
+ "rounded-product-card p-product-card-padding",
11
+ "border-(length:--border-product-card-width) max-w-product-card-max border-product-card-border bg-product-card-bg shadow-sm"
12
12
  ],
13
- imageSlot: 'object-cover h-full rounded-product-card-image',
14
- nameSlot: 'text-product-card-name-fg font-product-card-name text-product-card-name-size line-clamp-product-card-name',
15
- priceSlot: 'text-product-card-price-fg font-product-card-price text-product-card-price-size',
13
+ imageSlot: "h-full rounded-product-card-image object-cover",
14
+ nameSlot: "line-clamp-product-card-name font-product-card-name text-product-card-name-fg text-product-card-name-size",
15
+ priceSlot: "font-product-card-price text-product-card-price-fg text-product-card-price-size",
16
16
  stockStatusSlot: [
17
- 'text-product-card-stock-size font-product-card-stock',
18
- 'data-[stock=in-stock]:text-product-card-stock-fg-in-stock',
19
- 'data-[stock=limited-stock]:text-product-card-stock-fg-limited-stock',
20
- 'data-[stock=out-of-stock]:text-product-card-stock-fg-out-of-stock'
17
+ "font-product-card-stock text-product-card-stock-size",
18
+ "data-[stock=in-stock]:text-product-card-stock-fg-in-stock",
19
+ "data-[stock=limited-stock]:text-product-card-stock-fg-limited-stock",
20
+ "data-[stock=out-of-stock]:text-product-card-stock-fg-out-of-stock"
21
21
  ],
22
- badgesSlot: 'flex flex-wrap gap-product-card-box',
23
- ratingSlot: 'flex items-center',
24
- actionsSlot: 'flex flex-wrap gap-product-card-buttons',
25
- button: ''
22
+ badgesSlot: "flex flex-wrap gap-product-card-box",
23
+ ratingSlot: "flex items-center",
24
+ actionsSlot: "flex flex-wrap gap-product-card-buttons",
25
+ button: ""
26
26
  },
27
27
  variants: {
28
28
  buttonVariant: {
29
29
  cart: {
30
- button: 'bg-product-card-button-cart-bg hover:bg-product-card-button-cart-bg-hover text-product-card-button-cart-fg w-max'
30
+ button: "w-max bg-product-card-button-cart-bg text-product-card-button-cart-fg hover:bg-product-card-button-cart-bg-hover"
31
31
  },
32
32
  detail: {
33
- button: 'bg-product-card-button-detail-bg hover:bg-product-card-button-detail-bg-hover text-product-card-button-detail-fg w-max'
33
+ button: "w-max bg-product-card-button-detail-bg text-product-card-button-detail-fg hover:bg-product-card-button-detail-bg-hover"
34
34
  },
35
35
  wishlist: {
36
- button: 'bg-product-card-button-wishlist-bg hover:bg-product-card-button-wishlist-bg-hover text-product-card-button-wishlist-fg w-max'
36
+ button: "w-max bg-product-card-button-wishlist-bg text-product-card-button-wishlist-fg hover:bg-product-card-button-wishlist-bg-hover"
37
37
  },
38
38
  custom: {}
39
39
  },
40
40
  layout: {
41
41
  column: {
42
42
  root: [
43
- 'grid grid-cols-(--product-card-layout-column-grid) gap-product-card-col-layout'
43
+ "grid grid-cols-(--product-card-layout-column-grid) gap-product-card-col-layout"
44
44
  ],
45
- imageSlot: 'aspect-product-card-image'
45
+ imageSlot: "aspect-product-card-image"
46
46
  },
47
47
  row: {
48
- root: 'grid grid-cols-(--product-card-layout-row-grid) gap-x-product-card-row-layout',
49
- imageSlot: 'row-span-6 aspect-auto'
48
+ root: "grid grid-cols-(--product-card-layout-row-grid) gap-x-product-card-row-layout",
49
+ imageSlot: "row-span-6 aspect-auto"
50
50
  }
51
51
  }
52
52
  },
53
53
  defaultVariants: {
54
- layout: 'column',
55
- buttonVariant: 'cart'
54
+ layout: "column",
55
+ buttonVariant: "cart"
56
56
  }
57
57
  });
58
58
  const ProductCardContext = /*#__PURE__*/ createContext({});
59
- function ProductCard({ children, layout = 'column', className, ref, ...props }) {
59
+ function ProductCard({ children, layout = "column", className, ref, ...props }) {
60
60
  const { root } = productCardVariants({
61
61
  layout
62
62
  });
@@ -65,10 +65,10 @@ function ProductCard({ children, layout = 'column', className, ref, ...props })
65
65
  layout
66
66
  },
67
67
  children: /*#__PURE__*/ jsx("div", {
68
- ref: ref,
69
68
  className: root({
70
69
  className
71
70
  }),
71
+ ref: ref,
72
72
  ...props,
73
73
  children: children
74
74
  })
@@ -81,10 +81,10 @@ ProductCard.Image = function({ as, className, ref, ...props }) {
81
81
  });
82
82
  const ImageComponent = as || Image;
83
83
  return /*#__PURE__*/ jsx(ImageComponent, {
84
- ref: ref,
85
84
  className: imageSlot({
86
85
  className
87
86
  }),
87
+ ref: ref,
88
88
  ...props
89
89
  });
90
90
  };
@@ -94,10 +94,10 @@ ProductCard.Name = function({ children, className, ref, ...props }) {
94
94
  layout: context.layout
95
95
  });
96
96
  return /*#__PURE__*/ jsx("h3", {
97
- ref: ref,
98
97
  className: nameSlot({
99
98
  className
100
99
  }),
100
+ ref: ref,
101
101
  ...props,
102
102
  children: children
103
103
  });
@@ -108,25 +108,25 @@ ProductCard.Price = function({ children, className, ref, ...props }) {
108
108
  layout: context.layout
109
109
  });
110
110
  return /*#__PURE__*/ jsx("p", {
111
- ref: ref,
112
111
  className: priceSlot({
113
112
  className
114
113
  }),
114
+ ref: ref,
115
115
  ...props,
116
116
  children: children
117
117
  });
118
118
  };
119
- ProductCard.Stock = function({ children, className, ref, status = 'in-stock', ...props }) {
119
+ ProductCard.Stock = function({ children, className, ref, status = "in-stock", ...props }) {
120
120
  const context = useContext(ProductCardContext);
121
121
  const { stockStatusSlot } = productCardVariants({
122
122
  layout: context.layout
123
123
  });
124
124
  return /*#__PURE__*/ jsx("p", {
125
- ref: ref,
126
- "data-stock": status,
127
125
  className: stockStatusSlot({
128
126
  className
129
127
  }),
128
+ "data-stock": status,
129
+ ref: ref,
130
130
  ...props,
131
131
  children: children
132
132
  });
@@ -137,10 +137,10 @@ ProductCard.Badges = function({ children, className, ref, ...props }) {
137
137
  layout: context.layout
138
138
  });
139
139
  return /*#__PURE__*/ jsx("div", {
140
- ref: ref,
141
140
  className: badgesSlot({
142
141
  className
143
142
  }),
143
+ ref: ref,
144
144
  ...props,
145
145
  children: children
146
146
  });
@@ -151,10 +151,10 @@ ProductCard.Rating = function({ children, className, rating, ref, ...props }) {
151
151
  layout: context.layout
152
152
  });
153
153
  return /*#__PURE__*/ jsx("div", {
154
- ref: ref,
155
154
  className: ratingSlot({
156
155
  className
157
156
  }),
157
+ ref: ref,
158
158
  ...props,
159
159
  children: rating ? /*#__PURE__*/ jsx(Rating, {
160
160
  ...rating
@@ -167,26 +167,27 @@ ProductCard.Actions = function({ children, className, ref, ...props }) {
167
167
  layout: context.layout
168
168
  });
169
169
  return /*#__PURE__*/ jsx("div", {
170
- ref: ref,
171
170
  className: actionsSlot({
172
171
  className
173
172
  }),
173
+ ref: ref,
174
174
  ...props,
175
175
  children: children
176
176
  });
177
177
  };
178
- ProductCard.Button = function({ children, onClick, icon, className, buttonVariant, ref, ...props }) {
178
+ ProductCard.Button = function({ children, onClick, icon, iconSize, className, buttonVariant, ref, ...props }) {
179
179
  const { button } = productCardVariants({
180
180
  buttonVariant
181
181
  });
182
182
  return /*#__PURE__*/ jsx(Button, {
183
- ref: ref,
184
- size: "sm",
185
183
  className: button({
186
184
  className
187
185
  }),
188
- onClick: onClick,
189
186
  icon: icon,
187
+ iconSize: iconSize,
188
+ onClick: onClick,
189
+ ref: ref,
190
+ size: "sm",
190
191
  ...props,
191
192
  children: children
192
193
  });