@alfadocs/ui-kit-debug 1.38.0 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/dist/_chunks/{actions-cell-renderer-CUn1pqEq.js → actions-cell-renderer-BXBy9c0f.js} +3 -3
  2. package/dist/_chunks/{actions-cell-renderer-CUn1pqEq.js.map → actions-cell-renderer-BXBy9c0f.js.map} +1 -1
  3. package/dist/_chunks/{agenda-tray-CG6jUjKc.js → agenda-tray-CBaJASb5.js} +3 -3
  4. package/dist/_chunks/{agenda-tray-CG6jUjKc.js.map → agenda-tray-CBaJASb5.js.map} +1 -1
  5. package/dist/_chunks/{ai-consent-banner-De4gzSBZ.js → ai-consent-banner-D7I2U-cz.js} +37 -36
  6. package/dist/_chunks/ai-consent-banner-D7I2U-cz.js.map +1 -0
  7. package/dist/_chunks/{ai-prompt-input-DdxlaI7q.js → ai-prompt-input-DXknpQCB.js} +2 -2
  8. package/dist/_chunks/{ai-prompt-input-DdxlaI7q.js.map → ai-prompt-input-DXknpQCB.js.map} +1 -1
  9. package/dist/_chunks/{alia-sidebar-B6bXlZZk.js → alia-sidebar-CUqaJNPQ.js} +7 -7
  10. package/dist/_chunks/{alia-sidebar-B6bXlZZk.js.map → alia-sidebar-CUqaJNPQ.js.map} +1 -1
  11. package/dist/_chunks/{anamnesis-card-DGwINeNn.js → anamnesis-card-xtEhyojD.js} +2 -2
  12. package/dist/_chunks/{anamnesis-card-DGwINeNn.js.map → anamnesis-card-xtEhyojD.js.map} +1 -1
  13. package/dist/_chunks/{anamnesis-summary-rows-Cxtgo2ok.js → anamnesis-summary-rows-DQUqwWc1.js} +7 -7
  14. package/dist/_chunks/{anamnesis-summary-rows-Cxtgo2ok.js.map → anamnesis-summary-rows-DQUqwWc1.js.map} +1 -1
  15. package/dist/_chunks/{appointment-card-WsDGBBut.js → appointment-card-TgR_2GKS.js} +134 -102
  16. package/dist/_chunks/appointment-card-TgR_2GKS.js.map +1 -0
  17. package/dist/_chunks/{appointment-peek-5S4O1VQP.js → appointment-peek-abiR0T9e.js} +3 -3
  18. package/dist/_chunks/{appointment-peek-5S4O1VQP.js.map → appointment-peek-abiR0T9e.js.map} +1 -1
  19. package/dist/_chunks/{appointment-timeline-D-rNwKpS.js → appointment-timeline-CCnyUYKz.js} +67 -63
  20. package/dist/_chunks/appointment-timeline-CCnyUYKz.js.map +1 -0
  21. package/dist/_chunks/{appointment-tray-CK2CULg_.js → appointment-tray-N0yEI8UF.js} +4 -4
  22. package/dist/_chunks/{appointment-tray-CK2CULg_.js.map → appointment-tray-N0yEI8UF.js.map} +1 -1
  23. package/dist/_chunks/{audio-recorder-BlQBC7N_.js → audio-recorder-B7dT-Y3v.js} +3 -3
  24. package/dist/_chunks/{audio-recorder-BlQBC7N_.js.map → audio-recorder-B7dT-Y3v.js.map} +1 -1
  25. package/dist/_chunks/{balance-badge-cell-DHs5p0bA.js → balance-badge-cell-o6LldMUA.js} +5 -5
  26. package/dist/_chunks/{balance-badge-cell-DHs5p0bA.js.map → balance-badge-cell-o6LldMUA.js.map} +1 -1
  27. package/dist/_chunks/{bishop-score-D5b8tktp.js → bishop-score-Cu70iv9C.js} +2 -2
  28. package/dist/_chunks/{bishop-score-D5b8tktp.js.map → bishop-score-Cu70iv9C.js.map} +1 -1
  29. package/dist/_chunks/{bmi-calculator-dOKP-vW4.js → bmi-calculator-C9N19aLX.js} +2 -2
  30. package/dist/_chunks/{bmi-calculator-dOKP-vW4.js.map → bmi-calculator-C9N19aLX.js.map} +1 -1
  31. package/dist/_chunks/{booking-x3J7sS2G.js → booking-D43ASl8y.js} +1110 -1104
  32. package/dist/_chunks/booking-D43ASl8y.js.map +1 -0
  33. package/dist/_chunks/{button-nJaPh_HC.js → button-CaUe1uyd.js} +11 -7
  34. package/dist/_chunks/button-CaUe1uyd.js.map +1 -0
  35. package/dist/_chunks/{button-group-QmN1VdUW.js → button-group-R32U7SyV.js} +2 -2
  36. package/dist/_chunks/{button-group-QmN1VdUW.js.map → button-group-R32U7SyV.js.map} +1 -1
  37. package/dist/_chunks/{calendar-7GAUlsNO.js → calendar-ChJQzRw-.js} +2 -2
  38. package/dist/_chunks/{calendar-7GAUlsNO.js.map → calendar-ChJQzRw-.js.map} +1 -1
  39. package/dist/_chunks/calendar-workspace-SN23GsXX.js +11378 -0
  40. package/dist/_chunks/calendar-workspace-SN23GsXX.js.map +1 -0
  41. package/dist/_chunks/{care-plan-card-COFOI-fI.js → care-plan-card-BOv0NRle.js} +3 -3
  42. package/dist/_chunks/{care-plan-card-COFOI-fI.js.map → care-plan-card-BOv0NRle.js.map} +1 -1
  43. package/dist/_chunks/{care-plan-entry-card-BOKn0KW-.js → care-plan-entry-card-d-rZD4li.js} +3 -3
  44. package/dist/_chunks/{care-plan-entry-card-BOKn0KW-.js.map → care-plan-entry-card-d-rZD4li.js.map} +1 -1
  45. package/dist/_chunks/{care-plan-header-CbuOuVBw.js → care-plan-header-CEmBXn6-.js} +2 -2
  46. package/dist/_chunks/{care-plan-header-CbuOuVBw.js.map → care-plan-header-CEmBXn6-.js.map} +1 -1
  47. package/dist/_chunks/{carousel.agent-Dv4a4M8L.js → carousel.agent-z1yLBpyC.js} +2 -2
  48. package/dist/_chunks/{carousel.agent-Dv4a4M8L.js.map → carousel.agent-z1yLBpyC.js.map} +1 -1
  49. package/dist/_chunks/{chart-iWl76PXv.js → chart-PF2krCZC.js} +3 -3
  50. package/dist/_chunks/{chart-iWl76PXv.js.map → chart-PF2krCZC.js.map} +1 -1
  51. package/dist/_chunks/{chat-input-qM5QpUSq.js → chat-input-Cj7ZYQr5.js} +2 -2
  52. package/dist/_chunks/{chat-input-qM5QpUSq.js.map → chat-input-Cj7ZYQr5.js.map} +1 -1
  53. package/dist/_chunks/{chat-message-RniXtrCH.js → chat-message-BMVxiUIX.js} +3 -3
  54. package/dist/_chunks/{chat-message-RniXtrCH.js.map → chat-message-BMVxiUIX.js.map} +1 -1
  55. package/dist/_chunks/{code-block-uVjNSI9g.js → code-block-BB-viuTn.js} +2 -2
  56. package/dist/_chunks/{code-block-uVjNSI9g.js.map → code-block-BB-viuTn.js.map} +1 -1
  57. package/dist/_chunks/{connection-status-OEsWjmRk.js → connection-status-BmA9T0UO.js} +3 -3
  58. package/dist/_chunks/{connection-status-OEsWjmRk.js.map → connection-status-BmA9T0UO.js.map} +1 -1
  59. package/dist/_chunks/{contact-profile-card--My1H2UD.js → contact-profile-card-Zt6WNg1u.js} +2 -2
  60. package/dist/_chunks/{contact-profile-card--My1H2UD.js.map → contact-profile-card-Zt6WNg1u.js.map} +1 -1
  61. package/dist/_chunks/{control-room-rail-DQoHdE1U.js → control-room-rail-CnNZusR5.js} +3 -3
  62. package/dist/_chunks/{control-room-rail-DQoHdE1U.js.map → control-room-rail-CnNZusR5.js.map} +1 -1
  63. package/dist/_chunks/{copy-field-fYKpl6aN.js → copy-field-B8XRVmQv.js} +2 -2
  64. package/dist/_chunks/{copy-field-fYKpl6aN.js.map → copy-field-B8XRVmQv.js.map} +1 -1
  65. package/dist/_chunks/credit-card-D9XZsHGA.js +15 -0
  66. package/dist/_chunks/credit-card-D9XZsHGA.js.map +1 -0
  67. package/dist/_chunks/{cycle-calculator-BJeaXiZv.js → cycle-calculator-BH2StWoT.js} +2 -2
  68. package/dist/_chunks/{cycle-calculator-BJeaXiZv.js.map → cycle-calculator-BH2StWoT.js.map} +1 -1
  69. package/dist/_chunks/{dashboard-grid-B23BFzRl.js → dashboard-grid-BcXWL5S9.js} +2 -2
  70. package/dist/_chunks/{dashboard-grid-B23BFzRl.js.map → dashboard-grid-BcXWL5S9.js.map} +1 -1
  71. package/dist/_chunks/{data-table-Dy1lyumT.js → data-table-CcAx_I1w.js} +6 -6
  72. package/dist/_chunks/{data-table-Dy1lyumT.js.map → data-table-CcAx_I1w.js.map} +1 -1
  73. package/dist/_chunks/{data-table-tabs-BMR0zsVQ.js → data-table-tabs-B9SXA5VP.js} +3 -3
  74. package/dist/_chunks/{data-table-tabs-BMR0zsVQ.js.map → data-table-tabs-B9SXA5VP.js.map} +1 -1
  75. package/dist/_chunks/{description-list-C1RXMDZ_.js → description-list-BsJ_6CQE.js} +2 -2
  76. package/dist/_chunks/{description-list-C1RXMDZ_.js.map → description-list-BsJ_6CQE.js.map} +1 -1
  77. package/dist/_chunks/{document-preview-DsEyRcNd.js → document-preview-COV0BC6n.js} +2 -2
  78. package/dist/_chunks/{document-preview-DsEyRcNd.js.map → document-preview-COV0BC6n.js.map} +1 -1
  79. package/dist/_chunks/{document-scanner-CbWVtm7u.js → document-scanner-B1abl-A4.js} +2 -2
  80. package/dist/_chunks/{document-scanner-CbWVtm7u.js.map → document-scanner-B1abl-A4.js.map} +1 -1
  81. package/dist/_chunks/{due-date-calculator-Dhc9Ljkb.js → due-date-calculator-Buh_mVHq.js} +2 -2
  82. package/dist/_chunks/{due-date-calculator-Dhc9Ljkb.js.map → due-date-calculator-Buh_mVHq.js.map} +1 -1
  83. package/dist/_chunks/{editable-currency-cell-renderer-D7blbDFY.js → editable-currency-cell-renderer-Psb6XKHR.js} +3 -3
  84. package/dist/_chunks/{editable-currency-cell-renderer-D7blbDFY.js.map → editable-currency-cell-renderer-Psb6XKHR.js.map} +1 -1
  85. package/dist/_chunks/{editable-description-7ptNpJEg.js → editable-description-ADMVFPUz.js} +3 -3
  86. package/dist/_chunks/{editable-description-7ptNpJEg.js.map → editable-description-ADMVFPUz.js.map} +1 -1
  87. package/dist/_chunks/{editor-overlay-8fKAcRsm.js → editor-overlay-9tcPXNWt.js} +2 -2
  88. package/dist/_chunks/{editor-overlay-8fKAcRsm.js.map → editor-overlay-9tcPXNWt.js.map} +1 -1
  89. package/dist/_chunks/{empty-state-X0sVPfVo.js → empty-state-BUN_UAWf.js} +2 -2
  90. package/dist/_chunks/{empty-state-X0sVPfVo.js.map → empty-state-BUN_UAWf.js.map} +1 -1
  91. package/dist/_chunks/{entity-summary-BbW0mIzU.js → entity-summary-DXejuQ8i.js} +3 -3
  92. package/dist/_chunks/{entity-summary-BbW0mIzU.js.map → entity-summary-DXejuQ8i.js.map} +1 -1
  93. package/dist/_chunks/{error-boundary-ayXFCcq4.js → error-boundary-BNT2iQ1w.js} +2 -2
  94. package/dist/_chunks/{error-boundary-ayXFCcq4.js.map → error-boundary-BNT2iQ1w.js.map} +1 -1
  95. package/dist/_chunks/{face-scheme-uFvhqz6h.js → face-scheme-Dg6ZyLKb.js} +5 -5
  96. package/dist/_chunks/{face-scheme-uFvhqz6h.js.map → face-scheme-Dg6ZyLKb.js.map} +1 -1
  97. package/dist/_chunks/{fetal-weight-C6SxchOv.js → fetal-weight-wx4ycKc6.js} +2 -2
  98. package/dist/_chunks/{fetal-weight-C6SxchOv.js.map → fetal-weight-wx4ycKc6.js.map} +1 -1
  99. package/dist/_chunks/{field-array-C9dmRaIM.js → field-array-BW9KeeXG.js} +3 -3
  100. package/dist/_chunks/{field-array-C9dmRaIM.js.map → field-array-BW9KeeXG.js.map} +1 -1
  101. package/dist/_chunks/{file-manager-UlcYQv8n.js → file-manager-BfLQxF5t.js} +136 -150
  102. package/dist/_chunks/file-manager-BfLQxF5t.js.map +1 -0
  103. package/dist/_chunks/{finished-terminal-Br61Ip4e.js → finished-terminal-DJd7Z_po.js} +2 -2
  104. package/dist/_chunks/{finished-terminal-Br61Ip4e.js.map → finished-terminal-DJd7Z_po.js.map} +1 -1
  105. package/dist/_chunks/{fiscal-code-input-CkwIdB1y.js → fiscal-code-input-ODQRd_Sw.js} +2 -2
  106. package/dist/_chunks/{fiscal-code-input-CkwIdB1y.js.map → fiscal-code-input-ODQRd_Sw.js.map} +1 -1
  107. package/dist/_chunks/folder-BghC8_S2.js +20 -0
  108. package/dist/_chunks/folder-BghC8_S2.js.map +1 -0
  109. package/dist/_chunks/{freemium-paywall-BqGk_SBU.js → freemium-paywall-Cz-O9lQD.js} +2 -2
  110. package/dist/_chunks/{freemium-paywall-BqGk_SBU.js.map → freemium-paywall-Cz-O9lQD.js.map} +1 -1
  111. package/dist/_chunks/{gestational-age-calculator-DDOGaPvg.js → gestational-age-calculator-CwbecTul.js} +2 -2
  112. package/dist/_chunks/{gestational-age-calculator-DDOGaPvg.js.map → gestational-age-calculator-CwbecTul.js.map} +1 -1
  113. package/dist/_chunks/{hcg-doubling-Bb_n6tEa.js → hcg-doubling-BcXriXJe.js} +2 -2
  114. package/dist/_chunks/{hcg-doubling-Bb_n6tEa.js.map → hcg-doubling-BcXriXJe.js.map} +1 -1
  115. package/dist/_chunks/{header-BZ4pZlJV.js → header-3o9o9v_T.js} +2 -2
  116. package/dist/_chunks/{header-BZ4pZlJV.js.map → header-3o9o9v_T.js.map} +1 -1
  117. package/dist/_chunks/{header-settings-B8mLc03Q.js → header-settings-CTe45iDy.js} +4 -4
  118. package/dist/_chunks/{header-settings-B8mLc03Q.js.map → header-settings-CTe45iDy.js.map} +1 -1
  119. package/dist/_chunks/{hover-card-Bcku1GQu.js → hover-card-BMJBVqIf.js} +2 -2
  120. package/dist/_chunks/{hover-card-Bcku1GQu.js.map → hover-card-BMJBVqIf.js.map} +1 -1
  121. package/dist/_chunks/{icon-button-8xqRnkdG.js → icon-button-CehAeZoP.js} +2 -2
  122. package/dist/_chunks/{icon-button-8xqRnkdG.js.map → icon-button-CehAeZoP.js.map} +1 -1
  123. package/dist/_chunks/{icon-button-group-Dj6CRoYR.js → icon-button-group-DkkdIygu.js} +2 -2
  124. package/dist/_chunks/{icon-button-group-Dj6CRoYR.js.map → icon-button-group-DkkdIygu.js.map} +1 -1
  125. package/dist/_chunks/{icon-picker-CTWzlHJr.js → icon-picker-DMEelg9v.js} +3 -3
  126. package/dist/_chunks/{icon-picker-CTWzlHJr.js.map → icon-picker-DMEelg9v.js.map} +1 -1
  127. package/dist/_chunks/{image-cropper-C84NDTB7.js → image-cropper-BjPjT7wU.js} +2 -2
  128. package/dist/_chunks/{image-cropper-C84NDTB7.js.map → image-cropper-BjPjT7wU.js.map} +1 -1
  129. package/dist/_chunks/{info-tip-ey_Pon2y.js → info-tip-iP2Pm9dh.js} +2 -2
  130. package/dist/_chunks/{info-tip-ey_Pon2y.js.map → info-tip-iP2Pm9dh.js.map} +1 -1
  131. package/dist/_chunks/{insert-result-LCNTskNJ.js → insert-result-DPnOBD85.js} +2 -2
  132. package/dist/_chunks/{insert-result-LCNTskNJ.js.map → insert-result-DPnOBD85.js.map} +1 -1
  133. package/dist/_chunks/{key-value-pair-DczGb4yz.js → key-value-pair-DaQI_LZB.js} +2 -2
  134. package/dist/_chunks/{key-value-pair-DczGb4yz.js.map → key-value-pair-DaQI_LZB.js.map} +1 -1
  135. package/dist/_chunks/{link-cell-renderer-BNa8x6oJ.js → link-cell-renderer-s3oHzOwi.js} +2 -2
  136. package/dist/_chunks/{link-cell-renderer-BNa8x6oJ.js.map → link-cell-renderer-s3oHzOwi.js.map} +1 -1
  137. package/dist/_chunks/{locale-picker-BLeHbFSc.js → locale-picker-CH3kfrIG.js} +3 -3
  138. package/dist/_chunks/{locale-picker-BLeHbFSc.js.map → locale-picker-CH3kfrIG.js.map} +1 -1
  139. package/dist/_chunks/{map-view-CCAlC9IL.js → map-view-CHw4RL6w.js} +2 -2
  140. package/dist/_chunks/{map-view-CCAlC9IL.js.map → map-view-CHw4RL6w.js.map} +1 -1
  141. package/dist/_chunks/{marketplace-app-shell-BwH6Aruw.js → marketplace-app-shell-d2EtcUbe.js} +4 -4
  142. package/dist/_chunks/{marketplace-app-shell-BwH6Aruw.js.map → marketplace-app-shell-d2EtcUbe.js.map} +1 -1
  143. package/dist/_chunks/{message-card-Dm5Xshup.js → message-card-V3sFPiQI.js} +3 -3
  144. package/dist/_chunks/{message-card-Dm5Xshup.js.map → message-card-V3sFPiQI.js.map} +1 -1
  145. package/dist/_chunks/{message-tray-CXjVsKqp.js → message-tray-CrRIHfiQ.js} +4 -4
  146. package/dist/_chunks/{message-tray-CXjVsKqp.js.map → message-tray-CrRIHfiQ.js.map} +1 -1
  147. package/dist/_chunks/{note-timeline-D2oPuQP6.js → note-timeline-Dn_XTo1s.js} +131 -90
  148. package/dist/_chunks/note-timeline-Dn_XTo1s.js.map +1 -0
  149. package/dist/_chunks/{notes-panel-CkbfDDzj.js → notes-panel-CmTqIWlS.js} +277 -241
  150. package/dist/_chunks/notes-panel-CmTqIWlS.js.map +1 -0
  151. package/dist/_chunks/{notification-card-ChcK9Wat.js → notification-card-B2gLO6dK.js} +3 -3
  152. package/dist/_chunks/{notification-card-ChcK9Wat.js.map → notification-card-B2gLO6dK.js.map} +1 -1
  153. package/dist/_chunks/{notification-tray-_NoChRKi.js → notification-tray-BOEKegVV.js} +4 -4
  154. package/dist/_chunks/{notification-tray-_NoChRKi.js.map → notification-tray-BOEKegVV.js.map} +1 -1
  155. package/dist/_chunks/{optical-prescription-cphK41eP.js → optical-prescription-LGgmtcST.js} +2 -2
  156. package/dist/_chunks/{optical-prescription-cphK41eP.js.map → optical-prescription-LGgmtcST.js.map} +1 -1
  157. package/dist/_chunks/{panel-subview-BNXN8OEL.js → panel-subview-Cc2Wtt7D.js} +52 -52
  158. package/dist/_chunks/panel-subview-Cc2Wtt7D.js.map +1 -0
  159. package/dist/_chunks/{patient-details-2cIaL-Zb.js → patient-details-C8ImUrVg.js} +3 -3
  160. package/dist/_chunks/{patient-details-2cIaL-Zb.js.map → patient-details-C8ImUrVg.js.map} +1 -1
  161. package/dist/_chunks/{patient-field-row-IHb2VFc2.js → patient-field-row-BRSOKvme.js} +7 -7
  162. package/dist/_chunks/{patient-field-row-IHb2VFc2.js.map → patient-field-row-BRSOKvme.js.map} +1 -1
  163. package/dist/_chunks/{patient-search-D08b6jgj.js → patient-search-5QcmQKJD.js} +2 -2
  164. package/dist/_chunks/{patient-search-D08b6jgj.js.map → patient-search-5QcmQKJD.js.map} +1 -1
  165. package/dist/_chunks/{patient-summary-card-B131Q7Bp.js → patient-summary-card-BhmKB2KR.js} +7 -7
  166. package/dist/_chunks/patient-summary-card-BhmKB2KR.js.map +1 -0
  167. package/dist/_chunks/{payment-automation-upsell-BLTdE2em.js → payment-automation-upsell-BKmBXU4i.js} +17 -16
  168. package/dist/_chunks/{payment-automation-upsell-BLTdE2em.js.map → payment-automation-upsell-BKmBXU4i.js.map} +1 -1
  169. package/dist/_chunks/{payment-request-card-BxcdvxKR.js → payment-request-card-Cer6XXCn.js} +6 -5
  170. package/dist/_chunks/{payment-request-card-BxcdvxKR.js.map → payment-request-card-Cer6XXCn.js.map} +1 -1
  171. package/dist/_chunks/{periodontal-chart-BF_e3wZp.js → periodontal-chart-DJoZS_o7.js} +2 -2
  172. package/dist/_chunks/{periodontal-chart-BF_e3wZp.js.map → periodontal-chart-DJoZS_o7.js.map} +1 -1
  173. package/dist/_chunks/{periodontal-chart-card-BJEuJuzh.js → periodontal-chart-card-Nd1ZoYWb.js} +2 -2
  174. package/dist/_chunks/{periodontal-chart-card-BJEuJuzh.js.map → periodontal-chart-card-Nd1ZoYWb.js.map} +1 -1
  175. package/dist/_chunks/{popover-DzR5QYxp.js → popover-DO-pssF3.js} +2 -2
  176. package/dist/_chunks/{popover-DzR5QYxp.js.map → popover-DO-pssF3.js.map} +1 -1
  177. package/dist/_chunks/{practice-results-CBNRJNnY.js → practice-results-D_jjzwgf.js} +5 -5
  178. package/dist/_chunks/{practice-results-CBNRJNnY.js.map → practice-results-D_jjzwgf.js.map} +1 -1
  179. package/dist/_chunks/{pregnancy-dating-nV1_S6w0.js → pregnancy-dating-DcyV9ZRD.js} +2 -2
  180. package/dist/_chunks/{pregnancy-dating-nV1_S6w0.js.map → pregnancy-dating-DcyV9ZRD.js.map} +1 -1
  181. package/dist/_chunks/{pregnancy-weight-gain-tRecShAD.js → pregnancy-weight-gain-Bfq4Kwt5.js} +2 -2
  182. package/dist/_chunks/{pregnancy-weight-gain-tRecShAD.js.map → pregnancy-weight-gain-Bfq4Kwt5.js.map} +1 -1
  183. package/dist/_chunks/{privacy-lock-Be39vQUN.js → privacy-lock-CbFCAMM3.js} +3 -3
  184. package/dist/_chunks/{privacy-lock-Be39vQUN.js.map → privacy-lock-CbFCAMM3.js.map} +1 -1
  185. package/dist/_chunks/{product-hub-panel-C3bMjscm.js → product-hub-panel-w40-_-1s.js} +3 -3
  186. package/dist/_chunks/{product-hub-panel-C3bMjscm.js.map → product-hub-panel-w40-_-1s.js.map} +1 -1
  187. package/dist/_chunks/{public-header.agent-Bl1KFwSE.js → public-header.agent-D-EBVskf.js} +3 -3
  188. package/dist/_chunks/{public-header.agent-Bl1KFwSE.js.map → public-header.agent-D-EBVskf.js.map} +1 -1
  189. package/dist/_chunks/{radiograph-panel.agent-k0G7JuoM.js → radiograph-panel.agent-LrILY2lN.js} +4 -4
  190. package/dist/_chunks/{radiograph-panel.agent-k0G7JuoM.js.map → radiograph-panel.agent-LrILY2lN.js.map} +1 -1
  191. package/dist/_chunks/{receipt-euro-C6k4Gzhr.js → receipt-euro-B1cLM_TN.js} +3 -14
  192. package/dist/_chunks/receipt-euro-B1cLM_TN.js.map +1 -0
  193. package/dist/_chunks/{reviews-panel-Cy969x7q.js → reviews-panel-2GVuxGeT.js} +4 -4
  194. package/dist/_chunks/{reviews-panel-Cy969x7q.js.map → reviews-panel-2GVuxGeT.js.map} +1 -1
  195. package/dist/_chunks/{rich-text-editor-BTXlorm5.js → rich-text-editor-BJ1-Lkao.js} +1024 -932
  196. package/dist/_chunks/rich-text-editor-BJ1-Lkao.js.map +1 -0
  197. package/dist/_chunks/{session-countdown-QMsnRa1x.js → session-countdown-BqppPrw6.js} +2 -2
  198. package/dist/_chunks/{session-countdown-QMsnRa1x.js.map → session-countdown-BqppPrw6.js.map} +1 -1
  199. package/dist/_chunks/{sheet-hm04DGFd.js → sheet-C8WIDFS8.js} +2 -2
  200. package/dist/_chunks/{sheet-hm04DGFd.js.map → sheet-C8WIDFS8.js.map} +1 -1
  201. package/dist/_chunks/{sign-in-with-alfadocs-button-BLe_quy5.js → sign-in-with-alfadocs-button-DWwBJtyE.js} +2 -2
  202. package/dist/_chunks/{sign-in-with-alfadocs-button-BLe_quy5.js.map → sign-in-with-alfadocs-button-DWwBJtyE.js.map} +1 -1
  203. package/dist/_chunks/{signature-request-b-86AGlT.js → signature-request-D_j2aQu1.js} +359 -370
  204. package/dist/_chunks/signature-request-D_j2aQu1.js.map +1 -0
  205. package/dist/_chunks/{slot-grid-Bk3GZL1p.js → slot-grid-B3eOPkKD.js} +4 -4
  206. package/dist/_chunks/{slot-grid-Bk3GZL1p.js.map → slot-grid-B3eOPkKD.js.map} +1 -1
  207. package/dist/_chunks/{streaming-text-DjFqLSt_.js → streaming-text-CE1u_oGa.js} +2 -2
  208. package/dist/_chunks/{streaming-text-DjFqLSt_.js.map → streaming-text-CE1u_oGa.js.map} +1 -1
  209. package/dist/_chunks/{task-tray-5co9Jr2L.js → task-tray-DIwjAIes.js} +3 -3
  210. package/dist/_chunks/{task-tray-5co9Jr2L.js.map → task-tray-DIwjAIes.js.map} +1 -1
  211. package/dist/_chunks/{tasks-panel-BpH-x7U3.js → tasks-panel-CpcikOeY.js} +5 -5
  212. package/dist/_chunks/{tasks-panel-BpH-x7U3.js.map → tasks-panel-CpcikOeY.js.map} +1 -1
  213. package/dist/_chunks/{theme-toggle-CMz8YfC1.js → theme-toggle-bI0pgDDv.js} +3 -3
  214. package/dist/_chunks/{theme-toggle-CMz8YfC1.js.map → theme-toggle-bI0pgDDv.js.map} +1 -1
  215. package/dist/_chunks/{toast-8jqtbfAB.js → toast-ZZfhA5u0.js} +2 -2
  216. package/dist/_chunks/{toast-8jqtbfAB.js.map → toast-ZZfhA5u0.js.map} +1 -1
  217. package/dist/_chunks/{token-insert-menu-9Um0JinI.js → token-insert-menu-A9B5AJw6.js} +2 -2
  218. package/dist/_chunks/{token-insert-menu-9Um0JinI.js.map → token-insert-menu-A9B5AJw6.js.map} +1 -1
  219. package/dist/_chunks/tool-rail-D89USYE6.js +799 -0
  220. package/dist/_chunks/tool-rail-D89USYE6.js.map +1 -0
  221. package/dist/_chunks/{tooth-scheme-BWkYxxjR.js → tooth-scheme-DPAq0vQK.js} +3 -3
  222. package/dist/_chunks/{tooth-scheme-BWkYxxjR.js.map → tooth-scheme-DPAq0vQK.js.map} +1 -1
  223. package/dist/_chunks/{transaction-chip-Dth1nThY.js → transaction-chip-CwgcJiqF.js} +47 -46
  224. package/dist/_chunks/{transaction-chip-Dth1nThY.js.map → transaction-chip-CwgcJiqF.js.map} +1 -1
  225. package/dist/_chunks/{unit-converter-BTgU50gk.js → unit-converter-C-LpGzrN.js} +2 -2
  226. package/dist/_chunks/{unit-converter-BTgU50gk.js.map → unit-converter-C-LpGzrN.js.map} +1 -1
  227. package/dist/_chunks/user-plus-BtcOLgNU.js +17 -0
  228. package/dist/_chunks/user-plus-BtcOLgNU.js.map +1 -0
  229. package/dist/_chunks/{warning-stack-BW5Dwb3z.js → warning-stack-C0glSB7p.js} +3 -3
  230. package/dist/_chunks/{warning-stack-BW5Dwb3z.js.map → warning-stack-C0glSB7p.js.map} +1 -1
  231. package/dist/_chunks/{workflow-map-CXdsxvUj.js → workflow-map-DhR_h5yw.js} +5 -5
  232. package/dist/_chunks/{workflow-map-CXdsxvUj.js.map → workflow-map-DhR_h5yw.js.map} +1 -1
  233. package/dist/agent-catalog.json +3 -418
  234. package/dist/agent-i18n/en.json +2 -18
  235. package/dist/components/agenda-tray/index.js +1 -1
  236. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +9 -0
  237. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -1
  238. package/dist/components/ai-consent-banner/index.d.ts +1 -1
  239. package/dist/components/ai-consent-banner/index.d.ts.map +1 -1
  240. package/dist/components/ai-consent-banner/index.js +1 -1
  241. package/dist/components/ai-prompt-input/index.js +1 -1
  242. package/dist/components/anamnesis-card/index.js +1 -1
  243. package/dist/components/appointment-card/appointment-card.d.ts +24 -0
  244. package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
  245. package/dist/components/appointment-card/index.js +2 -2
  246. package/dist/components/appointment-peek/index.js +1 -1
  247. package/dist/components/appointment-timeline/appointment-timeline.d.ts +15 -1
  248. package/dist/components/appointment-timeline/appointment-timeline.d.ts.map +1 -1
  249. package/dist/components/appointment-timeline/index.js +1 -1
  250. package/dist/components/audio-recorder/index.js +1 -1
  251. package/dist/components/bishop-score/index.js +1 -1
  252. package/dist/components/bmi-calculator/index.js +1 -1
  253. package/dist/components/booking/booking-types.d.ts +6 -0
  254. package/dist/components/booking/booking-types.d.ts.map +1 -1
  255. package/dist/components/booking/booking.d.ts.map +1 -1
  256. package/dist/components/booking/cascade.d.ts +6 -0
  257. package/dist/components/booking/cascade.d.ts.map +1 -1
  258. package/dist/components/booking/index.js +1 -1
  259. package/dist/components/button/button.d.ts +1 -1
  260. package/dist/components/button/button.d.ts.map +1 -1
  261. package/dist/components/button/index.js +2 -2
  262. package/dist/components/button-group/index.js +1 -1
  263. package/dist/components/calendar/index.js +1 -1
  264. package/dist/components/care-plan-card/index.js +1 -1
  265. package/dist/components/care-plan-entry-card/index.js +1 -1
  266. package/dist/components/care-plan-header/index.js +1 -1
  267. package/dist/components/carousel/index.js +1 -1
  268. package/dist/components/chart/index.js +1 -1
  269. package/dist/components/chat-input/index.js +1 -1
  270. package/dist/components/chat-message/index.js +1 -1
  271. package/dist/components/connection-status/index.js +1 -1
  272. package/dist/components/contact-profile-card/index.js +1 -1
  273. package/dist/components/control-room-rail/index.js +1 -1
  274. package/dist/components/copy-field/index.js +1 -1
  275. package/dist/components/cycle-calculator/index.js +1 -1
  276. package/dist/components/dashboard-grid/index.js +1 -1
  277. package/dist/components/data-table/index.js +4 -4
  278. package/dist/components/data-table-tabs/index.js +1 -1
  279. package/dist/components/description-list/index.js +1 -1
  280. package/dist/components/document-preview/index.js +1 -1
  281. package/dist/components/document-scanner/index.js +1 -1
  282. package/dist/components/due-date-calculator/index.js +1 -1
  283. package/dist/components/editable-description/index.js +1 -1
  284. package/dist/components/editor-overlay/index.js +1 -1
  285. package/dist/components/empty-state/index.js +1 -1
  286. package/dist/components/entity-summary/index.js +1 -1
  287. package/dist/components/error-boundary/index.js +1 -1
  288. package/dist/components/face-scheme/index.js +1 -1
  289. package/dist/components/fetal-weight/index.js +1 -1
  290. package/dist/components/field-array/index.js +1 -1
  291. package/dist/components/file-manager/index.js +1 -1
  292. package/dist/components/finished-terminal/index.js +1 -1
  293. package/dist/components/fiscal-code-input/index.js +1 -1
  294. package/dist/components/freemium-paywall/index.js +1 -1
  295. package/dist/components/gestational-age-calculator/index.js +1 -1
  296. package/dist/components/hcg-doubling/index.js +1 -1
  297. package/dist/components/header/index.js +1 -1
  298. package/dist/components/header-settings/index.js +1 -1
  299. package/dist/components/hover-card/index.js +1 -1
  300. package/dist/components/icon-button/index.js +1 -1
  301. package/dist/components/icon-button-group/index.js +1 -1
  302. package/dist/components/icon-picker/index.js +1 -1
  303. package/dist/components/image-cropper/index.js +1 -1
  304. package/dist/components/info-tip/index.js +1 -1
  305. package/dist/components/key-value-pair/index.js +1 -1
  306. package/dist/components/locale-picker/index.js +1 -1
  307. package/dist/components/map-view/index.js +1 -1
  308. package/dist/components/message-card/index.js +1 -1
  309. package/dist/components/message-tray/index.js +1 -1
  310. package/dist/components/note-timeline/index.js +1 -1
  311. package/dist/components/note-timeline/note-timeline.d.ts +9 -0
  312. package/dist/components/note-timeline/note-timeline.d.ts.map +1 -1
  313. package/dist/components/notes-panel/index.d.ts +1 -0
  314. package/dist/components/notes-panel/index.d.ts.map +1 -1
  315. package/dist/components/notes-panel/index.js +1 -1
  316. package/dist/components/notes-panel/notes-panel.d.ts +13 -5
  317. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  318. package/dist/components/notification-card/index.js +1 -1
  319. package/dist/components/notification-tray/index.js +1 -1
  320. package/dist/components/optical-prescription/index.js +1 -1
  321. package/dist/components/panel-subview/index.js +1 -1
  322. package/dist/components/panel-subview/panel-subview.d.ts.map +1 -1
  323. package/dist/components/patient-details/index.js +1 -1
  324. package/dist/components/patient-search/index.js +1 -1
  325. package/dist/components/patient-summary-card/index.js +1 -1
  326. package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
  327. package/dist/components/patient-table/index.js +1 -1
  328. package/dist/components/payment-card/index.js +1 -1
  329. package/dist/components/periodontal-chart/index.js +1 -1
  330. package/dist/components/periodontal-chart-card/index.js +1 -1
  331. package/dist/components/popover/index.js +1 -1
  332. package/dist/components/practice-results/index.js +1 -1
  333. package/dist/components/pregnancy-dating/index.js +1 -1
  334. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  335. package/dist/components/privacy-lock/index.js +1 -1
  336. package/dist/components/product-hub-tray/index.js +1 -1
  337. package/dist/components/public-header/index.js +1 -1
  338. package/dist/components/radiograph-panel/index.js +1 -1
  339. package/dist/components/reviews-panel/index.js +1 -1
  340. package/dist/components/rich-text-editor/index.d.ts +1 -1
  341. package/dist/components/rich-text-editor/index.d.ts.map +1 -1
  342. package/dist/components/rich-text-editor/index.js +1 -1
  343. package/dist/components/rich-text-editor/rich-text-editor.d.ts +48 -0
  344. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  345. package/dist/components/session-countdown/index.js +1 -1
  346. package/dist/components/sheet/index.js +1 -1
  347. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  348. package/dist/components/slot-grid/index.js +1 -1
  349. package/dist/components/streaming-text/index.js +1 -1
  350. package/dist/components/task-tray/index.js +1 -1
  351. package/dist/components/tasks-panel/index.js +1 -1
  352. package/dist/components/theme-toggle/index.js +1 -1
  353. package/dist/components/toast/index.js +1 -1
  354. package/dist/components/token-insert-menu/index.js +1 -1
  355. package/dist/components/tool-rail/index.js +1 -1
  356. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  357. package/dist/components/tooth-scheme/index.js +1 -1
  358. package/dist/components/transaction-chip/index.js +1 -1
  359. package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
  360. package/dist/components/transaction-chip/transaction-chip.d.ts.map +1 -1
  361. package/dist/components/unit-converter/index.js +1 -1
  362. package/dist/components/warning-stack/index.js +1 -1
  363. package/dist/components/workflow/index.js +1 -1
  364. package/dist/host-compat.css +13 -4
  365. package/dist/i18n/locales/ar.d.ts +248 -194
  366. package/dist/i18n/locales/ar.d.ts.map +1 -1
  367. package/dist/i18n/locales/ar.js +253 -199
  368. package/dist/i18n/locales/ar.js.map +1 -1
  369. package/dist/i18n/locales/de.d.ts +232 -178
  370. package/dist/i18n/locales/de.d.ts.map +1 -1
  371. package/dist/i18n/locales/de.js +237 -183
  372. package/dist/i18n/locales/de.js.map +1 -1
  373. package/dist/i18n/locales/el.d.ts +247 -193
  374. package/dist/i18n/locales/el.d.ts.map +1 -1
  375. package/dist/i18n/locales/el.js +252 -198
  376. package/dist/i18n/locales/el.js.map +1 -1
  377. package/dist/i18n/locales/en.d.ts +54 -0
  378. package/dist/i18n/locales/en.d.ts.map +1 -1
  379. package/dist/i18n/locales/en.js +59 -5
  380. package/dist/i18n/locales/en.js.map +1 -1
  381. package/dist/i18n/locales/es.d.ts +240 -186
  382. package/dist/i18n/locales/es.d.ts.map +1 -1
  383. package/dist/i18n/locales/es.js +245 -191
  384. package/dist/i18n/locales/es.js.map +1 -1
  385. package/dist/i18n/locales/fr.d.ts +234 -180
  386. package/dist/i18n/locales/fr.d.ts.map +1 -1
  387. package/dist/i18n/locales/fr.js +239 -185
  388. package/dist/i18n/locales/fr.js.map +1 -1
  389. package/dist/i18n/locales/hi.d.ts +248 -194
  390. package/dist/i18n/locales/hi.d.ts.map +1 -1
  391. package/dist/i18n/locales/hi.js +257 -199
  392. package/dist/i18n/locales/hi.js.map +1 -1
  393. package/dist/i18n/locales/it.d.ts +192 -138
  394. package/dist/i18n/locales/it.d.ts.map +1 -1
  395. package/dist/i18n/locales/it.js +197 -143
  396. package/dist/i18n/locales/it.js.map +1 -1
  397. package/dist/i18n/locales/ja.d.ts +246 -192
  398. package/dist/i18n/locales/ja.d.ts.map +1 -1
  399. package/dist/i18n/locales/ja.js +251 -197
  400. package/dist/i18n/locales/ja.js.map +1 -1
  401. package/dist/i18n/locales/nl.d.ts +237 -183
  402. package/dist/i18n/locales/nl.d.ts.map +1 -1
  403. package/dist/i18n/locales/nl.js +242 -188
  404. package/dist/i18n/locales/nl.js.map +1 -1
  405. package/dist/i18n/locales/pl.d.ts +242 -188
  406. package/dist/i18n/locales/pl.d.ts.map +1 -1
  407. package/dist/i18n/locales/pl.js +247 -193
  408. package/dist/i18n/locales/pl.js.map +1 -1
  409. package/dist/i18n/locales/pt.d.ts +242 -188
  410. package/dist/i18n/locales/pt.d.ts.map +1 -1
  411. package/dist/i18n/locales/pt.js +247 -193
  412. package/dist/i18n/locales/pt.js.map +1 -1
  413. package/dist/i18n/locales/ro.d.ts +241 -187
  414. package/dist/i18n/locales/ro.d.ts.map +1 -1
  415. package/dist/i18n/locales/ro.js +246 -192
  416. package/dist/i18n/locales/ro.js.map +1 -1
  417. package/dist/i18n/locales/ru.d.ts +247 -193
  418. package/dist/i18n/locales/ru.d.ts.map +1 -1
  419. package/dist/i18n/locales/ru.js +252 -198
  420. package/dist/i18n/locales/ru.js.map +1 -1
  421. package/dist/i18n/locales/sq.d.ts +241 -187
  422. package/dist/i18n/locales/sq.d.ts.map +1 -1
  423. package/dist/i18n/locales/sq.js +246 -192
  424. package/dist/i18n/locales/sq.js.map +1 -1
  425. package/dist/i18n/locales/sv.d.ts +242 -188
  426. package/dist/i18n/locales/sv.d.ts.map +1 -1
  427. package/dist/i18n/locales/sv.js +247 -193
  428. package/dist/i18n/locales/sv.js.map +1 -1
  429. package/dist/i18n/locales/tr.d.ts +248 -194
  430. package/dist/i18n/locales/tr.d.ts.map +1 -1
  431. package/dist/i18n/locales/tr.js +253 -199
  432. package/dist/i18n/locales/tr.js.map +1 -1
  433. package/dist/i18n/locales/zh.d.ts +241 -187
  434. package/dist/i18n/locales/zh.d.ts.map +1 -1
  435. package/dist/i18n/locales/zh.js +246 -192
  436. package/dist/i18n/locales/zh.js.map +1 -1
  437. package/dist/index.js +107 -107
  438. package/dist/locales/ar.json +253 -199
  439. package/dist/locales/de.json +237 -183
  440. package/dist/locales/el.json +252 -198
  441. package/dist/locales/en.json +59 -5
  442. package/dist/locales/es.json +245 -191
  443. package/dist/locales/fr.json +239 -185
  444. package/dist/locales/hi.json +253 -199
  445. package/dist/locales/it.json +197 -143
  446. package/dist/locales/ja.json +251 -197
  447. package/dist/locales/nl.json +242 -188
  448. package/dist/locales/pl.json +247 -193
  449. package/dist/locales/pt.json +247 -193
  450. package/dist/locales/ro.json +246 -192
  451. package/dist/locales/ru.json +252 -198
  452. package/dist/locales/sq.json +246 -192
  453. package/dist/locales/sv.json +247 -193
  454. package/dist/locales/tr.json +253 -199
  455. package/dist/locales/zh.json +246 -192
  456. package/dist/patterns/alia-assistant/index.js +1 -1
  457. package/dist/patterns/anamnesis/index.js +1 -1
  458. package/dist/patterns/calendar/calendar-appointment-details.d.ts +7 -0
  459. package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
  460. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +10 -5
  461. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
  462. package/dist/patterns/calendar/calendar-bookings-panel.d.ts +31 -0
  463. package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -0
  464. package/dist/patterns/calendar/calendar-info-hover.d.ts +15 -1
  465. package/dist/patterns/calendar/calendar-info-hover.d.ts.map +1 -1
  466. package/dist/patterns/calendar/calendar-privacy.d.ts +23 -0
  467. package/dist/patterns/calendar/calendar-privacy.d.ts.map +1 -0
  468. package/dist/patterns/calendar/calendar-rail-settle.d.ts +14 -0
  469. package/dist/patterns/calendar/calendar-rail-settle.d.ts.map +1 -0
  470. package/dist/patterns/calendar/calendar-upcoming-panel.d.ts +32 -0
  471. package/dist/patterns/calendar/calendar-upcoming-panel.d.ts.map +1 -0
  472. package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts +62 -0
  473. package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts.map +1 -0
  474. package/dist/patterns/calendar/calendar-workspace.d.ts +14 -1
  475. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  476. package/dist/patterns/calendar/calendar-workspace.model.d.ts +37 -1
  477. package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
  478. package/dist/patterns/calendar/calendar.journey.d.ts +9 -1
  479. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  480. package/dist/patterns/calendar/calendar.model.d.ts +8 -2
  481. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  482. package/dist/patterns/calendar/calendar.sheets.d.ts +49 -28
  483. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  484. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  485. package/dist/patterns/calendar/calendar.types.d.ts +6 -0
  486. package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
  487. package/dist/patterns/calendar/index.d.ts +2 -2
  488. package/dist/patterns/calendar/index.d.ts.map +1 -1
  489. package/dist/patterns/calendar/index.js +1 -1
  490. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  491. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  492. package/dist/patterns/signature-request/index.js +1 -1
  493. package/dist/tokens.css +1 -1
  494. package/package.json +3 -1
  495. package/dist/_chunks/ai-consent-banner-De4gzSBZ.js.map +0 -1
  496. package/dist/_chunks/appointment-card-WsDGBBut.js.map +0 -1
  497. package/dist/_chunks/appointment-timeline-D-rNwKpS.js.map +0 -1
  498. package/dist/_chunks/booking-x3J7sS2G.js.map +0 -1
  499. package/dist/_chunks/button-nJaPh_HC.js.map +0 -1
  500. package/dist/_chunks/calendar-workspace-Cc1LRVWY.js +0 -9900
  501. package/dist/_chunks/calendar-workspace-Cc1LRVWY.js.map +0 -1
  502. package/dist/_chunks/file-manager-UlcYQv8n.js.map +0 -1
  503. package/dist/_chunks/note-timeline-D2oPuQP6.js.map +0 -1
  504. package/dist/_chunks/notes-panel-CkbfDDzj.js.map +0 -1
  505. package/dist/_chunks/panel-subview-BNXN8OEL.js.map +0 -1
  506. package/dist/_chunks/patient-summary-card-B131Q7Bp.js.map +0 -1
  507. package/dist/_chunks/receipt-euro-C6k4Gzhr.js.map +0 -1
  508. package/dist/_chunks/rich-text-editor-BTXlorm5.js.map +0 -1
  509. package/dist/_chunks/signature-request-b-86AGlT.js.map +0 -1
  510. package/dist/_chunks/tool-rail-BP8sjxCw.js +0 -667
  511. package/dist/_chunks/tool-rail-BP8sjxCw.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"header-settings-B8mLc03Q.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n 'Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Read after `set_locale` to confirm the switch landed — an unknown tag is silently dropped and leaves this unchanged.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n 'The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme(\"system\")` or `set_accessibility(\"system\")` write verifiable.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Monitor, Moon, Settings, Sun } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { IconButtonGroup } from '../icon-button-group/icon-button-group';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { Switch } from '../switch/switch';\nimport {\n LocalePicker,\n LOCALE_STORAGE_KEY,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode — silent-fail per use-theme.ts. */\n }\n}\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\nconst dropdownContentClasses = [\n 'ds:w-[20rem] ds:p-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border',\n 'ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. Defaults to `md` to preserve the existing visual.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row — keeps the visual rhythm consistent.\n *\n * The internal dropdown chrome (Appearance toggle group, locale\n * picker, accessibility switch) stays at kit defaults regardless\n * — this prop only sizes the trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface. Inside the menu, the */\n/* \"Language\" section embeds `LocalePicker.SearchList` (the kit's */\n/* searchable list without its own trigger / popover) and the */\n/* \"Appearance\" section mirrors `ThemeToggle`'s menu-variant internals */\n/* using `DropdownMenu.RadioGroup` + `CheckboxItem`. Both sections */\n/* read/write the same hooks (`useLocale`, `useTheme`) that the */\n/* standalone components use, so there's no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation();\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Inlined here (rather than exported from locale-picker) because\n // it's three small calls; the LocalePicker.SearchList component\n // continues to own its own copy for inline use, and both apply\n // the same persistence key (`alfadocs-ui.locale`) so a write from\n // either path is visible to the other on next mount.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n setLocaleRef.current(next as Locale);\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n align={align}\n sideOffset={8}\n className={dropdownContentClasses}\n // Search input inside the menu owns its own keyboard\n // capture (cmdk). Stop Radix Menu's typeahead from\n // intercepting letters typed into the search field —\n // `onKeyDownCapture` runs before the menu's listener.\n onKeyDownCapture={(event) => {\n const target = event.target as HTMLElement | null;\n if (\n target?.tagName === 'INPUT' &&\n // Always allow Escape so the menu can close.\n event.key !== 'Escape'\n ) {\n event.stopPropagation();\n }\n }}\n >\n <DropdownMenu.Label>\n {t('navigation.headerSettings.language.label')}\n </DropdownMenu.Label>\n {/* Render the kit's compact LocalePicker (its own\n Popover trigger + content). Clicking the trigger\n opens a nested popover containing the full\n searchable list — the HeaderSettings menu stays\n open behind it so the user can return to Appearance\n / Accessibility without re-opening.\n\n Wrapped in `role=\"group\"` so the menu's\n `aria-required-children` rule sees a permitted child\n role (the LocalePicker compact button alone would\n appear as a raw button child of `role=\"menu\"`). */}\n <div\n role=\"group\"\n aria-label={t('navigation.headerSettings.language.label')}\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n // Stretch the compact LocalePicker to the full menu\n // width so it reads as a single row affordance (not\n // a centred pill). The picker's root is\n // inline-flex; the `*:` child selector + `flex-1`\n // gives it `flex: 1 1 0%` once it's a child of the\n // flex container we make this div into.\n 'ds:flex ds:[&>*]:flex-1',\n ].join(' ')}\n >\n {/* `popoverSide=\"end\"` opens the nested search popover\n as a side-flyout (inline-end, RTL-aware) rather\n than below the compact row — without this the\n nested popover stacks under the trigger inside the\n outer DropdownMenu and the two surfaces visually\n merge. Radix Popover auto-flips to the opposite\n side if there's no viewport room. */}\n <LocalePicker variant=\"compact\" popoverSide=\"end\" />\n </div>\n\n <DropdownMenu.Separator />\n\n <DropdownMenu.Label>\n {t('navigation.headerSettings.appearance.label')}\n </DropdownMenu.Label>\n {/* Horizontal segmented toggle (mirrors ThemeToggle's\n `split` variant) instead of stacked radio rows — uses\n fewer rows of menu real estate and reads as a single\n control. `role=\"radiogroup\"` keeps the screen-reader\n semantics correct, and the group is wrapped in\n `role=\"group\"` for the same reason the language\n search-list wrapper is — the menu's\n aria-required-children doesn't permit raw IconButtons\n as direct menu descendants. */}\n <div\n role=\"group\"\n aria-label={t('navigation.headerSettings.appearance.label')}\n className=\"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]\"\n >\n <IconButtonGroup\n role=\"radiogroup\"\n mode=\"toggle-single\"\n size=\"sm\"\n aria-label={t('navigation.headerSettings.appearance.label')}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n <IconButton\n icon={<Sun aria-hidden />}\n aria-label={t('navigation.headerSettings.appearance.light')}\n value=\"light\"\n />\n <IconButton\n icon={<Moon aria-hidden />}\n aria-label={t('navigation.headerSettings.appearance.dark')}\n value=\"dark\"\n />\n <IconButton\n icon={<Monitor aria-hidden />}\n aria-label={t(\n 'navigation.headerSettings.appearance.system',\n )}\n value=\"system\"\n />\n </IconButtonGroup>\n </div>\n\n <DropdownMenu.Separator />\n\n {/* Accessible-mode toggle uses the kit's Switch primitive\n for a clearer visual affordance than a checkbox tick.\n Rendered inside a `presentation` row (not a\n DropdownMenu.CheckboxItem) — the Switch is focusable\n via Tab while the menu is open, so keyboard users\n still reach it; arrow keys keep moving between the\n three theme radios above without falling into the\n switch's roving collection.\n\n When the switch flips, `setAccessibility` writes\n through useTheme (the same store the standalone\n ThemeToggle uses) so document.documentElement gets\n the `theme-accessible` class instantly — including\n swapping `--font-sans` to Lexend for Latin scripts\n (see src/tokens/index.css). */}\n {/* `role=\"group\"` so the menu's `aria-required-children`\n (which only permits menuitem* / group / separator /\n menu inside `role=\"menu\"`) is satisfied — the Switch's\n `role=\"switch\"` would be a forbidden direct child of\n the menu. `aria-label` names the group so SR users\n hear \"Accessibility toggle, group\". */}\n <div\n role=\"group\"\n aria-label={t(\n 'navigation.headerSettings.appearance.accessible',\n )}\n className=\"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]\"\n >\n <Switch\n label={t('navigation.headerSettings.appearance.accessible')}\n labelSide=\"start\"\n size=\"sm\"\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n />\n </div>\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","safeWriteStorage","key","value","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","dropdownContentClasses","HeaderSettings","forwardRef","props","ref","align","size","disabled","className","id","rest","t","useTranslation","theme","useTheme","setLocaleI18n","useLocale","forwardedRef","useRef","useImperativeHandle","setLocaleWithPersistence","useCallback","next","LOCALE_STORAGE_KEY","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","useAgentRegistration","accessibleChecked","jsx","jsxs","DropdownMenu","IconButton","Settings","event","target","LocalePicker","IconButtonGroup","Sun","Moon","Monitor","Switch"],"mappings":";;;;;;;;;;;;;;;AAOO,MAAMA,IAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,IAE5C,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,aACE;AAAA,UAAA;AAA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AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAE1D;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA,EACF,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEArB,EAAe,cAAc;"}
