@techzyapp/ui-library 1.0.49 → 1.0.50

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 (468) hide show
  1. package/dist/{Accordion-DOrTQJB9.js → Accordion-C6vW_OMd.js} +2 -2
  2. package/dist/{Accordion-DOrTQJB9.js.map → Accordion-C6vW_OMd.js.map} +1 -1
  3. package/dist/{Accordion-CFyeLfPT.cjs → Accordion-Icvl9S8c.cjs} +2 -2
  4. package/dist/{Accordion-CFyeLfPT.cjs.map → Accordion-Icvl9S8c.cjs.map} +1 -1
  5. package/dist/{AdminRoot-DYM9r25r.js → AdminRoot-C5l8PIyi.js} +9 -9
  6. package/dist/{AdminRoot-DYM9r25r.js.map → AdminRoot-C5l8PIyi.js.map} +1 -1
  7. package/dist/{AdminRoot-CGf-Q8Hs.cjs → AdminRoot-MEfy9xtz.cjs} +2 -2
  8. package/dist/{AdminRoot-CGf-Q8Hs.cjs.map → AdminRoot-MEfy9xtz.cjs.map} +1 -1
  9. package/dist/{Alert-QvfNBhlU.cjs → Alert--ZnlCjaL.cjs} +2 -2
  10. package/dist/{Alert-QvfNBhlU.cjs.map → Alert--ZnlCjaL.cjs.map} +1 -1
  11. package/dist/{Alert-Bo_XgY-A.js → Alert-BVs-GcZQ.js} +4 -4
  12. package/dist/{Alert-Bo_XgY-A.js.map → Alert-BVs-GcZQ.js.map} +1 -1
  13. package/dist/{AuthGuard-C2eA3mJA.cjs → AuthGuard-Cm-tqCto.cjs} +2 -2
  14. package/dist/{AuthGuard-C2eA3mJA.cjs.map → AuthGuard-Cm-tqCto.cjs.map} +1 -1
  15. package/dist/{AuthGuard-Ck31lvBA.js → AuthGuard-DJ_mMwfg.js} +2 -2
  16. package/dist/{AuthGuard-Ck31lvBA.js.map → AuthGuard-DJ_mMwfg.js.map} +1 -1
  17. package/dist/{AuthLayout-BI1wLuDl.js → AuthLayout-BDRJFSpi.js} +2 -2
  18. package/dist/{AuthLayout-BI1wLuDl.js.map → AuthLayout-BDRJFSpi.js.map} +1 -1
  19. package/dist/{AuthLayout-Bzlsvicf.cjs → AuthLayout-D7mSMdM4.cjs} +2 -2
  20. package/dist/{AuthLayout-Bzlsvicf.cjs.map → AuthLayout-D7mSMdM4.cjs.map} +1 -1
  21. package/dist/{Avatar-BBqX1732.cjs → Avatar-BwGJl-ru.cjs} +2 -2
  22. package/dist/{Avatar-BBqX1732.cjs.map → Avatar-BwGJl-ru.cjs.map} +1 -1
  23. package/dist/{Avatar-CaYyv5wk.js → Avatar-C4qgzth2.js} +2 -2
  24. package/dist/{Avatar-CaYyv5wk.js.map → Avatar-C4qgzth2.js.map} +1 -1
  25. package/dist/{AvatarGroup-DrkzAt1-.cjs → AvatarGroup-B8u8ONs5.cjs} +2 -2
  26. package/dist/{AvatarGroup-DrkzAt1-.cjs.map → AvatarGroup-B8u8ONs5.cjs.map} +1 -1
  27. package/dist/{AvatarGroup-6fhm-van.js → AvatarGroup-BqxTFzRc.js} +2 -2
  28. package/dist/{AvatarGroup-6fhm-van.js.map → AvatarGroup-BqxTFzRc.js.map} +1 -1
  29. package/dist/{Breadcrumbs-CqGS32x5.cjs → Breadcrumbs-D4wv2-T7.cjs} +2 -2
  30. package/dist/{Breadcrumbs-CqGS32x5.cjs.map → Breadcrumbs-D4wv2-T7.cjs.map} +1 -1
  31. package/dist/{Breadcrumbs-BEv57tuJ.js → Breadcrumbs-HGk4DKrc.js} +4 -4
  32. package/dist/{Breadcrumbs-BEv57tuJ.js.map → Breadcrumbs-HGk4DKrc.js.map} +1 -1
  33. package/dist/{Button-DZWYeAno.js → Button-7mgXcRdw.js} +2 -2
  34. package/dist/{Button-DZWYeAno.js.map → Button-7mgXcRdw.js.map} +1 -1
  35. package/dist/{Button-BtiFpRie.cjs → Button-DAvQCGIw.cjs} +2 -2
  36. package/dist/{Button-BtiFpRie.cjs.map → Button-DAvQCGIw.cjs.map} +1 -1
  37. package/dist/{Calendar-7W9xNVBZ.js → Calendar-B1ZJHqjB.js} +4 -4
  38. package/dist/{Calendar-7W9xNVBZ.js.map → Calendar-B1ZJHqjB.js.map} +1 -1
  39. package/dist/{Calendar-Bgh_3Vk2.cjs → Calendar-BPYjqBy9.cjs} +2 -2
  40. package/dist/{Calendar-Bgh_3Vk2.cjs.map → Calendar-BPYjqBy9.cjs.map} +1 -1
  41. package/dist/{Card-KfmWG9Uz.cjs → Card-B-Qso__1.cjs} +2 -2
  42. package/dist/{Card-KfmWG9Uz.cjs.map → Card-B-Qso__1.cjs.map} +1 -1
  43. package/dist/{Card-ckOd617g.js → Card-vFsIhkyR.js} +4 -4
  44. package/dist/{Card-ckOd617g.js.map → Card-vFsIhkyR.js.map} +1 -1
  45. package/dist/{Chip-Crzm7Eux.js → Chip-CU0J7HJa.js} +3 -3
  46. package/dist/{Chip-Crzm7Eux.js.map → Chip-CU0J7HJa.js.map} +1 -1
  47. package/dist/{Chip-BDUsue_R.cjs → Chip-CovsonP1.cjs} +2 -2
  48. package/dist/{Chip-BDUsue_R.cjs.map → Chip-CovsonP1.cjs.map} +1 -1
  49. package/dist/{ChoiceCardGroup-D37XREKV.js → ChoiceCardGroup-BBqUbFLS.js} +2 -2
  50. package/dist/{ChoiceCardGroup-D37XREKV.js.map → ChoiceCardGroup-BBqUbFLS.js.map} +1 -1
  51. package/dist/{ChoiceCardGroup-Cj_YFj6C.cjs → ChoiceCardGroup-bnKFPDYz.cjs} +2 -2
  52. package/dist/{ChoiceCardGroup-Cj_YFj6C.cjs.map → ChoiceCardGroup-bnKFPDYz.cjs.map} +1 -1
  53. package/dist/{CodeBlock-rnGAu2DQ.cjs → CodeBlock-B404V_cc.cjs} +2 -2
  54. package/dist/{CodeBlock-rnGAu2DQ.cjs.map → CodeBlock-B404V_cc.cjs.map} +1 -1
  55. package/dist/{CodeBlock-CX8_dMPD.js → CodeBlock-DvJ45qEp.js} +4 -4
  56. package/dist/{CodeBlock-CX8_dMPD.js.map → CodeBlock-DvJ45qEp.js.map} +1 -1
  57. package/dist/{ColorPicker-CwLivdAt.js → ColorPicker-C4slmEZC.js} +3 -3
  58. package/dist/{ColorPicker-CwLivdAt.js.map → ColorPicker-C4slmEZC.js.map} +1 -1
  59. package/dist/{ColorPicker-BaAdcqR9.cjs → ColorPicker-_RBW51XB.cjs} +2 -2
  60. package/dist/{ColorPicker-BaAdcqR9.cjs.map → ColorPicker-_RBW51XB.cjs.map} +1 -1
  61. package/dist/{ColorPickerPanel-IOhJJF1R.cjs → ColorPickerPanel-CNspBZre.cjs} +2 -2
  62. package/dist/{ColorPickerPanel-IOhJJF1R.cjs.map → ColorPickerPanel-CNspBZre.cjs.map} +1 -1
  63. package/dist/{ColorPickerPanel-CkrSIf35.js → ColorPickerPanel-CQNfIbgc.js} +3 -3
  64. package/dist/{ColorPickerPanel-CkrSIf35.js.map → ColorPickerPanel-CQNfIbgc.js.map} +1 -1
  65. package/dist/{ColorRamp-DbFOsspz.js → ColorRamp-DQZZiE5I.js} +2 -2
  66. package/dist/{ColorRamp-DbFOsspz.js.map → ColorRamp-DQZZiE5I.js.map} +1 -1
  67. package/dist/{ColorRamp-BCy8a7ks.cjs → ColorRamp-DuO7gkru.cjs} +2 -2
  68. package/dist/{ColorRamp-BCy8a7ks.cjs.map → ColorRamp-DuO7gkru.cjs.map} +1 -1
  69. package/dist/{ConfigProvider-CYSpuSMJ.cjs → ConfigProvider-BFhkb0BV.cjs} +2 -2
  70. package/dist/{ConfigProvider-CYSpuSMJ.cjs.map → ConfigProvider-BFhkb0BV.cjs.map} +1 -1
  71. package/dist/{ConfigProvider-DtyUlWk6.js → ConfigProvider-bXX8dnhY.js} +2 -2
  72. package/dist/{ConfigProvider-DtyUlWk6.js.map → ConfigProvider-bXX8dnhY.js.map} +1 -1
  73. package/dist/{CopyButton-DUG5s3TM.cjs → CopyButton-B2V6guZ0.cjs} +2 -2
  74. package/dist/{CopyButton-DUG5s3TM.cjs.map → CopyButton-B2V6guZ0.cjs.map} +1 -1
  75. package/dist/{CopyButton-LURMuaYw.js → CopyButton-DfYAslz-.js} +4 -4
  76. package/dist/{CopyButton-LURMuaYw.js.map → CopyButton-DfYAslz-.js.map} +1 -1
  77. package/dist/{DashedButton-BX8hfY1x.cjs → DashedButton-CZ2hjLxT.cjs} +2 -2
  78. package/dist/{DashedButton-BX8hfY1x.cjs.map → DashedButton-CZ2hjLxT.cjs.map} +1 -1
  79. package/dist/{DashedButton-wcmXTYBw.js → DashedButton-meJSIY61.js} +2 -2
  80. package/dist/{DashedButton-wcmXTYBw.js.map → DashedButton-meJSIY61.js.map} +1 -1
  81. package/dist/{DatePicker-CSIBYSZt.js → DatePicker-CNUDjOxA.js} +5 -5
  82. package/dist/{DatePicker-CSIBYSZt.js.map → DatePicker-CNUDjOxA.js.map} +1 -1
  83. package/dist/{DatePicker-Bw9gLB8o.cjs → DatePicker-DrIHa1j1.cjs} +2 -2
  84. package/dist/{DatePicker-Bw9gLB8o.cjs.map → DatePicker-DrIHa1j1.cjs.map} +1 -1
  85. package/dist/{DateTimePicker-kikKdt0F.cjs → DateTimePicker-BzwxaOPb.cjs} +2 -2
  86. package/dist/{DateTimePicker-kikKdt0F.cjs.map → DateTimePicker-BzwxaOPb.cjs.map} +1 -1
  87. package/dist/{DateTimePicker-C9F2yJMf.js → DateTimePicker-CvWNDbib.js} +8 -8
  88. package/dist/{DateTimePicker-C9F2yJMf.js.map → DateTimePicker-CvWNDbib.js.map} +1 -1
  89. package/dist/{DescriptionList-DnGkHdzT.cjs → DescriptionList-Bed1MHU8.cjs} +2 -2
  90. package/dist/{DescriptionList-DnGkHdzT.cjs.map → DescriptionList-Bed1MHU8.cjs.map} +1 -1
  91. package/dist/{DescriptionList-kfNXbf_D.js → DescriptionList-BgMNjHJQ.js} +5 -5
  92. package/dist/{DescriptionList-kfNXbf_D.js.map → DescriptionList-BgMNjHJQ.js.map} +1 -1
  93. package/dist/{Dropdown-C_y9_dVn.cjs → Dropdown-DNL7RWdL.cjs} +2 -2
  94. package/dist/{Dropdown-C_y9_dVn.cjs.map → Dropdown-DNL7RWdL.cjs.map} +1 -1
  95. package/dist/{Dropdown-D-D_Z1Jo.js → Dropdown-iWbHokT7.js} +2 -2
  96. package/dist/{Dropdown-D-D_Z1Jo.js.map → Dropdown-iWbHokT7.js.map} +1 -1
  97. package/dist/{EmptyState-BM5LrRLq.cjs → EmptyState-BzwrOICc.cjs} +2 -2
  98. package/dist/{EmptyState-BM5LrRLq.cjs.map → EmptyState-BzwrOICc.cjs.map} +1 -1
  99. package/dist/{EmptyState-DrSj2XV_.js → EmptyState-CmcjJl_K.js} +3 -3
  100. package/dist/{EmptyState-DrSj2XV_.js.map → EmptyState-CmcjJl_K.js.map} +1 -1
  101. package/dist/{ErrorBoundary-yz669VEu.cjs → ErrorBoundary-BcZgeSsu.cjs} +2 -2
  102. package/dist/{ErrorBoundary-yz669VEu.cjs.map → ErrorBoundary-BcZgeSsu.cjs.map} +1 -1
  103. package/dist/{ErrorBoundary-DsP4hO_V.js → ErrorBoundary-TfeJetWc.js} +3 -3
  104. package/dist/{ErrorBoundary-DsP4hO_V.js.map → ErrorBoundary-TfeJetWc.js.map} +1 -1
  105. package/dist/{ErrorState-BThPIYaM.cjs → ErrorState-CzWz5UcX.cjs} +2 -2
  106. package/dist/{ErrorState-BThPIYaM.cjs.map → ErrorState-CzWz5UcX.cjs.map} +1 -1
  107. package/dist/{ErrorState-DEngucdq.js → ErrorState-EjIhdq7S.js} +8 -8
  108. package/dist/{ErrorState-DEngucdq.js.map → ErrorState-EjIhdq7S.js.map} +1 -1
  109. package/dist/{FileCard-CmCESTQd.js → FileCard-CmMxVyk3.js} +5 -5
  110. package/dist/{FileCard-CmCESTQd.js.map → FileCard-CmMxVyk3.js.map} +1 -1
  111. package/dist/{FileCard-wxDT2rj9.cjs → FileCard-Cxr1_eF2.cjs} +2 -2
  112. package/dist/{FileCard-wxDT2rj9.cjs.map → FileCard-Cxr1_eF2.cjs.map} +1 -1
  113. package/dist/{FileUploader-Dp1r4Sxc.js → FileUploader-2cXBI4Nh.js} +7 -7
  114. package/dist/{FileUploader-Dp1r4Sxc.js.map → FileUploader-2cXBI4Nh.js.map} +1 -1
  115. package/dist/{FileUploader-DBNRp5eT.cjs → FileUploader-BkM1t2aE.cjs} +2 -2
  116. package/dist/{FileUploader-DBNRp5eT.cjs.map → FileUploader-BkM1t2aE.cjs.map} +1 -1
  117. package/dist/{Flag-B6OhgwZr.cjs → Flag-CWp81_zX.cjs} +2 -2
  118. package/dist/{Flag-B6OhgwZr.cjs.map → Flag-CWp81_zX.cjs.map} +1 -1
  119. package/dist/{Flag-Q3vI7cgt.js → Flag-IQolG3j6.js} +2 -2
  120. package/dist/{Flag-Q3vI7cgt.js.map → Flag-IQolG3j6.js.map} +1 -1
  121. package/dist/{FullscreenToggle-WGsbE3Op.js → FullscreenToggle-B1DH_-k3.js} +4 -4
  122. package/dist/{FullscreenToggle-WGsbE3Op.js.map → FullscreenToggle-B1DH_-k3.js.map} +1 -1
  123. package/dist/{FullscreenToggle-DVdQriWB.cjs → FullscreenToggle-DXVAeN3M.cjs} +2 -2
  124. package/dist/{FullscreenToggle-DVdQriWB.cjs.map → FullscreenToggle-DXVAeN3M.cjs.map} +1 -1
  125. package/dist/Icon-BoQmbW7j.cjs +2 -0
  126. package/dist/Icon-BoQmbW7j.cjs.map +1 -0
  127. package/dist/{Icon-B7DJn8Tw.js → Icon-DMMO32p6.js} +72 -71
  128. package/dist/Icon-DMMO32p6.js.map +1 -0
  129. package/dist/{IconButton-DSPdv-oI.cjs → IconButton-ChhZqleN.cjs} +2 -2
  130. package/dist/{IconButton-DSPdv-oI.cjs.map → IconButton-ChhZqleN.cjs.map} +1 -1
  131. package/dist/{IconButton-iWbUJAz7.js → IconButton-s5hohjxu.js} +2 -2
  132. package/dist/{IconButton-iWbUJAz7.js.map → IconButton-s5hohjxu.js.map} +1 -1
  133. package/dist/{ImageEditor-C40dp2-V.cjs → ImageEditor-C8tFTX4e.cjs} +2 -2
  134. package/dist/{ImageEditor-C40dp2-V.cjs.map → ImageEditor-C8tFTX4e.cjs.map} +1 -1
  135. package/dist/{ImageEditor-BDNys8pq.js → ImageEditor-DWbWjGQ8.js} +8 -8
  136. package/dist/{ImageEditor-BDNys8pq.js.map → ImageEditor-DWbWjGQ8.js.map} +1 -1
  137. package/dist/{List-DS91CZUt.js → List-DQlEG_S5.js} +2 -2
  138. package/dist/{List-DS91CZUt.js.map → List-DQlEG_S5.js.map} +1 -1
  139. package/dist/{List-CLUXeaXS.cjs → List-Dfa7mlSZ.cjs} +2 -2
  140. package/dist/{List-CLUXeaXS.cjs.map → List-Dfa7mlSZ.cjs.map} +1 -1
  141. package/dist/{ListItem-Ezmdk7q-.js → ListItem-CLmg9xKQ.js} +2 -2
  142. package/dist/{ListItem-Ezmdk7q-.js.map → ListItem-CLmg9xKQ.js.map} +1 -1
  143. package/dist/{ListItem-CguNjf-u.cjs → ListItem-CWM2fUS2.cjs} +2 -2
  144. package/dist/{ListItem-CguNjf-u.cjs.map → ListItem-CWM2fUS2.cjs.map} +1 -1
  145. package/dist/{Loader-RyFTP2X5.cjs → Loader-BCrMy9NU.cjs} +2 -2
  146. package/dist/{Loader-RyFTP2X5.cjs.map → Loader-BCrMy9NU.cjs.map} +1 -1
  147. package/dist/{Loader-DD1vfqmN.js → Loader-CShIWNfG.js} +2 -2
  148. package/dist/{Loader-DD1vfqmN.js.map → Loader-CShIWNfG.js.map} +1 -1
  149. package/dist/{LocationPicker-B594f0bz.cjs → LocationPicker-8Tt0zJU4.cjs} +2 -2
  150. package/dist/{LocationPicker-B594f0bz.cjs.map → LocationPicker-8Tt0zJU4.cjs.map} +1 -1
  151. package/dist/{LocationPicker-DpmYaYyd.js → LocationPicker-DsV_s2Ur.js} +8 -8
  152. package/dist/{LocationPicker-DpmYaYyd.js.map → LocationPicker-DsV_s2Ur.js.map} +1 -1
  153. package/dist/{Modal-DVGTD2Ck.js → Modal-BO7fHn0r.js} +4 -4
  154. package/dist/{Modal-DVGTD2Ck.js.map → Modal-BO7fHn0r.js.map} +1 -1
  155. package/dist/{Modal-7cCok6fV.cjs → Modal-yj92WLay.cjs} +2 -2
  156. package/dist/{Modal-7cCok6fV.cjs.map → Modal-yj92WLay.cjs.map} +1 -1
  157. package/dist/{MultiSelect-DTKNjUDH.cjs → MultiSelect-B6JZb_5N.cjs} +2 -2
  158. package/dist/{MultiSelect-DTKNjUDH.cjs.map → MultiSelect-B6JZb_5N.cjs.map} +1 -1
  159. package/dist/{MultiSelect-D-X833xt.js → MultiSelect-D-QWlfwD.js} +5 -5
  160. package/dist/{MultiSelect-D-X833xt.js.map → MultiSelect-D-QWlfwD.js.map} +1 -1
  161. package/dist/{NumberField-Xz4yQMlm.cjs → NumberField-CS5VMnk4.cjs} +2 -2
  162. package/dist/{NumberField-Xz4yQMlm.cjs.map → NumberField-CS5VMnk4.cjs.map} +1 -1
  163. package/dist/{NumberField-OPOl0Yph.js → NumberField-D_UxKjVN.js} +4 -4
  164. package/dist/{NumberField-OPOl0Yph.js.map → NumberField-D_UxKjVN.js.map} +1 -1
  165. package/dist/{OtpField-kd0YghZq.cjs → OtpField-BuS_8j9L.cjs} +2 -2
  166. package/dist/{OtpField-kd0YghZq.cjs.map → OtpField-BuS_8j9L.cjs.map} +1 -1
  167. package/dist/{OtpField-CLrDMNtS.js → OtpField-CpjDid5_.js} +2 -2
  168. package/dist/{OtpField-CLrDMNtS.js.map → OtpField-CpjDid5_.js.map} +1 -1
  169. package/dist/{PageError-v6MAH_OL.cjs → PageError-CTEOASeb.cjs} +2 -2
  170. package/dist/{PageError-v6MAH_OL.cjs.map → PageError-CTEOASeb.cjs.map} +1 -1
  171. package/dist/{PageError-BIiZDzey.js → PageError-DjyJrGmR.js} +5 -5
  172. package/dist/{PageError-BIiZDzey.js.map → PageError-DjyJrGmR.js.map} +1 -1
  173. package/dist/{PageLayout-DH3jochw.cjs → PageLayout-BYKRmCAL.cjs} +2 -2
  174. package/dist/{PageLayout-DH3jochw.cjs.map → PageLayout-BYKRmCAL.cjs.map} +1 -1
  175. package/dist/{PageLayout-BjaPfXvb.js → PageLayout-Cz1OhQZ7.js} +5 -5
  176. package/dist/{PageLayout-BjaPfXvb.js.map → PageLayout-Cz1OhQZ7.js.map} +1 -1
  177. package/dist/{PageNotFound-C1oSsMG-.js → PageNotFound-CwBtrllo.js} +5 -5
  178. package/dist/{PageNotFound-C1oSsMG-.js.map → PageNotFound-CwBtrllo.js.map} +1 -1
  179. package/dist/{PageNotFound-Cse4bROv.cjs → PageNotFound-u9Q4KG6B.cjs} +2 -2
  180. package/dist/{PageNotFound-Cse4bROv.cjs.map → PageNotFound-u9Q4KG6B.cjs.map} +1 -1
  181. package/dist/{Pagination-BNJdqcu4.js → Pagination-CLjNwqie.js} +3 -3
  182. package/dist/{Pagination-BNJdqcu4.js.map → Pagination-CLjNwqie.js.map} +1 -1
  183. package/dist/{Pagination-DkmfEmgK.cjs → Pagination-HtS5gPnd.cjs} +2 -2
  184. package/dist/{Pagination-DkmfEmgK.cjs.map → Pagination-HtS5gPnd.cjs.map} +1 -1
  185. package/dist/{PaletteField-DqZl1mK0.cjs → PaletteField-BSgx5pxh.cjs} +2 -2
  186. package/dist/{PaletteField-DqZl1mK0.cjs.map → PaletteField-BSgx5pxh.cjs.map} +1 -1
  187. package/dist/{PaletteField-Cdky6Zka.js → PaletteField-Bk7cnSla.js} +3 -3
  188. package/dist/{PaletteField-Cdky6Zka.js.map → PaletteField-Bk7cnSla.js.map} +1 -1
  189. package/dist/{PhoneField-jq-3_i_b.cjs → PhoneField-CzFv2Vci.cjs} +2 -2
  190. package/dist/{PhoneField-jq-3_i_b.cjs.map → PhoneField-CzFv2Vci.cjs.map} +1 -1
  191. package/dist/{PhoneField-DmFaJJEa.js → PhoneField-DhoumZNG.js} +5 -5
  192. package/dist/{PhoneField-DmFaJJEa.js.map → PhoneField-DhoumZNG.js.map} +1 -1
  193. package/dist/{Popconfirm-KOE9gGi6.cjs → Popconfirm-Cb9LlmZb.cjs} +2 -2
  194. package/dist/{Popconfirm-KOE9gGi6.cjs.map → Popconfirm-Cb9LlmZb.cjs.map} +1 -1
  195. package/dist/{Popconfirm-D-8ZG2WR.js → Popconfirm-D7J5JbF-.js} +4 -4
  196. package/dist/{Popconfirm-D-8ZG2WR.js.map → Popconfirm-D7J5JbF-.js.map} +1 -1
  197. package/dist/{Progress-CdX666FP.js → Progress-Bt2LDqbD.js} +2 -2
  198. package/dist/{Progress-CdX666FP.js.map → Progress-Bt2LDqbD.js.map} +1 -1
  199. package/dist/{Progress-7EyhPtnu.cjs → Progress-dAtQ2BN-.cjs} +2 -2
  200. package/dist/{Progress-7EyhPtnu.cjs.map → Progress-dAtQ2BN-.cjs.map} +1 -1
  201. package/dist/{QrCode-ClIJjjvF.cjs → QrCode-FHUAxI8u.cjs} +2 -2
  202. package/dist/{QrCode-ClIJjjvF.cjs.map → QrCode-FHUAxI8u.cjs.map} +1 -1
  203. package/dist/{QrCode-D7ocSDi7.js → QrCode-jaDZxZkv.js} +2 -2
  204. package/dist/{QrCode-D7ocSDi7.js.map → QrCode-jaDZxZkv.js.map} +1 -1
  205. package/dist/{RemoveDialog-DTzRPLaT.js → RemoveDialog-DdO5E3Wl.js} +6 -6
  206. package/dist/{RemoveDialog-DTzRPLaT.js.map → RemoveDialog-DdO5E3Wl.js.map} +1 -1
  207. package/dist/{RemoveDialog-UsSX5z8Y.cjs → RemoveDialog-eGNxdyoO.cjs} +2 -2
  208. package/dist/{RemoveDialog-UsSX5z8Y.cjs.map → RemoveDialog-eGNxdyoO.cjs.map} +1 -1
  209. package/dist/{RichTextEditor-Bh0Q3dIW.cjs → RichTextEditor-CoYuQurR.cjs} +2 -2
  210. package/dist/{RichTextEditor-Bh0Q3dIW.cjs.map → RichTextEditor-CoYuQurR.cjs.map} +1 -1
  211. package/dist/{RichTextEditor-BMctlkVC.js → RichTextEditor-DHRiJchI.js} +10 -10
  212. package/dist/{RichTextEditor-BMctlkVC.js.map → RichTextEditor-DHRiJchI.js.map} +1 -1
  213. package/dist/{RootLayout-BztZetpk.cjs → RootLayout-CEplIlVR.cjs} +2 -2
  214. package/dist/{RootLayout-BztZetpk.cjs.map → RootLayout-CEplIlVR.cjs.map} +1 -1
  215. package/dist/{RootLayout-CTkv4iQJ.js → RootLayout-pd66MZtI.js} +21 -21
  216. package/dist/{RootLayout-CTkv4iQJ.js.map → RootLayout-pd66MZtI.js.map} +1 -1
  217. package/dist/{Select-CmonDIIU.js → Select-C2iiQLMh.js} +4 -4
  218. package/dist/{Select-CmonDIIU.js.map → Select-C2iiQLMh.js.map} +1 -1
  219. package/dist/{Select-BzVyK6Ne.cjs → Select-CvW_T9R-.cjs} +2 -2
  220. package/dist/{Select-BzVyK6Ne.cjs.map → Select-CvW_T9R-.cjs.map} +1 -1
  221. package/dist/Sidebar-CqGCazeA.cjs +2 -0
  222. package/dist/Sidebar-CqGCazeA.cjs.map +1 -0
  223. package/dist/Sidebar-DuUhzQBi.js +543 -0
  224. package/dist/Sidebar-DuUhzQBi.js.map +1 -0
  225. package/dist/{Slider-Oe9VSAdy.cjs → Slider-DlPMPdHA.cjs} +2 -2
  226. package/dist/{Slider-Oe9VSAdy.cjs.map → Slider-DlPMPdHA.cjs.map} +1 -1
  227. package/dist/{Slider-C7Wb3q_F.js → Slider-UY29adRu.js} +2 -2
  228. package/dist/{Slider-C7Wb3q_F.js.map → Slider-UY29adRu.js.map} +1 -1
  229. package/dist/{SpeedDial-DpIXoYHB.cjs → SpeedDial-Cms5pJ9t.cjs} +2 -2
  230. package/dist/{SpeedDial-DpIXoYHB.cjs.map → SpeedDial-Cms5pJ9t.cjs.map} +1 -1
  231. package/dist/{SpeedDial-CCGQlwn2.js → SpeedDial-DOWefQgo.js} +3 -3
  232. package/dist/{SpeedDial-CCGQlwn2.js.map → SpeedDial-DOWefQgo.js.map} +1 -1
  233. package/dist/{Stepper-PBDU60G_.cjs → Stepper-4wCyTnwi.cjs} +2 -2
  234. package/dist/{Stepper-PBDU60G_.cjs.map → Stepper-4wCyTnwi.cjs.map} +1 -1
  235. package/dist/{Stepper-D_WKS1RG.js → Stepper-yQEJkbUJ.js} +3 -3
  236. package/dist/{Stepper-D_WKS1RG.js.map → Stepper-yQEJkbUJ.js.map} +1 -1
  237. package/dist/{SwatchPicker-DS4WY2eM.js → SwatchPicker-BI0XHphv.js} +2 -2
  238. package/dist/{SwatchPicker-DS4WY2eM.js.map → SwatchPicker-BI0XHphv.js.map} +1 -1
  239. package/dist/{SwatchPicker-DCjE0T80.cjs → SwatchPicker-QYtqEUxX.cjs} +2 -2
  240. package/dist/{SwatchPicker-DCjE0T80.cjs.map → SwatchPicker-QYtqEUxX.cjs.map} +1 -1
  241. package/dist/{Table-DZQVa_PE.js → Table-CNrt1EWm.js} +19 -19
  242. package/dist/{Table-DZQVa_PE.js.map → Table-CNrt1EWm.js.map} +1 -1
  243. package/dist/{Table-CZ4n4-TN.cjs → Table-D4pqLNtE.cjs} +2 -2
  244. package/dist/{Table-CZ4n4-TN.cjs.map → Table-D4pqLNtE.cjs.map} +1 -1
  245. package/dist/{Tabs-Byhqm-TE.cjs → Tabs-D6qrgZTM.cjs} +2 -2
  246. package/dist/{Tabs-Byhqm-TE.cjs.map → Tabs-D6qrgZTM.cjs.map} +1 -1
  247. package/dist/{Tabs-B063mP-v.js → Tabs-lezN63jW.js} +3 -3
  248. package/dist/{Tabs-B063mP-v.js.map → Tabs-lezN63jW.js.map} +1 -1
  249. package/dist/{TagsField-g_LtwYgz.cjs → TagsField-BIJEDyfz.cjs} +2 -2
  250. package/dist/{TagsField-g_LtwYgz.cjs.map → TagsField-BIJEDyfz.cjs.map} +1 -1
  251. package/dist/{TagsField-hQFYyNcM.js → TagsField-D_a2I8eU.js} +5 -5
  252. package/dist/{TagsField-hQFYyNcM.js.map → TagsField-D_a2I8eU.js.map} +1 -1
  253. package/dist/{TextField-Dfpk0jOg.js → TextField-BsC2zoHI.js} +4 -4
  254. package/dist/{TextField-Dfpk0jOg.js.map → TextField-BsC2zoHI.js.map} +1 -1
  255. package/dist/{TextField-D4s2hGSd.cjs → TextField-CXDBlP-8.cjs} +2 -2
  256. package/dist/{TextField-D4s2hGSd.cjs.map → TextField-CXDBlP-8.cjs.map} +1 -1
  257. package/dist/{ThemeToggle-BQQ3eswr.js → ThemeToggle-Dh6XxqM7.js} +4 -4
  258. package/dist/{ThemeToggle-BQQ3eswr.js.map → ThemeToggle-Dh6XxqM7.js.map} +1 -1
  259. package/dist/{ThemeToggle-BTTI7Jz0.cjs → ThemeToggle-zbKf4ph5.cjs} +2 -2
  260. package/dist/{ThemeToggle-BTTI7Jz0.cjs.map → ThemeToggle-zbKf4ph5.cjs.map} +1 -1
  261. package/dist/{TimeColumns-BpjhrNCq.js → TimeColumns-CR__2LXh.js} +2 -2
  262. package/dist/{TimeColumns-BpjhrNCq.js.map → TimeColumns-CR__2LXh.js.map} +1 -1
  263. package/dist/{TimeColumns-DZYGWWG_.cjs → TimeColumns-CjBeUPtV.cjs} +2 -2
  264. package/dist/{TimeColumns-DZYGWWG_.cjs.map → TimeColumns-CjBeUPtV.cjs.map} +1 -1
  265. package/dist/{TimePicker-mzoMIlpq.js → TimePicker-BakQ-wPd.js} +6 -6
  266. package/dist/{TimePicker-mzoMIlpq.js.map → TimePicker-BakQ-wPd.js.map} +1 -1
  267. package/dist/{TimePicker-DChtZgBs.cjs → TimePicker-DtqmD2bH.cjs} +2 -2
  268. package/dist/{TimePicker-DChtZgBs.cjs.map → TimePicker-DtqmD2bH.cjs.map} +1 -1
  269. package/dist/{Timeline-DOojNvLG.cjs → Timeline-CFKbPpAV.cjs} +2 -2
  270. package/dist/{Timeline-DOojNvLG.cjs.map → Timeline-CFKbPpAV.cjs.map} +1 -1
  271. package/dist/{Timeline-Dg03dwTN.js → Timeline-zCHcq7Ra.js} +2 -2
  272. package/dist/{Timeline-Dg03dwTN.js.map → Timeline-zCHcq7Ra.js.map} +1 -1
  273. package/dist/{Toaster-lonArt-H.cjs → Toaster-BpXPWJ_n.cjs} +2 -2
  274. package/dist/{Toaster-lonArt-H.cjs.map → Toaster-BpXPWJ_n.cjs.map} +1 -1
  275. package/dist/{Toaster-79DvOW80.js → Toaster-C5jWNL-o.js} +3 -3
  276. package/dist/{Toaster-79DvOW80.js.map → Toaster-C5jWNL-o.js.map} +1 -1
  277. package/dist/{ToggleButtonGroup-CGNRLxjg.cjs → ToggleButtonGroup-CbKtjm8O.cjs} +2 -2
  278. package/dist/{ToggleButtonGroup-CGNRLxjg.cjs.map → ToggleButtonGroup-CbKtjm8O.cjs.map} +1 -1
  279. package/dist/{ToggleButtonGroup-K6ZcrTZT.js → ToggleButtonGroup-D3Jltv0z.js} +2 -2
  280. package/dist/{ToggleButtonGroup-K6ZcrTZT.js.map → ToggleButtonGroup-D3Jltv0z.js.map} +1 -1
  281. package/dist/{TranslatedFields-CHHtXO_n.js → TranslatedFields-C8oxlGIQ.js} +5 -5
  282. package/dist/{TranslatedFields-CHHtXO_n.js.map → TranslatedFields-C8oxlGIQ.js.map} +1 -1
  283. package/dist/{TranslatedFields-BYpMrYaw.cjs → TranslatedFields-Che_ZPHk.cjs} +2 -2
  284. package/dist/{TranslatedFields-BYpMrYaw.cjs.map → TranslatedFields-Che_ZPHk.cjs.map} +1 -1
  285. package/dist/{UserCard-SlkCgZS9.cjs → UserCard-DlrdIJHW.cjs} +2 -2
  286. package/dist/{UserCard-SlkCgZS9.cjs.map → UserCard-DlrdIJHW.cjs.map} +1 -1
  287. package/dist/{UserCard-BJFNP_nl.js → UserCard-Dr1A_bdA.js} +5 -5
  288. package/dist/{UserCard-BJFNP_nl.js.map → UserCard-Dr1A_bdA.js.map} +1 -1
  289. package/dist/{authLayoutRoute-CgSQIDD5.cjs → authLayoutRoute-CPLqQVvx.cjs} +2 -2
  290. package/dist/{authLayoutRoute-CgSQIDD5.cjs.map → authLayoutRoute-CPLqQVvx.cjs.map} +1 -1
  291. package/dist/{authLayoutRoute-CEFmEYy7.js → authLayoutRoute-nSZq8JYA.js} +2 -2
  292. package/dist/{authLayoutRoute-CEFmEYy7.js.map → authLayoutRoute-nSZq8JYA.js.map} +1 -1
  293. package/dist/chunks/icons/{62-Bfupp-0A.js → 62-9nuZO-ct.js} +9 -10
  294. package/dist/chunks/icons/{62-CZZzM1ev.cjs → 62-DQQ1U3IB.cjs} +1 -1
  295. package/dist/components/Accordion/index.cjs +1 -1
  296. package/dist/components/Accordion/index.js +1 -1
  297. package/dist/components/Alert/index.cjs +1 -1
  298. package/dist/components/Alert/index.js +1 -1
  299. package/dist/components/AuthLayout/index.cjs +1 -1
  300. package/dist/components/AuthLayout/index.js +1 -1
  301. package/dist/components/Avatar/index.cjs +1 -1
  302. package/dist/components/Avatar/index.js +2 -2
  303. package/dist/components/Breadcrumbs/index.cjs +1 -1
  304. package/dist/components/Breadcrumbs/index.js +1 -1
  305. package/dist/components/Button/index.cjs +1 -1
  306. package/dist/components/Button/index.js +1 -1
  307. package/dist/components/Card/index.cjs +1 -1
  308. package/dist/components/Card/index.js +1 -1
  309. package/dist/components/Chip/index.cjs +1 -1
  310. package/dist/components/Chip/index.js +1 -1
  311. package/dist/components/ChoiceCard/index.cjs +1 -1
  312. package/dist/components/ChoiceCard/index.js +1 -1
  313. package/dist/components/CodeBlock/index.cjs +1 -1
  314. package/dist/components/CodeBlock/index.js +1 -1
  315. package/dist/components/ColorPicker/index.cjs +1 -1
  316. package/dist/components/ColorPicker/index.js +1 -1
  317. package/dist/components/ColorRamp/index.cjs +1 -1
  318. package/dist/components/ColorRamp/index.js +1 -1
  319. package/dist/components/CopyButton/index.cjs +1 -1
  320. package/dist/components/CopyButton/index.js +1 -1
  321. package/dist/components/DashedButton/index.cjs +1 -1
  322. package/dist/components/DashedButton/index.js +1 -1
  323. package/dist/components/DatePicker/index.cjs +1 -1
  324. package/dist/components/DatePicker/index.js +1 -1
  325. package/dist/components/DateTimePicker/index.cjs +1 -1
  326. package/dist/components/DateTimePicker/index.js +1 -1
  327. package/dist/components/DescriptionList/index.cjs +1 -1
  328. package/dist/components/DescriptionList/index.js +1 -1
  329. package/dist/components/Dropdown/index.cjs +1 -1
  330. package/dist/components/Dropdown/index.js +1 -1
  331. package/dist/components/EmptyState/index.cjs +1 -1
  332. package/dist/components/EmptyState/index.js +1 -1
  333. package/dist/components/ErrorState/index.cjs +1 -1
  334. package/dist/components/ErrorState/index.js +2 -2
  335. package/dist/components/FileCard/index.cjs +1 -1
  336. package/dist/components/FileCard/index.js +1 -1
  337. package/dist/components/FileUploader/index.cjs +1 -1
  338. package/dist/components/FileUploader/index.js +1 -1
  339. package/dist/components/Flag/index.cjs +1 -1
  340. package/dist/components/Flag/index.js +1 -1
  341. package/dist/components/FullscreenToggle/index.cjs +1 -1
  342. package/dist/components/FullscreenToggle/index.js +1 -1
  343. package/dist/components/Icon/index.cjs +1 -1
  344. package/dist/components/Icon/index.js +1 -1
  345. package/dist/components/IconButton/index.cjs +1 -1
  346. package/dist/components/IconButton/index.js +1 -1
  347. package/dist/components/ImageEditor/index.cjs +1 -1
  348. package/dist/components/ImageEditor/index.js +1 -1
  349. package/dist/components/List/index.cjs +1 -1
  350. package/dist/components/List/index.js +2 -2
  351. package/dist/components/Loader/index.cjs +1 -1
  352. package/dist/components/Loader/index.js +1 -1
  353. package/dist/components/LocationPicker/index.cjs +1 -1
  354. package/dist/components/LocationPicker/index.js +1 -1
  355. package/dist/components/Modal/index.cjs +1 -1
  356. package/dist/components/Modal/index.js +1 -1
  357. package/dist/components/MultiSelect/index.cjs +1 -1
  358. package/dist/components/MultiSelect/index.js +1 -1
  359. package/dist/components/NumberField/index.cjs +1 -1
  360. package/dist/components/NumberField/index.js +1 -1
  361. package/dist/components/OtpField/index.cjs +1 -1
  362. package/dist/components/OtpField/index.js +1 -1
  363. package/dist/components/PageError/index.cjs +1 -1
  364. package/dist/components/PageError/index.js +1 -1
  365. package/dist/components/PageLayout/index.cjs +1 -1
  366. package/dist/components/PageLayout/index.js +1 -1
  367. package/dist/components/PageNotFound/index.cjs +1 -1
  368. package/dist/components/PageNotFound/index.js +1 -1
  369. package/dist/components/Pagination/index.cjs +1 -1
  370. package/dist/components/Pagination/index.js +1 -1
  371. package/dist/components/PaletteField/index.cjs +1 -1
  372. package/dist/components/PaletteField/index.js +1 -1
  373. package/dist/components/PhoneField/index.cjs +1 -1
  374. package/dist/components/PhoneField/index.js +1 -1
  375. package/dist/components/Popconfirm/index.cjs +1 -1
  376. package/dist/components/Popconfirm/index.js +1 -1
  377. package/dist/components/Progress/index.cjs +1 -1
  378. package/dist/components/Progress/index.js +1 -1
  379. package/dist/components/QrCode/index.cjs +1 -1
  380. package/dist/components/QrCode/index.js +1 -1
  381. package/dist/components/RemoveDialog/index.cjs +1 -1
  382. package/dist/components/RemoveDialog/index.js +1 -1
  383. package/dist/components/RichTextEditor/index.cjs +1 -1
  384. package/dist/components/RichTextEditor/index.js +1 -1
  385. package/dist/components/RootLayout/index.cjs +1 -1
  386. package/dist/components/RootLayout/index.js +1 -1
  387. package/dist/components/Select/index.cjs +1 -1
  388. package/dist/components/Select/index.js +1 -1
  389. package/dist/components/Sidebar/Sidebar.d.cts +40 -4
  390. package/dist/components/Sidebar/Sidebar.d.ts +40 -4
  391. package/dist/components/Sidebar/index.cjs +1 -1
  392. package/dist/components/Sidebar/index.d.cts +2 -1
  393. package/dist/components/Sidebar/index.d.ts +2 -1
  394. package/dist/components/Sidebar/index.js +5 -4
  395. package/dist/components/Slider/index.cjs +1 -1
  396. package/dist/components/Slider/index.js +1 -1
  397. package/dist/components/SpeedDial/index.cjs +1 -1
  398. package/dist/components/SpeedDial/index.js +1 -1
  399. package/dist/components/Stepper/index.cjs +1 -1
  400. package/dist/components/Stepper/index.js +1 -1
  401. package/dist/components/SwatchPicker/index.cjs +1 -1
  402. package/dist/components/SwatchPicker/index.js +1 -1
  403. package/dist/components/Table/index.cjs +1 -1
  404. package/dist/components/Table/index.js +1 -1
  405. package/dist/components/Tabs/index.cjs +1 -1
  406. package/dist/components/Tabs/index.js +1 -1
  407. package/dist/components/TagsField/index.cjs +1 -1
  408. package/dist/components/TagsField/index.js +1 -1
  409. package/dist/components/TextField/index.cjs +1 -1
  410. package/dist/components/TextField/index.js +1 -1
  411. package/dist/components/ThemeToggle/index.cjs +1 -1
  412. package/dist/components/ThemeToggle/index.js +1 -1
  413. package/dist/components/TimePicker/index.cjs +1 -1
  414. package/dist/components/TimePicker/index.js +1 -1
  415. package/dist/components/Timeline/index.cjs +1 -1
  416. package/dist/components/Timeline/index.js +1 -1
  417. package/dist/components/Toast/index.cjs +1 -1
  418. package/dist/components/Toast/index.js +1 -1
  419. package/dist/components/ToggleButton/index.cjs +1 -1
  420. package/dist/components/ToggleButton/index.js +1 -1
  421. package/dist/components/TranslatedFields/index.cjs +1 -1
  422. package/dist/components/TranslatedFields/index.js +1 -1
  423. package/dist/components/UserCard/index.cjs +1 -1
  424. package/dist/components/UserCard/index.js +1 -1
  425. package/dist/entries/app.cjs +1 -1
  426. package/dist/entries/app.js +1 -1
  427. package/dist/entries/auth.cjs +1 -1
  428. package/dist/entries/auth.js +2 -2
  429. package/dist/entries/components.cjs +1 -1
  430. package/dist/entries/components.js +157 -156
  431. package/dist/entries/i18n.cjs +1 -1
  432. package/dist/entries/i18n.js +2 -2
  433. package/dist/entries/icons.cjs +1 -1
  434. package/dist/entries/icons.js +1 -1
  435. package/dist/entries/theme.cjs +1 -1
  436. package/dist/entries/theme.js +1 -1
  437. package/dist/i18n/messages.d.cts +4 -0
  438. package/dist/i18n/messages.d.ts +4 -0
  439. package/dist/index.cjs +1 -1
  440. package/dist/index.css +1 -1
  441. package/dist/index.js +173 -172
  442. package/dist/{messages-DeQuvGln.js → messages-CZbb1xNN.js} +29 -15
  443. package/dist/messages-CZbb1xNN.js.map +1 -0
  444. package/dist/messages-D4ooXnUr.cjs +36 -0
  445. package/dist/messages-D4ooXnUr.cjs.map +1 -0
  446. package/dist/useHomeTo---51HTJ0.cjs +2 -0
  447. package/dist/useHomeTo---51HTJ0.cjs.map +1 -0
  448. package/dist/useHomeTo-CJj94TdV.js +10 -0
  449. package/dist/useHomeTo-CJj94TdV.js.map +1 -0
  450. package/dist/{useOptionMenu-6ZffgbYG.cjs → useOptionMenu-DS___46k.cjs} +2 -2
  451. package/dist/{useOptionMenu-6ZffgbYG.cjs.map → useOptionMenu-DS___46k.cjs.map} +1 -1
  452. package/dist/{useOptionMenu-CxM6FHXL.js → useOptionMenu-Sp2d3Bzi.js} +6 -6
  453. package/dist/{useOptionMenu-CxM6FHXL.js.map → useOptionMenu-Sp2d3Bzi.js.map} +1 -1
  454. package/package.json +1 -1
  455. package/dist/Icon-B7DJn8Tw.js.map +0 -1
  456. package/dist/Icon-CBg21lKA.cjs +0 -2
  457. package/dist/Icon-CBg21lKA.cjs.map +0 -1
  458. package/dist/Sidebar-CLr-DyQ_.js +0 -522
  459. package/dist/Sidebar-CLr-DyQ_.js.map +0 -1
  460. package/dist/Sidebar-CM-jZfj5.cjs +0 -2
  461. package/dist/Sidebar-CM-jZfj5.cjs.map +0 -1
  462. package/dist/messages-DeQuvGln.js.map +0 -1
  463. package/dist/messages-dL9MkVze.cjs +0 -36
  464. package/dist/messages-dL9MkVze.cjs.map +0 -1
  465. package/dist/useHomeTo-BLSvhJd5.js +0 -25
  466. package/dist/useHomeTo-BLSvhJd5.js.map +0 -1
  467. package/dist/useHomeTo-cXCg1tf0.cjs +0 -2
  468. package/dist/useHomeTo-cXCg1tf0.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePicker-C9F2yJMf.js","sources":["../src/components/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { useFormContext } from '../../form/formContext'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tabs } from '../Tabs'\nimport { Typography } from '../Typography'\nimport { Calendar } from '../DatePicker/Calendar'\nimport {\n applyMask,\n localWallToUtc,\n maskFromFormat,\n parseISO,\n parseInput,\n parseValue,\n today,\n toISO,\n utcToLocalWall,\n type Dayjs,\n} from '../DatePicker/dateUtils'\nimport styles from '../DatePicker/DatePicker.module.css'\nimport dt from './DateTimePicker.module.css'\nimport { TimeColumns } from './TimeColumns'\n\nexport type DateTimePickerSize = 'sm' | 'md' | 'lg'\n\nexport interface DateTimePickerProps {\n /** Label rendered above the field. */\n label?: ReactNode\n /** Preset size — control height, font and calendar density. */\n size?: DateTimePickerSize\n /** Marks the field invalid: red border/ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the field. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the field to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Disables the field. */\n disabled?: boolean\n /** Controlled value — a datetime string in `valueFormat` (default ISO datetime; `''` = empty). */\n value?: string\n /** Initial value for uncontrolled use (in `valueFormat`). */\n defaultValue?: string\n /** Fires with the next datetime in `valueFormat` (`''` when cleared). */\n onChange?: (value: string) => void\n /**\n * Display + typed-input format (dayjs tokens). Defaults to `'DD/MM/YYYY HH:mm:ss'` (or `hh:mm:ss A`\n * when `hour12`; the `:ss` is dropped when `showSeconds` is `false`).\n */\n format?: string\n /**\n * Wire format of `value`/`defaultValue`/`onChange` (dayjs tokens), decoupled from the displayed\n * `format`. Defaults to the ISO datetime `'YYYY-MM-DDTHH:mm:ss[Z]'` when `utc` (the `Z` marks the\n * value as UTC, e.g. `'2026-06-10T09:35:00Z'`), or `'YYYY-MM-DDTHH:mm:ss'` (no `Z`) when `utc={false}`.\n * Incoming values are parsed **leniently** (this format, then any ISO-8601 string — so a backend\n * datetime like `'2026-06-10T09:35:49.6134342'` with or without `Z` is accepted).\n */\n valueFormat?: string\n /**\n * Treat the value as **UTC** and display/edit in the viewer's **local** timezone (default `true`).\n * Set `false` to disable timezone conversion entirely — the field shows and emits the value's exact\n * wall-clock (what you pick is what's sent, no UTC shift).\n */\n utc?: boolean\n /** 12-hour clock (1–12 + AM/PM) instead of 24-hour (0–23). Defaults to `false`. */\n hour12?: boolean\n /** Minute increment for the minutes column. Defaults to `1`. */\n minuteStep?: number\n /** Show the seconds column + `:ss` in the default format. Defaults to `true`; pass `false` to hide seconds. */\n showSeconds?: boolean\n /** Placeholder shown when empty. Defaults to the lowercased `format`. */\n placeholder?: string\n /** Earliest selectable date (ISO date or datetime; day-level bound on the calendar). */\n min?: string\n /** Latest selectable date (ISO date or datetime; day-level bound on the calendar). */\n max?: string\n /** Disables specific dates — receives each day as an ISO `'YYYY-MM-DD'` string. */\n disabledDate?: (date: string) => boolean\n /** First day of the week: 0 = Sunday … 6 = Saturday. Defaults to `1` (Monday). */\n weekStartsOn?: number\n /** Shows a clear (×) button when a value is set. Defaults to `true`. */\n clearable?: boolean\n /** Form field name — auto-binds to a surrounding `<Form>` (value is the datetime string). */\n name?: string\n /** Id for the input (label association). */\n id?: string\n className?: string\n style?: CSSProperties\n}\n\nfunction defaultFormatFor(hour12: boolean, showSeconds: boolean): string {\n const time = hour12\n ? showSeconds\n ? 'hh:mm:ss A'\n : 'hh:mm A'\n : showSeconds\n ? 'HH:mm:ss'\n : 'HH:mm'\n return `DD/MM/YYYY ${time}`\n}\n\n/**\n * A datetime field with a typed, masked input **and** a popover combining the keyboard-navigable\n * `Calendar` (date) with scrollable time columns (hour / minute / optional second + AM/PM in 12-hour\n * mode). All math runs in **UTC** so the instant never drifts with the viewer's timezone; the value is a\n * string in `valueFormat` (UTC ISO datetime with a `Z` by default, or no `Z` when `utc={false}`) — incoming values are parsed\n * leniently (a richer backend datetime is accepted) and the chosen instant is emitted in that format.\n * Picking a date keeps the time and vice-versa; a day pick advances to the Time tab, and the popover\n * stays open until you click away, press Escape, or hit Done. Supports `hour12`, `minuteStep`, `showSeconds`, `min`/`max`,\n * `disabledDate`, `weekStartsOn`, and `clearable`. Controlled (`value` + `onChange`) or uncontrolled\n * (`defaultValue`), and binds to a surrounding `<Form>` by `name`. Requires the `dayjs` peer dependency.\n */\nexport const DateTimePicker = forwardRef<HTMLInputElement, DateTimePickerProps>(\n function DateTimePicker(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n disabled = false,\n value,\n defaultValue,\n onChange,\n format: formatProp,\n valueFormat: valueFormatProp,\n utc = true,\n hour12 = false,\n minuteStep = 1,\n showSeconds = true,\n placeholder,\n min,\n max,\n disabledDate,\n weekStartsOn = 1,\n clearable = true,\n name,\n id: idProp,\n className,\n style,\n },\n ref,\n ) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n const labelId = `${id}-label`\n const format = formatProp ?? defaultFormatFor(hour12, showSeconds)\n // when the value is UTC, the wire string carries a `Z` (\"…09:35:00Z\"); `utc={false}` emits the\n // bare wall-clock (no zone designator). Override either via `valueFormat`.\n const valueFormat = valueFormatProp ?? (utc ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ss')\n\n // ── value (controlled / form-bound / uncontrolled) — a `valueFormat` datetime string ────────────\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = isFormBound ? form!.field(name!) : undefined\n const externalValue =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as string | undefined) ?? '')\n : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string>(defaultValue ?? '')\n const currentValue = isControlled ? externalValue! : internal\n // when `utc`, parse the UTC value and show it in the viewer's LOCAL time (value stays UTC, emit\n // converts back); when `utc={false}`, show/emit the value's exact wall-clock (no tz conversion)\n const toDisplay = (instant: Dayjs | null) => (utc ? utcToLocalWall(instant) : instant)\n const selected = toDisplay(parseValue(currentValue, valueFormat))\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const minDate = toDisplay(parseValue(min, valueFormat))\n const maxDate = toDisplay(parseValue(max, valueFormat))\n const mask = maskFromFormat(format)\n // precision the user can actually type — driven by the display `format`, not just `showSeconds`\n const timeUnit = /s/.test(format) ? 'second' : 'minute'\n\n const commit = (next: string) => {\n if (next === currentValue) return // skip redundant onChange / setValue with an unchanged value\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n\n // emit a datetime in the wire `valueFormat` (time preserved), or '' to clear. Re-picking the same\n // instant is a no-op (string equality alone would leak a spurious emit for sub-second source values)\n const commitDateTime = (d: Dayjs | null) => {\n if (d && selected && d.isSame(selected, 'second')) return\n // local-wall → UTC for the wire value (or emit the wall-clock as-is when `utc={false}`)\n commit(d ? (utc ? localWallToUtc(d) : d).format(valueFormat) : '')\n }\n\n // true when `d` differs from the current value at the input's precision — gates typed-input commits\n // so a no-op round-trip (focus/blur) never rewrites an unchanged value's finer time\n const changed = (d: Dayjs) => !selected || !d.isSame(selected, timeUnit)\n\n // input display text (kept in sync with the committed value; free while typing an incomplete value)\n const [inputText, setInputText] = useState<string>(() =>\n selected ? selected.format(format) : '',\n )\n useEffect(() => {\n setInputText(selected ? selected.format(format) : '')\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentValue, format, valueFormat])\n\n // ── popover ──────────────────────────────────────────────────────────────────────────────────\n const triggerRef = useRef<HTMLDivElement | null>(null)\n const inputRef = useRef<HTMLInputElement | null>(null)\n const [open, setOpen] = useState(false)\n const [viewMonth, setViewMonth] = useState<Dayjs>(() => selected ?? today())\n // which popover tab is active — controlled so picking a day can auto-advance to Time\n const [tab, setTab] = useState<'date' | 'time'>('date')\n const advanceRef = useRef(false) // set when a day-pick advances to Time → move focus there\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLInputElement | null }).current = node\n },\n [ref],\n )\n\n const fieldBlurRef = useRef<(() => void) | undefined>(undefined)\n fieldBlurRef.current = bound\n ? () => bound.onBlur({} as FocusEvent<HTMLInputElement>)\n : undefined\n\n // the floating panel forwards its node here, for the blur check + the auto-advance focus move\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const closePopover = useCallback((refocus: boolean) => {\n setOpen(false)\n fieldBlurRef.current?.()\n if (refocus) inputRef.current?.focus()\n }, [])\n\n useEffect(() => {\n if (open) {\n setViewMonth(selected ?? today())\n setTab('date') // always open on the Date tab\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open])\n\n // after a day-pick auto-advances to the Time tab, move focus onto it so the focus trap holds\n // (the just-picked calendar cell has unmounted); a manual tab switch never triggers this\n useEffect(() => {\n if (tab === 'time' && advanceRef.current) {\n advanceRef.current = false\n popoverRef.current\n ?.querySelector<HTMLElement>('[role=\"tab\"][aria-selected=\"true\"]')\n ?.focus()\n }\n }, [tab, popoverRef])\n\n const isOutOfRange = (d: Dayjs): boolean => {\n if (minDate && d.isBefore(minDate, 'day')) return true\n if (maxDate && d.isAfter(maxDate, 'day')) return true\n return Boolean(disabledDate && disabledDate(toISO(d)))\n }\n\n const handleInputChange = (raw: string) => {\n const masked = applyMask(raw, mask)\n setInputText(masked)\n if (masked === '') {\n commit('') // emptying the field clears the value\n return\n }\n const parsed = parseInput(masked, format)\n if (parsed && !isOutOfRange(parsed) && changed(parsed)) commitDateTime(parsed)\n }\n\n const handleInputBlur = (event: FocusEvent<HTMLInputElement>) => {\n const parsed = parseInput(inputText, format)\n if (inputText === '') {\n commit('') // an emptied field stays cleared\n } else if (parsed && !isOutOfRange(parsed)) {\n if (changed(parsed)) commitDateTime(parsed)\n setInputText(parsed.format(format))\n } else {\n setInputText(selected ? selected.format(format) : '')\n }\n const nextEl = event.relatedTarget as Node | null\n if (nextEl && (popoverRef.current?.contains(nextEl) || triggerRef.current?.contains(nextEl)))\n return\n bound?.onBlur(event)\n }\n\n // picking a day keeps the current time; picking a time keeps the current day — the popover stays open\n const handleSelectDate = (iso: string) => {\n const date = parseISO(iso)\n if (!date) return\n const base = selected ?? today()\n commitDateTime(date.hour(base.hour()).minute(base.minute()).second(base.second()))\n advanceRef.current = true\n setTab('time') // picking a day advances to the Time tab\n }\n const handleTimeChange = (next: Dayjs) => commitDateTime(next)\n\n const iconSize: 'sm' | 'md' = size === 'sm' ? 'sm' : 'md'\n\n return (\n <div\n className={clsx(\n styles.field,\n styles[size],\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n >\n {label != null && (\n <label htmlFor={id} className={styles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n <div ref={triggerRef} className={clsx(styles.control, open && styles.open)}>\n <input\n ref={setInputRef}\n id={id}\n name={name}\n className={styles.input}\n value={inputText}\n placeholder={placeholder ?? format.toLowerCase()}\n disabled={disabled}\n autoComplete=\"off\"\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n onChange={(e) => handleInputChange(e.target.value)}\n onBlur={handleInputBlur}\n />\n\n {clearable && currentValue !== '' && !disabled && (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label={t('dateTimePicker.clear')}\n tabIndex={-1}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n commit('')\n setInputText('')\n inputRef.current?.focus()\n }}\n >\n <Icon name=\"CloseCircle\" size=\"sm\" />\n </button>\n )}\n\n <IconButton\n type=\"button\"\n variant=\"text\"\n color=\"primary\"\n size={size}\n disabled={disabled}\n aria-label={t('dateTimePicker.open')}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n className={styles.calendarButton}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => setOpen((o) => !o)}\n >\n <Icon name=\"Calendar3\" size={iconSize} />\n </IconButton>\n </div>\n\n <FloatingPanel\n ref={popoverRef}\n open={open}\n triggerRef={triggerRef}\n onClose={closePopover}\n role=\"dialog\"\n ariaLabel={t('dateTimePicker.dialog')}\n trapFocus\n className={clsx(styles.popover, dt.popover)}\n >\n <Tabs\n className={dt.tabs}\n aria-label={t('dateTimePicker.label')}\n fullWidth\n autoFocus\n // the Date/Time tabs are internal popover UI — never sync them to the page URL\n queryKey={null}\n value={tab}\n onChange={(v) => setTab(v as 'date' | 'time')}\n items={[\n {\n value: 'date',\n label: t('dateTimePicker.dateTab'),\n icon: 'Calendar3',\n content: (\n <Calendar\n value={selected}\n month={viewMonth}\n onMonthChange={setViewMonth}\n onSelect={handleSelectDate}\n min={minDate}\n max={maxDate}\n disabledDate={disabledDate}\n weekStartsOn={weekStartsOn}\n labelId={labelId}\n />\n ),\n },\n {\n value: 'time',\n label: t('dateTimePicker.timeTab'),\n icon: 'Clock',\n content: (\n <div className={dt.timePane}>\n <TimeColumns\n value={selected}\n onChange={handleTimeChange}\n hour12={hour12}\n minuteStep={minuteStep}\n showSeconds={showSeconds}\n />\n </div>\n ),\n },\n ]}\n />\n <div className={dt.footer}>\n <Button size=\"sm\" variant=\"filled\" color=\"primary\" onClick={() => closePopover(true)}>\n {t('common.done')}\n </Button>\n </div>\n </FloatingPanel>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={styles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n },\n)\n"],"names":["defaultFormatFor","hour12","showSeconds","DateTimePicker","forwardRef","label","size","error","helperText","required","fullWidth","disabled","value","defaultValue","onChange","formatProp","valueFormatProp","utc","minuteStep","placeholder","min","max","disabledDate","weekStartsOn","clearable","name","idProp","className","style","ref","t","useT","reactId","useId","id","helperId","labelId","format","valueFormat","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","currentValue","toDisplay","instant","utcToLocalWall","selected","parseValue","resolvedError","resolvedHelperText","minDate","maxDate","mask","maskFromFormat","timeUnit","commit","next","commitDateTime","d","localWallToUtc","changed","inputText","setInputText","useEffect","triggerRef","useRef","inputRef","open","setOpen","viewMonth","setViewMonth","today","tab","setTab","advanceRef","setInputRef","useCallback","node","fieldBlurRef","popoverRef","closePopover","refocus","_a","_b","isOutOfRange","toISO","handleInputChange","raw","masked","applyMask","parsed","parseInput","handleInputBlur","event","nextEl","handleSelectDate","iso","date","parseISO","base","handleTimeChange","iconSize","jsxs","clsx","styles","jsx","Typography","Icon","IconButton","o","FloatingPanel","dt","Tabs","v","Calendar","TimeColumns","Button"],"mappings":";;;;;;;;;;;;;;AAyGA,SAASA,GAAiBC,GAAiBC,GAA8B;AAQvE,SAAO,cAPMD,IACTC,IACE,eACA,YACFA,IACE,aACA,OACmB;AAC3B;AAaO,MAAMC,KAAiBC;AAAA,EAC5B,SACE;AAAA,IACE,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,KAAW;AAAA,IACX,WAAAC,KAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAQC;AAAA,IACR,aAAaC;AAAA,IACb,KAAAC,IAAM;AAAA,IACN,QAAAhB,IAAS;AAAA,IACT,YAAAiB,KAAa;AAAA,IACb,aAAAhB,IAAc;AAAA,IACd,aAAAiB;AAAA,IACA,KAAAC;AAAA,IACA,KAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC,KAAe;AAAA,IACf,WAAAC,KAAY;AAAA,IACZ,MAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,WAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,GAEFC,GACA;AACA,UAAMC,IAAIC,GAAA,GACJC,KAAUC,GAAA,GACVC,IAAKR,MAAUM,IACfG,IAAW,GAAGD,CAAE,WAChBE,KAAU,GAAGF,CAAE,UACfG,IAAStB,MAAcf,GAAiBC,GAAQC,CAAW,GAG3DoC,IAActB,OAAoB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AAO;AAAA,cAEjB,UAAAvD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
