@customafk/lunas-ui 0.2.81 → 0.2.83

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 (327) hide show
  1. package/dist/{action-submit-kYjq-iPD.cjs → action-submit-B9vHpLoN.cjs} +2 -2
  2. package/dist/{action-submit-kYjq-iPD.cjs.map → action-submit-B9vHpLoN.cjs.map} +1 -1
  3. package/dist/{action-submit-DVNxnW4-.mjs → action-submit-BQdkz4mS.mjs} +2 -2
  4. package/dist/{action-submit-DVNxnW4-.mjs.map → action-submit-BQdkz4mS.mjs.map} +1 -1
  5. package/dist/{actions-form-DRrkiGzh.mjs → actions-form-D4n1W3-X.mjs} +2 -2
  6. package/dist/{actions-form-DRrkiGzh.mjs.map → actions-form-D4n1W3-X.mjs.map} +1 -1
  7. package/dist/{actions-form-CwicJU89.cjs → actions-form-DF2eYxGQ.cjs} +2 -2
  8. package/dist/{actions-form-CwicJU89.cjs.map → actions-form-DF2eYxGQ.cjs.map} +1 -1
  9. package/dist/{analysis-panel-DYF2CmAH.cjs → analysis-panel-B4ynYuwg.cjs} +2 -2
  10. package/dist/{analysis-panel-DYF2CmAH.cjs.map → analysis-panel-B4ynYuwg.cjs.map} +1 -1
  11. package/dist/{analysis-panel-_s1fgcZC.mjs → analysis-panel-CcM3tBcc.mjs} +2 -2
  12. package/dist/{analysis-panel-_s1fgcZC.mjs.map → analysis-panel-CcM3tBcc.mjs.map} +1 -1
  13. package/dist/{badge-C_KLKwiS.d.cts → badge-C_NPjGXe.d.cts} +10 -3
  14. package/dist/{badge-C_KLKwiS.d.mts → badge-C_NPjGXe.d.mts} +10 -3
  15. package/dist/{badge-display-DWzSl3rs.cjs → badge-display-C1_Fc3Sj.cjs} +2 -2
  16. package/dist/{badge-display-DWzSl3rs.cjs.map → badge-display-C1_Fc3Sj.cjs.map} +1 -1
  17. package/dist/{badge-display-D6d7wTEE.mjs → badge-display-DRmVhZ-C.mjs} +2 -2
  18. package/dist/{badge-display-D6d7wTEE.mjs.map → badge-display-DRmVhZ-C.mjs.map} +1 -1
  19. package/dist/{boolean-display-Wko_5Jd5.mjs → boolean-display-ByTs3aOa.mjs} +2 -2
  20. package/dist/{boolean-display-Wko_5Jd5.mjs.map → boolean-display-ByTs3aOa.mjs.map} +1 -1
  21. package/dist/{boolean-display-C5GIuWnc.cjs → boolean-display-DUA-6Q13.cjs} +2 -2
  22. package/dist/{boolean-display-C5GIuWnc.cjs.map → boolean-display-DUA-6Q13.cjs.map} +1 -1
  23. package/dist/{button-CnKmz4qM.d.cts → button-BnoPktln.d.cts} +3 -3
  24. package/dist/{button-CnKmz4qM.d.mts → button-BnoPktln.d.mts} +3 -3
  25. package/dist/{calendar-BT6-Fo3T.d.mts → calendar-BkV5hTX2.d.mts} +2 -2
  26. package/dist/{calendar-D_QmR9VE.d.cts → calendar-iDMPT1kI.d.cts} +2 -2
  27. package/dist/{carousel-BBI4xPdK.d.mts → carousel-D7VXWJ3S.d.mts} +2 -2
  28. package/dist/{carousel-B_IXlBdH.d.cts → carousel-bBvM31sh.d.cts} +2 -2
  29. package/dist/{checkbox-field-BN3Vd9qq.mjs → checkbox-field-BRGTLOjq.mjs} +2 -2
  30. package/dist/{checkbox-field-BN3Vd9qq.mjs.map → checkbox-field-BRGTLOjq.mjs.map} +1 -1
  31. package/dist/{checkbox-field-DBUjQC_4.cjs → checkbox-field-ldZRSCca.cjs} +2 -2
  32. package/dist/{checkbox-field-DBUjQC_4.cjs.map → checkbox-field-ldZRSCca.cjs.map} +1 -1
  33. package/dist/{cms-layout-DCJhB-GY.cjs → cms-layout-BGsf1E4E.cjs} +2 -2
  34. package/dist/{cms-layout-DCJhB-GY.cjs.map → cms-layout-BGsf1E4E.cjs.map} +1 -1
  35. package/dist/{cms-layout-Ba_5wSnr.mjs → cms-layout-BHLo0_L_.mjs} +2 -2
  36. package/dist/{cms-layout-Ba_5wSnr.mjs.map → cms-layout-BHLo0_L_.mjs.map} +1 -1
  37. package/dist/combobox-Bhgo112r.cjs +2 -0
  38. package/dist/{combobox-kp_kPY8o.cjs.map → combobox-Bhgo112r.cjs.map} +1 -1
  39. package/dist/combobox-C0nno01T.mjs +2 -0
  40. package/dist/{combobox-C64Rvd7n.mjs.map → combobox-C0nno01T.mjs.map} +1 -1
  41. package/dist/{combobox-field-Bug1qI5B.mjs → combobox-field-CvkdZkQE.mjs} +2 -2
  42. package/dist/{combobox-field-Bug1qI5B.mjs.map → combobox-field-CvkdZkQE.mjs.map} +1 -1
  43. package/dist/{combobox-field-BE9miJ3D.cjs → combobox-field-ZYr7636s.cjs} +2 -2
  44. package/dist/{combobox-field-BE9miJ3D.cjs.map → combobox-field-ZYr7636s.cjs.map} +1 -1
  45. package/dist/currency-display-DefLJLqL.cjs +2 -0
  46. package/dist/currency-display-DefLJLqL.cjs.map +1 -0
  47. package/dist/currency-display-DpbtUluj.mjs +2 -0
  48. package/dist/currency-display-DpbtUluj.mjs.map +1 -0
  49. package/dist/data-display/phone-number.cjs +1 -1
  50. package/dist/data-display/phone-number.cjs.map +1 -1
  51. package/dist/data-display/phone-number.d.cts +1 -1
  52. package/dist/data-display/phone-number.d.mts +1 -1
  53. package/dist/data-display/phone-number.mjs +1 -1
  54. package/dist/data-display/phone-number.mjs.map +1 -1
  55. package/dist/{date-display-DXyb-Ai2.mjs → date-display-ByvkuSk0.mjs} +2 -2
  56. package/dist/{date-display-DXyb-Ai2.mjs.map → date-display-ByvkuSk0.mjs.map} +1 -1
  57. package/dist/{date-display-D38qvsh2.cjs → date-display-CkPBLlWz.cjs} +2 -2
  58. package/dist/{date-display-D38qvsh2.cjs.map → date-display-CkPBLlWz.cjs.map} +1 -1
  59. package/dist/{date-field-CYoPe74G.cjs → date-field-1Hmcv8Zp.cjs} +2 -2
  60. package/dist/{date-field-CYoPe74G.cjs.map → date-field-1Hmcv8Zp.cjs.map} +1 -1
  61. package/dist/{date-field-D_qpBb-t.mjs → date-field-DGMTG_hu.mjs} +2 -2
  62. package/dist/{date-field-D_qpBb-t.mjs.map → date-field-DGMTG_hu.mjs.map} +1 -1
  63. package/dist/{description-display-BwBMrRAi.mjs → description-display-BFTBwDmB.mjs} +2 -2
  64. package/dist/{description-display-BwBMrRAi.mjs.map → description-display-BFTBwDmB.mjs.map} +1 -1
  65. package/dist/{description-display-DIeHy7ll.cjs → description-display-DeEwppdC.cjs} +2 -2
  66. package/dist/{description-display-DIeHy7ll.cjs.map → description-display-DeEwppdC.cjs.map} +1 -1
  67. package/dist/descriptions-Bw9GSCjo.mjs +3 -0
  68. package/dist/descriptions-Bw9GSCjo.mjs.map +1 -0
  69. package/dist/descriptions-DUsJjqd2.cjs +3 -0
  70. package/dist/descriptions-DUsJjqd2.cjs.map +1 -0
  71. package/dist/{dialog-form-CCIcht28.mjs → dialog-form-BRSZpRTC.mjs} +2 -2
  72. package/dist/{dialog-form-CCIcht28.mjs.map → dialog-form-BRSZpRTC.mjs.map} +1 -1
  73. package/dist/{dialog-form-BTZZwz3T.cjs → dialog-form-C1qpltYx.cjs} +2 -2
  74. package/dist/{dialog-form-BTZZwz3T.cjs.map → dialog-form-C1qpltYx.cjs.map} +1 -1
  75. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +1 -1
  76. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +1 -1
  77. package/dist/dialogs/side-panel.cjs +2 -0
  78. package/dist/dialogs/side-panel.cjs.map +1 -0
  79. package/dist/dialogs/side-panel.d.cts +2 -0
  80. package/dist/dialogs/side-panel.d.mts +2 -0
  81. package/dist/dialogs/side-panel.mjs +2 -0
  82. package/dist/dialogs/side-panel.mjs.map +1 -0
  83. package/dist/{email-display-_FRE2qcO.cjs → email-display-BXw4IbbW.cjs} +2 -2
  84. package/dist/{email-display-_FRE2qcO.cjs.map → email-display-BXw4IbbW.cjs.map} +1 -1
  85. package/dist/{email-display-Be3b-kDL.mjs → email-display-qxdrnYmK.mjs} +2 -2
  86. package/dist/{email-display-Be3b-kDL.mjs.map → email-display-qxdrnYmK.mjs.map} +1 -1
  87. package/dist/{email-field-DxSNJ6tf.mjs → email-field-C2Lvl_rQ.mjs} +2 -2
  88. package/dist/{email-field-DxSNJ6tf.mjs.map → email-field-C2Lvl_rQ.mjs.map} +1 -1
  89. package/dist/{email-field-DJa7iASY.cjs → email-field-D3nSkHj2.cjs} +2 -2
  90. package/dist/{email-field-DJa7iASY.cjs.map → email-field-D3nSkHj2.cjs.map} +1 -1
  91. package/dist/features/descriptions/index.cjs +1 -2
  92. package/dist/features/descriptions/index.d.cts +2 -2
  93. package/dist/features/descriptions/index.d.mts +2 -2
  94. package/dist/features/descriptions/index.mjs +1 -2
  95. package/dist/features/tables/index.cjs +1 -1
  96. package/dist/features/tables/index.d.cts +1 -1
  97. package/dist/features/tables/index.d.mts +1 -1
  98. package/dist/features/tables/index.mjs +1 -1
  99. package/dist/features/tanstack-form/index.cjs +1 -1
  100. package/dist/features/tanstack-form/index.mjs +1 -1
  101. package/dist/{filter-C2wE49q7.mjs → filter-DM4QLW77.mjs} +2 -2
  102. package/dist/{filter-C2wE49q7.mjs.map → filter-DM4QLW77.mjs.map} +1 -1
  103. package/dist/{filter-z7p4lRp8.cjs → filter-DQEjSnOP.cjs} +2 -2
  104. package/dist/{filter-z7p4lRp8.cjs.map → filter-DQEjSnOP.cjs.map} +1 -1
  105. package/dist/{flex-CIzZIICK.d.cts → flex-C63_IqSY.d.cts} +5 -3
  106. package/dist/{flex-CIzZIICK.d.mts → flex-C63_IqSY.d.mts} +5 -3
  107. package/dist/{index-DqAbPipJ.d.cts → index--wNkNzCB.d.cts} +15 -12
  108. package/dist/index-Cp4Db57w.d.cts +598 -0
  109. package/dist/index-CqE3mOHo.d.mts +598 -0
  110. package/dist/{index-CjiDR-94.d.mts → index-CrkOhm--.d.mts} +15 -12
  111. package/dist/index.cjs +1 -1
  112. package/dist/index.d.cts +14 -12
  113. package/dist/index.d.mts +14 -12
  114. package/dist/index.mjs +1 -1
  115. package/dist/layouts/cms-layout/index.cjs +1 -1
  116. package/dist/layouts/cms-layout/index.mjs +1 -1
  117. package/dist/layouts/flex.cjs +1 -1
  118. package/dist/layouts/flex.cjs.map +1 -1
  119. package/dist/layouts/flex.d.cts +1 -1
  120. package/dist/layouts/flex.d.mts +1 -1
  121. package/dist/layouts/flex.mjs +1 -1
  122. package/dist/layouts/flex.mjs.map +1 -1
  123. package/dist/layouts/payment-layout/index.cjs +1 -1
  124. package/dist/layouts/payment-layout/index.mjs +1 -1
  125. package/dist/layouts/ui-grid.cjs +2 -0
  126. package/dist/layouts/ui-grid.cjs.map +1 -0
  127. package/dist/layouts/ui-grid.d.cts +2 -0
  128. package/dist/layouts/ui-grid.d.mts +2 -0
  129. package/dist/layouts/ui-grid.mjs +2 -0
  130. package/dist/layouts/ui-grid.mjs.map +1 -0
  131. package/dist/{list-display-CWQvIMUj.mjs → list-display-4tTkV29U.mjs} +2 -2
  132. package/dist/{list-display-CWQvIMUj.mjs.map → list-display-4tTkV29U.mjs.map} +1 -1
  133. package/dist/{list-display-BvKGl7uq.cjs → list-display-CJvQ-wwT.cjs} +2 -2
  134. package/dist/{list-display-BvKGl7uq.cjs.map → list-display-CJvQ-wwT.cjs.map} +1 -1
  135. package/dist/{name-display-CnTRVqX4.mjs → name-display-BFoDcvt2.mjs} +2 -2
  136. package/dist/{name-display-CnTRVqX4.mjs.map → name-display-BFoDcvt2.mjs.map} +1 -1
  137. package/dist/{name-display-DfOtYp7d.cjs → name-display-Br7rcdqi.cjs} +2 -2
  138. package/dist/{name-display-DfOtYp7d.cjs.map → name-display-Br7rcdqi.cjs.map} +1 -1
  139. package/dist/{number-field-5INgdUUv.mjs → number-field-CR5PLX6H.mjs} +2 -2
  140. package/dist/{number-field-5INgdUUv.mjs.map → number-field-CR5PLX6H.mjs.map} +1 -1
  141. package/dist/{number-field-DKZz-27X.cjs → number-field-CWDYA3La.cjs} +2 -2
  142. package/dist/{number-field-DKZz-27X.cjs.map → number-field-CWDYA3La.cjs.map} +1 -1
  143. package/dist/{pagination-AxRzmAtZ.d.cts → pagination-BRw-yZBY.d.cts} +2 -2
  144. package/dist/{pagination-D12pR8_5.d.mts → pagination-BlLiOvY9.d.mts} +2 -2
  145. package/dist/{paragraph-C5HE9u0Q.d.mts → paragraph-CRo5eC7H.d.mts} +2 -2
  146. package/dist/{paragraph-DJlHIDmk.d.cts → paragraph-CkCNIsvz.d.cts} +2 -2
  147. package/dist/{password-field-DOIe6wTv.mjs → password-field-B2_kzss6.mjs} +2 -2
  148. package/dist/{password-field-DOIe6wTv.mjs.map → password-field-B2_kzss6.mjs.map} +1 -1
  149. package/dist/{password-field-BuWARi35.cjs → password-field-BHRhVyZ0.cjs} +2 -2
  150. package/dist/{password-field-BuWARi35.cjs.map → password-field-BHRhVyZ0.cjs.map} +1 -1
  151. package/dist/{payment-layout-BSl9DYQA.mjs → payment-layout--b7bhmR1.mjs} +2 -2
  152. package/dist/{payment-layout-BSl9DYQA.mjs.map → payment-layout--b7bhmR1.mjs.map} +1 -1
  153. package/dist/payment-layout-BZtIcu-3.cjs +2 -0
  154. package/dist/{payment-layout-DDcLanA0.cjs.map → payment-layout-BZtIcu-3.cjs.map} +1 -1
  155. package/dist/{permalink-DhqOATLQ.mjs → permalink-BPCF_npZ.mjs} +2 -2
  156. package/dist/{permalink-DhqOATLQ.mjs.map → permalink-BPCF_npZ.mjs.map} +1 -1
  157. package/dist/{permalink-29QzG9Xe.cjs → permalink-DCvWlrAT.cjs} +2 -2
  158. package/dist/{permalink-29QzG9Xe.cjs.map → permalink-DCvWlrAT.cjs.map} +1 -1
  159. package/dist/phone-CTTjc3mv.mjs +2 -0
  160. package/dist/phone-CTTjc3mv.mjs.map +1 -0
  161. package/dist/phone-CUxXVTg6.cjs +2 -0
  162. package/dist/phone-CUxXVTg6.cjs.map +1 -0
  163. package/dist/{phone-number-D9j5xYDW.d.cts → phone-number-B1bLIt8i.d.cts} +3 -3
  164. package/dist/{phone-number-D9j5xYDW.d.mts → phone-number-B1bLIt8i.d.mts} +3 -3
  165. package/dist/{phone-number-CQXrATQO.mjs → phone-number-DHFLnHWO.mjs} +2 -2
  166. package/dist/{phone-number-CQXrATQO.mjs.map → phone-number-DHFLnHWO.mjs.map} +1 -1
  167. package/dist/{phone-number-C2k8llhf.cjs → phone-number-YzmDmFBU.cjs} +2 -2
  168. package/dist/{phone-number-C2k8llhf.cjs.map → phone-number-YzmDmFBU.cjs.map} +1 -1
  169. package/dist/{popover-form-BsapHJck.mjs → popover-form-CeRVpy1B.mjs} +2 -2
  170. package/dist/{popover-form-BsapHJck.mjs.map → popover-form-CeRVpy1B.mjs.map} +1 -1
  171. package/dist/{popover-form-Bq2GcuZu.cjs → popover-form-Ch_iMMSm.cjs} +2 -2
  172. package/dist/{popover-form-Bq2GcuZu.cjs.map → popover-form-Ch_iMMSm.cjs.map} +1 -1
  173. package/dist/{progress-display-B4WVzdJw.cjs → progress-display-57LT7U37.cjs} +2 -2
  174. package/dist/{progress-display-B4WVzdJw.cjs.map → progress-display-57LT7U37.cjs.map} +1 -1
  175. package/dist/{progress-display-DZb1qjfY.mjs → progress-display-AfoHitiE.mjs} +2 -2
  176. package/dist/{progress-display-DZb1qjfY.mjs.map → progress-display-AfoHitiE.mjs.map} +1 -1
  177. package/dist/{radio-group-field-kTgtvp1p.cjs → radio-group-field-BFhBfzoT.cjs} +2 -2
  178. package/dist/{radio-group-field-kTgtvp1p.cjs.map → radio-group-field-BFhBfzoT.cjs.map} +1 -1
  179. package/dist/{radio-group-field-DOJ4jVSr.mjs → radio-group-field-Iwo2Q2Ig.mjs} +2 -2
  180. package/dist/{radio-group-field-DOJ4jVSr.mjs.map → radio-group-field-Iwo2Q2Ig.mjs.map} +1 -1
  181. package/dist/{resizable-D61lvcIL.d.cts → resizable-CNqPu4Ck.d.cts} +2 -2
  182. package/dist/{resizable-D61lvcIL.d.mts → resizable-CNqPu4Ck.d.mts} +2 -2
  183. package/dist/{select-field-CURv37h4.cjs → select-field-CvDBZQTl.cjs} +2 -2
  184. package/dist/{select-field-CURv37h4.cjs.map → select-field-CvDBZQTl.cjs.map} +1 -1
  185. package/dist/{select-field-BcsFBbNJ.mjs → select-field-NJgDDCO2.mjs} +2 -2
  186. package/dist/{select-field-BcsFBbNJ.mjs.map → select-field-NJgDDCO2.mjs.map} +1 -1
  187. package/dist/side-panel-DPrM5ygG.d.cts +86 -0
  188. package/dist/side-panel-DPrM5ygG.d.mts +86 -0
  189. package/dist/{simple-array-field-wFE_DUOV.mjs → simple-array-field-BwNCeUnn.mjs} +2 -2
  190. package/dist/{simple-array-field-wFE_DUOV.mjs.map → simple-array-field-BwNCeUnn.mjs.map} +1 -1
  191. package/dist/{simple-array-field-bCUuPMgT.cjs → simple-array-field-aGXkDZXD.cjs} +2 -2
  192. package/dist/{simple-array-field-bCUuPMgT.cjs.map → simple-array-field-aGXkDZXD.cjs.map} +1 -1
  193. package/dist/{simple-boolean-field-DRapzNrB.cjs → simple-boolean-field-BeVkn3c4.cjs} +2 -2
  194. package/dist/{simple-boolean-field-DRapzNrB.cjs.map → simple-boolean-field-BeVkn3c4.cjs.map} +1 -1
  195. package/dist/{simple-boolean-field-GQJyeyVS.mjs → simple-boolean-field-t_XDXqYs.mjs} +2 -2
  196. package/dist/{simple-boolean-field-GQJyeyVS.mjs.map → simple-boolean-field-t_XDXqYs.mjs.map} +1 -1
  197. package/dist/{simple-combobox-field-D6IaMJKl.mjs → simple-combobox-field-HCB4A33-.mjs} +2 -2
  198. package/dist/{simple-combobox-field-D6IaMJKl.mjs.map → simple-combobox-field-HCB4A33-.mjs.map} +1 -1
  199. package/dist/{simple-combobox-field-Cp5dfQv3.cjs → simple-combobox-field-U0ZAl7VQ.cjs} +2 -2
  200. package/dist/{simple-combobox-field-Cp5dfQv3.cjs.map → simple-combobox-field-U0ZAl7VQ.cjs.map} +1 -1
  201. package/dist/{simple-date-field-dszQs7Ik.mjs → simple-date-field-Dj4bJoji.mjs} +2 -2
  202. package/dist/{simple-date-field-dszQs7Ik.mjs.map → simple-date-field-Dj4bJoji.mjs.map} +1 -1
  203. package/dist/{simple-date-field-_PSkIXAt.cjs → simple-date-field-DtxEpEZj.cjs} +2 -2
  204. package/dist/{simple-date-field-_PSkIXAt.cjs.map → simple-date-field-DtxEpEZj.cjs.map} +1 -1
  205. package/dist/{simple-email-field-CwyoXqWo.mjs → simple-email-field-BDyhkmHV.mjs} +2 -2
  206. package/dist/{simple-email-field-CwyoXqWo.mjs.map → simple-email-field-BDyhkmHV.mjs.map} +1 -1
  207. package/dist/{simple-email-field-DIHwYrhk.cjs → simple-email-field-DK9I_Tc_.cjs} +2 -2
  208. package/dist/{simple-email-field-DIHwYrhk.cjs.map → simple-email-field-DK9I_Tc_.cjs.map} +1 -1
  209. package/dist/{simple-number-field-VdEeaIiC.cjs → simple-number-field-BspqWU-3.cjs} +2 -2
  210. package/dist/{simple-number-field-VdEeaIiC.cjs.map → simple-number-field-BspqWU-3.cjs.map} +1 -1
  211. package/dist/{simple-number-field-Id1kV5yR.mjs → simple-number-field-hneXMhfJ.mjs} +2 -2
  212. package/dist/{simple-number-field-Id1kV5yR.mjs.map → simple-number-field-hneXMhfJ.mjs.map} +1 -1
  213. package/dist/{simple-password-field-7xbVB1H3.cjs → simple-password-field-BEEcleom.cjs} +2 -2
  214. package/dist/{simple-password-field-7xbVB1H3.cjs.map → simple-password-field-BEEcleom.cjs.map} +1 -1
  215. package/dist/{simple-password-field-DIO9FwQy.mjs → simple-password-field-vsLRHDk4.mjs} +2 -2
  216. package/dist/{simple-password-field-DIO9FwQy.mjs.map → simple-password-field-vsLRHDk4.mjs.map} +1 -1
  217. package/dist/{simple-radio-group-field-BmHWRnns.mjs → simple-radio-group-field-BURm_BSA.mjs} +2 -2
  218. package/dist/{simple-radio-group-field-BmHWRnns.mjs.map → simple-radio-group-field-BURm_BSA.mjs.map} +1 -1
  219. package/dist/{simple-radio-group-field-CxVAr6yW.cjs → simple-radio-group-field-Wm8xB0fN.cjs} +2 -2
  220. package/dist/{simple-radio-group-field-CxVAr6yW.cjs.map → simple-radio-group-field-Wm8xB0fN.cjs.map} +1 -1
  221. package/dist/{simple-select-field-DfZk0zPa.mjs → simple-select-field-8cY51U4d.mjs} +2 -2
  222. package/dist/{simple-select-field-DfZk0zPa.mjs.map → simple-select-field-8cY51U4d.mjs.map} +1 -1
  223. package/dist/{simple-select-field-C9u7Pg9u.cjs → simple-select-field-QQ65caBf.cjs} +2 -2
  224. package/dist/{simple-select-field-C9u7Pg9u.cjs.map → simple-select-field-QQ65caBf.cjs.map} +1 -1
  225. package/dist/{simple-text-field-BxPjcB4c.cjs → simple-text-field-BHkCPiE5.cjs} +2 -2
  226. package/dist/{simple-text-field-BxPjcB4c.cjs.map → simple-text-field-BHkCPiE5.cjs.map} +1 -1
  227. package/dist/{simple-text-field-CT9KFUSK.mjs → simple-text-field-DK72_OA_.mjs} +2 -2
  228. package/dist/{simple-text-field-CT9KFUSK.mjs.map → simple-text-field-DK72_OA_.mjs.map} +1 -1
  229. package/dist/{simple-textarea-field-B22rT6zS.mjs → simple-textarea-field-B72nNQHv.mjs} +2 -2
  230. package/dist/{simple-textarea-field-B22rT6zS.mjs.map → simple-textarea-field-B72nNQHv.mjs.map} +1 -1
  231. package/dist/{simple-textarea-field-DG9oPtP-.cjs → simple-textarea-field-Bu5h7sfH.cjs} +2 -2
  232. package/dist/{simple-textarea-field-DG9oPtP-.cjs.map → simple-textarea-field-Bu5h7sfH.cjs.map} +1 -1
  233. package/dist/statistic-CXBTEgKI.cjs +2 -0
  234. package/dist/statistic-CXBTEgKI.cjs.map +1 -0
  235. package/dist/statistic-CvgurN5Z.mjs +2 -0
  236. package/dist/statistic-CvgurN5Z.mjs.map +1 -0
  237. package/dist/{status-display-CcihiYsH.mjs → status-display-Caae2aYf.mjs} +2 -2
  238. package/dist/{status-display-CcihiYsH.mjs.map → status-display-Caae2aYf.mjs.map} +1 -1
  239. package/dist/{status-display-DJ8fFqyX.cjs → status-display-EVwkPrm6.cjs} +2 -2
  240. package/dist/{status-display-DJ8fFqyX.cjs.map → status-display-EVwkPrm6.cjs.map} +1 -1
  241. package/dist/{summary-bar-C4loKj1L.mjs → summary-bar-B6B_wmZA.mjs} +2 -2
  242. package/dist/{summary-bar-C4loKj1L.mjs.map → summary-bar-B6B_wmZA.mjs.map} +1 -1
  243. package/dist/{summary-bar-DK8glsr4.cjs → summary-bar-D36n4fox.cjs} +2 -2
  244. package/dist/{summary-bar-DK8glsr4.cjs.map → summary-bar-D36n4fox.cjs.map} +1 -1
  245. package/dist/{switch-field-Cz4lDf1D.mjs → switch-field-DoPUWb9d.mjs} +2 -2
  246. package/dist/{switch-field-Cz4lDf1D.mjs.map → switch-field-DoPUWb9d.mjs.map} +1 -1
  247. package/dist/{switch-field-yE4A6EoF.cjs → switch-field-eLVlQZSI.cjs} +2 -2
  248. package/dist/{switch-field-yE4A6EoF.cjs.map → switch-field-eLVlQZSI.cjs.map} +1 -1
  249. package/dist/tables-CuoBQNqx.mjs +2 -0
  250. package/dist/tables-CuoBQNqx.mjs.map +1 -0
  251. package/dist/tables-DdLEj1dI.cjs +2 -0
  252. package/dist/tables-DdLEj1dI.cjs.map +1 -0
  253. package/dist/{tanstack-form-BxqS40rB.cjs → tanstack-form-C0ab8EEl.cjs} +2 -2
  254. package/dist/{tanstack-form-BxqS40rB.cjs.map → tanstack-form-C0ab8EEl.cjs.map} +1 -1
  255. package/dist/{tanstack-form-q9hDCc0Y.mjs → tanstack-form-fkaBh9RO.mjs} +2 -2
  256. package/dist/{tanstack-form-q9hDCc0Y.mjs.map → tanstack-form-fkaBh9RO.mjs.map} +1 -1
  257. package/dist/{text-editor-field-CQ8tnZFw.mjs → text-editor-field-B6HEsAHt.mjs} +2 -2
  258. package/dist/{text-editor-field-CQ8tnZFw.mjs.map → text-editor-field-B6HEsAHt.mjs.map} +1 -1
  259. package/dist/{text-editor-field-CxU-KMMn.cjs → text-editor-field-DcEUC0iH.cjs} +2 -2
  260. package/dist/{text-editor-field-CxU-KMMn.cjs.map → text-editor-field-DcEUC0iH.cjs.map} +1 -1
  261. package/dist/{text-field-B3xlvEUN.mjs → text-field-Bm-k6Jr7.mjs} +2 -2
  262. package/dist/{text-field-B3xlvEUN.mjs.map → text-field-Bm-k6Jr7.mjs.map} +1 -1
  263. package/dist/{text-field-BQovKYN-.cjs → text-field-DT50dOVI.cjs} +2 -2
  264. package/dist/{text-field-BQovKYN-.cjs.map → text-field-DT50dOVI.cjs.map} +1 -1
  265. package/dist/{textarea-field-B38SnNv4.cjs → textarea-field-BhqX29CS.cjs} +2 -2
  266. package/dist/{textarea-field-B38SnNv4.cjs.map → textarea-field-BhqX29CS.cjs.map} +1 -1
  267. package/dist/{textarea-field-u2UUwtr_.mjs → textarea-field-DNLyrRH7.mjs} +2 -2
  268. package/dist/{textarea-field-u2UUwtr_.mjs.map → textarea-field-DNLyrRH7.mjs.map} +1 -1
  269. package/dist/{tooltip-CLjCwnTD.cjs → tooltip-CUyGXE9e.cjs} +3 -3
  270. package/dist/{tooltip-CLjCwnTD.cjs.map → tooltip-CUyGXE9e.cjs.map} +1 -1
  271. package/dist/{tooltip-BKcU3bMc.mjs → tooltip-DSxSeIak.mjs} +3 -3
  272. package/dist/{tooltip-BKcU3bMc.mjs.map → tooltip-DSxSeIak.mjs.map} +1 -1
  273. package/dist/typography/paragraph.d.cts +1 -1
  274. package/dist/typography/paragraph.d.mts +1 -1
  275. package/dist/ui/alert-dialog.cjs +1 -1
  276. package/dist/ui/alert-dialog.cjs.map +1 -1
  277. package/dist/ui/alert-dialog.mjs +1 -1
  278. package/dist/ui/alert-dialog.mjs.map +1 -1
  279. package/dist/ui/badge.cjs +1 -1
  280. package/dist/ui/badge.cjs.map +1 -1
  281. package/dist/ui/badge.d.cts +2 -2
  282. package/dist/ui/badge.d.mts +2 -2
  283. package/dist/ui/badge.mjs +1 -1
  284. package/dist/ui/badge.mjs.map +1 -1
  285. package/dist/ui/button.d.cts +1 -1
  286. package/dist/ui/button.d.mts +1 -1
  287. package/dist/ui/calendar.d.cts +1 -1
  288. package/dist/ui/calendar.d.mts +1 -1
  289. package/dist/ui/carousel.d.cts +1 -1
  290. package/dist/ui/carousel.d.mts +1 -1
  291. package/dist/ui/combobox.cjs +1 -1
  292. package/dist/ui/combobox.mjs +1 -1
  293. package/dist/ui/dialog.cjs +1 -1
  294. package/dist/ui/dialog.cjs.map +1 -1
  295. package/dist/ui/dialog.mjs +1 -1
  296. package/dist/ui/dialog.mjs.map +1 -1
  297. package/dist/ui/pagination.d.cts +1 -1
  298. package/dist/ui/pagination.d.mts +1 -1
  299. package/dist/ui/resizable.d.cts +1 -1
  300. package/dist/ui/resizable.d.mts +1 -1
  301. package/dist/ui/sheet.cjs +1 -1
  302. package/dist/ui/sheet.cjs.map +1 -1
  303. package/dist/ui/sheet.mjs +1 -1
  304. package/dist/ui/sheet.mjs.map +1 -1
  305. package/dist/ui-grid-D1-Ponqs.d.cts +128 -0
  306. package/dist/ui-grid-D1-Ponqs.d.mts +128 -0
  307. package/package.json +10 -3
  308. package/ai-docs.md +0 -419
  309. package/dist/combobox-C64Rvd7n.mjs +0 -2
  310. package/dist/combobox-kp_kPY8o.cjs +0 -2
  311. package/dist/currency-display-BGkpGtN_.mjs +0 -2
  312. package/dist/currency-display-BGkpGtN_.mjs.map +0 -1
  313. package/dist/currency-display-Bbh5InhV.cjs +0 -2
  314. package/dist/currency-display-Bbh5InhV.cjs.map +0 -1
  315. package/dist/features/descriptions/index.cjs.map +0 -1
  316. package/dist/features/descriptions/index.mjs.map +0 -1
  317. package/dist/index-BSj8azta.d.cts +0 -236
  318. package/dist/index-CEmVk1zP.d.mts +0 -236
  319. package/dist/payment-layout-DDcLanA0.cjs +0 -2
  320. package/dist/statistic-DoNUSe3e.mjs +0 -2
  321. package/dist/statistic-DoNUSe3e.mjs.map +0 -1
  322. package/dist/statistic-wnnjHsKj.cjs +0 -2
  323. package/dist/statistic-wnnjHsKj.cjs.map +0 -1
  324. package/dist/tables-BTBtN1di.mjs +0 -2
  325. package/dist/tables-BTBtN1di.mjs.map +0 -1
  326. package/dist/tables-BzP8Cnvh.cjs +0 -2
  327. package/dist/tables-BzP8Cnvh.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-CLjCwnTD.cjs","names":["Input","SearchIcon","ArrowRightIcon","useUITableContext","useUITableAnalysisContext","useUITableSummaryContext","CirclePlus","CopyPlusIcon","RefreshCwIcon","DownloadIcon","LayoutDashboardIcon","BarChart2Icon"],"sources":["../packages/components/features/tables/utils/csv.ts","../packages/components/features/tables/components/table/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { CsvCell } from '../types';\n\nfunction formatCell(value: CsvCell['value']): string {\n if (value === null || value === undefined) return '';\n if (typeof value === 'number') return String(value);\n if (typeof value === 'boolean') return value ? 'true' : 'false';\n const str = String(value);\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n return str;\n}\n\nexport function buildCsvContent(rows: CsvCell[][]): string {\n if (rows.length === 0) return '';\n const headers = rows[0].map(cell => formatCell(cell.label));\n const dataRows = rows.map(row => row.map(cell => formatCell(cell.value)).join(','));\n return [headers.join(','), ...dataRows].join('\\n');\n}\n\nexport function downloadCsv(rows: CsvCell[][], fileName: string): void {\n const content = buildCsvContent(rows);\n if (!content) return;\n const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = `${fileName}.csv`;\n link.click();\n URL.revokeObjectURL(url);\n}\n","/**\n * @file tooltip.tsx\n * Toolbar components rendered above the table: a debounced search input,\n * an action button group (create / refresh / download), and the outer\n * toolbar shell that displays the table title.\n */\nimport { useCallback } from 'react';\n\nimport { ArrowRightIcon, BarChart2Icon, CirclePlus, CopyPlusIcon, DownloadIcon, LayoutDashboardIcon, RefreshCwIcon, SearchIcon } from 'lucide-react';\n\nimport { useDebounceCallback } from '@customafk/react-toolkit/hooks/useDebounceCallback';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useUITableAnalysisContext, useUITableContext, useUITableSummaryContext } from '../../hooks/use-context';\nimport { downloadCsv } from '../../utils/csv';\n\n/**\n * Debounced search input rendered inside the table toolbar.\n *\n * Fires `onSearch` 500 ms after the user stops typing and delegates all other\n * native input events via the spread `props`.\n *\n * @example\n * ```tsx\n * import { UITableTooltipFilter } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipFilter\n * placeholder=\"Search users…\"\n * onSearch={value => setQuery(value)}\n * />\n * ```\n */\nexport const UITableTooltipFilter: React.FC<\n Omit<React.ComponentProps<typeof Input>, 'className'> & {\n onSearch?: (value: string) => void;\n }\n> = ({ onSearch, onChange, ...props }) => {\n const debouncedSearch = useDebounceCallback((value: string) => {\n onSearch?.(value);\n }, 500);\n return (\n <div className=\"relative w-full max-w-80 flex-1\">\n <Input\n {...props}\n size=\"lg\"\n type=\"search\"\n placeholder=\"Tìm kiếm...\"\n className=\"flex-1 ps-9 pe-9\"\n onChange={e => {\n onChange?.(e);\n debouncedSearch(e.target.value ?? '');\n }}\n />\n <div className=\"pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50\">\n <SearchIcon size={16} />\n </div>\n <button\n className=\"absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Submit search\"\n type=\"submit\"\n >\n <ArrowRightIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n );\n};\n\nconst ActionButton: React.FC<React.PropsWithChildren<React.ComponentProps<'button'>>> = ({ children, disabled, onClick, className, ...props }) => {\n return (\n <button\n type=\"button\"\n disabled={disabled}\n className={cn(\n 'flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5',\n className\n )}\n onClick={onClick}\n {...props}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Grouped action buttons (create, refresh, download) displayed in the table\n * toolbar.\n *\n * Each button is disabled automatically when the corresponding handler prop is\n * omitted, so only the actions relevant to a given table need to be provided.\n * A toggle for `UITableSummaryBar` appears automatically when `summary` is\n * non-empty, and a toggle for `UITableAnalysisPanel` appears when\n * `showAnalysisPanel` is `true` (both set on `UITableProvider`).\n * `onCreateMultiple` renders a separate \"bulk create\" button next to the\n * single-item create button; omit it to hide the button entirely.\n *\n * @example\n * ```tsx\n * import { UITableTooltipActions } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipActions\n * onCreate={() => setOpenCreate(true)}\n * onCreateMultiple={() => setOpenBulkCreate(true)}\n * onRefresh={() => refetch()}\n * />\n * ```\n */\nexport const UITableTooltipActions: React.FC<{\n onCreate?: () => void;\n onCreateMultiple?: () => void;\n onRefresh?: () => void;\n onDownload?: () => void;\n}> = ({ onCreate, onCreateMultiple, onDownload, onRefresh }) => {\n const { table, csvData, csvFileName, title, showAnalysisPanel, summary } = useUITableContext();\n const { isOpen: isAnalysisOpen, toggle: toggleAnalysis } = useUITableAnalysisContext();\n const { isOpen: isSummaryOpen, toggle: toggleSummary } = useUITableSummaryContext();\n\n const handleDownload = useCallback(() => {\n if (onDownload) {\n onDownload();\n return;\n }\n if (!csvData || csvData.length === 0) return;\n const selectedRows = table.getSelectedRowModel().flatRows;\n const rows = selectedRows.length > 0 ? selectedRows.map(row => csvData[row.index]).filter(Boolean) : csvData;\n downloadCsv(rows, csvFileName || title);\n }, [onDownload, csvData, csvFileName, table, title]);\n\n const isDownloadEnabled = !!(onDownload || (csvData && csvData.length > 0));\n\n return (\n <div className=\"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\">\n <ActionButton\n disabled={!onCreate}\n aria-label=\"Tạo mới\"\n onClick={e => {\n onCreate?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CirclePlus />\n </ActionButton>\n <ActionButton\n disabled={!onCreateMultiple}\n aria-label=\"Tạo nhiều\"\n onClick={e => {\n onCreateMultiple?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CopyPlusIcon />\n </ActionButton>\n <ActionButton\n disabled={!onRefresh}\n aria-label=\"Làm mới\"\n onClick={e => {\n onRefresh?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <RefreshCwIcon />\n </ActionButton>\n <ActionButton\n disabled={!isDownloadEnabled}\n aria-label=\"Tải xuống\"\n onClick={e => {\n handleDownload();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <DownloadIcon />\n </ActionButton>\n {summary && summary.length > 0 && (\n <ActionButton\n onClick={e => {\n toggleSummary();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isSummaryOpen}\n aria-label={isSummaryOpen ? 'Ẩn tổng quan' : 'Hiện tổng quan'}\n className={isSummaryOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <LayoutDashboardIcon />\n </ActionButton>\n )}\n {showAnalysisPanel && (\n <ActionButton\n onClick={e => {\n toggleAnalysis();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isAnalysisOpen}\n className={isAnalysisOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <BarChart2Icon />\n </ActionButton>\n )}\n </div>\n );\n};\n\n/**\n * Outer toolbar shell for the UITable component.\n *\n * Reads the table `title` from `UITableContext` and renders it as a heading\n * above the `children` slot, which typically contains a\n * `UITableTooltipFilter` and/or `UITableTooltipActions`.\n *\n * @example\n * ```tsx\n * import {\n * UITableTooltip,\n * UITableTooltipFilter,\n * UITableTooltipActions,\n * } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltip>\n * <UITableTooltipFilter onSearch={setQuery} />\n * <UITableTooltipActions onCreate={handleCreate} onRefresh={refetch} />\n * </UITableTooltip>\n * ```\n */\nexport const UITableTooltip: React.FC<React.PropsWithChildren> = ({ children }) => {\n const { title, description, headerActions } = useUITableContext();\n return (\n <div data-slot=\"table-tooltip\" className=\"relative flex w-full flex-col gap-2 px-2 py-0 text-sm\">\n <div className=\"flex w-full items-start justify-between gap-4\">\n <div className=\"flex flex-col gap-0.5\">\n <h3 className=\"font-semibold text-base text-text-positive\">{title}</h3>\n {!!description && <p className=\"text-muted-foreground text-sm\">{description}</p>}\n </div>\n {!!headerActions && <div className=\"flex shrink-0 items-center gap-2\">{headerActions}</div>}\n </div>\n <div className=\"flex w-full flex-1 justify-between gap-x-2\">{children}</div>\n </div>\n );\n};\nUITableTooltip.displayName = 'UITableTooltip';\n"],"mappings":"iQAIA,SAAS,EAAW,EAAiC,CACnD,GAAI,GAAU,KAA6B,MAAO,GAClD,GAAI,OAAO,GAAU,SAAU,OAAO,OAAO,CAAK,EAClD,GAAI,OAAO,GAAU,UAAW,OAAO,EAAQ,OAAS,QACxD,IAAM,EAAM,OAAO,CAAK,EAIxB,OAHI,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS;CAAI,GAAK,EAAI,SAAS,IAAI,EAC5E,IAAI,EAAI,QAAQ,KAAM,IAAI,EAAE,GAE9B,CACT,CAEA,SAAgB,EAAgB,EAA2B,CACzD,GAAI,EAAK,SAAW,EAAG,MAAO,GAC9B,IAAM,EAAU,EAAK,EAAE,CAAC,IAAI,GAAQ,EAAW,EAAK,KAAK,CAAC,EACpD,EAAW,EAAK,IAAI,GAAO,EAAI,IAAI,GAAQ,EAAW,EAAK,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,EAClF,MAAO,CAAC,EAAQ,KAAK,GAAG,EAAG,GAAG,CAAQ,CAA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gCAAiC,SAAA,CAAe,CAAA,CAC5E,CACJ,CAAA,EAAA,CAAC,CAAC,IAAiB,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mCAAoC,SAAA,CAAmB,CAAA,CACvF,CACL,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6CAA8C,UAAc,CAAA,CACxE,GAET,EACA,EAAe,YAAc"}
