@jbpark/ui-kit 5.2.0 → 5.3.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 (399) hide show
  1. package/dist/Button.d.mts +1 -19
  2. package/dist/Button.d.mts.map +1 -1
  3. package/dist/Button.mjs +2 -4
  4. package/dist/Button.mjs.map +1 -1
  5. package/dist/Card.d.mts +1 -10
  6. package/dist/Card.d.mts.map +1 -1
  7. package/dist/Card.mjs +1 -2
  8. package/dist/Card.mjs.map +1 -1
  9. package/dist/Layout.d.mts +5 -6
  10. package/dist/Layout.d.mts.map +1 -1
  11. package/dist/Layout.mjs +1 -2
  12. package/dist/Layout.mjs.map +1 -1
  13. package/dist/Menu.d.mts +1 -1
  14. package/dist/Menu.mjs +1 -2
  15. package/dist/Reveals.d.mts +2 -3
  16. package/dist/Reveals.d.mts.map +1 -1
  17. package/dist/Reveals.mjs +1 -2
  18. package/dist/Reveals.mjs.map +1 -1
  19. package/dist/Space.d.mts +1 -17
  20. package/dist/Space.d.mts.map +1 -1
  21. package/dist/Space.mjs +1 -2
  22. package/dist/Space.mjs.map +1 -1
  23. package/dist/Tag.d.mts +1 -9
  24. package/dist/Tag.d.mts.map +1 -1
  25. package/dist/Tag.mjs +1 -2
  26. package/dist/Tag.mjs.map +1 -1
  27. package/dist/Typography.d.mts +5 -6
  28. package/dist/Typography.d.mts.map +1 -1
  29. package/dist/Typography.mjs +1 -2
  30. package/dist/Typography.mjs.map +1 -1
  31. package/dist/_virtual/_rolldown/runtime.mjs +6 -11
  32. package/dist/components/atoms/checkbox/checkbox.d.mts +2 -17
  33. package/dist/components/atoms/checkbox/checkbox.d.mts.map +1 -1
  34. package/dist/components/atoms/checkbox/checkbox.mjs +2 -4
  35. package/dist/components/atoms/checkbox/checkbox.mjs.map +1 -1
  36. package/dist/components/atoms/checkbox/group.d.mts +2 -16
  37. package/dist/components/atoms/checkbox/group.d.mts.map +1 -1
  38. package/dist/components/atoms/checkbox/group.mjs +4 -5
  39. package/dist/components/atoms/checkbox/group.mjs.map +1 -1
  40. package/dist/components/atoms/checkbox/index.d.mts +3 -4
  41. package/dist/components/atoms/checkbox/index.d.mts.map +1 -1
  42. package/dist/components/atoms/checkbox/index.mjs +1 -2
  43. package/dist/components/atoms/checkbox/index.mjs.map +1 -1
  44. package/dist/components/atoms/color-picker.d.mts +2 -15
  45. package/dist/components/atoms/color-picker.d.mts.map +1 -1
  46. package/dist/components/atoms/color-picker.mjs +2 -4
  47. package/dist/components/atoms/color-picker.mjs.map +1 -1
  48. package/dist/components/atoms/date-picker.d.mts +2 -11
  49. package/dist/components/atoms/date-picker.d.mts.map +1 -1
  50. package/dist/components/atoms/date-picker.mjs +2 -4
  51. package/dist/components/atoms/date-picker.mjs.map +1 -1
  52. package/dist/components/atoms/float-button/back-top.d.mts +2 -10
  53. package/dist/components/atoms/float-button/back-top.d.mts.map +1 -1
  54. package/dist/components/atoms/float-button/back-top.mjs +4 -5
  55. package/dist/components/atoms/float-button/back-top.mjs.map +1 -1
  56. package/dist/components/atoms/float-button/float-button.d.mts +2 -8
  57. package/dist/components/atoms/float-button/float-button.d.mts.map +1 -1
  58. package/dist/components/atoms/float-button/float-button.mjs +1 -2
  59. package/dist/components/atoms/float-button/float-button.mjs.map +1 -1
  60. package/dist/components/atoms/float-button/index.d.mts +3 -4
  61. package/dist/components/atoms/float-button/index.d.mts.map +1 -1
  62. package/dist/components/atoms/float-button/index.mjs +1 -2
  63. package/dist/components/atoms/float-button/index.mjs.map +1 -1
  64. package/dist/components/atoms/index.d.mts +13 -12
  65. package/dist/components/atoms/input/index.d.mts +4 -5
  66. package/dist/components/atoms/input/index.d.mts.map +1 -1
  67. package/dist/components/atoms/input/index.mjs +2 -3
  68. package/dist/components/atoms/input/index.mjs.map +1 -1
  69. package/dist/components/atoms/input/input.d.mts +2 -7
  70. package/dist/components/atoms/input/input.d.mts.map +1 -1
  71. package/dist/components/atoms/input/input.mjs +1 -2
  72. package/dist/components/atoms/input/input.mjs.map +1 -1
  73. package/dist/components/atoms/input/search.d.mts +2 -15
  74. package/dist/components/atoms/input/search.d.mts.map +1 -1
  75. package/dist/components/atoms/input/search.mjs +2 -4
  76. package/dist/components/atoms/input/search.mjs.map +1 -1
  77. package/dist/components/atoms/input/text-area.d.mts +2 -8
  78. package/dist/components/atoms/input/text-area.d.mts.map +1 -1
  79. package/dist/components/atoms/input/text-area.mjs +1 -2
  80. package/dist/components/atoms/input/text-area.mjs.map +1 -1
  81. package/dist/components/atoms/option-group.d.mts +1 -1
  82. package/dist/components/atoms/option-group.d.mts.map +1 -1
  83. package/dist/components/atoms/option-group.mjs +1 -1
  84. package/dist/components/atoms/option-group.mjs.map +1 -1
  85. package/dist/components/atoms/popover.d.mts +2 -14
  86. package/dist/components/atoms/popover.d.mts.map +1 -1
  87. package/dist/components/atoms/popover.mjs +1 -2
  88. package/dist/components/atoms/popover.mjs.map +1 -1
  89. package/dist/components/atoms/progress.d.mts +2 -10
  90. package/dist/components/atoms/progress.d.mts.map +1 -1
  91. package/dist/components/atoms/progress.mjs +1 -2
  92. package/dist/components/atoms/progress.mjs.map +1 -1
  93. package/dist/components/atoms/radio/context.mjs +2 -4
  94. package/dist/components/atoms/radio/context.mjs.map +1 -1
  95. package/dist/components/atoms/radio/group.d.mts +2 -19
  96. package/dist/components/atoms/radio/group.d.mts.map +1 -1
  97. package/dist/components/atoms/radio/group.mjs +2 -4
  98. package/dist/components/atoms/radio/group.mjs.map +1 -1
  99. package/dist/components/atoms/radio/index.d.mts +3 -4
  100. package/dist/components/atoms/radio/index.d.mts.map +1 -1
  101. package/dist/components/atoms/radio/index.mjs +1 -2
  102. package/dist/components/atoms/radio/index.mjs.map +1 -1
  103. package/dist/components/atoms/radio/radio.d.mts +2 -18
  104. package/dist/components/atoms/radio/radio.d.mts.map +1 -1
  105. package/dist/components/atoms/radio/radio.mjs +2 -4
  106. package/dist/components/atoms/radio/radio.mjs.map +1 -1
  107. package/dist/components/atoms/select.d.mts +2 -10
  108. package/dist/components/atoms/select.d.mts.map +1 -1
  109. package/dist/components/atoms/select.mjs +2 -3
  110. package/dist/components/atoms/select.mjs.map +1 -1
  111. package/dist/components/atoms/skeleton/button.d.mts +2 -7
  112. package/dist/components/atoms/skeleton/button.d.mts.map +1 -1
  113. package/dist/components/atoms/skeleton/button.mjs +1 -2
  114. package/dist/components/atoms/skeleton/button.mjs.map +1 -1
  115. package/dist/components/atoms/skeleton/index.d.mts +4 -5
  116. package/dist/components/atoms/skeleton/index.d.mts.map +1 -1
  117. package/dist/components/atoms/skeleton/index.mjs +2 -3
  118. package/dist/components/atoms/skeleton/index.mjs.map +1 -1
  119. package/dist/components/atoms/skeleton/node.d.mts +2 -7
  120. package/dist/components/atoms/skeleton/node.d.mts.map +1 -1
  121. package/dist/components/atoms/skeleton/node.mjs +1 -2
  122. package/dist/components/atoms/skeleton/node.mjs.map +1 -1
  123. package/dist/components/atoms/skeleton/skeleton.d.mts +2 -20
  124. package/dist/components/atoms/skeleton/skeleton.d.mts.map +1 -1
  125. package/dist/components/atoms/skeleton/skeleton.mjs +2 -4
  126. package/dist/components/atoms/skeleton/skeleton.mjs.map +1 -1
  127. package/dist/components/atoms/spin.d.mts +2 -10
  128. package/dist/components/atoms/spin.d.mts.map +1 -1
  129. package/dist/components/atoms/spin.mjs +2 -4
  130. package/dist/components/atoms/spin.mjs.map +1 -1
  131. package/dist/components/atoms/switch.d.mts +2 -14
  132. package/dist/components/atoms/switch.d.mts.map +1 -1
  133. package/dist/components/atoms/switch.mjs +2 -4
  134. package/dist/components/atoms/switch.mjs.map +1 -1
  135. package/dist/components/atoms/typography/link.d.mts +2 -10
  136. package/dist/components/atoms/typography/link.d.mts.map +1 -1
  137. package/dist/components/atoms/typography/link.mjs +1 -2
  138. package/dist/components/atoms/typography/link.mjs.map +1 -1
  139. package/dist/components/atoms/typography/paragraph.d.mts +2 -8
  140. package/dist/components/atoms/typography/paragraph.d.mts.map +1 -1
  141. package/dist/components/atoms/typography/paragraph.mjs +1 -2
  142. package/dist/components/atoms/typography/paragraph.mjs.map +1 -1
  143. package/dist/components/atoms/typography/text.d.mts +2 -10
  144. package/dist/components/atoms/typography/text.d.mts.map +1 -1
  145. package/dist/components/atoms/typography/text.mjs +1 -2
  146. package/dist/components/atoms/typography/text.mjs.map +1 -1
  147. package/dist/components/atoms/typography/title.d.mts +2 -9
  148. package/dist/components/atoms/typography/title.d.mts.map +1 -1
  149. package/dist/components/atoms/typography/title.mjs +1 -2
  150. package/dist/components/atoms/typography/title.mjs.map +1 -1
  151. package/dist/components/atoms/typography/typography.d.mts +2 -7
  152. package/dist/components/atoms/typography/typography.d.mts.map +1 -1
  153. package/dist/components/atoms/typography/typography.mjs +1 -2
  154. package/dist/components/atoms/typography/typography.mjs.map +1 -1
  155. package/dist/components/molecules/collapse.d.mts +2 -14
  156. package/dist/components/molecules/collapse.d.mts.map +1 -1
  157. package/dist/components/molecules/collapse.mjs +4 -6
  158. package/dist/components/molecules/collapse.mjs.map +1 -1
  159. package/dist/components/molecules/dropdown.d.mts +2 -15
  160. package/dist/components/molecules/dropdown.d.mts.map +1 -1
  161. package/dist/components/molecules/dropdown.mjs +2 -4
  162. package/dist/components/molecules/dropdown.mjs.map +1 -1
  163. package/dist/components/molecules/index.d.mts +7 -7
  164. package/dist/components/molecules/marquees/index.d.mts +3 -4
  165. package/dist/components/molecules/marquees/index.d.mts.map +1 -1
  166. package/dist/components/molecules/marquees/index.mjs +2 -3
  167. package/dist/components/molecules/marquees/index.mjs.map +1 -1
  168. package/dist/components/molecules/marquees/item.d.mts +2 -11
  169. package/dist/components/molecules/marquees/item.d.mts.map +1 -1
  170. package/dist/components/molecules/marquees/item.mjs +12 -10
  171. package/dist/components/molecules/marquees/item.mjs.map +1 -1
  172. package/dist/components/molecules/marquees/marquees.d.mts +2 -11
  173. package/dist/components/molecules/marquees/marquees.d.mts.map +1 -1
  174. package/dist/components/molecules/marquees/marquees.mjs +5 -5
  175. package/dist/components/molecules/marquees/marquees.mjs.map +1 -1
  176. package/dist/components/molecules/menu/item/item.mjs +2 -4
  177. package/dist/components/molecules/menu/item/item.mjs.map +1 -1
  178. package/dist/components/molecules/menu/item/label.mjs +1 -2
  179. package/dist/components/molecules/menu/item/label.mjs.map +1 -1
  180. package/dist/components/molecules/menu/menu.d.mts +2 -17
  181. package/dist/components/molecules/menu/menu.d.mts.map +1 -1
  182. package/dist/components/molecules/menu/menu.mjs +2 -4
  183. package/dist/components/molecules/menu/menu.mjs.map +1 -1
  184. package/dist/components/molecules/reveals/item.d.mts +2 -15
  185. package/dist/components/molecules/reveals/item.d.mts.map +1 -1
  186. package/dist/components/molecules/reveals/item.mjs +2 -4
  187. package/dist/components/molecules/reveals/item.mjs.map +1 -1
  188. package/dist/components/molecules/reveals/reveals.d.mts +2 -18
  189. package/dist/components/molecules/reveals/reveals.d.mts.map +1 -1
  190. package/dist/components/molecules/reveals/reveals.mjs +2 -3
  191. package/dist/components/molecules/reveals/reveals.mjs.map +1 -1
  192. package/dist/components/molecules/splitter/index.d.mts +3 -4
  193. package/dist/components/molecules/splitter/index.d.mts.map +1 -1
  194. package/dist/components/molecules/splitter/index.mjs +1 -2
  195. package/dist/components/molecules/splitter/index.mjs.map +1 -1
  196. package/dist/components/molecules/splitter/panel.d.mts +2 -8
  197. package/dist/components/molecules/splitter/panel.d.mts.map +1 -1
  198. package/dist/components/molecules/splitter/panel.mjs +1 -2
  199. package/dist/components/molecules/splitter/panel.mjs.map +1 -1
  200. package/dist/components/molecules/splitter/splitter.d.mts +2 -14
  201. package/dist/components/molecules/splitter/splitter.d.mts.map +1 -1
  202. package/dist/components/molecules/splitter/splitter.mjs +2 -4
  203. package/dist/components/molecules/splitter/splitter.mjs.map +1 -1
  204. package/dist/components/molecules/upload.d.mts +2 -15
  205. package/dist/components/molecules/upload.d.mts.map +1 -1
  206. package/dist/components/molecules/upload.mjs +2 -4
  207. package/dist/components/molecules/upload.mjs.map +1 -1
  208. package/dist/components/organisms/drawer.d.mts +2 -25
  209. package/dist/components/organisms/drawer.d.mts.map +1 -1
  210. package/dist/components/organisms/drawer.mjs +2 -4
  211. package/dist/components/organisms/drawer.mjs.map +1 -1
  212. package/dist/components/organisms/imperative-stack.mjs +2 -4
  213. package/dist/components/organisms/imperative-stack.mjs.map +1 -1
  214. package/dist/components/organisms/index.d.mts +6 -5
  215. package/dist/components/organisms/list/index.d.mts +3 -4
  216. package/dist/components/organisms/list/index.d.mts.map +1 -1
  217. package/dist/components/organisms/list/index.mjs +1 -2
  218. package/dist/components/organisms/list/index.mjs.map +1 -1
  219. package/dist/components/organisms/list/item.d.mts +2 -8
  220. package/dist/components/organisms/list/item.d.mts.map +1 -1
  221. package/dist/components/organisms/list/item.mjs +1 -2
  222. package/dist/components/organisms/list/item.mjs.map +1 -1
  223. package/dist/components/organisms/list/list.d.mts +3 -20
  224. package/dist/components/organisms/list/list.d.mts.map +1 -1
  225. package/dist/components/organisms/list/list.mjs +3 -5
  226. package/dist/components/organisms/list/list.mjs.map +1 -1
  227. package/dist/components/organisms/modal.d.mts +2 -22
  228. package/dist/components/organisms/modal.d.mts.map +1 -1
  229. package/dist/components/organisms/modal.mjs +3 -5
  230. package/dist/components/organisms/modal.mjs.map +1 -1
  231. package/dist/components/organisms/swiper/index.d.mts +3 -4
  232. package/dist/components/organisms/swiper/index.d.mts.map +1 -1
  233. package/dist/components/organisms/swiper/index.mjs +2 -3
  234. package/dist/components/organisms/swiper/index.mjs.map +1 -1
  235. package/dist/components/organisms/swiper/slide.d.mts +2 -8
  236. package/dist/components/organisms/swiper/slide.d.mts.map +1 -1
  237. package/dist/components/organisms/swiper/slide.mjs +2 -4
  238. package/dist/components/organisms/swiper/slide.mjs.map +1 -1
  239. package/dist/components/organisms/swiper/swiper.d.mts +2 -15
  240. package/dist/components/organisms/swiper/swiper.d.mts.map +1 -1
  241. package/dist/components/organisms/swiper/swiper.mjs +2 -4
  242. package/dist/components/organisms/swiper/swiper.mjs.map +1 -1
  243. package/dist/components/organisms/toast.d.mts +2 -13
  244. package/dist/components/organisms/toast.d.mts.map +1 -1
  245. package/dist/components/organisms/toast.mjs +2 -4
  246. package/dist/components/organisms/toast.mjs.map +1 -1
  247. package/dist/components/templates/container.d.mts +2 -10
  248. package/dist/components/templates/container.d.mts.map +1 -1
  249. package/dist/components/templates/container.mjs +1 -2
  250. package/dist/components/templates/container.mjs.map +1 -1
  251. package/dist/components/templates/empty.d.mts +2 -11
  252. package/dist/components/templates/empty.d.mts.map +1 -1
  253. package/dist/components/templates/empty.mjs +1 -2
  254. package/dist/components/templates/empty.mjs.map +1 -1
  255. package/dist/components/templates/grid/col.d.mts +2 -17
  256. package/dist/components/templates/grid/col.d.mts.map +1 -1
  257. package/dist/components/templates/grid/col.mjs +2 -4
  258. package/dist/components/templates/grid/col.mjs.map +1 -1
  259. package/dist/components/templates/grid/row-context.mjs +1 -2
  260. package/dist/components/templates/grid/row-context.mjs.map +1 -1
  261. package/dist/components/templates/grid/row.d.mts +2 -13
  262. package/dist/components/templates/grid/row.d.mts.map +1 -1
  263. package/dist/components/templates/grid/row.mjs +2 -4
  264. package/dist/components/templates/grid/row.mjs.map +1 -1
  265. package/dist/components/templates/layout/content.d.mts +2 -9
  266. package/dist/components/templates/layout/content.d.mts.map +1 -1
  267. package/dist/components/templates/layout/content.mjs +1 -2
  268. package/dist/components/templates/layout/content.mjs.map +1 -1
  269. package/dist/components/templates/layout/footer.d.mts +2 -8
  270. package/dist/components/templates/layout/footer.d.mts.map +1 -1
  271. package/dist/components/templates/layout/footer.mjs +1 -2
  272. package/dist/components/templates/layout/footer.mjs.map +1 -1
  273. package/dist/components/templates/layout/header.d.mts +2 -9
  274. package/dist/components/templates/layout/header.d.mts.map +1 -1
  275. package/dist/components/templates/layout/header.mjs +1 -2
  276. package/dist/components/templates/layout/header.mjs.map +1 -1
  277. package/dist/components/templates/layout/layout.d.mts +2 -8
  278. package/dist/components/templates/layout/layout.d.mts.map +1 -1
  279. package/dist/components/templates/layout/layout.mjs +1 -2
  280. package/dist/components/templates/layout/layout.mjs.map +1 -1
  281. package/dist/components/templates/layout/sider-context.mjs +1 -2
  282. package/dist/components/templates/layout/sider-context.mjs.map +1 -1
  283. package/dist/components/templates/layout/sider.d.mts +2 -21
  284. package/dist/components/templates/layout/sider.d.mts.map +1 -1
  285. package/dist/components/templates/layout/sider.mjs +2 -4
  286. package/dist/components/templates/layout/sider.mjs.map +1 -1
  287. package/dist/components/templates/page-header.d.mts +2 -14
  288. package/dist/components/templates/page-header.d.mts.map +1 -1
  289. package/dist/components/templates/page-header.mjs +2 -4
  290. package/dist/components/templates/page-header.mjs.map +1 -1
  291. package/dist/components/templates/result.d.mts +2 -13
  292. package/dist/components/templates/result.d.mts.map +1 -1
  293. package/dist/components/templates/result.mjs +1 -2
  294. package/dist/components/templates/result.mjs.map +1 -1
  295. package/dist/core/accordion.d.mts +5 -22
  296. package/dist/core/accordion.d.mts.map +1 -1
  297. package/dist/core/accordion.mjs +3 -5
  298. package/dist/core/accordion.mjs.map +1 -1
  299. package/dist/core/badge.d.mts +4 -13
  300. package/dist/core/badge.d.mts.map +1 -1
  301. package/dist/core/badge.mjs +2 -3
  302. package/dist/core/badge.mjs.map +1 -1
  303. package/dist/core/button.d.mts +5 -15
  304. package/dist/core/button.d.mts.map +1 -1
  305. package/dist/core/button.mjs +1 -2
  306. package/dist/core/button.mjs.map +1 -1
  307. package/dist/core/calendar.d.mts +4 -21
  308. package/dist/core/calendar.d.mts.map +1 -1
  309. package/dist/core/calendar.mjs +3 -5
  310. package/dist/core/calendar.mjs.map +1 -1
  311. package/dist/core/checkbox.d.mts +2 -8
  312. package/dist/core/checkbox.d.mts.map +1 -1
  313. package/dist/core/checkbox.mjs +3 -5
  314. package/dist/core/checkbox.mjs.map +1 -1
  315. package/dist/core/dialog.d.mts +12 -48
  316. package/dist/core/dialog.d.mts.map +1 -1
  317. package/dist/core/dialog.mjs +3 -5
  318. package/dist/core/dialog.mjs.map +1 -1
  319. package/dist/core/drawer.d.mts +11 -46
  320. package/dist/core/drawer.d.mts.map +1 -1
  321. package/dist/core/drawer.mjs +3 -5
  322. package/dist/core/drawer.mjs.map +1 -1
  323. package/dist/core/field.d.mts +15 -54
  324. package/dist/core/field.d.mts.map +1 -1
  325. package/dist/core/field.mjs +3 -5
  326. package/dist/core/field.mjs.map +1 -1
  327. package/dist/core/input.d.mts +2 -9
  328. package/dist/core/input.d.mts.map +1 -1
  329. package/dist/core/input.mjs +2 -3
  330. package/dist/core/input.mjs.map +1 -1
  331. package/dist/core/label.d.mts +1 -7
  332. package/dist/core/label.d.mts.map +1 -1
  333. package/dist/core/label.mjs +2 -4
  334. package/dist/core/label.mjs.map +1 -1
  335. package/dist/core/popover.d.mts +9 -33
  336. package/dist/core/popover.d.mts.map +1 -1
  337. package/dist/core/popover.mjs +3 -5
  338. package/dist/core/popover.mjs.map +1 -1
  339. package/dist/core/progress.d.mts +2 -11
  340. package/dist/core/progress.d.mts.map +1 -1
  341. package/dist/core/progress.mjs +3 -5
  342. package/dist/core/progress.mjs.map +1 -1
  343. package/dist/core/radio-group.d.mts +4 -15
  344. package/dist/core/radio-group.d.mts.map +1 -1
  345. package/dist/core/radio-group.mjs +3 -5
  346. package/dist/core/radio-group.mjs.map +1 -1
  347. package/dist/core/resizable.d.mts +5 -17
  348. package/dist/core/resizable.d.mts.map +1 -1
  349. package/dist/core/resizable.mjs +3 -5
  350. package/dist/core/resizable.mjs.map +1 -1
  351. package/dist/core/select.d.mts +13 -50
  352. package/dist/core/select.d.mts.map +1 -1
  353. package/dist/core/select.mjs +3 -5
  354. package/dist/core/select.mjs.map +1 -1
  355. package/dist/core/separator.d.mts +2 -10
  356. package/dist/core/separator.d.mts.map +1 -1
  357. package/dist/core/separator.mjs +2 -4
  358. package/dist/core/separator.mjs.map +1 -1
  359. package/dist/core/skeleton.d.mts +2 -8
  360. package/dist/core/skeleton.d.mts.map +1 -1
  361. package/dist/core/skeleton.mjs +2 -3
  362. package/dist/core/skeleton.mjs.map +1 -1
  363. package/dist/core/switch.d.mts +3 -12
  364. package/dist/core/switch.d.mts.map +1 -1
  365. package/dist/core/switch.mjs +3 -5
  366. package/dist/core/switch.mjs.map +1 -1
  367. package/dist/core/textarea.d.mts +2 -8
  368. package/dist/core/textarea.d.mts.map +1 -1
  369. package/dist/core/textarea.mjs +2 -3
  370. package/dist/core/textarea.mjs.map +1 -1
  371. package/dist/core.mjs +1 -2
  372. package/dist/index.d.mts +31 -33
  373. package/dist/index.mjs +2 -3
  374. package/dist/providers/config/config.d.mts +2 -14
  375. package/dist/providers/config/config.d.mts.map +1 -1
  376. package/dist/providers/config/config.mjs +5 -6
  377. package/dist/providers/config/config.mjs.map +1 -1
  378. package/dist/providers/config/context.d.mts +0 -2
  379. package/dist/providers/config/context.d.mts.map +1 -1
  380. package/dist/providers/config/context.mjs +2 -4
  381. package/dist/providers/config/context.mjs.map +1 -1
  382. package/dist/providers/config/registry.d.mts +2 -7
  383. package/dist/providers/config/registry.d.mts.map +1 -1
  384. package/dist/providers/config/registry.mjs +2 -4
  385. package/dist/providers/config/registry.mjs.map +1 -1
  386. package/dist/providers/config/types.d.mts.map +1 -1
  387. package/dist/providers.d.mts +1 -2
  388. package/dist/providers.mjs +1 -2
  389. package/dist/style.css +1051 -1755
  390. package/dist/utils.d.mts +0 -1
  391. package/dist/utils.d.mts.map +1 -1
  392. package/dist/utils.mjs +1 -2
  393. package/dist/utils.mjs.map +1 -1
  394. package/package.json +29 -28
  395. package/dist/components/templates/grid/index.d.mts +0 -2
  396. package/dist/components/templates/index.d.mts +0 -13
  397. package/dist/providers/config/index.d.mts +0 -4
  398. package/dist/style.css.map +0 -1
  399. package/dist/style.mjs +0 -1