1
+ {"version":3,"file":"DateTimePicker-CvWNDbib.js","sources":["../src/components/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { useFormContext } from '../../form/formContext'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tabs } from '../Tabs'\nimport { Typography } from '../Typography'\nimport { Calendar } from '../DatePicker/Calendar'\nimport {\n applyMask,\n localWallToUtc,\n maskFromFormat,\n parseISO,\n parseInput,\n parseValue,\n today,\n toISO,\n utcToLocalWall,\n type Dayjs,\n} from '../DatePicker/dateUtils'\nimport styles from '../DatePicker/DatePicker.module.css'\nimport dt from './DateTimePicker.module.css'\nimport { TimeColumns } from './TimeColumns'\n\nexport type DateTimePickerSize = 'sm' | 'md' | 'lg'\n\nexport interface DateTimePickerProps {\n /** Label rendered above the field. */\n label?: ReactNode\n /** Preset size — control height, font and calendar density. */\n size?: DateTimePickerSize\n /** Marks the field invalid: red border/ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the field. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the field to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Disables the field. */\n disabled?: boolean\n /** Controlled value — a datetime string in `valueFormat` (default ISO datetime; `''` = empty). */\n value?: string\n /** Initial value for uncontrolled use (in `valueFormat`). */\n defaultValue?: string\n /** Fires with the next datetime in `valueFormat` (`''` when cleared). */\n onChange?: (value: string) => void\n /**\n * Display + typed-input format (dayjs tokens). Defaults to `'DD/MM/YYYY HH:mm:ss'` (or `hh:mm:ss A`\n * when `hour12`; the `:ss` is dropped when `showSeconds` is `false`).\n */\n format?: string\n /**\n * Wire format of `value`/`defaultValue`/`onChange` (dayjs tokens), decoupled from the displayed\n * `format`. Defaults to the ISO datetime `'YYYY-MM-DDTHH:mm:ss[Z]'` when `utc` (the `Z` marks the\n * value as UTC, e.g. `'2026-06-10T09:35:00Z'`), or `'YYYY-MM-DDTHH:mm:ss'` (no `Z`) when `utc={false}`.\n * Incoming values are parsed **leniently** (this format, then any ISO-8601 string — so a backend\n * datetime like `'2026-06-10T09:35:49.6134342'` with or without `Z` is accepted).\n */\n valueFormat?: string\n /**\n * Treat the value as **UTC** and display/edit in the viewer's **local** timezone (default `true`).\n * Set `false` to disable timezone conversion entirely — the field shows and emits the value's exact\n * wall-clock (what you pick is what's sent, no UTC shift).\n */\n utc?: boolean\n /** 12-hour clock (1–12 + AM/PM) instead of 24-hour (0–23). Defaults to `false`. */\n hour12?: boolean\n /** Minute increment for the minutes column. Defaults to `1`. */\n minuteStep?: number\n /** Show the seconds column + `:ss` in the default format. Defaults to `true`; pass `false` to hide seconds. */\n showSeconds?: boolean\n /** Placeholder shown when empty. Defaults to the lowercased `format`. */\n placeholder?: string\n /** Earliest selectable date (ISO date or datetime; day-level bound on the calendar). */\n min?: string\n /** Latest selectable date (ISO date or datetime; day-level bound on the calendar). */\n max?: string\n /** Disables specific dates — receives each day as an ISO `'YYYY-MM-DD'` string. */\n disabledDate?: (date: string) => boolean\n /** First day of the week: 0 = Sunday … 6 = Saturday. Defaults to `1` (Monday). */\n weekStartsOn?: number\n /** Shows a clear (×) button when a value is set. Defaults to `true`. */\n clearable?: boolean\n /** Form field name — auto-binds to a surrounding `<Form>` (value is the datetime string). */\n name?: string\n /** Id for the input (label association). */\n id?: string\n className?: string\n style?: CSSProperties\n}\n\nfunction defaultFormatFor(hour12: boolean, showSeconds: boolean): string {\n const time = hour12\n ? showSeconds\n ? 'hh:mm:ss A'\n : 'hh:mm A'\n : showSeconds\n ? 'HH:mm:ss'\n : 'HH:mm'\n return `DD/MM/YYYY ${time}`\n}\n\n/**\n * A datetime field with a typed, masked input **and** a popover combining the keyboard-navigable\n * `Calendar` (date) with scrollable time columns (hour / minute / optional second + AM/PM in 12-hour\n * mode). All math runs in **UTC** so the instant never drifts with the viewer's timezone; the value is a\n * string in `valueFormat` (UTC ISO datetime with a `Z` by default, or no `Z` when `utc={false}`) — incoming values are parsed\n * leniently (a richer backend datetime is accepted) and the chosen instant is emitted in that format.\n * Picking a date keeps the time and vice-versa; a day pick advances to the Time tab, and the popover\n * stays open until you click away, press Escape, or hit Done. Supports `hour12`, `minuteStep`, `showSeconds`, `min`/`max`,\n * `disabledDate`, `weekStartsOn`, and `clearable`. Controlled (`value` + `onChange`) or uncontrolled\n * (`defaultValue`), and binds to a surrounding `<Form>` by `name`. Requires the `dayjs` peer dependency.\n */\nexport const DateTimePicker = forwardRef<HTMLInputElement, DateTimePickerProps>(\n function DateTimePicker(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n disabled = false,\n value,\n defaultValue,\n onChange,\n format: formatProp,\n valueFormat: valueFormatProp,\n utc = true,\n hour12 = false,\n minuteStep = 1,\n showSeconds = true,\n placeholder,\n min,\n max,\n disabledDate,\n weekStartsOn = 1,\n clearable = true,\n name,\n id: idProp,\n className,\n style,\n },\n ref,\n ) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n const labelId = `${id}-label`\n const format = formatProp ?? defaultFormatFor(hour12, showSeconds)\n // when the value is UTC, the wire string carries a `Z` (\"…09:35:00Z\"); `utc={false}` emits the\n // bare wall-clock (no zone designator). Override either via `valueFormat`.\n const valueFormat = valueFormatProp ?? (utc ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ss')\n\n // ── value (controlled / form-bound / uncontrolled) — a `valueFormat` datetime string ────────────\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = isFormBound ? form!.field(name!) : undefined\n const externalValue =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as string | undefined) ?? '')\n : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string>(defaultValue ?? '')\n const currentValue = isControlled ? externalValue! : internal\n // when `utc`, parse the UTC value and show it in the viewer's LOCAL time (value stays UTC, emit\n // converts back); when `utc={false}`, show/emit the value's exact wall-clock (no tz conversion)\n const toDisplay = (instant: Dayjs | null) => (utc ? utcToLocalWall(instant) : instant)\n const selected = toDisplay(parseValue(currentValue, valueFormat))\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const minDate = toDisplay(parseValue(min, valueFormat))\n const maxDate = toDisplay(parseValue(max, valueFormat))\n const mask = maskFromFormat(format)\n // precision the user can actually type — driven by the display `format`, not just `showSeconds`\n const timeUnit = /s/.test(format) ? 'second' : 'minute'\n\n const commit = (next: string) => {\n if (next === currentValue) return // skip redundant onChange / setValue with an unchanged value\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n\n // emit a datetime in the wire `valueFormat` (time preserved), or '' to clear. Re-picking the same\n // instant is a no-op (string equality alone would leak a spurious emit for sub-second source values)\n const commitDateTime = (d: Dayjs | null) => {\n if (d && selected && d.isSame(selected, 'second')) return\n // local-wall → UTC for the wire value (or emit the wall-clock as-is when `utc={false}`)\n commit(d ? (utc ? localWallToUtc(d) : d).format(valueFormat) : '')\n }\n\n // true when `d` differs from the current value at the input's precision — gates typed-input commits\n // so a no-op round-trip (focus/blur) never rewrites an unchanged value's finer time\n const changed = (d: Dayjs) => !selected || !d.isSame(selected, timeUnit)\n\n // input display text (kept in sync with the committed value; free while typing an incomplete value)\n const [inputText, setInputText] = useState<string>(() =>\n selected ? selected.format(format) : '',\n )\n useEffect(() => {\n setInputText(selected ? selected.format(format) : '')\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentValue, format, valueFormat])\n\n // ── popover ──────────────────────────────────────────────────────────────────────────────────\n const triggerRef = useRef<HTMLDivElement | null>(null)\n const inputRef = useRef<HTMLInputElement | null>(null)\n const [open, setOpen] = useState(false)\n const [viewMonth, setViewMonth] = useState<Dayjs>(() => selected ?? today())\n // which popover tab is active — controlled so picking a day can auto-advance to Time\n const [tab, setTab] = useState<'date' | 'time'>('date')\n const advanceRef = useRef(false) // set when a day-pick advances to Time → move focus there\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLInputElement | null }).current = node\n },\n [ref],\n )\n\n const fieldBlurRef = useRef<(() => void) | undefined>(undefined)\n fieldBlurRef.current = bound\n ? () => bound.onBlur({} as FocusEvent<HTMLInputElement>)\n : undefined\n\n // the floating panel forwards its node here, for the blur check + the auto-advance focus move\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const closePopover = useCallback((refocus: boolean) => {\n setOpen(false)\n fieldBlurRef.current?.()\n if (refocus) inputRef.current?.focus()\n }, [])\n\n useEffect(() => {\n if (open) {\n setViewMonth(selected ?? today())\n setTab('date') // always open on the Date tab\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open])\n\n // after a day-pick auto-advances to the Time tab, move focus onto it so the focus trap holds\n // (the just-picked calendar cell has unmounted); a manual tab switch never triggers this\n useEffect(() => {\n if (tab === 'time' && advanceRef.current) {\n advanceRef.current = false\n popoverRef.current\n ?.querySelector<HTMLElement>('[role=\"tab\"][aria-selected=\"true\"]')\n ?.focus()\n }\n }, [tab, popoverRef])\n\n const isOutOfRange = (d: Dayjs): boolean => {\n if (minDate && d.isBefore(minDate, 'day')) return true\n if (maxDate && d.isAfter(maxDate, 'day')) return true\n return Boolean(disabledDate && disabledDate(toISO(d)))\n }\n\n const handleInputChange = (raw: string) => {\n const masked = applyMask(raw, mask)\n setInputText(masked)\n if (masked === '') {\n commit('') // emptying the field clears the value\n return\n }\n const parsed = parseInput(masked, format)\n if (parsed && !isOutOfRange(parsed) && changed(parsed)) commitDateTime(parsed)\n }\n\n const handleInputBlur = (event: FocusEvent<HTMLInputElement>) => {\n const parsed = parseInput(inputText, format)\n if (inputText === '') {\n commit('') // an emptied field stays cleared\n } else if (parsed && !isOutOfRange(parsed)) {\n if (changed(parsed)) commitDateTime(parsed)\n setInputText(parsed.format(format))\n } else {\n setInputText(selected ? selected.format(format) : '')\n }\n const nextEl = event.relatedTarget as Node | null\n if (nextEl && (popoverRef.current?.contains(nextEl) || triggerRef.current?.contains(nextEl)))\n return\n bound?.onBlur(event)\n }\n\n // picking a day keeps the current time; picking a time keeps the current day — the popover stays open\n const handleSelectDate = (iso: string) => {\n const date = parseISO(iso)\n if (!date) return\n const base = selected ?? today()\n commitDateTime(date.hour(base.hour()).minute(base.minute()).second(base.second()))\n advanceRef.current = true\n setTab('time') // picking a day advances to the Time tab\n }\n const handleTimeChange = (next: Dayjs) => commitDateTime(next)\n\n const iconSize: 'sm' | 'md' = size === 'sm' ? 'sm' : 'md'\n\n return (\n <div\n className={clsx(\n styles.field,\n styles[size],\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n >\n {label != null && (\n <label htmlFor={id} className={styles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n <div ref={triggerRef} className={clsx(styles.control, open && styles.open)}>\n <input\n ref={setInputRef}\n id={id}\n name={name}\n className={styles.input}\n value={inputText}\n placeholder={placeholder ?? format.toLowerCase()}\n disabled={disabled}\n autoComplete=\"off\"\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n onChange={(e) => handleInputChange(e.target.value)}\n onBlur={handleInputBlur}\n />\n\n {clearable && currentValue !== '' && !disabled && (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label={t('dateTimePicker.clear')}\n tabIndex={-1}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n commit('')\n setInputText('')\n inputRef.current?.focus()\n }}\n >\n <Icon name=\"CloseCircle\" size=\"sm\" />\n </button>\n )}\n\n <IconButton\n type=\"button\"\n variant=\"text\"\n color=\"primary\"\n size={size}\n disabled={disabled}\n aria-label={t('dateTimePicker.open')}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n className={styles.calendarButton}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => setOpen((o) => !o)}\n >\n <Icon name=\"Calendar3\" size={iconSize} />\n </IconButton>\n </div>\n\n <FloatingPanel\n ref={popoverRef}\n open={open}\n triggerRef={triggerRef}\n onClose={closePopover}\n role=\"dialog\"\n ariaLabel={t('dateTimePicker.dialog')}\n trapFocus\n className={clsx(styles.popover, dt.popover)}\n >\n <Tabs\n className={dt.tabs}\n aria-label={t('dateTimePicker.label')}\n fullWidth\n autoFocus\n // the Date/Time tabs are internal popover UI — never sync them to the page URL\n queryKey={null}\n value={tab}\n onChange={(v) => setTab(v as 'date' | 'time')}\n items={[\n {\n value: 'date',\n label: t('dateTimePicker.dateTab'),\n icon: 'Calendar3',\n content: (\n <Calendar\n value={selected}\n month={viewMonth}\n onMonthChange={setViewMonth}\n onSelect={handleSelectDate}\n min={minDate}\n max={maxDate}\n disabledDate={disabledDate}\n weekStartsOn={weekStartsOn}\n labelId={labelId}\n />\n ),\n },\n {\n value: 'time',\n label: t('dateTimePicker.timeTab'),\n icon: 'Clock',\n content: (\n <div className={dt.timePane}>\n <TimeColumns\n value={selected}\n onChange={handleTimeChange}\n hour12={hour12}\n minuteStep={minuteStep}\n showSeconds={showSeconds}\n />\n </div>\n ),\n },\n ]}\n />\n <div className={dt.footer}>\n <Button size=\"sm\" variant=\"filled\" color=\"primary\" onClick={() => closePopover(true)}>\n {t('common.done')}\n </Button>\n </div>\n </FloatingPanel>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={styles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n },\n)\n"],"names":["defaultFormatFor","hour12","showSeconds","DateTimePicker","forwardRef","label","size","error","helperText","required","fullWidth","disabled","value","defaultValue","onChange","formatProp","valueFormatProp","utc","minuteStep","placeholder","min","max","disabledDate","weekStartsOn","clearable","name","idProp","className","style","ref","t","useT","reactId","useId","id","helperId","labelId","format","valueFormat","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","currentValue","toDisplay","instant","utcToLocalWall","selected","parseValue","resolvedError","resolvedHelperText","minDate","maxDate","mask","maskFromFormat","timeUnit","commit","next","commitDateTime","d","localWallToUtc","changed","inputText","setInputText","useEffect","triggerRef","useRef","inputRef","open","setOpen","viewMonth","setViewMonth","today","tab","setTab","advanceRef","setInputRef","useCallback","node","fieldBlurRef","popoverRef","closePopover","refocus","_a","_b","isOutOfRange","toISO","handleInputChange","raw","masked","applyMask","parsed","parseInput","handleInputBlur","event","nextEl","handleSelectDate","iso","date","parseISO","base","handleTimeChange","iconSize","jsxs","clsx","styles","jsx","Typography","Icon","IconButton","o","FloatingPanel","dt","Tabs","v","Calendar","TimeColumns","Button"],"mappings":";;;;;;;;;;;;;;AAyGA,SAASA,GAAiBC,GAAiBC,GAA8B;AAQvE,SAAO,cAPMD,IACTC,IACE,eACA,YACFA,IACE,aACA,OACmB;AAC3B;AAaO,MAAMC,KAAiBC;AAAA,EAC5B,SACE;AAAA,IACE,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,KAAW;AAAA,IACX,WAAAC,KAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAQC;AAAA,IACR,aAAaC;AAAA,IACb,KAAAC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;AAAA,wBAAA,EACF,CACF;AAAA,sBAAA;AAAA,oBAEJ;AAAA,kBACF;AAAA,gBAAA;AAAA,gBAEF,gBAAA6G,EAAC,SAAI,WAAWM,EAAG,QACjB,UAAA,gBAAAN,EAACW,IAAA,EAAO,MAAK,MAAK,SAAQ,UAAS,OAAM,WAAU,SAAS,MAAMpC,GAAa,EAAI,GAChF,UAAAxD,EAAE,aAAa,EAAA,CAClB,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGDyB,KAAsB,QACrB,gBAAAwD;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,IAAI7E;AAAA,cACJ,SAAQ;AAAA,cACR,OAAOmB,IAAgB,UAAU;AAAA,cACjC,WAAWwD,EAAO;AAAA,cAEjB,UAAAvD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("react/jsx-runtime"),R=require("react"),S=require("clsx"),J=require("./breakpoints-Dpnh6BbG.cjs"),K=require("./useMediaQuery-CHMrI6Dy.cjs"),C=require("./Icon-CBg21lKA.cjs"),V=require("./CopyButton-DUG5s3TM.cjs"),X=require("./IconButton-DSPdv-oI.cjs"),k=require("./Skeleton-DK0lAjS9.cjs"),B=require("./Typography-d97DdbNd.cjs"),Y=require("./ConfigProvider-CYSpuSMJ.cjs"),Z="_root_deh4f_4",W="_sm_deh4f_14",ee="_md_deh4f_22",se="_lg_deh4f_30",te="_header_deh4f_40",le="_headerMain_deh4f_49",ae="_headerIcon_deh4f_56",ne="_headerText_deh4f_59",oe="_title_deh4f_65",re="_actions_deh4f_68",ce="_grid_deh4f_80",de="_item_deh4f_87",ie="_dividers_deh4f_95",he="_lastRow_deh4f_99",_e="_label_deh4f_103",ue="_labelIcon_deh4f_111",pe="_value_deh4f_116",fe="_valueMedium_deh4f_125",me="_valueBold_deh4f_128",ve="_valueText_deh4f_131",xe="_placeholder_deh4f_135",ye="_copy_deh4f_148",be="_copyButton_deh4f_156",je="_horizontal_deh4f_176",Ne="_stacked_deh4f_174",ge="_bordered_deh4f_188",Ie="_lastRowStart_deh4f_222",e={root:Z,sm:W,md:ee,lg:se,header:te,headerMain:le,headerIcon:ae,headerText:ne,title:oe,actions:re,grid:ce,item:de,dividers:ie,lastRow:he,label:_e,labelIcon:ue,value:pe,valueMedium:fe,valueBold:me,valueText:ve,placeholder:xe,copy:ye,copyButton:be,horizontal:je,stacked:Ne,bordered:ge,lastRowStart:Ie},we=new Set(C.ICON_NAMES),Te={xs:1,sm:2,lg:3},Me=t=>t==null||t===""||t===!1,Re=t=>{if(typeof t.copyable=="string")return t.copyable;if(typeof t.value=="string"||typeof t.value=="number")return String(t.value)},Se=(t,n)=>{let r=0,a=0;return t.map(i=>{const o=Math.min(i.span??1,n);a+o>n&&(r+=1,a=0);const u={item:i,span:o,row:r,col:a};return a+=o,a>=n&&(r+=1,a=0),u})},q=(t,n="sm")=>typeof t=="string"&&we.has(t)?s.jsx(C.Icon,{name:t,size:n}):t,ke=R.forwardRef(function({items:n,columns:r=Te,layout:a="vertical",size:i="md",valueWeight:o="regular",bordered:u=!1,dividers:L=!0,labelWidth:p=160,stackBelow:x="xxs",loading:c=!1,emptyText:z="—",title:d,icon:f,color:E="accent",subtitle:h,actions:m,className:A,style:D,...O},$){const y=Y.useT(),b=`${R.useId()}-title`,j=K.useBreakpointMatches(),N=J.resolveResponsive(r,j)??1,U=a==="horizontal"&&x!==!1&&j[x],g=n.filter(l=>!l.hidden),_=Se(g,N),I=_.length?_[_.length-1].row:0,F=typeof c=="number"?c:g.length||6,H=d!=null||h!=null||m!=null||f!=null,P={"--dl-cols":N,"--dl-label-w":typeof p=="number"?`${p}px`:p};return s.jsxs("div",{ref:$,className:S.clsx(e.root,e[i],e[a],o!=="regular"&&e[`value${o==="bold"?"Bold":"Medium"}`],u&&e.bordered,L&&e.dividers,U&&e.stacked,A),style:{...P,...D},...O,children:[H&&s.jsxs("div",{className:e.header,children:[s.jsxs("div",{className:e.headerMain,children:[f!=null&&s.jsx(X.IconButton,{variant:"filled",size:"sm",color:E,nonClickable:!0,"aria-hidden":!0,className:e.headerIcon,children:q(f,"md")}),(d!=null||h!=null)&&s.jsxs("div",{className:e.headerText,children:[d!=null&&s.jsx(B.Typography,{as:"h3",id:b,variant:"subtitle",className:e.title,children:d}),h!=null&&s.jsx(B.Typography,{as:"p",variant:"bodySmall",color:"muted",children:h})]})]}),m!=null&&s.jsx("div",{className:e.actions,children:m})]}),s.jsx("dl",{className:e.grid,"aria-labelledby":d!=null?b:void 0,"aria-busy":c?!0:void 0,"aria-label":c?y("descriptionList.loading"):void 0,children:c?Array.from({length:F},(l,v)=>s.jsxs("div",{className:e.item,"aria-hidden":"true",children:[s.jsx("dt",{className:e.label,children:s.jsx(k.Skeleton,{width:"40%",height:"0.9em"})}),s.jsx("dd",{className:e.value,children:s.jsx(k.Skeleton,{width:"70%",height:"1.1em"})})]},v)):_.map(({item:l,span:v,row:w,col:Q},G)=>{const T=Me(l.value),M=!T&&l.copyable?Re(l):void 0;return s.jsxs("div",{className:S.clsx(e.item,w===I&&e.lastRow,w===I&&Q===0&&e.lastRowStart),style:{"--dl-span":v},children:[s.jsxs("dt",{className:e.label,children:[l.icon!=null&&s.jsx("span",{className:e.labelIcon,"aria-hidden":"true",children:q(l.icon)}),l.label]}),s.jsxs("dd",{className:e.value,children:[s.jsx("span",{className:e.valueText,children:T?s.jsx("span",{className:e.placeholder,"aria-label":y("descriptionList.empty"),children:z}):l.value}),M!=null&&s.jsx("span",{className:e.copy,children:s.jsx(V.CopyButton,{value:M,size:"sm",variant:"text",className:e.copyButton})})]})]},l.key??G)})})]})});exports.DescriptionList=ke;
2
- //# sourceMappingURL=DescriptionList-DnGkHdzT.cjs.map
1
+ "use strict";const s=require("react/jsx-runtime"),R=require("react"),S=require("clsx"),J=require("./breakpoints-Dpnh6BbG.cjs"),K=require("./useMediaQuery-CHMrI6Dy.cjs"),C=require("./Icon-BoQmbW7j.cjs"),V=require("./CopyButton-B2V6guZ0.cjs"),X=require("./IconButton-ChhZqleN.cjs"),k=require("./Skeleton-DK0lAjS9.cjs"),B=require("./Typography-d97DdbNd.cjs"),Y=require("./ConfigProvider-BFhkb0BV.cjs"),Z="_root_deh4f_4",W="_sm_deh4f_14",ee="_md_deh4f_22",se="_lg_deh4f_30",te="_header_deh4f_40",le="_headerMain_deh4f_49",ae="_headerIcon_deh4f_56",ne="_headerText_deh4f_59",oe="_title_deh4f_65",re="_actions_deh4f_68",ce="_grid_deh4f_80",de="_item_deh4f_87",ie="_dividers_deh4f_95",he="_lastRow_deh4f_99",_e="_label_deh4f_103",ue="_labelIcon_deh4f_111",pe="_value_deh4f_116",fe="_valueMedium_deh4f_125",me="_valueBold_deh4f_128",ve="_valueText_deh4f_131",xe="_placeholder_deh4f_135",ye="_copy_deh4f_148",be="_copyButton_deh4f_156",je="_horizontal_deh4f_176",Ne="_stacked_deh4f_174",ge="_bordered_deh4f_188",Ie="_lastRowStart_deh4f_222",e={root:Z,sm:W,md:ee,lg:se,header:te,headerMain:le,headerIcon:ae,headerText:ne,title:oe,actions:re,grid:ce,item:de,dividers:ie,lastRow:he,label:_e,labelIcon:ue,value:pe,valueMedium:fe,valueBold:me,valueText:ve,placeholder:xe,copy:ye,copyButton:be,horizontal:je,stacked:Ne,bordered:ge,lastRowStart:Ie},we=new Set(C.ICON_NAMES),Te={xs:1,sm:2,lg:3},Me=t=>t==null||t===""||t===!1,Re=t=>{if(typeof t.copyable=="string")return t.copyable;if(typeof t.value=="string"||typeof t.value=="number")return String(t.value)},Se=(t,n)=>{let r=0,a=0;return t.map(i=>{const o=Math.min(i.span??1,n);a+o>n&&(r+=1,a=0);const u={item:i,span:o,row:r,col:a};return a+=o,a>=n&&(r+=1,a=0),u})},q=(t,n="sm")=>typeof t=="string"&&we.has(t)?s.jsx(C.Icon,{name:t,size:n}):t,ke=R.forwardRef(function({items:n,columns:r=Te,layout:a="vertical",size:i="md",valueWeight:o="regular",bordered:u=!1,dividers:L=!0,labelWidth:p=160,stackBelow:x="xxs",loading:c=!1,emptyText:z="—",title:d,icon:f,color:E="accent",subtitle:h,actions:m,className:A,style:D,...O},$){const y=Y.useT(),b=`${R.useId()}-title`,j=K.useBreakpointMatches(),N=J.resolveResponsive(r,j)??1,U=a==="horizontal"&&x!==!1&&j[x],g=n.filter(l=>!l.hidden),_=Se(g,N),I=_.length?_[_.length-1].row:0,F=typeof c=="number"?c:g.length||6,H=d!=null||h!=null||m!=null||f!=null,P={"--dl-cols":N,"--dl-label-w":typeof p=="number"?`${p}px`:p};return s.jsxs("div",{ref:$,className:S.clsx(e.root,e[i],e[a],o!=="regular"&&e[`value${o==="bold"?"Bold":"Medium"}`],u&&e.bordered,L&&e.dividers,U&&e.stacked,A),style:{...P,...D},...O,children:[H&&s.jsxs("div",{className:e.header,children:[s.jsxs("div",{className:e.headerMain,children:[f!=null&&s.jsx(X.IconButton,{variant:"filled",size:"sm",color:E,nonClickable:!0,"aria-hidden":!0,className:e.headerIcon,children:q(f,"md")}),(d!=null||h!=null)&&s.jsxs("div",{className:e.headerText,children:[d!=null&&s.jsx(B.Typography,{as:"h3",id:b,variant:"subtitle",className:e.title,children:d}),h!=null&&s.jsx(B.Typography,{as:"p",variant:"bodySmall",color:"muted",children:h})]})]}),m!=null&&s.jsx("div",{className:e.actions,children:m})]}),s.jsx("dl",{className:e.grid,"aria-labelledby":d!=null?b:void 0,"aria-busy":c?!0:void 0,"aria-label":c?y("descriptionList.loading"):void 0,children:c?Array.from({length:F},(l,v)=>s.jsxs("div",{className:e.item,"aria-hidden":"true",children:[s.jsx("dt",{className:e.label,children:s.jsx(k.Skeleton,{width:"40%",height:"0.9em"})}),s.jsx("dd",{className:e.value,children:s.jsx(k.Skeleton,{width:"70%",height:"1.1em"})})]},v)):_.map(({item:l,span:v,row:w,col:Q},G)=>{const T=Me(l.value),M=!T&&l.copyable?Re(l):void 0;return s.jsxs("div",{className:S.clsx(e.item,w===I&&e.lastRow,w===I&&Q===0&&e.lastRowStart),style:{"--dl-span":v},children:[s.jsxs("dt",{className:e.label,children:[l.icon!=null&&s.jsx("span",{className:e.labelIcon,"aria-hidden":"true",children:q(l.icon)}),l.label]}),s.jsxs("dd",{className:e.value,children:[s.jsx("span",{className:e.valueText,children:T?s.jsx("span",{className:e.placeholder,"aria-label":y("descriptionList.empty"),children:z}):l.value}),M!=null&&s.jsx("span",{className:e.copy,children:s.jsx(V.CopyButton,{value:M,size:"sm",variant:"text",className:e.copyButton})})]})]},l.key??G)})})]})});exports.DescriptionList=ke;
2
+ //# sourceMappingURL=DescriptionList-Bed1MHU8.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList-DnGkHdzT.cjs","sources":["../src/components/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { resolveResponsive, type Breakpoint, type Responsive } from '../../theme/breakpoints'\nimport { useBreakpointMatches } from '../../hooks/useMediaQuery'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Icon } from '../Icon'\nimport { CopyButton } from '../CopyButton'\nimport { IconButton } from '../IconButton'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './DescriptionList.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type DescriptionListSize = 'sm' | 'md' | 'lg'\nexport type DescriptionListLayout = 'vertical' | 'horizontal'\nexport type DescriptionListColumns = 1 | 2 | 3 | 4\nexport type DescriptionListValueWeight = 'regular' | 'medium' | 'bold'\n\nexport interface DescriptionItem {\n /** Stable key (defaults to the index). */\n key?: string\n /** The term — \"Entry fee\". */\n label: ReactNode\n /** The value. `null` / `undefined` / `''` / `false` render the `emptyText` placeholder (\"—\"). */\n value?: ReactNode\n /** Columns this pair spans (clamped to the resolved column count) — for long text, addresses, lists. */\n span?: DescriptionListColumns\n /** Show a copy button: `true` copies a string/number `value`; pass a string to copy something else (an id behind a label). */\n copyable?: boolean | string\n /** Drop the pair entirely (e.g. by role). */\n hidden?: boolean\n /** Small leading icon in the label — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n}\n\nexport interface DescriptionListProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'color'\n> {\n /** The label / value pairs, in order. Declarative so `loading` skeletons and `hidden` stay trivial. */\n items: DescriptionItem[]\n /** Column count — a number or a desktop-first breakpoint map. Defaults to `{ xs: 1, sm: 2, lg: 3 }`. */\n columns?: Responsive<DescriptionListColumns>\n /** `vertical` (label above value, default) or `horizontal` (label beside value; stacks again on phones). */\n layout?: DescriptionListLayout\n /** Text + spacing scale. Defaults to `md`. */\n size?: DescriptionListSize\n /** Font weight of the values. Defaults to `regular` (the library's body default); `medium` / `bold` add emphasis. */\n valueWeight?: DescriptionListValueWeight\n /** Frame the list as a surface card (border + radius); `horizontal` also tints the label column. */\n bordered?: boolean\n /** Hairlines between rows. Defaults to `true` (turn off inside an already-ruled container). */\n dividers?: boolean\n /** Label column width for `horizontal` (px number or CSS length). Defaults to `160px`. */\n labelWidth?: number | string\n /**\n * `horizontal` only — the breakpoint at (and below) which the label stacks back above the value.\n * A breakpoint token (`'xxs'` ≤ 576px default, `'xs'` ≤ 768px, …) or `false` to keep the two columns\n * side by side at every width. Uses the shared JS breakpoint layer, so `config.theme.breakpoints` applies.\n */\n stackBelow?: Breakpoint | false\n /** Render shimmering placeholders instead of values — `true` uses one row per visible item (`6` when none), a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":"qzCAaMA,GAAgB,IAAI,IAAYC,YAAU,EAkE1CC,GAAsD,CAAE,GAAI,EAAG,GAAI,EAAG,GAAI,CAAA,EAE1EC,GAAWC,GAAqBA,GAAS,MAAQA,IAAU,IAAMA,IAAU,GAG3EC,GAAcC,GAA8C,CAChE,GAAI,OAAOA,EAAK,UAAa,gBAAiBA,EAAK,SACnD,GAAI,OAAOA,EAAK,OAAU,UAAY,OAAOA,EAAK,OAAU,SAAU,OAAO,OAAOA,EAAK,KAAK,CAEhG,EAGMC,GAAa,CAACC,EAA0BC,IAAiB,CAC7D,IAAIC,EAAM,EACNC,EAAM,EACV,OAAOH,EAAM,IAAKF,GAAS,CACzB,MAAMM,EAAO,KAAK,IAAIN,EAAK,MAAQ,EAAGG,CAAI,EACtCE,EAAMC,EAAOH,IACfC,GAAO,EACPC,EAAM,GAER,MAAME,EAAS,CAAE,KAAAP,EAAM,KAAAM,EAAM,IAAAF,EAAK,IAAAC,CAAA,EAClC,OAAAA,GAAOC,EACHD,GAAOF,IACTC,GAAO,EACPC,EAAM,GAEDE,CACT,CAAC,CACH,EAEMC,EAAa,CAACC,EAA4BC,EAAoB,OAClE,OAAOD,GAAS,UAAYf,GAAc,IAAIe,CAAI,EAChDE,EAAAA,IAACC,QAAK,KAAMH,EAAkB,KAAAC,EAAY,EAE1CD,EAgBSI,GAAkBC,EAAAA,WAC7B,SACE,CACE,MAAAZ,EACA,QAAAa,EAAUnB,GACV,OAAAoB,EAAS,WACT,KAAAN,EAAO,KACP,YAAAO,EAAc,UACd,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,WAAAC,EAAa,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AC,CAAA,EAAO8C,IAAM,CAC1C,MAAME,EAAQxD,GAAQG,EAAK,KAAK,EAC1BsD,EAAO,CAACD,GAASrD,EAAK,SAAWD,GAAWC,CAAI,EAAI,OAC1D,OACE6C,EAAAA,KAAC,MAAA,CAEC,UAAWC,EAAAA,KACTC,EAAO,KACP3C,IAAQqC,GAAWM,EAAO,QAC1B3C,IAAQqC,GAAWpC,IAAQ,GAAK0C,EAAO,YAAA,EAEzC,MAAO,CAAE,YAAazC,CAAA,EAEtB,SAAA,CAAAuC,EAAAA,KAAC,KAAA,CAAG,UAAWE,EAAO,MACnB,SAAA,CAAA/C,EAAK,MAAQ,MACZW,EAAAA,IAAC,OAAA,CAAK,UAAWoC,EAAO,UAAW,cAAY,OAC5C,SAAAvC,EAAWR,EAAK,IAAI,EACvB,EAEDA,EAAK,KAAA,EACR,EACA6C,EAAAA,KAAC,KAAA,CAAG,UAAWE,EAAO,MACpB,SAAA,CAAApC,EAAAA,IAAC,OAAA,CAAK,UAAWoC,EAAO,UACrB,SAAAM,EACC1C,EAAAA,IAAC,OAAA,CACC,UAAWoC,EAAO,YAClB,aAAYf,EAAE,uBAAuB,EAEpC,SAAAT,CAAA,CAAA,EAGHvB,EAAK,MAET,EACCsD,GAAQ,MACP3C,EAAAA,IAAC,OAAA,CAAK,UAAWoC,EAAO,KACtB,SAAApC,EAAAA,IAAC4C,EAAAA,WAAA,CACC,MAAOD,EACP,KAAK,KACL,QAAQ,OACR,UAAWP,EAAO,UAAA,CAAA,CACpB,CACF,CAAA,CAAA,CAEJ,CAAA,CAAA,EAvCK/C,EAAK,KAAOmD,CAAA,CA0CvB,CAAC,CAAA,CAAA,CACP,CAAA,CAAA,CAGN,CACF"}
1
+ {"version":3,"file":"DescriptionList-Bed1MHU8.cjs","sources":["../src/components/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { resolveResponsive, type Breakpoint, type Responsive } from '../../theme/breakpoints'\nimport { useBreakpointMatches } from '../../hooks/useMediaQuery'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Icon } from '../Icon'\nimport { CopyButton } from '../CopyButton'\nimport { IconButton } from '../IconButton'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './DescriptionList.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type DescriptionListSize = 'sm' | 'md' | 'lg'\nexport type DescriptionListLayout = 'vertical' | 'horizontal'\nexport type DescriptionListColumns = 1 | 2 | 3 | 4\nexport type DescriptionListValueWeight = 'regular' | 'medium' | 'bold'\n\nexport interface DescriptionItem {\n /** Stable key (defaults to the index). */\n key?: string\n /** The term — \"Entry fee\". */\n label: ReactNode\n /** The value. `null` / `undefined` / `''` / `false` render the `emptyText` placeholder (\"—\"). */\n value?: ReactNode\n /** Columns this pair spans (clamped to the resolved column count) — for long text, addresses, lists. */\n span?: DescriptionListColumns\n /** Show a copy button: `true` copies a string/number `value`; pass a string to copy something else (an id behind a label). */\n copyable?: boolean | string\n /** Drop the pair entirely (e.g. by role). */\n hidden?: boolean\n /** Small leading icon in the label — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n}\n\nexport interface DescriptionListProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'color'\n> {\n /** The label / value pairs, in order. Declarative so `loading` skeletons and `hidden` stay trivial. */\n items: DescriptionItem[]\n /** Column count — a number or a desktop-first breakpoint map. Defaults to `{ xs: 1, sm: 2, lg: 3 }`. */\n columns?: Responsive<DescriptionListColumns>\n /** `vertical` (label above value, default) or `horizontal` (label beside value; stacks again on phones). */\n layout?: DescriptionListLayout\n /** Text + spacing scale. Defaults to `md`. */\n size?: DescriptionListSize\n /** Font weight of the values. Defaults to `regular` (the library's body default); `medium` / `bold` add emphasis. */\n valueWeight?: DescriptionListValueWeight\n /** Frame the list as a surface card (border + radius); `horizontal` also tints the label column. */\n bordered?: boolean\n /** Hairlines between rows. Defaults to `true` (turn off inside an already-ruled container). */\n dividers?: boolean\n /** Label column width for `horizontal` (px number or CSS length). Defaults to `160px`. */\n labelWidth?: number | string\n /**\n * `horizontal` only — the breakpoint at (and below) which the label stacks back above the value.\n * A breakpoint token (`'xxs'` ≤ 576px default, `'xs'` ≤ 768px, …) or `false` to keep the two columns\n * side by side at every width. Uses the shared JS breakpoint layer, so `config.theme.breakpoints` applies.\n */\n stackBelow?: Breakpoint | false\n /** Render shimmering placeholders instead of values — `true` uses one row per visible item (`6` when none), a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":"qzCAaMA,GAAgB,IAAI,IAAYC,YAAU,EAkE1CC,GAAsD,CAAE,GAAI,EAAG,GAAI,EAAG,GAAI,CAAA,EAE1EC,GAAWC,GAAqBA,GAAS,MAAQA,IAAU,IAAMA,IAAU,GAG3EC,GAAcC,GAA8C,CAChE,GAAI,OAAOA,EAAK,UAAa,gBAAiBA,EAAK,SACnD,GAAI,OAAOA,EAAK,OAAU,UAAY,OAAOA,EAAK,OAAU,SAAU,OAAO,OAAOA,EAAK,KAAK,CAEhG,EAGMC,GAAa,CAACC,EAA0BC,IAAiB,CAC7D,IAAIC,EAAM,EACNC,EAAM,EACV,O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EAAO,UACrB,SAAAM,EACC1C,EAAAA,IAAC,OAAA,CACC,UAAWoC,EAAO,YAClB,aAAYf,EAAE,uBAAuB,EAEpC,SAAAT,CAAA,CAAA,EAGHvB,EAAK,MAET,EACCsD,GAAQ,MACP3C,EAAAA,IAAC,OAAA,CAAK,UAAWoC,EAAO,KACtB,SAAApC,EAAAA,IAAC4C,EAAAA,WAAA,CACC,MAAOD,EACP,KAAK,KACL,QAAQ,OACR,UAAWP,EAAO,UAAA,CAAA,CACpB,CACF,CAAA,CAAA,CAEJ,CAAA,CAAA,EAvCK/C,EAAK,KAAOmD,CAAA,CA0CvB,CAAC,CAAA,CAAA,CACP,CAAA,CAAA,CAGN,CACF"}
@@ -3,12 +3,12 @@ import { forwardRef as K, useId as P } from "react";
3
3
  import { clsx as B } from "clsx";
4
4
  import { r as Q } from "./breakpoints-BbDakdqF.js";
5
5
  import { u as V } from "./useMediaQuery-DrDUrkmJ.js";
6
- import { b as X, a as Y } from "./Icon-B7DJn8Tw.js";
7
- import { C as Z } from "./CopyButton-LURMuaYw.js";
8
- import { I as W } from "./IconButton-iWbUJAz7.js";
6
+ import { b as X, a as Y } from "./Icon-DMMO32p6.js";
7
+ import { C as Z } from "./CopyButton-DfYAslz-.js";
8
+ import { I as W } from "./IconButton-s5hohjxu.js";
9
9
  import { S as k } from "./Skeleton-_-uGax2j.js";
10
10
  import { T as z } from "./Typography-ChSuxgkc.js";
11
- import { a as ee } from "./ConfigProvider-DtyUlWk6.js";
11
+ import { a as ee } from "./ConfigProvider-bXX8dnhY.js";
12
12
  const ae = "_root_deh4f_4", se = "_sm_deh4f_14", le = "_md_deh4f_22", te = "_lg_deh4f_30", oe = "_header_deh4f_40", ne = "_headerMain_deh4f_49", re = "_headerIcon_deh4f_56", de = "_headerText_deh4f_59", ce = "_title_deh4f_65", ie = "_actions_deh4f_68", he = "_grid_deh4f_80", _e = "_item_deh4f_87", me = "_dividers_deh4f_95", ue = "_lastRow_deh4f_99", pe = "_label_deh4f_103", fe = "_labelIcon_deh4f_111", ve = "_value_deh4f_116", ye = "_valueMedium_deh4f_125", be = "_valueBold_deh4f_128", Ne = "_valueText_deh4f_131", xe = "_placeholder_deh4f_135", ge = "_copy_deh4f_148", Ie = "_copyButton_deh4f_156", we = "_horizontal_deh4f_176", Te = "_stacked_deh4f_174", Me = "_bordered_deh4f_188", Re = "_lastRowStart_deh4f_222", e = {
13
13
  root: ae,
14
14
  sm: se,
@@ -172,4 +172,4 @@ const ae = "_root_deh4f_4", se = "_sm_deh4f_14", le = "_md_deh4f_22", te = "_lg_
172
172
  export {
173
173
  Je as D
174
174
  };
175
- //# sourceMappingURL=DescriptionList-kfNXbf_D.js.map
175
+ //# sourceMappingURL=DescriptionList-BgMNjHJQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList-kfNXbf_D.js","sources":["../src/components/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { resolveResponsive, type Breakpoint, type Responsive } from '../../theme/breakpoints'\nimport { useBreakpointMatches } from '../../hooks/useMediaQuery'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Icon } from '../Icon'\nimport { CopyButton } from '../CopyButton'\nimport { IconButton } from '../IconButton'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './DescriptionList.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type DescriptionListSize = 'sm' | 'md' | 'lg'\nexport type DescriptionListLayout = 'vertical' | 'horizontal'\nexport type DescriptionListColumns = 1 | 2 | 3 | 4\nexport type DescriptionListValueWeight = 'regular' | 'medium' | 'bold'\n\nexport interface DescriptionItem {\n /** Stable key (defaults to the index). */\n key?: string\n /** The term — \"Entry fee\". */\n label: ReactNode\n /** The value. `null` / `undefined` / `''` / `false` render the `emptyText` placeholder (\"—\"). */\n value?: ReactNode\n /** Columns this pair spans (clamped to the resolved column count) — for long text, addresses, lists. */\n span?: DescriptionListColumns\n /** Show a copy button: `true` copies a string/number `value`; pass a string to copy something else (an id behind a label). */\n copyable?: boolean | string\n /** Drop the pair entirely (e.g. by role). */\n hidden?: boolean\n /** Small leading icon in the label — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n}\n\nexport interface DescriptionListProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'color'\n> {\n /** The label / value pairs, in order. Declarative so `loading` skeletons and `hidden` stay trivial. */\n items: DescriptionItem[]\n /** Column count — a number or a desktop-first breakpoint map. Defaults to `{ xs: 1, sm: 2, lg: 3 }`. */\n columns?: Responsive<DescriptionListColumns>\n /** `vertical` (label above value, default) or `horizontal` (label beside value; stacks again on phones). */\n layout?: DescriptionListLayout\n /** Text + spacing scale. Defaults to `md`. */\n size?: DescriptionListSize\n /** Font weight of the values. Defaults to `regular` (the library's body default); `medium` / `bold` add emphasis. */\n valueWeight?: DescriptionListValueWeight\n /** Frame the list as a surface card (border + radius); `horizontal` also tints the label column. */\n bordered?: boolean\n /** Hairlines between rows. Defaults to `true` (turn off inside an already-ruled container). */\n dividers?: boolean\n /** Label column width for `horizontal` (px number or CSS length). Defaults to `160px`. */\n labelWidth?: number | string\n /**\n * `horizontal` only — the breakpoint at (and below) which the label stacks back above the value.\n * A breakpoint token (`'xxs'` ≤ 576px default, `'xs'` ≤ 768px, …) or `false` to keep the two columns\n * side by side at every width. Uses the shared JS breakpoint layer, so `config.theme.breakpoints` applies.\n */\n stackBelow?: Breakpoint | false\n /** Render shimmering placeholders instead of values — `true` uses one row per visible item (`6` when none), a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAaMA,KAAgB,IAAI,IAAYC,CAAU,GAkE1CC,KAAsD,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,EAAA,GAE1EC,KAAU,CAACC,MAAqBA,KAAS,QAAQA,MAAU,MAAMA,MAAU,IAG3EC,KAAa,CAACC,MAA8C;AAChE,MAAI,OAAOA,EAAK,YAAa,iBAAiBA,EAAK;AACnD,MAAI,OAAOA,EAAK,SAAU,YAAY,OAAOA,EAAK,SAAU,SAAU,QAAO,OAAOA,EAAK,KAAK;AAEhG,GAGMC,KAAa,CAACC,GAA0BC,MAAiB;AAC7D,MAAIC,IAAM,GACNC,IAAM;AACV,SAAOH,EAAM,IAAI,CAACF,MAAS;AACzB,UAAMM,IAAO,KAAK,IAAIN,EAAK,QAAQ,GAAGG,CAAI;AAC1C,IAAIE,IAAMC,IAAOH,MACfC,KAAO,GACPC,IAAM;AAER,UAAME,IAAS,EAAE,MAAAP,GAAM,MAAAM,GAAM,KAAAF,GAAK,KAAAC,EAAA;AAClC,WAAAA,KAAOC,GACHD,KAAOF,MACTC,KAAO,GACPC,IAAM,IAEDE;AAAA,EACT,CAAC;AACH,GAEMC,IAAa,CAACC,GAA4BC,IAAoB,SAClE,OAAOD,KAAS,YAAYf,GAAc,IAAIe,CAAI,IAChD,gBAAAE,EAACC,KAAK,MAAMH,GAAkB,MAAAC,GAAY,IAE1CD,GAgBSI,KAAkBC;AAAA,EAC7B,SACE;AAAA,IACE,OAAAZ;AAAA,IACA,SAAAa,IAAUnB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BAAA1C;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,WAAWoC,EAAO;AAAA,4BAClB,cAAYf,EAAE,uBAAuB;AAAA,4BAEpC,UAAAT;AAAA,0BAAA;AAAA,wBAAA,IAGHvB,EAAK,OAET;AAAA,wBACCsD,KAAQ,QACP,gBAAA3C,EAAC,QAAA,EAAK,WAAWoC,EAAO,MACtB,UAAA,gBAAApC;AAAA,0BAAC4C;AAAA,0BAAA;AAAA,4BACC,OAAOD;AAAA,4BACP,MAAK;AAAA,4BACL,SAAQ;AAAA,4BACR,WAAWP,EAAO;AAAA,0BAAA;AAAA,wBAAA,EACpB,CACF;AAAA,sBAAA,EAAA,CAEJ;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAvCK/C,EAAK,OAAOmD;AAAA,gBAAA;AAAA,cA0CvB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"DescriptionList-BgMNjHJQ.js","sources":["../src/components/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { resolveResponsive, type Breakpoint, type Responsive } from '../../theme/breakpoints'\nimport { useBreakpointMatches } from '../../hooks/useMediaQuery'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Icon } from '../Icon'\nimport { CopyButton } from '../CopyButton'\nimport { IconButton } from '../IconButton'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './DescriptionList.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type DescriptionListSize = 'sm' | 'md' | 'lg'\nexport type DescriptionListLayout = 'vertical' | 'horizontal'\nexport type DescriptionListColumns = 1 | 2 | 3 | 4\nexport type DescriptionListValueWeight = 'regular' | 'medium' | 'bold'\n\nexport interface DescriptionItem {\n /** Stable key (defaults to the index). */\n key?: string\n /** The term — \"Entry fee\". */\n label: ReactNode\n /** The value. `null` / `undefined` / `''` / `false` render the `emptyText` placeholder (\"—\"). */\n value?: ReactNode\n /** Columns this pair spans (clamped to the resolved column count) — for long text, addresses, lists. */\n span?: DescriptionListColumns\n /** Show a copy button: `true` copies a string/number `value`; pass a string to copy something else (an id behind a label). */\n copyable?: boolean | string\n /** Drop the pair entirely (e.g. by role). */\n hidden?: boolean\n /** Small leading icon in the label — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n}\n\nexport interface DescriptionListProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'color'\n> {\n /** The label / value pairs, in order. Declarative so `loading` skeletons and `hidden` stay trivial. */\n items: DescriptionItem[]\n /** Column count — a number or a desktop-first breakpoint map. Defaults to `{ xs: 1, sm: 2, lg: 3 }`. */\n columns?: Responsive<DescriptionListColumns>\n /** `vertical` (label above value, default) or `horizontal` (label beside value; stacks again on phones). */\n layout?: DescriptionListLayout\n /** Text + spacing scale. Defaults to `md`. */\n size?: DescriptionListSize\n /** Font weight of the values. Defaults to `regular` (the library's body default); `medium` / `bold` add emphasis. */\n valueWeight?: DescriptionListValueWeight\n /** Frame the list as a surface card (border + radius); `horizontal` also tints the label column. */\n bordered?: boolean\n /** Hairlines between rows. Defaults to `true` (turn off inside an already-ruled container). */\n dividers?: boolean\n /** Label column width for `horizontal` (px number or CSS length). Defaults to `160px`. */\n labelWidth?: number | string\n /**\n * `horizontal` only — the breakpoint at (and below) which the label stacks back above the value.\n * A breakpoint token (`'xxs'` ≤ 576px default, `'xs'` ≤ 768px, …) or `false` to keep the two columns\n * side by side at every width. Uses the shared JS breakpoint layer, so `config.theme.breakpoints` applies.\n */\n stackBelow?: Breakpoint | false\n /** Render shimmering placeholders instead of values — `true` uses one row per visible item (`6` when none), a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAaMA,KAAgB,IAAI,IAAYC,CAAU,GAkE1CC,KAAsD,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,EAAA,GAE1EC,KAAU,CAACC,MAAqBA,KAAS,QAAQA,MAAU,MAAMA,MAAU,IAG3EC,KAAa,CAACC,MAA8C;AAChE,MAAI,OAAOA,EAAK,YAAa,iBAAiBA,EAAK;AACnD,MAAI,OAAOA,EAAK,SAAU,YAAY,OAAOA,EAAK,SAAU,SAAU,QAAO,OAAOA,EAAK,KAAK;AAEhG,GAGMC,KAAa,CAACC,GAA0BC,MAAiB;AAC7D,MAAIC,IAAM,GACNC,IAAM;AACV,SAAOH,EAAM,IAAI,CAACF,MAAS;AACzB,UAAMM,IAAO,KAAK,IAAIN,EAAK,QAAQ,GAAGG,CAAI;AAC1C,IAAIE,IAAMC,IAAOH,MACfC,KAAO,GACPC,IAAM;AAER,UAAME,IAAS,EAAE,MAAAP,GAAM,MAAAM,GAAM,KAAAF,GAAK,KAAAC,EAAA;AAClC,WAAAA,KAAOC,GACHD,KAAOF,MACTC,KAAO,GACPC,IAAM,IAEDE;AAAA,EACT,CAAC;AACH,GAEMC,IAAa,CAACC,GAA4BC,IAAoB,SAClE,OAAOD,KAAS,YAAYf,GAAc,IAAIe,CAAI,IAChD,gBAAAE,EAACC,KAA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,EAAC,MAAA,EAAG,WAAWE,EAAO,OACpB,UAAA;AAAA,wBAAA,gBAAApC,EAAC,QAAA,EAAK,WAAWoC,EAAO,WACrB,UAAAM,IACC,gBAAA1C;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,WAAWoC,EAAO;AAAA,4BAClB,cAAYf,EAAE,uBAAuB;AAAA,4BAEpC,UAAAT;AAAA,0BAAA;AAAA,wBAAA,IAGHvB,EAAK,OAET;AAAA,wBACCsD,KAAQ,QACP,gBAAA3C,EAAC,QAAA,EAAK,WAAWoC,EAAO,MACtB,UAAA,gBAAApC;AAAA,0BAAC4C;AAAA,0BAAA;AAAA,4BACC,OAAOD;AAAA,4BACP,MAAK;AAAA,4BACL,SAAQ;AAAA,4BACR,WAAWP,EAAO;AAAA,0BAAA;AAAA,wBAAA,EACpB,CACF;AAAA,sBAAA,EAAA,CAEJ;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAvCK/C,EAAK,OAAOmD;AAAA,gBAAA;AAAA,cA0CvB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const D=require("react/jsx-runtime"),s=require("react"),$=require("react-dom"),ee=require("clsx"),te=require("./List-CLUXeaXS.cjs"),ne=require("./useLockBodyScroll-CIXHZo-Q.cjs"),oe="_panel_ntp6g_4",re="_sm_ntp6g_21",se="_md_ntp6g_24",ie="_lg_ntp6g_27",P={panel:oe,sm:re,md:se,lg:ie},ce=8,K='[role="menuitem"],[role="button"],a[href],button:not([disabled]),[tabindex]:not([tabindex="-1"])';function j(w){return w?Array.from(w.querySelectorAll(K)).filter(v=>v.getAttribute("aria-disabled")!=="true"&&v.offsetParent!==null):[]}function ae({trigger:w,children:v,placement:A="bottom-start",size:M="md",minWidth:O=!0,open:W,defaultOpen:z=!1,onOpenChange:y,closeOnSelect:N=!0,matchTriggerWidth:H=!1,disabled:T=!1,offset:h=6,className:U,style:V}){const S=s.useId(),l=s.useRef(null),d=s.useRef(null),L=W!==void 0,[G,J]=s.useState(z),r=L?W:G,[Q,F]=s.useState(!1),[o,X]=s.useState(null),_=s.useCallback(e=>{L||J(e),y==null||y(e)},[L,y]),b=s.useCallback(()=>_(!1),[_]);ne.useLockBodyScroll(r);const x=s.useCallback(()=>{const e=l.current,t=d.current;if(!e||!t)return;const n=e.getBoundingClientRect(),u=t.offsetWidth,a=t.offsetHeight,i=window.innerWidth,g=window.innerHeight,c=ce,p=g-n.bottom-h-c,k=n.top-h-c;let m=A.startsWith("bottom")?"bottom":"top";m==="bottom"&&a>p&&k>p?m="top":m==="top"&&a>k&&p>k&&(m="bottom");const B=Math.max(0,m==="bottom"?p:k),C=Math.min(a,B);let R=m==="bottom"?n.bottom+h:n.top-h-C;R=Math.min(Math.max(R,c),Math.max(c,g-c-C));let q=A.endsWith("end")?n.right-u:n.left;q=Math.min(Math.max(q,c),Math.max(c,i-c-u)),X({top:R,left:q,side:m,maxHeight:B,minWidth:H?n.width:void 0})},[A,h,H]);s.useLayoutEffect(()=>{if(!r){F(!1);return}x()},[r,x]),s.useEffect(()=>{if(!r)return;const e=requestAnimationFrame(()=>F(!0)),t=()=>x();window.addEventListener("resize",t),window.addEventListener("scroll",t,!0);let n;return typeof ResizeObserver<"u"&&(n=new ResizeObserver(t),d.current&&n.observe(d.current),l.current&&n.observe(l.current)),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0),n==null||n.disconnect()}},[r,x]),s.useEffect(()=>{if(!r)return;const e=n=>{var a,i;const u=n.target;(a=l.current)!=null&&a.contains(u)||(i=d.current)!=null&&i.contains(u)||b()},t=n=>{var u,a;if(n.key==="Escape")n.preventDefault(),b(),(u=l.current)==null||u.focus();else if(n.key==="Tab")b();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault();const i=j(d.current);if(!i.length)return;const g=i.indexOf(document.activeElement),c=n.key==="ArrowDown"?1:-1,p=(g+c+i.length)%i.length;(a=i[p])==null||a.focus()}};return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",t)}},[r,b]),s.useEffect(()=>{if(!r)return;const e=requestAnimationFrame(()=>{var t;return(t=j(d.current)[0])==null?void 0:t.focus()});return()=>cancelAnimationFrame(e)},[r]);const f=w.props,E=f.ref,Y=s.cloneElement(w,{ref:e=>{l.current=e,typeof E=="function"?E(e):E&&(E.current=e)},onClick:e=>{var t;(t=f.onClick)==null||t.call(f,e),T||_(!r)},onKeyDown:e=>{var t;(t=f.onKeyDown)==null||t.call(f,e),I(e)},"aria-haspopup":"menu","aria-expanded":r,"aria-controls":r?S:void 0}),I=e=>{var t;e.key!=="Escape"||!r||(e.stopPropagation(),e.preventDefault(),b(),(t=l.current)==null||t.focus())},Z=e=>{var n;if(!N)return;const t=e.target.closest(K);t&&t.getAttribute("aria-disabled")!=="true"&&(b(),(n=l.current)==null||n.focus())};return D.jsxs(D.Fragment,{children:[Y,r&&$.createPortal(D.jsx("div",{ref:d,id:S,className:ee.clsx(P.panel,O&&P[M],U),"data-open":Q?"true":"false","data-side":(o==null?void 0:o.side)??"bottom",style:{position:"fixed",top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,maxHeight:o==null?void 0:o.maxHeight,minWidth:o==null?void 0:o.minWidth,visibility:o?"visible":"hidden",...V},onClick:Z,onKeyDown:I,children:D.jsx(te.List,{role:"menu",size:M,padding:"xs",children:v})}),document.body)]})}exports.Dropdown=ae;
2
- //# sourceMappingURL=Dropdown-C_y9_dVn.cjs.map
1
+ "use strict";const D=require("react/jsx-runtime"),s=require("react"),$=require("react-dom"),ee=require("clsx"),te=require("./List-Dfa7mlSZ.cjs"),ne=require("./useLockBodyScroll-CIXHZo-Q.cjs"),oe="_panel_ntp6g_4",re="_sm_ntp6g_21",se="_md_ntp6g_24",ie="_lg_ntp6g_27",P={panel:oe,sm:re,md:se,lg:ie},ce=8,K='[role="menuitem"],[role="button"],a[href],button:not([disabled]),[tabindex]:not([tabindex="-1"])';function j(w){return w?Array.from(w.querySelectorAll(K)).filter(v=>v.getAttribute("aria-disabled")!=="true"&&v.offsetParent!==null):[]}function ae({trigger:w,children:v,placement:A="bottom-start",size:M="md",minWidth:O=!0,open:W,defaultOpen:z=!1,onOpenChange:y,closeOnSelect:N=!0,matchTriggerWidth:H=!1,disabled:T=!1,offset:h=6,className:U,style:V}){const S=s.useId(),l=s.useRef(null),d=s.useRef(null),L=W!==void 0,[G,J]=s.useState(z),r=L?W:G,[Q,F]=s.useState(!1),[o,X]=s.useState(null),_=s.useCallback(e=>{L||J(e),y==null||y(e)},[L,y]),b=s.useCallback(()=>_(!1),[_]);ne.useLockBodyScroll(r);const x=s.useCallback(()=>{const e=l.current,t=d.current;if(!e||!t)return;const n=e.getBoundingClientRect(),u=t.offsetWidth,a=t.offsetHeight,i=window.innerWidth,g=window.innerHeight,c=ce,p=g-n.bottom-h-c,k=n.top-h-c;let m=A.startsWith("bottom")?"bottom":"top";m==="bottom"&&a>p&&k>p?m="top":m==="top"&&a>k&&p>k&&(m="bottom");const B=Math.max(0,m==="bottom"?p:k),C=Math.min(a,B);let R=m==="bottom"?n.bottom+h:n.top-h-C;R=Math.min(Math.max(R,c),Math.max(c,g-c-C));let q=A.endsWith("end")?n.right-u:n.left;q=Math.min(Math.max(q,c),Math.max(c,i-c-u)),X({top:R,left:q,side:m,maxHeight:B,minWidth:H?n.width:void 0})},[A,h,H]);s.useLayoutEffect(()=>{if(!r){F(!1);return}x()},[r,x]),s.useEffect(()=>{if(!r)return;const e=requestAnimationFrame(()=>F(!0)),t=()=>x();window.addEventListener("resize",t),window.addEventListener("scroll",t,!0);let n;return typeof ResizeObserver<"u"&&(n=new ResizeObserver(t),d.current&&n.observe(d.current),l.current&&n.observe(l.current)),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0),n==null||n.disconnect()}},[r,x]),s.useEffect(()=>{if(!r)return;const e=n=>{var a,i;const u=n.target;(a=l.current)!=null&&a.contains(u)||(i=d.current)!=null&&i.contains(u)||b()},t=n=>{var u,a;if(n.key==="Escape")n.preventDefault(),b(),(u=l.current)==null||u.focus();else if(n.key==="Tab")b();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault();const i=j(d.current);if(!i.length)return;const g=i.indexOf(document.activeElement),c=n.key==="ArrowDown"?1:-1,p=(g+c+i.length)%i.length;(a=i[p])==null||a.focus()}};return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",t)}},[r,b]),s.useEffect(()=>{if(!r)return;const e=requestAnimationFrame(()=>{var t;return(t=j(d.current)[0])==null?void 0:t.focus()});return()=>cancelAnimationFrame(e)},[r]);const f=w.props,E=f.ref,Y=s.cloneElement(w,{ref:e=>{l.current=e,typeof E=="function"?E(e):E&&(E.current=e)},onClick:e=>{var t;(t=f.onClick)==null||t.call(f,e),T||_(!r)},onKeyDown:e=>{var t;(t=f.onKeyDown)==null||t.call(f,e),I(e)},"aria-haspopup":"menu","aria-expanded":r,"aria-controls":r?S:void 0}),I=e=>{var t;e.key!=="Escape"||!r||(e.stopPropagation(),e.preventDefault(),b(),(t=l.current)==null||t.focus())},Z=e=>{var n;if(!N)return;const t=e.target.closest(K);t&&t.getAttribute("aria-disabled")!=="true"&&(b(),(n=l.current)==null||n.focus())};return D.jsxs(D.Fragment,{children:[Y,r&&$.createPortal(D.jsx("div",{ref:d,id:S,className:ee.clsx(P.panel,O&&P[M],U),"data-open":Q?"true":"false","data-side":(o==null?void 0:o.side)??"bottom",style:{position:"fixed",top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,maxHeight:o==null?void 0:o.maxHeight,minWidth:o==null?void 0:o.minWidth,visibility:o?"visible":"hidden",...V},onClick:Z,onKeyDown:I,children:D.jsx(te.List,{role:"menu",size:M,padding:"xs",children:v})}),document.body)]})}exports.Dropdown=ae;
2
+ //# sourceMappingURL=Dropdown-DNL7RWdL.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown-C_y9_dVn.cjs","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import {\n cloneElement,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { List, type ListItemSize } from '../List'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Dropdown.module.css'\n\nexport type DropdownPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'\n\ninterface Position {\n top: number\n left: number\n side: 'top' | 'bottom'\n maxHeight: number\n minWidth?: number\n}\n\nexport interface DropdownProps {\n /** The element that opens the menu (e.g. a `Button` / `IconButton`). Cloned to wire click + a11y. */\n trigger: ReactElement\n /** Menu content — typically `ListItem`s (composed inside a `role=\"menu\"` `List`). */\n children: ReactNode\n /** Preferred placement. Flips to the opposite side automatically when it would overflow. Default `bottom-start`. */\n placement?: DropdownPlacement\n /** Menu size — sets the panel min-width (`sm` 150 · `md` 190 · `lg` 220) and the items' density. Default `md`. */\n size?: ListItemSize\n /**\n * Apply the size-based min-width (`sm` 150 · `md` 190 · `lg` 220px). Defaults to `true`; set `false`\n * to let the menu size to its content instead (the items' density still tracks `size`).\n */\n minWidth?: boolean\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Close the menu when an item inside is clicked. Defaults to `true`. */\n closeOnSelect?: boolean\n /** Make the menu at least as wide as the trigger (select-like). Defaults to `false`. */\n matchTriggerWidth?: boolean\n /** Prevents opening. */\n disabled?: boolean\n /** Gap between the trigger and the menu, in px. Defaults to `6`. */\n offset?: number\n /** Class applied to the floating panel. */\n className?: string\n /** Style applied to the floating panel. */\n style?: CSSProperties\n}\n\n/** Distance the menu is kept from the viewport edges (px). */\nconst VIEWPORT_PADDING = 8\n/** Focusable menu items, used for arrow-key roving. */\nconst FOCUSABLE =\n '[role=\"menuitem\"],[role=\"button\"],a[href],button:not([disabled]),[tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusableItems(panel: HTMLElement | null): HTMLElement[] {\n if (!panel) return []\n return Array.from(panel.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n (el) => el.getAttribute('aria-disabled') !== 'true' && el.offsetParent !== null,\n )\n}\n\n/**\n * A floating menu anchored to a `trigger`. Opens on trigger click; closes on outside click, `Escape`,\n * or selecting an item. The panel is portaled to `document.body` and positioned with collision\n * handling — it **flips** to the opposite side when it would overflow, clamps within the viewport, and\n * re-positions on scroll/resize (a too-tall menu caps its height and scrolls). Arrow keys move between\n * items; `Escape` returns focus to the trigger. Compose `ListItem`s as `children`.\n */\nexport function Dropdown({\n trigger,\n children,\n placement = 'bottom-start',\n size = 'md',\n minWidth = true,\n open,\n defaultOpen = false,\n onOpenChange,\n closeOnSelect = true,\n matchTriggerWidth = false,\n disabled = false,\n offset = 6,\n className,\n style,\n}: DropdownProps) {\n const menuId = useId()\n const triggerRef = useRef<HTMLElement | null>(null)\n const panelRef = useRef<HTMLDivElement | null>(null)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(defaultOpen)\n const isOpen = isControlled ? open : internalOpen\n const [visible, setVisible] = useState(false)\n const [pos, setPos] = useState<Position | null>(null)\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n },\n [isControlled, onOpenChange],\n )\n const close = useCallback(() => setOpen(false), [setOpen])\n\n // lock page scroll while the menu is open (no scrollbar shift)\n useLockBodyScroll(isOpen)\n\n // ── positioning: flip when it would overflow, clamp inside the viewport ──\n const update = useCallback(() => {\n const triggerEl = triggerRef.current\n const panel = panelRef.current\n if (!triggerEl || !panel) return\n\n const rect = triggerEl.getBoundingClientRect()\n const panelW = panel.offsetWidth\n const panelH = panel.offsetHeight\n const vw = window.innerWidth\n const vh = window.innerHeight\n const pad = VIEWPORT_PADDING\n\n const spaceBelow = vh - rect.bottom - offset - pad\n const spaceAbove = rect.top - offset - pad\n let side: 'top' | 'bottom' = placement.startsWith('bottom') ? 'bottom' : 'top'\n // flip only when the preferred side can't fit AND the opposite side has more room\n if (side === 'bottom' && panelH > spaceBelow && spaceAbove > spaceBelow) side = 'top'\n else if (side === 'top' && panelH > spaceAbove && spaceBelow > spaceAbove) side = 'bottom'\n\n const available = side === 'bottom' ? spaceBelow : spaceAbove\n const maxHeight = Math.max(0, available)\n const usedH = Math.min(panelH, maxHeight)\n\n let top = side === 'bottom' ? rect.bottom + offset : rect.top - offset - usedH\n top = Math.min(Math.max(top, pad), Math.max(pad, vh - pad - usedH))\n\n let left = placement.endsWith('end') ? rect.right - panelW : rect.left\n left = Math.min(Math.max(left, pad), Math.max(pad, vw - pad - panelW))\n\n setPos({ top, left, side, maxHeight, minWidth: matchTriggerWidth ? rect.width : undefined })\n }, [placement, offset, matchTriggerWidth])\n\n // position synchronously before paint whenever the menu is open\n useLayoutEffect(() => {\n if (!isOpen) {\n setVisible(false)\n return\n }\n update()\n }, [isOpen, update])\n\n // enter transition + reposition listeners while open\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => setVisible(true))\n\n const onReposition = () => update()\n window.addEventListener('resize', onReposition)\n window.addEventListener('scroll', onReposition, true)\n let ro: ResizeObserver | undefined\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(onReposition)\n if (panelRef.current) ro.observe(panelRef.current)\n if (triggerRef.current) ro.observe(triggerRef.current)\n }\n\n return () => {\n cancelAnimationFrame(raf)\n window.removeEventListener('resize', onReposition)\n window.removeEventListener('scroll', onReposition, true)\n ro?.disconnect()\n }\n }, [isOpen, update])\n\n // outside click + keyboard (Escape, arrow roving)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n const target = event.target as Node\n if (triggerRef.current?.contains(target) || panelRef.current?.contains(target)) return\n close()\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault()\n close()\n triggerRef.current?.focus()\n } else if (event.key === 'Tab') {\n // Tab would move focus by portal DOM order (end of <body>), orphaning the open menu — close it\n // and let focus continue naturally from the trigger (Select/MultiSelect do the same)\n close()\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault()\n const items = focusableItems(panelRef.current)\n if (!items.length) return\n const current = items.indexOf(document.activeElement as HTMLElement)\n const delta = event.key === 'ArrowDown' ? 1 : -1\n const next = (current + delta + items.length) % items.length\n items[next]?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen, close])\n\n // focus the first item once the menu is open and positioned\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => focusableItems(panelRef.current)[0]?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const triggerProps = trigger.props as {\n onClick?: (event: ReactMouseEvent) => void\n onKeyDown?: (event: ReactKeyboardEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n\n const clonedTrigger = cloneElement(trigger as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (!disabled) setOpen(!isOpen)\n },\n onKeyDown: (event: ReactKeyboardEvent) => {\n triggerProps.onKeyDown?.(event)\n stopEscape(event)\n },\n 'aria-haspopup': 'menu',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? menuId : undefined,\n })\n\n // Escape while the menu is open closes THIS menu only — stopped here so it can't bubble (through the React\n // tree; the panel is portaled) to an enclosing Modal / drawer / editor Overlay and dismiss that too.\n // Stopping it also keeps it from the document listener above, hence the explicit close.\n const stopEscape = (event: ReactKeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return\n event.stopPropagation()\n event.preventDefault()\n close()\n triggerRef.current?.focus()\n }\n\n const handlePanelClick = (event: ReactMouseEvent) => {\n if (!closeOnSelect) return\n const item = (event.target as HTMLElement).closest(FOCUSABLE)\n if (item && item.getAttribute('aria-disabled') !== 'true') {\n close()\n triggerRef.current?.focus()\n }\n }\n\n return (\n <>\n {clonedTrigger}\n {isOpen &&\n createPortal(\n <div\n ref={panelRef}\n id={menuId}\n className={clsx(styles.panel, minWidth && styles[size], className)}\n data-open={visible ? 'true' : 'false'}\n data-side={pos?.side ?? 'bottom'}\n style={{\n position: 'fixed',\n top: pos?.top ?? 0,\n left: pos?.left ?? 0,\n maxHeight: pos?.maxHeight,\n minWidth: pos?.minWidth,\n visibility: pos ? 'visible' : 'hidden',\n ...style,\n }}\n onClick={handlePanelClick}\n onKeyDown={stopEscape}\n >\n <List role=\"menu\" size={size} padding=\"xs\">\n {children}\n </List>\n </div>,\n document.body,\n )}\n </>\n )\n}\n"],"names":["VIEWPORT_PADDING","FOCUSABLE","focusableItems","panel","el","Dropdown","trigger","children","placement","size","minWidth","open","defaultOpen","onOpenChange","closeOnSelect","matchTriggerWidth","disabled","offset","className","style","menuId","useId","triggerRef","useRef","panelRef","isControlled","internalOpen","setInternalOpen","useState","isOpen","visible","setVisible","pos","setPos","setOpen","useCallback","next","close","useLockBodyScroll","update","triggerEl","rect","panelW","panelH","vw","vh","pad","spaceBelow","spaceAbove","side","maxHeight","usedH","top","left","useLayoutEffect","useEffect","raf","onReposition","ro","onPointerDown","event","target","_a","_b","onKeyDown","items","current","delta","triggerProps","originalRef","clonedTrigger","cloneElement","node","stopEscape","handlePanelClick","item","jsxs","Fragment","createPortal","jsx","clsx","styles","List"],"mappings":"ySAkEMA,GAAmB,EAEnBC,EACJ,mGAEF,SAASC,EAAeC,EAA0C,CAChE,OAAKA,EACE,MAAM,KAAKA,EAAM,iBAA8BF,CAAS,CAAC,EAAE,OAC/DG,GAAOA,EAAG,aAAa,eAAe,IAAM,QAAUA,EAAG,eAAiB,IAAA,EAF1D,CAAA,CAIrB,CASO,SAASC,GAAS,CACvB,QAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,eACZ,KAAAC,EAAO,KACP,SAAAC,EAAW,GACX,KAAAC,EACA,YAAAC,EAAc,GACd,aAAAC,EACA,cAAAC,EAAgB,GAChB,kBAAAC,EAAoB,GACpB,SAAAC,EAAW,GACX,OAAAC,EAAS,EACT,UAAAC,EACA,MAAAC,CACF,EAAkB,CAChB,MAAMC,EAASC,EAAAA,MAAA,EACTC,EAAaC,EAAAA,OAA2B,IAAI,EAC5CC,EAAWD,EAAAA,OAA8B,IAAI,EAE7CE,EAAed,IAAS,OACxB,CAACe,EAAcC,CAAe,EAAIC,EAAAA,SAAShB,CAAW,EACtDiB,EAASJ,EAAed,EAAOe,EAC/B,CAACI,EAASC,CAAU,EAAIH,EAAAA,SAAS,EAAK,EACtC,CAACI,EAAKC,CAAM,EAAIL,EAAAA,SAA0B,IAAI,EAE9CM,EAAUC,EAAAA,YACbC,GAAkB,CACZX,GAAcE,EAAgBS,CAAI,EACvCvB,GAAA,MAAAA,EAAeuB,EACjB,EACA,CAACX,EAAcZ,CAAY,CAAA,EAEvBwB,EAAQF,EAAAA,YAAY,IAAMD,EAAQ,EAAK,EAAG,CAACA,CAAO,CAAC,EAGzDI,GAAAA,kBAAkBT,CAAM,EAGxB,MAAMU,EAASJ,EAAAA,YAAY,IAAM,CAC/B,MAAMK,EAAYlB,EAAW,QACvBnB,EAAQqB,EAAS,QACvB,GAAI,CAACgB,GA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SACjDtC,EAAA,GACAyB,EAAAxC,EAAW,UAAX,MAAAwC,EAAoB,QAExB,EAEA,OACEc,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAP,EACAzC,GACCiD,EAAAA,aACEC,EAAAA,IAAC,MAAA,CACC,IAAKvD,EACL,GAAIJ,EACJ,UAAW4D,GAAAA,KAAKC,EAAO,MAAOvE,GAAYuE,EAAOxE,CAAI,EAAGS,CAAS,EACjE,YAAWY,EAAU,OAAS,QAC9B,aAAWE,GAAA,YAAAA,EAAK,OAAQ,SACxB,MAAO,CACL,SAAU,QACV,KAAKA,GAAA,YAAAA,EAAK,MAAO,EACjB,MAAMA,GAAA,YAAAA,EAAK,OAAQ,EACnB,UAAWA,GAAA,YAAAA,EAAK,UAChB,SAAUA,GAAA,YAAAA,EAAK,SACf,WAAYA,EAAM,UAAY,SAC9B,GAAGb,CAAA,EAEL,QAASuD,EACT,UAAWD,EAEX,eAACS,GAAAA,KAAA,CAAK,KAAK,OAAO,KAAAzE,EAAY,QAAQ,KACnC,SAAAF,CAAA,CACH,CAAA,CAAA,EAEF,SAAS,IAAA,CACX,EACJ,CAEJ"}
1
+ {"version":3,"file":"Dropdown-DNL7RWdL.cjs","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import {\n cloneElement,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { List, type ListItemSize } from '../List'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Dropdown.module.css'\n\nexport type DropdownPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'\n\ninterface Position {\n top: number\n left: number\n side: 'top' | 'bottom'\n maxHeight: number\n minWidth?: number\n}\n\nexport interface DropdownProps {\n /** The element that opens the menu (e.g. a `Button` / `IconButton`). Cloned to wire click + a11y. */\n trigger: ReactElement\n /** Menu content — typically `ListItem`s (composed inside a `role=\"menu\"` `List`). */\n children: ReactNode\n /** Preferred placement. Flips to the opposite side automatically when it would overflow. Default `bottom-start`. */\n placement?: DropdownPlacement\n /** Menu size — sets the panel min-width (`sm` 150 · `md` 190 · `lg` 220) and the items' density. Default `md`. */\n size?: ListItemSize\n /**\n * Apply the size-based min-width (`sm` 150 · `md` 190 · `lg` 220px). Defaults to `true`; set `false`\n * to let the menu size to its content instead (the items' density still tracks `size`).\n */\n minWidth?: boolean\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Close the menu when an item inside is clicked. Defaults to `true`. */\n closeOnSelect?: boolean\n /** Make the menu at least as wide as the trigger (select-like). Defaults to `false`. */\n matchTriggerWidth?: boolean\n /** Prevents opening. */\n disabled?: boolean\n /** Gap between the trigger and the menu, in px. Defaults to `6`. */\n offset?: number\n /** Class applied to the floating panel. */\n className?: string\n /** Style applied to the floating panel. */\n style?: CSSProperties\n}\n\n/** Distance the menu is kept from the viewport edges (px). */\nconst VIEWPORT_PADDING = 8\n/** Focusable menu items, used for arrow-key roving. */\nconst FOCUSABLE =\n '[role=\"menuitem\"],[role=\"button\"],a[href],button:not([disabled]),[tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusableItems(panel: HTMLElement | null): HTMLElement[] {\n if (!panel) return []\n return Array.from(panel.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n (el) => el.getAttribute('aria-disabled') !== 'true' && el.offsetParent !== null,\n )\n}\n\n/**\n * A floating menu anchored to a `trigger`. Opens on trigger click; closes on outside click, `Escape`,\n * or selecting an item. The panel is portaled to `document.body` and positioned with collision\n * handling — it **flips** to the opposite side when it would overflow, clamps within the viewport, and\n * re-positions on scroll/resize (a too-tall menu caps its height and scrolls). Arrow keys move between\n * items; `Escape` returns focus to the trigger. Compose `ListItem`s as `children`.\n */\nexport function Dropdown({\n trigger,\n children,\n placement = 'bottom-start',\n size = 'md',\n minWidth = true,\n open,\n defaultOpen = false,\n onOpenChange,\n closeOnSelect = true,\n matchTriggerWidth = false,\n disabled = false,\n offset = 6,\n className,\n style,\n}: DropdownProps) {\n const menuId = useId()\n const triggerRef = useRef<HTMLElement | null>(null)\n const panelRef = useRef<HTMLDivElement | null>(null)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(defaultOpen)\n const isOpen = isControlled ? open : internalOpen\n const [visible, setVisible] = useState(false)\n const [pos, setPos] = useState<Position | null>(null)\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n },\n [isControlled, onOpenChange],\n )\n const close = useCallback(() => setOpen(false), [setOpen])\n\n // lock page scroll while the menu is open (no scrollbar shift)\n useLockBodyScroll(isOpen)\n\n // ── positioning: flip when it would overflow, clamp inside the viewport ──\n const update = useCallback(() => {\n const triggerEl = triggerRef.current\n const panel = panelRef.current\n if (!triggerEl || !panel) return\n\n const rect = triggerEl.getBoundingClientRect()\n const panelW = panel.offsetWidth\n const panelH = panel.offsetHeight\n const vw = window.innerWidth\n const vh = window.innerHeight\n const pad = VIEWPORT_PADDING\n\n const spaceBelow = vh - rect.bottom - offset - pad\n const spaceAbove = rect.top - offset - pad\n let side: 'top' | 'bottom' = placement.startsWith('bottom') ? 'bottom' : 'top'\n // flip only when the preferred side can't fit AND the opposite side has more room\n if (side === 'bottom' && panelH > spaceBelow && spaceAbove > spaceBelow) side = 'top'\n else if (side === 'top' && panelH > spaceAbove && spaceBelow > spaceAbove) side = 'bottom'\n\n const available = side === 'bottom' ? spaceBelow : spaceAbove\n const maxHeight = Math.max(0, available)\n const usedH = Math.min(panelH, maxHeight)\n\n let top = side === 'bottom' ? rect.bottom + offset : rect.top - offset - usedH\n top = Math.min(Math.max(top, pad), Math.max(pad, vh - pad - usedH))\n\n let left = placement.endsWith('end') ? rect.right - panelW : rect.left\n left = Math.min(Math.max(left, pad), Math.max(pad, vw - pad - panelW))\n\n setPos({ top, left, side, maxHeight, minWidth: matchTriggerWidth ? rect.width : undefined })\n }, [placement, offset, matchTriggerWidth])\n\n // position synchronously before paint whenever the menu is open\n useLayoutEffect(() => {\n if (!isOpen) {\n setVisible(false)\n return\n }\n update()\n }, [isOpen, update])\n\n // enter transition + reposition listeners while open\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => setVisible(true))\n\n const onReposition = () => update()\n window.addEventListener('resize', onReposition)\n window.addEventListener('scroll', onReposition, true)\n let ro: ResizeObserver | undefined\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(onReposition)\n if (panelRef.current) ro.observe(panelRef.current)\n if (triggerRef.current) ro.observe(triggerRef.current)\n }\n\n return () => {\n cancelAnimationFrame(raf)\n window.removeEventListener('resize', onReposition)\n window.removeEventListener('scroll', onReposition, true)\n ro?.disconnect()\n }\n }, [isOpen, update])\n\n // outside click + keyboard (Escape, arrow roving)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n const target = event.target as Node\n if (triggerRef.current?.contains(target) || panelRef.current?.contains(target)) return\n close()\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault()\n close()\n triggerRef.current?.focus()\n } else if (event.key === 'Tab') {\n // Tab would move focus by portal DOM order (end of <body>), orphaning the open menu — close it\n // and let focus continue naturally from the trigger (Select/MultiSelect do the same)\n close()\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault()\n const items = focusableItems(panelRef.current)\n if (!items.length) return\n const current = items.indexOf(document.activeElement as HTMLElement)\n const delta = event.key === 'ArrowDown' ? 1 : -1\n const next = (current + delta + items.length) % items.length\n items[next]?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen, close])\n\n // focus the first item once the menu is open and positioned\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => focusableItems(panelRef.current)[0]?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const triggerProps = trigger.props as {\n onClick?: (event: ReactMouseEvent) => void\n onKeyDown?: (event: ReactKeyboardEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n\n const clonedTrigger = cloneElement(trigger as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (!disabled) setOpen(!isOpen)\n },\n onKeyDown: (event: ReactKeyboardEvent) => {\n triggerProps.onKeyDown?.(event)\n stopEscape(event)\n },\n 'aria-haspopup': 'menu',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? menuId : undefined,\n })\n\n // Escape while the menu is open closes THIS menu only — stopped here so it can't bubble (through the React\n // tree; the panel is portaled) to an enclosing Modal / drawer / editor Overlay and dismiss that too.\n // Stopping it also keeps it from the document listener above, hence the explicit close.\n const stopEscape = (event: ReactKeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return\n event.stopPropagation()\n event.preventDefault()\n close()\n triggerRef.current?.focus()\n }\n\n const handlePanelClick = (event: ReactMouseEvent) => {\n if (!closeOnSelect) return\n const item = (event.target as HTMLElement).closest(FOCUSABLE)\n if (item && item.getAttribute('aria-disabled') !== 'true') {\n close()\n triggerRef.current?.focus()\n }\n }\n\n return (\n <>\n {clonedTrigger}\n {isOpen &&\n createPortal(\n <div\n ref={panelRef}\n id={menuId}\n className={clsx(styles.panel, minWidth && styles[size], className)}\n data-open={visible ? 'true' : 'false'}\n data-side={pos?.side ?? 'bottom'}\n style={{\n position: 'fixed',\n top: pos?.top ?? 0,\n left: pos?.left ?? 0,\n maxHeight: pos?.maxHeight,\n minWidth: pos?.minWidth,\n visibility: pos ? 'visible' : 'hidden',\n ...style,\n }}\n onClick={handlePanelClick}\n onKeyDown={stopEscape}\n >\n <List role=\"menu\" size={size} padding=\"xs\">\n {children}\n </List>\n </div>,\n document.body,\n )}\n </>\n )\n}\n"],"names":["VIEWPORT_PADDING","FOCUSABLE","focusableItems","panel","el","Dropdown","trigger","children","placement","size","minWidth","open","defaultOpen","onOpenChange","closeOnSelect","matchTriggerWidth","disabled","offset","className","style","menuId","useId","triggerRef","useRef","panelRef","isControlled","internalOpen","setInternalOpen","useState","isOpen","visible","setVisible","pos","setPos","setOpen","useCallback","next","close","useLockBodyScroll","update","triggerEl","rect","panelW","panelH","vw","vh","pad","spaceBelow","spaceAbove","side","maxHeight","usedH","top","left","useLayoutEffect","useEffect","raf","onReposition","ro","onPointerDown","event","target","_a","_b","onKeyDown","items","current","delta","triggerProps","originalRef","clonedTrigger","cloneElement","node","stopEscape","handlePanelClick","item","jsxs","Fragment","createPortal","jsx","clsx","styles","List"],"mappings":"ySAkEMA,GAAmB,EAEnBC,EACJ,mGAEF,SAASC,EAAeC,EAA0C,CAChE,OAAKA,EACE,MAAM,KAAKA,EAAM,iBAA8BF,CAAS,CAAC,EAAE,OAC/DG,GAAOA,EAAG,aAAa,eAAe,IAAM,QAAUA,EAAG,eAAiB,IAAA,EAF1D,CAAA,CAIrB,CASO,SAASC,GAAS,CACvB,QAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,eACZ,KAAAC,EAAO,KACP,SAAAC,EAAW,GACX,KAAAC,EACA,YAAAC,EAAc,GACd,aAAAC,EACA,cAAAC,EAAgB,GAChB,kBAAAC,EAAoB,GACpB,SAAAC,EAAW,GACX,OAAAC,EAAS,EACT,UAAAC,EACA,MAAAC,CACF,EAAkB,CAChB,MAAMC,EAASC,EAAAA,MAAA,EACTC,EAA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AAzE,EAAY,QAAQ,KACnC,SAAAF,CAAA,CACH,CAAA,CAAA,EAEF,SAAS,IAAA,CACX,EACJ,CAEJ"}
@@ -2,7 +2,7 @@ import { jsxs as nt, Fragment as ot, jsx as q } from "react/jsx-runtime";
2
2
  import { useId as rt, useRef as z, useState as R, useCallback as M, useLayoutEffect as it, useEffect as W, cloneElement as st } from "react";
3
3
  import { createPortal as ct } from "react-dom";
4
4
  import { clsx as at } from "clsx";
5
- import { L as lt } from "./List-DS91CZUt.js";
5
+ import { L as lt } from "./List-DQlEG_S5.js";
6
6
  import { u as ut } from "./useLockBodyScroll-DwBILLPK.js";
7
7
  const dt = "_panel_ntp6g_4", ft = "_sm_ntp6g_21", mt = "_md_ntp6g_24", pt = "_lg_ntp6g_27", C = {
8
8
  panel: dt,
@@ -151,4 +151,4 @@ function kt({
151
151
  export {
152
152
  kt as D
153
153
  };
154
- //# sourceMappingURL=Dropdown-D-D_Z1Jo.js.map
154
+ //# sourceMappingURL=Dropdown-iWbHokT7.js.map