@techzyapp/ui-library 1.0.45 → 1.0.47

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 (392) hide show
  1. package/README.md +1 -1
  2. package/dist/AdminRoot-BRN_MlHp.cjs +2 -0
  3. package/dist/AdminRoot-BRN_MlHp.cjs.map +1 -0
  4. package/dist/AdminRoot-CtqPtYxo.js +107 -0
  5. package/dist/AdminRoot-CtqPtYxo.js.map +1 -0
  6. package/dist/{Alert-BU7GlQna.js → Alert-Bo_XgY-A.js} +3 -3
  7. package/dist/{Alert-BU7GlQna.js.map → Alert-Bo_XgY-A.js.map} +1 -1
  8. package/dist/{Alert-CVQOjuEq.cjs → Alert-QvfNBhlU.cjs} +2 -2
  9. package/dist/{Alert-CVQOjuEq.cjs.map → Alert-QvfNBhlU.cjs.map} +1 -1
  10. package/dist/AuthGuard-CAaQZ2y7.cjs +2 -0
  11. package/dist/AuthGuard-CAaQZ2y7.cjs.map +1 -0
  12. package/dist/AuthGuard-vqKf2PF9.js +102 -0
  13. package/dist/AuthGuard-vqKf2PF9.js.map +1 -0
  14. package/dist/{Breadcrumbs-BMz_YVPa.js → Breadcrumbs-BEv57tuJ.js} +3 -3
  15. package/dist/{Breadcrumbs-BMz_YVPa.js.map → Breadcrumbs-BEv57tuJ.js.map} +1 -1
  16. package/dist/{Breadcrumbs-BbC0o4JE.cjs → Breadcrumbs-CqGS32x5.cjs} +2 -2
  17. package/dist/{Breadcrumbs-BbC0o4JE.cjs.map → Breadcrumbs-CqGS32x5.cjs.map} +1 -1
  18. package/dist/{Button-mBZOvgyZ.cjs → Button-BtiFpRie.cjs} +2 -2
  19. package/dist/{Button-mBZOvgyZ.cjs.map → Button-BtiFpRie.cjs.map} +1 -1
  20. package/dist/{Button-C415LPw_.js → Button-DZWYeAno.js} +2 -2
  21. package/dist/{Button-C415LPw_.js.map → Button-DZWYeAno.js.map} +1 -1
  22. package/dist/{Calendar-B0f6h9-A.js → Calendar-7W9xNVBZ.js} +3 -3
  23. package/dist/{Calendar-B0f6h9-A.js.map → Calendar-7W9xNVBZ.js.map} +1 -1
  24. package/dist/{Calendar-hO051hfk.cjs → Calendar-Bgh_3Vk2.cjs} +2 -2
  25. package/dist/{Calendar-hO051hfk.cjs.map → Calendar-Bgh_3Vk2.cjs.map} +1 -1
  26. package/dist/{Card-BdNr5row.cjs → Card-KfmWG9Uz.cjs} +2 -2
  27. package/dist/{Card-BdNr5row.cjs.map → Card-KfmWG9Uz.cjs.map} +1 -1
  28. package/dist/{Card-ssUNaOF_.js → Card-ckOd617g.js} +3 -3
  29. package/dist/{Card-ssUNaOF_.js.map → Card-ckOd617g.js.map} +1 -1
  30. package/dist/{Chip-BpJN4rzY.cjs → Chip-BDUsue_R.cjs} +2 -2
  31. package/dist/{Chip-BpJN4rzY.cjs.map → Chip-BDUsue_R.cjs.map} +1 -1
  32. package/dist/{Chip-C0x-6g2h.js → Chip-Crzm7Eux.js} +2 -2
  33. package/dist/{Chip-C0x-6g2h.js.map → Chip-Crzm7Eux.js.map} +1 -1
  34. package/dist/{CodeBlock-DKnWINdV.js → CodeBlock-CX8_dMPD.js} +3 -3
  35. package/dist/{CodeBlock-DKnWINdV.js.map → CodeBlock-CX8_dMPD.js.map} +1 -1
  36. package/dist/{CodeBlock-DTrzN95i.cjs → CodeBlock-rnGAu2DQ.cjs} +2 -2
  37. package/dist/{CodeBlock-DTrzN95i.cjs.map → CodeBlock-rnGAu2DQ.cjs.map} +1 -1
  38. package/dist/{ColorPicker-Doaegll4.cjs → ColorPicker-BaAdcqR9.cjs} +2 -2
  39. package/dist/{ColorPicker-Doaegll4.cjs.map → ColorPicker-BaAdcqR9.cjs.map} +1 -1
  40. package/dist/{ColorPicker-Bidev2DJ.js → ColorPicker-CwLivdAt.js} +3 -3
  41. package/dist/{ColorPicker-Bidev2DJ.js.map → ColorPicker-CwLivdAt.js.map} +1 -1
  42. package/dist/{ColorPickerPanel-DThSuUoz.js → ColorPickerPanel-CkrSIf35.js} +2 -2
  43. package/dist/{ColorPickerPanel-DThSuUoz.js.map → ColorPickerPanel-CkrSIf35.js.map} +1 -1
  44. package/dist/{ColorPickerPanel-048Fj7wv.cjs → ColorPickerPanel-IOhJJF1R.cjs} +2 -2
  45. package/dist/{ColorPickerPanel-048Fj7wv.cjs.map → ColorPickerPanel-IOhJJF1R.cjs.map} +1 -1
  46. package/dist/{ColorRamp-CGw4D9bf.cjs → ColorRamp-BCy8a7ks.cjs} +2 -2
  47. package/dist/{ColorRamp-CGw4D9bf.cjs.map → ColorRamp-BCy8a7ks.cjs.map} +1 -1
  48. package/dist/{ColorRamp-Reb0q69d.js → ColorRamp-DbFOsspz.js} +2 -2
  49. package/dist/{ColorRamp-Reb0q69d.js.map → ColorRamp-DbFOsspz.js.map} +1 -1
  50. package/dist/ConfigProvider-CYSpuSMJ.cjs +2 -0
  51. package/dist/ConfigProvider-CYSpuSMJ.cjs.map +1 -0
  52. package/dist/ConfigProvider-DtyUlWk6.js +394 -0
  53. package/dist/ConfigProvider-DtyUlWk6.js.map +1 -0
  54. package/dist/{CopyButton-Cnab62vt.cjs → CopyButton-DUG5s3TM.cjs} +2 -2
  55. package/dist/{CopyButton-Cnab62vt.cjs.map → CopyButton-DUG5s3TM.cjs.map} +1 -1
  56. package/dist/{CopyButton-Dm8-V4ku.js → CopyButton-LURMuaYw.js} +3 -3
  57. package/dist/{CopyButton-Dm8-V4ku.js.map → CopyButton-LURMuaYw.js.map} +1 -1
  58. package/dist/{DatePicker-CaGeW_-j.cjs → DatePicker-Bw9gLB8o.cjs} +2 -2
  59. package/dist/{DatePicker-CaGeW_-j.cjs.map → DatePicker-Bw9gLB8o.cjs.map} +1 -1
  60. package/dist/{DatePicker-C4MTCmDn.js → DatePicker-CSIBYSZt.js} +4 -4
  61. package/dist/{DatePicker-C4MTCmDn.js.map → DatePicker-CSIBYSZt.js.map} +1 -1
  62. package/dist/{DateTimePicker-B0CjHKPV.js → DateTimePicker-C9F2yJMf.js} +7 -7
  63. package/dist/{DateTimePicker-B0CjHKPV.js.map → DateTimePicker-C9F2yJMf.js.map} +1 -1
  64. package/dist/{DateTimePicker-DXKaAYey.cjs → DateTimePicker-kikKdt0F.cjs} +2 -2
  65. package/dist/{DateTimePicker-DXKaAYey.cjs.map → DateTimePicker-kikKdt0F.cjs.map} +1 -1
  66. package/dist/{DescriptionList-BSDwobDc.cjs → DescriptionList-DnGkHdzT.cjs} +2 -2
  67. package/dist/{DescriptionList-BSDwobDc.cjs.map → DescriptionList-DnGkHdzT.cjs.map} +1 -1
  68. package/dist/{DescriptionList-BkUS5egS.js → DescriptionList-kfNXbf_D.js} +4 -4
  69. package/dist/{DescriptionList-BkUS5egS.js.map → DescriptionList-kfNXbf_D.js.map} +1 -1
  70. package/dist/{EmptyState-CkkFHKrh.cjs → EmptyState-BM5LrRLq.cjs} +2 -2
  71. package/dist/{EmptyState-CkkFHKrh.cjs.map → EmptyState-BM5LrRLq.cjs.map} +1 -1
  72. package/dist/{EmptyState-DXoaPC7o.js → EmptyState-DrSj2XV_.js} +2 -2
  73. package/dist/{EmptyState-DXoaPC7o.js.map → EmptyState-DrSj2XV_.js.map} +1 -1
  74. package/dist/{ErrorBoundary-CSP_Ctg6.js → ErrorBoundary-DsP4hO_V.js} +3 -3
  75. package/dist/{ErrorBoundary-CSP_Ctg6.js.map → ErrorBoundary-DsP4hO_V.js.map} +1 -1
  76. package/dist/{ErrorBoundary-tZjKtO28.cjs → ErrorBoundary-yz669VEu.cjs} +2 -2
  77. package/dist/{ErrorBoundary-tZjKtO28.cjs.map → ErrorBoundary-yz669VEu.cjs.map} +1 -1
  78. package/dist/{ErrorState-JH4JdrTI.cjs → ErrorState-BThPIYaM.cjs} +2 -2
  79. package/dist/{ErrorState-JH4JdrTI.cjs.map → ErrorState-BThPIYaM.cjs.map} +1 -1
  80. package/dist/{ErrorState-WYsly5-i.js → ErrorState-DEngucdq.js} +7 -7
  81. package/dist/{ErrorState-WYsly5-i.js.map → ErrorState-DEngucdq.js.map} +1 -1
  82. package/dist/{FileCard-D4TB3qGG.js → FileCard-CmCESTQd.js} +3 -3
  83. package/dist/{FileCard-D4TB3qGG.js.map → FileCard-CmCESTQd.js.map} +1 -1
  84. package/dist/{FileCard-BIfPqeek.cjs → FileCard-wxDT2rj9.cjs} +2 -2
  85. package/dist/{FileCard-BIfPqeek.cjs.map → FileCard-wxDT2rj9.cjs.map} +1 -1
  86. package/dist/{FileUploader-YE_DfTNC.cjs → FileUploader-DBNRp5eT.cjs} +2 -2
  87. package/dist/{FileUploader-YE_DfTNC.cjs.map → FileUploader-DBNRp5eT.cjs.map} +1 -1
  88. package/dist/{FileUploader-DPVF76Ha.js → FileUploader-Dp1r4Sxc.js} +29 -29
  89. package/dist/{FileUploader-DPVF76Ha.js.map → FileUploader-Dp1r4Sxc.js.map} +1 -1
  90. package/dist/{FullscreenToggle-ipX55Nj4.cjs → FullscreenToggle-DVdQriWB.cjs} +2 -2
  91. package/dist/{FullscreenToggle-ipX55Nj4.cjs.map → FullscreenToggle-DVdQriWB.cjs.map} +1 -1
  92. package/dist/{FullscreenToggle-CxwGPLdd.js → FullscreenToggle-WGsbE3Op.js} +3 -3
  93. package/dist/{FullscreenToggle-CxwGPLdd.js.map → FullscreenToggle-WGsbE3Op.js.map} +1 -1
  94. package/dist/{IconButton-U_sr2Ahy.cjs → IconButton-DSPdv-oI.cjs} +2 -2
  95. package/dist/{IconButton-U_sr2Ahy.cjs.map → IconButton-DSPdv-oI.cjs.map} +1 -1
  96. package/dist/{IconButton-re6xITGO.js → IconButton-iWbUJAz7.js} +2 -2
  97. package/dist/{IconButton-re6xITGO.js.map → IconButton-iWbUJAz7.js.map} +1 -1
  98. package/dist/{ImageEditor-BwrG1fk7.js → ImageEditor-BDNys8pq.js} +5 -5
  99. package/dist/{ImageEditor-BwrG1fk7.js.map → ImageEditor-BDNys8pq.js.map} +1 -1
  100. package/dist/{ImageEditor-1n50vo_v.cjs → ImageEditor-C40dp2-V.cjs} +2 -2
  101. package/dist/{ImageEditor-1n50vo_v.cjs.map → ImageEditor-C40dp2-V.cjs.map} +1 -1
  102. package/dist/{Loader-7v1QBvHY.js → Loader-DD1vfqmN.js} +2 -2
  103. package/dist/{Loader-7v1QBvHY.js.map → Loader-DD1vfqmN.js.map} +1 -1
  104. package/dist/{Loader-BE3SQr7W.cjs → Loader-RyFTP2X5.cjs} +2 -2
  105. package/dist/{Loader-BE3SQr7W.cjs.map → Loader-RyFTP2X5.cjs.map} +1 -1
  106. package/dist/{LocationPicker-CVJ4jVn2.cjs → LocationPicker-B594f0bz.cjs} +2 -2
  107. package/dist/{LocationPicker-CVJ4jVn2.cjs.map → LocationPicker-B594f0bz.cjs.map} +1 -1
  108. package/dist/{LocationPicker-BvKtZFq0.js → LocationPicker-DpmYaYyd.js} +6 -6
  109. package/dist/{LocationPicker-BvKtZFq0.js.map → LocationPicker-DpmYaYyd.js.map} +1 -1
  110. package/dist/{Modal-CxODxl81.cjs → Modal-7cCok6fV.cjs} +2 -2
  111. package/dist/{Modal-CxODxl81.cjs.map → Modal-7cCok6fV.cjs.map} +1 -1
  112. package/dist/{Modal-DpoiMMM3.js → Modal-DVGTD2Ck.js} +3 -3
  113. package/dist/{Modal-DpoiMMM3.js.map → Modal-DVGTD2Ck.js.map} +1 -1
  114. package/dist/{MultiSelect-B7KwEhL5.js → MultiSelect-D-X833xt.js} +4 -4
  115. package/dist/{MultiSelect-B7KwEhL5.js.map → MultiSelect-D-X833xt.js.map} +1 -1
  116. package/dist/{MultiSelect-2GouMRTl.cjs → MultiSelect-DTKNjUDH.cjs} +2 -2
  117. package/dist/{MultiSelect-2GouMRTl.cjs.map → MultiSelect-DTKNjUDH.cjs.map} +1 -1
  118. package/dist/{NumberField-ThojS4K3.js → NumberField-OPOl0Yph.js} +3 -3
  119. package/dist/{NumberField-ThojS4K3.js.map → NumberField-OPOl0Yph.js.map} +1 -1
  120. package/dist/{NumberField-o2z2QNK1.cjs → NumberField-Xz4yQMlm.cjs} +2 -2
  121. package/dist/{NumberField-o2z2QNK1.cjs.map → NumberField-Xz4yQMlm.cjs.map} +1 -1
  122. package/dist/{OtpField-C3MlMZ2F.js → OtpField-CLrDMNtS.js} +2 -2
  123. package/dist/{OtpField-C3MlMZ2F.js.map → OtpField-CLrDMNtS.js.map} +1 -1
  124. package/dist/{OtpField-BhZq44vV.cjs → OtpField-kd0YghZq.cjs} +2 -2
  125. package/dist/{OtpField-BhZq44vV.cjs.map → OtpField-kd0YghZq.cjs.map} +1 -1
  126. package/dist/{PageError-63Gk6fVC.js → PageError-BIiZDzey.js} +5 -5
  127. package/dist/{PageError-63Gk6fVC.js.map → PageError-BIiZDzey.js.map} +1 -1
  128. package/dist/{PageError-CCKWbrc5.cjs → PageError-v6MAH_OL.cjs} +2 -2
  129. package/dist/{PageError-CCKWbrc5.cjs.map → PageError-v6MAH_OL.cjs.map} +1 -1
  130. package/dist/{PageLayout-BekkDBtT.js → PageLayout-BjaPfXvb.js} +4 -4
  131. package/dist/{PageLayout-BekkDBtT.js.map → PageLayout-BjaPfXvb.js.map} +1 -1
  132. package/dist/{PageLayout-CDPUYu6A.cjs → PageLayout-DH3jochw.cjs} +2 -2
  133. package/dist/{PageLayout-CDPUYu6A.cjs.map → PageLayout-DH3jochw.cjs.map} +1 -1
  134. package/dist/{PageNotFound-BD3zX3cd.js → PageNotFound-C1oSsMG-.js} +5 -5
  135. package/dist/{PageNotFound-BD3zX3cd.js.map → PageNotFound-C1oSsMG-.js.map} +1 -1
  136. package/dist/{PageNotFound-CTR6htwa.cjs → PageNotFound-Cse4bROv.cjs} +2 -2
  137. package/dist/{PageNotFound-CTR6htwa.cjs.map → PageNotFound-Cse4bROv.cjs.map} +1 -1
  138. package/dist/{Pagination-qKjISBJ9.js → Pagination-BNJdqcu4.js} +2 -2
  139. package/dist/{Pagination-qKjISBJ9.js.map → Pagination-BNJdqcu4.js.map} +1 -1
  140. package/dist/{Pagination-BJvLUjQ0.cjs → Pagination-DkmfEmgK.cjs} +2 -2
  141. package/dist/{Pagination-BJvLUjQ0.cjs.map → Pagination-DkmfEmgK.cjs.map} +1 -1
  142. package/dist/{PaletteField-y8KpR4Ap.js → PaletteField-Cdky6Zka.js} +3 -3
  143. package/dist/{PaletteField-y8KpR4Ap.js.map → PaletteField-Cdky6Zka.js.map} +1 -1
  144. package/dist/{PaletteField-CDS9CJW9.cjs → PaletteField-DqZl1mK0.cjs} +2 -2
  145. package/dist/{PaletteField-CDS9CJW9.cjs.map → PaletteField-DqZl1mK0.cjs.map} +1 -1
  146. package/dist/{PhoneField-OjsuevPx.js → PhoneField-DmFaJJEa.js} +4 -4
  147. package/dist/{PhoneField-OjsuevPx.js.map → PhoneField-DmFaJJEa.js.map} +1 -1
  148. package/dist/{PhoneField-Df3J6Hhg.cjs → PhoneField-jq-3_i_b.cjs} +2 -2
  149. package/dist/{PhoneField-Df3J6Hhg.cjs.map → PhoneField-jq-3_i_b.cjs.map} +1 -1
  150. package/dist/{Popconfirm-aCyniPnH.js → Popconfirm-D-8ZG2WR.js} +3 -3
  151. package/dist/{Popconfirm-aCyniPnH.js.map → Popconfirm-D-8ZG2WR.js.map} +1 -1
  152. package/dist/{Popconfirm-BKzJ_EZy.cjs → Popconfirm-KOE9gGi6.cjs} +2 -2
  153. package/dist/{Popconfirm-BKzJ_EZy.cjs.map → Popconfirm-KOE9gGi6.cjs.map} +1 -1
  154. package/dist/{Progress-DWOoLd8u.cjs → Progress-7EyhPtnu.cjs} +2 -2
  155. package/dist/{Progress-DWOoLd8u.cjs.map → Progress-7EyhPtnu.cjs.map} +1 -1
  156. package/dist/{Progress-DzxbkcaD.js → Progress-CdX666FP.js} +2 -2
  157. package/dist/{Progress-DzxbkcaD.js.map → Progress-CdX666FP.js.map} +1 -1
  158. package/dist/{QrCode-C8uAPiHq.cjs → QrCode-ClIJjjvF.cjs} +2 -2
  159. package/dist/{QrCode-C8uAPiHq.cjs.map → QrCode-ClIJjjvF.cjs.map} +1 -1
  160. package/dist/{QrCode-DaJYqBc1.js → QrCode-D7ocSDi7.js} +2 -2
  161. package/dist/{QrCode-DaJYqBc1.js.map → QrCode-D7ocSDi7.js.map} +1 -1
  162. package/dist/{RemoveDialog-MhEU5Zl3.js → RemoveDialog-DTzRPLaT.js} +5 -5
  163. package/dist/{RemoveDialog-MhEU5Zl3.js.map → RemoveDialog-DTzRPLaT.js.map} +1 -1
  164. package/dist/{RemoveDialog-BnOtR6-q.cjs → RemoveDialog-UsSX5z8Y.cjs} +2 -2
  165. package/dist/{RemoveDialog-BnOtR6-q.cjs.map → RemoveDialog-UsSX5z8Y.cjs.map} +1 -1
  166. package/dist/{RichTextEditor-zkoxujnO.js → RichTextEditor-BMctlkVC.js} +7 -7
  167. package/dist/{RichTextEditor-zkoxujnO.js.map → RichTextEditor-BMctlkVC.js.map} +1 -1
  168. package/dist/{RichTextEditor-Cnrnvv1f.cjs → RichTextEditor-Bh0Q3dIW.cjs} +2 -2
  169. package/dist/{RichTextEditor-Cnrnvv1f.cjs.map → RichTextEditor-Bh0Q3dIW.cjs.map} +1 -1
  170. package/dist/{RootLayout-Z9PuRfsa.cjs → RootLayout-BztZetpk.cjs} +2 -2
  171. package/dist/{RootLayout-Z9PuRfsa.cjs.map → RootLayout-BztZetpk.cjs.map} +1 -1
  172. package/dist/{RootLayout-C4r9i5Go.js → RootLayout-CTkv4iQJ.js} +14 -14
  173. package/dist/{RootLayout-C4r9i5Go.js.map → RootLayout-CTkv4iQJ.js.map} +1 -1
  174. package/dist/{Select-CylqFHce.cjs → Select-BzVyK6Ne.cjs} +2 -2
  175. package/dist/{Select-CylqFHce.cjs.map → Select-BzVyK6Ne.cjs.map} +1 -1
  176. package/dist/{Select-jT94L1vq.js → Select-CmonDIIU.js} +3 -3
  177. package/dist/{Select-jT94L1vq.js.map → Select-CmonDIIU.js.map} +1 -1
  178. package/dist/{Sidebar-B1O2RsbR.js → Sidebar-CLr-DyQ_.js} +3 -3
  179. package/dist/{Sidebar-B1O2RsbR.js.map → Sidebar-CLr-DyQ_.js.map} +1 -1
  180. package/dist/{Sidebar-Bcm0fgVm.cjs → Sidebar-CM-jZfj5.cjs} +2 -2
  181. package/dist/{Sidebar-Bcm0fgVm.cjs.map → Sidebar-CM-jZfj5.cjs.map} +1 -1
  182. package/dist/{Slider-DC-ugZwT.js → Slider-C7Wb3q_F.js} +2 -2
  183. package/dist/{Slider-DC-ugZwT.js.map → Slider-C7Wb3q_F.js.map} +1 -1
  184. package/dist/{Slider-CV7ug0WF.cjs → Slider-Oe9VSAdy.cjs} +2 -2
  185. package/dist/{Slider-CV7ug0WF.cjs.map → Slider-Oe9VSAdy.cjs.map} +1 -1
  186. package/dist/{SpeedDial-C6yiMUe8.js → SpeedDial-CCGQlwn2.js} +2 -2
  187. package/dist/{SpeedDial-C6yiMUe8.js.map → SpeedDial-CCGQlwn2.js.map} +1 -1
  188. package/dist/{SpeedDial-DOgm2DDX.cjs → SpeedDial-DpIXoYHB.cjs} +2 -2
  189. package/dist/{SpeedDial-DOgm2DDX.cjs.map → SpeedDial-DpIXoYHB.cjs.map} +1 -1
  190. package/dist/{Stepper-BZdYGpBN.js → Stepper-D_WKS1RG.js} +2 -2
  191. package/dist/{Stepper-BZdYGpBN.js.map → Stepper-D_WKS1RG.js.map} +1 -1
  192. package/dist/{Stepper-DqM86TGV.cjs → Stepper-PBDU60G_.cjs} +2 -2
  193. package/dist/{Stepper-DqM86TGV.cjs.map → Stepper-PBDU60G_.cjs.map} +1 -1
  194. package/dist/{Table-BgaCwRDQ.cjs → Table-CZ4n4-TN.cjs} +2 -2
  195. package/dist/{Table-BgaCwRDQ.cjs.map → Table-CZ4n4-TN.cjs.map} +1 -1
  196. package/dist/{Table-FZlVWoYi.js → Table-DZQVa_PE.js} +16 -16
  197. package/dist/{Table-FZlVWoYi.js.map → Table-DZQVa_PE.js.map} +1 -1
  198. package/dist/{Tabs-BqQPkorY.js → Tabs-B063mP-v.js} +12 -12
  199. package/dist/{Tabs-BqQPkorY.js.map → Tabs-B063mP-v.js.map} +1 -1
  200. package/dist/{Tabs-kGeyFhJ6.cjs → Tabs-Byhqm-TE.cjs} +2 -2
  201. package/dist/{Tabs-kGeyFhJ6.cjs.map → Tabs-Byhqm-TE.cjs.map} +1 -1
  202. package/dist/{TagsField-B_sjp48X.cjs → TagsField-g_LtwYgz.cjs} +2 -2
  203. package/dist/{TagsField-B_sjp48X.cjs.map → TagsField-g_LtwYgz.cjs.map} +1 -1
  204. package/dist/{TagsField-ByTx9JXK.js → TagsField-hQFYyNcM.js} +4 -4
  205. package/dist/{TagsField-ByTx9JXK.js.map → TagsField-hQFYyNcM.js.map} +1 -1
  206. package/dist/{TextField-CBYJIfau.cjs → TextField-D4s2hGSd.cjs} +2 -2
  207. package/dist/{TextField-CBYJIfau.cjs.map → TextField-D4s2hGSd.cjs.map} +1 -1
  208. package/dist/{TextField-CyKIx-d-.js → TextField-Dfpk0jOg.js} +3 -3
  209. package/dist/{TextField-CyKIx-d-.js.map → TextField-Dfpk0jOg.js.map} +1 -1
  210. package/dist/{ThemeToggle-Dg6IishB.js → ThemeToggle-BQQ3eswr.js} +7 -7
  211. package/dist/{ThemeToggle-Dg6IishB.js.map → ThemeToggle-BQQ3eswr.js.map} +1 -1
  212. package/dist/{ThemeToggle-D2dIqiBa.cjs → ThemeToggle-BTTI7Jz0.cjs} +2 -2
  213. package/dist/{ThemeToggle-D2dIqiBa.cjs.map → ThemeToggle-BTTI7Jz0.cjs.map} +1 -1
  214. package/dist/{TimeColumns-Cx8J5qzW.js → TimeColumns-BpjhrNCq.js} +2 -2
  215. package/dist/{TimeColumns-Cx8J5qzW.js.map → TimeColumns-BpjhrNCq.js.map} +1 -1
  216. package/dist/{TimeColumns-DVmK_T_P.cjs → TimeColumns-DZYGWWG_.cjs} +2 -2
  217. package/dist/{TimeColumns-DVmK_T_P.cjs.map → TimeColumns-DZYGWWG_.cjs.map} +1 -1
  218. package/dist/{TimePicker-0nZOPRKp.cjs → TimePicker-DChtZgBs.cjs} +2 -2
  219. package/dist/{TimePicker-0nZOPRKp.cjs.map → TimePicker-DChtZgBs.cjs.map} +1 -1
  220. package/dist/{TimePicker-sAhtvqQ4.js → TimePicker-mzoMIlpq.js} +5 -5
  221. package/dist/{TimePicker-sAhtvqQ4.js.map → TimePicker-mzoMIlpq.js.map} +1 -1
  222. package/dist/{Toaster-BOW9rzLq.js → Toaster-79DvOW80.js} +8 -8
  223. package/dist/{Toaster-BOW9rzLq.js.map → Toaster-79DvOW80.js.map} +1 -1
  224. package/dist/{Toaster-DYGo92ke.cjs → Toaster-lonArt-H.cjs} +2 -2
  225. package/dist/{Toaster-DYGo92ke.cjs.map → Toaster-lonArt-H.cjs.map} +1 -1
  226. package/dist/{TranslatedFields-C_DuLotV.cjs → TranslatedFields-BYpMrYaw.cjs} +2 -2
  227. package/dist/{TranslatedFields-C_DuLotV.cjs.map → TranslatedFields-BYpMrYaw.cjs.map} +1 -1
  228. package/dist/{TranslatedFields-CcE0td9p.js → TranslatedFields-CHHtXO_n.js} +9 -9
  229. package/dist/{TranslatedFields-CcE0td9p.js.map → TranslatedFields-CHHtXO_n.js.map} +1 -1
  230. package/dist/{UserCard-DeONbaKj.js → UserCard-BJFNP_nl.js} +3 -3
  231. package/dist/{UserCard-DeONbaKj.js.map → UserCard-BJFNP_nl.js.map} +1 -1
  232. package/dist/{UserCard-DLVptkLr.cjs → UserCard-SlkCgZS9.cjs} +2 -2
  233. package/dist/{UserCard-DLVptkLr.cjs.map → UserCard-SlkCgZS9.cjs.map} +1 -1
  234. package/dist/app/AdminRoot.d.cts +9 -4
  235. package/dist/app/AdminRoot.d.ts +9 -4
  236. package/dist/auth/AuthGuard.d.cts +9 -3
  237. package/dist/auth/AuthGuard.d.ts +9 -3
  238. package/dist/auth/authLayoutRoute.d.cts +11 -3
  239. package/dist/auth/authLayoutRoute.d.ts +11 -3
  240. package/dist/auth/authRedirect.d.cts +64 -0
  241. package/dist/auth/authRedirect.d.ts +64 -0
  242. package/dist/authLayoutRoute-DCG9gCZ8.cjs +2 -0
  243. package/dist/authLayoutRoute-DCG9gCZ8.cjs.map +1 -0
  244. package/dist/authLayoutRoute-TuEqVizw.js +15 -0
  245. package/dist/authLayoutRoute-TuEqVizw.js.map +1 -0
  246. package/dist/components/Alert/index.cjs +1 -1
  247. package/dist/components/Alert/index.js +1 -1
  248. package/dist/components/Breadcrumbs/index.cjs +1 -1
  249. package/dist/components/Breadcrumbs/index.js +1 -1
  250. package/dist/components/Button/index.cjs +1 -1
  251. package/dist/components/Button/index.js +1 -1
  252. package/dist/components/Card/index.cjs +1 -1
  253. package/dist/components/Card/index.js +1 -1
  254. package/dist/components/Chip/index.cjs +1 -1
  255. package/dist/components/Chip/index.js +1 -1
  256. package/dist/components/CodeBlock/index.cjs +1 -1
  257. package/dist/components/CodeBlock/index.js +1 -1
  258. package/dist/components/ColorPicker/index.cjs +1 -1
  259. package/dist/components/ColorPicker/index.js +1 -1
  260. package/dist/components/ColorRamp/index.cjs +1 -1
  261. package/dist/components/ColorRamp/index.js +1 -1
  262. package/dist/components/CopyButton/index.cjs +1 -1
  263. package/dist/components/CopyButton/index.js +1 -1
  264. package/dist/components/DatePicker/index.cjs +1 -1
  265. package/dist/components/DatePicker/index.js +1 -1
  266. package/dist/components/DateTimePicker/index.cjs +1 -1
  267. package/dist/components/DateTimePicker/index.js +1 -1
  268. package/dist/components/DescriptionList/index.cjs +1 -1
  269. package/dist/components/DescriptionList/index.js +1 -1
  270. package/dist/components/EmptyState/index.cjs +1 -1
  271. package/dist/components/EmptyState/index.js +1 -1
  272. package/dist/components/ErrorState/index.cjs +1 -1
  273. package/dist/components/ErrorState/index.js +2 -2
  274. package/dist/components/FileCard/index.cjs +1 -1
  275. package/dist/components/FileCard/index.js +1 -1
  276. package/dist/components/FileUploader/index.cjs +1 -1
  277. package/dist/components/FileUploader/index.js +1 -1
  278. package/dist/components/FullscreenToggle/index.cjs +1 -1
  279. package/dist/components/FullscreenToggle/index.js +1 -1
  280. package/dist/components/IconButton/index.cjs +1 -1
  281. package/dist/components/IconButton/index.js +1 -1
  282. package/dist/components/ImageEditor/index.cjs +1 -1
  283. package/dist/components/ImageEditor/index.js +1 -1
  284. package/dist/components/Loader/index.cjs +1 -1
  285. package/dist/components/Loader/index.js +1 -1
  286. package/dist/components/LocationPicker/index.cjs +1 -1
  287. package/dist/components/LocationPicker/index.js +1 -1
  288. package/dist/components/Modal/index.cjs +1 -1
  289. package/dist/components/Modal/index.js +1 -1
  290. package/dist/components/MultiSelect/index.cjs +1 -1
  291. package/dist/components/MultiSelect/index.js +1 -1
  292. package/dist/components/NumberField/index.cjs +1 -1
  293. package/dist/components/NumberField/index.js +1 -1
  294. package/dist/components/OtpField/index.cjs +1 -1
  295. package/dist/components/OtpField/index.js +1 -1
  296. package/dist/components/PageError/index.cjs +1 -1
  297. package/dist/components/PageError/index.js +1 -1
  298. package/dist/components/PageLayout/index.cjs +1 -1
  299. package/dist/components/PageLayout/index.js +1 -1
  300. package/dist/components/PageNotFound/index.cjs +1 -1
  301. package/dist/components/PageNotFound/index.js +1 -1
  302. package/dist/components/Pagination/index.cjs +1 -1
  303. package/dist/components/Pagination/index.js +1 -1
  304. package/dist/components/PaletteField/index.cjs +1 -1
  305. package/dist/components/PaletteField/index.js +1 -1
  306. package/dist/components/PhoneField/index.cjs +1 -1
  307. package/dist/components/PhoneField/index.js +1 -1
  308. package/dist/components/Popconfirm/index.cjs +1 -1
  309. package/dist/components/Popconfirm/index.js +1 -1
  310. package/dist/components/Progress/index.cjs +1 -1
  311. package/dist/components/Progress/index.js +1 -1
  312. package/dist/components/QrCode/index.cjs +1 -1
  313. package/dist/components/QrCode/index.js +1 -1
  314. package/dist/components/RemoveDialog/index.cjs +1 -1
  315. package/dist/components/RemoveDialog/index.js +1 -1
  316. package/dist/components/RichTextEditor/index.cjs +1 -1
  317. package/dist/components/RichTextEditor/index.js +1 -1
  318. package/dist/components/RootLayout/index.cjs +1 -1
  319. package/dist/components/RootLayout/index.js +1 -1
  320. package/dist/components/Select/index.cjs +1 -1
  321. package/dist/components/Select/index.js +1 -1
  322. package/dist/components/Sidebar/index.cjs +1 -1
  323. package/dist/components/Sidebar/index.js +1 -1
  324. package/dist/components/Slider/index.cjs +1 -1
  325. package/dist/components/Slider/index.js +1 -1
  326. package/dist/components/SpeedDial/index.cjs +1 -1
  327. package/dist/components/SpeedDial/index.js +1 -1
  328. package/dist/components/Stepper/index.cjs +1 -1
  329. package/dist/components/Stepper/index.js +1 -1
  330. package/dist/components/Table/index.cjs +1 -1
  331. package/dist/components/Table/index.js +1 -1
  332. package/dist/components/Tabs/index.cjs +1 -1
  333. package/dist/components/Tabs/index.js +1 -1
  334. package/dist/components/TagsField/index.cjs +1 -1
  335. package/dist/components/TagsField/index.js +1 -1
  336. package/dist/components/TextField/index.cjs +1 -1
  337. package/dist/components/TextField/index.js +1 -1
  338. package/dist/components/ThemeToggle/index.cjs +1 -1
  339. package/dist/components/ThemeToggle/index.js +1 -1
  340. package/dist/components/TimePicker/index.cjs +1 -1
  341. package/dist/components/TimePicker/index.js +1 -1
  342. package/dist/components/Toast/index.cjs +1 -1
  343. package/dist/components/Toast/index.js +1 -1
  344. package/dist/components/TranslatedFields/index.cjs +1 -1
  345. package/dist/components/TranslatedFields/index.js +1 -1
  346. package/dist/components/UserCard/index.cjs +1 -1
  347. package/dist/components/UserCard/index.js +1 -1
  348. package/dist/entries/app.cjs +1 -1
  349. package/dist/entries/app.js +1 -1
  350. package/dist/entries/auth.cjs +1 -1
  351. package/dist/entries/auth.d.cts +1 -0
  352. package/dist/entries/auth.d.ts +1 -0
  353. package/dist/entries/auth.js +7 -4
  354. package/dist/entries/components.cjs +1 -1
  355. package/dist/entries/components.js +52 -52
  356. package/dist/entries/i18n.cjs +1 -1
  357. package/dist/entries/i18n.js +1 -1
  358. package/dist/entries/theme.cjs +1 -1
  359. package/dist/entries/theme.d.cts +1 -1
  360. package/dist/entries/theme.d.ts +1 -1
  361. package/dist/entries/theme.js +20 -18
  362. package/dist/index.cjs +1 -1
  363. package/dist/index.js +259 -254
  364. package/dist/theme/ConfigProvider.d.cts +17 -0
  365. package/dist/theme/ConfigProvider.d.ts +17 -0
  366. package/dist/theme/index.d.cts +1 -1
  367. package/dist/theme/index.d.ts +1 -1
  368. package/dist/{useHomeTo-BL3e8Sc6.js → useHomeTo-BLSvhJd5.js} +2 -2
  369. package/dist/{useHomeTo-BL3e8Sc6.js.map → useHomeTo-BLSvhJd5.js.map} +1 -1
  370. package/dist/{useHomeTo-W1PDW5CU.cjs → useHomeTo-cXCg1tf0.cjs} +2 -2
  371. package/dist/{useHomeTo-W1PDW5CU.cjs.map → useHomeTo-cXCg1tf0.cjs.map} +1 -1
  372. package/dist/{useOptionMenu-CVl7VHXl.cjs → useOptionMenu-6ZffgbYG.cjs} +2 -2
  373. package/dist/{useOptionMenu-CVl7VHXl.cjs.map → useOptionMenu-6ZffgbYG.cjs.map} +1 -1
  374. package/dist/{useOptionMenu-BkKiZ6Ax.js → useOptionMenu-CxM6FHXL.js} +3 -3
  375. package/dist/{useOptionMenu-BkKiZ6Ax.js.map → useOptionMenu-CxM6FHXL.js.map} +1 -1
  376. package/package.json +1 -1
  377. package/dist/AdminRoot-BZ1v5vN9.js +0 -101
  378. package/dist/AdminRoot-BZ1v5vN9.js.map +0 -1
  379. package/dist/AdminRoot-DJ4-UMAB.cjs +0 -2
  380. package/dist/AdminRoot-DJ4-UMAB.cjs.map +0 -1
  381. package/dist/AuthGuard-CVklwDbj.js +0 -7
  382. package/dist/AuthGuard-CVklwDbj.js.map +0 -1
  383. package/dist/AuthGuard-kfOZviar.cjs +0 -2
  384. package/dist/AuthGuard-kfOZviar.cjs.map +0 -1
  385. package/dist/ConfigProvider-DBU6rOIA.cjs +0 -2
  386. package/dist/ConfigProvider-DBU6rOIA.cjs.map +0 -1
  387. package/dist/ConfigProvider-DVDGtCUc.js +0 -386
  388. package/dist/ConfigProvider-DVDGtCUc.js.map +0 -1
  389. package/dist/authLayoutRoute-B10sXioW.js +0 -11
  390. package/dist/authLayoutRoute-B10sXioW.js.map +0 -1
  391. package/dist/authLayoutRoute-BVQ4LhuU.cjs +0 -2
  392. package/dist/authLayoutRoute-BVQ4LhuU.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePicker-DXKaAYey.cjs","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":"2gBAyGA,SAASA,GAAiBC,EAAiBC,EAA8B,CAQvE,MAAO,cAPMD,EACTC,EACE,aACA,UACFA,EACE,WACA,OACmB,EAC3B,CAaO,MAAMC,GAAiBC,EAAAA,WAC5B,SACE,CACE,MAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,GACA,WAAAC,GACA,SAAAC,GAAW,GACX,UAAAC,GAAY,GACZ,SAAAC,EAAW,GACX,MAAAC,EACA,aAAAC,GACA,SAAAC,EACA,OAAQC,GACR,YAAaC,GACb,IAAAC,EAAM,GACN,OAAAhB,EAAS,GACT,WAAAiB,GAAa,EACb,YAAAhB,EAA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AAAA,SAAA,CACC,MAAOpE,EACP,MAAOuB,GACP,cAAeC,EACf,SAAUyB,GACV,IAAK7C,EACL,IAAKC,EACL,aAAAnC,EACA,aAAAC,GACA,QAAAa,EAAA,CAAA,CACF,EAGJ,CACE,MAAO,OACP,MAAON,EAAE,wBAAwB,EACjC,KAAM,QACN,QACEiF,EAAAA,IAAC,MAAA,CAAI,UAAWM,KAAG,SACjB,SAAAN,EAAAA,IAACU,EAAAA,YAAA,CACC,MAAOrE,EACP,SAAUsD,GACV,OAAAzG,EACA,WAAAiB,GACA,YAAAhB,CAAA,CAAA,CACF,CACF,CAAA,CAEJ,CACF,CAAA,EAEF6G,EAAAA,IAAC,OAAI,UAAWM,KAAG,OACjB,SAAAN,MAACW,GAAAA,OAAA,CAAO,KAAK,KAAK,QAAQ,SAAS,MAAM,UAAU,QAAS,IAAMpC,EAAa,EAAI,EAChF,SAAAxD,EAAE,aAAa,CAAA,CAClB,CAAA,CACF,CAAA,CAAA,CAAA,EAGDyB,GAAsB,MACrBwD,EAAAA,IAACC,GAAAA,WAAA,CACC,GAAG,OACH,GAAI7E,EACJ,QAAQ,YACR,MAAOmB,EAAgB,QAAU,QACjC,UAAWwD,EAAAA,OAAO,OAEjB,SAAAvD,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CACF"}