@@ -1,11 +1,6 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
-
3
1
  //#region src/components/atoms/typography/typography.d.ts
4
2
  interface Props extends React.ComponentPropsWithoutRef<'article'> {}
5
- declare const Typography: ({
6
- children,
7
- ...props
8
- }: Props) => react_jsx_runtime0.JSX.Element;
3
+ declare const Typography: ({ children, ...props }: Props) => import("react").JSX.Element;
9
4
  //#endregion
10
- export { Props, Typography };
5
+ export { Props, Typography as default };
11
6
  //# sourceMappingURL=typography.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.mts","names":[],"sources":["../../../../src/components/atoms/typography/typography.tsx"],"mappings":";;;UAAiB,KAAA,SAAc,KAAA,CAAM,wBAAA;AAAA,cAE/B,UAAA;EAAc,QAAA;EAAA,GAAA;AAAA,GAAwB,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"typography.d.mts","names":[],"sources":["../../../../src/components/atoms/typography/typography.tsx"],"mappings":";UAAiB,cAAc,MAAM;cAE/B,eAAc,aAAA,SAAwB,0BAAK,IAAA"}
@@ -1,5 +1,4 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
-
3
2
  //#region src/components/atoms/typography/typography.tsx
4
3
  const Typography = ({ children, ...props }) => {
5
4
  return /* @__PURE__ */ jsx("article", {
@@ -7,7 +6,7 @@ const Typography = ({ children, ...props }) => {
7
6
  children
8
7
  });
9
8
  };
10
-
11
9
  //#endregion
12
10
  export { Typography as default };
11
+
13
12
  //# sourceMappingURL=typography.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.mjs","names":[],"sources":["../../../../src/components/atoms/typography/typography.tsx"],"sourcesContent":["export interface Props extends React.ComponentPropsWithoutRef<'article'> {}\n\nconst Typography = ({ children, ...props }: Props) => {\n return <article {...props}>{children}</article>;\n};\n\nexport default Typography;\n"],"mappings":";;;AAEA,MAAM,cAAc,EAAE,UAAU,GAAG,YAAmB;AACpD,QAAO,oBAAC;EAAQ,GAAI;EAAQ;GAAmB"}
1
+ {"version":3,"file":"typography.mjs","names":[],"sources":["../../../../src/components/atoms/typography/typography.tsx"],"sourcesContent":["export interface Props extends React.ComponentPropsWithoutRef<'article'> {}\n\nconst Typography = ({ children, ...props }: Props) => {\n return <article {...props}>{children}</article>;\n};\n\nexport default Typography;\n"],"mappings":";;AAEA,MAAM,cAAc,EAAE,UAAU,GAAG,YAAmB;CACpD,OAAO,oBAAC,WAAD;EAAS,GAAI;EAAQ;CAAkB,CAAA;AAChD"}
@@ -1,6 +1,4 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
-
4
2
  //#region src/components/molecules/collapse.d.ts
5
3
  interface Item {
6
4
  key: React.Key;
@@ -21,17 +19,7 @@ interface Props extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange' |
21
19
  activeKey?: string[] | number[];
22
20
  onChange?: (keys: string[]) => void;
23
21
  }
24
- declare const Collapse: ({
25
- expandIcon,
26
- accordion,
27
- items,
28
- className,
29
- classNames,
30
- defaultActiveKey,
31
- activeKey: _activeKey,
32
- onChange: _onChange,
33
- ...props
34
- }: Props) => react_jsx_runtime0.JSX.Element;
22
+ declare const Collapse: ({ expandIcon, accordion, items, className, classNames, defaultActiveKey, activeKey: _activeKey, onChange: _onChange, ...props }: Props) => React.JSX.Element;
35
23
  //#endregion
36
- export { Collapse, Props };
24
+ export { Props, Collapse as default };
37
25
  //# sourceMappingURL=collapse.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.d.mts","names":[],"sources":["../../../src/components/molecules/collapse.tsx"],"mappings":";;;;UAUU,IAAA;EACR,GAAA,EAAK,KAAA,CAAM,GAAA;EACX,KAAA,EAAO,KAAA,CAAM,SAAA;EACb,QAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAGD,KAAA,SAAc,IAAA,CAC7B,KAAA,CAAM,wBAAA;EAGN,KAAA,GAAQ,IAAA;EACR,SAAA;EACA,UAAA,GAAa,KAAA,CAAM,SAAA;EACnB,UAAA;IACE,IAAA;IACA,MAAA;IACA,IAAA;EAAA;EAEF,gBAAA;EACA,SAAA;EACA,QAAA,IAAY,IAAA;AAAA;AAAA,cAGR,QAAA;EAAY,UAAA;EAAA,SAAA;EAAA,KAAA;EAAA,SAAA;EAAA,UAAA;EAAA,gBAAA;EAAA,SAAA,EAAA,UAAA;EAAA,QAAA,EAAA,SAAA;EAAA,GAAA;AAAA,GAUf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"collapse.d.mts","names":[],"sources":["../../../src/components/molecules/collapse.tsx"],"mappings":";;UAUU;EACR,KAAK,MAAM;EACX,OAAO,MAAM;EACb;EACA,UAAU,MAAM;;UAGD,cAAc,KAC7B,MAAM;EAGN,QAAQ;EACR;EACA,aAAa,MAAM;EACnB;IACE;IACA;IACA;;EAEF;EACA;EACA,YAAY;;cAGR,aAAY,YAAA,WAAA,OAAA,WAAA,YAAA,kBAAA,WAAA,YAAA,UAAA,cAAA,SAUf,UAAK,MAAA,IAAA"}
@@ -1,10 +1,8 @@
1
- 'use client';
2
-
1
+ "use client";
3
2
  import { cn } from "../../utils.mjs";
4
3
  import { accordion_exports } from "../../core/accordion.mjs";
5
- import React from "react";
4
+ import "react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
-
8
6
  //#region src/components/molecules/collapse.tsx
9
7
  const { Accordion, AccordionItem, AccordionTrigger, AccordionContent } = accordion_exports;
10
8
  const Collapse = ({ expandIcon, accordion = false, items = [], className, classNames, defaultActiveKey, activeKey: _activeKey, onChange: _onChange, ...props }) => {
@@ -27,7 +25,7 @@ const Collapse = ({ expandIcon, accordion = false, items = [], className, classN
27
25
  className,
28
26
  ...accordionProps,
29
27
  children: items.map(({ key, label, children, disabled }) => /* @__PURE__ */ jsxs(AccordionItem, {
30
- value: `${key}`,
28
+ value: String(key),
31
29
  className: cn("border-none", classNames?.item),
32
30
  disabled,
33
31
  children: [/* @__PURE__ */ jsx(AccordionTrigger, {
@@ -42,7 +40,7 @@ const Collapse = ({ expandIcon, accordion = false, items = [], className, classN
42
40
  }, key))
43
41
  });
44
42
  };
45
-
46
43
  //#endregion
47
44
  export { Collapse as default };
45
+
48
46
  //# sourceMappingURL=collapse.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.mjs","names":["accordion"],"sources":["../../../src/components/molecules/collapse.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { accordion } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { Accordion, AccordionItem, AccordionTrigger, AccordionContent } =\n accordion;\n\ninterface Item {\n key: React.Key;\n label: React.ReactNode;\n disabled?: boolean;\n children: React.ReactNode;\n}\n\nexport interface Props extends Omit<\n React.ComponentPropsWithoutRef<'div'>,\n 'onChange' | 'defaultValue' | 'value' | 'dir'\n> {\n items?: Item[];\n accordion?: boolean;\n expandIcon?: React.ReactNode;\n classNames?: {\n item?: string;\n header?: string;\n body?: string;\n };\n defaultActiveKey?: string[] | number[];\n activeKey?: string[] | number[];\n onChange?: (keys: string[]) => void;\n}\n\nconst Collapse = ({\n expandIcon,\n accordion = false,\n items = [],\n className,\n classNames,\n defaultActiveKey,\n activeKey: _activeKey,\n onChange: _onChange,\n ...props\n}: Props) => {\n const controlled = _activeKey !== undefined;\n\n const accordionProps = accordion\n ? {\n type: 'single' as const,\n onValueChange: (value: string) => {\n _onChange?.(value ? [value] : []);\n },\n ...(controlled\n ? { value: `${_activeKey?.[0] ?? ''}` }\n : { defaultValue: `${defaultActiveKey?.[0] ?? ''}` }),\n }\n : {\n type: 'multiple' as const,\n onValueChange: (values: string[]) => {\n _onChange?.(values);\n },\n ...(controlled\n ? { value: _activeKey?.map(key => `${key}`) }\n : { defaultValue: defaultActiveKey?.map(key => `${key}`) }),\n };\n\n return (\n <Accordion {...props} className={className} {...accordionProps}>\n {items.map(({ key, label, children, disabled }) => (\n <AccordionItem\n key={key}\n value={`${key}`}\n className={cn(\n 'border-none',\n classNames?.item,\n //\n )}\n disabled={disabled}\n >\n <AccordionTrigger\n className={cn(\n 'hover:no-underline',\n classNames?.header,\n disabled && 'cursor-no-drop opacity-50',\n //\n )}\n expandIcon={expandIcon}\n disabled={disabled}\n >\n {label}\n </AccordionTrigger>\n <AccordionContent\n className={cn(\n classNames?.body,\n //\n )}\n >\n {children}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n );\n};\n\nexport default Collapse;\n"],"mappings":";;;;;;;;AAOA,MAAM,EAAE,WAAW,eAAe,kBAAkB,qBAClDA;AA0BF,MAAM,YAAY,EAChB,YACA,YAAY,OACZ,QAAQ,EAAE,EACV,WACA,YACA,kBACA,WAAW,YACX,UAAU,WACV,GAAG,YACQ;CACX,MAAM,aAAa,eAAe;CAElC,MAAM,iBAAiB,YACnB;EACE,MAAM;EACN,gBAAgB,UAAkB;AAChC,eAAY,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC;;EAEnC,GAAI,aACA,EAAE,OAAO,GAAG,aAAa,MAAM,MAAM,GACrC,EAAE,cAAc,GAAG,mBAAmB,MAAM,MAAM;EACvD,GACD;EACE,MAAM;EACN,gBAAgB,WAAqB;AACnC,eAAY,OAAO;;EAErB,GAAI,aACA,EAAE,OAAO,YAAY,KAAI,QAAO,GAAG,MAAM,EAAE,GAC3C,EAAE,cAAc,kBAAkB,KAAI,QAAO,GAAG,MAAM,EAAE;EAC7D;AAEL,QACE,oBAAC;EAAU,GAAI;EAAkB;EAAW,GAAI;YAC7C,MAAM,KAAK,EAAE,KAAK,OAAO,UAAU,eAClC,qBAAC;GAEC,OAAO,GAAG;GACV,WAAW,GACT,eACA,YAAY,KAEb;GACS;cAEV,oBAAC;IACC,WAAW,GACT,sBACA,YAAY,QACZ,YAAY,4BAEb;IACW;IACF;cAET;KACgB,EACnB,oBAAC;IACC,WAAW,GACT,YAAY,KAEb;IAEA;KACgB;KA5Bd,IA6BS,CAChB;GACQ"}
1
+ {"version":3,"file":"collapse.mjs","names":["accordion"],"sources":["../../../src/components/molecules/collapse.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { accordion } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { Accordion, AccordionItem, AccordionTrigger, AccordionContent } =\n accordion;\n\ninterface Item {\n key: React.Key;\n label: React.ReactNode;\n disabled?: boolean;\n children: React.ReactNode;\n}\n\nexport interface Props extends Omit<\n React.ComponentPropsWithoutRef<'div'>,\n 'onChange' | 'defaultValue' | 'value' | 'dir'\n> {\n items?: Item[];\n accordion?: boolean;\n expandIcon?: React.ReactNode;\n classNames?: {\n item?: string;\n header?: string;\n body?: string;\n };\n defaultActiveKey?: string[] | number[];\n activeKey?: string[] | number[];\n onChange?: (keys: string[]) => void;\n}\n\nconst Collapse = ({\n expandIcon,\n accordion = false,\n items = [],\n className,\n classNames,\n defaultActiveKey,\n activeKey: _activeKey,\n onChange: _onChange,\n ...props\n}: Props) => {\n const controlled = _activeKey !== undefined;\n\n const accordionProps = accordion\n ? {\n type: 'single' as const,\n onValueChange: (value: string) => {\n _onChange?.(value ? [value] : []);\n },\n ...(controlled\n ? { value: `${_activeKey?.[0] ?? ''}` }\n : { defaultValue: `${defaultActiveKey?.[0] ?? ''}` }),\n }\n : {\n type: 'multiple' as const,\n onValueChange: (values: string[]) => {\n _onChange?.(values);\n },\n ...(controlled\n ? { value: _activeKey?.map(key => `${key}`) }\n : { defaultValue: defaultActiveKey?.map(key => `${key}`) }),\n };\n\n return (\n <Accordion {...props} className={className} {...accordionProps}>\n {items.map(({ key, label, children, disabled }) => (\n <AccordionItem\n key={key}\n value={String(key)}\n className={cn(\n 'border-none',\n classNames?.item,\n //\n )}\n disabled={disabled}\n >\n <AccordionTrigger\n className={cn(\n 'hover:no-underline',\n classNames?.header,\n disabled && 'cursor-no-drop opacity-50',\n //\n )}\n expandIcon={expandIcon}\n disabled={disabled}\n >\n {label}\n </AccordionTrigger>\n <AccordionContent\n className={cn(\n classNames?.body,\n //\n )}\n >\n {children}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n );\n};\n\nexport default Collapse;\n"],"mappings":";;;;;;AAOA,MAAM,EAAE,WAAW,eAAe,kBAAkB,qBAClDA;AA0BF,MAAM,YAAY,EAChB,YACA,YAAY,OACZ,QAAQ,CAAC,GACT,WACA,YACA,kBACA,WAAW,YACX,UAAU,WACV,GAAG,YACQ;CACX,MAAM,aAAa,eAAe,KAAA;CAElC,MAAM,iBAAiB,YACnB;EACE,MAAM;EACN,gBAAgB,UAAkB;GAChC,YAAY,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;EAClC;EACA,GAAI,aACA,EAAE,OAAO,GAAG,aAAa,MAAM,KAAK,IACpC,EAAE,cAAc,GAAG,mBAAmB,MAAM,KAAK;CACvD,IACA;EACE,MAAM;EACN,gBAAgB,WAAqB;GACnC,YAAY,MAAM;EACpB;EACA,GAAI,aACA,EAAE,OAAO,YAAY,KAAI,QAAO,GAAG,KAAK,EAAE,IAC1C,EAAE,cAAc,kBAAkB,KAAI,QAAO,GAAG,KAAK,EAAE;CAC7D;CAEJ,OACE,oBAAC,WAAD;EAAW,GAAI;EAAkB;EAAW,GAAI;EAC7C,UAAA,MAAM,KAAK,EAAE,KAAK,OAAO,UAAU,eAClC,qBAAC,eAAD;GAEE,OAAO,OAAO,GAAG;GACjB,WAAW,GACT,eACA,YAAY,IAEd;GACU;GARZ,UAAA,CAUE,oBAAC,kBAAD;IACE,WAAW,GACT,sBACA,YAAY,QACZ,YAAY,2BAEd;IACY;IACF;IAET,UAAA;GACe,CAAA,GAClB,oBAAC,kBAAD;IACE,WAAW,GACT,YAAY,IAEd;IAEC;GACe,CAAA,CACL;EA7BR,GAAA,GA6BQ,CAChB;CACQ,CAAA;AAEf"}
@@ -1,7 +1,4 @@
1
1
  import { MenuProps } from "./menu/menu.mjs";
2
- import "../../Menu.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
-
5
2
  //#region src/components/molecules/dropdown.d.ts
6
3
  type ChangeEventHandler = (open: boolean) => void;
7
4
  interface Props extends React.ComponentPropsWithoutRef<'div'> {
@@ -10,17 +7,7 @@ interface Props extends React.ComponentPropsWithoutRef<'div'> {
10
7
  menu?: MenuProps;
11
8
  onOpenChange?: ChangeEventHandler;
12
9
  }
13
- declare const Dropdown: ({
14
- children,
15
- menu,
16
- trigger,
17
- open: _open,
18
- onOpenChange: _onOpenChange,
19
- className,
20
- onMouseEnter,
21
- onMouseLeave,
22
- ...props
23
- }: Props) => react_jsx_runtime0.JSX.Element;
10
+ declare const Dropdown: ({ children, menu, trigger, open: _open, onOpenChange: _onOpenChange, className, onMouseEnter, onMouseLeave, ...props }: Props) => import("react").JSX.Element;
24
11
  //#endregion
25
- export { Dropdown, Props };
12
+ export { Props, Dropdown as default };
26
13
  //# sourceMappingURL=dropdown.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.mts","names":[],"sources":["../../../src/components/molecules/dropdown.tsx"],"mappings":";;;;;KAWK,kBAAA,IAAsB,IAAA;AAAA,UAEV,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,IAAA;EACA,OAAA;EACA,IAAA,GAAO,SAAA;EACP,YAAA,GAAe,kBAAA;AAAA;AAAA,cAGX,QAAA;EAAY,QAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA,EAAA,KAAA;EAAA,YAAA,EAAA,aAAA;EAAA,SAAA;EAAA,YAAA;EAAA,YAAA;EAAA,GAAA;AAAA,GAUf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"dropdown.d.mts","names":[],"sources":["../../../src/components/molecules/dropdown.tsx"],"mappings":";;KAWK,sBAAsB;UAEV,cAAc,MAAM;EACnC;EACA;EACA,OAAO;EACP,eAAe;;cAGX,aAAY,UAAA,MAAA,SAAA,MAAA,OAAA,cAAA,eAAA,WAAA,cAAA,iBAAA,SAUf,0BAAK,IAAA"}
@@ -1,12 +1,10 @@
1
- 'use client';
2
-
1
+ "use client";
3
2
  import { cn } from "../../utils.mjs";
4
3
  import Menu from "./menu/menu.mjs";
5
4
  import { useId, useRef } from "react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { useControllableState, useKeyPress } from "@jbpark/use-hooks";
8
7
  import { AnimatePresence, motion } from "motion/react";
9
-
10
8
  //#region src/components/molecules/dropdown.tsx
11
9
  const Dropdown = ({ children, menu, trigger = "hover", open: _open, onOpenChange: _onOpenChange = () => {}, className, onMouseEnter, onMouseLeave, ...props }) => {
12
10
  const [open, onOpenChange] = useControllableState({
@@ -86,7 +84,7 @@ const Dropdown = ({ children, menu, trigger = "hover", open: _open, onOpenChange
86
84
  }) })]
87
85
  });
88
86
  };
89
-
90
87
  //#endregion
91
88
  export { Dropdown as default };
89
+
92
90
  //# sourceMappingURL=dropdown.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../src/components/molecules/dropdown.tsx"],"sourcesContent":["'use client';\n\nimport { useId, useRef } from 'react';\n\nimport { useControllableState, useKeyPress } from '@jbpark/use-hooks';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Menu, { MenuProps } from './menu';\n\ntype ChangeEventHandler = (open: boolean) => void;\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n open?: boolean;\n trigger?: 'hover' | 'click';\n menu?: MenuProps;\n onOpenChange?: ChangeEventHandler;\n}\n\nconst Dropdown = ({\n children,\n menu,\n trigger = 'hover',\n open: _open,\n onOpenChange: _onOpenChange = () => {},\n className,\n onMouseEnter,\n onMouseLeave,\n ...props\n}: Props) => {\n const [open, onOpenChange] = useControllableState<boolean>({\n value: _open,\n defaultValue: false,\n onChange: _onOpenChange,\n });\n\n const isClickTrigger = trigger === 'click';\n const menuId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n useKeyPress(\n 'esc',\n () => {\n onOpenChange(false);\n },\n { target: triggerRef },\n );\n\n useKeyPress(\n ['Enter', 'space'],\n event => {\n event.preventDefault();\n onOpenChange(!open);\n },\n { target: triggerRef, enabled: isClickTrigger },\n );\n\n return (\n <div\n {...props}\n ref={containerRef}\n className={cn(\n 'relative',\n 'inline-block cursor-pointer',\n className,\n //\n )}\n onMouseEnter={event => {\n onMouseEnter?.(event);\n if (isClickTrigger) {\n return;\n }\n onOpenChange(true);\n }}\n onMouseLeave={event => {\n onMouseLeave?.(event);\n if (isClickTrigger) {\n return;\n }\n onOpenChange(false);\n }}\n >\n <div\n ref={triggerRef}\n role={isClickTrigger ? 'button' : undefined}\n tabIndex={isClickTrigger ? 0 : undefined}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuId : undefined}\n onClick={() => {\n if (!isClickTrigger) {\n return;\n }\n onOpenChange(!open);\n }}\n onFocus={() => {\n if (isClickTrigger) {\n return;\n }\n onOpenChange(true);\n }}\n onBlur={e => {\n // Without this check, moving focus from the trigger into the\n // menu itself (e.g. via Tab) closed the dropdown before the\n // user could ever reach it — the mouse path avoided the same\n // bug only by way of onMouseDown's preventDefault below, which\n // does nothing for keyboard focus. Mirrors the containment\n // check menu/item/item.tsx already uses for the same reason.\n if (!containerRef.current?.contains(e.relatedTarget as Node)) {\n onOpenChange(false);\n }\n }}\n >\n {children}\n </div>\n <AnimatePresence>\n {open && (\n <motion.div\n className={cn(\n 'absolute top-full z-50 pt-2',\n //\n )}\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.1 }}\n >\n <Menu\n {...menu}\n id={menuId}\n onMouseDown={e => {\n e.preventDefault();\n }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default Dropdown;\n"],"mappings":";;;;;;;;;;AAoBA,MAAM,YAAY,EAChB,UACA,MACA,UAAU,SACV,MAAM,OACN,cAAc,sBAAsB,IACpC,WACA,cACA,cACA,GAAG,YACQ;CACX,MAAM,CAAC,MAAM,gBAAgB,qBAA8B;EACzD,OAAO;EACP,cAAc;EACd,UAAU;EACX,CAAC;CAEF,MAAM,iBAAiB,YAAY;CACnC,MAAM,SAAS,OAAO;CACtB,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,aAAa,OAAuB,KAAK;AAE/C,aACE,aACM;AACJ,eAAa,MAAM;IAErB,EAAE,QAAQ,YAAY,CACvB;AAED,aACE,CAAC,SAAS,QAAQ,GAClB,UAAS;AACP,QAAM,gBAAgB;AACtB,eAAa,CAAC,KAAK;IAErB;EAAE,QAAQ;EAAY,SAAS;EAAgB,CAChD;AAED,QACE,qBAAC;EACC,GAAI;EACJ,KAAK;EACL,WAAW,GACT,YACA,+BACA,UAED;EACD,eAAc,UAAS;AACrB,kBAAe,MAAM;AACrB,OAAI,eACF;AAEF,gBAAa,KAAK;;EAEpB,eAAc,UAAS;AACrB,kBAAe,MAAM;AACrB,OAAI,eACF;AAEF,gBAAa,MAAM;;aAGrB,oBAAC;GACC,KAAK;GACL,MAAM,iBAAiB,WAAW;GAClC,UAAU,iBAAiB,IAAI;GAC/B,iBAAc;GACd,iBAAe;GACf,iBAAe,OAAO,SAAS;GAC/B,eAAe;AACb,QAAI,CAAC,eACH;AAEF,iBAAa,CAAC,KAAK;;GAErB,eAAe;AACb,QAAI,eACF;AAEF,iBAAa,KAAK;;GAEpB,SAAQ,MAAK;AAOX,QAAI,CAAC,aAAa,SAAS,SAAS,EAAE,cAAsB,CAC1D,cAAa,MAAM;;GAItB;IACG,EACN,oBAAC,6BACE,QACC,oBAAC,OAAO;GACN,WAAW,GACT,8BAED;GACD,SAAS;IAAE,SAAS;IAAG,GAAG;IAAK;GAC/B,SAAS;IAAE,SAAS;IAAG,GAAG;IAAG;GAC7B,MAAM;IAAE,SAAS;IAAG,GAAG;IAAK;GAC5B,YAAY,EAAE,UAAU,IAAK;aAE7B,oBAAC;IACC,GAAI;IACJ,IAAI;IACJ,cAAa,MAAK;AAChB,OAAE,gBAAgB;;KAEpB;IACS,GAEC;GACd"}
1
+ {"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../src/components/molecules/dropdown.tsx"],"sourcesContent":["'use client';\n\nimport { useId, useRef } from 'react';\n\nimport { useControllableState, useKeyPress } from '@jbpark/use-hooks';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Menu, { MenuProps } from './menu';\n\ntype ChangeEventHandler = (open: boolean) => void;\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n open?: boolean;\n trigger?: 'hover' | 'click';\n menu?: MenuProps;\n onOpenChange?: ChangeEventHandler;\n}\n\nconst Dropdown = ({\n children,\n menu,\n trigger = 'hover',\n open: _open,\n onOpenChange: _onOpenChange = () => {},\n className,\n onMouseEnter,\n onMouseLeave,\n ...props\n}: Props) => {\n const [open, onOpenChange] = useControllableState<boolean>({\n value: _open,\n defaultValue: false,\n onChange: _onOpenChange,\n });\n\n const isClickTrigger = trigger === 'click';\n const menuId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n useKeyPress(\n 'esc',\n () => {\n onOpenChange(false);\n },\n { target: triggerRef },\n );\n\n useKeyPress(\n ['Enter', 'space'],\n event => {\n event.preventDefault();\n onOpenChange(!open);\n },\n { target: triggerRef, enabled: isClickTrigger },\n );\n\n return (\n <div\n {...props}\n ref={containerRef}\n className={cn(\n 'relative',\n 'inline-block cursor-pointer',\n className,\n //\n )}\n onMouseEnter={event => {\n onMouseEnter?.(event);\n if (isClickTrigger) {\n return;\n }\n onOpenChange(true);\n }}\n onMouseLeave={event => {\n onMouseLeave?.(event);\n if (isClickTrigger) {\n return;\n }\n onOpenChange(false);\n }}\n >\n <div\n ref={triggerRef}\n role={isClickTrigger ? 'button' : undefined}\n tabIndex={isClickTrigger ? 0 : undefined}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuId : undefined}\n onClick={() => {\n if (!isClickTrigger) {\n return;\n }\n onOpenChange(!open);\n }}\n onFocus={() => {\n if (isClickTrigger) {\n return;\n }\n onOpenChange(true);\n }}\n onBlur={e => {\n // Without this check, moving focus from the trigger into the\n // menu itself (e.g. via Tab) closed the dropdown before the\n // user could ever reach it — the mouse path avoided the same\n // bug only by way of onMouseDown's preventDefault below, which\n // does nothing for keyboard focus. Mirrors the containment\n // check menu/item/item.tsx already uses for the same reason.\n if (!containerRef.current?.contains(e.relatedTarget as Node)) {\n onOpenChange(false);\n }\n }}\n >\n {children}\n </div>\n <AnimatePresence>\n {open && (\n <motion.div\n className={cn(\n 'absolute top-full z-50 pt-2',\n //\n )}\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.1 }}\n >\n <Menu\n {...menu}\n id={menuId}\n onMouseDown={e => {\n e.preventDefault();\n }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default Dropdown;\n"],"mappings":";;;;;;;;AAoBA,MAAM,YAAY,EAChB,UACA,MACA,UAAU,SACV,MAAM,OACN,cAAc,sBAAsB,CAAC,GACrC,WACA,cACA,cACA,GAAG,YACQ;CACX,MAAM,CAAC,MAAM,gBAAgB,qBAA8B;EACzD,OAAO;EACP,cAAc;EACd,UAAU;CACZ,CAAC;CAED,MAAM,iBAAiB,YAAY;CACnC,MAAM,SAAS,MAAM;CACrB,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,aAAa,OAAuB,IAAI;CAE9C,YACE,aACM;EACJ,aAAa,KAAK;CACpB,GACA,EAAE,QAAQ,WAAW,CACvB;CAEA,YACE,CAAC,SAAS,OAAO,IACjB,UAAS;EACP,MAAM,eAAe;EACrB,aAAa,CAAC,IAAI;CACpB,GACA;EAAE,QAAQ;EAAY,SAAS;CAAe,CAChD;CAEA,OACE,qBAAC,OAAD;EACE,GAAI;EACJ,KAAK;EACL,WAAW,GACT,YACA,+BACA,SAEF;EACA,eAAc,UAAS;GACrB,eAAe,KAAK;GACpB,IAAI,gBACF;GAEF,aAAa,IAAI;EACnB;EACA,eAAc,UAAS;GACrB,eAAe,KAAK;GACpB,IAAI,gBACF;GAEF,aAAa,KAAK;EACpB;EAtBF,UAAA,CAwBE,oBAAC,OAAD;GACE,KAAK;GACL,MAAM,iBAAiB,WAAW,KAAA;GAClC,UAAU,iBAAiB,IAAI,KAAA;GAC/B,iBAAc;GACd,iBAAe;GACf,iBAAe,OAAO,SAAS,KAAA;GAC/B,eAAe;IACb,IAAI,CAAC,gBACH;IAEF,aAAa,CAAC,IAAI;GACpB;GACA,eAAe;IACb,IAAI,gBACF;IAEF,aAAa,IAAI;GACnB;GACA,SAAQ,MAAK;IAOX,IAAI,CAAC,aAAa,SAAS,SAAS,EAAE,aAAqB,GACzD,aAAa,KAAK;GAEtB;GAEC;EACE,CAAA,GACL,oBAAC,iBAAD,EAAA,UACG,QACC,oBAAC,OAAO,KAAR;GACE,WAAW,GACT,6BAEF;GACA,SAAS;IAAE,SAAS;IAAG,GAAG;GAAI;GAC9B,SAAS;IAAE,SAAS;IAAG,GAAG;GAAE;GAC5B,MAAM;IAAE,SAAS;IAAG,GAAG;GAAI;GAC3B,YAAY,EAAE,UAAU,GAAI;GAE5B,UAAA,oBAAC,MAAD;IACE,GAAI;IACJ,IAAI;IACJ,cAAa,MAAK;KAChB,EAAE,eAAe;IACnB;GACD,CAAA;EACS,CAAA,EAEC,CAAA,CACd;;AAET"}
@@ -1,13 +1,13 @@
1
1
  import Card, { Props } from "../../Card.mjs";
2
- import { Menu, Props as Props$1 } from "./menu/menu.mjs";
3
- import "../../Menu.mjs";
2
+ import Menu, { Props as Props$1 } from "./menu/menu.mjs";
4
3
  import { Props as Props$2 } from "./reveals/reveals.mjs";
5
4
  import Reveals from "../../Reveals.mjs";
6
5
  import Space, { Props as Props$3 } from "../../Space.mjs";
7
- import { Collapse, Props as Props$4 } from "./collapse.mjs";
8
- import { Dropdown, Props as Props$5 } from "./dropdown.mjs";
6
+ import Collapse, { Props as Props$4 } from "./collapse.mjs";
7
+ import Dropdown, { Props as Props$5 } from "./dropdown.mjs";
9
8
  import { Props as Props$6 } from "./marquees/marquees.mjs";
10
- import { Marquees } from "./marquees/index.mjs";
9
+ import Marquees from "./marquees/index.mjs";
11
10
  import { Props as Props$7 } from "./splitter/splitter.mjs";
12
- import { Splitter } from "./splitter/index.mjs";
13
- import { Props as Props$8, Upload, UploadFile } from "./upload.mjs";
11
+ import Splitter from "./splitter/index.mjs";
12
+ import Upload, { Props as Props$8, UploadFile } from "./upload.mjs";
13
+ export { Card, type Props as CardProps, Collapse, type Props$4 as CollapseProps, Dropdown, type Props$5 as DropdownProps, Marquees, type Props$6 as MarqueesProps, Menu, type Props$1 as MenuProps, Reveals, type Props$2 as RevealsProps, Space, type Props$3 as SpaceProps, Splitter, type Props$7 as SplitterProps, Upload, type UploadFile, type Props$8 as UploadProps };
@@ -1,11 +1,10 @@
1
- import { Item, ItemProps } from "./item.mjs";
2
- import { Marquees as Marquees$1, Props } from "./marquees.mjs";
3
-
1
+ import Item, { ItemProps } from "./item.mjs";
2
+ import Marquees$1, { Props } from "./marquees.mjs";
4
3
  //#region src/components/molecules/marquees/index.d.ts
5
4
  type MarqueesComponent = typeof Marquees$1 & {
6
5
  Item: typeof Item;
7
6
  };
8
7
  declare const Marquees: MarqueesComponent;
9
8
  //#endregion
10
- export { Marquees };
9
+ export { Item, type Props as MarqueesProps, type Props, Marquees as default };
11
10
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/index.ts"],"mappings":";;;;KAGK,iBAAA,UAA2B,UAAA;EAAiB,IAAA,SAAa,IAAA;AAAA;AAAA,cAExD,QAAA,EAA2B,iBAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/index.ts"],"mappings":";;;KAGK,2BAA2B;EAAiB,aAAa;;cAExD,UAA2B"}
@@ -1,10 +1,9 @@
1
1
  import Item from "./item.mjs";
2
2
  import Marquees$1 from "./marquees.mjs";
3
-
4
3
  //#region src/components/molecules/marquees/index.ts
5
4
  const Marquees = Marquees$1;
6
5
  Marquees.Item = Item;
7
-
8
6
  //#endregion
9
- export { Marquees as default };
7
+ export { Item, Marquees as default };
8
+
10
9
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["MarqueesImpl"],"sources":["../../../../src/components/molecules/marquees/index.ts"],"sourcesContent":["import Item from './item';\nimport MarqueesImpl, { type Props } from './marquees';\n\ntype MarqueesComponent = typeof MarqueesImpl & { Item: typeof Item };\n\nconst Marquees = MarqueesImpl as MarqueesComponent;\n\nMarquees.Item = Item;\n\nexport default Marquees;\nexport { Item };\nexport type { ItemProps } from './item';\nexport type { Props, Props as MarqueesProps };\n"],"mappings":";;;;AAKA,MAAM,WAAWA;AAEjB,SAAS,OAAO"}
1
+ {"version":3,"file":"index.mjs","names":["MarqueesImpl"],"sources":["../../../../src/components/molecules/marquees/index.ts"],"sourcesContent":["import Item from './item';\nimport MarqueesImpl, { type Props } from './marquees';\n\ntype MarqueesComponent = typeof MarqueesImpl & { Item: typeof Item };\n\nconst Marquees = MarqueesImpl as MarqueesComponent;\n\nMarquees.Item = Item;\n\nexport default Marquees;\nexport { Item };\nexport type { ItemProps } from './item';\nexport type { Props, Props as MarqueesProps };\n"],"mappings":";;;AAKA,MAAM,WAAWA;AAEjB,SAAS,OAAO"}
@@ -1,5 +1,3 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
-
3
1
  //#region src/components/molecules/marquees/item.d.ts
4
2
  interface ItemProps {
5
3
  key?: React.Key;
@@ -12,14 +10,7 @@ interface ItemProps {
12
10
  interface Props extends Omit<React.ComponentPropsWithoutRef<'div'>, 'key'>, ItemProps {
13
11
  width: string | number;
14
12
  }
15
- declare const Item: ({
16
- width: _width,
17
- speed,
18
- autoFill,
19
- pause: _pause,
20
- pauseOnHover,
21
- children
22
- }: Props) => react_jsx_runtime0.JSX.Element;
13
+ declare const Item: ({ width: _width, speed, autoFill, pause: _pause, pauseOnHover, children }: Props) => import("react").JSX.Element;
23
14
  //#endregion
24
- export { Item, ItemProps };
15
+ export { ItemProps, Props, Item as default };
25
16
  //# sourceMappingURL=item.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/item.tsx"],"mappings":";;;UAOiB,SAAA;EACf,GAAA,GAAM,KAAA,CAAM,GAAA;EACZ,KAAA;EACA,QAAA;EACA,KAAA;EACA,YAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA;AAAA,UAGF,KAAA,SACP,IAAA,CAAK,KAAA,CAAM,wBAAA,iBAAyC,SAAA;EAC5D,KAAA;AAAA;AAAA,cAYI,IAAA;EAAQ,KAAA,EAAA,MAAA;EAAA,KAAA;EAAA,QAAA;EAAA,KAAA,EAAA,MAAA;EAAA,YAAA;EAAA;AAAA,GAOX,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"item.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/item.tsx"],"mappings":";UAOiB;EACf,MAAM,MAAM;EACZ;EACA;EACA;EACA;EACA,WAAW,MAAM;;UAGF,cACP,KAAK,MAAM,yCAAyC;EAC5D;;cAYI,SAAQ,OAAA,QAAA,OAAA,UAAA,OAAA,QAAA,cAAA,YAOX,0BAAK,IAAA"}
@@ -1,10 +1,8 @@
1
- 'use client';
2
-
1
+ "use client";
3
2
  import { useEffect, useRef, useState } from "react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
  import { useGSAP } from "@gsap/react";
6
5
  import { gsap } from "gsap";
7
-
8
6
  //#region src/components/molecules/marquees/item.tsx
9
7
  const INITIAL_AUTO_FILL_GUESS = 10;
10
8
  const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = false, pauseOnHover = false, children }) => {
@@ -14,6 +12,16 @@ const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = fa
14
12
  const [width, setWidth] = useState(_width);
15
13
  const [pause, setPause] = useState(false);
16
14
  const [repeatCount, setRepeatCount] = useState(autoFill ? typeof autoFill === "boolean" ? INITIAL_AUTO_FILL_GUESS : autoFill : 0);
15
+ const [prevWidthProp, setPrevWidthProp] = useState(_width);
16
+ const [prevAutoFill, setPrevAutoFill] = useState(autoFill);
17
+ if (_width !== prevWidthProp) {
18
+ setPrevWidthProp(_width);
19
+ setWidth(_width);
20
+ }
21
+ if (autoFill !== prevAutoFill) {
22
+ setPrevAutoFill(autoFill);
23
+ setRepeatCount(autoFill ? typeof autoFill === "boolean" ? INITIAL_AUTO_FILL_GUESS : autoFill : 0);
24
+ }
17
25
  const isPaused = _pause || pause;
18
26
  const hoverEvents = pauseOnHover ? {
19
27
  onMouseEnter: () => {
@@ -44,9 +52,6 @@ const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = fa
44
52
  width,
45
53
  children
46
54
  ]);
47
- useEffect(() => {
48
- setWidth(_width);
49
- }, [_width]);
50
55
  useGSAP(() => {
51
56
  if (!containerRef.current || typeof width === "string") return;
52
57
  if (tweenRef.current) tweenRef.current.kill();
@@ -68,9 +73,6 @@ const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = fa
68
73
  if (isPaused) tweenRef.current.pause();
69
74
  else tweenRef.current.play();
70
75
  }, [isPaused]);
71
- useEffect(() => {
72
- setRepeatCount(autoFill ? typeof autoFill === "boolean" ? INITIAL_AUTO_FILL_GUESS : autoFill : 0);
73
- }, [autoFill]);
74
76
  return /* @__PURE__ */ jsx("div", {
75
77
  className: "flex overflow-hidden",
76
78
  ...hoverEvents,
@@ -90,7 +92,7 @@ const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = fa
90
92
  })
91
93
  });
92
94
  };