1
+ {"version":3,"file":"tooltip-CUyGXE9e.cjs","names":["Input","SearchIcon","ArrowRightIcon","useUITableContext","useUITableAnalysisContext","useUITableSummaryContext","CirclePlus","CopyPlusIcon","RefreshCwIcon","DownloadIcon","LayoutDashboardIcon","BarChart2Icon"],"sources":["../packages/components/features/tables/utils/csv.ts","../packages/components/features/tables/components/table/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { CsvCell } from '../types';\n\nfunction formatCell(value: CsvCell['value']): string {\n if (value === null || value === undefined) return '';\n if (typeof value === 'number') return String(value);\n if (typeof value === 'boolean') return value ? 'true' : 'false';\n const str = String(value);\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n return str;\n}\n\nexport function buildCsvContent(rows: CsvCell[][]): string {\n if (rows.length === 0) return '';\n const headers = rows[0].map(cell => formatCell(cell.label));\n const dataRows = rows.map(row => row.map(cell => formatCell(cell.value)).join(','));\n return [headers.join(','), ...dataRows].join('\\n');\n}\n\nexport function downloadCsv(rows: CsvCell[][], fileName: string): void {\n const content = buildCsvContent(rows);\n if (!content) return;\n const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = `${fileName}.csv`;\n link.click();\n URL.revokeObjectURL(url);\n}\n","/**\n * @file tooltip.tsx\n * Toolbar components rendered above the table: a debounced search input,\n * an action button group (create / refresh / download), and the outer\n * toolbar shell that displays the table title.\n */\nimport { useCallback } from 'react';\n\nimport { ArrowRightIcon, BarChart2Icon, CirclePlus, CopyPlusIcon, DownloadIcon, LayoutDashboardIcon, RefreshCwIcon, SearchIcon } from 'lucide-react';\n\nimport { useDebounceCallback } from '@customafk/react-toolkit/hooks/useDebounceCallback';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useUITableAnalysisContext, useUITableContext, useUITableSummaryContext } from '../../hooks/use-context';\nimport { downloadCsv } from '../../utils/csv';\n\n/**\n * Debounced search input rendered inside the table toolbar.\n *\n * Fires `onSearch` 500 ms after the user stops typing and delegates all other\n * native input events via the spread `props`.\n *\n * @example\n * ```tsx\n * import { UITableTooltipFilter } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipFilter\n * placeholder=\"Search users…\"\n * onSearch={value => setQuery(value)}\n * />\n * ```\n */\nexport const UITableTooltipFilter: React.FC<\n Omit<React.ComponentProps<typeof Input>, 'className'> & {\n onSearch?: (value: string) => void;\n }\n> = ({ onSearch, onChange, ...props }) => {\n const debouncedSearch = useDebounceCallback((value: string) => {\n onSearch?.(value);\n }, 500);\n return (\n <div className=\"relative w-full max-w-80 flex-1\">\n <Input\n {...props}\n size=\"lg\"\n type=\"search\"\n placeholder=\"Tìm kiếm...\"\n className=\"flex-1 ps-9 pe-9\"\n onChange={e => {\n onChange?.(e);\n debouncedSearch(e.target.value ?? '');\n }}\n />\n <div className=\"pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50\">\n <SearchIcon size={16} />\n </div>\n <button\n className=\"absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Submit search\"\n type=\"submit\"\n >\n <ArrowRightIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n );\n};\n\nconst ActionButton: React.FC<React.PropsWithChildren<React.ComponentProps<'button'>>> = ({ children, disabled, onClick, className, ...props }) => {\n return (\n <button\n type=\"button\"\n disabled={disabled}\n className={cn(\n 'flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5',\n className\n )}\n onClick={onClick}\n {...props}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Grouped action buttons (create, refresh, download) displayed in the table\n * toolbar.\n *\n * Each button is disabled automatically when the corresponding handler prop is\n * omitted, so only the actions relevant to a given table need to be provided.\n * A toggle for `UITableSummaryBar` appears automatically when `summary` is\n * non-empty, and a toggle for `UITableAnalysisPanel` appears when\n * `showAnalysisPanel` is `true` (both set on `UITableProvider`).\n * `onCreateMultiple` renders a separate \"bulk create\" button next to the\n * single-item create button; omit it to hide the button entirely.\n *\n * @example\n * ```tsx\n * import { UITableTooltipActions } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipActions\n * onCreate={() => setOpenCreate(true)}\n * onCreateMultiple={() => setOpenBulkCreate(true)}\n * onRefresh={() => refetch()}\n * />\n * ```\n */\nexport const UITableTooltipActions: React.FC<{\n onCreate?: () => void;\n onCreateMultiple?: () => void;\n onRefresh?: () => void;\n onDownload?: () => void;\n}> = ({ onCreate, onCreateMultiple, onDownload, onRefresh }) => {\n const { table, csvData, csvFileName, title, showAnalysisPanel, summary } = useUITableContext();\n const { isOpen: isAnalysisOpen, toggle: toggleAnalysis } = useUITableAnalysisContext();\n const { isOpen: isSummaryOpen, toggle: toggleSummary } = useUITableSummaryContext();\n\n const handleDownload = useCallback(() => {\n if (onDownload) {\n onDownload();\n return;\n }\n if (!csvData || csvData.length === 0) return;\n const selectedRows = table.getSelectedRowModel().flatRows;\n const rows = selectedRows.length > 0 ? selectedRows.map(row => csvData[row.index]).filter(Boolean) : csvData;\n downloadCsv(rows, csvFileName || title);\n }, [onDownload, csvData, csvFileName, table, title]);\n\n const isDownloadEnabled = !!(onDownload || (csvData && csvData.length > 0));\n\n return (\n <div className=\"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\">\n <ActionButton\n disabled={!onCreate}\n aria-label=\"Tạo mới\"\n onClick={e => {\n onCreate?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CirclePlus />\n </ActionButton>\n <ActionButton\n disabled={!onCreateMultiple}\n aria-label=\"Tạo nhiều\"\n onClick={e => {\n onCreateMultiple?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CopyPlusIcon />\n </ActionButton>\n <ActionButton\n disabled={!onRefresh}\n aria-label=\"Làm mới\"\n onClick={e => {\n onRefresh?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <RefreshCwIcon />\n </ActionButton>\n <ActionButton\n disabled={!isDownloadEnabled}\n aria-label=\"Tải xuống\"\n onClick={e => {\n handleDownload();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <DownloadIcon />\n </ActionButton>\n {summary && summary.length > 0 && (\n <ActionButton\n onClick={e => {\n toggleSummary();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isSummaryOpen}\n aria-label={isSummaryOpen ? 'Ẩn tổng quan' : 'Hiện tổng quan'}\n className={isSummaryOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <LayoutDashboardIcon />\n </ActionButton>\n )}\n {showAnalysisPanel && (\n <ActionButton\n onClick={e => {\n toggleAnalysis();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isAnalysisOpen}\n className={isAnalysisOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <BarChart2Icon />\n </ActionButton>\n )}\n </div>\n );\n};\n\n/**\n * Outer toolbar shell for the UITable component.\n *\n * Reads the table `title` from `UITableContext` and renders it as a heading\n * above the `children` slot, which typically contains a\n * `UITableTooltipFilter` and/or `UITableTooltipActions`.\n *\n * @example\n * ```tsx\n * import {\n * UITableTooltip,\n * UITableTooltipFilter,\n * UITableTooltipActions,\n * } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltip>\n * <UITableTooltipFilter onSearch={setQuery} />\n * <UITableTooltipActions onCreate={handleCreate} onRefresh={refetch} />\n * </UITableTooltip>\n * ```\n */\nexport const UITableTooltip: React.FC<React.PropsWithChildren> = ({ children }) => {\n const { title, description, headerActions } = useUITableContext();\n return (\n <div data-slot=\"table-tooltip\" className=\"relative grid w-full grid-cols-1 gap-2 px-2 py-0 text-sm\">\n <div className=\"grid w-full grid-cols-[1fr_auto] items-start gap-4\">\n <div className=\"grid grid-cols-1 gap-0.5\">\n <h3 className=\"font-semibold text-base text-text-positive\">{title}</h3>\n {!!description && <p className=\"text-muted-foreground text-sm\">{description}</p>}\n </div>\n {!!headerActions && <div className=\"flex shrink-0 items-center gap-2\">{headerActions}</div>}\n </div>\n <div className=\"grid w-full grid-cols-[1fr_auto] gap-x-2\">{children}</div>\n </div>\n );\n};\nUITableTooltip.displayName = 'UITableTooltip';\n"],"mappings":"iQAIA,SAAS,EAAW,EAAiC,CACnD,GAAI,GAAU,KAA6B,MAAO,GAClD,GAAI,OAAO,GAAU,SAAU,OAAO,OAAO,CAAK,EAClD,GAAI,OAAO,GAAU,UAAW,OAAO,EAAQ,OAAS,QACxD,IAAM,EAAM,OAAO,CAAK,EAIxB,OAHI,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS;CAAI,GAAK,EAAI,SAAS,IAAI,EAC5E,IAAI,EAAI,QAAQ,KAAM,IAAI,EAAE,GAE9B,CACT,CAEA,SAAgB,EAAgB,EAA2B,CACzD,GAAI,EAAK,SAAW,EAAG,MAAO,GAC9B,IAAM,EAAU,EAAK,EAAE,CAAC,IA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ACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,2BAAf,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,6CAA8C,SAAA,CAAU,CAAA,EACrE,CAAC,CAAC,IAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,gCAAiC,SAAA,CAAe,CAAA,CAC5E,CACJ,CAAA,EAAA,CAAC,CAAC,IAAiB,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mCAAoC,SAAA,CAAmB,CAAA,CACvF,CACL,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,2CAA4C,UAAc,CAAA,CACtE,GAET,EACA,EAAe,YAAc"}
@@ -1,4 +1,4 @@
1
- import{Y as e,Z as t,q as n}from"./tables-BTBtN1di.mjs";import{Input as r}from"./ui/input.mjs";import{ArrowRightIcon as i,BarChart2Icon as a,CirclePlus as o,CopyPlusIcon as s,DownloadIcon as c,LayoutDashboardIcon as l,RefreshCwIcon as u,SearchIcon as d}from"lucide-react";import{useCallback as f}from"react";import{cn as p}from"@customafk/react-toolkit/utils";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useDebounceCallback as g}from"@customafk/react-toolkit/hooks/useDebounceCallback";function _(e){if(e==null)return``;if(typeof e==`number`)return String(e);if(typeof e==`boolean`)return e?`true`:`false`;let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
1
+ import{Input as e}from"./ui/input.mjs";import{Y as t,Z as n,q as r}from"./tables-CuoBQNqx.mjs";import{ArrowRightIcon as i,BarChart2Icon as a,CirclePlus as o,CopyPlusIcon as s,DownloadIcon as c,LayoutDashboardIcon as l,RefreshCwIcon as u,SearchIcon as d}from"lucide-react";import{useCallback as f}from"react";import{cn as p}from"@customafk/react-toolkit/utils";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useDebounceCallback as g}from"@customafk/react-toolkit/hooks/useDebounceCallback";function _(e){if(e==null)return``;if(typeof e==`number`)return String(e);if(typeof e==`boolean`)return e?`true`:`false`;let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
2
2
  `)||t.includes(`\r`)?`"${t.replace(/"/g,`""`)}"`:t}function v(e){if(e.length===0)return``;let t=e[0].map(e=>_(e.label)),n=e.map(e=>e.map(e=>_(e.value)).join(`,`));return[t.join(`,`),...n].join(`
