@techzyapp/ui-library 1.0.40 → 1.0.41

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 (378) hide show
  1. package/dist/{AdminRoot-JOgiNkJA.js → AdminRoot-aOYQtzF0.js} +34 -32
  2. package/dist/AdminRoot-aOYQtzF0.js.map +1 -0
  3. package/dist/AdminRoot-ajWIf94J.cjs +2 -0
  4. package/dist/AdminRoot-ajWIf94J.cjs.map +1 -0
  5. package/dist/{Alert-CY8iU1zd.cjs → Alert-5tpyGb2M.cjs} +2 -2
  6. package/dist/{Alert-CY8iU1zd.cjs.map → Alert-5tpyGb2M.cjs.map} +1 -1
  7. package/dist/{Alert-CtUr-0s8.js → Alert-Dz0sNGpz.js} +3 -3
  8. package/dist/{Alert-CtUr-0s8.js.map → Alert-Dz0sNGpz.js.map} +1 -1
  9. package/dist/{Breadcrumbs-hi6dJhfN.cjs → Breadcrumbs-B6Pii2Y_.cjs} +2 -2
  10. package/dist/{Breadcrumbs-hi6dJhfN.cjs.map → Breadcrumbs-B6Pii2Y_.cjs.map} +1 -1
  11. package/dist/{Breadcrumbs-Dqhk-dY2.js → Breadcrumbs-DKYJOdHZ.js} +3 -3
  12. package/dist/{Breadcrumbs-Dqhk-dY2.js.map → Breadcrumbs-DKYJOdHZ.js.map} +1 -1
  13. package/dist/{Button-Bst_NtPJ.js → Button-CjsnB8gX.js} +2 -2
  14. package/dist/{Button-Bst_NtPJ.js.map → Button-CjsnB8gX.js.map} +1 -1
  15. package/dist/{Button-CYZoF18-.cjs → Button-ClVfHGBc.cjs} +2 -2
  16. package/dist/{Button-CYZoF18-.cjs.map → Button-ClVfHGBc.cjs.map} +1 -1
  17. package/dist/{Calendar-CMNBHtvY.cjs → Calendar-BzGVX4F4.cjs} +2 -2
  18. package/dist/{Calendar-CMNBHtvY.cjs.map → Calendar-BzGVX4F4.cjs.map} +1 -1
  19. package/dist/{Calendar-OYXsfuWz.js → Calendar-CQaPEukM.js} +3 -3
  20. package/dist/{Calendar-OYXsfuWz.js.map → Calendar-CQaPEukM.js.map} +1 -1
  21. package/dist/{Card-CkZtVNyV.cjs → Card-CIRGqg3P.cjs} +2 -2
  22. package/dist/{Card-CkZtVNyV.cjs.map → Card-CIRGqg3P.cjs.map} +1 -1
  23. package/dist/{Card-B91LGIzF.js → Card-Co3A4Qgo.js} +2 -2
  24. package/dist/{Card-B91LGIzF.js.map → Card-Co3A4Qgo.js.map} +1 -1
  25. package/dist/{Chip-D5ZZs3QH.js → Chip-BjSNgaAf.js} +2 -2
  26. package/dist/{Chip-D5ZZs3QH.js.map → Chip-BjSNgaAf.js.map} +1 -1
  27. package/dist/{Chip-B7cAHjlx.cjs → Chip-Dp8skUZ2.cjs} +2 -2
  28. package/dist/{Chip-B7cAHjlx.cjs.map → Chip-Dp8skUZ2.cjs.map} +1 -1
  29. package/dist/{CodeBlock-DrWRSRmO.js → CodeBlock-CcJjS0_q.js} +3 -3
  30. package/dist/{CodeBlock-DrWRSRmO.js.map → CodeBlock-CcJjS0_q.js.map} +1 -1
  31. package/dist/{CodeBlock-C3mG_seZ.cjs → CodeBlock-o_VSkAek.cjs} +2 -2
  32. package/dist/{CodeBlock-C3mG_seZ.cjs.map → CodeBlock-o_VSkAek.cjs.map} +1 -1
  33. package/dist/{ColorPicker-w7NdprlW.js → ColorPicker-C1hZcAbH.js} +3 -3
  34. package/dist/{ColorPicker-w7NdprlW.js.map → ColorPicker-C1hZcAbH.js.map} +1 -1
  35. package/dist/{ColorPicker-C1pDI4su.cjs → ColorPicker-DY6Vk1uS.cjs} +2 -2
  36. package/dist/{ColorPicker-C1pDI4su.cjs.map → ColorPicker-DY6Vk1uS.cjs.map} +1 -1
  37. package/dist/{ColorPickerPanel-CKMd-dqd.js → ColorPickerPanel-BuzwmkPN.js} +2 -2
  38. package/dist/{ColorPickerPanel-CKMd-dqd.js.map → ColorPickerPanel-BuzwmkPN.js.map} +1 -1
  39. package/dist/{ColorPickerPanel-BbgujQ3X.cjs → ColorPickerPanel-CDrHbCfG.cjs} +2 -2
  40. package/dist/{ColorPickerPanel-BbgujQ3X.cjs.map → ColorPickerPanel-CDrHbCfG.cjs.map} +1 -1
  41. package/dist/{ColorRamp-D9_5JULy.cjs → ColorRamp-CVnOYlu3.cjs} +2 -2
  42. package/dist/{ColorRamp-D9_5JULy.cjs.map → ColorRamp-CVnOYlu3.cjs.map} +1 -1
  43. package/dist/{ColorRamp-Mp_ddhmb.js → ColorRamp-CePqEkMR.js} +2 -2
  44. package/dist/{ColorRamp-Mp_ddhmb.js.map → ColorRamp-CePqEkMR.js.map} +1 -1
  45. package/dist/ConfigProvider-Bgu85MsI.js +379 -0
  46. package/dist/ConfigProvider-Bgu85MsI.js.map +1 -0
  47. package/dist/ConfigProvider-DELhJlqo.cjs +2 -0
  48. package/dist/ConfigProvider-DELhJlqo.cjs.map +1 -0
  49. package/dist/{CopyButton-Yg5ZVTiX.js → CopyButton-CgDeyJ3A.js} +3 -3
  50. package/dist/{CopyButton-Yg5ZVTiX.js.map → CopyButton-CgDeyJ3A.js.map} +1 -1
  51. package/dist/{CopyButton-DZeYcG68.cjs → CopyButton-CjPyKpky.cjs} +2 -2
  52. package/dist/{CopyButton-DZeYcG68.cjs.map → CopyButton-CjPyKpky.cjs.map} +1 -1
  53. package/dist/{DatePicker-CXRsT-lt.cjs → DatePicker-CwZ_-ElE.cjs} +2 -2
  54. package/dist/{DatePicker-CXRsT-lt.cjs.map → DatePicker-CwZ_-ElE.cjs.map} +1 -1
  55. package/dist/{DatePicker-BMJlfCKB.js → DatePicker-tid4OuJ2.js} +4 -4
  56. package/dist/{DatePicker-BMJlfCKB.js.map → DatePicker-tid4OuJ2.js.map} +1 -1
  57. package/dist/{DateTimePicker-B-Jjejzm.js → DateTimePicker-C2871cuc.js} +7 -7
  58. package/dist/{DateTimePicker-B-Jjejzm.js.map → DateTimePicker-C2871cuc.js.map} +1 -1
  59. package/dist/{DateTimePicker-BuTIRTUX.cjs → DateTimePicker-DdEPtw9U.cjs} +2 -2
  60. package/dist/{DateTimePicker-BuTIRTUX.cjs.map → DateTimePicker-DdEPtw9U.cjs.map} +1 -1
  61. package/dist/{DescriptionList-CG08_qwT.js → DescriptionList-BP4CDME5.js} +4 -4
  62. package/dist/{DescriptionList-CG08_qwT.js.map → DescriptionList-BP4CDME5.js.map} +1 -1
  63. package/dist/{DescriptionList-S9C6Tp90.cjs → DescriptionList-BWw0Fe6U.cjs} +2 -2
  64. package/dist/{DescriptionList-S9C6Tp90.cjs.map → DescriptionList-BWw0Fe6U.cjs.map} +1 -1
  65. package/dist/{EmptyState-BCoPw8jf.js → EmptyState-BlmQtbSs.js} +2 -2
  66. package/dist/{EmptyState-BCoPw8jf.js.map → EmptyState-BlmQtbSs.js.map} +1 -1
  67. package/dist/{EmptyState-DnGds1ch.cjs → EmptyState-DGHOD_jy.cjs} +2 -2
  68. package/dist/{EmptyState-DnGds1ch.cjs.map → EmptyState-DGHOD_jy.cjs.map} +1 -1
  69. package/dist/{ErrorBoundary-JCNa0_Ys.cjs → ErrorBoundary-DL194IyB.cjs} +2 -2
  70. package/dist/{ErrorBoundary-JCNa0_Ys.cjs.map → ErrorBoundary-DL194IyB.cjs.map} +1 -1
  71. package/dist/{ErrorBoundary-BILk_3fM.js → ErrorBoundary-ukRaS6uS.js} +3 -3
  72. package/dist/{ErrorBoundary-BILk_3fM.js.map → ErrorBoundary-ukRaS6uS.js.map} +1 -1
  73. package/dist/{ErrorState-MQBeyF2n.cjs → ErrorState-BjEA0VfF.cjs} +2 -2
  74. package/dist/{ErrorState-MQBeyF2n.cjs.map → ErrorState-BjEA0VfF.cjs.map} +1 -1
  75. package/dist/{ErrorState-DI28ZCJN.js → ErrorState-Hfd_0MeE.js} +7 -7
  76. package/dist/{ErrorState-DI28ZCJN.js.map → ErrorState-Hfd_0MeE.js.map} +1 -1
  77. package/dist/{FileCard-Cl88Gu6L.cjs → FileCard-COc4rHe-.cjs} +2 -2
  78. package/dist/{FileCard-Cl88Gu6L.cjs.map → FileCard-COc4rHe-.cjs.map} +1 -1
  79. package/dist/{FileCard-5QvVkO1-.js → FileCard-CWwB8CWF.js} +3 -3
  80. package/dist/{FileCard-5QvVkO1-.js.map → FileCard-CWwB8CWF.js.map} +1 -1
  81. package/dist/{FileUploader-DwAl3UXI.js → FileUploader--WOmlhSh.js} +5 -5
  82. package/dist/{FileUploader-DwAl3UXI.js.map → FileUploader--WOmlhSh.js.map} +1 -1
  83. package/dist/{FileUploader-FMVbj7rz.cjs → FileUploader-Bqy_fV7l.cjs} +2 -2
  84. package/dist/{FileUploader-FMVbj7rz.cjs.map → FileUploader-Bqy_fV7l.cjs.map} +1 -1
  85. package/dist/{Flag-Do7x-AhS.cjs → Flag-C48Zfhvb.cjs} +2 -2
  86. package/dist/{Flag-Do7x-AhS.cjs.map → Flag-C48Zfhvb.cjs.map} +1 -1
  87. package/dist/{Flag-DfA2t0yd.js → Flag-fgMTTcy8.js} +2 -2
  88. package/dist/{Flag-DfA2t0yd.js.map → Flag-fgMTTcy8.js.map} +1 -1
  89. package/dist/{FullscreenToggle-Bbb_z2xj.cjs → FullscreenToggle-DuLaUzi_.cjs} +2 -2
  90. package/dist/{FullscreenToggle-Bbb_z2xj.cjs.map → FullscreenToggle-DuLaUzi_.cjs.map} +1 -1
  91. package/dist/{FullscreenToggle-DM6wWZ1a.js → FullscreenToggle-GjsMn1GO.js} +3 -3
  92. package/dist/{FullscreenToggle-DM6wWZ1a.js.map → FullscreenToggle-GjsMn1GO.js.map} +1 -1
  93. package/dist/{IconButton-CQ25TtBc.cjs → IconButton-D3ZpI0XL.cjs} +2 -2
  94. package/dist/{IconButton-CQ25TtBc.cjs.map → IconButton-D3ZpI0XL.cjs.map} +1 -1
  95. package/dist/{IconButton-06pmftMo.js → IconButton-t1OhAMNc.js} +2 -2
  96. package/dist/{IconButton-06pmftMo.js.map → IconButton-t1OhAMNc.js.map} +1 -1
  97. package/dist/{Loader-B5Pm8AaT.cjs → Loader-Cywaf7ju.cjs} +2 -2
  98. package/dist/{Loader-B5Pm8AaT.cjs.map → Loader-Cywaf7ju.cjs.map} +1 -1
  99. package/dist/{Loader-Bj5uwVR9.js → Loader-De8_GqR1.js} +2 -2
  100. package/dist/{Loader-Bj5uwVR9.js.map → Loader-De8_GqR1.js.map} +1 -1
  101. package/dist/{LocationPicker-D-sT4rSe.cjs → LocationPicker-DBsxCYi9.cjs} +2 -2
  102. package/dist/{LocationPicker-D-sT4rSe.cjs.map → LocationPicker-DBsxCYi9.cjs.map} +1 -1
  103. package/dist/{LocationPicker-Ce8aLubZ.js → LocationPicker-UfyDBvhp.js} +6 -6
  104. package/dist/{LocationPicker-Ce8aLubZ.js.map → LocationPicker-UfyDBvhp.js.map} +1 -1
  105. package/dist/{Modal-DjSOhZqd.cjs → Modal--5EbLfMz.cjs} +2 -2
  106. package/dist/{Modal-DjSOhZqd.cjs.map → Modal--5EbLfMz.cjs.map} +1 -1
  107. package/dist/{Modal-DTnB_mGg.js → Modal-Dfwc9eIq.js} +3 -3
  108. package/dist/{Modal-DTnB_mGg.js.map → Modal-Dfwc9eIq.js.map} +1 -1
  109. package/dist/{MultiSelect-C4RvohFY.cjs → MultiSelect-lBAEcAlR.cjs} +2 -2
  110. package/dist/{MultiSelect-C4RvohFY.cjs.map → MultiSelect-lBAEcAlR.cjs.map} +1 -1
  111. package/dist/{MultiSelect-Dn8l5z52.js → MultiSelect-q__o8HyU.js} +4 -4
  112. package/dist/{MultiSelect-Dn8l5z52.js.map → MultiSelect-q__o8HyU.js.map} +1 -1
  113. package/dist/{NumberField-DvQ5UP1R.js → NumberField-CXH0B1Bt.js} +3 -3
  114. package/dist/{NumberField-DvQ5UP1R.js.map → NumberField-CXH0B1Bt.js.map} +1 -1
  115. package/dist/{NumberField-C3TLdAgT.cjs → NumberField-DSicjq5R.cjs} +2 -2
  116. package/dist/{NumberField-C3TLdAgT.cjs.map → NumberField-DSicjq5R.cjs.map} +1 -1
  117. package/dist/{OtpField-Dy4O1MeD.js → OtpField-Dy-LKTi9.js} +2 -2
  118. package/dist/{OtpField-Dy4O1MeD.js.map → OtpField-Dy-LKTi9.js.map} +1 -1
  119. package/dist/{OtpField-OdkuKKcV.cjs → OtpField-KHwdaajC.cjs} +2 -2
  120. package/dist/{OtpField-OdkuKKcV.cjs.map → OtpField-KHwdaajC.cjs.map} +1 -1
  121. package/dist/{PageError-aUV0vUfB.cjs → PageError-MHbSl1oT.cjs} +2 -2
  122. package/dist/{PageError-aUV0vUfB.cjs.map → PageError-MHbSl1oT.cjs.map} +1 -1
  123. package/dist/{PageError-BORFaxGW.js → PageError-VYc07Q7W.js} +5 -5
  124. package/dist/{PageError-BORFaxGW.js.map → PageError-VYc07Q7W.js.map} +1 -1
  125. package/dist/{PageLayout-rtEl8uqS.cjs → PageLayout-Bt6U_80d.cjs} +2 -2
  126. package/dist/{PageLayout-rtEl8uqS.cjs.map → PageLayout-Bt6U_80d.cjs.map} +1 -1
  127. package/dist/{PageLayout-ojiBEcxI.js → PageLayout-Df1SOlr7.js} +4 -4
  128. package/dist/{PageLayout-ojiBEcxI.js.map → PageLayout-Df1SOlr7.js.map} +1 -1
  129. package/dist/{PageNotFound-D536Tshv.js → PageNotFound-BWfaomjC.js} +5 -5
  130. package/dist/{PageNotFound-D536Tshv.js.map → PageNotFound-BWfaomjC.js.map} +1 -1
  131. package/dist/{PageNotFound-f-dxrnol.cjs → PageNotFound-e4ITkqDC.cjs} +2 -2
  132. package/dist/{PageNotFound-f-dxrnol.cjs.map → PageNotFound-e4ITkqDC.cjs.map} +1 -1
  133. package/dist/{Pagination-DoDGKGpQ.js → Pagination-DDMq_7OZ.js} +2 -2
  134. package/dist/{Pagination-DoDGKGpQ.js.map → Pagination-DDMq_7OZ.js.map} +1 -1
  135. package/dist/{Pagination-Ffv6IFIU.cjs → Pagination-UMeckhmY.cjs} +2 -2
  136. package/dist/{Pagination-Ffv6IFIU.cjs.map → Pagination-UMeckhmY.cjs.map} +1 -1
  137. package/dist/PaletteField-D4c-Q1PG.js +56 -0
  138. package/dist/PaletteField-D4c-Q1PG.js.map +1 -0
  139. package/dist/PaletteField-DnUpn2zP.cjs +2 -0
  140. package/dist/PaletteField-DnUpn2zP.cjs.map +1 -0
  141. package/dist/{PhoneField-DzLTXJcw.cjs → PhoneField-BTB2_Lo1.cjs} +2 -2
  142. package/dist/{PhoneField-DzLTXJcw.cjs.map → PhoneField-BTB2_Lo1.cjs.map} +1 -1
  143. package/dist/{PhoneField-CjYw-Unw.js → PhoneField-BY5hapKk.js} +4 -4
  144. package/dist/{PhoneField-CjYw-Unw.js.map → PhoneField-BY5hapKk.js.map} +1 -1
  145. package/dist/{Popconfirm-B3GhhrRM.js → Popconfirm-BXa5qLHY.js} +3 -3
  146. package/dist/{Popconfirm-B3GhhrRM.js.map → Popconfirm-BXa5qLHY.js.map} +1 -1
  147. package/dist/{Popconfirm-CYc8ywDI.cjs → Popconfirm-PkVgBrL-.cjs} +2 -2
  148. package/dist/{Popconfirm-CYc8ywDI.cjs.map → Popconfirm-PkVgBrL-.cjs.map} +1 -1
  149. package/dist/{Progress-BABBBG2y.cjs → Progress-R_Vt4gJA.cjs} +2 -2
  150. package/dist/{Progress-BABBBG2y.cjs.map → Progress-R_Vt4gJA.cjs.map} +1 -1
  151. package/dist/{Progress-ZNQrxw_Q.js → Progress-bId4RkgJ.js} +2 -2
  152. package/dist/{Progress-ZNQrxw_Q.js.map → Progress-bId4RkgJ.js.map} +1 -1
  153. package/dist/{RemoveDialog-B_Y18MeJ.cjs → RemoveDialog-Cvj-DaiY.cjs} +2 -2
  154. package/dist/{RemoveDialog-B_Y18MeJ.cjs.map → RemoveDialog-Cvj-DaiY.cjs.map} +1 -1
  155. package/dist/{RemoveDialog-ayAfGXpB.js → RemoveDialog-Dh_q5jZF.js} +5 -5
  156. package/dist/{RemoveDialog-ayAfGXpB.js.map → RemoveDialog-Dh_q5jZF.js.map} +1 -1
  157. package/dist/{RichTextEditor-itYD1PfE.js → RichTextEditor-Dv-LDsN-.js} +7 -7
  158. package/dist/{RichTextEditor-itYD1PfE.js.map → RichTextEditor-Dv-LDsN-.js.map} +1 -1
  159. package/dist/{RichTextEditor-DSvSaszc.cjs → RichTextEditor-lmPGowSR.cjs} +2 -2
  160. package/dist/{RichTextEditor-DSvSaszc.cjs.map → RichTextEditor-lmPGowSR.cjs.map} +1 -1
  161. package/dist/RootLayout-B_ZtI-L_.cjs +2 -0
  162. package/dist/RootLayout-B_ZtI-L_.cjs.map +1 -0
  163. package/dist/RootLayout-DIOquzrU.js +642 -0
  164. package/dist/RootLayout-DIOquzrU.js.map +1 -0
  165. package/dist/{Select-K0a_7ROf.js → Select-Bw8Q86ts.js} +3 -3
  166. package/dist/{Select-K0a_7ROf.js.map → Select-Bw8Q86ts.js.map} +1 -1
  167. package/dist/{Select-1FWkryTK.cjs → Select-DdkJXkw-.cjs} +2 -2
  168. package/dist/{Select-1FWkryTK.cjs.map → Select-DdkJXkw-.cjs.map} +1 -1
  169. package/dist/{Sidebar-Dg15hPpM.js → Sidebar-CGL5hvpl.js} +3 -3
  170. package/dist/{Sidebar-Dg15hPpM.js.map → Sidebar-CGL5hvpl.js.map} +1 -1
  171. package/dist/{Sidebar-C3-u3Agj.cjs → Sidebar-CfEx7W7i.cjs} +2 -2
  172. package/dist/{Sidebar-C3-u3Agj.cjs.map → Sidebar-CfEx7W7i.cjs.map} +1 -1
  173. package/dist/{SpeedDial-CEBAWIYo.js → SpeedDial-C-yLmnk7.js} +2 -2
  174. package/dist/{SpeedDial-CEBAWIYo.js.map → SpeedDial-C-yLmnk7.js.map} +1 -1
  175. package/dist/{SpeedDial-D6me6w_m.cjs → SpeedDial-jOxWEd09.cjs} +2 -2
  176. package/dist/{SpeedDial-D6me6w_m.cjs.map → SpeedDial-jOxWEd09.cjs.map} +1 -1
  177. package/dist/{Stepper-wPPs57uZ.cjs → Stepper-D7An-ugU.cjs} +2 -2
  178. package/dist/{Stepper-wPPs57uZ.cjs.map → Stepper-D7An-ugU.cjs.map} +1 -1
  179. package/dist/{Stepper-BN0GsRZW.js → Stepper-DYpiLhzD.js} +2 -2
  180. package/dist/{Stepper-BN0GsRZW.js.map → Stepper-DYpiLhzD.js.map} +1 -1
  181. package/dist/{Table-CFl3OYlo.cjs → Table-BhaH8EKZ.cjs} +2 -2
  182. package/dist/{Table-CFl3OYlo.cjs.map → Table-BhaH8EKZ.cjs.map} +1 -1
  183. package/dist/{Table-DChIfjqj.js → Table-DK4GBKS3.js} +15 -15
  184. package/dist/{Table-DChIfjqj.js.map → Table-DK4GBKS3.js.map} +1 -1
  185. package/dist/{Tabs-BAKPWO4g.cjs → Tabs-6x4vC8je.cjs} +2 -2
  186. package/dist/{Tabs-BAKPWO4g.cjs.map → Tabs-6x4vC8je.cjs.map} +1 -1
  187. package/dist/{Tabs-DfVFgOfs.js → Tabs-CWiDeqqW.js} +2 -2
  188. package/dist/{Tabs-DfVFgOfs.js.map → Tabs-CWiDeqqW.js.map} +1 -1
  189. package/dist/{TagsField-CoBRqcjW.js → TagsField-Cg9YVl7G.js} +4 -4
  190. package/dist/{TagsField-CoBRqcjW.js.map → TagsField-Cg9YVl7G.js.map} +1 -1
  191. package/dist/{TagsField-5mbyaFQZ.cjs → TagsField-DwZLCIeb.cjs} +2 -2
  192. package/dist/{TagsField-5mbyaFQZ.cjs.map → TagsField-DwZLCIeb.cjs.map} +1 -1
  193. package/dist/{TextField-0gFvIFs8.js → TextField-5nQkU8HP.js} +3 -3
  194. package/dist/{TextField-0gFvIFs8.js.map → TextField-5nQkU8HP.js.map} +1 -1
  195. package/dist/{TextField-BL6OAJcP.cjs → TextField-BRaoadxk.cjs} +2 -2
  196. package/dist/{TextField-BL6OAJcP.cjs.map → TextField-BRaoadxk.cjs.map} +1 -1
  197. package/dist/ThemeToggle-DXpbooYn.js +28 -0
  198. package/dist/{ThemeToggle-_SUmLxmU.js.map → ThemeToggle-DXpbooYn.js.map} +1 -1
  199. package/dist/{ThemeToggle-BgKfcb02.cjs → ThemeToggle-DhaVEyPL.cjs} +2 -2
  200. package/dist/{ThemeToggle-BgKfcb02.cjs.map → ThemeToggle-DhaVEyPL.cjs.map} +1 -1
  201. package/dist/{TimeColumns-BE1sLoRV.js → TimeColumns-C_gdJn__.js} +2 -2
  202. package/dist/{TimeColumns-BE1sLoRV.js.map → TimeColumns-C_gdJn__.js.map} +1 -1
  203. package/dist/{TimeColumns-DkJsIu1w.cjs → TimeColumns-girAEgEN.cjs} +2 -2
  204. package/dist/{TimeColumns-DkJsIu1w.cjs.map → TimeColumns-girAEgEN.cjs.map} +1 -1
  205. package/dist/{TimePicker-Bv2qIFf9.js → TimePicker-DHdsY8kQ.js} +5 -5
  206. package/dist/{TimePicker-Bv2qIFf9.js.map → TimePicker-DHdsY8kQ.js.map} +1 -1
  207. package/dist/{TimePicker-6nHQx0P5.cjs → TimePicker-_Ak5yB_5.cjs} +2 -2
  208. package/dist/{TimePicker-6nHQx0P5.cjs.map → TimePicker-_Ak5yB_5.cjs.map} +1 -1
  209. package/dist/{Toaster-Fq6-ImDJ.js → Toaster-Dput5iLU.js} +2 -2
  210. package/dist/{Toaster-Fq6-ImDJ.js.map → Toaster-Dput5iLU.js.map} +1 -1
  211. package/dist/{Toaster-Brcspf7v.cjs → Toaster-fjyF8W3F.cjs} +2 -2
  212. package/dist/{Toaster-Brcspf7v.cjs.map → Toaster-fjyF8W3F.cjs.map} +1 -1
  213. package/dist/{TranslatedFields-CVc0NvXa.cjs → TranslatedFields-B-BU17IV.cjs} +2 -2
  214. package/dist/{TranslatedFields-CVc0NvXa.cjs.map → TranslatedFields-B-BU17IV.cjs.map} +1 -1
  215. package/dist/{TranslatedFields-CmRhRGC_.js → TranslatedFields-JnqLgUiF.js} +16 -16
  216. package/dist/{TranslatedFields-CmRhRGC_.js.map → TranslatedFields-JnqLgUiF.js.map} +1 -1
  217. package/dist/{UserCard-1ubnvBV6.cjs → UserCard-B9bzkZph.cjs} +2 -2
  218. package/dist/{UserCard-1ubnvBV6.cjs.map → UserCard-B9bzkZph.cjs.map} +1 -1
  219. package/dist/{UserCard-DcTLEHFu.js → UserCard-DYK6S-nr.js} +3 -3
  220. package/dist/{UserCard-DcTLEHFu.js.map → UserCard-DYK6S-nr.js.map} +1 -1
  221. package/dist/app/AdminRoot.d.cts +8 -1
  222. package/dist/app/AdminRoot.d.ts +8 -1
  223. package/dist/components/Alert/index.cjs +1 -1
  224. package/dist/components/Alert/index.js +1 -1
  225. package/dist/components/Breadcrumbs/index.cjs +1 -1
  226. package/dist/components/Breadcrumbs/index.js +1 -1
  227. package/dist/components/Button/index.cjs +1 -1
  228. package/dist/components/Button/index.js +1 -1
  229. package/dist/components/Card/index.cjs +1 -1
  230. package/dist/components/Card/index.js +1 -1
  231. package/dist/components/Chip/index.cjs +1 -1
  232. package/dist/components/Chip/index.js +1 -1
  233. package/dist/components/CodeBlock/index.cjs +1 -1
  234. package/dist/components/CodeBlock/index.js +1 -1
  235. package/dist/components/ColorPicker/index.cjs +1 -1
  236. package/dist/components/ColorPicker/index.js +1 -1
  237. package/dist/components/ColorRamp/index.cjs +1 -1
  238. package/dist/components/ColorRamp/index.js +1 -1
  239. package/dist/components/CopyButton/index.cjs +1 -1
  240. package/dist/components/CopyButton/index.js +1 -1
  241. package/dist/components/DatePicker/index.cjs +1 -1
  242. package/dist/components/DatePicker/index.js +1 -1
  243. package/dist/components/DateTimePicker/index.cjs +1 -1
  244. package/dist/components/DateTimePicker/index.js +1 -1
  245. package/dist/components/DescriptionList/index.cjs +1 -1
  246. package/dist/components/DescriptionList/index.js +1 -1
  247. package/dist/components/EmptyState/index.cjs +1 -1
  248. package/dist/components/EmptyState/index.js +1 -1
  249. package/dist/components/ErrorState/index.cjs +1 -1
  250. package/dist/components/ErrorState/index.js +2 -2
  251. package/dist/components/FileCard/index.cjs +1 -1
  252. package/dist/components/FileCard/index.js +1 -1
  253. package/dist/components/FileUploader/index.cjs +1 -1
  254. package/dist/components/FileUploader/index.js +1 -1
  255. package/dist/components/Flag/index.cjs +1 -1
  256. package/dist/components/Flag/index.js +1 -1
  257. package/dist/components/FullscreenToggle/index.cjs +1 -1
  258. package/dist/components/FullscreenToggle/index.js +1 -1
  259. package/dist/components/IconButton/index.cjs +1 -1
  260. package/dist/components/IconButton/index.js +1 -1
  261. package/dist/components/Loader/index.cjs +1 -1
  262. package/dist/components/Loader/index.js +1 -1
  263. package/dist/components/LocationPicker/index.cjs +1 -1
  264. package/dist/components/LocationPicker/index.js +1 -1
  265. package/dist/components/Modal/index.cjs +1 -1
  266. package/dist/components/Modal/index.js +1 -1
  267. package/dist/components/MultiSelect/index.cjs +1 -1
  268. package/dist/components/MultiSelect/index.js +1 -1
  269. package/dist/components/NumberField/index.cjs +1 -1
  270. package/dist/components/NumberField/index.js +1 -1
  271. package/dist/components/OtpField/index.cjs +1 -1
  272. package/dist/components/OtpField/index.js +1 -1
  273. package/dist/components/PageError/index.cjs +1 -1
  274. package/dist/components/PageError/index.js +1 -1
  275. package/dist/components/PageLayout/index.cjs +1 -1
  276. package/dist/components/PageLayout/index.js +1 -1
  277. package/dist/components/PageNotFound/index.cjs +1 -1
  278. package/dist/components/PageNotFound/index.js +1 -1
  279. package/dist/components/Pagination/index.cjs +1 -1
  280. package/dist/components/Pagination/index.js +1 -1
  281. package/dist/components/PaletteField/PaletteField.d.cts +8 -2
  282. package/dist/components/PaletteField/PaletteField.d.ts +8 -2
  283. package/dist/components/PaletteField/index.cjs +1 -1
  284. package/dist/components/PaletteField/index.js +1 -1
  285. package/dist/components/PhoneField/index.cjs +1 -1
  286. package/dist/components/PhoneField/index.js +1 -1
  287. package/dist/components/Popconfirm/index.cjs +1 -1
  288. package/dist/components/Popconfirm/index.js +1 -1
  289. package/dist/components/Progress/index.cjs +1 -1
  290. package/dist/components/Progress/index.js +1 -1
  291. package/dist/components/RemoveDialog/index.cjs +1 -1
  292. package/dist/components/RemoveDialog/index.js +1 -1
  293. package/dist/components/RichTextEditor/index.cjs +1 -1
  294. package/dist/components/RichTextEditor/index.js +1 -1
  295. package/dist/components/RootLayout/RootLayout.d.cts +18 -5
  296. package/dist/components/RootLayout/RootLayout.d.ts +18 -5
  297. package/dist/components/RootLayout/SettingsDrawer.d.cts +8 -2
  298. package/dist/components/RootLayout/SettingsDrawer.d.ts +8 -2
  299. package/dist/components/RootLayout/index.cjs +1 -1
  300. package/dist/components/RootLayout/index.d.cts +1 -1
  301. package/dist/components/RootLayout/index.d.ts +1 -1
  302. package/dist/components/RootLayout/index.js +1 -1
  303. package/dist/components/Select/index.cjs +1 -1
  304. package/dist/components/Select/index.js +1 -1
  305. package/dist/components/Sidebar/index.cjs +1 -1
  306. package/dist/components/Sidebar/index.js +1 -1
  307. package/dist/components/SpeedDial/index.cjs +1 -1
  308. package/dist/components/SpeedDial/index.js +1 -1
  309. package/dist/components/Stepper/index.cjs +1 -1
  310. package/dist/components/Stepper/index.js +1 -1
  311. package/dist/components/Table/index.cjs +1 -1
  312. package/dist/components/Table/index.js +1 -1
  313. package/dist/components/Tabs/index.cjs +1 -1
  314. package/dist/components/Tabs/index.js +1 -1
  315. package/dist/components/TagsField/index.cjs +1 -1
  316. package/dist/components/TagsField/index.js +1 -1
  317. package/dist/components/TextField/index.cjs +1 -1
  318. package/dist/components/TextField/index.js +1 -1
  319. package/dist/components/ThemeToggle/index.cjs +1 -1
  320. package/dist/components/ThemeToggle/index.js +1 -1
  321. package/dist/components/TimePicker/index.cjs +1 -1
  322. package/dist/components/TimePicker/index.js +1 -1
  323. package/dist/components/Toast/index.cjs +1 -1
  324. package/dist/components/Toast/index.js +1 -1
  325. package/dist/components/TranslatedFields/index.cjs +1 -1
  326. package/dist/components/TranslatedFields/index.js +1 -1
  327. package/dist/components/UserCard/index.cjs +1 -1
  328. package/dist/components/UserCard/index.js +1 -1
  329. package/dist/entries/app.cjs +1 -1
  330. package/dist/entries/app.js +1 -1
  331. package/dist/entries/components.cjs +1 -1
  332. package/dist/entries/components.js +50 -50
  333. package/dist/entries/i18n.cjs +1 -1
  334. package/dist/entries/i18n.js +2 -2
  335. package/dist/entries/theme.cjs +1 -1
  336. package/dist/entries/theme.d.cts +2 -2
  337. package/dist/entries/theme.d.ts +2 -2
  338. package/dist/entries/theme.js +12 -11
  339. package/dist/i18n/messages.d.cts +6 -0
  340. package/dist/i18n/messages.d.ts +6 -0
  341. package/dist/index.cjs +1 -1
  342. package/dist/index.css +1 -1
  343. package/dist/index.js +232 -231
  344. package/dist/{messages-CMgYU5p6.js → messages-BasxRpyx.js} +64 -22
  345. package/dist/messages-BasxRpyx.js.map +1 -0
  346. package/dist/{messages-h22vS9zn.cjs → messages-CElolVGm.cjs} +9 -9
  347. package/dist/messages-CElolVGm.cjs.map +1 -0
  348. package/dist/theme/ConfigProvider.d.cts +33 -2
  349. package/dist/theme/ConfigProvider.d.ts +33 -2
  350. package/dist/theme/index.d.cts +2 -2
  351. package/dist/theme/index.d.ts +2 -2
  352. package/dist/{useHomeTo-MfvJxziQ.cjs → useHomeTo-BnjXms11.cjs} +2 -2
  353. package/dist/{useHomeTo-MfvJxziQ.cjs.map → useHomeTo-BnjXms11.cjs.map} +1 -1
  354. package/dist/{useHomeTo-Ckq7scIY.js → useHomeTo-Btkk0RSB.js} +2 -2
  355. package/dist/{useHomeTo-Ckq7scIY.js.map → useHomeTo-Btkk0RSB.js.map} +1 -1
  356. package/dist/{useOptionMenu-BBsyUow1.js → useOptionMenu-DeW68na-.js} +3 -3
  357. package/dist/{useOptionMenu-BBsyUow1.js.map → useOptionMenu-DeW68na-.js.map} +1 -1
  358. package/dist/{useOptionMenu-3YlvxPAM.cjs → useOptionMenu-IebDGoqk.cjs} +2 -2
  359. package/dist/{useOptionMenu-3YlvxPAM.cjs.map → useOptionMenu-IebDGoqk.cjs.map} +1 -1
  360. package/package.json +1 -1
  361. package/dist/AdminRoot-CRTBGUxq.cjs +0 -2
  362. package/dist/AdminRoot-CRTBGUxq.cjs.map +0 -1
  363. package/dist/AdminRoot-JOgiNkJA.js.map +0 -1
  364. package/dist/ConfigProvider-B_Bb6pk1.cjs +0 -2
  365. package/dist/ConfigProvider-B_Bb6pk1.cjs.map +0 -1
  366. package/dist/ConfigProvider-DeMASTVo.js +0 -347
  367. package/dist/ConfigProvider-DeMASTVo.js.map +0 -1
  368. package/dist/PaletteField-ChG2VQtS.js +0 -54
  369. package/dist/PaletteField-ChG2VQtS.js.map +0 -1
  370. package/dist/PaletteField-DQ1OvXqe.cjs +0 -2
  371. package/dist/PaletteField-DQ1OvXqe.cjs.map +0 -1
  372. package/dist/RootLayout-BlYjYAYk.js +0 -582
  373. package/dist/RootLayout-BlYjYAYk.js.map +0 -1
  374. package/dist/RootLayout-D5nlzYlH.cjs +0 -2
  375. package/dist/RootLayout-D5nlzYlH.cjs.map +0 -1
  376. package/dist/ThemeToggle-_SUmLxmU.js +0 -28
  377. package/dist/messages-CMgYU5p6.js.map +0 -1
  378. package/dist/messages-h22vS9zn.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList-CG08_qwT.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 `items.length` rows, a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAaMA,KAAgB,IAAI,IAAYC,CAAU,GAkE1CC,KAAsD,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,EAAA,GAE1EC,KAAU,CAACC,MAAqBA,KAAS,QAAQA,MAAU,MAAMA,MAAU,IAG3EC,KAAa,CAACC,MAA8C;AAChE,MAAI,OAAOA,EAAK,YAAa,iBAAiBA,EAAK;AACnD,MAAI,OAAOA,EAAK,SAAU,YAAY,OAAOA,EAAK,SAAU,SAAU,QAAO,OAAOA,EAAK,KAAK;AAEhG,GAGMC,KAAa,CAACC,GAA0BC,MAAiB;AAC7D,MAAIC,IAAM,GACNC,IAAM;AACV,SAAOH,EAAM,IAAI,CAACF,MAAS;AACzB,UAAMM,IAAO,KAAK,IAAIN,EAAK,QAAQ,GAAGG,CAAI;AAC1C,IAAIE,IAAMC,IAAOH,MACfC,KAAO,GACPC,IAAM;AAER,UAAME,IAAS,EAAE,MAAAP,GAAM,MAAAM,GAAM,KAAAF,GAAK,KAAAC,EAAA;AAClC,WAAAA,KAAOC,GACHD,KAAOF,MACTC,KAAO,GACPC,IAAM,IAEDE;AAAA,EACT,CAAC;AACH,GAEMC,IAAa,CAACC,GAA4BC,IAAoB,SAClE,OAAOD,KAAS,YAAYf,GAAc,IAAIe,CAAI,IAChD,gBAAAE,EAACC,KAAK,MAAMH,GAAkB,MAAAC,GAAY,IAE1CD,GAgB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;AAAA,wBAAA,gBAAApC,EAAC,QAAA,EAAK,WAAWoC,EAAO,WACrB,UAAAM,IACC,gBAAA1C;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,WAAWoC,EAAO;AAAA,4BAClB,cAAYf,EAAE,uBAAuB;AAAA,4BAEpC,UAAAT;AAAA,0BAAA;AAAA,wBAAA,IAGHvB,EAAK,OAET;AAAA,wBACCsD,KAAQ,QACP,gBAAA3C,EAAC,QAAA,EAAK,WAAWoC,EAAO,MACtB,UAAA,gBAAApC;AAAA,0BAAC4C;AAAA,0BAAA;AAAA,4BACC,OAAOD;AAAA,4BACP,MAAK;AAAA,4BACL,SAAQ;AAAA,4BACR,WAAWP,EAAO;AAAA,0BAAA;AAAA,wBAAA,EACpB,CACF;AAAA,sBAAA,EAAA,CAEJ;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAvCK/C,EAAK,OAAOmD;AAAA,gBAAA;AAAA,cA0CvB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"DescriptionList-BP4CDME5.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 `items.length` rows, a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAaMA,KAAgB,IAAI,IAAYC,CAAU,GAkE1CC,KAAsD,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,EAAA,GAE1EC,KAAU,CAACC,MAAqBA,KAAS,QAAQA,MAAU,MAAMA,MAAU,IAG3EC,KAAa,CAACC,MAA8C;AAChE,MAAI,OAAOA,EAAK,YAAa,iBAAiBA,EAAK;AACnD,MAAI,OAAOA,EAAK,SAAU,YAAY,OAAOA,EAAK,SAAU,SAAU,QAAO,OAAOA,EAAK,KAAK;AAEhG,GAGMC,KAAa,CAACC,GAA0BC,MAAiB;AAC7D,MAAIC,IAAM,GACNC,IAAM;AACV,SAAOH,EAAM,IAAI,CAACF,MAAS;AACzB,UAAMM,IAAO,KAAK,IAAIN,EAAK,QAAQ,GAAGG,CAAI;AAC1C,IAAIE,IAAMC,IAAOH,MACfC,KAAO,GACPC,IAAM;AAER,UAAME,IAAS,EAAE,MAAAP,GAAM,MAAAM,GAAM,KAAAF,GAAK,KAAAC,EAAA;AAClC,WAAAA,KAAOC,GACHD,KAAOF,MACTC,KAAO,GACPC,IAAM,IAEDE;AAAA,EACT,CAAC;AACH,GAEMC,IAAa,CAACC,GAA4BC,IAAoB,SACl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,GACvB;AAAA,wBAEDA,EAAK;AAAA,sBAAA,GACR;AAAA,sBACA,gBAAA6C,EAAC,MAAA,EAAG,WAAWE,EAAO,OACpB,UAAA;AAAA,wBAAA,gBAAApC,EAAC,QAAA,EAAK,WAAWoC,EAAO,WACrB,UAAAM,IACC,gBAAA1C;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,WAAWoC,EAAO;AAAA,4BAClB,cAAYf,EAAE,uBAAuB;AAAA,4BAEpC,UAAAT;AAAA,0BAAA;AAAA,wBAAA,IAGHvB,EAAK,OAET;AAAA,wBACCsD,KAAQ,QACP,gBAAA3C,EAAC,QAAA,EAAK,WAAWoC,EAAO,MACtB,UAAA,gBAAApC;AAAA,0BAAC4C;AAAA,0BAAA;AAAA,4BACC,OAAOD;AAAA,4BACP,MAAK;AAAA,4BACL,SAAQ;AAAA,4BACR,WAAWP,EAAO;AAAA,0BAAA;AAAA,wBAAA,EACpB,CACF;AAAA,sBAAA,EAAA,CAEJ;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAvCK/C,EAAK,OAAOmD;AAAA,gBAAA;AAAA,cA0CvB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("react/jsx-runtime"),M=require("react"),R=require("clsx"),J=require("./breakpoints-Dpnh6BbG.cjs"),K=require("./useMediaQuery-CHMrI6Dy.cjs"),C=require("./Icon-B6lz-V0A.cjs"),V=require("./CopyButton-DZeYcG68.cjs"),X=require("./IconButton-CQ25TtBc.cjs"),S=require("./Skeleton-DK0lAjS9.cjs"),B=require("./Typography-d97DdbNd.cjs"),Y=require("./ConfigProvider-B_Bb6pk1.cjs"),Z="_root_10k89_4",W="_sm_10k89_14",ee="_md_10k89_22",se="_lg_10k89_30",te="_header_10k89_40",le="_headerMain_10k89_49",ae="_headerIcon_10k89_56",ne="_headerText_10k89_59",oe="_title_10k89_65",re="_actions_10k89_68",ce="_grid_10k89_80",de="_item_10k89_87",ie="_dividers_10k89_95",_e="_lastRow_10k89_99",ue="_label_10k89_103",he="_labelIcon_10k89_111",pe="_value_10k89_116",me="_valueMedium_10k89_125",ve="_valueBold_10k89_128",xe="_valueText_10k89_131",ke="_placeholder_10k89_135",ye="_copy_10k89_148",be="_copyButton_10k89_156",je="_horizontal_10k89_172",Ne="_stacked_10k89_170",fe="_bordered_10k89_184",ge="_lastRowStart_10k89_218",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:_e,label:ue,labelIcon:he,value:pe,valueMedium:me,valueBold:ve,valueText:xe,placeholder:ke,copy:ye,copyButton:be,horizontal:je,stacked:Ne,bordered:fe,lastRowStart:ge},Ie=new Set(C.ICON_NAMES),we={xs:1,sm:2,lg:3},Te=t=>t==null||t===""||t===!1,Me=t=>{if(typeof t.copyable=="string")return t.copyable;if(typeof t.value=="string"||typeof t.value=="number")return String(t.value)},Re=(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 h={item:i,span:o,row:r,col:a};return a+=o,a>=n&&(r+=1,a=0),h})},q=(t,n="sm")=>typeof t=="string"&&Ie.has(t)?s.jsx(C.Icon,{name:t,size:n}):t,Se=M.forwardRef(function({items:n,columns:r=we,layout:a="vertical",size:i="md",valueWeight:o="regular",bordered:h=!1,dividers:L=!0,labelWidth:p=160,stackBelow:k="xxs",loading:c=!1,emptyText:z="—",title:d,icon:m,color:E="accent",subtitle:_,actions:v,className:A,style:D,...O},$){const y=Y.useT(),b=`${M.useId()}-title`,j=K.useBreakpointMatches(),N=J.resolveResponsive(r,j)??1,U=a==="horizontal"&&k!==!1&&j[k],f=n.filter(l=>!l.hidden),u=Re(f,N),g=u.length?u[u.length-1].row:0,F=typeof c=="number"?c:f.length||6,H=d!=null||_!=null||v!=null||m!=null,P={"--dl-cols":N,"--dl-label-w":typeof p=="number"?`${p}px`:p};return s.jsxs("div",{ref:$,className:R.clsx(e.root,e[i],e[a],o!=="regular"&&e[`value${o==="bold"?"Bold":"Medium"}`],h&&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:[m!=null&&s.jsx(X.IconButton,{variant:"filled",size:"sm",color:E,nonClickable:!0,"aria-hidden":!0,className:e.headerIcon,children:q(m,"md")}),(d!=null||_!=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}),_!=null&&s.jsx(B.Typography,{as:"p",variant:"bodySmall",color:"muted",children:_})]})]}),v!=null&&s.jsx("div",{className:e.actions,children:v})]}),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,x)=>s.jsxs("div",{className:e.item,"aria-hidden":"true",children:[s.jsx("dt",{className:e.label,children:s.jsx(S.Skeleton,{width:"40%",height:"0.9em"})}),s.jsx("dd",{className:e.value,children:s.jsx(S.Skeleton,{width:"70%",height:"1.1em"})})]},x)):u.map(({item:l,span:x,row:I,col:Q},G)=>{const w=Te(l.value),T=!w&&l.copyable?Me(l):void 0;return s.jsxs("div",{className:R.clsx(e.item,I===g&&e.lastRow,I===g&&Q===0&&e.lastRowStart),style:{"--dl-span":x},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:w?s.jsx("span",{className:e.placeholder,"aria-label":y("descriptionList.empty"),children:z}):l.value}),T!=null&&s.jsx("span",{className:e.copy,children:s.jsx(V.CopyButton,{value:T,size:"sm",variant:"text",className:e.copyButton})})]})]},l.key??G)})})]})});exports.DescriptionList=Se;