93
-
94
95
  //#endregion
95
96
  export { Item as default };
97
+
96
98
  //# sourceMappingURL=item.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/item.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useGSAP } from '@gsap/react';\nimport { gsap } from 'gsap';\n\nexport interface ItemProps {\n key?: React.Key;\n speed?: number;\n autoFill?: boolean | number;\n pause?: boolean;\n pauseOnHover?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface Props\n extends Omit<React.ComponentPropsWithoutRef<'div'>, 'key'>, ItemProps {\n width: string | number;\n}\n\n// `autoFill={true}` (the default on `Marquees`) needs *some* repeat count\n// before the item can be measured and the real count computed — this is\n// only ever visible for that one render, but rendering 100 copies (200\n// with the 2x loop duplication) up front was needlessly heavy for the\n// common case. A modest guess still avoids visible gaps for typical\n// item/container width ratios while cutting the worst-case default\n// render by ~90%.\nconst INITIAL_AUTO_FILL_GUESS = 10;\n\nconst Item = ({\n width: _width,\n speed = 100,\n autoFill = false,\n pause: _pause = false,\n pauseOnHover = false,\n children,\n}: Props) => {\n const itemRefs = useRef<HTMLDivElement[]>([]);\n const containerRef = useRef<HTMLDivElement>(null);\n const tweenRef = useRef<gsap.core.Tween | null>(null);\n\n const [width, setWidth] = useState<string | number>(_width);\n const [pause, setPause] = useState(false);\n const [repeatCount, setRepeatCount] = useState(\n autoFill\n ? typeof autoFill === 'boolean'\n ? INITIAL_AUTO_FILL_GUESS\n : autoFill\n : 0,\n );\n\n const isPaused = _pause || pause;\n\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (\n !autoFill ||\n !children ||\n !itemRefs.current[0] ||\n typeof width === 'string'\n ) {\n return;\n }\n\n const itemWidth = itemRefs.current[0].offsetWidth;\n\n if (itemWidth >= width) {\n setWidth(itemWidth);\n setRepeatCount(0);\n return;\n }\n\n let totalWidth = 0;\n let repeatCount = 0;\n\n while (totalWidth < width) {\n totalWidth += itemWidth;\n repeatCount += 1;\n }\n\n setWidth(totalWidth);\n setRepeatCount(repeatCount - 1);\n }, [autoFill, width, children]);\n\n useEffect(() => {\n setWidth(_width);\n }, [_width]);\n\n useGSAP(\n () => {\n if (!containerRef.current || typeof width === 'string') {\n return;\n }\n\n if (tweenRef.current) {\n tweenRef.current.kill();\n }\n\n tweenRef.current = gsap.fromTo(\n containerRef.current,\n { x: 0 },\n {\n x: -width,\n duration: width / speed,\n repeat: -1,\n ease: 'linear',\n },\n );\n\n return () => {\n tweenRef.current?.kill();\n };\n },\n {\n scope: containerRef,\n dependencies: [width, speed],\n },\n );\n\n useEffect(() => {\n if (!tweenRef.current) {\n return;\n }\n\n if (isPaused) {\n tweenRef.current.pause();\n } else {\n tweenRef.current.play();\n }\n }, [isPaused]);\n\n useEffect(() => {\n setRepeatCount(\n autoFill\n ? typeof autoFill === 'boolean'\n ? INITIAL_AUTO_FILL_GUESS\n : autoFill\n : 0,\n );\n }, [autoFill]);\n\n return (\n <div\n className=\"flex overflow-hidden\"\n {...hoverEvents}\n //\n >\n <div ref={containerRef} className=\"flex flex-nowrap\">\n {[...Array(2)].map((_, index) => (\n <div\n key={index}\n style={{ minWidth: width }}\n className=\"flex flex-nowrap\"\n >\n <div\n ref={el => {\n if (el) {\n itemRefs.current[index] = el;\n }\n }}\n >\n {children}\n </div>\n {[\n ...Array(typeof autoFill === 'number' ? autoFill : repeatCount),\n ].map((_, i) => (\n <div key={i}>{children}</div>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;;AA4BA,MAAM,0BAA0B;AAEhC,MAAM,QAAQ,EACZ,OAAO,QACP,QAAQ,KACR,WAAW,OACX,OAAO,SAAS,OAChB,eAAe,OACf,eACW;CACX,MAAM,WAAW,OAAyB,EAAE,CAAC;CAC7C,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,WAAW,OAA+B,KAAK;CAErD,MAAM,CAAC,OAAO,YAAY,SAA0B,OAAO;CAC3D,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CACzC,MAAM,CAAC,aAAa,kBAAkB,SACpC,WACI,OAAO,aAAa,YAClB,0BACA,W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AAK,GAAG,UACrB,qBAAC;IAEC,OAAO,EAAE,UAAU,OAAO;IAC1B,WAAU;eAEV,oBAAC;KACC,MAAK,OAAM;AACT,UAAI,GACF,UAAS,QAAQ,SAAS;;KAI7B;MACG,EACL,CACC,GAAG,MAAM,OAAO,aAAa,WAAW,WAAW,YAAY,CAChE,CAAC,KAAK,GAAG,MACR,oBAAC,SAAa,YAAJ,EAAmB,CAC7B;MAjBG,MAkBD,CACN;IACE;GACF"}