3
- `)}function y(e,t){let n=v(e);if(!n)return;let r=new Blob([n],{type:`text/csv;charset=utf-8;`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${t}.csv`,a.click(),URL.revokeObjectURL(i)}const b=({onSearch:e,onChange:t,...n})=>{let a=g(t=>{e?.(t)},500);return h(`div`,{className:`relative w-full max-w-80 flex-1`,children:[m(r,{...n,size:`lg`,type:`search`,placeholder:`Tìm kiếm...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{t?.(e),a(e.target.value??``)}}),m(`div`,{className:`pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:m(d,{size:16})}),m(`button`,{className:`absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:m(i,{size:16,"aria-hidden":`true`})})]})},x=({children:e,disabled:t,onClick:n,className:r,...i})=>m(`button`,{type:`button`,disabled:t,className:p(`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,r),onClick:n,...i,children:e}),S=({onCreate:r,onCreateMultiple:i,onDownload:d,onRefresh:p})=>{let{table:g,csvData:_,csvFileName:v,title:b,showAnalysisPanel:S,summary:C}=e(),{isOpen:w,toggle:T}=n(),{isOpen:E,toggle:D}=t(),O=f(()=>{if(d){d();return}if(!_||_.length===0)return;let e=g.getSelectedRowModel().flatRows;y(e.length>0?e.map(e=>_[e.index]).filter(Boolean):_,v||b)},[d,_,v,g,b]),k=!!(d||_&&_.length>0);return h(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[m(x,{disabled:!r,"aria-label":`Tạo mới`,onClick:e=>{r?.(),e.stopPropagation(),e.preventDefault()},children:m(o,{})}),m(x,{disabled:!i,"aria-label":`Tạo nhiều`,onClick:e=>{i?.(),e.stopPropagation(),e.preventDefault()},children:m(s,{})}),m(x,{disabled:!p,"aria-label":`Làm mới`,onClick:e=>{p?.(),e.stopPropagation(),e.preventDefault()},children:m(u,{})}),m(x,{disabled:!k,"aria-label":`Tải xuống`,onClick:e=>{O(),e.stopPropagation(),e.preventDefault()},children:m(c,{})}),C&&C.length>0&&m(x,{onClick:e=>{D(),e.stopPropagation(),e.preventDefault()},"aria-pressed":E,"aria-label":E?`Ẩn tổng quan`:`Hiện tổng quan`,className:E?`bg-muted-muted text-text-positive`:void 0,children:m(l,{})}),S&&m(x,{onClick:e=>{T(),e.stopPropagation(),e.preventDefault()},"aria-pressed":w,className:w?`bg-muted-muted text-text-positive`:void 0,children:m(a,{})})]})},C=({children:t})=>{let{title:n,description:r,headerActions:i}=e();return h(`div`,{"data-slot":`table-tooltip`,className:`relative flex w-full flex-col gap-2 px-2 py-0 text-sm`,children:[h(`div`,{className:`flex w-full items-start justify-between gap-4`,children:[h(`div`,{className:`flex flex-col gap-0.5`,children:[m(`h3`,{className:`font-semibold text-base text-text-positive`,children:n}),!!r&&m(`p`,{className:`text-muted-foreground text-sm`,children:r})]}),!!i&&m(`div`,{className:`flex shrink-0 items-center gap-2`,children:i})]}),m(`div`,{className:`flex w-full flex-1 justify-between gap-x-2`,children:t})]})};C.displayName=`UITableTooltip`;export{C as UITableTooltip,S as UITableTooltipActions,b as UITableTooltipFilter};
4
- //# sourceMappingURL=tooltip-BKcU3bMc.mjs.map
3
+ `)}function y(e,t){let n=v(e);if(!n)return;let r=new Blob([n],{type:`text/csv;charset=utf-8;`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${t}.csv`,a.click(),URL.revokeObjectURL(i)}const b=({onSearch:t,onChange:n,...r})=>{let a=g(e=>{t?.(e)},500);return h(`div`,{className:`relative w-full max-w-80 flex-1`,children:[m(e,{...r,size:`lg`,type:`search`,placeholder:`Tìm kiếm...`,className:`flex-1 ps-9 pe-9`,onChange:e=>{n?.(e),a(e.target.value??``)}}),m(`div`,{className:`pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50`,children:m(d,{size:16})}),m(`button`,{className:`absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Submit search`,type:`submit`,children:m(i,{size:16,"aria-hidden":`true`})})]})},x=({children:e,disabled:t,onClick:n,className:r,...i})=>m(`button`,{type:`button`,disabled:t,className:p(`flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5`,r),onClick:n,...i,children:e}),S=({onCreate:e,onCreateMultiple:i,onDownload:d,onRefresh:p})=>{let{table:g,csvData:_,csvFileName:v,title:b,showAnalysisPanel:S,summary:C}=t(),{isOpen:w,toggle:T}=r(),{isOpen:E,toggle:D}=n(),O=f(()=>{if(d){d();return}if(!_||_.length===0)return;let e=g.getSelectedRowModel().flatRows;y(e.length>0?e.map(e=>_[e.index]).filter(Boolean):_,v||b)},[d,_,v,g,b]),k=!!(d||_&&_.length>0);return h(`div`,{className:`flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,children:[m(x,{disabled:!e,"aria-label":`Tạo mới`,onClick:t=>{e?.(),t.stopPropagation(),t.preventDefault()},children:m(o,{})}),m(x,{disabled:!i,"aria-label":`Tạo nhiều`,onClick:e=>{i?.(),e.stopPropagation(),e.preventDefault()},children:m(s,{})}),m(x,{disabled:!p,"aria-label":`Làm mới`,onClick:e=>{p?.(),e.stopPropagation(),e.preventDefault()},children:m(u,{})}),m(x,{disabled:!k,"aria-label":`Tải xuống`,onClick:e=>{O(),e.stopPropagation(),e.preventDefault()},children:m(c,{})}),C&&C.length>0&&m(x,{onClick:e=>{D(),e.stopPropagation(),e.preventDefault()},"aria-pressed":E,"aria-label":E?`Ẩn tổng quan`:`Hiện tổng quan`,className:E?`bg-muted-muted text-text-positive`:void 0,children:m(l,{})}),S&&m(x,{onClick:e=>{T(),e.stopPropagation(),e.preventDefault()},"aria-pressed":w,className:w?`bg-muted-muted text-text-positive`:void 0,children:m(a,{})})]})},C=({children:e})=>{let{title:n,description:r,headerActions:i}=t();return h(`div`,{"data-slot":`table-tooltip`,className:`relative grid w-full grid-cols-1 gap-2 px-2 py-0 text-sm`,children:[h(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-start gap-4`,children:[h(`div`,{className:`grid grid-cols-1 gap-0.5`,children:[m(`h3`,{className:`font-semibold text-base text-text-positive`,children:n}),!!r&&m(`p`,{className:`text-muted-foreground text-sm`,children:r})]}),!!i&&m(`div`,{className:`flex shrink-0 items-center gap-2`,children:i})]}),m(`div`,{className:`grid w-full grid-cols-[1fr_auto] gap-x-2`,children:e})]})};C.displayName=`UITableTooltip`;export{C as UITableTooltip,S as UITableTooltipActions,b as UITableTooltipFilter};
4
+ //# sourceMappingURL=tooltip-DSxSeIak.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-BKcU3bMc.mjs","names":[],"sources":["../packages/components/features/tables/utils/csv.ts","../packages/components/features/tables/components/table/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { CsvCell } from '../types';\n\nfunction formatCell(value: CsvCell['value']): string {\n if (value === null || value === undefined) return '';\n if (typeof value === 'number') return String(value);\n if (typeof value === 'boolean') return value ? 'true' : 'false';\n const str = String(value);\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n return str;\n}\n\nexport function buildCsvContent(rows: CsvCell[][]): string {\n if (rows.length === 0) return '';\n const headers = rows[0].map(cell => formatCell(cell.label));\n const dataRows = rows.map(row => row.map(cell => formatCell(cell.value)).join(','));\n return [headers.join(','), ...dataRows].join('\\n');\n}\n\nexport function downloadCsv(rows: CsvCell[][], fileName: string): void {\n const content = buildCsvContent(rows);\n if (!content) return;\n const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = `${fileName}.csv`;\n link.click();\n URL.revokeObjectURL(url);\n}\n","/**\n * @file tooltip.tsx\n * Toolbar components rendered above the table: a debounced search input,\n * an action button group (create / refresh / download), and the outer\n * toolbar shell that displays the table title.\n */\nimport { useCallback } from 'react';\n\nimport { ArrowRightIcon, BarChart2Icon, CirclePlus, CopyPlusIcon, DownloadIcon, LayoutDashboardIcon, RefreshCwIcon, SearchIcon } from 'lucide-react';\n\nimport { useDebounceCallback } from '@customafk/react-toolkit/hooks/useDebounceCallback';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useUITableAnalysisContext, useUITableContext, useUITableSummaryContext } from '../../hooks/use-context';\nimport { downloadCsv } from '../../utils/csv';\n\n/**\n * Debounced search input rendered inside the table toolbar.\n *\n * Fires `onSearch` 500 ms after the user stops typing and delegates all other\n * native input events via the spread `props`.\n *\n * @example\n * ```tsx\n * import { UITableTooltipFilter } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipFilter\n * placeholder=\"Search users…\"\n * onSearch={value => setQuery(value)}\n * />\n * ```\n */\nexport const UITableTooltipFilter: React.FC<\n Omit<React.ComponentProps<typeof Input>, 'className'> & {\n onSearch?: (value: string) => void;\n }\n> = ({ onSearch, onChange, ...props }) => {\n const debouncedSearch = useDebounceCallback((value: string) => {\n onSearch?.(value);\n }, 500);\n return (\n <div className=\"relative w-full max-w-80 flex-1\">\n <Input\n {...props}\n size=\"lg\"\n type=\"search\"\n placeholder=\"Tìm kiếm...\"\n className=\"flex-1 ps-9 pe-9\"\n onChange={e => {\n onChange?.(e);\n debouncedSearch(e.target.value ?? '');\n }}\n />\n <div className=\"pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50\">\n <SearchIcon size={16} />\n </div>\n <button\n className=\"absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Submit search\"\n type=\"submit\"\n >\n <ArrowRightIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n );\n};\n\nconst ActionButton: React.FC<React.PropsWithChildren<React.ComponentProps<'button'>>> = ({ children, disabled, onClick, className, ...props }) => {\n return (\n <button\n type=\"button\"\n disabled={disabled}\n className={cn(\n 'flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5',\n className\n )}\n onClick={onClick}\n {...props}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Grouped action buttons (create, refresh, download) displayed in the table\n * toolbar.\n *\n * Each button is disabled automatically when the corresponding handler prop is\n * omitted, so only the actions relevant to a given table need to be provided.\n * A toggle for `UITableSummaryBar` appears automatically when `summary` is\n * non-empty, and a toggle for `UITableAnalysisPanel` appears when\n * `showAnalysisPanel` is `true` (both set on `UITableProvider`).\n * `onCreateMultiple` renders a separate \"bulk create\" button next to the\n * single-item create button; omit it to hide the button entirely.\n *\n * @example\n * ```tsx\n * import { UITableTooltipActions } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipActions\n * onCreate={() => setOpenCreate(true)}\n * onCreateMultiple={() => setOpenBulkCreate(true)}\n * onRefresh={() => refetch()}\n * />\n * ```\n */\nexport const UITableTooltipActions: React.FC<{\n onCreate?: () => void;\n onCreateMultiple?: () => void;\n onRefresh?: () => void;\n onDownload?: () => void;\n}> = ({ onCreate, onCreateMultiple, onDownload, onRefresh }) => {\n const { table, csvData, csvFileName, title, showAnalysisPanel, summary } = useUITableContext();\n const { isOpen: isAnalysisOpen, toggle: toggleAnalysis } = useUITableAnalysisContext();\n const { isOpen: isSummaryOpen, toggle: toggleSummary } = useUITableSummaryContext();\n\n const handleDownload = useCallback(() => {\n if (onDownload) {\n onDownload();\n return;\n }\n if (!csvData || csvData.length === 0) return;\n const selectedRows = table.getSelectedRowModel().flatRows;\n const rows = selectedRows.length > 0 ? selectedRows.map(row => csvData[row.index]).filter(Boolean) : csvData;\n downloadCsv(rows, csvFileName || title);\n }, [onDownload, csvData, csvFileName, table, title]);\n\n const isDownloadEnabled = !!(onDownload || (csvData && csvData.length > 0));\n\n return (\n <div className=\"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\">\n <ActionButton\n disabled={!onCreate}\n aria-label=\"Tạo mới\"\n onClick={e => {\n onCreate?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CirclePlus />\n </ActionButton>\n <ActionButton\n disabled={!onCreateMultiple}\n aria-label=\"Tạo nhiều\"\n onClick={e => {\n onCreateMultiple?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CopyPlusIcon />\n </ActionButton>\n <ActionButton\n disabled={!onRefresh}\n aria-label=\"Làm mới\"\n onClick={e => {\n onRefresh?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <RefreshCwIcon />\n </ActionButton>\n <ActionButton\n disabled={!isDownloadEnabled}\n aria-label=\"Tải xuống\"\n onClick={e => {\n handleDownload();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <DownloadIcon />\n </ActionButton>\n {summary && summary.length > 0 && (\n <ActionButton\n onClick={e => {\n toggleSummary();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isSummaryOpen}\n aria-label={isSummaryOpen ? 'Ẩn tổng quan' : 'Hiện tổng quan'}\n className={isSummaryOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <LayoutDashboardIcon />\n </ActionButton>\n )}\n {showAnalysisPanel && (\n <ActionButton\n onClick={e => {\n toggleAnalysis();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isAnalysisOpen}\n className={isAnalysisOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <BarChart2Icon />\n </ActionButton>\n )}\n </div>\n );\n};\n\n/**\n * Outer toolbar shell for the UITable component.\n *\n * Reads the table `title` from `UITableContext` and renders it as a heading\n * above the `children` slot, which typically contains a\n * `UITableTooltipFilter` and/or `UITableTooltipActions`.\n *\n * @example\n * ```tsx\n * import {\n * UITableTooltip,\n * UITableTooltipFilter,\n * UITableTooltipActions,\n * } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltip>\n * <UITableTooltipFilter onSearch={setQuery} />\n * <UITableTooltipActions onCreate={handleCreate} onRefresh={refetch} />\n * </UITableTooltip>\n * ```\n */\nexport const UITableTooltip: React.FC<React.PropsWithChildren> = ({ children }) => {\n const { title, description, headerActions } = useUITableContext();\n return (\n <div data-slot=\"table-tooltip\" className=\"relative flex w-full flex-col gap-2 px-2 py-0 text-sm\">\n <div className=\"flex w-full items-start justify-between gap-4\">\n <div className=\"flex flex-col gap-0.5\">\n <h3 className=\"font-semibold text-base text-text-positive\">{title}</h3>\n {!!description && <p className=\"text-muted-foreground text-sm\">{description}</p>}\n </div>\n {!!headerActions && <div className=\"flex shrink-0 items-center gap-2\">{headerActions}</div>}\n </div>\n <div className=\"flex w-full flex-1 justify-between gap-x-2\">{children}</div>\n </div>\n );\n};\nUITableTooltip.displayName = 'UITableTooltip';\n"],"mappings":"mfAIA,SAAS,EAAW,EAAiC,CACnD,GAAI,GAAU,KAA6B,MAAO,GAClD,GAAI,OAAO,GAAU,SAAU,OAAO,OAAO,CAAK,EAClD,GAAI,OAAO,GAAU,UAAW,OAAO,EAAQ,OAAS,QACxD,IAAM,EAAM,OAAO,CAAK,EAIxB,OAHI,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS,GAAG,GAAK,EAAI,SAAS;CAAI,GAAK,EAAI,SAAS,IAAI,EAC5E,IAAI,EAAI,QAAQ,KAAM,IAAI,EAAE,GAE9B,CACT,CAEA,SAAgB,EAAgB,EAA2B,CACzD,GAAI,EAAK,SAAW,EAAG,MAAO,GAC9B,IAAM,EAAU,EAAK,EAAE,CAAC,IAAI,GAAQ,EAAW,EAAK,KAAK,CAAC,EACpD,EAAW,EAAK,IAAI,GAAO,EAAI,IAAI,GAAQ,EAAW,EAAK,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,EAClF,MAAO,CAAC,EAAQ,KAAK,GAAG,EAAG,GAAG,CAAQ,CAAC,CAAC,KAAK;CAAI,CACnD,CAEA,SAAgB,EAAY,EAAmB,EAAwB,CACrE,IAAM,EAAU,EA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,CAAsB,CAAA,CACV,CAAA,EAEf,GACC,EAAC,EAAD,CACE,QAAS,GAAK,CACZ,EAAe,EACf,EAAE,gBAAgB,EAClB,EAAE,eAAe,CACnB,EACA,eAAc,EACd,UAAW,EAAiB,oCAAsC,IAAA,GAElE,SAAA,EAAC,EAAD,CAAgB,CAAA,CACJ,CAAA,CAEb,GAET,EAuBa,GAAqD,CAAE,cAAe,CACjF,GAAM,CAAE,QAAO,cAAa,iBAAkB,EAAkB,EAChE,OACE,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAU,wDAAzC,SAAA,CACE,EAAC,MAAD,CAAK,UAAU,gDAAf,SAAA,CACE,EAAC,MAAD,CAAK,UAAU,wBAAf,SAAA,CACE,EAAC,KAAD,CAAI,UAAU,6CAA8C,SAAA,CAAU,CAAA,EACrE,CAAC,CAAC,GAAe,EAAC,IAAD,CAAG,UAAU,gCAAiC,SAAA,CAAe,CAAA,CAC5E,CACJ,CAAA,EAAA,CAAC,CAAC,GAAiB,EAAC,MAAD,CAAK,UAAU,mCAAoC,SAAA,CAAmB,CAAA,CACvF,CACL,CAAA,EAAA,EAAC,MAAD,CAAK,UAAU,6CAA8C,UAAc,CAAA,CACxE,GAET,EACA,EAAe,YAAc"}
1
+ {"version":3,"file":"tooltip-DSxSeIak.mjs","names":[],"sources":["../packages/components/features/tables/utils/csv.ts","../packages/components/features/tables/components/table/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { CsvCell } from '../types';\n\nfunction formatCell(value: CsvCell['value']): string {\n if (value === null || value === undefined) return '';\n if (typeof value === 'number') return String(value);\n if (typeof value === 'boolean') return value ? 'true' : 'false';\n const str = String(value);\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n return str;\n}\n\nexport function buildCsvContent(rows: CsvCell[][]): string {\n if (rows.length === 0) return '';\n const headers = rows[0].map(cell => formatCell(cell.label));\n const dataRows = rows.map(row => row.map(cell => formatCell(cell.value)).join(','));\n return [headers.join(','), ...dataRows].join('\\n');\n}\n\nexport function downloadCsv(rows: CsvCell[][], fileName: string): void {\n const content = buildCsvContent(rows);\n if (!content) return;\n const blob = new Blob([content], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = `${fileName}.csv`;\n link.click();\n URL.revokeObjectURL(url);\n}\n","/**\n * @file tooltip.tsx\n * Toolbar components rendered above the table: a debounced search input,\n * an action button group (create / refresh / download), and the outer\n * toolbar shell that displays the table title.\n */\nimport { useCallback } from 'react';\n\nimport { ArrowRightIcon, BarChart2Icon, CirclePlus, CopyPlusIcon, DownloadIcon, LayoutDashboardIcon, RefreshCwIcon, SearchIcon } from 'lucide-react';\n\nimport { useDebounceCallback } from '@customafk/react-toolkit/hooks/useDebounceCallback';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useUITableAnalysisContext, useUITableContext, useUITableSummaryContext } from '../../hooks/use-context';\nimport { downloadCsv } from '../../utils/csv';\n\n/**\n * Debounced search input rendered inside the table toolbar.\n *\n * Fires `onSearch` 500 ms after the user stops typing and delegates all other\n * native input events via the spread `props`.\n *\n * @example\n * ```tsx\n * import { UITableTooltipFilter } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipFilter\n * placeholder=\"Search users…\"\n * onSearch={value => setQuery(value)}\n * />\n * ```\n */\nexport const UITableTooltipFilter: React.FC<\n Omit<React.ComponentProps<typeof Input>, 'className'> & {\n onSearch?: (value: string) => void;\n }\n> = ({ onSearch, onChange, ...props }) => {\n const debouncedSearch = useDebounceCallback((value: string) => {\n onSearch?.(value);\n }, 500);\n return (\n <div className=\"relative w-full max-w-80 flex-1\">\n <Input\n {...props}\n size=\"lg\"\n type=\"search\"\n placeholder=\"Tìm kiếm...\"\n className=\"flex-1 ps-9 pe-9\"\n onChange={e => {\n onChange?.(e);\n debouncedSearch(e.target.value ?? '');\n }}\n />\n <div className=\"pointer-events-none absolute inset-y-0 inset-s-0 flex items-center justify-center ps-3 text-text-positive-weak peer-disabled:opacity-50\">\n <SearchIcon size={16} />\n </div>\n <button\n className=\"absolute inset-y-0 inset-e-0 flex h-full w-9 items-center justify-center rounded-e-md text-text-positive-weak outline-none transition-[color,box-shadow] hover:text-text-positive focus:z-10 focus-visible:border focus-visible:border-primary-strong focus-visible:ring-[3px] focus-visible:ring-primary-weak disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Submit search\"\n type=\"submit\"\n >\n <ArrowRightIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n );\n};\n\nconst ActionButton: React.FC<React.PropsWithChildren<React.ComponentProps<'button'>>> = ({ children, disabled, onClick, className, ...props }) => {\n return (\n <button\n type=\"button\"\n disabled={disabled}\n className={cn(\n 'flex cursor-pointer items-center gap-x-1 rounded-sm border border-border bg-background p-2.5 text-sm text-text-positive-weak outline-none transition-all hover:shadow-card focus:border-border-emphasis focus:bg-muted-muted active:border-border-emphasis active:bg-muted-muted active:text-text-positive disabled:pointer-events-none disabled:cursor-default disabled:opacity-60 [&_svg]:size-3.5',\n className\n )}\n onClick={onClick}\n {...props}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Grouped action buttons (create, refresh, download) displayed in the table\n * toolbar.\n *\n * Each button is disabled automatically when the corresponding handler prop is\n * omitted, so only the actions relevant to a given table need to be provided.\n * A toggle for `UITableSummaryBar` appears automatically when `summary` is\n * non-empty, and a toggle for `UITableAnalysisPanel` appears when\n * `showAnalysisPanel` is `true` (both set on `UITableProvider`).\n * `onCreateMultiple` renders a separate \"bulk create\" button next to the\n * single-item create button; omit it to hide the button entirely.\n *\n * @example\n * ```tsx\n * import { UITableTooltipActions } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltipActions\n * onCreate={() => setOpenCreate(true)}\n * onCreateMultiple={() => setOpenBulkCreate(true)}\n * onRefresh={() => refetch()}\n * />\n * ```\n */\nexport const UITableTooltipActions: React.FC<{\n onCreate?: () => void;\n onCreateMultiple?: () => void;\n onRefresh?: () => void;\n onDownload?: () => void;\n}> = ({ onCreate, onCreateMultiple, onDownload, onRefresh }) => {\n const { table, csvData, csvFileName, title, showAnalysisPanel, summary } = useUITableContext();\n const { isOpen: isAnalysisOpen, toggle: toggleAnalysis } = useUITableAnalysisContext();\n const { isOpen: isSummaryOpen, toggle: toggleSummary } = useUITableSummaryContext();\n\n const handleDownload = useCallback(() => {\n if (onDownload) {\n onDownload();\n return;\n }\n if (!csvData || csvData.length === 0) return;\n const selectedRows = table.getSelectedRowModel().flatRows;\n const rows = selectedRows.length > 0 ? selectedRows.map(row => csvData[row.index]).filter(Boolean) : csvData;\n downloadCsv(rows, csvFileName || title);\n }, [onDownload, csvData, csvFileName, table, title]);\n\n const isDownloadEnabled = !!(onDownload || (csvData && csvData.length > 0));\n\n return (\n <div className=\"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\">\n <ActionButton\n disabled={!onCreate}\n aria-label=\"Tạo mới\"\n onClick={e => {\n onCreate?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CirclePlus />\n </ActionButton>\n <ActionButton\n disabled={!onCreateMultiple}\n aria-label=\"Tạo nhiều\"\n onClick={e => {\n onCreateMultiple?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <CopyPlusIcon />\n </ActionButton>\n <ActionButton\n disabled={!onRefresh}\n aria-label=\"Làm mới\"\n onClick={e => {\n onRefresh?.();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <RefreshCwIcon />\n </ActionButton>\n <ActionButton\n disabled={!isDownloadEnabled}\n aria-label=\"Tải xuống\"\n onClick={e => {\n handleDownload();\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <DownloadIcon />\n </ActionButton>\n {summary && summary.length > 0 && (\n <ActionButton\n onClick={e => {\n toggleSummary();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isSummaryOpen}\n aria-label={isSummaryOpen ? 'Ẩn tổng quan' : 'Hiện tổng quan'}\n className={isSummaryOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <LayoutDashboardIcon />\n </ActionButton>\n )}\n {showAnalysisPanel && (\n <ActionButton\n onClick={e => {\n toggleAnalysis();\n e.stopPropagation();\n e.preventDefault();\n }}\n aria-pressed={isAnalysisOpen}\n className={isAnalysisOpen ? 'bg-muted-muted text-text-positive' : undefined}\n >\n <BarChart2Icon />\n </ActionButton>\n )}\n </div>\n );\n};\n\n/**\n * Outer toolbar shell for the UITable component.\n *\n * Reads the table `title` from `UITableContext` and renders it as a heading\n * above the `children` slot, which typically contains a\n * `UITableTooltipFilter` and/or `UITableTooltipActions`.\n *\n * @example\n * ```tsx\n * import {\n * UITableTooltip,\n * UITableTooltipFilter,\n * UITableTooltipActions,\n * } from '@customafk/lunas-ui/features/tables';\n *\n * <UITableTooltip>\n * <UITableTooltipFilter onSearch={setQuery} />\n * <UITableTooltipActions onCreate={handleCreate} onRefresh={refetch} />\n * </UITableTooltip>\n * ```\n */\nexport const UITableTooltip: React.FC<React.PropsWithChildren> = ({ children }) => {\n const { title, description, headerActions } = useUITableContext();\n return (\n <div data-slot=\"table-tooltip\" className=\"relative grid w-full grid-cols-1 gap-2 px-2 py-0 text-sm\">\n <div className=\"grid w-full grid-cols-[1fr_auto] items-start gap-4\">\n <div className=\"grid grid-cols-1 gap-0.5\">\n <h3 className=\"font-semibold text-base text-text-positive\">{title}</h3>\n {!!description && <p className=\"text-muted-foreground text-sm\">{description}</p>}\n </div>\n {!!headerActions && <div className=\"flex shrink-0 items-center gap-2\">{headerActions}</div>}\n </div>\n <div className=\"grid w-full grid-cols-[1fr_auto] gap-x-2\">{children}</div>\n </div>\n );\n};\nUITableTooltip.displayName = 'UITableTooltip';\n"],"mappings":"mfAIA,SAAS,EAAW,EAAiC,CACnD,GAAI,GAAU,KAA6B,MAAO,GAClD,GA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AA,CAC5E,CACJ,CAAA,EAAA,CAAC,CAAC,GAAiB,EAAC,MAAD,CAAK,UAAU,mCAAoC,SAAA,CAAmB,CAAA,CACvF,CACL,CAAA,EAAA,EAAC,MAAD,CAAK,UAAU,2CAA4C,UAAc,CAAA,CACtE,GAET,EACA,EAAe,YAAc"}
@@ -1,2 +1,2 @@
1
- import { n as ParagraphProps, r as paragraphVariants, t as Paragraph } from "../paragraph-DJlHIDmk.cjs";
1
+ import { n as ParagraphProps, r as paragraphVariants, t as Paragraph } from "../paragraph-CkCNIsvz.cjs";
2
2
  export { Paragraph, ParagraphProps, paragraphVariants };