2
- //# sourceMappingURL=DescriptionList-S9C6Tp90.cjs.map
1
+ "use strict";const s=require("react/jsx-runtime"),M=require("react"),R=require("clsx"),J=require("./breakpoints-Dpnh6BbG.cjs"),K=require("./useMediaQuery-CHMrI6Dy.cjs"),C=require("./Icon-B6lz-V0A.cjs"),V=require("./CopyButton-CjPyKpky.cjs"),X=require("./IconButton-D3ZpI0XL.cjs"),S=require("./Skeleton-DK0lAjS9.cjs"),B=require("./Typography-d97DdbNd.cjs"),Y=require("./ConfigProvider-DELhJlqo.cjs"),Z="_root_10k89_4",W="_sm_10k89_14",ee="_md_10k89_22",se="_lg_10k89_30",te="_header_10k89_40",le="_headerMain_10k89_49",ae="_headerIcon_10k89_56",ne="_headerText_10k89_59",oe="_title_10k89_65",re="_actions_10k89_68",ce="_grid_10k89_80",de="_item_10k89_87",ie="_dividers_10k89_95",_e="_lastRow_10k89_99",ue="_label_10k89_103",he="_labelIcon_10k89_111",pe="_value_10k89_116",me="_valueMedium_10k89_125",ve="_valueBold_10k89_128",xe="_valueText_10k89_131",ke="_placeholder_10k89_135",ye="_copy_10k89_148",be="_copyButton_10k89_156",je="_horizontal_10k89_172",Ne="_stacked_10k89_170",fe="_bordered_10k89_184",ge="_lastRowStart_10k89_218",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:_e,label:ue,labelIcon:he,value:pe,valueMedium:me,valueBold:ve,valueText:xe,placeholder:ke,copy:ye,copyButton:be,horizontal:je,stacked:Ne,bordered:fe,lastRowStart:ge},Ie=new Set(C.ICON_NAMES),we={xs:1,sm:2,lg:3},Te=t=>t==null||t===""||t===!1,Me=t=>{if(typeof t.copyable=="string")return t.copyable;if(typeof t.value=="string"||typeof t.value=="number")return String(t.value)},Re=(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 h={item:i,span:o,row:r,col:a};return a+=o,a>=n&&(r+=1,a=0),h})},q=(t,n="sm")=>typeof t=="string"&&Ie.has(t)?s.jsx(C.Icon,{name:t,size:n}):t,Se=M.forwardRef(function({items:n,columns:r=we,layout:a="vertical",size:i="md",valueWeight:o="regular",bordered:h=!1,dividers:L=!0,labelWidth:p=160,stackBelow:k="xxs",loading:c=!1,emptyText:z="—",title:d,icon:m,color:E="accent",subtitle:_,actions:v,className:A,style:D,...O},$){const y=Y.useT(),b=`${M.useId()}-title`,j=K.useBreakpointMatches(),N=J.resolveResponsive(r,j)??1,U=a==="horizontal"&&k!==!1&&j[k],f=n.filter(l=>!l.hidden),u=Re(f,N),g=u.length?u[u.length-1].row:0,F=typeof c=="number"?c:f.length||6,H=d!=null||_!=null||v!=null||m!=null,P={"--dl-cols":N,"--dl-label-w":typeof p=="number"?`${p}px`:p};return s.jsxs("div",{ref:$,className:R.clsx(e.root,e[i],e[a],o!=="regular"&&e[`value${o==="bold"?"Bold":"Medium"}`],h&&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:[m!=null&&s.jsx(X.IconButton,{variant:"filled",size:"sm",color:E,nonClickable:!0,"aria-hidden":!0,className:e.headerIcon,children:q(m,"md")}),(d!=null||_!=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}),_!=null&&s.jsx(B.Typography,{as:"p",variant:"bodySmall",color:"muted",children:_})]})]}),v!=null&&s.jsx("div",{className:e.actions,children:v})]}),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,x)=>s.jsxs("div",{className:e.item,"aria-hidden":"true",children:[s.jsx("dt",{className:e.label,children:s.jsx(S.Skeleton,{width:"40%",height:"0.9em"})}),s.jsx("dd",{className:e.value,children:s.jsx(S.Skeleton,{width:"70%",height:"1.1em"})})]},x)):u.map(({item:l,span:x,row:I,col:Q},G)=>{const w=Te(l.value),T=!w&&l.copyable?Me(l):void 0;return s.jsxs("div",{className:R.clsx(e.item,I===g&&e.lastRow,I===g&&Q===0&&e.lastRowStart),style:{"--dl-span":x},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:w?s.jsx("span",{className:e.placeholder,"aria-label":y("descriptionList.empty"),children:z}):l.value}),T!=null&&s.jsx("span",{className:e.copy,children:s.jsx(V.CopyButton,{value:T,size:"sm",variant:"text",className:e.copyButton})})]})]},l.key??G)})})]})});exports.DescriptionList=Se;
2
+ //# sourceMappingURL=DescriptionList-BWw0Fe6U.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionList-S9C6Tp90.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 `items.length` rows, a number sets the count. */\n loading?: boolean | number\n /** Placeholder for an empty value. Defaults to `\"—\"`. */\n emptyText?: ReactNode\n /** Optional header title. */\n title?: ReactNode\n /** Leading header icon (a tinted box before the title, like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the header icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Muted line under the title. */\n subtitle?: ReactNode\n /** Header slot on the right (buttons, a status chip …). */\n actions?: ReactNode\n}\n\nconst DEFAULT_COLUMNS: Responsive<DescriptionListColumns> = { xs: 1, sm: 2, lg: 3 }\n\nconst isEmpty = (value: ReactNode) => value == null || value === '' || value === false\n\n/** What `copyable` copies: an explicit string, else a string / number value; nothing for rich nodes. */\nconst copyTextOf = (item: DescriptionItem): string | undefined => {\n if (typeof item.copyable === 'string') return item.copyable\n if (typeof item.value === 'string' || typeof item.value === 'number') return String(item.value)\n return undefined\n}\n\n/** Lay the items on a `cols`-wide grid the way CSS auto-placement will (spans clamped, wrapping rows). */\nconst placeItems = (items: DescriptionItem[], cols: number) => {\n let row = 0\n let col = 0\n return items.map((item) => {\n const span = Math.min(item.span ?? 1, cols)\n if (col + span > cols) {\n row += 1\n col = 0\n }\n const placed = { item, span, row, col }\n col += span\n if (col >= cols) {\n row += 1\n col = 0\n }\n return placed\n })\n}\n\nconst renderIcon = (icon: IconName | ReactNode, size: 'sm' | 'md' = 'sm') =>\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n/**\n * Label / value pairs for a **detail page** (the read-only twin of a form: \"User #42\" → Name, Email,\n * Role …). Renders a semantic `<dl>` of `<dt>` / `<dd>` groups laid out on a responsive CSS grid\n * (`columns`, desktop-first breakpoint map — default 1 → 2 → 3), each pair optionally spanning several\n * columns. An optional Card-style header carries an `icon` box (tinted by `color`), `title`,\n * `subtitle` and `actions`. Values are regular weight by default (`valueWeight` adds emphasis) and any node: `null` / `''` show a muted \"—\" placeholder (`emptyText`), string / number\n * values can grow a `CopyButton` (revealed on hover / focus; always visible without hover), and\n * `hidden` drops a pair (e.g. by role). `layout=\"horizontal\"` puts the label beside the value in a\n * `labelWidth` column and stacks back on phones (`stackBelow` — a breakpoint, or `false` to never stack); `bordered` frames the list as a surface card (tinting the\n * label column when horizontal). `loading` swaps the values for `Skeleton` lines of the same shape.\n * Rows are separated by hairline `dividers`. Token-only; the grid is never `overflow: hidden` so the\n * copy tooltip is never clipped. `forwardRef` to the root `<div>`.\n */\nexport const DescriptionList = forwardRef<HTMLDivElement, DescriptionListProps>(\n function DescriptionList(\n {\n items,\n columns = DEFAULT_COLUMNS,\n layout = 'vertical',\n size = 'md',\n valueWeight = 'regular',\n bordered = false,\n dividers = true,\n labelWidth = 160,\n stackBelow = 'xxs',\n loading = false,\n emptyText = '\\u2014',\n title,\n icon,\n color = 'accent',\n subtitle,\n actions,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const t = useT()\n const id = useId()\n const titleId = `${id}-title`\n const matches = useBreakpointMatches()\n const cols = resolveResponsive(columns, matches) ?? 1\n const stacked = layout === 'horizontal' && stackBelow !== false && matches[stackBelow]\n\n const visible = items.filter((item) => !item.hidden)\n // Grid placement (span-aware) — the last row drops its hairline (nothing follows it, and in `bordered`\n // it would double the frame's border), and its first cell rounds the frame's bottom-left corner\n // (`bordered` + `horizontal` tints the label column, and that tint must not bleed past the radius).\n const placed = placeItems(visible, cols)\n const lastRow = placed.length ? placed[placed.length - 1].row : 0\n const skeletonRows = typeof loading === 'number' ? loading : visible.length || 6\n const hasHeader = title != null || subtitle != null || actions != null || icon != null\n\n const vars = {\n '--dl-cols': cols,\n '--dl-label-w': typeof labelWidth === 'number' ? `${labelWidth}px` : labelWidth,\n } as CSSProperties\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles.root,\n styles[size],\n styles[layout],\n valueWeight !== 'regular' && styles[`value${valueWeight === 'bold' ? 'Bold' : 'Medium'}`],\n bordered && styles.bordered,\n dividers && styles.dividers,\n stacked && styles.stacked,\n className,\n )}\n style={{ ...vars, ...style }}\n {...props}\n >\n {hasHeader && (\n <div className={styles.header}>\n <div className={styles.headerMain}>\n {icon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.headerIcon}\n >\n {renderIcon(icon, 'md')}\n </IconButton>\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <Typography as=\"h3\" id={titleId} variant=\"subtitle\" className={styles.title}>\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography as=\"p\" variant=\"bodySmall\" color=\"muted\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n )}\n\n <dl\n className={styles.grid}\n aria-labelledby={title != null ? titleId : undefined}\n aria-busy={loading ? true : undefined}\n aria-label={loading ? t('descriptionList.loading') : undefined}\n >\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <div key={i} className={styles.item} aria-hidden=\"true\">\n <dt className={styles.label}>\n <Skeleton width=\"40%\" height=\"0.9em\" />\n </dt>\n <dd className={styles.value}>\n <Skeleton width=\"70%\" height=\"1.1em\" />\n </dd>\n </div>\n ))\n : placed.map(({ item, span, row, col }, i) => {\n const empty = isEmpty(item.value)\n const copy = !empty && item.copyable ? copyTextOf(item) : undefined\n return (\n <div\n key={item.key ?? i}\n className={clsx(\n styles.item,\n row === lastRow && styles.lastRow,\n row === lastRow && col === 0 && styles.lastRowStart,\n )}\n style={{ '--dl-span': span } as CSSProperties}\n >\n <dt className={styles.label}>\n {item.icon != null && (\n <span className={styles.labelIcon} aria-hidden=\"true\">\n {renderIcon(item.icon)}\n </span>\n )}\n {item.label}\n </dt>\n <dd className={styles.value}>\n <span className={styles.valueText}>\n {empty ? (\n <span\n className={styles.placeholder}\n aria-label={t('descriptionList.empty')}\n >\n {emptyText}\n </span>\n ) : (\n item.value\n )}\n </span>\n {copy != null && (\n <span className={styles.copy}>\n <CopyButton\n value={copy}\n size=\"sm\"\n variant=\"text\"\n className={styles.copyButton}\n />\n </span>\n )}\n </dd>\n </div>\n )\n })}\n </dl>\n </div>\n )\n },\n)\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_COLUMNS","isEmpty","value","copyTextOf","item","placeItems","items","cols","row","col","span","placed","renderIcon","icon","size","jsx","Icon","DescriptionList","forwardRef","columns","layout","valueWeight","bordered","dividers","labelWidth","stackBelow","loading","emptyText","title","color","subtitle","actions","className","style","props","ref","t","useT","titleId","useId","matches","useBreakpointMatches","resolveResponsive","stacked","visible","lastRow","skeletonRows","hasHeader","vars","jsxs","clsx","styles","IconButton","Typography","_","i","Skeleton","empty","copy","CopyButton"],"mappings":"qzCAaMA,GAAgB,IAAI,IAAYC,YAAU,EAkE1CC,GAAsD,CAAE,GAAI,EAAG,GAAI,EAAG,GAAI,CAAA,EAE1EC,GAAWC,GAAqBA,GAAS,MAAQA,IAAU,IAAMA,IAAU,GAG3EC,GAAcC,GAA8C,CAChE,GAAI,OAAOA,EAAK,UAAa,gBAAiBA,EAAK,SACnD,GAAI,OAAOA,EAAK,OAAU,UAAY,OAAOA,EAAK,OAAU,SAAU,OAAO,OAAOA,EAAK,KAAK,CAEhG,EAGMC,GAAa,CAACC,EAA0BC,IAAiB,CAC7D,IAAIC,EAAM,EACNC,EAAM,EACV,OAAOH,EAAM,IAAKF,GAAS,CACzB,MAAMM,EAAO,KAAK,IAAIN,EAAK,MAAQ,EAAGG,CAAI,EACtCE,EAAMC,EAAOH,IACfC,GAAO,EACPC,EAAM,GAER,MAAME,EAAS,CAAE,KAAAP,EAAM,KAAAM,EAAM,IAAAF,EAAK,IAAAC,CAAA,EAClC,OAAAA,GAAOC,EACHD,GAAOF,IACTC,GAAO,EACPC,EAAM,GAEDE,CACT,CAAC,CACH,EAEMC,EAAa,CAACC,EAA4BC,EAAoB,OAClE,OAAOD,GAAS,UAAYf,GAAc,IAAIe,CAAI,EAChDE,EAAAA,IAACC,QAAK,KAAMH,EAAkB,KAAAC,EAAY,EAE1CD,EAgBSI,GAAkBC,EAAAA,WAC7B,SACE,CACE,MAAAZ,EACA,QA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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 `items.length` rows, 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,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A,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"}
@@ -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-D5TxgfCc.js";
5
- import { a as g } from "./ConfigProvider-DeMASTVo.js";
5
+ import { a as g } from "./ConfigProvider-Bgu85MsI.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-BCoPw8jf.js.map
57
+ //# sourceMappingURL=EmptyState-BlmQtbSs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-BCoPw8jf.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-BlmQtbSs.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,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),S=require("react"),N=require("clsx"),c=require("./Icon-B6lz-V0A.cjs"),j=require("./ConfigProvider-B_Bb6pk1.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-DnGds1ch.cjs.map
1
+ "use strict";const e=require("react/jsx-runtime"),S=require("react"),N=require("clsx"),c=require("./Icon-B6lz-V0A.cjs"),j=require("./ConfigProvider-DELhJlqo.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-DGHOD_jy.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-DnGds1ch.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-DGHOD_jy.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,2 +1,2 @@
1
- "use strict";const n=require("react/jsx-runtime"),c=require("react"),u=require("./ErrorState-MQBeyF2n.cjs"),h=require("./ConfigProvider-B_Bb6pk1.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-JCNa0_Ys.cjs.map
1
+ "use strict";const n=require("react/jsx-runtime"),c=require("react"),u=require("./ErrorState-BjEA0VfF.cjs"),h=require("./ConfigProvider-DELhJlqo.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-DL194IyB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary-JCNa0_Ys.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,E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,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-DL194IyB.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,KAAA,MAAQ,IAAM,SACZ,KAAK,SAAS,CAAE,MAAO,IAAA,CAAM,GAC7BC,GAAAC,EAAA,KAAK,OAAM,UAAX,MAAAD,EAAA,KAAAC,EACF,CAAA,CAnBA,OAAO,yBAAyBrB,EAAoC,CAClE,MAAO,CAAE,MAAOa,EAAQb,CAAK,CAAA,CAC/B,CAEA,kBAAkBA,EAAgBsB,EAAiB,UACjDF,GAAAC,EAAA,KAAK,OAAM,UAAX,MAAAD,EAAA,KAAAC,EAAqBR,EAAQb,CAAK,EAAGsB,EACvC,CAEA,mBAAmBC,EAA0BC,EAA+B,CAGtE,KAAK,MAAM,OAASA,EAAU,OAAShB,EAAYe,EAAK,UAAW,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,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-DI28ZCJN.js";
4
- import { a as h } from "./ConfigProvider-DeMASTVo.js";
3
+ import { E as a } from "./ErrorState-Hfd_0MeE.js";
4
+ import { a as h } from "./ConfigProvider-Bgu85MsI.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-BILk_3fM.js.map
57
+ //# sourceMappingURL=ErrorBoundary-ukRaS6uS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary-BILk_3fM.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,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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
+ {"version":3,"file":"ErrorBoundary-ukRaS6uS.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,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),V=require("react"),b=require("clsx"),Q=require("./Alert-CY8iU1zd.cjs"),d=require("./Button-CYZoF18-.cjs"),U=require("./EmptyState-DnGds1ch.cjs"),_=require("./Icon-B6lz-V0A.cjs"),W=require("./IconButton-CQ25TtBc.cjs"),X=require("./Tooltip-DmMq5R1x.cjs"),n=require("./errorMessage-C7N4KvUS.cjs"),Y=require("./useClipboard-BjTIX-4g.cjs"),Z=require("./Modal-DjSOhZqd.cjs"),w=require("./ConfigProvider-B_Bb6pk1.cjs"),P="_errorState_o523f_4",L="_actions_o523f_9",rr="_fieldErrors_o523f_18",er="_field_o523f_18",tr="_compact_o523f_32",or="_pre_o523f_37",sr="_alertVariant_o523f_53",nr="_alertTitle_o523f_56",lr="_alertBody_o523f_60",ar="_alertActions_o523f_65",t={errorState:P,actions:L,fieldErrors:rr,field:er,compact:tr,pre:or,alertVariant:sr,alertTitle:nr,alertBody:lr,alertActions:ar};function cr({open:I,onClose:o,report:u}){const s=w.useT(),{copy:h,copied:a}=Y.useClipboard();return r.jsx(Z.Modal,{open:I,onClose:o,title:s("errorState.detailsTitle"),icon:"Danger",color:"error",size:"lg",scrollBehavior:"inside",footer:r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"text",color:"primary",onClick:o,children:s("common.close")}),r.jsx(d.Button,{startIcon:r.jsx(_.Icon,{name:a?"CopySuccess":"Copy"}),onClick:()=>void h(u),children:s(a?"clipboard.copied":"clipboard.copy")})]}),children:r.jsx("pre",{className:t.pre,children:u})})}const ir=V.forwardRef(function({error:o,variant:u="alert",title:s,description:h,icon:a,onRetry:c,retrying:m=!1,retryLabel:x,showDetails:C="dev",compact:S=!1,traceId:y,fieldErrors:T,fieldLabels:v,size:R,pattern:G,action:p,className:N,children:k,...A},z){const e=w.useT(),[H,E]=V.useState(!1),f=n.getErrorMessage(o,l=>e("errorState.requestFailed",{status:l})),g=y===!1?void 0:y??n.getErrorTraceId(o),B=T===!1?void 0:T??n.getErrorFieldErrors(o),J=B&&Object.keys(B).length>0?r.jsx("ul",{className:t.fieldErrors,children:Object.entries(B).map(([l,K])=>r.jsxs("li",{children:[r.jsx("span",{className:t.field,children:(v==null?void 0:v[l])??n.humanizeField(l)})," —"," ",K]},l))}):void 0,q=h??J??f??e("errorState.description"),$=a===void 0?n.isNetworkError(o)?"CloudCross":"Danger":a,j=(C==="dev"?n.isDev():C)?n.getErrorDetails(o):void 0,D=n.getErrorStatus(o),i=g!=null||j!=null?[g!=null&&`${e("errorState.traceId")}: ${g}`,D!=null&&`${e("errorState.status")}: ${D}`,f!=null&&(q===f||j!=null)&&`${e("errorState.message")}: ${f}`,j!=null&&`
1
+ "use strict";const r=require("react/jsx-runtime"),V=require("react"),b=require("clsx"),Q=require("./Alert-5tpyGb2M.cjs"),d=require("./Button-ClVfHGBc.cjs"),U=require("./EmptyState-DGHOD_jy.cjs"),_=require("./Icon-B6lz-V0A.cjs"),W=require("./IconButton-D3ZpI0XL.cjs"),X=require("./Tooltip-DmMq5R1x.cjs"),n=require("./errorMessage-C7N4KvUS.cjs"),Y=require("./useClipboard-BjTIX-4g.cjs"),Z=require("./Modal--5EbLfMz.cjs"),w=require("./ConfigProvider-DELhJlqo.cjs"),P="_errorState_o523f_4",L="_actions_o523f_9",rr="_fieldErrors_o523f_18",er="_field_o523f_18",tr="_compact_o523f_32",or="_pre_o523f_37",sr="_alertVariant_o523f_53",nr="_alertTitle_o523f_56",lr="_alertBody_o523f_60",ar="_alertActions_o523f_65",t={errorState:P,actions:L,fieldErrors:rr,field:er,compact:tr,pre:or,alertVariant:sr,alertTitle:nr,alertBody:lr,alertActions:ar};function cr({open:I,onClose:o,report:u}){const s=w.useT(),{copy:h,copied:a}=Y.useClipboard();return r.jsx(Z.Modal,{open:I,onClose:o,title:s("errorState.detailsTitle"),icon:"Danger",color:"error",size:"lg",scrollBehavior:"inside",footer:r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"text",color:"primary",onClick:o,children:s("common.close")}),r.jsx(d.Button,{startIcon:r.jsx(_.Icon,{name:a?"CopySuccess":"Copy"}),onClick:()=>void h(u),children:s(a?"clipboard.copied":"clipboard.copy")})]}),children:r.jsx("pre",{className:t.pre,children:u})})}const ir=V.forwardRef(function({error:o,variant:u="alert",title:s,description:h,icon:a,onRetry:c,retrying:m=!1,retryLabel:x,showDetails:C="dev",compact:S=!1,traceId:y,fieldErrors:T,fieldLabels:v,size:R,pattern:G,action:p,className:N,children:k,...A},z){const e=w.useT(),[H,E]=V.useState(!1),f=n.getErrorMessage(o,l=>e("errorState.requestFailed",{status:l})),g=y===!1?void 0:y??n.getErrorTraceId(o),B=T===!1?void 0:T??n.getErrorFieldErrors(o),J=B&&Object.keys(B).length>0?r.jsx("ul",{className:t.fieldErrors,children:Object.entries(B).map(([l,K])=>r.jsxs("li",{children:[r.jsx("span",{className:t.field,children:(v==null?void 0:v[l])??n.humanizeField(l)})," —"," ",K]},l))}):void 0,q=h??J??f??e("errorState.description"),$=a===void 0?n.isNetworkError(o)?"CloudCross":"Danger":a,j=(C==="dev"?n.isDev():C)?n.getErrorDetails(o):void 0,D=n.getErrorStatus(o),i=g!=null||j!=null?[g!=null&&`${e("errorState.traceId")}: ${g}`,D!=null&&`${e("errorState.status")}: ${D}`,f!=null&&(q===f||j!=null)&&`${e("errorState.message")}: ${f}`,j!=null&&`
2
2
  ${j}`].filter(Boolean).join(`
3
3
  `):void 0,F=i!=null?r.jsx(cr,{open:H,onClose:()=>E(!1),report:i}):null;if(u==="alert"){const l=i!=null||c!=null||p!=null?r.jsxs("span",{className:t.alertActions,children:[c!=null&&r.jsx(X.Tooltip,{content:x??e("errorState.retry"),children:r.jsx(W.IconButton,{size:"sm",variant:"text",color:"error","aria-label":typeof x=="string"?x:e("errorState.retry"),loading:m,disabled:m,onClick:c,children:r.jsx(_.Icon,{name:"RefreshArrow2"})})}),i!=null&&r.jsx(d.Button,{size:"sm",variant:"filled",color:"error",onClick:()=>E(!0),children:e("errorState.details")}),p]}):void 0;return r.jsxs(r.Fragment,{children:[r.jsxs(Q.Alert,{ref:z,color:"error",icon:$,action:l,className:b.clsx(t.alertVariant,N),...A,children:[s!=null&&r.jsx("span",{className:t.alertTitle,children:s}),r.jsx("span",{className:t.alertBody,children:q}),k]}),F]})}const M=c!=null?r.jsx(d.Button,{size:"sm",variant:"outlined",color:"primary",startIcon:r.jsx(_.Icon,{name:"RefreshRight"}),loading:m,disabled:m,onClick:c,children:x??e("errorState.retry")}):null,O=i!=null?r.jsx(d.Button,{size:"sm",variant:"text",color:"primary",startIcon:r.jsx(_.Icon,{name:"DocumentText"}),onClick:()=>E(!0),children:e("errorState.details")}):null;return r.jsxs(r.Fragment,{children:[r.jsx(U.EmptyState,{ref:z,role:"alert",color:"error",icon:$,title:s??e("errorState.title"),description:q,size:R??(S?"sm":"md"),pattern:G??!S,action:M||O||p?r.jsxs("span",{className:t.actions,children:[M,O,p]}):void 0,className:b.clsx(t.errorState,S&&t.compact,N),...A,children:k}),F]})});exports.ErrorState=ir;