1
+ {"version":3,"file":"DateTimePicker-kikKdt0F.cjs","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":"2gBAyGA,SAASA,GAAiBC,EAAiBC,EAA8B,CAQvE,MAAO,cAPMD,EACTC,EACE,aACA,UACFA,EACE,WACA,OACmB,EAC3B,CAaO,MAAMC,GAAiBC,EAAAA,WAC5B,SACE,CACE,MAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,GACA,WAAAC,GACA,SAAAC,GAAW,GACX,UAAAC,GAAY,GACZ,SAAAC,EAAW,GACX,MAAAC,EACA,aAAAC,GACA,SAAAC,EACA,OAAQC,GACR,YAAaC,GACb,IAAAC,EAAM,GACN,OAAAhB,EAAS,GACT,WAAAiB,GAAa,EACb,YAAAhB,EAAc,GACd,YAAAiB,GACA,IAAAC,GACA,IAAAC,GACA,aAAAC,EACA,aAAAC,GAAe,EACf,UAAAC,GAAY,GACZ,KAAAC,EACA,GAAIC,GACJ,UAAAC,GACA,MAAAC,EAAA,EAEFC,EACA,CACA,MAAMC,EAAIC,GAAAA,KAAA,EACJC,GAAUC,EAAAA,MAAA,EACVC,EAAKR,IAAUM,GACfG,EAAW,GAAGD,CAAE,UAChBE,GAAU,GAAGF,CAAE,SACfG,EAAStB,IAAcf,GAAiBC,EAAQC,CAAW,EAG3DoC,EAActB,KAAoBC,EAAM,yBAA2B,uBAGnEsB,EAAOC,GAAAA,eAAA,EACPC,EAAc,GAAQF,GAAQd,GAC9BiB,EAAQD,EAAcF,EAAM,MAAMd,CAAK,EAAI,OAC3CkB,GACJ/B,IAAU,OACNA,EACA6B,EACIF,EAAM,OAAOd,CAAK,GAA4B,GAChD,O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AAxD,EAAE,aAAa,CAAA,CAClB,CAAA,CACF,CAAA,CAAA,CAAA,EAGDyB,GAAsB,MACrBwD,EAAAA,IAACC,GAAAA,WAAA,CACC,GAAG,OACH,GAAI7E,EACJ,QAAQ,YACR,MAAOmB,EAAgB,QAAU,QACjC,UAAWwD,EAAAA,OAAO,OAEjB,SAAAvD,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CACF"}
@@ -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-Cnab62vt.cjs"),X=require("./IconButton-U_sr2Ahy.cjs"),k=require("./Skeleton-DK0lAjS9.cjs"),B=require("./Typography-d97DdbNd.cjs"),Y=require("./ConfigProvider-DBU6rOIA.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-BSDwobDc.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-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 +1 @@
1
- {"version":3,"file":"DescriptionList-BSDwobDc.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,EAE1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AA,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-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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J,CAAA,CAAA,EAvCK/C,EAAK,KAAOmD,CAAA,CA0CvB,CAAC,CAAA,CAAA,CACP,CAAA,CAAA,CAGN,CACF"}
@@ -4,11 +4,11 @@ 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
6
  import { b as X, a as Y } from "./Icon-B7DJn8Tw.js";