1
+ {"version":3,"file":"item.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/item.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useGSAP } from '@gsap/react';\nimport { gsap } from 'gsap';\n\nexport interface ItemProps {\n key?: React.Key;\n speed?: number;\n autoFill?: boolean | number;\n pause?: boolean;\n pauseOnHover?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface Props\n extends Omit<React.ComponentPropsWithoutRef<'div'>, 'key'>, ItemProps {\n width: string | number;\n}\n\n// `autoFill={true}` (the default on `Marquees`) needs *some* repeat count\n// before the item can be measured and the real count computed — this is\n// only ever visible for that one render, but rendering 100 copies (200\n// with the 2x loop duplication) up front was needlessly heavy for the\n// common case. A modest guess still avoids visible gaps for typical\n// item/container width ratios while cutting the worst-case default\n// render by ~90%.\nconst INITIAL_AUTO_FILL_GUESS = 10;\n\nconst Item = ({\n width: _width,\n speed = 100,\n autoFill = false,\n pause: _pause = false,\n pauseOnHover = false,\n children,\n}: Props) => {\n const itemRefs = useRef<HTMLDivElement[]>([]);\n const containerRef = useRef<HTMLDivElement>(null);\n const tweenRef = useRef<gsap.core.Tween | null>(null);\n\n const [width, setWidth] = useState<string | number>(_width);\n const [pause, setPause] = useState(false);\n const [repeatCount, setRepeatCount] = useState(\n autoFill\n ? typeof autoFill === 'boolean'\n ? INITIAL_AUTO_FILL_GUESS\n : autoFill\n : 0,\n );\n const [prevWidthProp, setPrevWidthProp] = useState(_width);\n const [prevAutoFill, setPrevAutoFill] = useState(autoFill);\n\n // Adjusted directly in render (React's \"adjust state during render\"\n // pattern) instead of an effect, so `width`/`repeatCount` re-sync with\n // the prop in the same render it changes rather than the render after.\n if (_width !== prevWidthProp) {\n setPrevWidthProp(_width);\n setWidth(_width);\n }\n\n if (autoFill !== prevAutoFill) {\n setPrevAutoFill(autoFill);\n setRepeatCount(\n autoFill\n ? typeof autoFill === 'boolean'\n ? INITIAL_AUTO_FILL_GUESS\n : autoFill\n : 0,\n );\n }\n\n const isPaused = _pause || pause;\n\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (\n !autoFill ||\n !children ||\n !itemRefs.current[0] ||\n typeof width === 'string'\n ) {\n return;\n }\n\n const itemWidth = itemRefs.current[0].offsetWidth;\n\n if (itemWidth >= width) {\n setWidth(itemWidth);\n setRepeatCount(0);\n return;\n }\n\n let totalWidth = 0;\n let repeatCount = 0;\n\n while (totalWidth < width) {\n totalWidth += itemWidth;\n repeatCount += 1;\n }\n\n setWidth(totalWidth);\n setRepeatCount(repeatCount - 1);\n }, [autoFill, width, children]);\n\n useGSAP(\n () => {\n if (!containerRef.current || typeof width === 'string') {\n return;\n }\n\n if (tweenRef.current) {\n tweenRef.current.kill();\n }\n\n tweenRef.current = gsap.fromTo(\n containerRef.current,\n { x: 0 },\n {\n x: -width,\n duration: width / speed,\n repeat: -1,\n ease: 'linear',\n },\n );\n\n return () => {\n tweenRef.current?.kill();\n };\n },\n {\n scope: containerRef,\n dependencies: [width, speed],\n },\n );\n\n useEffect(() => {\n if (!tweenRef.current) {\n return;\n }\n\n if (isPaused) {\n tweenRef.current.pause();\n } else {\n tweenRef.current.play();\n }\n }, [isPaused]);\n\n return (\n <div\n className=\"flex overflow-hidden\"\n {...hoverEvents}\n //\n >\n <div ref={containerRef} className=\"flex flex-nowrap\">\n {[...Array(2)].map((_, index) => (\n <div\n key={index}\n style={{ minWidth: width }}\n className=\"flex flex-nowrap\"\n >\n <div\n ref={el => {\n if (el) {\n itemRefs.current[index] = el;\n }\n }}\n >\n {children}\n </div>\n {[\n ...Array(typeof autoFill === 'number' ? autoFill : repeatCount),\n ].map((_, i) => (\n <div key={i}>{children}</div>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;AA4BA,MAAM,0BAA0B;AAEhC,MAAM,QAAQ,EACZ,OAAO,QACP,QAAQ,KACR,WAAW,OACX,OAAO,SAAS,OAChB,eAAe,OACf,eACW;CACX,MAAM,WAAW,OAAyB,CAAC,CAAC;CAC5C,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,WAAW,OAA+B,IAAI;CAEpD,MAAM,CAAC,OAAO,YAAY,SAA0B,MAAM;CAC1D,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CACxC,MAAM,CAAC,aAAa,kBAAkB,SACpC,WACI,OAAO,aAAa,YAClB,0BACA,WACF,CACN;CACA,MAAM,CAAC,eAAe,oBAAoB,SAAS,MAAM;CACzD,MAAM,CAAC,cAAc,mBAAmB,SAAS,QAAQ;CAKzD,IAAI,WAAW,eAAe;EAC5B,iBAAiB,MAAM;EACvB,SAAS,MAAM;CACjB;CAEA,IAAI,aAAa,cAAc;EAC7B,gBAAgB,QAAQ;EACxB,eACE,WACI,OAAO,aAAa,YAClB,0BACA,WACF,CACN;CACF;CAEA,MAAM,WAAW,UAAU;CAE3B,MAAM,cAAc,eAChB;EACE,oBAAoB;GAClB,SAAS,IAAI;EACf;EACA,oBAAoB;GAClB,SAAS,KAAK;EAChB;CACF,IACA,CAAC;CAEL,gBAAgB;EACd,IACE,CAAC,YACD,CAAC,YACD,CAAC,SAAS,QAAQ,MAClB,OAAO,UAAU,UAEjB;EAGF,MAAM,YAAY,SAAS,QAAQ,EAAE,CAAC;EAEtC,IAAI,aAAa,OAAO;GACtB,SAAS,SAAS;GAClB,eAAe,CAAC;GAChB;EACF;EA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as react_jsx_runtime0 from "react/jsx-runtime";
3
-
4
2
  //#region src/components/molecules/marquees/marquees.d.ts
5
3
  interface Props extends React.ComponentPropsWithoutRef<'div'> {
6
4
  speed?: number;
@@ -8,14 +6,7 @@ interface Props extends React.ComponentPropsWithoutRef<'div'> {
8
6
  pauseOnHover?: boolean;
9
7
  items?: ItemProps[];
10
8
  }
11
- declare const Marquees: ({
12
- className,
13
- items,
14
- speed,
15
- pauseOnHover,
16
- autoFill,
17
- ...props
18
- }: Props) => react_jsx_runtime0.JSX.Element;
9
+ declare const Marquees: ({ className, items, speed, pauseOnHover, autoFill, ...props }: Props) => import("react").JSX.Element;
19
10
  //#endregion
20
- export { Marquees, Props };
11
+ export { Props, Marquees as default };
21
12
  //# sourceMappingURL=marquees.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"marquees.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"mappings":";;;;UAUiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,KAAA;EACA,QAAA;EACA,YAAA;EACA,KAAA,GAAQ,SAAA;AAAA;AAAA,cAGJ,QAAA;EAAY,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GAOf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"marquees.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"mappings":";;UAUiB,cAAc,MAAM;EACnC;EACA;EACA;EACA,QAAQ;;cAGJ,aAAY,WAAA,OAAA,OAAA,cAAA,aAAA,SAOf,0BAAK,IAAA"}
@@ -1,11 +1,9 @@
1
- 'use client';
2
-
1
+ "use client";
3
2
  import { cn } from "../../../utils.mjs";
4
3
  import Item from "./item.mjs";
5
4
  import { useEffect, useRef, useState } from "react";
6
5
  import { jsx } from "react/jsx-runtime";
7
6
  import { useResponsiveSize, useThrottle } from "@jbpark/use-hooks";
8
-
9
7
  //#region src/components/molecules/marquees/marquees.tsx
10
8
  const Marquees = ({ className, items, speed, pauseOnHover = true, autoFill = true, ...props }) => {
11
9
  const [width, setWidth] = useState("100vw");
@@ -29,7 +27,9 @@ const Marquees = ({ className, items, speed, pauseOnHover = true, autoFill = tru
29
27
  useEffect(() => {
30
28
  if (!size.width || !containerRef.current) return;
31
29
  const computedStyle = getComputedStyle(containerRef.current);
32
- setPadding((parseFloat(computedStyle.paddingLeft) || 0) + (parseFloat(computedStyle.paddingRight) || 0));
30
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
31
+ const paddingRight = parseFloat(computedStyle.paddingRight) || 0;
32
+ setPadding(paddingLeft + paddingRight);
33
33
  setWidth(size.width);
34
34
  }, [size]);
35
35
  return /* @__PURE__ */ jsx("div", {
@@ -51,7 +51,7 @@ const Marquees = ({ className, items, speed, pauseOnHover = true, autoFill = tru
51
51
  })
52
52
  });
53
53
  };
54
-
55
54
  //#endregion
56
55
  export { Marquees as default };
56
+
57
57
  //# sourceMappingURL=marquees.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"marquees.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useResponsiveSize, useThrottle } from '@jbpark/use-hooks';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Item, { type ItemProps } from './item';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n speed?: number;\n autoFill?: boolean | number;\n pauseOnHover?: boolean;\n items?: ItemProps[];\n}\n\nconst Marquees = ({\n className,\n items,\n speed,\n pauseOnHover = true,\n autoFill = true,\n ...props\n}: Props) => {\n const [width, setWidth] = useState<string | number>(\n '100vw',\n //\n );\n const [padding, setPadding] = useState(0);\n const [pause, setPause] = useState(false);\n\n const throttledWidth = useThrottle(width, 200);\n\n const { size, ref: responsiveRef } = useResponsiveSize<HTMLDivElement>();\n const containerRef = useRef<HTMLDivElement | null>(null);\n const setContainerRef = (node: HTMLDivElement | null) => {\n containerRef.current = node;\n responsiveRef(node);\n };\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (!size.width || !containerRef.current) {\n return;\n }\n\n const computedStyle = getComputedStyle(containerRef.current);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n\n setPadding(paddingLeft + paddingRight);\n\n setWidth(size.width);\n }, [size]);\n\n return (\n <div\n ref={setContainerRef}\n className={cn(\n className,\n //\n )}\n {...hoverEvents}\n {...props}\n >\n <div\n className={cn(\n 'flex flex-col gap-y-5',\n 'overflow-hidden',\n 'whitespace-nowrap',\n 'bg-inherit',\n //\n )}\n style={{\n width:\n typeof throttledWidth === 'number'\n ? throttledWidth - padding\n : throttledWidth,\n }}\n >\n {items?.map(({ children, key: itemKey, ...item }: ItemProps, key) => (\n <Item\n key={itemKey || key}\n width={throttledWidth}\n pause={pause}\n speed={speed}\n autoFill={autoFill}\n {...item}\n >\n {children}\n </Item>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Marquees;\n"],"mappings":";;;;;;;;;AAiBA,MAAM,YAAY,EAChB,WACA,OACA,OACA,eAAe,MACf,WAAW,MACX,GAAG,YACQ;CACX,MAAM,CAAC,OAAO,YAAY,SACxB,QAED;CACD,MAAM,CAAC,SAAS,cAAc,SAAS,EAAE;CACzC,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CAEzC,MAAM,iBAAiB,YAAY,OAAO,IAAI;CAE9C,MAAM,EAAE,MAAM,KAAK,kBAAkB,mBAAmC;CACxE,MAAM,eAAe,OAA8B,KAAK;CACxD,MAAM,mBAAmB,SAAgC;AACvD,eAAa,UAAU;AACvB,gBAAc,KAAK;;CAErB,MAAM,cAAc,eAChB;EACE,oBAAoB;AAClB,YAAS,KAAK;;EAEhB,oBAAoB;AAClB,YAAS,MAAM;;EAElB,GACD,EAAE;AAEN,iBAAgB;AACd,MAAI,CAAC,KAAK,SAAS,CAAC,aAAa,QAC/B;EAGF,MAAM,gBAAgB,iBAAiB,aAAa,QAAQ;AAI5D,cAHoB,WAAW,cAAc,YAAY,IAAI,MACxC,WAAW,cAAc,aAAa,IAAI,GAEzB;AAEtC,WAAS,KAAK,MAAM;IACnB,CAAC,KAAK,CAAC;AAEV,QACE,oBAAC;EACC,KAAK;EACL,WAAW,GACT,UAED;EACD,GAAI;EACJ,GAAI;YAEJ,oBAAC;GACC,WAAW,GACT,yBACA,mBACA,qBACA,aAED;GACD,OAAO,EACL,OACE,OAAO,mBAAmB,WACtB,iBAAiB,UACjB,gBACP;aAEA,OAAO,KAAK,EAAE,UAAU,KAAK,SAAS,GAAG,QAAmB,QAC3D,oBAAC;IAEC,OAAO;IACA;IACA;IACG;IACV,GAAI;IAEH;MAPI,WAAW,IAQX,CACP;IACE;GACF"}
1
+ {"version":3,"file":"marquees.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useResponsiveSize, useThrottle } from '@jbpark/use-hooks';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Item, { type ItemProps } from './item';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n speed?: number;\n autoFill?: boolean | number;\n pauseOnHover?: boolean;\n items?: ItemProps[];\n}\n\nconst Marquees = ({\n className,\n items,\n speed,\n pauseOnHover = true,\n autoFill = true,\n ...props\n}: Props) => {\n const [width, setWidth] = useState<string | number>(\n '100vw',\n //\n );\n const [padding, setPadding] = useState(0);\n const [pause, setPause] = useState(false);\n\n const throttledWidth = useThrottle(width, 200);\n\n const { size, ref: responsiveRef } = useResponsiveSize<HTMLDivElement>();\n const containerRef = useRef<HTMLDivElement | null>(null);\n const setContainerRef = (node: HTMLDivElement | null) => {\n containerRef.current = node;\n responsiveRef(node);\n };\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (!size.width || !containerRef.current) {\n return;\n }\n\n const computedStyle = getComputedStyle(containerRef.current);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n\n setPadding(paddingLeft + paddingRight);\n\n setWidth(size.width);\n }, [size]);\n\n return (\n <div\n ref={setContainerRef}\n className={cn(\n className,\n //\n )}\n {...hoverEvents}\n {...props}\n >\n <div\n className={cn(\n 'flex flex-col gap-y-5',\n 'overflow-hidden',\n 'whitespace-nowrap',\n 'bg-inherit',\n //\n )}\n style={{\n width:\n typeof throttledWidth === 'number'\n ? throttledWidth - padding\n : throttledWidth,\n }}\n >\n {items?.map(({ children, key: itemKey, ...item }: ItemProps, key) => (\n <Item\n key={itemKey || key}\n width={throttledWidth}\n pause={pause}\n speed={speed}\n autoFill={autoFill}\n {...item}\n >\n {children}\n </Item>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Marquees;\n"],"mappings":";;;;;;;AAiBA,MAAM,YAAY,EAChB,WACA,OACA,OACA,eAAe,MACf,WAAW,MACX,GAAG,YACQ;CACX,MAAM,CAAC,OAAO,YAAY,SACxB,OAEF;CACA,MAAM,CAAC,SAAS,cAAc,SAAS,CAAC;CACxC,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CAExC,MAAM,iBAAiB,YAAY,OAAO,GAAG;CAE7C,MAAM,EAAE,MAAM,KAAK,kBAAkB,kBAAkC;CACvE,MAAM,eAAe,OAA8B,IAAI;CACvD,MAAM,mBAAmB,SAAgC;EACvD,aAAa,UAAU;EACvB,cAAc,IAAI;CACpB;CACA,MAAM,cAAc,eAChB;EACE,oBAAoB;GAClB,SAAS,IAAI;EACf;EACA,oBAAoB;GAClB,SAAS,KAAK;EAChB;CACF,IACA,CAAC;CAEL,gBAAgB;EACd,IAAI,CAAC,KAAK,SAAS,CAAC,aAAa,SAC/B;EAGF,MAAM,gBAAgB,iBAAiB,aAAa,OAAO;EAC3D,MAAM,cAAc,WAAW,cAAc,WAAW,KAAK;EAC7D,MAAM,eAAe,WAAW,cAAc,YAAY,KAAK;EAE/D,WAAW,cAAc,YAAY;EAErC,SAAS,KAAK,KAAK;CACrB,GAAG,CAAC,IAAI,CAAC;CAET,OACE,oBAAC,OAAD;EACE,KAAK;EACL,WAAW,GACT,SAEF;EACA,GAAI;EACJ,GAAI;EAEJ,UAAA,oBAAC,OAAD;GACE,WAAW,GACT,yBACA,mBACA,qBACA,YAEF;GACA,OAAO,EACL,OACE,OAAO,mBAAmB,WACtB,iBAAiB,UACjB,eACR;GAEC,UAAA,OAAO,KAAK,EAAE,UAAU,KAAK,SAAS,GAAG,QAAmB,QAC3D,oBAAC,MAAD;IAEE,OAAO;IACA;IACA;IACG;IACV,GAAI;IAEH;GACG,GARC,WAAW,GAQZ,CACP;EACE,CAAA;CACF,CAAA;AAET"}
@@ -1,5 +1,4 @@
1
- 'use client';
2
-
1
+ "use client";
3
2
  import { cn } from "../../../../utils.mjs";
4
3
  import Label from "./label.mjs";
5
4
  import { MENU_CLASSNAMES } from "../menu.mjs";
@@ -7,7 +6,6 @@ import { ChevronDown } from "lucide-react";
7
6
  import { createElement, useRef, useState } from "react";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { AnimatePresence, motion } from "motion/react";
10
-
11
9
  //#region src/components/molecules/menu/item/item.tsx
12
10
  const OFFSET = [8, 8];
13
11
  const INLINE_OFFSET = 16;
@@ -150,7 +148,7 @@ const Item = ({ itemKey, keyPath, root = false, index, mode, label, children, se
150
148
  }) })]