4
- //# sourceMappingURL=ErrorState-MQBeyF2n.cjs.map
4
+ //# sourceMappingURL=ErrorState-BjEA0VfF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorState-MQBeyF2n.cjs","sources":["../src/components/ErrorState/ErrorDetailsModal.tsx","../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["import { useT } from '../../theme'\nimport { useClipboard } from '../../hooks/useClipboard'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { Modal } from '../Modal'\nimport styles from './ErrorState.module.css'\n\nexport interface ErrorDetailsModalProps {\n open: boolean\n onClose: () => void\n /** The whole report — shown as-is and copied by the Copy button. */\n report: string\n}\n\n/**\n * Internal to `ErrorState`: the \"Details\" dialog — the error report (trace id, status, message, then the stack /\n * raw dump when allowed) in one monospace block, with **Copy** (the whole report, flips to \"Copied!\") and\n * **Close** in the footer, so a user can paste it into a support ticket in one go.\n */\nexport function ErrorDetailsModal({ open, onClose, report }: ErrorDetailsModalProps) {\n const t = useT()\n const { copy, copied } = useClipboard()\n return (\n <Modal\n open={open}\n onClose={onClose}\n title={t('errorState.detailsTitle')}\n icon=\"Danger\"\n color=\"error\"\n size=\"lg\"\n scrollBehavior=\"inside\"\n footer={\n <>\n <Button variant=\"text\" color=\"primary\" onClick={onClose}>\n {t('common.close')}\n </Button>\n <Button\n startIcon={<Icon name={copied ? 'CopySuccess' : 'Copy'} />}\n onClick={() => void copy(report)}\n >\n {copied ? t('clipboard.copied') : t('clipboard.copy')}\n </Button>\n </>\n }\n >\n <pre className={styles.pre}>{report}</pre>\n </Modal>\n )\n}\n","import { forwardRef, useState, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { Alert } from '../Alert'\nimport { Button } from '../Button'\nimport { EmptyState, type EmptyStateProps } from '../EmptyState'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport type { IconName } from '../../icons/names'\nimport {\n getErrorDetails,\n getErrorFieldErrors,\n getErrorMessage,\n getErrorStatus,\n getErrorTraceId,\n humanizeField,\n isNetworkError,\n isDev,\n} from './errorMessage'\nimport { ErrorDetailsModal } from './ErrorDetailsModal'\nimport styles from './ErrorState.module.css'\n\nexport type ErrorStateVariant = 'block' | 'alert'\n\nexport interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title' | 'color'> {\n /**\n * The shape. `'alert'` (default) — a red `Alert` banner: the message (no default title), then Try Again /\n * Details / `action` in the alert's action slot; it fits anywhere — above a form, in a modal, in a card.\n * `'block'` — the `EmptyState`-style block (puck, title, centred message, the buttons below), for an area\n * whose data failed to load, or a whole page (`PageError`). `compact` and `pattern` apply to `'block'` only.\n */\n variant?: ErrorStateVariant\n /**\n * What failed — an `Error`, a string, an axios-style error, a `{ message }` or a raw `{ status }`\n * response. Its message becomes the description (unless `description` is given) and its stack feeds\n * the details panel.\n */\n error?: unknown\n /**\n * Heading. Alert: none unless given — the message is the point. Block: defaults to the localized \"Something\n * Went Wrong\".\n */\n title?: ReactNode\n /**\n * Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in both variants (the alert\n * replaces the Alert's own × icon), or `CloudCross` when the request never got a response (an explicit\n * `status: 0` / network error code), tinted `error`.\n */\n icon?: IconName | ReactNode | false\n /** Adds a \"Try Again\" button that calls this (e.g. a query's `refetch`). */\n onRetry?: () => void\n /**\n * The retry is running (e.g. `query.isFetching`) — the \"Try Again\" button shows its loader and is disabled,\n * so a slow refetch doesn't look like a dead click. Defaults to `false`.\n */\n retrying?: boolean\n /** Retry button label. Defaults to the localized \"Try Again\". */\n retryLabel?: ReactNode\n /**\n * Include the technical dump (the stack, or the raw error as JSON) in the **Details** dialog. `'dev'`\n * (default) only in development builds; `true` always; `false` never. The Details button itself shows\n * whenever there's a trace id or this dump — never inline on the page.\n */\n showDetails?: boolean | 'dev'\n /** The inline variant — small, no hero pattern — for inside a table, card or panel. Defaults to `false`. */\n compact?: boolean\n /**\n * The server's trace id — it matches a report to the server log. It isn't shown on the page: it leads the\n * **Details** dialog (with a copy button), and its presence alone shows the Details button, production\n * included. Defaults to the one on `error` (`error.traceId` / `error.response.data.traceId`); `false` hides it.\n */\n traceId?: string | false\n /**\n * Per-field validation messages (`{ field: message }`), listed as the description when there's no explicit\n * `description`. Defaults to the ones on `error` (`getErrorFieldErrors`: `error.fieldErrors` — an object, a\n * method or a `{ field, message }[]` —, `error.details`, `error.response.data.errors`); `false` hides them. In a form, put them on the inputs instead.\n */\n fieldErrors?: Record<string, string> | false\n /**\n * Labels for the field-error keys (`{ newPassword: 'New Password' }`). A key without one is shown humanized\n * and Title Cased (`newPassword` / `new_password` → \"New Password\"; a dotted path keeps its last segment).\n */\n fieldLabels?: Record<string, ReactNode>\n}\n\n/**\n * The \"it broke\" counterpart of `EmptyState`. By default (`variant=\"alert\"`) a red `Alert` banner with a `Danger`\n * icon: the failure's own message (extracted from an `Error`, a string, an axios-style `response.data.message`, a\n * `{ message }`, or a raw `{ status }` → \"Request failed (404)\"), or a 400's per-field `fieldErrors` list; then\n * **Try Again** (`onRetry`, spinning while `retrying`) and **Details** in its action slot. `variant=\"block\"` is the\n * `EmptyState`-style block (an `error`-tinted puck, a \"Something Went Wrong\" title, the same buttons below);\n * `compact` is its inline size. **Details** opens a dialog with the full report — the server's `traceId`, the\n * status, the message, and the stack in development (`showDetails`) — in one block with a copy button. Announced\n * once (`role=\"alert\"`). `forwardRef` to the root; any other `EmptyState` prop passes through to the block.\n */\nexport const ErrorState = forwardRef<HTMLDivElement, ErrorStateProps>(function ErrorState(\n {\n error,\n variant = 'alert',\n title,\n description,\n icon,\n onRetry,\n retrying = false,\n retryLabel,\n showDetails = 'dev',\n compact = false,\n traceId: traceIdProp,\n fieldErrors: fieldErrorsProp,\n fieldLabels,\n size,\n pattern,\n action,\n className,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const [detailsOpen, setDetailsOpen] = useState(false)\n const message = getErrorMessage(error, (status) => t('errorState.requestFailed', { status }))\n const traceId = traceIdProp === false ? undefined : (traceIdProp ?? getErrorTraceId(error))\n const fieldErrors =\n fieldErrorsProp === false ? undefined : (fieldErrorsProp ?? getErrorFieldErrors(error))\n const fieldErrorList =\n fieldErrors && Object.keys(fieldErrors).length > 0 ? (\n <ul className={styles.fieldErrors}>\n {Object.entries(fieldErrors).map(([field, msg]) => (\n <li key={field}>\n <span className={styles.field}>{fieldLabels?.[field] ?? humanizeField(field)}</span> —{' '}\n {msg}\n </li>\n ))}\n </ul>\n ) : undefined\n const body = description ?? fieldErrorList ?? message ?? t('errorState.description')\n const resolvedIcon = icon === undefined ? (isNetworkError(error) ? 'CloudCross' : 'Danger') : icon\n\n // the \"Details\" report — trace id, status, message, then the stack / raw dump (dev only by default). The\n // button shows when there's something worth opening: a trace id (always — it's what support asks for) or\n // the technical dump.\n const technical = (showDetails === 'dev' ? isDev() : showDetails)\n ? getErrorDetails(error)\n : undefined\n const status = getErrorStatus(error)\n const report =\n traceId != null || technical != null\n ? [\n traceId != null && `${t('errorState.traceId')}: ${traceId}`,\n status != null && `${t('errorState.status')}: ${status}`,\n // the raw message only where it's already visible, or with the dev dump — a `description` /\n // `fallback` (or PageError) hides it on purpose\n message != null &&\n (body === message || technical != null) &&\n `${t('errorState.message')}: ${message}`,\n technical != null && `\\n${technical}`,\n ]\n .filter(Boolean)\n .join('\\n')\n : undefined\n const detailsModal =\n report != null ? (\n <ErrorDetailsModal open={detailsOpen} onClose={() => setDetailsOpen(false)} report={report} />\n ) : null\n\n // ── alert (default): a banner — the message, then Try Again / Details / action in the action slot ──\n if (variant === 'alert') {\n const alertActions =\n report != null || onRetry != null || action != null ? (\n <span className={styles.alertActions}>\n {/* an icon-only retry (tooltip + aria-label) keeps the slot narrow, so the message keeps its room on\n small screens */}\n {onRetry != null && (\n <Tooltip content={retryLabel ?? t('errorState.retry')}>\n <IconButton\n size=\"sm\"\n variant=\"text\"\n color=\"error\"\n aria-label={typeof retryLabel === 'string' ? retryLabel : t('errorState.retry')}\n loading={retrying}\n disabled={retrying}\n onClick={onRetry}\n >\n <Icon name=\"RefreshArrow2\" />\n </IconButton>\n </Tooltip>\n )}\n {report != null && (\n <Button size=\"sm\" variant=\"filled\" color=\"error\" onClick={() => setDetailsOpen(true)}>\n {t('errorState.details')}\n </Button>\n )}\n {action}\n </span>\n ) : undefined\n return (\n <>\n <Alert\n ref={ref}\n color=\"error\"\n icon={resolvedIcon}\n action={alertActions}\n className={clsx(styles.alertVariant, className)}\n {...props}\n >\n {title != null && <span className={styles.alertTitle}>{title}</span>}\n <span className={styles.alertBody}>{body}</span>\n {children}\n </Alert>\n {detailsModal}\n </>\n )\n }\n\n // ── block: the EmptyState-style hero / compact block ──\n const retry =\n onRetry != null ? (\n <Button\n size=\"sm\"\n variant=\"outlined\"\n color=\"primary\"\n startIcon={<Icon name=\"RefreshRight\" />}\n loading={retrying}\n disabled={retrying}\n onClick={onRetry}\n >\n {retryLabel ?? t('errorState.retry')}\n </Button>\n ) : null\n const detailsButton =\n report != null ? (\n <Button\n size=\"sm\"\n variant=\"text\"\n color=\"primary\"\n startIcon={<Icon name=\"DocumentText\" />}\n onClick={() => setDetailsOpen(true)}\n >\n {t('errorState.details')}\n </Button>\n ) : null\n\n return (\n <>\n <EmptyState\n ref={ref}\n // one announcement, assertive: an error is what the user needs to know now (role=\"alert\" already\n // implies aria-live=\"assertive\" — pairing it with \"polite\" was contradictory)\n role=\"alert\"\n color=\"error\"\n icon={resolvedIcon}\n title={title ?? t('errorState.title')}\n // a 400's message is the generic \"validation errors occurred\" — the per-field list is the useful part\n description={body}\n size={size ?? (compact ? 'sm' : 'md')}\n pattern={pattern ?? !compact}\n action={\n retry || detailsButton || action ? (\n <span className={styles.actions}>\n {retry}\n {detailsButton}\n {action}\n </span>\n ) : undefined\n }\n className={clsx(styles.errorState, compact && styles.compact, className)}\n {...props}\n >\n {children}\n </EmptyState>\n {detailsModal}\n </>\n )\n})\n"],"names":["ErrorDetailsModal","open","onClose","report","t","useT","copy","copied","useClipboard","jsx","Modal","jsxs","Fragment","Button","Icon","styles","ErrorState","forwardRef","error","variant","title","description","icon","onRetry","retrying","retryLabel","showDetails","compact","traceIdProp","fieldErrorsProp","fieldLabels","size","pattern","action","className","children","props","ref","detailsOpen","setDetailsOpen","useState","message","getErrorMessage","status","traceId","getErrorTraceId","fieldErrors","getErrorFieldErrors","fieldErrorList","field","msg","humanizeField","body","resolvedIcon","isNetworkError","technical","isDev","getErrorDetails","getErrorStatus","detailsModal","alertActions","Tooltip","IconButton","Alert","clsx","retry","detailsButton","EmptyState"],"mappings":"g0BAmBO,SAASA,GAAkB,CAAE,KAAAC,EAAM,QAAAC,EAAS,OAAAC,GAAkC,CACnF,MAAMC,EAAIC,EAAAA,KAAA,EACJ,CAAE,KAAAC,EAAM,OAAAC,CAAA,EAAWC,eAAA,EACzB,OACEC,EAAAA,IAACC,EAAAA,MAAA,CACC,KAAAT,EACA,QAAAC,EACA,MAAOE,EAAE,yBAAyB,EAClC,KAAK,SACL,MAAM,QACN,KAAK,KACL,eAAe,SACf,OACEO,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAH,EAAAA,IAACI,EAAAA,OAAA,CAAO,QAAQ,OAAO,MAAM,UAAU,QAASX,EAC7C,SAAAE,EAAE,cAAc,CAAA,CACnB,EACAK,E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B,EAAE,kBAAkB,EAEpC,YAAagD,EACb,KAAMrB,IAASJ,EAAU,KAAO,MAChC,QAASK,GAAW,CAACL,EACrB,OACEsC,GAASC,GAAiBjC,SACvB,OAAA,CAAK,UAAWlB,EAAO,QACrB,SAAA,CAAAkD,EACAC,EACAjC,CAAA,CAAA,CACH,EACE,OAEN,UAAW+B,EAAAA,KAAKjD,EAAO,WAAYY,GAAWZ,EAAO,QAASmB,CAAS,EACtE,GAAGE,EAEH,SAAAD,CAAA,CAAA,EAEFwB,CAAA,EACH,CAEJ,CAAC"}
1
+ {"version":3,"file":"ErrorState-BjEA0VfF.cjs","sources":["../src/components/ErrorState/ErrorDetailsModal.tsx","../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["import { useT } from '../../theme'\nimport { useClipboard } from '../../hooks/useClipboard'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { Modal } from '../Modal'\nimport styles from './ErrorState.module.css'\n\nexport interface ErrorDetailsModalProps {\n open: boolean\n onClose: () => void\n /** The whole report — shown as-is and copied by the Copy button. */\n report: string\n}\n\n/**\n * Internal to `ErrorState`: the \"Details\" dialog — the error report (trace id, status, message, then the stack /\n * raw dump when allowed) in one monospace block, with **Copy** (the whole report, flips to \"Copied!\") and\n * **Close** in the footer, so a user can paste it into a support ticket in one go.\n */\nexport function ErrorDetailsModal({ open, onClose, report }: ErrorDetailsModalProps) {\n const t = useT()\n const { copy, copied } = useClipboard()\n return (\n <Modal\n open={open}\n onClose={onClose}\n title={t('errorState.detailsTitle')}\n icon=\"Danger\"\n color=\"error\"\n size=\"lg\"\n scrollBehavior=\"inside\"\n footer={\n <>\n <Button variant=\"text\" color=\"primary\" onClick={onClose}>\n {t('common.close')}\n </Button>\n <Button\n startIcon={<Icon name={copied ? 'CopySuccess' : 'Copy'} />}\n onClick={() => void copy(report)}\n >\n {copied ? t('clipboard.copied') : t('clipboard.copy')}\n </Button>\n </>\n }\n >\n <pre className={styles.pre}>{report}</pre>\n </Modal>\n )\n}\n","import { forwardRef, useState, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { Alert } from '../Alert'\nimport { Button } from '../Button'\nimport { EmptyState, type EmptyStateProps } from '../EmptyState'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport type { IconName } from '../../icons/names'\nimport {\n getErrorDetails,\n getErrorFieldErrors,\n getErrorMessage,\n getErrorStatus,\n getErrorTraceId,\n humanizeField,\n isNetworkError,\n isDev,\n} from './errorMessage'\nimport { ErrorDetailsModal } from './ErrorDetailsModal'\nimport styles from './ErrorState.module.css'\n\nexport type ErrorStateVariant = 'block' | 'alert'\n\nexport interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title' | 'color'> {\n /**\n * The shape. `'alert'` (default) — a red `Alert` banner: the message (no default title), then Try Again /\n * Details / `action` in the alert's action slot; it fits anywhere — above a form, in a modal, in a card.\n * `'block'` — the `EmptyState`-style block (puck, title, centred message, the buttons below), for an area\n * whose data failed to load, or a whole page (`PageError`). `compact` and `pattern` apply to `'block'` only.\n */\n variant?: ErrorStateVariant\n /**\n * What failed — an `Error`, a string, an axios-style error, a `{ message }` or a raw `{ status }`\n * response. Its message becomes the description (unless `description` is given) and its stack feeds\n * the details panel.\n */\n error?: unknown\n /**\n * Heading. Alert: none unless given — the message is the point. Block: defaults to the localized \"Something\n * Went Wrong\".\n */\n title?: ReactNode\n /**\n * Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in both variants (the alert\n * replaces the Alert's own × icon), or `CloudCross` when the request never got a response (an explicit\n * `status: 0` / network error code), tinted `error`.\n */\n icon?: IconName | ReactNode | false\n /** Adds a \"Try Again\" button that calls this (e.g. a query's `refetch`). */\n onRetry?: () => void\n /**\n * The retry is running (e.g. `query.isFetching`) — the \"Try Again\" button shows its loader and is disabled,\n * so a slow refetch doesn't look like a dead click. Defaults to `false`.\n */\n retrying?: boolean\n /** Retry button label. Defaults to the localized \"Try Again\". */\n retryLabel?: ReactNode\n /**\n * Include the technical dump (the stack, or the raw error as JSON) in the **Details** dialog. `'dev'`\n * (default) only in development builds; `true` always; `false` never. The Details button itself shows\n * whenever there's a trace id or this dump — never inline on the page.\n */\n showDetails?: boolean | 'dev'\n /** The inline variant — small, no hero pattern — for inside a table, card or panel. Defaults to `false`. */\n compact?: boolean\n /**\n * The server's trace id — it matches a report to the server log. It isn't shown on the page: it leads the\n * **Details** dialog (with a copy button), and its presence alone shows the Details button, production\n * included. Defaults to the one on `error` (`error.traceId` / `error.response.data.traceId`); `false` hides it.\n */\n traceId?: string | false\n /**\n * Per-field validation messages (`{ field: message }`), listed as the description when there's no explicit\n * `description`. Defaults to the ones on `error` (`getErrorFieldErrors`: `error.fieldErrors` — an object, a\n * method or a `{ field, message }[]` —, `error.details`, `error.response.data.errors`); `false` hides them. In a form, put them on the inputs instead.\n */\n fieldErrors?: Record<string, string> | false\n /**\n * Labels for the field-error keys (`{ newPassword: 'New Password' }`). A key without one is shown humanized\n * and Title Cased (`newPassword` / `new_password` → \"New Password\"; a dotted path keeps its last segment).\n */\n fieldLabels?: Record<string, ReactNode>\n}\n\n/**\n * The \"it broke\" counterpart of `EmptyState`. By default (`variant=\"alert\"`) a red `Alert` banner with a `Danger`\n * icon: the failure's own message (extracted from an `Error`, a string, an axios-style `response.data.message`, a\n * `{ message }`, or a raw `{ status }` → \"Request failed (404)\"), or a 400's per-field `fieldErrors` list; then\n * **Try Again** (`onRetry`, spinning while `retrying`) and **Details** in its action slot. `variant=\"block\"` is the\n * `EmptyState`-style block (an `error`-tinted puck, a \"Something Went Wrong\" title, the same buttons below);\n * `compact` is its inline size. **Details** opens a dialog with the full report — the server's `traceId`, the\n * status, the message, and the stack in development (`showDetails`) — in one block with a copy button. Announced\n * once (`role=\"alert\"`). `forwardRef` to the root; any other `EmptyState` prop passes through to the block.\n */\nexport const ErrorState = forwardRef<HTMLDivElement, ErrorStateProps>(function ErrorState(\n {\n error,\n variant = 'alert',\n title,\n description,\n icon,\n onRetry,\n retrying = false,\n retryLabel,\n showDetails = 'dev',\n compact = false,\n traceId: traceIdProp,\n fieldErrors: fieldErrorsProp,\n fieldLabels,\n size,\n pattern,\n action,\n className,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const [detailsOpen, setDetailsOpen] = useState(false)\n const message = getErrorMessage(error, (status) => t('errorState.requestFailed', { status }))\n const traceId = traceIdProp === false ? undefined : (traceIdProp ?? getErrorTraceId(error))\n const fieldErrors =\n fieldErrorsProp === false ? undefined : (fieldErrorsProp ?? getErrorFieldErrors(error))\n const fieldErrorList =\n fieldErrors && Object.keys(fieldErrors).length > 0 ? (\n <ul className={styles.fieldErrors}>\n {Object.entries(fieldErrors).map(([field, msg]) => (\n <li key={field}>\n <span className={styles.field}>{fieldLabels?.[field] ?? humanizeField(field)}</span> —{' '}\n {msg}\n </li>\n ))}\n </ul>\n ) : undefined\n const body = description ?? fieldErrorList ?? message ?? t('errorState.description')\n const resolvedIcon = icon === undefined ? (isNetworkError(error) ? 'CloudCross' : 'Danger') : icon\n\n // the \"Details\" report — trace id, status, message, then the stack / raw dump (dev only by default). The\n // button shows when there's something worth opening: a trace id (always — it's what support asks for) or\n // the technical dump.\n const technical = (showDetails === 'dev' ? isDev() : showDetails)\n ? getErrorDetails(error)\n : undefined\n const status = getErrorStatus(error)\n const report =\n traceId != null || technical != null\n ? [\n traceId != null && `${t('errorState.traceId')}: ${traceId}`,\n status != null && `${t('errorState.status')}: ${status}`,\n // the raw message only where it's already visible, or with the dev dump — a `description` /\n // `fallback` (or PageError) hides it on purpose\n message != null &&\n (body === message || technical != null) &&\n `${t('errorState.message')}: ${message}`,\n technical != null && `\\n${technical}`,\n ]\n .filter(Boolean)\n .join('\\n')\n : undefined\n const detailsModal =\n report != null ? (\n <ErrorDetailsModal open={detailsOpen} onClose={() => setDetailsOpen(false)} report={report} />\n ) : null\n\n // ── alert (default): a banner — the message, then Try Again / Details / action in the action slot ──\n if (variant === 'alert') {\n const alertActions =\n report != null || onRetry != null || action != null ? (\n <span className={styles.alertActions}>\n {/* an icon-only retry (tooltip + aria-label) keeps the slot narrow, so the message keeps its room on\n small screens */}\n {onRetry != null && (\n <Tooltip content={retryLabel ?? t('errorState.retry')}>\n <IconButton\n size=\"sm\"\n variant=\"text\"\n color=\"error\"\n aria-label={typeof retryLabel === 'string' ? retryLabel : t('errorState.retry')}\n loading={retrying}\n disabled={retrying}\n onClick={onRetry}\n >\n <Icon name=\"RefreshArrow2\" />\n </IconButton>\n </Tooltip>\n )}\n {report != null && (\n <Button size=\"sm\" variant=\"filled\" color=\"error\" onClick={() => setDetailsOpen(true)}>\n {t('errorState.details')}\n </Button>\n )}\n {action}\n </span>\n ) : undefined\n return (\n <>\n <Alert\n ref={ref}\n color=\"error\"\n icon={resolvedIcon}\n action={alertActions}\n className={clsx(styles.alertVariant, className)}\n {...props}\n >\n {title != null && <span className={styles.alertTitle}>{title}</span>}\n <span className={styles.alertBody}>{body}</span>\n {children}\n </Alert>\n {detailsModal}\n </>\n )\n }\n\n // ── block: the EmptyState-style hero / compact block ──\n const retry =\n onRetry != null ? (\n <Button\n size=\"sm\"\n variant=\"outlined\"\n color=\"primary\"\n startIcon={<Icon name=\"RefreshRight\" />}\n loading={retrying}\n disabled={retrying}\n onClick={onRetry}\n >\n {retryLabel ?? t('errorState.retry')}\n </Button>\n ) : null\n const detailsButton =\n report != null ? (\n <Button\n size=\"sm\"\n variant=\"text\"\n color=\"primary\"\n startIcon={<Icon name=\"DocumentText\" />}\n onClick={() => setDetailsOpen(true)}\n >\n {t('errorState.details')}\n </Button>\n ) : null\n\n return (\n <>\n <EmptyState\n ref={ref}\n // one announcement, assertive: an error is what the user needs to know now (role=\"alert\" already\n // implies aria-live=\"assertive\" — pairing it with \"polite\" was contradictory)\n role=\"alert\"\n color=\"error\"\n icon={resolvedIcon}\n title={title ?? t('errorState.title')}\n // a 400's message is the generic \"validation errors occurred\" — the per-field list is the useful part\n description={body}\n size={size ?? (compact ? 'sm' : 'md')}\n pattern={pattern ?? !compact}\n action={\n retry || detailsButton || action ? (\n <span className={styles.actions}>\n {retry}\n {detailsButton}\n {action}\n </span>\n ) : undefined\n }\n className={clsx(styles.errorState, compact && styles.compact, className)}\n {...props}\n >\n {children}\n </EmptyState>\n {detailsModal}\n </>\n )\n})\n"],"names":["ErrorDetailsModal","open","onClose","report","t","useT","copy","copied","useClipboard","jsx","Modal","jsxs","Fragment","Button","Icon","styles","ErrorState","forwardRef","error","variant","title","description","icon","onRetry","retrying","retryLabel","showDetails","compact","traceIdProp","fieldErrorsProp","fieldLabels","size","pattern","action","className","children","props","ref","detailsOpen","setDetailsOpen","useState","message","getErrorMessage","status","traceId","getErrorTraceId","fieldErrors","getErrorFieldErrors","fieldErrorList","field","msg","humanizeField","body","resolvedIcon","isNetworkError","technical","isDev","getErrorDetails","getErrorStatus","detailsModal","alertActions","Tooltip","IconButton","Alert","clsx","retry","detailsButton","EmptyState"],"mappings":"g0BAmBO,SAASA,GAAkB,CAAE,KAAAC,EAAM,QAAAC,EAAS,OAAAC,GAAkC,CACnF,MAAMC,EAAIC,EAAAA,KAAA,EACJ,CAAE,KAAAC,EAAM,OAAAC,CAAA,EAAWC,eAAA,EACzB,OACEC,EAAAA,IAACC,EAAAA,MAAA,CACC,KAAAT,EACA,QAAAC,EACA,MAAOE,EAAE,yBAAyB,EAClC,KAAK,SACL,MAAM,QACN,KAAK,KACL,eAAe,SACf,OACEO,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAH,EAAAA,IAACI,EAAAA,OAAA,CAAO,QAAQ,OAAO,MAAM,UAAU,QAASX,EAC7C,SAAAE,EAAE,cAAc,CAAA,CACnB,EACAK,EAAAA,IAACI,EAAAA,OAAA,CACC,UAAWJ,EAAAA,IAACK,OAAA,CAAK,KAAMP,EAAS,cAAgB,OAAQ,EACxD,QAAS,IAAM,KAAKD,EAAKH,CAAM,EAE9B,SAASC,EAATG,EAAW,mBAAwB,gBAAN,CAAs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EACAjC,CAAA,CAAA,CACH,EACE,OAEN,UAAW+B,EAAAA,KAAKjD,EAAO,WAAYY,GAAWZ,EAAO,QAASmB,CAAS,EACtE,GAAGE,EAEH,SAAAD,CAAA,CAAA,EAEFwB,CAAA,EACH,CAEJ,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { jsx as r, jsxs as s, Fragment as T } from "react/jsx-runtime";
2
2
  import { forwardRef as R, useState as U } from "react";
3
3
  import { clsx as w } from "clsx";
4
- import { A as W } from "./Alert-CtUr-0s8.js";
5
- import { B as d } from "./Button-Bst_NtPJ.js";
6
- import { E as X } from "./EmptyState-BCoPw8jf.js";
4
+ import { A as W } from "./Alert-Dz0sNGpz.js";
5
+ import { B as d } from "./Button-CjsnB8gX.js";
6
+ import { E as X } from "./EmptyState-BlmQtbSs.js";
7
7
  import { b as S } from "./Icon-D5TxgfCc.js";
8
- import { I as Y } from "./IconButton-06pmftMo.js";
8
+ import { I as Y } from "./IconButton-t1OhAMNc.js";
9
9
  import { T as Z } from "./Tooltip-BbT0uNzy.js";
10
10
  import { b as P, d as L, a as rr, h as tr, i as er, f as or, g as ar, c as lr } from "./errorMessage-C83fB2h5.js";
11
11
  import { u as sr } from "./useClipboard-CEw_Juiq.js";
12
- import { M as nr } from "./Modal-DTnB_mGg.js";
13
- import { a as q } from "./ConfigProvider-DeMASTVo.js";
12
+ import { M as nr } from "./Modal-Dfwc9eIq.js";
13
+ import { a as q } from "./ConfigProvider-Bgu85MsI.js";
14
14
  const ir = "_errorState_o523f_4", cr = "_actions_o523f_9", dr = "_fieldErrors_o523f_18", mr = "_field_o523f_18", fr = "_compact_o523f_32", pr = "_pre_o523f_37", ur = "_alertVariant_o523f_53", _r = "_alertTitle_o523f_56", hr = "_alertBody_o523f_60", Sr = "_alertActions_o523f_65", e = {
15
15
  errorState: ir,
16
16
  actions: cr,
@@ -175,4 +175,4 @@ ${h}`
175
175
  export {
176
176
  Dr as E
177
177
  };
178
- //# sourceMappingURL=ErrorState-DI28ZCJN.js.map
178
+ //# sourceMappingURL=ErrorState-Hfd_0MeE.js.map