7
- import { C as Z } from "./CopyButton-Dm8-V4ku.js";
8
- import { I as W } from "./IconButton-re6xITGO.js";
7
+ import { C as Z } from "./CopyButton-LURMuaYw.js";
8
+ import { I as W } from "./IconButton-iWbUJAz7.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-DVDGtCUc.js";
11
+ import { a as ee } from "./ConfigProvider-DtyUlWk6.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-BkUS5egS.js.map
175
+ //# sourceMappingURL=DescriptionList-kfNXbf_D.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList-BkUS5egS.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,GA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AA,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-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":";;;;;;;;;;;;;;;;;;;;;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,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 e=require("react/jsx-runtime"),S=require("react"),N=require("clsx"),c=require("./Icon-CBg21lKA.cjs"),j=require("./ConfigProvider-DBU6rOIA.cjs"),g="_emptyState_1vpxy_3",h="_sm_1vpxy_17",f="_md_1vpxy_23",E="_lg_1vpxy_29",I="_icon_1vpxy_37",q="_title_1vpxy_55",b="_description_1vpxy_61",C="_action_1vpxy_70",O="_pattern_1vpxy_77",T="_tinted_1vpxy_100",t={emptyState:g,sm:h,md:f,lg:E,icon:I,title:q,description:b,action:C,pattern:O,tinted:T},w=new Set(c.ICON_NAMES),z=S.forwardRef(function({icon:n,title:_,description:i,action:r,size:d="md",pattern:p=!0,color:s,className:m,style:l,children:x,...y},u){const v=j.useT(),o=_??v("emptyState.title"),a=n===!1?null:n==null?e.jsx(c.Icon,{name:"FolderOpen"}):typeof n=="string"&&w.has(n)?e.jsx(c.Icon,{name:n}):n;return e.jsxs("div",{ref:u,className:N.clsx(t.emptyState,t[d],p&&t.pattern,s&&t.tinted,m),style:s?{"--tz-btn-rgb":`var(--tz-color-${s}-rgb)`,...l}:l,...y,children:[a!=null&&e.jsx("div",{className:t.icon,"aria-hidden":!0,children:a}),o!=null&&e.jsx("div",{className:t.title,children:o}),i!=null&&e.jsx("div",{className:t.description,children:i}),r!=null&&e.jsx("div",{className:t.action,children:r}),x]})});exports.EmptyState=z;
2
- //# sourceMappingURL=EmptyState-CkkFHKrh.cjs.map
1
+ "use strict";const e=require("react/jsx-runtime"),S=require("react"),N=require("clsx"),c=require("./Icon-CBg21lKA.cjs"),j=require("./ConfigProvider-CYSpuSMJ.cjs"),g="_emptyState_1vpxy_3",h="_sm_1vpxy_17",f="_md_1vpxy_23",E="_lg_1vpxy_29",I="_icon_1vpxy_37",q="_title_1vpxy_55",b="_description_1vpxy_61",C="_action_1vpxy_70",O="_pattern_1vpxy_77",T="_tinted_1vpxy_100",t={emptyState:g,sm:h,md:f,lg:E,icon:I,title:q,description:b,action:C,pattern:O,tinted:T},w=new Set(c.ICON_NAMES),z=S.forwardRef(function({icon:n,title:_,description:i,action:r,size:d="md",pattern:p=!0,color:s,className:m,style:l,children:x,...y},u){const v=j.useT(),o=_??v("emptyState.title"),a=n===!1?null:n==null?e.jsx(c.Icon,{name:"FolderOpen"}):typeof n=="string"&&w.has(n)?e.jsx(c.Icon,{name:n}):n;return e.jsxs("div",{ref:u,className:N.clsx(t.emptyState,t[d],p&&t.pattern,s&&t.tinted,m),style:s?{"--tz-btn-rgb":`var(--tz-color-${s}-rgb)`,...l}:l,...y,children:[a!=null&&e.jsx("div",{className:t.icon,"aria-hidden":!0,children:a}),o!=null&&e.jsx("div",{className:t.title,children:o}),i!=null&&e.jsx("div",{className:t.description,children:i}),r!=null&&e.jsx("div",{className:t.action,children:r}),x]})});exports.EmptyState=z;
2
+ //# sourceMappingURL=EmptyState-BM5LrRLq.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-CkkFHKrh.cjs","sources":["../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport styles from './EmptyState.module.css'\n\nexport type EmptyStateSize = 'sm' | 'md' | 'lg'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Leading glyph shown in a soft circle — an `IconName`, any node, or `false` to hide it. Defaults to `FolderOpen`. */\n icon?: IconName | ReactNode | false\n /** Heading line. Defaults to `\"No Results Found\"`. */\n title?: ReactNode\n /** Muted description under the title (e.g. a hint on what to do next). */\n description?: ReactNode\n /** Action slot under the text — e.g. an \"Add Item\" or \"Clear Filters\" button. */\n action?: ReactNode\n /** Size — scales the icon, text, and vertical padding. Defaults to `md`. */\n size?: EmptyStateSize\n /**\n * Polished \"hero\" look: a faded grid backdrop (fades out toward the edges) + an elevated icon\n * (gradient + drop shadow). Defaults to `true`; pass `pattern={false}` for the flat, compact placeholder.\n */\n pattern?: boolean\n /** Tint the icon puck with a theme color (e.g. `error` for a failure). Omitted → the neutral muted puck. */\n color?: ThemeColor\n /** Extra content rendered below the action. */\n children?: ReactNode\n}\n\n/**\n * The empty-state placeholder — drop it in wherever a page, table, list, or gallery has nothing to\n * show (no records yet, no search matches). A centered, muted glyph in a soft circle + a `title` +\n * an optional `description` and `action` (e.g. a \"Add Item\" / \"Clear Filters\" button). Neutral by\n * design; pass a custom `icon` node for a tinted glyph. Token-only styling.\n */\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n {\n icon,\n title,\n description,\n action,\n size = 'md',\n pattern = true,\n color,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const resolvedTitle = title ?? t('emptyState.title')\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name=\"FolderOpen\" />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.emptyState,\n styles[size],\n pattern && styles.pattern,\n color && styles.tinted,\n className,\n )}\n style={\n (color\n ? { '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style }\n : style) as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <div className={styles.icon} aria-hidden>\n {renderedIcon}\n </div>\n )}\n {resolvedTitle != null && <div className={styles.title}>{resolvedTitle}</div>}\n {description != null && <div className={styles.description}>{description}</div>}\n {action != null && <div className={styles.action}>{action}</div>}\n {children}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","EmptyState","forwardRef","icon","title","description","action","size","pattern","color","className","style","children","props","ref","t","useT","resolvedTitle","renderedIcon","jsx","Icon","jsxs","clsx","styles"],"mappings":"ycASMA,EAAgB,IAAI,IAAYC,YAAU,EA8BnCC,EAAaC,EAAAA,WAA4C,SACpE,CACE,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,OAAAC,EACA,KAAAC,EAAO,KACP,QAAAC,EAAU,GACV,MAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAgBb,GAASW,EAAE,kBAAkB,EAC7CG,EACJf,IAAS,GAAQ,KAAOA,GAAQ,KAC9BgB,MAACC,EAAAA,KAAA,CAAK,KAAK,YAAA,CAAa,EACtB,OAAOjB,GAAS,UAAYJ,EAAc,IAAII,CAAI,EACpDgB,MAACC,EAAAA,KAAA,CAAK,KAAMjB,CAAA,CAAkB,EAE9BA,EAGJ,OACEkB,EAAAA,KAAC,MAAA,CACC,IAAAP,EACA,UAAWQ,EAAAA,KACTC,EAAO,WACPA,EAAOhB,CAAI,EACXC,GAAWe,EAAO,QAClBd,GAASc,EAAO,OAChBb,CAAA,EAEF,MACGD,EACG,CAAE,eAAgB,kBAAkBA,CAAK,QAAS,GAAGE,CAAA,EACrDA,EAEL,GAAGE,EAEH,SAAA,CAAAK,GAAgB,YACd,MAAA,CAAI,UAAWK,EAAO,KAAM,cAAW,GACrC,SAAAL,CAAA,CACH,EAEDD,GAAiB,MAAQE,EAAAA,IAAC,OAAI,UAAWI,EAAO,MAAQ,SAAAN,EAAc,EACtEZ,GAAe,MAAQc,EAAAA,IAAC,OAAI,UAAWI,EAAO,YAAc,SAAAlB,EAAY,EACxEC,GAAU,MAAQa,EAAAA,IAAC,OAAI,UAAWI,EAAO,OAAS,SAAAjB,EAAO,EACzDM,CAAA,CAAA,CAAA,CAGP,CAAC"}
1
+ {"version":3,"file":"EmptyState-BM5LrRLq.cjs","sources":["../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport styles from './EmptyState.module.css'\n\nexport type EmptyStateSize = 'sm' | 'md' | 'lg'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Leading glyph shown in a soft circle — an `IconName`, any node, or `false` to hide it. Defaults to `FolderOpen`. */\n icon?: IconName | ReactNode | false\n /** Heading line. Defaults to `\"No Results Found\"`. */\n title?: ReactNode\n /** Muted description under the title (e.g. a hint on what to do next). */\n description?: ReactNode\n /** Action slot under the text — e.g. an \"Add Item\" or \"Clear Filters\" button. */\n action?: ReactNode\n /** Size — scales the icon, text, and vertical padding. Defaults to `md`. */\n size?: EmptyStateSize\n /**\n * Polished \"hero\" look: a faded grid backdrop (fades out toward the edges) + an elevated icon\n * (gradient + drop shadow). Defaults to `true`; pass `pattern={false}` for the flat, compact placeholder.\n */\n pattern?: boolean\n /** Tint the icon puck with a theme color (e.g. `error` for a failure). Omitted → the neutral muted puck. */\n color?: ThemeColor\n /** Extra content rendered below the action. */\n children?: ReactNode\n}\n\n/**\n * The empty-state placeholder — drop it in wherever a page, table, list, or gallery has nothing to\n * show (no records yet, no search matches). A centered, muted glyph in a soft circle + a `title` +\n * an optional `description` and `action` (e.g. a \"Add Item\" / \"Clear Filters\" button). Neutral by\n * design; pass a custom `icon` node for a tinted glyph. Token-only styling.\n */\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n {\n icon,\n title,\n description,\n action,\n size = 'md',\n pattern = true,\n color,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const resolvedTitle = title ?? t('emptyState.title')\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name=\"FolderOpen\" />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.emptyState,\n styles[size],\n pattern && styles.pattern,\n color && styles.tinted,\n className,\n )}\n style={\n (color\n ? { '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style }\n : style) as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <div className={styles.icon} aria-hidden>\n {renderedIcon}\n </div>\n )}\n {resolvedTitle != null && <div className={styles.title}>{resolvedTitle}</div>}\n {description != null && <div className={styles.description}>{description}</div>}\n {action != null && <div className={styles.action}>{action}</div>}\n {children}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","EmptyState","forwardRef","icon","title","description","action","size","pattern","color","className","style","children","props","ref","t","useT","resolvedTitle","renderedIcon","jsx","Icon","jsxs","clsx","styles"],"mappings":"ycASMA,EAAgB,IAAI,IAAYC,YAAU,EA8BnCC,EAAaC,EAAAA,WAA4C,SACpE,CACE,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,OAAAC,EACA,KAAAC,EAAO,KACP,QAAAC,EAAU,GACV,MAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAgBb,GAASW,EAAE,kBAAkB,EAC7CG,EACJf,IAAS,GAAQ,KAAOA,GAAQ,KAC9BgB,MAACC,EAAAA,KAAA,CAAK,KAAK,YAAA,CAAa,EACtB,OAAOjB,GAAS,UAAYJ,EAAc,IAAII,CAAI,EACpDgB,MAACC,EAAAA,KAAA,CAAK,KAAMjB,CAAA,CAAkB,EAE9BA,EAGJ,OACEkB,EAAAA,KAAC,MAAA,CACC,IAAAP,EACA,UAAWQ,EAAAA,KACTC,EAAO,WACPA,EAAOhB,CAAI,EACXC,GAAWe,EAAO,QAClBd,GAASc,EAAO,OAChBb,CAAA,EAEF,MACGD,EACG,CAAE,eAAgB,kBAAkBA,CAAK,QAAS,GAAGE,CAAA,EACrDA,EAEL,GAAGE,EAEH,SAAA,CAAAK,GAAgB,YACd,MAAA,CAAI,UAAWK,EAAO,KAAM,cAAW,GACrC,SAAAL,CAAA,CACH,EAEDD,GAAiB,MAAQE,EAAAA,IAAC,OAAI,UAAWI,EAAO,MAAQ,SAAAN,EAAc,EACtEZ,GAAe,MAAQc,EAAAA,IAAC,OAAI,UAAWI,EAAO,YAAc,SAAAlB,EAAY,EACxEC,GAAU,MAAQa,EAAAA,IAAC,OAAI,UAAWI,EAAO,OAAS,SAAAjB,EAAO,EACzDM,CAAA,CAAA,CAAA,CAGP,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
2
  import { forwardRef as S } from "react";
3
3
  import { clsx as N } from "clsx";
4
4
  import { b as c, a as h } from "./Icon-B7DJn8Tw.js";
5
- import { a as g } from "./ConfigProvider-DVDGtCUc.js";
5
+ import { a as g } from "./ConfigProvider-DtyUlWk6.js";
6
6
  const E = "_emptyState_1vpxy_3", b = "_sm_1vpxy_17", I = "_md_1vpxy_23", O = "_lg_1vpxy_29", T = "_icon_1vpxy_37", j = "_title_1vpxy_55", w = "_description_1vpxy_61", z = "_action_1vpxy_70", A = "_pattern_1vpxy_77", C = "_tinted_1vpxy_100", t = {
7
7
  emptyState: E,
8
8
  sm: b,
@@ -54,4 +54,4 @@ const E = "_emptyState_1vpxy_3", b = "_sm_1vpxy_17", I = "_md_1vpxy_23", O = "_l
54
54
  export {
55
55
  D as E
56
56
  };
57
- //# sourceMappingURL=EmptyState-DXoaPC7o.js.map
57
+ //# sourceMappingURL=EmptyState-DrSj2XV_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-DXoaPC7o.js","sources":["../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport styles from './EmptyState.module.css'\n\nexport type EmptyStateSize = 'sm' | 'md' | 'lg'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Leading glyph shown in a soft circle — an `IconName`, any node, or `false` to hide it. Defaults to `FolderOpen`. */\n icon?: IconName | ReactNode | false\n /** Heading line. Defaults to `\"No Results Found\"`. */\n title?: ReactNode\n /** Muted description under the title (e.g. a hint on what to do next). */\n description?: ReactNode\n /** Action slot under the text — e.g. an \"Add Item\" or \"Clear Filters\" button. */\n action?: ReactNode\n /** Size — scales the icon, text, and vertical padding. Defaults to `md`. */\n size?: EmptyStateSize\n /**\n * Polished \"hero\" look: a faded grid backdrop (fades out toward the edges) + an elevated icon\n * (gradient + drop shadow). Defaults to `true`; pass `pattern={false}` for the flat, compact placeholder.\n */\n pattern?: boolean\n /** Tint the icon puck with a theme color (e.g. `error` for a failure). Omitted → the neutral muted puck. */\n color?: ThemeColor\n /** Extra content rendered below the action. */\n children?: ReactNode\n}\n\n/**\n * The empty-state placeholder — drop it in wherever a page, table, list, or gallery has nothing to\n * show (no records yet, no search matches). A centered, muted glyph in a soft circle + a `title` +\n * an optional `description` and `action` (e.g. a \"Add Item\" / \"Clear Filters\" button). Neutral by\n * design; pass a custom `icon` node for a tinted glyph. Token-only styling.\n */\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n {\n icon,\n title,\n description,\n action,\n size = 'md',\n pattern = true,\n color,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const resolvedTitle = title ?? t('emptyState.title')\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name=\"FolderOpen\" />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.emptyState,\n styles[size],\n pattern && styles.pattern,\n color && styles.tinted,\n className,\n )}\n style={\n (color\n ? { '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style }\n : style) as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <div className={styles.icon} aria-hidden>\n {renderedIcon}\n </div>\n )}\n {resolvedTitle != null && <div className={styles.title}>{resolvedTitle}</div>}\n {description != null && <div className={styles.description}>{description}</div>}\n {action != null && <div className={styles.action}>{action}</div>}\n {children}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","EmptyState","forwardRef","icon","title","description","action","size","pattern","color","className","style","children","props","ref","t","useT","resolvedTitle","renderedIcon","jsx","Icon","jsxs","clsx","styles"],"mappings":";;;;;;;;;;;;;;;;GASMA,IAAgB,IAAI,IAAYC,CAAU,GA8BnCC,IAAaC,EAA4C,SACpE;AAAA,EACE,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAIC,EAAA,GACJC,IAAgBb,KAASW,EAAE,kBAAkB,GAC7CG,IACJf,MAAS,KAAQ,OAAOA,KAAQ,OAC9B,gBAAAgB,EAACC,GAAA,EAAK,MAAK,aAAA,CAAa,IACtB,OAAOjB,KAAS,YAAYJ,EAAc,IAAII,CAAI,IACpD,gBAAAgB,EAACC,GAAA,EAAK,MAAMjB,EAAA,CAAkB,IAE9BA;AAGJ,SACE,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAP;AAAA,MACA,WAAWQ;AAAA,QACTC,EAAO;AAAA,QACPA,EAAOhB,CAAI;AAAA,QACXC,KAAWe,EAAO;AAAA,QAClBd,KAASc,EAAO;AAAA,QAChBb;AAAA,MAAA;AAAA,MAEF,OACGD,IACG,EAAE,gBAAgB,kBAAkBA,CAAK,SAAS,GAAGE,EAAA,IACrDA;AAAA,MAEL,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAK,KAAgB,0BACd,OAAA,EAAI,WAAWK,EAAO,MAAM,eAAW,IACrC,UAAAL,EAAA,CACH;AAAA,QAEDD,KAAiB,QAAQ,gBAAAE,EAAC,SAAI,WAAWI,EAAO,OAAQ,UAAAN,GAAc;AAAA,QACtEZ,KAAe,QAAQ,gBAAAc,EAAC,SAAI,WAAWI,EAAO,aAAc,UAAAlB,GAAY;AAAA,QACxEC,KAAU,QAAQ,gBAAAa,EAAC,SAAI,WAAWI,EAAO,QAAS,UAAAjB,GAAO;AAAA,QACzDM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"EmptyState-DrSj2XV_.js","sources":["../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport styles from './EmptyState.module.css'\n\nexport type EmptyStateSize = 'sm' | 'md' | 'lg'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Leading glyph shown in a soft circle — an `IconName`, any node, or `false` to hide it. Defaults to `FolderOpen`. */\n icon?: IconName | ReactNode | false\n /** Heading line. Defaults to `\"No Results Found\"`. */\n title?: ReactNode\n /** Muted description under the title (e.g. a hint on what to do next). */\n description?: ReactNode\n /** Action slot under the text — e.g. an \"Add Item\" or \"Clear Filters\" button. */\n action?: ReactNode\n /** Size — scales the icon, text, and vertical padding. Defaults to `md`. */\n size?: EmptyStateSize\n /**\n * Polished \"hero\" look: a faded grid backdrop (fades out toward the edges) + an elevated icon\n * (gradient + drop shadow). Defaults to `true`; pass `pattern={false}` for the flat, compact placeholder.\n */\n pattern?: boolean\n /** Tint the icon puck with a theme color (e.g. `error` for a failure). Omitted → the neutral muted puck. */\n color?: ThemeColor\n /** Extra content rendered below the action. */\n children?: ReactNode\n}\n\n/**\n * The empty-state placeholder — drop it in wherever a page, table, list, or gallery has nothing to\n * show (no records yet, no search matches). A centered, muted glyph in a soft circle + a `title` +\n * an optional `description` and `action` (e.g. a \"Add Item\" / \"Clear Filters\" button). Neutral by\n * design; pass a custom `icon` node for a tinted glyph. Token-only styling.\n */\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n {\n icon,\n title,\n description,\n action,\n size = 'md',\n pattern = true,\n color,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const resolvedTitle = title ?? t('emptyState.title')\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name=\"FolderOpen\" />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.emptyState,\n styles[size],\n pattern && styles.pattern,\n color && styles.tinted,\n className,\n )}\n style={\n (color\n ? { '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style }\n : style) as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <div className={styles.icon} aria-hidden>\n {renderedIcon}\n </div>\n )}\n {resolvedTitle != null && <div className={styles.title}>{resolvedTitle}</div>}\n {description != null && <div className={styles.description}>{description}</div>}\n {action != null && <div className={styles.action}>{action}</div>}\n {children}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","EmptyState","forwardRef","icon","title","description","action","size","pattern","color","className","style","children","props","ref","t","useT","resolvedTitle","renderedIcon","jsx","Icon","jsxs","clsx","styles"],"mappings":";;;;;;;;;;;;;;;;GASMA,IAAgB,IAAI,IAAYC,CAAU,GA8BnCC,IAAaC,EAA4C,SACpE;AAAA,EACE,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAIC,EAAA,GACJC,IAAgBb,KAASW,EAAE,kBAAkB,GAC7CG,IACJf,MAAS,KAAQ,OAAOA,KAAQ,OAC9B,gBAAAgB,EAACC,GAAA,EAAK,MAAK,aAAA,CAAa,IACtB,OAAOjB,KAAS,YAAYJ,EAAc,IAAII,CAAI,IACpD,gBAAAgB,EAACC,GAAA,EAAK,MAAMjB,EAAA,CAAkB,IAE9BA;AAGJ,SACE,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAP;AAAA,MACA,WAAWQ;AAAA,QACTC,EAAO;AAAA,QACPA,EAAOhB,CAAI;AAAA,QACXC,KAAWe,EAAO;AAAA,QAClBd,KAASc,EAAO;AAAA,QAChBb;AAAA,MAAA;AAAA,MAEF,OACGD,IACG,EAAE,gBAAgB,kBAAkBA,CAAK,SAAS,GAAGE,EAAA,IACrDA;AAAA,MAEL,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAK,KAAgB,0BACd,OAAA,EAAI,WAAWK,EAAO,MAAM,eAAW,IACrC,UAAAL,EAAA,CACH;AAAA,QAEDD,KAAiB,QAAQ,gBAAAE,EAAC,SAAI,WAAWI,EAAO,OAAQ,UAAAN,GAAc;AAAA,QACtEZ,KAAe,QAAQ,gBAAAc,EAAC,SAAI,WAAWI,EAAO,aAAc,UAAAlB,GAAY;AAAA,QACxEC,KAAU,QAAQ,gBAAAa,EAAC,SAAI,WAAWI,EAAO,QAAS,UAAAjB,GAAO;AAAA,QACzDM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as u, Component as f } from "react";
3
- import { E as a } from "./ErrorState-WYsly5-i.js";
4
- import { a as h } from "./ConfigProvider-DVDGtCUc.js";
3
+ import { E as a } from "./ErrorState-DEngucdq.js";
4
+ import { a as h } from "./ConfigProvider-DtyUlWk6.js";
5
5
  const S = u(function({ error: r, fallback: t, description: o, compact: s = !0, ...c }, p) {
6
6
  return r == null || r === !1 ? null : /* @__PURE__ */ n(
7
7
  a,
@@ -54,4 +54,4 @@ export {
54
54
  k as E,
55
55
  S as Q
56
56
  };
57
- //# sourceMappingURL=ErrorBoundary-CSP_Ctg6.js.map
57
+ //# sourceMappingURL=ErrorBoundary-DsP4hO_V.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary-CSP_Ctg6.js","sources":["../src/components/ErrorState/QueryError.tsx","../src/components/ErrorState/ErrorBoundary.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react'\nimport { ErrorState, type ErrorStateProps } from './ErrorState'\n\nexport interface QueryErrorProps extends ErrorStateProps {\n /** The query's error (`query.error`). `null` / `undefined` → renders nothing. */\n error: unknown\n /**\n * The user-facing sentence (\"Could not load players.\"). Shown instead of the raw message, which then\n * only appears in the Details dialog's dev dump. Same as `description`, which wins when both are set.\n */\n fallback?: ReactNode\n}\n\n/**\n * The react-query-style one-liner: `<QueryError error={users.error} onRetry={users.refetch}\n * fallback=\"Could not load players.\" />`. Renders nothing while `error` is empty, otherwise an\n * `ErrorState` — an alert banner by default; with `variant=\"block\"` it's **compact by default** (pass\n * `compact={false}` for the hero). Everything else passes through to `ErrorState`.\n */\nexport const QueryError = forwardRef<HTMLDivElement, QueryErrorProps>(function QueryError(\n { error, fallback, description, compact = true, ...props },\n ref,\n) {\n if (error == null || error === false) return null\n return (\n <ErrorState\n ref={ref}\n error={error}\n description={description ?? fallback}\n compact={compact}\n {...props}\n />\n )\n})\n","import { Component, type ErrorInfo, type ReactNode } from 'react'\nimport { useT } from '../../theme'\nimport { ErrorState } from './ErrorState'\n\nexport interface ErrorBoundaryProps {\n /**\n * What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with\n * a friendly description, a **Try Again** button (`reset`) and the stack in dev.\n */\n fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode)\n /** Report the crash (e.g. `Sentry.captureException`). */\n onError?: (error: Error, info: ErrorInfo) => void\n /** Called after the boundary resets (Try Again, or a `resetKeys` change). */\n onReset?: () => void\n /** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */\n resetKeys?: unknown[]\n children?: ReactNode\n}\n\ninterface ErrorBoundaryState {\n error: Error | null\n}\n\nconst keysChanged = (a: unknown[] = [], b: unknown[] = []) =>\n a.length !== b.length || a.some((v, i) => !Object.is(v, b[i]))\n\nconst toError = (value: unknown) => (value instanceof Error ? value : new Error(String(value)))\n\n/** The default crash screen — a function component so it can read the localized strings. */\nfunction DefaultFallback({ error, reset }: { error: Error; reset: () => void }) {\n const t = useT()\n // a render crash message (\"Cannot read properties of undefined\") is for developers, not users —\n // the description stays friendly and the raw error lives in the dev-only details panel\n return (\n <ErrorState\n variant=\"block\"\n error={error}\n description={t('errorState.description')}\n onRetry={reset}\n />\n )\n}\n\n/**\n * Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a\n * white screen). The one class component in the library — React only offers error boundaries as\n * classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);\n * `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so\n * navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page\n * content automatically, so a crashing page keeps the sidebar + header.\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState = { error: null }\n\n static getDerivedStateFromError(error: unknown): ErrorBoundaryState {\n return { error: toError(error) }\n }\n\n componentDidCatch(error: unknown, info: ErrorInfo) {\n this.props.onError?.(toError(error), info)\n }\n\n componentDidUpdate(prev: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n // reset only an error that was ALREADY showing before the keys changed — if the key change itself is\n // what crashed the subtree (same render), resetting would just re-render it into a second throw\n if (this.state.error && prevState.error && keysChanged(prev.resetKeys, this.props.resetKeys)) {\n this.reset()\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n this.props.onReset?.()\n }\n\n render() {\n const { error } = this.state\n if (!error) return this.props.children\n const { fallback } = this.props\n if (typeof fallback === 'function') return fallback(error, this.reset)\n if (fallback !== undefined) return fallback\n return <DefaultFallback error={error} reset={this.reset} />\n }\n}\n"],"names":["QueryError","forwardRef","error","fallback","description","compact","props","ref","jsx","ErrorState","keysChanged","a","b","v","i","toError","value","DefaultFallback","reset","useT","ErrorBoundary","Component","_b","_a","info","prev","prevState"],"mappings":";;;;AAmBO,MAAMA,IAAaC,EAA4C,SACpE,EAAE,OAAAC,GAAO,UAAAC,GAAU,aAAAC,GAAa,SAAAC,IAAU,IAAM,GAAGC,EAAA,GACnDC,GACA;AACA,SAAIL,KAAS,QAAQA,MAAU,KAAc,OAE3C,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,OAAAL;AAAA,MACA,aAAaE,KAAeD;AAAA,MAC5B,SAAAE;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC,GCVKI,IAAc,CAACC,IAAe,CAAA,GAAIC,IAAe,CAAA,MACrDD,EAAE,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A,KAAa,aAAmBA,EAASD,GAAO,KAAK,KAAK,IACjEC,MAAa,SAAkBA,IAC5B,gBAAAK,EAACS,GAAA,EAAgB,OAAAf,GAAc,OAAO,KAAK,OAAO;AAAA,EAC3D;AACF;"}
1
+ {"version":3,"file":"ErrorBoundary-DsP4hO_V.js","sources":["../src/components/ErrorState/QueryError.tsx","../src/components/ErrorState/ErrorBoundary.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react'\nimport { ErrorState, type ErrorStateProps } from './ErrorState'\n\nexport interface QueryErrorProps extends ErrorStateProps {\n /** The query's error (`query.error`). `null` / `undefined` → renders nothing. */\n error: unknown\n /**\n * The user-facing sentence (\"Could not load players.\"). Shown instead of the raw message, which then\n * only appears in the Details dialog's dev dump. Same as `description`, which wins when both are set.\n */\n fallback?: ReactNode\n}\n\n/**\n * The react-query-style one-liner: `<QueryError error={users.error} onRetry={users.refetch}\n * fallback=\"Could not load players.\" />`. Renders nothing while `error` is empty, otherwise an\n * `ErrorState` — an alert banner by default; with `variant=\"block\"` it's **compact by default** (pass\n * `compact={false}` for the hero). Everything else passes through to `ErrorState`.\n */\nexport const QueryError = forwardRef<HTMLDivElement, QueryErrorProps>(function QueryError(\n { error, fallback, description, compact = true, ...props },\n ref,\n) {\n if (error == null || error === false) return null\n return (\n <ErrorState\n ref={ref}\n error={error}\n description={description ?? fallback}\n compact={compact}\n {...props}\n />\n )\n})\n","import { Component, type ErrorInfo, type ReactNode } from 'react'\nimport { useT } from '../../theme'\nimport { ErrorState } from './ErrorState'\n\nexport interface ErrorBoundaryProps {\n /**\n * What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with\n * a friendly description, a **Try Again** button (`reset`) and the stack in dev.\n */\n fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode)\n /** Report the crash (e.g. `Sentry.captureException`). */\n onError?: (error: Error, info: ErrorInfo) => void\n /** Called after the boundary resets (Try Again, or a `resetKeys` change). */\n onReset?: () => void\n /** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */\n resetKeys?: unknown[]\n children?: ReactNode\n}\n\ninterface ErrorBoundaryState {\n error: Error | null\n}\n\nconst keysChanged = (a: unknown[] = [], b: unknown[] = []) =>\n a.length !== b.length || a.some((v, i) => !Object.is(v, b[i]))\n\nconst toError = (value: unknown) => (value instanceof Error ? value : new Error(String(value)))\n\n/** The default crash screen — a function component so it can read the localized strings. */\nfunction DefaultFallback({ error, reset }: { error: Error; reset: () => void }) {\n const t = useT()\n // a render crash message (\"Cannot read properties of undefined\") is for developers, not users —\n // the description stays friendly and the raw error lives in the dev-only details panel\n return (\n <ErrorState\n variant=\"block\"\n error={error}\n description={t('errorState.description')}\n onRetry={reset}\n />\n )\n}\n\n/**\n * Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a\n * white screen). The one class component in the library — React only offers error boundaries as\n * classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);\n * `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so\n * navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page\n * content automatically, so a crashing page keeps the sidebar + header.\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState = { error: null }\n\n static getDerivedStateFromError(error: unknown): ErrorBoundaryState {\n return { error: toError(error) }\n }\n\n componentDidCatch(error: unknown, info: ErrorInfo) {\n this.props.onError?.(toError(error), info)\n }\n\n componentDidUpdate(prev: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n // reset only an error that was ALREADY showing before the keys changed — if the key change itself is\n // what crashed the subtree (same render), resetting would just re-render it into a second throw\n if (this.state.error && prevState.error && keysChanged(prev.resetKeys, this.props.resetKeys)) {\n this.reset()\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n this.props.onReset?.()\n }\n\n render() {\n const { error } = this.state\n if (!error) return this.props.children\n const { fallback } = this.props\n if (typeof fallback === 'function') return fallback(error, this.reset)\n if (fallback !== undefined) return fallback\n return <DefaultFallback error={error} reset={this.reset} />\n }\n}\n"],"names":["QueryError","forwardRef","error","fallback","description","compact","props","ref","jsx","ErrorState","keysChanged","a","b","v","i","toError","value","DefaultFallback","reset","useT","ErrorBoundary","Component","_b","_a","info","prev","prevState"],"mappings":";;;;AAmBO,MAAMA,IAAaC,EAA4C,SACpE,EAAE,OAAAC,GAAO,UAAAC,GAAU,aAAAC,GAAa,SAAAC,IAAU,IAAM,GAAGC,EAAA,GACnDC,GACA;AACA,SAAIL,KAAS,QAAQA,MAAU,KAAc,OAE3C,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,OAAAL;AAAA,MACA,aAAaE,KAAeD;AAAA,MAC5B,SAAAE;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC,GCVKI,IAAc,CAACC,IAAe,CAAA,GAAIC,IAAe,CAAA,MACrDD,EAAE,WAAWC,EAAE,UAAUD,EAAE,KAAK,CAACE,GAAGC,MAAM,CAAC,OAAO,GAAGD,GAAGD,EAAEE,CAAC,CAAC,CAAC,GAEzDC,IAAU,CAACC,MAAoBA,aAAiB,QAAQA,IAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC;AAG7F,SAASC,EAAgB,EAAE,OAAAf,GAAO,OAAAgB,KAA8C;AAC9E,QAAM,IAAIC,EAAA;AAGV,SACE,gBAAAX;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,OAAAP;AAAA,MACA,aAAa,EAAE,wBAAwB;AAAA,MACvC,SAASgB;AAAA,IAAA;AAAA,EAAA;AAGf;AAUO,MAAME,UAAsBC,EAAkD;AAAA,EAA9E,cAAA;AAAA,UAAA,GAAA,SAAA,GACL,KAAA,QAA4B,EAAE,OAAO,KAAA,GAkBrC,KAAA,QAAQ,MAAM;;AACZ,WAAK,SAAS,EAAE,OAAO,KAAA,CAAM,IAC7BC,KAAAC,IAAA,KAAK,OAAM,YAAX,QAAAD,EAAA,KAAAC;AAAA,IACF;AAAA,EAAA;AAAA,EAnBA,OAAO,yBAAyBrB,GAAoC;AAClE,WAAO,EAAE,OAAOa,EAAQb,CAAK,EAAA;AAAA,EAC/B;AAAA,EAEA,kBAAkBA,GAAgBsB,GAAiB;;AACjD,KAAAF,KAAAC,IAAA,KAAK,OAAM,YAAX,QAAAD,EAAA,KAAAC,GAAqBR,EAAQb,CAAK,GAAGsB;AAAA,EACvC;AAAA,EAEA,mBAAmBC,GAA0BC,GAA+B;AAG1E,IAAI,KAAK,MAAM,SAASA,EAAU,SAAShB,EAAYe,EAAK,WAAW,KAAK,MAAM,SAAS,KACzF,KAAK,MAAA;AAAA,EAET;AAAA,EAOA,SAAS;AACP,UAAM,EAAE,OAAAvB,MAAU,KAAK;AACvB,QAAI,CAACA,EAAO,QAAO,KAAK,MAAM;AAC9B,UAAM,EAAE,UAAAC,MAAa,KAAK;AAC1B,WAAI,OAAOA,KAAa,aAAmBA,EAASD,GAAO,KAAK,KAAK,IACjEC,MAAa,SAAkBA,IAC5B,gBAAAK,EAACS,GAAA,EAAgB,OAAAf,GAAc,OAAO,KAAK,OAAO;AAAA,EAC3D;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("react/jsx-runtime"),c=require("react"),u=require("./ErrorState-JH4JdrTI.cjs"),h=require("./ConfigProvider-DBU6rOIA.cjs"),l=c.forwardRef(function({error:r,fallback:t,description:s,compact:o=!0,...a},p){return r==null||r===!1?null:n.jsx(u.ErrorState,{ref:p,error:r,description:s??t,compact:o,...a})}),d=(e=[],r=[])=>e.length!==r.length||e.some((t,s)=>!Object.is(t,r[s])),i=e=>e instanceof Error?e:new Error(String(e));function f({error:e,reset:r}){const t=h.useT();return n.jsx(u.ErrorState,{variant:"block",error:e,description:t("errorState.description"),onRetry:r})}class E extends c.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>{var r,t;this.setState({error:null}),(t=(r=this.props).onReset)==null||t.call(r)}}static getDerivedStateFromError(r){return{error:i(r)}}componentDidCatch(r,t){var s,o;(o=(s=this.props).onError)==null||o.call(s,i(r),t)}componentDidUpdate(r,t){this.state.error&&t.error&&d(r.resetKeys,this.props.resetKeys)&&this.reset()}render(){const{error:r}=this.state;if(!r)return this.props.children;const{fallback:t}=this.props;return typeof t=="function"?t(r,this.reset):t!==void 0?t:n.jsx(f,{error:r,reset:this.reset})}}exports.ErrorBoundary=E;exports.QueryError=l;
2
- //# sourceMappingURL=ErrorBoundary-tZjKtO28.cjs.map
1
+ "use strict";const n=require("react/jsx-runtime"),c=require("react"),u=require("./ErrorState-BThPIYaM.cjs"),h=require("./ConfigProvider-CYSpuSMJ.cjs"),l=c.forwardRef(function({error:r,fallback:t,description:s,compact:o=!0,...a},p){return r==null||r===!1?null:n.jsx(u.ErrorState,{ref:p,error:r,description:s??t,compact:o,...a})}),d=(e=[],r=[])=>e.length!==r.length||e.some((t,s)=>!Object.is(t,r[s])),i=e=>e instanceof Error?e:new Error(String(e));function f({error:e,reset:r}){const t=h.useT();return n.jsx(u.ErrorState,{variant:"block",error:e,description:t("errorState.description"),onRetry:r})}class E extends c.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>{var r,t;this.setState({error:null}),(t=(r=this.props).onReset)==null||t.call(r)}}static getDerivedStateFromError(r){return{error:i(r)}}componentDidCatch(r,t){var s,o;(o=(s=this.props).onError)==null||o.call(s,i(r),t)}componentDidUpdate(r,t){this.state.error&&t.error&&d(r.resetKeys,this.props.resetKeys)&&this.reset()}render(){const{error:r}=this.state;if(!r)return this.props.children;const{fallback:t}=this.props;return typeof t=="function"?t(r,this.reset):t!==void 0?t:n.jsx(f,{error:r,reset:this.reset})}}exports.ErrorBoundary=E;exports.QueryError=l;
2
+ //# sourceMappingURL=ErrorBoundary-yz669VEu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary-tZjKtO28.cjs","sources":["../src/components/ErrorState/QueryError.tsx","../src/components/ErrorState/ErrorBoundary.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react'\nimport { ErrorState, type ErrorStateProps } from './ErrorState'\n\nexport interface QueryErrorProps extends ErrorStateProps {\n /** The query's error (`query.error`). `null` / `undefined` → renders nothing. */\n error: unknown\n /**\n * The user-facing sentence (\"Could not load players.\"). Shown instead of the raw message, which then\n * only appears in the Details dialog's dev dump. Same as `description`, which wins when both are set.\n */\n fallback?: ReactNode\n}\n\n/**\n * The react-query-style one-liner: `<QueryError error={users.error} onRetry={users.refetch}\n * fallback=\"Could not load players.\" />`. Renders nothing while `error` is empty, otherwise an\n * `ErrorState` — an alert banner by default; with `variant=\"block\"` it's **compact by default** (pass\n * `compact={false}` for the hero). Everything else passes through to `ErrorState`.\n */\nexport const QueryError = forwardRef<HTMLDivElement, QueryErrorProps>(function QueryError(\n { error, fallback, description, compact = true, ...props },\n ref,\n) {\n if (error == null || error === false) return null\n return (\n <ErrorState\n ref={ref}\n error={error}\n description={description ?? fallback}\n compact={compact}\n {...props}\n />\n )\n})\n","import { Component, type ErrorInfo, type ReactNode } from 'react'\nimport { useT } from '../../theme'\nimport { ErrorState } from './ErrorState'\n\nexport interface ErrorBoundaryProps {\n /**\n * What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with\n * a friendly description, a **Try Again** button (`reset`) and the stack in dev.\n */\n fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode)\n /** Report the crash (e.g. `Sentry.captureException`). */\n onError?: (error: Error, info: ErrorInfo) => void\n /** Called after the boundary resets (Try Again, or a `resetKeys` change). */\n onReset?: () => void\n /** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */\n resetKeys?: unknown[]\n children?: ReactNode\n}\n\ninterface ErrorBoundaryState {\n error: Error | null\n}\n\nconst keysChanged = (a: unknown[] = [], b: unknown[] = []) =>\n a.length !== b.length || a.some((v, i) => !Object.is(v, b[i]))\n\nconst toError = (value: unknown) => (value instanceof Error ? value : new Error(String(value)))\n\n/** The default crash screen — a function component so it can read the localized strings. */\nfunction DefaultFallback({ error, reset }: { error: Error; reset: () => void }) {\n const t = useT()\n // a render crash message (\"Cannot read properties of undefined\") is for developers, not users —\n // the description stays friendly and the raw error lives in the dev-only details panel\n return (\n <ErrorState\n variant=\"block\"\n error={error}\n description={t('errorState.description')}\n onRetry={reset}\n />\n )\n}\n\n/**\n * Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a\n * white screen). The one class component in the library — React only offers error boundaries as\n * classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);\n * `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so\n * navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page\n * content automatically, so a crashing page keeps the sidebar + header.\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState = { error: null }\n\n static getDerivedStateFromError(error: unknown): ErrorBoundaryState {\n return { error: toError(error) }\n }\n\n componentDidCatch(error: unknown, info: ErrorInfo) {\n this.props.onError?.(toError(error), info)\n }\n\n componentDidUpdate(prev: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n // reset only an error that was ALREADY showing before the keys changed — if the key change itself is\n // what crashed the subtree (same render), resetting would just re-render it into a second throw\n if (this.state.error && prevState.error && keysChanged(prev.resetKeys, this.props.resetKeys)) {\n this.reset()\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n this.props.onReset?.()\n }\n\n render() {\n const { error } = this.state\n if (!error) return this.props.children\n const { fallback } = this.props\n if (typeof fallback === 'function') return fallback(error, this.reset)\n if (fallback !== undefined) return fallback\n return <DefaultFallback error={error} reset={this.reset} />\n }\n}\n"],"names":["QueryError","forwardRef","error","fallback","description","compact","props","ref","jsx","ErrorState","keysChanged","a","b","v","i","toError","value","DefaultFallback","reset","useT","ErrorBoundary","Component","_b","_a","info","prev","prevState"],"mappings":"uJAmBaA,EAAaC,EAAAA,WAA4C,SACpE,CAAE,MAAAC,EAAO,SAA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W,KAAK,MAAM,SAAS,GACzF,KAAK,MAAA,CAET,CAOA,QAAS,CACP,KAAM,CAAE,MAAAvB,GAAU,KAAK,MACvB,GAAI,CAACA,EAAO,OAAO,KAAK,MAAM,SAC9B,KAAM,CAAE,SAAAC,GAAa,KAAK,MAC1B,OAAI,OAAOA,GAAa,WAAmBA,EAASD,EAAO,KAAK,KAAK,EACjEC,IAAa,OAAkBA,EAC5BK,EAAAA,IAACS,EAAA,CAAgB,MAAAf,EAAc,MAAO,KAAK,MAAO,CAC3D,CACF"}
1
+ {"version":3,"file":"ErrorBoundary-yz669VEu.cjs","sources":["../src/components/ErrorState/QueryError.tsx","../src/components/ErrorState/ErrorBoundary.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react'\nimport { ErrorState, type ErrorStateProps } from './ErrorState'\n\nexport interface QueryErrorProps extends ErrorStateProps {\n /** The query's error (`query.error`). `null` / `undefined` → renders nothing. */\n error: unknown\n /**\n * The user-facing sentence (\"Could not load players.\"). Shown instead of the raw message, which then\n * only appears in the Details dialog's dev dump. Same as `description`, which wins when both are set.\n */\n fallback?: ReactNode\n}\n\n/**\n * The react-query-style one-liner: `<QueryError error={users.error} onRetry={users.refetch}\n * fallback=\"Could not load players.\" />`. Renders nothing while `error` is empty, otherwise an\n * `ErrorState` — an alert banner by default; with `variant=\"block\"` it's **compact by default** (pass\n * `compact={false}` for the hero). Everything else passes through to `ErrorState`.\n */\nexport const QueryError = forwardRef<HTMLDivElement, QueryErrorProps>(function QueryError(\n { error, fallback, description, compact = true, ...props },\n ref,\n) {\n if (error == null || error === false) return null\n return (\n <ErrorState\n ref={ref}\n error={error}\n description={description ?? fallback}\n compact={compact}\n {...props}\n />\n )\n})\n","import { Component, type ErrorInfo, type ReactNode } from 'react'\nimport { useT } from '../../theme'\nimport { ErrorState } from './ErrorState'\n\nexport interface ErrorBoundaryProps {\n /**\n * What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with\n * a friendly description, a **Try Again** button (`reset`) and the stack in dev.\n */\n fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode)\n /** Report the crash (e.g. `Sentry.captureException`). */\n onError?: (error: Error, info: ErrorInfo) => void\n /** Called after the boundary resets (Try Again, or a `resetKeys` change). */\n onReset?: () => void\n /** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */\n resetKeys?: unknown[]\n children?: ReactNode\n}\n\ninterface ErrorBoundaryState {\n error: Error | null\n}\n\nconst keysChanged = (a: unknown[] = [], b: unknown[] = []) =>\n a.length !== b.length || a.some((v, i) => !Object.is(v, b[i]))\n\nconst toError = (value: unknown) => (value instanceof Error ? value : new Error(String(value)))\n\n/** The default crash screen — a function component so it can read the localized strings. */\nfunction DefaultFallback({ error, reset }: { error: Error; reset: () => void }) {\n const t = useT()\n // a render crash message (\"Cannot read properties of undefined\") is for developers, not users —\n // the description stays friendly and the raw error lives in the dev-only details panel\n return (\n <ErrorState\n variant=\"block\"\n error={error}\n description={t('errorState.description')}\n onRetry={reset}\n />\n )\n}\n\n/**\n * Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a\n * white screen). The one class component in the library — React only offers error boundaries as\n * classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);\n * `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so\n * navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page\n * content automatically, so a crashing page keeps the sidebar + header.\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState = { error: null }\n\n static getDerivedStateFromError(error: unknown): ErrorBoundaryState {\n return { error: toError(error) }\n }\n\n componentDidCatch(error: unknown, info: ErrorInfo) {\n this.props.onError?.(toError(error), info)\n }\n\n componentDidUpdate(prev: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n // reset only an error that was ALREADY showing before the keys changed — if the key change itself is\n // what crashed the subtree (same render), resetting would just re-render it into a second throw\n if (this.state.error && prevState.error && keysChanged(prev.resetKeys, this.props.resetKeys)) {\n this.reset()\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n this.props.onReset?.()\n }\n\n render() {\n const { error } = this.state\n if (!error) return this.props.children\n const { fallback } = this.props\n if (typeof fallback === 'function') return fallback(error, this.reset)\n if (fallback !== undefined) return fallback\n return <DefaultFallback error={error} reset={this.reset} />\n }\n}\n"],"names":["QueryError","forwardRef","error","fallback","description","compact","props","ref","jsx","ErrorState","keysChanged","a","b","v","i","toError","value","DefaultFallback","reset","useT","ErrorBoundary","Component","_b","_a","info","prev","prevState"],"mappings":"uJAmBaA,EAAaC,EAAAA,WAA4C,SACpE,CAAE,MAAAC,EAAO,SAAAC,EAAU,YAAAC,EAAa,QAAAC,EAAU,GAAM,GAAGC,CAAA,EACnDC,EACA,CACA,OAAIL,GAAS,MAAQA,IAAU,GAAc,KAE3CM,EAAAA,IAACC,EAAAA,WAAA,CACC,IAAAF,EACA,MAAAL,EACA,YAAaE,GAAeD,EAC5B,QAAAE,EACC,GAAGC,CAAA,CAAA,CAGV,CAAC,ECVKI,EAAc,CAACC,EAAe,CAAA,EAAIC,EAAe,CAAA,IACrDD,EAAE,SAAWC,EAAE,QAAUD,EAAE,KAAK,CAACE,EAAGC,IAAM,CAAC,OAAO,GAAGD,EAAGD,EAAEE,CAAC,CAAC,CAAC,EAEzDC,EAAWC,GAAoBA,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EAG7F,SAASC,EAAgB,CAAE,MAAAf,EAAO,MAAAgB,GAA8C,CAC9E,MAAM,EAAIC,EAAAA,KAAA,EAGV,OACEX,EAAAA,IAACC,EAAAA,WAAA,CACC,QAAQ,QACR,MAAAP,EACA,YAAa,EAAE,wBAAwB,EACvC,QAASgB,CAAA,CAAA,CAGf,CAUO,MAAME,UAAsBC,EAAAA,SAAkD,CAA9E,aAAA,CAAA,MAAA,GAAA,SAAA,EACL,KAAA,MAA4B,CAAE,MAAO,IAAA,EAkBrC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