151
149
  });
152
150
  };
153
-
154
151
  //#endregion
155
152
  export { Item as default };
153
+
156
154
  //# sourceMappingURL=item.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.mjs","names":[],"sources":["../../../../../src/components/molecules/menu/item/item.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { ChevronDown } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { MENU_CLASSNAMES, MenuItem, Props } from '../menu';\nimport Label from './label';\n\ninterface ItemProps extends Props, MenuItem {\n itemKey: React.Key;\n keyPath: React.Key[];\n root?: boolean;\n index: number;\n}\nconst OFFSET: [number, number] = [8, 8];\nconst INLINE_OFFSET = 16;\n\nconst STYLES = {\n hover: {\n classes: ['hover:underline', 'hover:underline-offset-8'],\n },\n open: {\n classes: ['underline', 'underline-offset-8'],\n },\n} as const;\n\nconst getItemClasses = (\n root: boolean,\n isHorizontal: boolean,\n isInline: boolean,\n hasChildren: boolean,\n customClasses?: string,\n) =>\n cn(\n 'px-4 py-2',\n 'cursor-pointer',\n 'whitespace-nowrap',\n root && isHorizontal ? 'inline-flex' : 'flex',\n ...(root\n ? [\n 'h-full',\n 'rounded-none border-transparent',\n hasChildren && 'hover:border-current',\n isHorizontal ? 'border-b-2' : 'border-r-2',\n isInline && 'border-none',\n ]\n : ['rounded-md', ...STYLES.hover.classes]),\n customClasses,\n );\n\nconst Item = ({\n itemKey,\n keyPath,\n root = false,\n index,\n mode,\n label,\n children,\n selectionMap,\n classNames,\n styles,\n offset = OFFSET,\n inlineOffset = INLINE_OFFSET,\n onClick,\n onSelect,\n ...props\n}: ItemProps) => {\n const [open, setOpen] = useState<boolean>(false);\n\n const itemRef = useRef<HTMLLIElement | null>(null);\n\n const isHorizontal = mode === 'horizontal';\n const isInline = mode === 'inline';\n\n const [left, top] = offset;\n\n const selected = selectionMap?.get(itemKey) ?? false;\n\n const item = {\n ...props,\n label,\n key: itemKey,\n children,\n };\n\n const itemClassNames = getItemClasses(\n root,\n isHorizontal,\n isInline,\n !!children?.length,\n root ? classNames?.rootItem : classNames?.item,\n );\n\n const handleSelect = (domEvent: React.SyntheticEvent) => {\n domEvent.stopPropagation();\n\n if (isInline) {\n setOpen(!open);\n }\n\n const params = {\n domEvent,\n key: itemKey,\n keyPath,\n item,\n };\n\n onClick?.(params);\n\n if (!selected) {\n onSelect?.(params);\n }\n };\n\n // Roving tabindex (WAI-ARIA menu pattern): only the first item in each\n // menu/submenu level is a Tab stop (below); arrow keys move real DOM\n // focus between sibling <li>s within that same level, which is what\n // ends up mattering for actual keyboard use even though — unlike a\n // fully state-tracked implementation — focus resets to the first item\n // if the user Tabs out and back in rather than resuming where they left\n // off.\n //\n // Deliberately not `useKeyPress` (unlike dropdown.tsx's trigger and\n // radio.tsx/checkbox.tsx's icon mode, #229's action item 5): that hook\n // is a static combo -> handler binding, one listener per combo. This\n // handler is a single stateful branch — Enter/Space select, Escape\n // conditionally closes a submenu and stops the event from also closing\n // an ancestor Dropdown, and the arrow-key branch reads `itemRef` at\n // fire time to focus a *sibling* `<li>`. Splitting that into 3-4\n // separate useKeyPress calls (each its own listener) per menu item\n // wouldn't fix a bug — the existing logic is already correct — it would\n // just multiply listeners across every item in a menu for no benefit.\n const handleKeyDown = (domEvent: React.KeyboardEvent) => {\n if (domEvent.key === 'Enter' || domEvent.key === ' ') {\n domEvent.preventDefault();\n handleSelect(domEvent);\n return;\n }\n\n if (domEvent.key === 'Escape') {\n if (children?.length && open) {\n domEvent.stopPropagation();\n setOpen(false);\n }\n return;\n }\n\n const isNext = isHorizontal\n ? domEvent.key === 'ArrowRight'\n : domEvent.key === 'ArrowDown';\n const isPrev = isHorizontal\n ? domEvent.key === 'ArrowLeft'\n : domEvent.key === 'ArrowUp';\n\n if (!isNext && !isPrev) {\n return;\n }\n\n domEvent.preventDefault();\n const sibling = isNext\n ? itemRef.current?.nextElementSibling\n : itemRef.current?.previousElementSibling;\n sibling?.querySelector<HTMLElement>('[role=\"menuitem\"]')?.focus();\n };\n\n const childrenContainerClassNames = cn(\n isInline ? 'relative overflow-hidden' : 'absolute min-w-[200px]',\n !isInline && root && isHorizontal\n ? 'left-0 top-full pt-2 pl-0'\n : !isInline\n ? 'left-full top-0 pl-2 pt-0'\n : 'pl-4',\n );\n\n const childrenContainerStyle = isInline\n ? {\n paddingLeft: inlineOffset,\n }\n : root && isHorizontal\n ? {\n paddingTop: top,\n }\n : {\n paddingLeft: left,\n };\n\n return (\n <li\n ref={itemRef}\n role=\"none\"\n className={cn(\n 'group',\n 'relative',\n root && isHorizontal ? 'inline-block' : 'block',\n )}\n onMouseEnter={() => {\n if (isInline) {\n return;\n }\n setOpen(true);\n }}\n onMouseLeave={() => {\n if (isInline) {\n return;\n }\n setOpen(false);\n }}\n onFocus={() => {\n if (isInline) {\n return;\n }\n setOpen(true);\n }}\n onBlur={e => {\n if (isInline) {\n return;\n }\n if (!itemRef.current?.contains(e.relatedTarget as Node)) {\n setOpen(false);\n }\n }}\n >\n <div\n role=\"menuitem\"\n tabIndex={index === 0 ? 0 : -1}\n aria-expanded={children?.length ? open : undefined}\n aria-haspopup={children?.length ? 'menu' : undefined}\n aria-current={selected ? true : undefined}\n className={cn(\n itemClassNames,\n ...(selected\n ? root\n ? ['border-current']\n : [...STYLES.open.classes, ...STYLES.hover.classes]\n : root && !!children?.length\n ? ['group-hover:border-current']\n : []),\n //\n )}\n style={root ? styles?.rootItem : styles?.item}\n onClick={handleSelect}\n onKeyDown={handleKeyDown}\n >\n <div\n className={cn(\n 'w-full',\n 'inline-flex items-center justify-between',\n //\n )}\n >\n <Label className={cn(classNames?.label)} style={styles?.label}>\n {label}\n </Label>\n {!root && !isInline && !!children?.length && (\n <ChevronDown className={cn('-rotate-90')} />\n )}\n {isInline && !!children?.length && (\n <ChevronDown\n className={cn(\n 'transition-all',\n open ? '-rotate-180' : 'rotate-0',\n )}\n />\n )}\n </div>\n </div>\n <AnimatePresence>\n {!!children?.length && open && (\n <motion.div\n className={cn(\n childrenContainerClassNames,\n //\n )}\n style={childrenContainerStyle}\n initial={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n animate={isInline ? { height: 'auto', opacity: 1 } : { opacity: 1 }}\n exit={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n transition={{ duration: 0.2 }}\n >\n <ul\n role=\"menu\"\n className={cn(\n MENU_CLASSNAMES,\n isInline && 'shadow-none',\n classNames?.subMenu,\n //\n )}\n style={styles?.subMenu}\n >\n {children.map((child, childIndex) => (\n <Item\n {...child}\n key={child.key}\n itemKey={child.key}\n keyPath={[...keyPath, child.key]}\n index={childIndex}\n selectionMap={selectionMap}\n mode={mode}\n classNames={classNames}\n styles={styles}\n offset={offset}\n inlineOffset={inlineOffset}\n onClick={onClick}\n onSelect={onSelect}\n />\n ))}\n </ul>\n </motion.div>\n )}\n </AnimatePresence>\n </li>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;;;;;AAkBA,MAAM,SAA2B,CAAC,GAAG,EAAE;AACvC,MAAM,gBAAgB;AAEtB,MAAM,SAAS;CACb,OAAO,EACL,SAAS,CAAC,mBAAmB,2BAA2B,EACzD;CACD,MAAM,EACJ,SAAS,CAAC,aAAa,qBAAqB,EAC7C;CACF;AAED,MAAM,kBACJ,MACA,cACA,UACA,aACA,kBAEA,GACE,aACA,kBACA,qBACA,QAAQ,eAAe,gBAAgB,QACvC,GAAI,OACA;CACE;CACA;CACA,eAAe;CACf,eAAe,eAAe;CAC9B,YAAY;CACb,GACD,CAAC,cAAc,GAAG,OAAO,MAAM,QAAQ,EAC3C,cACD;AAEH,MAAM,QAAQ,EACZ,SACA,SACA,OAAO,OACP,OACA,MACA,OACA,UACA,cACA,YACA,QACA,SAAS,QACT,eAAe,eACf,SACA,UACA,GAAG,YACY;CACf,MAAM,CAAC,MAAM,WAAW,SAAkB,MAAM;CAEhD,MAAM,UAAU,OAA6B,KAAK;CAElD,MAAM,eAAe,SAAS;CAC9B,MAAM,WAAW,SAAS;CAE1B,MAAM,CAAC,MAAM,OAAO;CAEpB,MAAM,WAAW,cAAc,IAAI,QAAQ,IAAI;CAE/C,MAAM,OAAO;EACX,GAAG;EACH;EACA,KAAK;EACL;EACD;CAED,MAAM,iBAAiB,eACrB,MACA,cACA,UAC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C,GAAI;KACJ,KAAK,MAAM;KACX,SAAS,MAAM;KACf,SAAS,CAAC,GAAG,SAAS,MAAM,IAAI;KAChC,OAAO;KACO;KACR;KACM;KACJ;KACA;KACM;KACL;KACC;MACV,CACF;KACC;IACM,GAEC;GACf"}