1
+ {"version":3,"file":"header-settings-CTe45iDy.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n 'Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Read after `set_locale` to confirm the switch landed — an unknown tag is silently dropped and leaves this unchanged.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n 'The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme(\"system\")` or `set_accessibility(\"system\")` write verifiable.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Monitor, Moon, Settings, Sun } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { IconButtonGroup } from '../icon-button-group/icon-button-group';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { Switch } from '../switch/switch';\nimport {\n LocalePicker,\n LOCALE_STORAGE_KEY,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode — silent-fail per use-theme.ts. */\n }\n}\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\nconst dropdownContentClasses = [\n 'ds:w-[20rem] ds:p-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border',\n 'ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. Defaults to `md` to preserve the existing visual.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row — keeps the visual rhythm consistent.\n *\n * The internal dropdown chrome (Appearance toggle group, locale\n * picker, accessibility switch) stays at kit defaults regardless\n * — this prop only sizes the trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface. Inside the menu, the */\n/* \"Language\" section embeds `LocalePicker.SearchList` (the kit's */\n/* searchable list without its own trigger / popover) and the */\n/* \"Appearance\" section mirrors `ThemeToggle`'s menu-variant internals */\n/* using `DropdownMenu.RadioGroup` + `CheckboxItem`. Both sections */\n/* read/write the same hooks (`useLocale`, `useTheme`) that the */\n/* standalone components use, so there's no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation();\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Inlined here (rather than exported from locale-picker) because\n // it's three small calls; the LocalePicker.SearchList component\n // continues to own its own copy for inline use, and both apply\n // the same persistence key (`alfadocs-ui.locale`) so a write from\n // either path is visible to the other on next mount.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n setLocaleRef.current(next as Locale);\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n align={align}\n sideOffset={8}\n className={dropdownContentClasses}\n // Search input inside the menu owns its own keyboard\n // capture (cmdk). Stop Radix Menu's typeahead from\n // intercepting letters typed into the search field —\n // `onKeyDownCapture` runs before the menu's listener.\n onKeyDownCapture={(event) => {\n const target = event.target as HTMLElement | null;\n if (\n target?.tagName === 'INPUT' &&\n // Always allow Escape so the menu can close.\n event.key !== 'Escape'\n ) {\n event.stopPropagation();\n }\n }}\n >\n <DropdownMenu.Label>\n {t('navigation.headerSettings.language.label')}\n </DropdownMenu.Label>\n {/* Render the kit's compact LocalePicker (its own\n Popover trigger + content). Clicking the trigger\n opens a nested popover containing the full\n searchable list — the HeaderSettings menu stays\n open behind it so the user can return to Appearance\n / Accessibility without re-opening.\n\n Wrapped in `role=\"group\"` so the menu's\n `aria-required-children` rule sees a permitted child\n role (the LocalePicker compact button alone would\n appear as a raw button child of `role=\"menu\"`). */}\n <div\n role=\"group\"\n aria-label={t('navigation.headerSettings.language.label')}\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n // Stretch the compact LocalePicker to the full menu\n // width so it reads as a single row affordance (not\n // a centred pill). The picker's root is\n // inline-flex; the `*:` child selector + `flex-1`\n // gives it `flex: 1 1 0%` once it's a child of the\n // flex container we make this div into.\n 'ds:flex ds:[&>*]:flex-1',\n ].join(' ')}\n >\n {/* `popoverSide=\"end\"` opens the nested search popover\n as a side-flyout (inline-end, RTL-aware) rather\n than below the compact row — without this the\n nested popover stacks under the trigger inside the\n outer DropdownMenu and the two surfaces visually\n merge. Radix Popover auto-flips to the opposite\n side if there's no viewport room. */}\n <LocalePicker variant=\"compact\" popoverSide=\"end\" />\n </div>\n\n <DropdownMenu.Separator />\n\n <DropdownMenu.Label>\n {t('navigation.headerSettings.appearance.label')}\n </DropdownMenu.Label>\n {/* Horizontal segmented toggle (mirrors ThemeToggle's\n `split` variant) instead of stacked radio rows — uses\n fewer rows of menu real estate and reads as a single\n control. `role=\"radiogroup\"` keeps the screen-reader\n semantics correct, and the group is wrapped in\n `role=\"group\"` for the same reason the language\n search-list wrapper is — the menu's\n aria-required-children doesn't permit raw IconButtons\n as direct menu descendants. */}\n <div\n role=\"group\"\n aria-label={t('navigation.headerSettings.appearance.label')}\n className=\"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]\"\n >\n <IconButtonGroup\n role=\"radiogroup\"\n mode=\"toggle-single\"\n size=\"sm\"\n aria-label={t('navigation.headerSettings.appearance.label')}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n <IconButton\n icon={<Sun aria-hidden />}\n aria-label={t('navigation.headerSettings.appearance.light')}\n value=\"light\"\n />\n <IconButton\n icon={<Moon aria-hidden />}\n aria-label={t('navigation.headerSettings.appearance.dark')}\n value=\"dark\"\n />\n <IconButton\n icon={<Monitor aria-hidden />}\n aria-label={t(\n 'navigation.headerSettings.appearance.system',\n )}\n value=\"system\"\n />\n </IconButtonGroup>\n </div>\n\n <DropdownMenu.Separator />\n\n {/* Accessible-mode toggle uses the kit's Switch primitive\n for a clearer visual affordance than a checkbox tick.\n Rendered inside a `presentation` row (not a\n DropdownMenu.CheckboxItem) — the Switch is focusable\n via Tab while the menu is open, so keyboard users\n still reach it; arrow keys keep moving between the\n three theme radios above without falling into the\n switch's roving collection.\n\n When the switch flips, `setAccessibility` writes\n through useTheme (the same store the standalone\n ThemeToggle uses) so document.documentElement gets\n the `theme-accessible` class instantly — including\n swapping `--font-sans` to Lexend for Latin scripts\n (see src/tokens/index.css). */}\n {/* `role=\"group\"` so the menu's `aria-required-children`\n (which only permits menuitem* / group / separator /\n menu inside `role=\"menu\"`) is satisfied — the Switch's\n `role=\"switch\"` would be a forbidden direct child of\n the menu. `aria-label` names the group so SR users\n hear \"Accessibility toggle, group\". */}\n <div\n role=\"group\"\n aria-label={t(\n 'navigation.headerSettings.appearance.accessible',\n )}\n className=\"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]\"\n >\n <Switch\n label={t('navigation.headerSettings.appearance.accessible')}\n labelSide=\"start\"\n size=\"sm\"\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n />\n </div>\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","safeWriteStorage","key","value","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","dropdownContentClasses","HeaderSettings","forwardRef","props","ref","align","size","disabled","className","id","rest","t","useTranslation","theme","useTheme","setLocaleI18n","useLocale","forwardedRef","useRef","useImperativeHandle","setLocaleWithPersistence","useCallback","next","LOCALE_STORAGE_KEY","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","useAgentRegistration","accessibleChecked","jsx","jsxs","DropdownMenu","IconButton","Settings","event","target","LocalePicker","IconButtonGroup","Sun","Moon","Monitor","Switch"],"mappings":";;;;;;;;;;;;;;;AAOO,MAAMA,IAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,IAE5C,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,aACE;AAAA,UAAA;AAAA,QACJ;AAAA,QAEF,UAAU,CAAC,QAAQ;AAAA,MAAA;AAAA,MAErB,YAAY;AAAA,MACZ,gBAAgB;A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F,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEArB,EAAe,cAAc;"}
@@ -3,7 +3,7 @@ import { useState as J, useCallback as m, useRef as C, useEffect as P, useMemo a
3
3
  import * as T from "@radix-ui/react-popover";
4
4
  import { c as ie } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as ce } from "react-i18next";