@@ -1,2 +1,2 @@
1
- import { n as ParagraphProps, r as paragraphVariants, t as Paragraph } from "../paragraph-C5HE9u0Q.mjs";
1
+ import { n as ParagraphProps, r as paragraphVariants, t as Paragraph } from "../paragraph-CRo5eC7H.mjs";
2
2
  export { Paragraph, ParagraphProps, paragraphVariants };
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../button.variants-DOglUhSE.cjs"),t=require("../heading-DLjnJc1q.cjs"),n=require("../typography/paragraph.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.AlertDialog.Root,{"data-slot":`alert-dialog`,...e})}function s({...e}){return(0,i.jsx)(a.AlertDialog.Trigger,{"data-slot":`alert-dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.AlertDialog.Portal,{"data-slot":`alert-dialog-portal`,...e})}function l({className:e,...t}){return(0,i.jsx)(a.AlertDialog.Overlay,{"data-slot":`alert-dialog-overlay`,style:{pointerEvents:`none`},className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...t})}function u({className:e,...t}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(l,{}),(0,i.jsx)(a.AlertDialog.Content,{"data-slot":`alert-dialog-content`,className:(0,r.cn)(`bg-background`,`fixed z-50`,`-translate-1/2 top-1/2 left-1/2`,`grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`gap-4 rounded-lg p-6 shadow-lg duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,e),...t})]})}function d({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:(0,r.cn)(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:(0,r.cn)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function p({className:e,...n}){return(0,i.jsx)(a.AlertDialog.Title,{"data-slot":`alert-dialog-title`,className:(0,r.cn)(t.t({level:`h3`}),e),...n})}function m({className:e,...t}){return(0,i.jsx)(a.AlertDialog.Description,{"data-slot":`alert-dialog-description`,className:(0,r.cn)(n.paragraphVariants({variant:`muted`}),`not-first:mt-0`,e),...t})}function h({className:t,...n}){return(0,i.jsx)(a.AlertDialog.Action,{className:(0,r.cn)(e.n(),`min-w-24`,t),...n,autoFocus:!0,tabIndex:1})}function g({className:t,...n}){return(0,i.jsx)(a.AlertDialog.Cancel,{className:(0,r.cn)(e.n({variant:`outline`,color:`muted`}),`min-w-24`,t),...n})}exports.AlertDialog=o,exports.AlertDialogAction=h,exports.AlertDialogCancel=g,exports.AlertDialogContent=u,exports.AlertDialogDescription=m,exports.AlertDialogFooter=f,exports.AlertDialogHeader=d,exports.AlertDialogOverlay=l,exports.AlertDialogPortal=c,exports.AlertDialogTitle=p,exports.AlertDialogTrigger=s;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../button.variants-DOglUhSE.cjs"),t=require("../heading-DLjnJc1q.cjs"),n=require("../typography/paragraph.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.AlertDialog.Root,{"data-slot":`alert-dialog`,...e})}function s({...e}){return(0,i.jsx)(a.AlertDialog.Trigger,{"data-slot":`alert-dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.AlertDialog.Portal,{"data-slot":`alert-dialog-portal`,...e})}function l({className:e,...t}){return(0,i.jsx)(a.AlertDialog.Overlay,{"data-slot":`alert-dialog-overlay`,style:{pointerEvents:`none`},className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...t})}function u({className:e,...t}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(l,{}),(0,i.jsx)(a.AlertDialog.Content,{"data-slot":`alert-dialog-content`,className:(0,r.cn)(`bg-background`,`fixed z-50`,`-translate-1/2 top-1/2 left-1/2`,`grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`gap-4 rounded-lg p-6 shadow-lg duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,e),...t})]})}function d({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:(0,r.cn)(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:(0,r.cn)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function p({className:e,...n}){return(0,i.jsx)(a.AlertDialog.Title,{"data-slot":`alert-dialog-title`,className:(0,r.cn)(t.t({level:`h3`}),e),...n})}function m({className:e,...t}){return(0,i.jsx)(a.AlertDialog.Description,{"data-slot":`alert-dialog-description`,className:(0,r.cn)(n.paragraphVariants({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...t})}function h({className:t,...n}){return(0,i.jsx)(a.AlertDialog.Action,{className:(0,r.cn)(e.n(),`min-w-24`,t),...n,autoFocus:!0,tabIndex:1})}function g({className:t,...n}){return(0,i.jsx)(a.AlertDialog.Cancel,{className:(0,r.cn)(e.n({variant:`outline`,color:`muted`}),`min-w-24`,t),...n})}exports.AlertDialog=o,exports.AlertDialogAction=h,exports.AlertDialogCancel=g,exports.AlertDialogContent=u,exports.AlertDialogDescription=m,exports.AlertDialogFooter=f,exports.AlertDialogHeader=d,exports.AlertDialogOverlay=l,exports.AlertDialogPortal=c,exports.AlertDialogTitle=p,exports.AlertDialogTrigger=s;
2
2
  //# sourceMappingURL=alert-dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.cjs","names":["AlertDialogPrimitive","headingVariants","paragraphVariants","buttonVariants"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for the cancel and action buttons at the bottom of the alert dialog. */\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the alert dialog, styled with the h3 heading variant. */\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that explains the consequences of the destructive action. */\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0', className)}\n {...props}\n />\n );\n}\n\n/** Confirm button that closes the dialog and proceeds with the action; auto-focused and styled as the primary action. */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />;\n}\n\n/** Cancel button that closes the alert dialog without performing the destructive action. */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />;\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":"sTAwCA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAGA,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,QAAtB,CACE,YAAU,uBACV,MAAO,CAAE,cAAe,MAAO,EAC/B,WAAA,EAAA,EAAA,GAAA,CACE,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAqB,CAAA,GACrB,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAqB,QAAtB,CACE,YAAU,uBACV,WAAA,EAAA,EAAA,GAAA,CAC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GAAmE,CAC5G,OAAO,EAAA,EAAA,IAAA,CAACH,EAAAA,YAAqB,OAAtB,CAA6B,WAAA,EAAA,EAAA,GAAA,CAAcG,EAAAA,EAAe,CAAE,QAAS,UAAW,MAAO,OAAQ,CAAC,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CAChJ"}
1
+ {"version":3,"file":"alert-dialog.cjs","names":["AlertDialogPrimitive","headingVariants","paragraphVariants","buttonVariants"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for the cancel and action buttons at the bottom of the alert dialog. */\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the alert dialog, styled with the h3 heading variant. */\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that explains the consequences of the destructive action. */\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\n/** Confirm button that closes the dialog and proceeds with the action; auto-focused and styled as the primary action. */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />;\n}\n\n/** Cancel button that closes the alert dialog without performing the destructive action. */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />;\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n Alert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Fajfx88p.mjs";import{paragraphVariants as n}from"../typography/paragraph.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{AlertDialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`alert-dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`alert-dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`alert-dialog-portal`,...e})}function u({className:e,...t}){return i(o.Overlay,{"data-slot":`alert-dialog-overlay`,style:{pointerEvents:`none`},className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...t})}function d({className:e,...t}){return a(l,{children:[i(u,{}),i(o.Content,{"data-slot":`alert-dialog-content`,className:r(`bg-background`,`fixed z-50`,`-translate-1/2 top-1/2 left-1/2`,`grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`gap-4 rounded-lg p-6 shadow-lg duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,e),...t})]})}function f({className:e,...t}){return i(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function p({className:e,...t}){return i(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m({className:e,...n}){return i(o.Title,{"data-slot":`alert-dialog-title`,className:r(t({level:`h3`}),e),...n})}function h({className:e,...t}){return i(o.Description,{"data-slot":`alert-dialog-description`,className:r(n({variant:`muted`}),`not-first:mt-0`,e),...t})}function g({className:t,...n}){return i(o.Action,{className:r(e(),`min-w-24`,t),...n,autoFocus:!0,tabIndex:1})}function _({className:t,...n}){return i(o.Cancel,{className:r(e({variant:`outline`,color:`muted`}),`min-w-24`,t),...n})}export{s as AlertDialog,g as AlertDialogAction,_ as AlertDialogCancel,d as AlertDialogContent,h as AlertDialogDescription,p as AlertDialogFooter,f as AlertDialogHeader,u as AlertDialogOverlay,l as AlertDialogPortal,m as AlertDialogTitle,c as AlertDialogTrigger};
1
+ "use client";import{n as e}from"../button.variants-pziHKxvE.mjs";import{t}from"../heading-Fajfx88p.mjs";import{paragraphVariants as n}from"../typography/paragraph.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{AlertDialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`alert-dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`alert-dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`alert-dialog-portal`,...e})}function u({className:e,...t}){return i(o.Overlay,{"data-slot":`alert-dialog-overlay`,style:{pointerEvents:`none`},className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...t})}function d({className:e,...t}){return a(l,{children:[i(u,{}),i(o.Content,{"data-slot":`alert-dialog-content`,className:r(`bg-background`,`fixed z-50`,`-translate-1/2 top-1/2 left-1/2`,`grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg`,`gap-4 rounded-lg p-6 shadow-lg duration-200`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,e),...t})]})}function f({className:e,...t}){return i(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function p({className:e,...t}){return i(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m({className:e,...n}){return i(o.Title,{"data-slot":`alert-dialog-title`,className:r(t({level:`h3`}),e),...n})}function h({className:e,...t}){return i(o.Description,{"data-slot":`alert-dialog-description`,className:r(n({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...t})}function g({className:t,...n}){return i(o.Action,{className:r(e(),`min-w-24`,t),...n,autoFocus:!0,tabIndex:1})}function _({className:t,...n}){return i(o.Cancel,{className:r(e({variant:`outline`,color:`muted`}),`min-w-24`,t),...n})}export{s as AlertDialog,g as AlertDialogAction,_ as AlertDialogCancel,d as AlertDialogContent,h as AlertDialogDescription,p as AlertDialogFooter,f as AlertDialogHeader,u as AlertDialogOverlay,l as AlertDialogPortal,m as AlertDialogTitle,c as AlertDialogTrigger};
2
2
  //# sourceMappingURL=alert-dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.mjs","names":["AlertDialogPrimitive"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for the cancel and action buttons at the bottom of the alert dialog. */\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the alert dialog, styled with the h3 heading variant. */\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that explains the consequences of the destructive action. */\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0', className)}\n {...props}\n />\n );\n}\n\n/** Confirm button that closes the dialog and proceeds with the action; auto-focused and styled as the primary action. */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />;\n}\n\n/** Cancel button that closes the alert dialog without performing the destructive action. */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />;\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":"qTAwCA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAGA,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,MAAO,CAAE,cAAe,MAAO,EAC/B,UAAW,EACT,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAqB,CAAA,EACrB,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,UAAW,EACT,gBACA,aACA,kCACA,kDACA,8CACA,+BACA,8BACA,+BACA,kCACA,iCACA,kCACA,CACF,EACA,GAAI,CACL,CAAA,CACgB,CAAA,CAAA,CAEvB,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAsC,CAC/E,OAAO,EAAC,MAAD,CAAK,YAAU,sBAAsB,UAAW,EAAG,+CAAgD,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAsC,CAC/E,OAAO,EAAC,MAAD,CAAK,YAAU,sBAAsB,UAAW,EAAG,yDAA0D,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC9I,CAGA,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAkE,CAC1G,OAAO,EAACA,EAAqB,MAAtB,CAA4B,YAAU,qBAAqB,UAAW,EAAG,EAAgB,CAAE,MAAO,IAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5I,CAGA,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAACA,EAAqB,YAAtB,CACE,YAAU,2BACV,UAAW,EAAG,EAAkB,CAAE,QAAS,OAAQ,CAAC,EAAG,iBAAkB,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAqB,OAAtB,CAA6B,UAAW,EAAG,EAAe,EAAG,WAAY,CAAS,EAAG,GAAI,EAAO,UAAA,GAAU,SAAU,CAAI,CAAA,CACjI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAqB,OAAtB,CAA6B,UAAW,EAAG,EAAe,CAAE,QAAS,UAAW,MAAO,OAAQ,CAAC,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CAChJ"}
1
+ {"version":3,"file":"alert-dialog.mjs","names":["AlertDialogPrimitive"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for the cancel and action buttons at the bottom of the alert dialog. */\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the alert dialog, styled with the h3 heading variant. */\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that explains the consequences of the destructive action. */\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\n/** Confirm button that closes the dialog and proceeds with the action; auto-focused and styled as the primary action. */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />;\n}\n\n/** Cancel button that closes the alert dialog without performing the destructive action. */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />;\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":"qTAwCA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAGA,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,MAAO,CAAE,cAAe,MAAO,EAC/B,UAAW,EACT,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL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W,EAAG,EAAe,CAAE,QAAS,UAAW,MAAO,OAAQ,CAAC,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CAChJ"}
package/dist/ui/badge.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@customafk/react-toolkit/utils"),t=require("class-variance-authority"),n=require("react/jsx-runtime");const r=(0,t.cva)(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-text-negative`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function i({className:t,variant:i,color:a,size:o,pill:s,...c}){return(0,n.jsx)(`span`,{className:(0,e.cn)(r({variant:i,color:a,pill:s,size:o}),t),...c})}exports.Badge=i,exports.badgeVariants=r;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@customafk/react-toolkit/utils"),t=require("class-variance-authority"),n=require("react/jsx-runtime");const r=(0,t.cva)(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-text-negative`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function i({className:t,variant:i,color:a,size:o,pill:s,...c}){return(0,n.jsx)(`span`,{className:(0,e.cn)(r({variant:i,color:a,pill:s,size:o}),t),...c})}const a=(0,t.cva)(`inline-block size-1.5 shrink-0 rounded-full`,{variants:{color:{primary:`bg-primary`,secondary:`bg-secondary`,muted:`bg-muted`,accent:`bg-accent`,info:`bg-info`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`}},defaultVariants:{color:`primary`}});exports.Badge=i,exports.badgeDotVariants=a,exports.badgeVariants=r;
2
2
  //# sourceMappingURL=badge.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.cjs","names":[],"sources":["../../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-text-negative' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants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MAAO,SAAU,UAAW,yCAA0C,EAEzF,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,YAAa,UAAW,iCAAkC,EACvF,CAAE,QAAS,UAAW,MAAO,QAAS,UAAW,yBAA0B,EAC3E,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,2BAA4B,EAC9E,CAAE,QAAS,UAAW,MAAO,OAAQ,UAAW,uBAAwB,EACxE,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,2BAA4B,CAChF,CACF,CACF,EAuBA,SAAS,EAAM,CAAE,YAAW,UAAS,QAAO,OAAM,OAAM,GAAG,GAAqB,CAC9E,OAAO,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,WAAA,EAAA,EAAA,GAAA,CAAc,EAAc,CAAE,UAAS,QAAO,OAAM,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG"}
1
+ {"version":3,"file":"badge.cjs","names":[],"sources":["../../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-text-negative' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n/**\n * Dot indicator fill color, keyed by the same `color` union as `badgeVariants`, so the palette\n * has a single home instead of being re-declared by each consumer that pairs a status dot with a Badge.\n */\nexport const badgeDotVariants = cva('inline-block size-1.5 shrink-0 rounded-full', {\n variants: {\n color: {\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n muted: 'bg-muted',\n accent: 'bg-accent',\n info: 'bg-info',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n});\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants };\n"],"mappings":"qMAMA,MAAM,GAAA,EAAA,EAAA,IAAA,CACJ,iLACA,CACE,SAAU,CACR,QAAS,CACP,MAAO,aACP,KAAM,GACN,QAAS,uBACX,EACA,MAAO,CACL,QAAS,GACT,UAAW,GACX,MAAO,GACP,OAAQ,GACR,KAAM,GACN,QAAS,GACT,QAAS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,SAAU,UAAW,2BAA4B,EAC9E,CAAE,QAAS,UAAW,MAAO,OAAQ,UAAW,uBAAwB,EACxE,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,2BAA4B,CAChF,CACF,CACF,EAuBA,SAAS,EAAM,CAAE,YAAW,UAAS,QAAO,OAAM,OAAM,GAAG,GAAqB,CAC9E,OAAO,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,WAAA,EAAA,EAAA,GAAA,CAAc,EAAc,CAAE,UAAS,QAAO,OAAM,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG,CAMA,MAAa,GAAA,EAAA,EAAA,IAAA,CAAuB,8CAA+C,CACjF,SAAU,CACR,MAAO,CACL,QAAS,aACT,UAAW,eACX,MAAO,WACP,OAAQ,YACR,KAAM,UACN,QAAS,aACT,QAAS,aACT,OAAQ,WACV,CACF,EACA,gBAAiB,CACf,MAAO,SACT,CACF,CAAC"}
@@ -1,2 +1,2 @@
1
- import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-C_KLKwiS.cjs";
2
- export { Badge, BadgeProps, badgeVariants };
1
+ import { i as badgeVariants, n as BadgeProps, r as badgeDotVariants, t as Badge } from "../badge-C_NPjGXe.cjs";
2
+ export { Badge, BadgeProps, badgeDotVariants, badgeVariants };
@@ -1,2 +1,2 @@
1
- import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-C_KLKwiS.mjs";
2
- export { Badge, BadgeProps, badgeVariants };
1
+ import { i as badgeVariants, n as BadgeProps, r as badgeDotVariants, t as Badge } from "../badge-C_NPjGXe.mjs";
2
+ export { Badge, BadgeProps, badgeDotVariants, badgeVariants };
package/dist/ui/badge.mjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";import{cn as e}from"@customafk/react-toolkit/utils";import{cva as t}from"class-variance-authority";import{jsx as n}from"react/jsx-runtime";const r=t(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-text-negative`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function i({className:t,variant:i,color:a,size:o,pill:s,...c}){return n(`span`,{className:e(r({variant:i,color:a,pill:s,size:o}),t),...c})}export{i as Badge,r as badgeVariants};
1
+ "use client";import{cn as e}from"@customafk/react-toolkit/utils";import{cva as t}from"class-variance-authority";import{jsx as n}from"react/jsx-runtime";const r=t(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-text-negative`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function i({className:t,variant:i,color:a,size:o,pill:s,...c}){return n(`span`,{className:e(r({variant:i,color:a,pill:s,size:o}),t),...c})}const a=t(`inline-block size-1.5 shrink-0 rounded-full`,{variants:{color:{primary:`bg-primary`,secondary:`bg-secondary`,muted:`bg-muted`,accent:`bg-accent`,info:`bg-info`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`}},defaultVariants:{color:`primary`}});export{i as Badge,a as badgeDotVariants,r as badgeVariants};
2
2
  //# sourceMappingURL=badge.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.mjs","names":[],"sources":["../../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-text-negative' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants };\n"],"mappings":"wJAMA,MAAM,EAAgB,EACpB,iLACA,CACE,SAAU,CACR,QAAS,CACP,MAAO,aACP,KAAM,GACN,QAAS,uBACX,EACA,MAAO,CACL,QAAS,GACT,UAAW,GACX,MAAO,GACP,OAAQ,GACR,KAAM,GACN,QAAS,GACT,QAAS,GACT,OAAQ,EACV,EACA,KAAM,CACJ,GAAI,oCACJ,GAAI,4BACJ,GAAI,gCACJ,GAAI,8BACJ,GAAI,6BACN,EACA,KAAM,CACJ,KAAM,eACN,M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F,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,6BAA8B,EACjF,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,2BAA4B,CAChF,CACF,CACF,EAuBA,SAAS,EAAM,CAAE,YAAW,UAAS,QAAO,OAAM,OAAM,GAAG,GAAqB,CAC9E,OAAO,EAAC,OAAD,CAAM,UAAW,EAAG,EAAc,CAAE,UAAS,QAAO,OAAM,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG"}
1
+ {"version":3,"file":"badge.mjs","names":[],"sources":["../../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-text-negative' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n/**\n * Dot indicator fill color, keyed by the same `color` union as `badgeVariants`, so the palette\n * has a single home instead of being re-declared by each consumer that pairs a status dot with a Badge.\n */\nexport const badgeDotVariants = cva('inline-block size-1.5 shrink-0 rounded-full', {\n variants: {\n color: {\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n muted: 'bg-muted',\n accent: 'bg-accent',\n info: 'bg-info',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n});\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants };\n"],"mappings":"wJAMA,MAAM,EAAgB,EACpB,iLACA,CACE,SAAU,CACR,QAAS,CACP,MAAO,aACP,KAAM,GACN,QAAS,uBACX,EACA,MAAO,CACL,QAAS,GACT,UAAW,GACX,MAAO,GACP,OAAQ,GACR,KAAM,GACN,QAAS,GACT,QAAS,GACT,OAAQ,EACV,EACA,KAAM,CACJ,GAAI,oCACJ,GAAI,4BACJ,GAAI,gCACJ,GAAI,8BACJ,GAAI,6BACN,EACA,KAAM,CACJ,KAAM,eACN,MAAO,SACT,CACF,EACA,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,KACN,KAAM,EACR,EACA,iBAAkB,CAEhB,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,oCAAqC,EACtF,CAAE,QAAS,QAAS,MAAO,YAAa,UAAW,wCAAyC,EAC5F,CAAE,QAAS,QAAS,MAAO,QAAS,UAAW,6BAA8B,EAC7E,CAAE,QAAS,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AAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG,CAMA,MAAa,EAAmB,EAAI,8CAA+C,CACjF,SAAU,CACR,MAAO,CACL,QAAS,aACT,UAAW,eACX,MAAO,WACP,OAAQ,YACR,KAAM,UACN,QAAS,aACT,QAAS,aACT,OAAQ,WACV,CACF,EACA,gBAAiB,CACf,MAAO,SACT,CACF,CAAC"}
@@ -1,2 +1,2 @@
1
- import { n as ButtonProps, t as Button } from "../button-CnKmz4qM.cjs";
1
+ import { n as ButtonProps, t as Button } from "../button-BnoPktln.cjs";
2
2
  export { Button, ButtonProps };
@@ -1,2 +1,2 @@
1
- import { n as ButtonProps, t as Button } from "../button-CnKmz4qM.mjs";
1
+ import { n as ButtonProps, t as Button } from "../button-BnoPktln.mjs";
2
2
  export { Button, ButtonProps };
@@ -1,2 +1,2 @@
1
- import { n as CalendarDayButton, t as Calendar } from "../calendar-D_QmR9VE.cjs";
1
+ import { n as CalendarDayButton, t as Calendar } from "../calendar-iDMPT1kI.cjs";
2
2
  export { Calendar, CalendarDayButton };
@@ -1,2 +1,2 @@
1
- import { n as CalendarDayButton, t as Calendar } from "../calendar-BT6-Fo3T.mjs";
1
+ import { n as CalendarDayButton, t as Calendar } from "../calendar-BkV5hTX2.mjs";
2
2
  export { Calendar, CalendarDayButton };
@@ -1,2 +1,2 @@
1
- import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-B_IXlBdH.cjs";
1
+ import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-bBvM31sh.cjs";
2
2
  export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
@@ -1,2 +1,2 @@
1
- import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-BBI4xPdK.mjs";
1
+ import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-D7VXWJ3S.mjs";
2
2
  export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../combobox-kp_kPY8o.cjs");exports.Combobox=e.t;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../combobox-Bhgo112r.cjs");exports.Combobox=e.t;
@@ -1 +1 @@
1
- "use client";import{t as e}from"../combobox-C64Rvd7n.mjs";export{e as Combobox};
1
+ "use client";import{t as e}from"../combobox-C0nno01T.mjs";export{e as Combobox};
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../heading-DLjnJc1q.cjs"),t=require("../typography/paragraph.cjs"),n=require("../close-BYHgEZvZ.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,...e})}function s({...e}){return(0,i.jsx)(a.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function l({...e}){return(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,...e})}function u({className:e,...t}){return(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function d({className:e,children:t,showCloseButton:o=!0,...s}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.cn)(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...s,children:[t,o&&(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,i.jsx)(n.t,{})})]})]})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-header`,className:(0,r.cn)(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-footer`,className:(0,r.cn)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m({className:t,...n}){return(0,i.jsx)(a.Dialog.Title,{"data-slot":`dialog-title`,className:(0,r.cn)(e.t({level:`h3`}),t),...n})}function h({className:e,...n}){return(0,i.jsx)(a.Dialog.Description,{"data-slot":`dialog-description`,className:(0,r.cn)(t.paragraphVariants({variant:`muted`}),e),...n})}exports.Dialog=o,exports.DialogClose=l,exports.DialogContent=d,exports.DialogDescription=h,exports.DialogFooter=p,exports.DialogHeader=f,exports.DialogOverlay=u,exports.DialogPortal=c,exports.DialogTitle=m,exports.DialogTrigger=s;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../heading-DLjnJc1q.cjs"),t=require("../typography/paragraph.cjs"),n=require("../close-BYHgEZvZ.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,...e})}function s({...e}){return(0,i.jsx)(a.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function l({...e}){return(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,...e})}function u({className:e,...t}){return(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function d({className:e,children:t,showCloseButton:o=!0,...s}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.cn)(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...s,children:[t,o&&(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,i.jsx)(n.t,{})})]})]})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-header`,className:(0,r.cn)(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-footer`,className:(0,r.cn)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m({className:t,...n}){return(0,i.jsx)(a.Dialog.Title,{"data-slot":`dialog-title`,className:(0,r.cn)(e.t({level:`h3`}),t),...n})}function h({className:e,...n}){return(0,i.jsx)(a.Dialog.Description,{"data-slot":`dialog-description`,className:(0,r.cn)(t.paragraphVariants({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...n})}exports.Dialog=o,exports.DialogClose=l,exports.DialogContent=d,exports.DialogDescription=h,exports.DialogFooter=p,exports.DialogHeader=f,exports.DialogOverlay=u,exports.DialogPortal=c,exports.DialogTitle=m,exports.DialogTrigger=s;
2
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.cjs","names":["DialogPrimitive","CloseButton","headingVariants","paragraphVariants"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot=\"dialog-description\" className={cn(paragraphVariants({ variant: 'muted' }), className)} {...props} />;\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"4SAqCA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAGA,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAGA,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,CAAA,CAC9H,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,WAAA,EAAA,EAAA,GAAA,CAAc,yDAA0D,CAAS,EAAG,GAAI,CAAQ,CAAA,CACxI,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,WAAA,EAAA,EAAA,GAAA,CAAcE,EAAAA,EAAgB,CAAE,MAAO,IAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAAA,EAAA,IAAA,CAACF,EAAAA,OAAgB,YAAjB,CAA6B,YAAU,qBAAqB,WAAA,EAAA,EAAA,GAAA,CAAcG,EAAAA,kBAAkB,CAAE,QAAS,OAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpJ"}
1
+ {"version":3,"file":"dialog.cjs","names":["DialogPrimitive","CloseButton","headingVariants","paragraphVariants"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"4SAqCA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAGA,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAGA,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAGA,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,iCACA,2DACA,iEACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAOA,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAIF,CACD,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,CAAA,GAChB,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,W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client";import{t as e}from"../heading-Fajfx88p.mjs";import{paragraphVariants as t}from"../typography/paragraph.mjs";import{t as n}from"../close-DYJZ8fkh.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Dialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return i(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return i(o.Overlay,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return a(l,{children:[i(d,{}),a(o.Content,{"data-slot":`dialog-content`,className:r(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...c,children:[t,s&&i(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:i(n,{})})]})]})}function p({className:e,...t}){return i(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function m({className:e,...t}){return i(`div`,{"data-slot":`dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h({className:t,...n}){return i(o.Title,{"data-slot":`dialog-title`,className:r(e({level:`h3`}),t),...n})}function g({className:e,...n}){return i(o.Description,{"data-slot":`dialog-description`,className:r(t({variant:`muted`}),e),...n})}export{s as Dialog,u as DialogClose,f as DialogContent,g as DialogDescription,m as DialogFooter,p as DialogHeader,d as DialogOverlay,l as DialogPortal,h as DialogTitle,c as DialogTrigger};
1
+ "use client";import{t as e}from"../heading-Fajfx88p.mjs";import{paragraphVariants as t}from"../typography/paragraph.mjs";import{t as n}from"../close-DYJZ8fkh.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Dialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return i(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return i(o.Overlay,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return a(l,{children:[i(d,{}),a(o.Content,{"data-slot":`dialog-content`,className:r(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...c,children:[t,s&&i(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:i(n,{})})]})]})}function p({className:e,...t}){return i(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function m({className:e,...t}){return i(`div`,{"data-slot":`dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h({className:t,...n}){return i(o.Title,{"data-slot":`dialog-title`,className:r(e({level:`h3`}),t),...n})}function g({className:e,...n}){return i(o.Description,{"data-slot":`dialog-description`,className:r(t({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...n})}export{s as Dialog,u as DialogClose,f as DialogContent,g as DialogDescription,m as DialogFooter,p as DialogHeader,d as DialogOverlay,l as DialogPortal,h as DialogTitle,c as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.mjs.map