1
+ {"version":3,"file":"item.mjs","names":[],"sources":["../../../../../src/components/molecules/menu/item/item.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { ChevronDown } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { MENU_CLASSNAMES, MenuItem, Props } from '../menu';\nimport Label from './label';\n\ninterface ItemProps extends Props, MenuItem {\n itemKey: React.Key;\n keyPath: React.Key[];\n root?: boolean;\n index: number;\n}\nconst OFFSET: [number, number] = [8, 8];\nconst INLINE_OFFSET = 16;\n\nconst STYLES = {\n hover: {\n classes: ['hover:underline', 'hover:underline-offset-8'],\n },\n open: {\n classes: ['underline', 'underline-offset-8'],\n },\n} as const;\n\nconst getItemClasses = (\n root: boolean,\n isHorizontal: boolean,\n isInline: boolean,\n hasChildren: boolean,\n customClasses?: string,\n) =>\n cn(\n 'px-4 py-2',\n 'cursor-pointer',\n 'whitespace-nowrap',\n root && isHorizontal ? 'inline-flex' : 'flex',\n ...(root\n ? [\n 'h-full',\n 'rounded-none border-transparent',\n hasChildren && 'hover:border-current',\n isHorizontal ? 'border-b-2' : 'border-r-2',\n isInline && 'border-none',\n ]\n : ['rounded-md', ...STYLES.hover.classes]),\n customClasses,\n );\n\nconst Item = ({\n itemKey,\n keyPath,\n root = false,\n index,\n mode,\n label,\n children,\n selectionMap,\n classNames,\n styles,\n offset = OFFSET,\n inlineOffset = INLINE_OFFSET,\n onClick,\n onSelect,\n ...props\n}: ItemProps) => {\n const [open, setOpen] = useState<boolean>(false);\n\n const itemRef = useRef<HTMLLIElement | null>(null);\n\n const isHorizontal = mode === 'horizontal';\n const isInline = mode === 'inline';\n\n const [left, top] = offset;\n\n const selected = selectionMap?.get(itemKey) ?? false;\n\n const item = {\n ...props,\n label,\n key: itemKey,\n children,\n };\n\n const itemClassNames = getItemClasses(\n root,\n isHorizontal,\n isInline,\n !!children?.length,\n root ? classNames?.rootItem : classNames?.item,\n );\n\n const handleSelect = (domEvent: React.SyntheticEvent) => {\n domEvent.stopPropagation();\n\n if (isInline) {\n setOpen(!open);\n }\n\n // Next.js's types pull in React's `react/experimental` augmentation\n // (adding `useOptimistic`'s internal key symbol to `React.Key`), which\n // widens `itemKey`/`item.key` here beyond what `ClickEventHandler`\n // expects when this file is type-checked as part of a Next.js app —\n // real menu item keys are always string/number, never that symbol.\n const params = {\n domEvent,\n key: itemKey as Exclude<React.Key, symbol>,\n keyPath,\n item: item as unknown as MenuItem,\n };\n\n onClick?.(params);\n\n if (!selected) {\n onSelect?.(params);\n }\n };\n\n // Roving tabindex (WAI-ARIA menu pattern): only the first item in each\n // menu/submenu level is a Tab stop (below); arrow keys move real DOM\n // focus between sibling <li>s within that same level, which is what\n // ends up mattering for actual keyboard use even though — unlike a\n // fully state-tracked implementation — focus resets to the first item\n // if the user Tabs out and back in rather than resuming where they left\n // off.\n //\n // Deliberately not `useKeyPress` (unlike dropdown.tsx's trigger and\n // radio.tsx/checkbox.tsx's icon mode, #229's action item 5): that hook\n // is a static combo -> handler binding, one listener per combo. This\n // handler is a single stateful branch — Enter/Space select, Escape\n // conditionally closes a submenu and stops the event from also closing\n // an ancestor Dropdown, and the arrow-key branch reads `itemRef` at\n // fire time to focus a *sibling* `<li>`. Splitting that into 3-4\n // separate useKeyPress calls (each its own listener) per menu item\n // wouldn't fix a bug — the existing logic is already correct — it would\n // just multiply listeners across every item in a menu for no benefit.\n const handleKeyDown = (domEvent: React.KeyboardEvent) => {\n if (domEvent.key === 'Enter' || domEvent.key === ' ') {\n domEvent.preventDefault();\n handleSelect(domEvent);\n return;\n }\n\n if (domEvent.key === 'Escape') {\n if (children?.length && open) {\n domEvent.stopPropagation();\n setOpen(false);\n }\n return;\n }\n\n const isNext = isHorizontal\n ? domEvent.key === 'ArrowRight'\n : domEvent.key === 'ArrowDown';\n const isPrev = isHorizontal\n ? domEvent.key === 'ArrowLeft'\n : domEvent.key === 'ArrowUp';\n\n if (!isNext && !isPrev) {\n return;\n }\n\n domEvent.preventDefault();\n const sibling = isNext\n ? itemRef.current?.nextElementSibling\n : itemRef.current?.previousElementSibling;\n sibling?.querySelector<HTMLElement>('[role=\"menuitem\"]')?.focus();\n };\n\n const childrenContainerClassNames = cn(\n isInline ? 'relative overflow-hidden' : 'absolute min-w-[200px]',\n !isInline && root && isHorizontal\n ? 'left-0 top-full pt-2 pl-0'\n : !isInline\n ? 'left-full top-0 pl-2 pt-0'\n : 'pl-4',\n );\n\n const childrenContainerStyle = isInline\n ? {\n paddingLeft: inlineOffset,\n }\n : root && isHorizontal\n ? {\n paddingTop: top,\n }\n : {\n paddingLeft: left,\n };\n\n return (\n <li\n ref={itemRef}\n role=\"none\"\n className={cn(\n 'group',\n 'relative',\n root && isHorizontal ? 'inline-block' : 'block',\n )}\n onMouseEnter={() => {\n if (isInline) {\n return;\n }\n setOpen(true);\n }}\n onMouseLeave={() => {\n if (isInline) {\n return;\n }\n setOpen(false);\n }}\n onFocus={() => {\n if (isInline) {\n return;\n }\n setOpen(true);\n }}\n onBlur={e => {\n if (isInline) {\n return;\n }\n if (!itemRef.current?.contains(e.relatedTarget as Node)) {\n setOpen(false);\n }\n }}\n >\n <div\n role=\"menuitem\"\n tabIndex={index === 0 ? 0 : -1}\n aria-expanded={children?.length ? open : undefined}\n aria-haspopup={children?.length ? 'menu' : undefined}\n aria-current={selected ? true : undefined}\n className={cn(\n itemClassNames,\n ...(selected\n ? root\n ? ['border-current']\n : [...STYLES.open.classes, ...STYLES.hover.classes]\n : root && !!children?.length\n ? ['group-hover:border-current']\n : []),\n //\n )}\n style={root ? styles?.rootItem : styles?.item}\n onClick={handleSelect}\n onKeyDown={handleKeyDown}\n >\n <div\n className={cn(\n 'w-full',\n 'inline-flex items-center justify-between',\n //\n )}\n >\n <Label className={cn(classNames?.label)} style={styles?.label}>\n {label}\n </Label>\n {!root && !isInline && !!children?.length && (\n <ChevronDown className={cn('-rotate-90')} />\n )}\n {isInline && !!children?.length && (\n <ChevronDown\n className={cn(\n 'transition-all',\n open ? '-rotate-180' : 'rotate-0',\n )}\n />\n )}\n </div>\n </div>\n <AnimatePresence>\n {!!children?.length && open && (\n <motion.div\n className={cn(\n childrenContainerClassNames,\n //\n )}\n style={childrenContainerStyle}\n initial={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n animate={isInline ? { height: 'auto', opacity: 1 } : { opacity: 1 }}\n exit={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n transition={{ duration: 0.2 }}\n >\n <ul\n role=\"menu\"\n className={cn(\n MENU_CLASSNAMES,\n isInline && 'shadow-none',\n classNames?.subMenu,\n //\n )}\n style={styles?.subMenu}\n >\n {children.map((child, childIndex) => (\n <Item\n {...child}\n key={child.key}\n itemKey={child.key}\n keyPath={[...keyPath, child.key]}\n index={childIndex}\n selectionMap={selectionMap}\n mode={mode}\n classNames={classNames}\n styles={styles}\n offset={offset}\n inlineOffset={inlineOffset}\n onClick={onClick}\n onSelect={onSelect}\n />\n ))}\n </ul>\n </motion.div>\n )}\n </AnimatePresence>\n </li>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;;;AAkBA,MAAM,SAA2B,CAAC,GAAG,CAAC;AACtC,MAAM,gBAAgB;AAEtB,MAAM,SAAS;CACb,OAAO,EACL,SAAS,CAAC,mBAAmB,0BAA0B,EACzD;CACA,MAAM,EACJ,SAAS,CAAC,aAAa,oBAAoB,EAC7C;AACF;AAEA,MAAM,kBACJ,MACA,cACA,UACA,aACA,kBAEA,GACE,aACA,kBACA,qBACA,QAAQ,eAAe,gBAAgB,QACvC,GAAI,OACA;CACE;CACA;CACA,eAAe;CACf,eAAe,eAAe;CAC9B,YAAY;AACd,IACA,CAAC,cAAc,GAAG,O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E5C,YAAY,CAAC,CAAC,UAAU,UACvB,oBAAC,aAAD,EACE,WAAW,GACT,kBACA,OAAO,gBAAgB,UACzB,EACD,CAAA;IAEA;;EACF,CAAA,GACL,oBAAC,iBAAD,EAAA,UACG,CAAC,CAAC,UAAU,UAAU,QACrB,oBAAC,OAAO,KAAR;GACE,WAAW,GACT,2BAEF;GACA,OAAO;GACP,SAAS,WAAW;IAAE,QAAQ;IAAG,SAAS;GAAE,IAAI,EAAE,SAAS,EAAE;GAC7D,SAAS,WAAW;IAAE,QAAQ;IAAQ,SAAS;GAAE,IAAI,EAAE,SAAS,EAAE;GAClE,MAAM,WAAW;IAAE,QAAQ;IAAG,SAAS;GAAE,IAAI,EAAE,SAAS,EAAE;GAC1D,YAAY,EAAE,UAAU,GAAI;GAE5B,UAAA,oBAAC,MAAD;IACE,MAAK;IACL,WAAW,GACT,iBACA,YAAY,eACZ,YAAY,OAEd;IACA,OAAO,QAAQ;IAEd,UAAA,SAAS,KAAK,OAAO,eACpB,8BAAC,MAAD;KACE,GAAI;KACJ,KAAK,MAAM;KACX,SAAS,MAAM;KACf,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG;KAC/B,OAAO;KACO;KACR;KACM;KACJ;KACA;KACM;KACL;KACC;IACX,CAAA,CACF;GACC,CAAA;EACM,CAAA,EAEC,CAAA,CACf;;AAER"}
@@ -1,7 +1,6 @@
1
1
  import { cn } from "../../../../utils.mjs";
2
2
  import Typography from "../../../../Typography.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
-
5
4
  //#region src/components/molecules/menu/item/label.tsx
6
5
  const Label = ({ children, className, ...props }) => {
7
6
  if (typeof children === "string") return /* @__PURE__ */ jsx(Typography.Text, {
@@ -11,7 +10,7 @@ const Label = ({ children, className, ...props }) => {
11
10
  });
12
11
  return children;
13
12
  };
14
-
15
13
  //#endregion
16
14
  export { Label as default };
15
+
17
16
  //# sourceMappingURL=label.mjs.map