6
- import { I as le } from "./icon-button-8xqRnkdG.js";
6
+ import { I as le } from "./icon-button-CehAeZoP.js";
7
7
  import { u as ue } from "./registry-DvAUVLHh.js";
8
8
  import { X as pe } from "./x-B5YnXwCz.js";
9
9
  const fe = {
@@ -508,4 +508,4 @@ export {
508
508
  xe as H,
509
509
  fe as h
510
510
  };
511
- //# sourceMappingURL=hover-card-Bcku1GQu.js.map
511
+ //# sourceMappingURL=hover-card-BMJBVqIf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card-Bcku1GQu.js","sources":["../../src/components/hover-card/hover-card.agent.ts","../../src/components/hover-card/hover-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HoverCard. */\n/* */\n/* Unlike Tooltip, a hover card holds interactive content, so an agent */\n/* has a legitimate reason to open one and read its state. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HoverCardHandle } from './hover-card';\n\nexport const hoverCardAgent: AgentAdapter<HoverCardHandle> = {\n id: 'hover-card',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.hoverCard.state.isOpen',\n description: 'True when the hover card is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.hoverCard.actions.open',\n description: 'Open the hover card without moving focus into it.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.hoverCard.actions.close',\n description: 'Close the hover card.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'hover-card' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on HoverCard.Root.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { X } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { useAgentRegistration } from '../../agent';\nimport { hoverCardAgent } from './hover-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* Logical → physical side */\n/* -------------------------------------------------------------------- */\n\nexport type HoverCardSide = 'top' | 'end' | 'bottom' | 'start';\n\nfunction resolvePhysicalSide(\n logicalSide: HoverCardSide,\n isRtl: boolean,\n): 'left' | 'top' | 'right' | 'bottom' {\n if (logicalSide === 'top' || logicalSide === 'bottom') return logicalSide;\n if (logicalSide === 'start') return isRtl ? 'right' : 'left';\n /* logicalSide === 'end' */\n return isRtl ? 'left' : 'right';\n}\n\n/* -------------------------------------------------------------------- */\n/* Contexts */\n/* -------------------------------------------------------------------- */\n\ninterface HoverCardA11yContext {\n headingId: string | undefined;\n setHeadingId: (id: string | undefined) => void;\n}\n\nconst A11yContext = createContext<HoverCardA11yContext>({\n headingId: undefined,\n setHeadingId: () => {},\n});\n\ninterface HoverCardRootContext {\n /** Keeps the card open while the pointer or focus is inside the content. */\n cancelClose: () => void;\n closeWithDelay: () => void;\n /** True when this open should move focus into the card. */\n shouldFocusOnOpen: () => boolean;\n /** True when focus was actually moved in, so closing may return it. */\n didMoveFocus: () => boolean;\n noteMovedFocus: () => void;\n /** Called when closing hands focus back, so the trigger's focus handler\n * does not read that return as a fresh Tab and reopen the card. */\n noteFocusReturn: () => void;\n clearMovedFocus: () => void;\n registerContent: (node: HTMLDivElement | null) => void;\n /** The trigger node, used to resolve the reading direction. Content is\n * portalled to body, so only the trigger can see a scoped [dir]. */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n instanceId: string | undefined;\n}\n\nconst RootContext = createContext<HoverCardRootContext>({\n cancelClose: () => {},\n closeWithDelay: () => {},\n shouldFocusOnOpen: () => false,\n didMoveFocus: () => false,\n noteMovedFocus: () => {},\n noteFocusReturn: () => {},\n clearMovedFocus: () => {},\n registerContent: () => {},\n triggerRef: { current: null },\n instanceId: undefined,\n});\n\n/** `flush` moves padding from the Content onto the inner slots, so Media can\n * bleed to the card's edge. */\nconst PaddingContext = createContext<'default' | 'flush'>('default');\n\n/* -------------------------------------------------------------------- */\n/* CVA — content surface */\n/* -------------------------------------------------------------------- */\n\nconst contentVariants = cva(\n [\n // Same elevated surface as Popover: `--card-border` at 32% alpha reads as\n // a subtle edge in both themes, where the shadow alone lets the card\n // float as an unbounded blob on dark. Forced colours upgrade it to a\n // fully visible `CanvasText` edge.\n 'ds:relative ds:bg-[var(--popover)] ds:border ds:border-[color:var(--card-border)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:max-w-[calc(100vw-var(--spacing-lg))]',\n 'ds:z-[var(--z-popover)]',\n 'ds:text-[var(--popover-foreground)] ds:text-[length:var(--font-size-sm)]',\n 'ds:break-words',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=closed]:fade-out-0 ds:data-[state=open]:fade-in-0',\n 'ds:data-[state=closed]:zoom-out-95 ds:data-[state=open]:zoom-in-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2 ds:data-[side=left]:slide-in-from-right-2',\n 'ds:data-[side=right]:slide-in-from-left-2 ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:transition-none ds:motion-reduce:animate-none',\n 'ds:forced-colors:border-[CanvasText]',\n 'ds:focus-visible:outline-none',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:w-[var(--popover-size-sm)]',\n md: 'ds:w-[var(--popover-size-md)]',\n lg: 'ds:w-[var(--popover-size-lg)]',\n },\n padding: {\n default: 'ds:p-[var(--spacing-md)]',\n // Media bleeds to the edge, so the slots pad themselves instead.\n flush: 'ds:p-[var(--spacing-none)] ds:overflow-hidden',\n },\n },\n defaultVariants: {\n size: 'md',\n padding: 'default',\n },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Root */\n/* -------------------------------------------------------------------- */\n\n// Curated agent-readiness handle — see hover-card.agent.ts.\nexport interface HoverCardHandle {\n getIsOpen: () => boolean;\n open: () => void;\n close: () => void;\n}\n\nexport interface HoverCardProps {\n children: ReactNode;\n /**\n * How the card opens. `hover-or-click` (the default) opens on pointer hover\n * without taking focus, and on click, tap or Enter with focus moved into the\n * card so the footer actions are reachable. `click` disables hover entirely.\n */\n openOn?: 'hover-or-click' | 'click';\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Delay before a hover opens the card, in ms. Default 300. */\n openDelay?: number;\n /** Grace period before a pointer leaving closes the card, in ms. Default 300. */\n closeDelay?: number;\n /** Opaque instance id — emitted on Content as `data-component-id`. */\n id?: string;\n}\n\nfunction HoverCardRoot({\n children,\n openOn = 'hover-or-click',\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n openDelay = 300,\n closeDelay = 300,\n id,\n}: HoverCardProps) {\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n const isOpenRef = useRef(isOpen);\n useEffect(() => {\n isOpenRef.current = isOpen;\n }, [isOpen]);\n\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const clearTimer = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n useEffect(() => clearTimer, [clearTimer]);\n\n /* Focus bookkeeping. A hover must never pull focus off whatever the user is\n doing; a click or Enter must move focus in, or the footer buttons are\n unreachable. `focusOnOpen` decides which, and `movedFocus` records whether\n closing is allowed to hand focus back to the trigger. */\n const focusOnOpenRef = useRef(false);\n const movedFocusRef = useRef(false);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLElement | null>(null);\n\n const openWithDelay = useCallback(() => {\n clearTimer();\n timerRef.current = setTimeout(() => {\n focusOnOpenRef.current = false;\n setOpen(true);\n }, openDelay);\n }, [clearTimer, openDelay, setOpen]);\n\n const closeWithDelay = useCallback(() => {\n clearTimer();\n timerRef.current = setTimeout(() => setOpen(false), closeDelay);\n }, [clearTimer, closeDelay, setOpen]);\n\n /* Closing hands focus back to the trigger, which fires the trigger's focus\n handler and would reopen the card it just closed — an Escape that does\n nothing. The return is swallowed once, with a timeout as a safety net so\n a suppression can never outlive the interaction that armed it. */\n const suppressFocusOpenRef = useRef(false);\n const suppressTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const noteFocusReturn = useCallback(() => {\n suppressFocusOpenRef.current = true;\n if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);\n suppressTimerRef.current = setTimeout(() => {\n suppressFocusOpenRef.current = false;\n }, 100);\n }, []);\n useEffect(\n () => () => {\n if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);\n },\n [],\n );\n\n /** Tabbing onto the trigger reveals the card at once, but leaves focus on\n * the trigger so a keyboard user can pass by without being pulled in. */\n const openOnFocus = useCallback(() => {\n if (suppressFocusOpenRef.current) {\n suppressFocusOpenRef.current = false;\n return;\n }\n clearTimer();\n focusOnOpenRef.current = false;\n setOpen(true);\n }, [clearTimer, setOpen]);\n\n const focusContent = useCallback(() => {\n movedFocusRef.current = true;\n contentRef.current?.focus();\n }, []);\n\n /* Press bookkeeping. \"Was the card open?\" is the wrong question: hover and\n Tab both reveal it, so by the time Enter or a click arrives it is already\n open and a naive toggle would close what the user is trying to enter.\n The right question is whether focus was already INSIDE the card, which\n separates \"take me in\" from \"I am in, let me out\".\n\n It must be snapshotted at press start, not read at click time, because\n pointerdown moves focus to the trigger and would erase the answer.\n `null` means an orphan press (a programmatic `.click()`, or assistive\n tech dispatching click alone) and is treated as \"take me in\". */\n const focusWasInsideRef = useRef<boolean | null>(null);\n const notePressStart = useCallback(() => {\n const content = contentRef.current;\n focusWasInsideRef.current = Boolean(\n content && content.contains(document.activeElement),\n );\n }, []);\n\n const handleTriggerClick = useCallback(() => {\n const focusWasInside = focusWasInsideRef.current;\n focusWasInsideRef.current = null;\n if (focusWasInside === true) {\n setOpen(false);\n return;\n }\n focusOnOpenRef.current = true;\n if (isOpenRef.current) {\n // Hover or Tab already opened it, so no state change will fire\n // onOpenAutoFocus. Move focus in directly.\n focusContent();\n } else {\n setOpen(true);\n }\n }, [focusContent, setOpen]);\n\n const agentHandle = useMemo<HoverCardHandle>(\n () => ({\n getIsOpen: () => isOpenRef.current,\n open: () => {\n focusOnOpenRef.current = false;\n setOpen(true);\n },\n close: () => setOpen(false),\n }),\n [setOpen],\n );\n useAgentRegistration(hoverCardAgent, agentHandle, id);\n\n const [headingId, setHeadingId] = useState<string | undefined>(undefined);\n\n const isHoverMode = openOn === 'hover-or-click';\n\n const rootValue = useMemo<HoverCardRootContext>(\n () => ({\n cancelClose: clearTimer,\n closeWithDelay: isHoverMode ? closeWithDelay : () => {},\n shouldFocusOnOpen: () => focusOnOpenRef.current,\n didMoveFocus: () => movedFocusRef.current,\n noteMovedFocus: () => {\n movedFocusRef.current = true;\n },\n noteFocusReturn,\n clearMovedFocus: () => {\n movedFocusRef.current = false;\n },\n registerContent: (node) => {\n contentRef.current = node;\n },\n triggerRef,\n instanceId: id,\n }),\n [clearTimer, closeWithDelay, id, isHoverMode, noteFocusReturn],\n );\n\n const triggerValue = useMemo<HoverCardTriggerContext>(\n () => ({\n isHoverMode,\n openOnFocus,\n openWithDelay,\n closeWithDelay,\n cancelClose: clearTimer,\n notePressStart,\n onClick: handleTriggerClick,\n }),\n [\n clearTimer,\n closeWithDelay,\n handleTriggerClick,\n isHoverMode,\n notePressStart,\n openOnFocus,\n openWithDelay,\n ],\n );\n\n return (\n <A11yContext.Provider value={{ headingId, setHeadingId }}>\n <RootContext.Provider value={rootValue}>\n <TriggerContext.Provider value={triggerValue}>\n <RadixPopover.Root open={isOpen} onOpenChange={setOpen}>\n {children}\n </RadixPopover.Root>\n </TriggerContext.Provider>\n </RootContext.Provider>\n </A11yContext.Provider>\n );\n}\nHoverCardRoot.displayName = 'HoverCard.Root';\n\n/* -------------------------------------------------------------------- */\n/* Trigger */\n/* -------------------------------------------------------------------- */\n\ninterface HoverCardTriggerContext {\n isHoverMode: boolean;\n openOnFocus: () => void;\n openWithDelay: () => void;\n closeWithDelay: () => void;\n cancelClose: () => void;\n notePressStart: () => void;\n onClick: () => void;\n}\n\nconst TriggerContext = createContext<HoverCardTriggerContext>({\n isHoverMode: true,\n openOnFocus: () => {},\n openWithDelay: () => {},\n closeWithDelay: () => {},\n cancelClose: () => {},\n notePressStart: () => {},\n onClick: () => {},\n});\n\nexport type HoverCardTriggerProps = ComponentPropsWithoutRef<\n typeof RadixPopover.Trigger\n>;\n\nconst HoverCardTrigger = forwardRef<HTMLButtonElement, HoverCardTriggerProps>(\n (\n {\n children,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n onPointerDown,\n onKeyDown,\n onClick,\n ...props\n },\n ref,\n ) => {\n const ctx = useContext(TriggerContext);\n const { triggerRef } = useContext(RootContext);\n\n const setRefs = useCallback(\n (node: HTMLButtonElement | null) => {\n triggerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, triggerRef],\n );\n\n return (\n <RadixPopover.Trigger\n ref={setRefs}\n onMouseEnter={(event) => {\n if (ctx.isHoverMode) ctx.openWithDelay();\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n if (ctx.isHoverMode) ctx.closeWithDelay();\n onMouseLeave?.(event);\n }}\n onFocus={(event) => {\n if (ctx.isHoverMode) ctx.openOnFocus();\n onFocus?.(event);\n }}\n onBlur={(event) => {\n if (ctx.isHoverMode) ctx.closeWithDelay();\n onBlur?.(event);\n }}\n onPointerDown={(event) => {\n ctx.notePressStart();\n onPointerDown?.(event);\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') ctx.notePressStart();\n onKeyDown?.(event);\n }}\n onClick={(event) => {\n // Own the toggle outright: Radix's own click toggle would close a\n // card that this very press had just opened via focus.\n event.preventDefault();\n ctx.onClick();\n onClick?.(event);\n }}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n },\n);\nHoverCardTrigger.displayName = 'HoverCard.Trigger';\n\nexport type HoverCardAnchorProps = ComponentPropsWithoutRef<\n typeof RadixPopover.Anchor\n>;\n\nconst HoverCardAnchor = forwardRef<\n ElementRef<typeof RadixPopover.Anchor>,\n HoverCardAnchorProps\n>((props, ref) => {\n const { triggerRef } = useContext(RootContext);\n const setRefs = useCallback(\n (node: ElementRef<typeof RadixPopover.Anchor> | null) => {\n triggerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, triggerRef],\n );\n\n return <RadixPopover.Anchor ref={setRefs} {...props} />;\n});\nHoverCardAnchor.displayName = 'HoverCard.Anchor';\n\n/* -------------------------------------------------------------------- */\n/* Content */\n/* -------------------------------------------------------------------- */\n\nexport interface HoverCardContentProps\n extends\n Omit<\n ComponentPropsWithoutRef<typeof RadixPopover.Content>,\n 'side' | 'align'\n >,\n VariantProps<typeof contentVariants> {\n /** Logical side, resolved against the reading direction. Default `'top'`. */\n side?: HoverCardSide;\n align?: 'start' | 'center' | 'end';\n size?: 'sm' | 'md' | 'lg';\n padding?: 'default' | 'flush';\n /** Render the arrow. Default `true`. */\n showArrow?: boolean;\n /** Render a close button, for touch users on a card with actions. */\n showClose?: boolean;\n /**\n * An action pinned to the top-end corner — the same slot `showClose` uses.\n * For a card whose ANCHOR has a real open action, so the card mirrors it\n * instead of describing it in prose (\"Click to open …\"). Only give a card\n * one when the trigger genuinely opens something; a card that merely points\n * somewhere else should say so in a hint line, because an icon button there\n * promises a click the anchor does not have.\n *\n * A card carrying one must be interactive — the pointer has to be able to\n * travel into it — so do not combine it with a pointer-events-none peek.\n */\n headerAction?: ReactNode;\n className?: string;\n children: ReactNode;\n}\n\nconst HoverCardContent = forwardRef<HTMLDivElement, HoverCardContentProps>(\n (\n {\n side = 'top',\n align = 'center',\n size = 'md',\n padding = 'default',\n showArrow = true,\n showClose = false,\n headerAction,\n dir: providedDirection,\n className,\n children,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onMouseEnter,\n onMouseLeave,\n onFocusCapture,\n ...props\n },\n ref,\n ) => {\n const { headingId } = useContext(A11yContext);\n const root = useContext(RootContext);\n const { t } = useTranslation();\n const [isRtl, setIsRtl] = useState(false);\n const localRef = useRef<HTMLDivElement | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n root.registerContent(node);\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, root],\n );\n\n // Read direction from the TRIGGER, not from this content: the content is\n // portalled to body, where `closest('[dir]')` can only ever find <html>.\n // Reading the trigger lets one RTL region inside an LTR page resolve\n // start/end correctly.\n useEffect(() => {\n const anchor = root.triggerRef.current;\n const scoped = anchor?.closest('[dir]');\n const resolved =\n scoped?.getAttribute('dir') ?? document.documentElement.dir ?? 'ltr';\n setIsRtl(resolved === 'rtl');\n }, [root.triggerRef]);\n\n const contentDirection = providedDirection ?? (isRtl ? 'rtl' : 'ltr');\n const directionIsRtl = contentDirection === 'rtl';\n const physicalSide = resolvePhysicalSide(side, directionIsRtl);\n // Radix resolves `align` physically unless a DirectionProvider is present,\n // which the kit does not mount. On the block axis (a card on the inline\n // start or end) align is unaffected by direction; on the inline axis it\n // must be mirrored by hand so `align=\"start\"` means the reading start.\n const isInlineAxis = physicalSide === 'top' || physicalSide === 'bottom';\n const physicalAlign =\n directionIsRtl && isInlineAxis && align !== 'center'\n ? align === 'start'\n ? 'end'\n : 'start'\n : align;\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n ref={setRefs}\n dir={contentDirection}\n side={physicalSide}\n align={physicalAlign}\n sideOffset={8}\n collisionPadding={8}\n aria-labelledby={headingId}\n className={contentVariants({ size, padding, className })}\n data-component=\"hover-card\"\n data-component-id={root.instanceId}\n onOpenAutoFocus={(event) => {\n // A hover-opened card must not take focus; a click- or\n // Enter-opened one must, or the footer actions are unreachable.\n if (root.shouldFocusOnOpen()) root.noteMovedFocus();\n else event.preventDefault();\n onOpenAutoFocus?.(event);\n }}\n onCloseAutoFocus={(event) => {\n // Only hand focus back if we took it in the first place, and warn\n // the trigger that the focus it is about to receive is a return.\n if (root.didMoveFocus()) root.noteFocusReturn();\n else event.preventDefault();\n root.clearMovedFocus();\n onCloseAutoFocus?.(event);\n }}\n onMouseEnter={(event) => {\n root.cancelClose();\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n root.closeWithDelay();\n onMouseLeave?.(event);\n }}\n onFocusCapture={(event) => {\n root.cancelClose();\n onFocusCapture?.(event);\n }}\n {...props}\n >\n <PaddingContext.Provider value={padding}>\n {children}\n </PaddingContext.Provider>\n {showClose || headerAction ? (\n <div\n className={[\n 'ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]',\n 'ds:z-[1] ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]',\n ].join(' ')}\n >\n {headerAction}\n {showClose ? (\n <RadixPopover.Close asChild>\n <IconButton\n icon={<X />}\n intent=\"ghost\"\n size=\"sm\"\n aria-label={t('common.close', 'Close')}\n />\n </RadixPopover.Close>\n ) : null}\n </div>\n ) : null}\n {showArrow ? (\n // Radix places the arrow on the resolved side and keeps it over\n // the trigger through collision flip and shift.\n //\n // A custom path, not the default polygon, so the card's OUTLINE\n // carries on around the point instead of stopping dead at it. The\n // path is left open (no `Z`), so the fill closes the triangle\n // while the stroke draws only the two slanted sides — a closed\n // path would rule a line straight across the arrow's base.\n // `-translate-y-px` then tucks that base a hairline under the\n // card, so the card's own border does not show through it. The\n // translate is applied inside Radix's rotation wrapper, so \"up\"\n // means \"towards the card\" on every side.\n <RadixPopover.Arrow asChild width={12} height={6}>\n <svg\n viewBox=\"0 0 12 6\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n className=\"ds:-translate-y-px ds:fill-[var(--popover)] ds:stroke-[color:var(--card-border)]\"\n >\n <path d=\"M0 0 L6 6 L12 0\" strokeLinejoin=\"round\" />\n </svg>\n </RadixPopover.Arrow>\n ) : null}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n },\n);\nHoverCardContent.displayName = 'HoverCard.Content';\n\n/* -------------------------------------------------------------------- */\n/* Slots */\n/* -------------------------------------------------------------------- */\n\n/** The media slot: an avatar row, a thumbnail, or a banner. Under\n * `padding=\"flush\"` it bleeds to the card's edge. */\nconst HoverCardMedia = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"media\"\n className={['ds:flex ds:items-center ds:gap-[var(--spacing-sm)]', className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n));\nHoverCardMedia.displayName = 'HoverCard.Media';\n\n/**\n * The card's category line, above the heading: \"Signing\", \"Billing\",\n * \"Anamnesis\". It says WHICH KIND of thing the reader is looking at, so a\n * card that appears under the pointer is self-describing without repeating\n * the chip's own words in the heading.\n *\n * Decorative by role: the heading carries the meaning and the accessible\n * name, so the eyebrow is quiet type and adds no landmark of its own.\n */\nconst HoverCardEyebrow = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n data-slot=\"eyebrow\"\n className={[\n 'ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n));\nHoverCardEyebrow.displayName = 'HoverCard.Eyebrow';\n\nexport interface HoverCardHeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n}\n\nconst HoverCardHeading = forwardRef<HTMLHeadingElement, HoverCardHeadingProps>(\n ({ as: Tag = 'h3', id: providedId, className, ...props }, ref) => {\n const generatedId = useId();\n const headingId = providedId ?? generatedId;\n const { setHeadingId } = useContext(A11yContext);\n const padding = useContext(PaddingContext);\n\n useEffect(() => {\n setHeadingId(headingId);\n return () => setHeadingId(undefined);\n }, [headingId, setHeadingId]);\n\n return (\n <Tag\n ref={ref}\n id={headingId}\n data-slot=\"heading\"\n className={[\n 'type-title-item ds:leading-snug ds:break-words',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-md)]'\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n },\n);\nHoverCardHeading.displayName = 'HoverCard.Heading';\n\n/** The body slot. A `div`, not a `p`: a hover card body routinely holds\n * KeyValuePairs and chips, and a `p` may only contain phrasing content. */\nconst HoverCardBody = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const padding = useContext(PaddingContext);\n\n return (\n <div\n ref={ref}\n data-slot=\"body\"\n className={[\n 'type-body-sm ds:text-[var(--muted-foreground)]',\n 'ds:mt-[var(--spacing-xs)]',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]'\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n});\nHoverCardBody.displayName = 'HoverCard.Body';\n\n/** The action row. Actions sit at the inline end; anything that should stay at\n * the inline start (a status badge) gets `ds:me-auto`. */\nconst HoverCardFooter = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const padding = useContext(PaddingContext);\n\n return (\n <div\n ref={ref}\n data-slot=\"footer\"\n className={[\n 'ds:flex ds:flex-wrap ds:items-center ds:justify-end',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:border-t ds:border-[color:var(--card-border)]',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]'\n : 'ds:mt-[var(--spacing-md)] ds:pt-[var(--spacing-md)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n});\nHoverCardFooter.displayName = 'HoverCard.Footer';\n\n/* -------------------------------------------------------------------- */\n\nexport const HoverCard = Object.assign(HoverCardRoot, {\n Root: HoverCardRoot,\n Trigger: HoverCardTrigger,\n // Anchor the card to an arbitrary element when a trigger button is\n // unsuitable, such as a calendar grid cell.\n Anchor: HoverCardAnchor,\n Content: HoverCardContent,\n Media: HoverCardMedia,\n Eyebrow: HoverCardEyebrow,\n Heading: HoverCardHeading,\n Body: HoverCardBody,\n Footer: HoverCardFooter,\n});\n"],"names":["hoverCardAgent","handle","resolvePhysicalSide","logicalSide","isRtl","A11yContext","createContext","RootContext","PaddingContext","contentVariants","cva","HoverCardRoot","children","openOn","controlledOpen","defaultOpen","onOpenChange","openDelay","closeDelay","id","internalOpen","setInternalOpen","useState","isControlled","isOpen","setOpen","useCallback","next","isOpenRef","useRef","useEffect","timerRef","clearTimer","focusOnOpenRef","movedFocusRef","contentRef","triggerRef","openWithDelay","closeWithDelay","suppressFocusOpenRef","suppressTimerRef","noteFocusReturn","openOnFocus","focusContent","_a","focusWasInsideRef","notePressStart","content","handleTriggerClick","focusWasInside","agentHandle","useMemo","useAgentRegistration","headingId","setHeadingId","isHoverMode","rootValue","node","triggerValue","jsx","TriggerContext","RadixPopover","HoverCardTrigger","forwardRef","onMouseEnter","onMouseLeave","onFocus","onBlur","onPointerDown","onKeyDown","onClick","props","ref","ctx","useContext","setRefs","event","HoverCardAnchor","HoverCardContent","side","align","size","padding","showArrow","showClose","headerAction","providedDirection","className","onOpenAutoFocus","onCloseAutoFocus","onFocusCapture","root","t","useTranslation","setIsRtl","localRef","anchor","scoped","resolved","contentDirection","directionIsRtl","physicalSide","physicalAlign","jsxs","IconButton","X","HoverCardMedia","HoverCardEyebrow","HoverCardHeading","Tag","providedId","generatedId","useId","HoverCardBody","HoverCardFooter","HoverCard"],"mappings":";;;;;;;;AAUO,MAAMA,KAAgD;AAAA,EAC3D,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,KAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,aAAA;AAAA,IACvC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;ACpBA,SAASC,GACPC,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MAAY,UACR,4GACA;AAAA,QACJK;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGhB;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;AACD2C,GAAgB,cAAc;AAIvB,MAAMC,KAAY,OAAO,OAAOxG,GAAe;AAAA,EACpD,MAAMA;AAAA,EACN,SAASmD;AAAA;AAAA;AAAA,EAGT,QAAQe;AAAA,EACR,SAASC;AAAA,EACT,OAAO4B;AAAA,EACP,SAASC;AAAA,EACT,SAASC;AAAA,EACT,MAAMK;AAAA,EACN,QAAQC;AACV,CAAC;"}
1
+ {"version":3,"file":"hover-card-BMJBVqIf.js","sources":["../../src/components/hover-card/hover-card.agent.ts","../../src/components/hover-card/hover-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HoverCard. */\n/* */\n/* Unlike Tooltip, a hover card holds interactive content, so an agent */\n/* has a legitimate reason to open one and read its state. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HoverCardHandle } from './hover-card';\n\nexport const hoverCardAgent: AgentAdapter<HoverCardHandle> = {\n id: 'hover-card',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.hoverCard.state.isOpen',\n description: 'True when the hover card is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.hoverCard.actions.open',\n description: 'Open the hover card without moving focus into it.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.hoverCard.actions.close',\n description: 'Close the hover card.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'hover-card' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on HoverCard.Root.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { X } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { useAgentRegistration } from '../../agent';\nimport { hoverCardAgent } from './hover-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* Logical → physical side */\n/* -------------------------------------------------------------------- */\n\nexport type HoverCardSide = 'top' | 'end' | 'bottom' | 'start';\n\nfunction resolvePhysicalSide(\n logicalSide: HoverCardSide,\n isRtl: boolean,\n): 'left' | 'top' | 'right' | 'bottom' {\n if (logicalSide === 'top' || logicalSide === 'bottom') return logicalSide;\n if (logicalSide === 'start') return isRtl ? 'right' : 'left';\n /* logicalSide === 'end' */\n return isRtl ? 'left' : 'right';\n}\n\n/* -------------------------------------------------------------------- */\n/* Contexts */\n/* -------------------------------------------------------------------- */\n\ninterface HoverCardA11yContext {\n headingId: string | undefined;\n setHeadingId: (id: string | undefined) => void;\n}\n\nconst A11yContext = createContext<HoverCardA11yContext>({\n headingId: undefined,\n setHeadingId: () => {},\n});\n\ninterface HoverCardRootContext {\n /** Keeps the card open while the pointer or focus is inside the content. */\n cancelClose: () => void;\n closeWithDelay: () => void;\n /** True when this open should move focus into the card. */\n shouldFocusOnOpen: () => boolean;\n /** True when focus was actually moved in, so closing may return it. */\n didMoveFocus: () => boolean;\n noteMovedFocus: () => void;\n /** Called when closing hands focus back, so the trigger's focus handler\n * does not read that return as a fresh Tab and reopen the card. */\n noteFocusReturn: () => void;\n clearMovedFocus: () => void;\n registerContent: (node: HTMLDivElement | null) => void;\n /** The trigger node, used to resolve the reading direction. Content is\n * portalled to body, so only the trigger can see a scoped [dir]. */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n instanceId: string | undefined;\n}\n\nconst RootContext = createContext<HoverCardRootContext>({\n cancelClose: () => {},\n closeWithDelay: () => {},\n shouldFocusOnOpen: () => false,\n didMoveFocus: () => false,\n noteMovedFocus: () => {},\n noteFocusReturn: () => {},\n clearMovedFocus: () => {},\n registerContent: () => {},\n triggerRef: { current: null },\n instanceId: undefined,\n});\n\n/** `flush` moves padding from the Content onto the inner slots, so Media can\n * bleed to the card's edge. */\nconst PaddingContext = createContext<'default' | 'flush'>('default');\n\n/* -------------------------------------------------------------------- */\n/* CVA — content surface */\n/* -------------------------------------------------------------------- */\n\nconst contentVariants = cva(\n [\n // Same elevated surface as Popover: `--card-border` at 32% alpha reads as\n // a subtle edge in both themes, where the shadow alone lets the card\n // float as an unbounded blob on dark. Forced colours upgrade it to a\n // fully visible `CanvasText` edge.\n 'ds:relative ds:bg-[var(--popover)] ds:border ds:border-[color:var(--card-border)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:max-w-[calc(100vw-var(--spacing-lg))]',\n 'ds:z-[var(--z-popover)]',\n 'ds:text-[var(--popover-foreground)] ds:text-[length:var(--font-size-sm)]',\n 'ds:break-words',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=closed]:fade-out-0 ds:data-[state=open]:fade-in-0',\n 'ds:data-[state=closed]:zoom-out-95 ds:data-[state=open]:zoom-in-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2 ds:data-[side=left]:slide-in-from-right-2',\n 'ds:data-[side=right]:slide-in-from-left-2 ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:transition-none ds:motion-reduce:animate-none',\n 'ds:forced-colors:border-[CanvasText]',\n 'ds:focus-visible:outline-none',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:w-[var(--popover-size-sm)]',\n md: 'ds:w-[var(--popover-size-md)]',\n lg: 'ds:w-[var(--popover-size-lg)]',\n },\n padding: {\n default: 'ds:p-[var(--spacing-md)]',\n // Media bleeds to the edge, so the slots pad themselves instead.\n flush: 'ds:p-[var(--spacing-none)] ds:overflow-hidden',\n },\n },\n defaultVariants: {\n size: 'md',\n padding: 'default',\n },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Root */\n/* -------------------------------------------------------------------- */\n\n// Curated agent-readiness handle — see hover-card.agent.ts.\nexport interface HoverCardHandle {\n getIsOpen: () => boolean;\n open: () => void;\n close: () => void;\n}\n\nexport interface HoverCardProps {\n children: ReactNode;\n /**\n * How the card opens. `hover-or-click` (the default) opens on pointer hover\n * without taking focus, and on click, tap or Enter with focus moved into the\n * card so the footer actions are reachable. `click` disables hover entirely.\n */\n openOn?: 'hover-or-click' | 'click';\n /** Controlled open state. */\n open?: boolean;\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Delay before a hover opens the card, in ms. Default 300. */\n openDelay?: number;\n /** Grace period before a pointer leaving closes the card, in ms. Default 300. */\n closeDelay?: number;\n /** Opaque instance id — emitted on Content as `data-component-id`. */\n id?: string;\n}\n\nfunction HoverCardRoot({\n children,\n openOn = 'hover-or-click',\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n openDelay = 300,\n closeDelay = 300,\n id,\n}: HoverCardProps) {\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n const isOpenRef = useRef(isOpen);\n useEffect(() => {\n isOpenRef.current = isOpen;\n }, [isOpen]);\n\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const clearTimer = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n useEffect(() => clearTimer, [clearTimer]);\n\n /* Focus bookkeeping. A hover must never pull focus off whatever the user is\n doing; a click or Enter must move focus in, or the footer buttons are\n unreachable. `focusOnOpen` decides which, and `movedFocus` records whether\n closing is allowed to hand focus back to the trigger. */\n const focusOnOpenRef = useRef(false);\n const movedFocusRef = useRef(false);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLElement | null>(null);\n\n const openWithDelay = useCallback(() => {\n clearTimer();\n timerRef.current = setTimeout(() => {\n focusOnOpenRef.current = false;\n setOpen(true);\n }, openDelay);\n }, [clearTimer, openDelay, setOpen]);\n\n const closeWithDelay = useCallback(() => {\n clearTimer();\n timerRef.current = setTimeout(() => setOpen(false), closeDelay);\n }, [clearTimer, closeDelay, setOpen]);\n\n /* Closing hands focus back to the trigger, which fires the trigger's focus\n handler and would reopen the card it just closed — an Escape that does\n nothing. The return is swallowed once, with a timeout as a safety net so\n a suppression can never outlive the interaction that armed it. */\n const suppressFocusOpenRef = useRef(false);\n const suppressTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const noteFocusReturn = useCallback(() => {\n suppressFocusOpenRef.current = true;\n if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);\n suppressTimerRef.current = setTimeout(() => {\n suppressFocusOpenRef.current = false;\n }, 100);\n }, []);\n useEffect(\n () => () => {\n if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);\n },\n [],\n );\n\n /** Tabbing onto the trigger reveals the card at once, but leaves focus on\n * the trigger so a keyboard user can pass by without being pulled in. */\n const openOnFocus = useCallback(() => {\n if (suppressFocusOpenRef.current) {\n suppressFocusOpenRef.current = false;\n return;\n }\n clearTimer();\n focusOnOpenRef.current = false;\n setOpen(true);\n }, [clearTimer, setOpen]);\n\n const focusContent = useCallback(() => {\n movedFocusRef.current = true;\n contentRef.current?.focus();\n }, []);\n\n /* Press bookkeeping. \"Was the card open?\" is the wrong question: hover and\n Tab both reveal it, so by the time Enter or a click arrives it is already\n open and a naive toggle would close what the user is trying to enter.\n The right question is whether focus was already INSIDE the card, which\n separates \"take me in\" from \"I am in, let me out\".\n\n It must be snapshotted at press start, not read at click time, because\n pointerdown moves focus to the trigger and would erase the answer.\n `null` means an orphan press (a programmatic `.click()`, or assistive\n tech dispatching click alone) and is treated as \"take me in\". */\n const focusWasInsideRef = useRef<boolean | null>(null);\n const notePressStart = useCallback(() => {\n const content = contentRef.current;\n focusWasInsideRef.current = Boolean(\n content && content.contains(document.activeElement),\n );\n }, []);\n\n const handleTriggerClick = useCallback(() => {\n const focusWasInside = focusWasInsideRef.current;\n focusWasInsideRef.current = null;\n if (focusWasInside === true) {\n setOpen(false);\n return;\n }\n focusOnOpenRef.current = true;\n if (isOpenRef.current) {\n // Hover or Tab already opened it, so no state change will fire\n // onOpenAutoFocus. Move focus in directly.\n focusContent();\n } else {\n setOpen(true);\n }\n }, [focusContent, setOpen]);\n\n const agentHandle = useMemo<HoverCardHandle>(\n () => ({\n getIsOpen: () => isOpenRef.current,\n open: () => {\n focusOnOpenRef.current = false;\n setOpen(true);\n },\n close: () => setOpen(false),\n }),\n [setOpen],\n );\n useAgentRegistration(hoverCardAgent, agentHandle, id);\n\n const [headingId, setHeadingId] = useState<string | undefined>(undefined);\n\n const isHoverMode = openOn === 'hover-or-click';\n\n const rootValue = useMemo<HoverCardRootContext>(\n () => ({\n cancelClose: clearTimer,\n closeWithDelay: isHoverMode ? closeWithDelay : () => {},\n shouldFocusOnOpen: () => focusOnOpenRef.current,\n didMoveFocus: () => movedFocusRef.current,\n noteMovedFocus: () => {\n movedFocusRef.current = true;\n },\n noteFocusReturn,\n clearMovedFocus: () => {\n movedFocusRef.current = false;\n },\n registerContent: (node) => {\n contentRef.current = node;\n },\n triggerRef,\n instanceId: id,\n }),\n [clearTimer, closeWithDelay, id, isHoverMode, noteFocusReturn],\n );\n\n const triggerValue = useMemo<HoverCardTriggerContext>(\n () => ({\n isHoverMode,\n openOnFocus,\n openWithDelay,\n closeWithDelay,\n cancelClose: clearTimer,\n notePressStart,\n onClick: handleTriggerClick,\n }),\n [\n clearTimer,\n closeWithDelay,\n handleTriggerClick,\n isHoverMode,\n notePressStart,\n openOnFocus,\n openWithDelay,\n ],\n );\n\n return (\n <A11yContext.Provider value={{ headingId, setHeadingId }}>\n <RootContext.Provider value={rootValue}>\n <TriggerContext.Provider value={triggerValue}>\n <RadixPopover.Root open={isOpen} onOpenChange={setOpen}>\n {children}\n </RadixPopover.Root>\n </TriggerContext.Provider>\n </RootContext.Provider>\n </A11yContext.Provider>\n );\n}\nHoverCardRoot.displayName = 'HoverCard.Root';\n\n/* -------------------------------------------------------------------- */\n/* Trigger */\n/* -------------------------------------------------------------------- */\n\ninterface HoverCardTriggerContext {\n isHoverMode: boolean;\n openOnFocus: () => void;\n openWithDelay: () => void;\n closeWithDelay: () => void;\n cancelClose: () => void;\n notePressStart: () => void;\n onClick: () => void;\n}\n\nconst TriggerContext = createContext<HoverCardTriggerContext>({\n isHoverMode: true,\n openOnFocus: () => {},\n openWithDelay: () => {},\n closeWithDelay: () => {},\n cancelClose: () => {},\n notePressStart: () => {},\n onClick: () => {},\n});\n\nexport type HoverCardTriggerProps = ComponentPropsWithoutRef<\n typeof RadixPopover.Trigger\n>;\n\nconst HoverCardTrigger = forwardRef<HTMLButtonElement, HoverCardTriggerProps>(\n (\n {\n children,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n onPointerDown,\n onKeyDown,\n onClick,\n ...props\n },\n ref,\n ) => {\n const ctx = useContext(TriggerContext);\n const { triggerRef } = useContext(RootContext);\n\n const setRefs = useCallback(\n (node: HTMLButtonElement | null) => {\n triggerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, triggerRef],\n );\n\n return (\n <RadixPopover.Trigger\n ref={setRefs}\n onMouseEnter={(event) => {\n if (ctx.isHoverMode) ctx.openWithDelay();\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n if (ctx.isHoverMode) ctx.closeWithDelay();\n onMouseLeave?.(event);\n }}\n onFocus={(event) => {\n if (ctx.isHoverMode) ctx.openOnFocus();\n onFocus?.(event);\n }}\n onBlur={(event) => {\n if (ctx.isHoverMode) ctx.closeWithDelay();\n onBlur?.(event);\n }}\n onPointerDown={(event) => {\n ctx.notePressStart();\n onPointerDown?.(event);\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') ctx.notePressStart();\n onKeyDown?.(event);\n }}\n onClick={(event) => {\n // Own the toggle outright: Radix's own click toggle would close a\n // card that this very press had just opened via focus.\n event.preventDefault();\n ctx.onClick();\n onClick?.(event);\n }}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n },\n);\nHoverCardTrigger.displayName = 'HoverCard.Trigger';\n\nexport type HoverCardAnchorProps = ComponentPropsWithoutRef<\n typeof RadixPopover.Anchor\n>;\n\nconst HoverCardAnchor = forwardRef<\n ElementRef<typeof RadixPopover.Anchor>,\n HoverCardAnchorProps\n>((props, ref) => {\n const { triggerRef } = useContext(RootContext);\n const setRefs = useCallback(\n (node: ElementRef<typeof RadixPopover.Anchor> | null) => {\n triggerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, triggerRef],\n );\n\n return <RadixPopover.Anchor ref={setRefs} {...props} />;\n});\nHoverCardAnchor.displayName = 'HoverCard.Anchor';\n\n/* -------------------------------------------------------------------- */\n/* Content */\n/* -------------------------------------------------------------------- */\n\nexport interface HoverCardContentProps\n extends\n Omit<\n ComponentPropsWithoutRef<typeof RadixPopover.Content>,\n 'side' | 'align'\n >,\n VariantProps<typeof contentVariants> {\n /** Logical side, resolved against the reading direction. Default `'top'`. */\n side?: HoverCardSide;\n align?: 'start' | 'center' | 'end';\n size?: 'sm' | 'md' | 'lg';\n padding?: 'default' | 'flush';\n /** Render the arrow. Default `true`. */\n showArrow?: boolean;\n /** Render a close button, for touch users on a card with actions. */\n showClose?: boolean;\n /**\n * An action pinned to the top-end corner — the same slot `showClose` uses.\n * For a card whose ANCHOR has a real open action, so the card mirrors it\n * instead of describing it in prose (\"Click to open …\"). Only give a card\n * one when the trigger genuinely opens something; a card that merely points\n * somewhere else should say so in a hint line, because an icon button there\n * promises a click the anchor does not have.\n *\n * A card carrying one must be interactive — the pointer has to be able to\n * travel into it — so do not combine it with a pointer-events-none peek.\n */\n headerAction?: ReactNode;\n className?: string;\n children: ReactNode;\n}\n\nconst HoverCardContent = forwardRef<HTMLDivElement, HoverCardContentProps>(\n (\n {\n side = 'top',\n align = 'center',\n size = 'md',\n padding = 'default',\n showArrow = true,\n showClose = false,\n headerAction,\n dir: providedDirection,\n className,\n children,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onMouseEnter,\n onMouseLeave,\n onFocusCapture,\n ...props\n },\n ref,\n ) => {\n const { headingId } = useContext(A11yContext);\n const root = useContext(RootContext);\n const { t } = useTranslation();\n const [isRtl, setIsRtl] = useState(false);\n const localRef = useRef<HTMLDivElement | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n root.registerContent(node);\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref, root],\n );\n\n // Read direction from the TRIGGER, not from this content: the content is\n // portalled to body, where `closest('[dir]')` can only ever find <html>.\n // Reading the trigger lets one RTL region inside an LTR page resolve\n // start/end correctly.\n useEffect(() => {\n const anchor = root.triggerRef.current;\n const scoped = anchor?.closest('[dir]');\n const resolved =\n scoped?.getAttribute('dir') ?? document.documentElement.dir ?? 'ltr';\n setIsRtl(resolved === 'rtl');\n }, [root.triggerRef]);\n\n const contentDirection = providedDirection ?? (isRtl ? 'rtl' : 'ltr');\n const directionIsRtl = contentDirection === 'rtl';\n const physicalSide = resolvePhysicalSide(side, directionIsRtl);\n // Radix resolves `align` physically unless a DirectionProvider is present,\n // which the kit does not mount. On the block axis (a card on the inline\n // start or end) align is unaffected by direction; on the inline axis it\n // must be mirrored by hand so `align=\"start\"` means the reading start.\n const isInlineAxis = physicalSide === 'top' || physicalSide === 'bottom';\n const physicalAlign =\n directionIsRtl && isInlineAxis && align !== 'center'\n ? align === 'start'\n ? 'end'\n : 'start'\n : align;\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n ref={setRefs}\n dir={contentDirection}\n side={physicalSide}\n align={physicalAlign}\n sideOffset={8}\n collisionPadding={8}\n aria-labelledby={headingId}\n className={contentVariants({ size, padding, className })}\n data-component=\"hover-card\"\n data-component-id={root.instanceId}\n onOpenAutoFocus={(event) => {\n // A hover-opened card must not take focus; a click- or\n // Enter-opened one must, or the footer actions are unreachable.\n if (root.shouldFocusOnOpen()) root.noteMovedFocus();\n else event.preventDefault();\n onOpenAutoFocus?.(event);\n }}\n onCloseAutoFocus={(event) => {\n // Only hand focus back if we took it in the first place, and warn\n // the trigger that the focus it is about to receive is a return.\n if (root.didMoveFocus()) root.noteFocusReturn();\n else event.preventDefault();\n root.clearMovedFocus();\n onCloseAutoFocus?.(event);\n }}\n onMouseEnter={(event) => {\n root.cancelClose();\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n root.closeWithDelay();\n onMouseLeave?.(event);\n }}\n onFocusCapture={(event) => {\n root.cancelClose();\n onFocusCapture?.(event);\n }}\n {...props}\n >\n <PaddingContext.Provider value={padding}>\n {children}\n </PaddingContext.Provider>\n {showClose || headerAction ? (\n <div\n className={[\n 'ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]',\n 'ds:z-[1] ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]',\n ].join(' ')}\n >\n {headerAction}\n {showClose ? (\n <RadixPopover.Close asChild>\n <IconButton\n icon={<X />}\n intent=\"ghost\"\n size=\"sm\"\n aria-label={t('common.close', 'Close')}\n />\n </RadixPopover.Close>\n ) : null}\n </div>\n ) : null}\n {showArrow ? (\n // Radix places the arrow on the resolved side and keeps it over\n // the trigger through collision flip and shift.\n //\n // A custom path, not the default polygon, so the card's OUTLINE\n // carries on around the point instead of stopping dead at it. The\n // path is left open (no `Z`), so the fill closes the triangle\n // while the stroke draws only the two slanted sides — a closed\n // path would rule a line straight across the arrow's base.\n // `-translate-y-px` then tucks that base a hairline under the\n // card, so the card's own border does not show through it. The\n // translate is applied inside Radix's rotation wrapper, so \"up\"\n // means \"towards the card\" on every side.\n <RadixPopover.Arrow asChild width={12} height={6}>\n <svg\n viewBox=\"0 0 12 6\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n className=\"ds:-translate-y-px ds:fill-[var(--popover)] ds:stroke-[color:var(--card-border)]\"\n >\n <path d=\"M0 0 L6 6 L12 0\" strokeLinejoin=\"round\" />\n </svg>\n </RadixPopover.Arrow>\n ) : null}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n },\n);\nHoverCardContent.displayName = 'HoverCard.Content';\n\n/* -------------------------------------------------------------------- */\n/* Slots */\n/* -------------------------------------------------------------------- */\n\n/** The media slot: an avatar row, a thumbnail, or a banner. Under\n * `padding=\"flush\"` it bleeds to the card's edge. */\nconst HoverCardMedia = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"media\"\n className={['ds:flex ds:items-center ds:gap-[var(--spacing-sm)]', className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n));\nHoverCardMedia.displayName = 'HoverCard.Media';\n\n/**\n * The card's category line, above the heading: \"Signing\", \"Billing\",\n * \"Anamnesis\". It says WHICH KIND of thing the reader is looking at, so a\n * card that appears under the pointer is self-describing without repeating\n * the chip's own words in the heading.\n *\n * Decorative by role: the heading carries the meaning and the accessible\n * name, so the eyebrow is quiet type and adds no landmark of its own.\n */\nconst HoverCardEyebrow = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n data-slot=\"eyebrow\"\n className={[\n 'ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n));\nHoverCardEyebrow.displayName = 'HoverCard.Eyebrow';\n\nexport interface HoverCardHeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n}\n\nconst HoverCardHeading = forwardRef<HTMLHeadingElement, HoverCardHeadingProps>(\n ({ as: Tag = 'h3', id: providedId, className, ...props }, ref) => {\n const generatedId = useId();\n const headingId = providedId ?? generatedId;\n const { setHeadingId } = useContext(A11yContext);\n const padding = useContext(PaddingContext);\n\n useEffect(() => {\n setHeadingId(headingId);\n return () => setHeadingId(undefined);\n }, [headingId, setHeadingId]);\n\n return (\n <Tag\n ref={ref}\n id={headingId}\n data-slot=\"heading\"\n className={[\n 'type-title-item ds:leading-snug ds:break-words',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-md)]'\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n },\n);\nHoverCardHeading.displayName = 'HoverCard.Heading';\n\n/** The body slot. A `div`, not a `p`: a hover card body routinely holds\n * KeyValuePairs and chips, and a `p` may only contain phrasing content. */\nconst HoverCardBody = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const padding = useContext(PaddingContext);\n\n return (\n <div\n ref={ref}\n data-slot=\"body\"\n className={[\n 'type-body-sm ds:text-[var(--muted-foreground)]',\n 'ds:mt-[var(--spacing-xs)]',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]'\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n});\nHoverCardBody.displayName = 'HoverCard.Body';\n\n/** The action row. Actions sit at the inline end; anything that should stay at\n * the inline start (a status badge) gets `ds:me-auto`. */\nconst HoverCardFooter = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const padding = useContext(PaddingContext);\n\n return (\n <div\n ref={ref}\n data-slot=\"footer\"\n className={[\n 'ds:flex ds:flex-wrap ds:items-center ds:justify-end',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:border-t ds:border-[color:var(--card-border)]',\n padding === 'flush'\n ? 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]'\n : 'ds:mt-[var(--spacing-md)] ds:pt-[var(--spacing-md)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n});\nHoverCardFooter.displayName = 'HoverCard.Footer';\n\n/* -------------------------------------------------------------------- */\n\nexport const HoverCard = Object.assign(HoverCardRoot, {\n Root: HoverCardRoot,\n Trigger: HoverCardTrigger,\n // Anchor the card to an arbitrary element when a trigger button is\n // unsuitable, such as a calendar grid cell.\n Anchor: HoverCardAnchor,\n Content: HoverCardContent,\n Media: HoverCardMedia,\n Eyebrow: HoverCardEyebrow,\n Heading: HoverCardHeading,\n Body: HoverCardBody,\n Footer: HoverCardFooter,\n});\n"],"names":["hoverCardAgent","handle","resolvePhysicalSide","logicalSide","isRtl","A11yContext","createContext","RootContext","PaddingContext","contentVariants","cva","HoverCardRoot","children","openOn","controlledOpen","defaultOpen","onOpenChange","openDelay","closeDelay","id","internalOpen","setInternalOpen","useState","isControlled","isOpen","setOpen","useCallback","next","isOpenRef","useRef","useEffect","timerRef","clearTimer","focusOnOpenRef","movedFocusRef","contentRef","triggerRef","openWithDelay","closeWithDelay","suppressFocusOpenRef","suppressTimerRef","noteFocusReturn","openOnFocus","focusContent","_a","focusWasInsideRef","notePressStart","content","handleTriggerClick","focusWasInside","agentHandle","useMemo","useAgentRegistration","headingId","setHeadingId","isHoverMode","rootValue","node","triggerValue","jsx","TriggerContext","RadixPopover","HoverCardTrigger","forwardRef","onMouseEnter","onMouseLeave","onFocus","onBlur","onPointerDown","onKeyDown","onClick","props","ref","ctx","useContext","setRefs","event","HoverCardAnchor","HoverCardContent","side","align","size","padding","showArrow","showClose","headerAction","providedDirection","className","onOpenAutoFocus","onCloseAutoFocus","onFocusCapture","root","t","useTranslation","setIsRtl","localRef","anchor","scoped","resolved","contentDirection","directionIsRtl","physicalSide","physicalAlign","jsxs","IconButton","X","HoverCardMedia","HoverCardEyebrow","HoverCardHeading","Tag","providedId","generatedId","useId","HoverCardBody","HoverCardFooter","HoverCard"],"mappings":";;;;;;;;AAUO,MAAMA,KAAgD;AAAA,EAC3D,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,KAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,aAAA;AAAA,IACvC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;ACpBA,SAASC,GACPC,GACAC,GACqC;AACrC,SAAID,MAAgB,SAASA,MAAgB,WAAiBA,IAC1DA,MAAgB,UAAgBC,IAAQ,UAAU,SAE/CA,IAAQ,SAAS;AAC1B;AAWA,MAAMC,IAAcC,EAAoC;AAAA,EACtD,WAAW;AA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AAY,OAAO,OAAOxG,GAAe;AAAA,EACpD,MAAMA;AAAA,EACN,SAASmD;AAAA;AAAA;AAAA,EAGT,QAAQe;AAAA,EACR,SAASC;AAAA,EACT,OAAO4B;AAAA,EACP,SAASC;AAAA,EACT,SAASC;AAAA,EACT,MAAMK;AAAA,EACN,QAAQC;AACV,CAAC;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as b } from "react";
3
- import { B as u } from "./button-nJaPh_HC.js";
3
+ import { B as u } from "./button-CaUe1uyd.js";
4
4
  import { c as p } from "./index-D2ZczOXr.js";
5
5
  import { T as h } from "./tooltip-Cp-PLePW.js";
6
6
  const g = p(
@@ -75,4 +75,4 @@ x.displayName = "IconButton";
75
75
  export {
76
76
  x as I
77
77
  };
78
- //# sourceMappingURL=icon-button-8xqRnkdG.js.map
78
+ //# sourceMappingURL=icon-button-CehAeZoP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button-8xqRnkdG.js","sources":["../../src/components/button/icon-button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Button, type ButtonProps } from './button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Tooltip } from '../tooltip';\n\nconst iconButtonVariants = cva(\n [\n 'ds:p-0',\n // Active-state styling when an IconButton participates in an\n // IconButtonGroup's `toggle-single` / `toggle-multi` mode. The\n // group sets `aria-checked=\"true\"` (radiogroup) or\n // `aria-pressed=\"true\"` (toolbar/group) on the selected child;\n // without these utility classes the selection wouldn't read at a\n // glance — see HeaderSettings' Appearance row + ThemeToggle's\n // split variant.\n 'ds:aria-checked:bg-muted ds:aria-checked:text-foreground',\n 'ds:aria-checked:border-primary',\n 'ds:aria-pressed:bg-muted ds:aria-pressed:text-foreground',\n 'ds:aria-pressed:border-primary',\n ].join(' '),\n {\n variants: {\n size: {\n // `sm` (32px) and `md` (40px) sit below `--min-target-size` (44/48px).\n // IconButton overrides Button's `size` variant, so it doesn't inherit\n // Button's touch-target `::before`. Re-add it here for the under-target\n // sizes: a transparent pseudo-element expands the *hit area* to\n // `--min-target-size` on touch / small screens, then is hidden from the\n // `sm:` breakpoint up (desktop pointer input keeps the compact box, so\n // there's no visual/layout change on the desktop Chromatic baselines).\n // `lg` (48px) already clears the target, so it needs no expansion.\n sm: 'ds:w-8 ds:h-8 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n md: 'ds:w-10 ds:h-10 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n lg: 'ds:w-12 ds:h-12',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nexport type IconButtonProps = Omit<\n ButtonProps,\n 'startIcon' | 'endIcon' | 'children' | 'size' | 'flipIconInRtl'\n> &\n VariantProps<typeof iconButtonVariants> & {\n icon: React.ReactNode;\n tooltip?: string;\n 'aria-label'?: string;\n /**\n * Mirror the icon horizontally in RTL. Default `false` — only enable\n * for directional glyphs (arrows, chevrons). See Button.flipIconInRtl.\n */\n flipIconInRtl?: boolean;\n };\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n icon,\n size,\n intent = 'outline',\n className,\n tooltip,\n flipIconInRtl = false,\n ...props\n },\n ref,\n ) => {\n const ariaLabel = props['aria-label'] || tooltip;\n\n if (import.meta.env.DEV && !ariaLabel) {\n console.warn(\n 'IconButton: aria-label or tooltip prop is required for accessibility.',\n );\n }\n\n const iconSizeClass =\n size === 'sm'\n ? 'ds:size-4'\n : size === 'lg'\n ? 'ds:size-5'\n : 'ds:size-[18px]';\n const iconFlipClass = flipIconInRtl ? 'ds:rtl:rotate-180' : '';\n\n const button = (\n <Button\n ref={ref}\n size={size}\n intent={intent}\n className={iconButtonVariants({ size, className })}\n aria-label={ariaLabel}\n data-component=\"icon-button\"\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconSizeClass} ${iconFlipClass}`.trim()}\n >\n {icon}\n </span>\n </Button>\n );\n\n if (tooltip) {\n return <Tooltip label={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n },\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["iconButtonVariants","cva","IconButton","forwardRef","icon","size","intent","className","tooltip","flipIconInRtl","props","ref","ariaLabel","iconSizeClass","iconFlipClass","button","jsx","Button","Tooltip"],"mappings":";;;;;AAKA,MAAMA,IAAqBC;AAAA,EACzB;AAAA,IACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAiBaC,IAAaC;AAAA,EACxB,CACE;AAAA,IACE,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAYF,EAAM,YAAY,KAAKF,GAQnCK,IACJR,MAAS,OACL,cACAA,MAAS,OACP,cACA,kBACFS,IAAgBL,IAAgB,sBAAsB,IAEtDM,IACJ,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,MAAAN;AAAA,QACA,QAAAC;AAAA,QACA,WAAWN,EAAmB,EAAE,MAAAK,GAAM,WAAAE,GAAW;AAAA,QACjD,cAAYK;AAAA,QACZ,kBAAe;AAAA,QACd,GAAGF;AAAA,QAEJ,UAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAW,oDAAoDH,CAAa,IAAIC,CAAa,GAAG,KAAA;AAAA,YAE/F,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAIJ,WAAII,sBACMU,GAAA,EAAQ,OAAOV,GAAU,UAAAO,GAAO,IAGnCA;AAAA,EACT;AACF;AAEAb,EAAW,cAAc;"}
1
+ {"version":3,"file":"icon-button-CehAeZoP.js","sources":["../../src/components/button/icon-button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Button, type ButtonProps } from './button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Tooltip } from '../tooltip';\n\nconst iconButtonVariants = cva(\n [\n 'ds:p-0',\n // Active-state styling when an IconButton participates in an\n // IconButtonGroup's `toggle-single` / `toggle-multi` mode. The\n // group sets `aria-checked=\"true\"` (radiogroup) or\n // `aria-pressed=\"true\"` (toolbar/group) on the selected child;\n // without these utility classes the selection wouldn't read at a\n // glance — see HeaderSettings' Appearance row + ThemeToggle's\n // split variant.\n 'ds:aria-checked:bg-muted ds:aria-checked:text-foreground',\n 'ds:aria-checked:border-primary',\n 'ds:aria-pressed:bg-muted ds:aria-pressed:text-foreground',\n 'ds:aria-pressed:border-primary',\n ].join(' '),\n {\n variants: {\n size: {\n // `sm` (32px) and `md` (40px) sit below `--min-target-size` (44/48px).\n // IconButton overrides Button's `size` variant, so it doesn't inherit\n // Button's touch-target `::before`. Re-add it here for the under-target\n // sizes: a transparent pseudo-element expands the *hit area* to\n // `--min-target-size` on touch / small screens, then is hidden from the\n // `sm:` breakpoint up (desktop pointer input keeps the compact box, so\n // there's no visual/layout change on the desktop Chromatic baselines).\n // `lg` (48px) already clears the target, so it needs no expansion.\n sm: 'ds:w-8 ds:h-8 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n md: 'ds:w-10 ds:h-10 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n lg: 'ds:w-12 ds:h-12',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nexport type IconButtonProps = Omit<\n ButtonProps,\n 'startIcon' | 'endIcon' | 'children' | 'size' | 'flipIconInRtl'\n> &\n VariantProps<typeof iconButtonVariants> & {\n icon: React.ReactNode;\n tooltip?: string;\n 'aria-label'?: string;\n /**\n * Mirror the icon horizontally in RTL. Default `false` — only enable\n * for directional glyphs (arrows, chevrons). See Button.flipIconInRtl.\n */\n flipIconInRtl?: boolean;\n };\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n icon,\n size,\n intent = 'outline',\n className,\n tooltip,\n flipIconInRtl = false,\n ...props\n },\n ref,\n ) => {\n const ariaLabel = props['aria-label'] || tooltip;\n\n if (import.meta.env.DEV && !ariaLabel) {\n console.warn(\n 'IconButton: aria-label or tooltip prop is required for accessibility.',\n );\n }\n\n const iconSizeClass =\n size === 'sm'\n ? 'ds:size-4'\n : size === 'lg'\n ? 'ds:size-5'\n : 'ds:size-[18px]';\n const iconFlipClass = flipIconInRtl ? 'ds:rtl:rotate-180' : '';\n\n const button = (\n <Button\n ref={ref}\n size={size}\n intent={intent}\n className={iconButtonVariants({ size, className })}\n aria-label={ariaLabel}\n data-component=\"icon-button\"\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconSizeClass} ${iconFlipClass}`.trim()}\n >\n {icon}\n </span>\n </Button>\n );\n\n if (tooltip) {\n return <Tooltip label={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n },\n);\n\nIconButton.displayName = 'IconButton';\n"],"names":["iconButtonVariants","cva","IconButton","forwardRef","icon","size","intent","className","tooltip","flipIconInRtl","props","ref","ariaLabel","iconSizeClass","iconFlipClass","button","jsx","Button","Tooltip"],"mappings":";;;;;AAKA,MAAMA,IAAqBC;AAAA,EACzB;AAAA,IACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAiBaC,IAAaC;AAAA,EACxB,CACE;AAAA,IACE,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAYF,EAAM,YAAY,KAAKF,GAQnCK,IACJR,MAAS,OACL,cACAA,MAAS,OACP,cACA,kBACFS,IAAgBL,IAAgB,sBAAsB,IAEtDM,IACJ,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,MAAAN;AAAA,QACA,QAAAC;AAAA,QACA,WAAWN,EAAmB,EAAE,MAAAK,GAAM,WAAAE,GAAW;AAAA,QACjD,cAAYK;AAAA,QACZ,kBAAe;AAAA,QACd,GAAGF;AAAA,QAEJ,UAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAW,oDAAoDH,CAAa,IAAIC,CAAa,GAAG,KAAA;AAAA,YAE/F,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAIJ,WAAII,sBACMU,GAAA,EAAQ,OAAOV,GAAU,UAAAO,GAAO,IAGnCA;AAAA,EACT;AACF;AAEAb,EAAW,cAAc;"}
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as T } from "react/jsx-runtime";
2
2
  import { forwardRef as Se, useState as W, useCallback as H, useRef as F, Children as be, isValidElement as _, useEffect as ve, cloneElement as ye } from "react";
3
3
  import { c as Be } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Ke } from "react-i18next";
5
- import { I as he } from "./icon-button-8xqRnkdG.js";
5
+ import { I as he } from "./icon-button-CehAeZoP.js";
6
6
  import { D as k } from "./dropdown-menu-DU-Hrf33.js";
7
7
  import { u as Pe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
8
  import { u as Te } from "./use-priority-overflow-c9SjxZkZ.js";
@@ -412,4 +412,4 @@ function Ge(d, y, m, c) {
412
412
  export {
413
413
  _e as I
414
414
  };
415
- //# sourceMappingURL=icon-button-group-Dj6CRoYR.js.map
415
+ //# sourceMappingURL=icon-button-group-DkkdIygu.js.map