@alfadocs/ui-kit-debug 1.96.0 → 1.97.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 (303) hide show
  1. package/dist/_chunks/{address-autocomplete-DR4Xn23Z.js → address-autocomplete-DC-H-MZw.js} +2 -2
  2. package/dist/_chunks/{address-autocomplete-DR4Xn23Z.js.map → address-autocomplete-DC-H-MZw.js.map} +1 -1
  3. package/dist/_chunks/{address-fields-qxQkGwPf.js → address-fields-D5Ije0S2.js} +7 -7
  4. package/dist/_chunks/{address-fields-qxQkGwPf.js.map → address-fields-D5Ije0S2.js.map} +1 -1
  5. package/dist/_chunks/{agenda-card-BhY342MA.js → agenda-card-bRQ4j6U6.js} +2 -2
  6. package/dist/_chunks/{agenda-card-BhY342MA.js.map → agenda-card-bRQ4j6U6.js.map} +1 -1
  7. package/dist/_chunks/{agenda-tray-BmxBGEci.js → agenda-tray-CzE3E8GU.js} +2 -2
  8. package/dist/_chunks/{agenda-tray-BmxBGEci.js.map → agenda-tray-CzE3E8GU.js.map} +1 -1
  9. package/dist/_chunks/{alia-sidebar-ovRX_oti.js → alia-sidebar-B5mu44g2.js} +3 -3
  10. package/dist/_chunks/{alia-sidebar-ovRX_oti.js.map → alia-sidebar-B5mu44g2.js.map} +1 -1
  11. package/dist/_chunks/{anamnesis-summary-rows-CdRUXoaA.js → anamnesis-summary-rows-B9HqOGd7.js} +4 -4
  12. package/dist/_chunks/{anamnesis-summary-rows-CdRUXoaA.js.map → anamnesis-summary-rows-B9HqOGd7.js.map} +1 -1
  13. package/dist/_chunks/{appointment-card-Csx4544A.js → appointment-card-zPr0brha.js} +3 -3
  14. package/dist/_chunks/{appointment-card-Csx4544A.js.map → appointment-card-zPr0brha.js.map} +1 -1
  15. package/dist/_chunks/{appointment-peek-CcDCWb-F.js → appointment-peek-xFTBany4.js} +3 -3
  16. package/dist/_chunks/{appointment-peek-CcDCWb-F.js.map → appointment-peek-xFTBany4.js.map} +1 -1
  17. package/dist/_chunks/{appointment-timeline-DW6FN6u8.js → appointment-timeline-AKkVx9AN.js} +2 -2
  18. package/dist/_chunks/{appointment-timeline-DW6FN6u8.js.map → appointment-timeline-AKkVx9AN.js.map} +1 -1
  19. package/dist/_chunks/{appointment-tray-CZfXwHWz.js → appointment-tray-B8qQBW65.js} +2 -2
  20. package/dist/_chunks/{appointment-tray-CZfXwHWz.js.map → appointment-tray-B8qQBW65.js.map} +1 -1
  21. package/dist/_chunks/{aspect-ratio-DeSNzASA.js → aspect-ratio-B-6cyOpm.js} +13 -13
  22. package/dist/_chunks/aspect-ratio-B-6cyOpm.js.map +1 -0
  23. package/dist/_chunks/{autocomplete-BXMcNoa3.js → autocomplete-D10ydpgi.js} +2 -2
  24. package/dist/_chunks/{autocomplete-BXMcNoa3.js.map → autocomplete-D10ydpgi.js.map} +1 -1
  25. package/dist/_chunks/{avatar-a6042Ox2.js → avatar-BoqdWsNe.js} +2 -2
  26. package/dist/_chunks/avatar-BoqdWsNe.js.map +1 -0
  27. package/dist/_chunks/{balance-badge-cell-DcBmtijD.js → balance-badge-cell-DaZokVZY.js} +3 -3
  28. package/dist/_chunks/{balance-badge-cell-DcBmtijD.js.map → balance-badge-cell-DaZokVZY.js.map} +1 -1
  29. package/dist/_chunks/{breadcrumb-Bn29NCnf.js → breadcrumb-zxa_PNhF.js} +2 -2
  30. package/dist/_chunks/breadcrumb-zxa_PNhF.js.map +1 -0
  31. package/dist/_chunks/{calendar-CmiMS4FJ.js → calendar-DVe5eArk.js} +2 -2
  32. package/dist/_chunks/{calendar-CmiMS4FJ.js.map → calendar-DVe5eArk.js.map} +1 -1
  33. package/dist/_chunks/{calendar-appointment-editor-dialog-BOZ5wk96.js → calendar-appointment-editor-dialog-26LEMx0q.js} +12 -12
  34. package/dist/_chunks/{calendar-appointment-editor-dialog-BOZ5wk96.js.map → calendar-appointment-editor-dialog-26LEMx0q.js.map} +1 -1
  35. package/dist/_chunks/{chat-message-LRO_6Ee3.js → chat-message-CkBCAcwn.js} +2 -2
  36. package/dist/_chunks/{chat-message-LRO_6Ee3.js.map → chat-message-CkBCAcwn.js.map} +1 -1
  37. package/dist/_chunks/{city-input-CA59CjnV.js → city-input-DXipzTfZ.js} +3 -3
  38. package/dist/_chunks/{city-input-CA59CjnV.js.map → city-input-DXipzTfZ.js.map} +1 -1
  39. package/dist/_chunks/{clinical-note-card-CWHFnCmY.js → clinical-note-card--juv_ELr.js} +2 -2
  40. package/dist/_chunks/{clinical-note-card-CWHFnCmY.js.map → clinical-note-card--juv_ELr.js.map} +1 -1
  41. package/dist/_chunks/{combobox-D-gpgEDy.js → combobox-duuDRI1t.js} +2 -2
  42. package/dist/_chunks/{combobox-D-gpgEDy.js.map → combobox-duuDRI1t.js.map} +1 -1
  43. package/dist/_chunks/{command-palette-B3dVqm9D.js → command-palette-DxQBU4wH.js} +3 -3
  44. package/dist/_chunks/command-palette-DxQBU4wH.js.map +1 -0
  45. package/dist/_chunks/{contact-profile-card-jBf9U4At.js → contact-profile-card-QPUgGu-t.js} +57 -57
  46. package/dist/_chunks/contact-profile-card-QPUgGu-t.js.map +1 -0
  47. package/dist/_chunks/{copy-field-hgVSc51W.js → copy-field-BaYEDJ9f.js} +24 -24
  48. package/dist/_chunks/copy-field-BaYEDJ9f.js.map +1 -0
  49. package/dist/_chunks/{country-select-BfmX9y5i.js → country-select-CUuGOAoZ.js} +2 -2
  50. package/dist/_chunks/{country-select-BfmX9y5i.js.map → country-select-CUuGOAoZ.js.map} +1 -1
  51. package/dist/_chunks/{data-table-xUDjZS_O.js → data-table-C4UT4L9B.js} +3 -3
  52. package/dist/_chunks/{data-table-xUDjZS_O.js.map → data-table-C4UT4L9B.js.map} +1 -1
  53. package/dist/_chunks/{data-table-tabs-CcgU2lr5.js → data-table-tabs-Db7zToFD.js} +2 -2
  54. package/dist/_chunks/{data-table-tabs-CcgU2lr5.js.map → data-table-tabs-Db7zToFD.js.map} +1 -1
  55. package/dist/_chunks/{dependent-selector-CyNi7M_f.js → dependent-selector-DRN0P0Kr.js} +2 -2
  56. package/dist/_chunks/{dependent-selector-CyNi7M_f.js.map → dependent-selector-DRN0P0Kr.js.map} +1 -1
  57. package/dist/_chunks/{document-preview-DWIQryMW.js → document-preview-U8H6tnDJ.js} +2 -2
  58. package/dist/_chunks/{document-preview-DWIQryMW.js.map → document-preview-U8H6tnDJ.js.map} +1 -1
  59. package/dist/_chunks/{document-scanner-BQP0Rqrt.js → document-scanner-Bf3VUp00.js} +24 -24
  60. package/dist/_chunks/document-scanner-Bf3VUp00.js.map +1 -0
  61. package/dist/_chunks/{editable-currency-cell-renderer-BEaj2NT_.js → editable-currency-cell-renderer-BUdFMh67.js} +2 -2
  62. package/dist/_chunks/{editable-currency-cell-renderer-BEaj2NT_.js.map → editable-currency-cell-renderer-BUdFMh67.js.map} +1 -1
  63. package/dist/_chunks/{email-input-C7THAwh2.js → email-input-BEO3vonE.js} +2 -2
  64. package/dist/_chunks/{email-input-C7THAwh2.js.map → email-input-BEO3vonE.js.map} +1 -1
  65. package/dist/_chunks/{entity-summary-BJdfIsk_.js → entity-summary-B4p8zP1J.js} +2 -2
  66. package/dist/_chunks/{entity-summary-BJdfIsk_.js.map → entity-summary-B4p8zP1J.js.map} +1 -1
  67. package/dist/_chunks/{face-scheme-BmygzbZr.js → face-scheme-DdVLQ5dP.js} +3 -3
  68. package/dist/_chunks/{face-scheme-BmygzbZr.js.map → face-scheme-DdVLQ5dP.js.map} +1 -1
  69. package/dist/_chunks/{file-manager-Ba_TcfCj.js → file-manager-B4K2j7jB.js} +4 -4
  70. package/dist/_chunks/{file-manager-Ba_TcfCj.js.map → file-manager-B4K2j7jB.js.map} +1 -1
  71. package/dist/_chunks/{fiscal-code-input-BzWmNDnl.js → fiscal-code-input-BBvU7sAo.js} +2 -2
  72. package/dist/_chunks/{fiscal-code-input-BzWmNDnl.js.map → fiscal-code-input-BBvU7sAo.js.map} +1 -1
  73. package/dist/_chunks/{forgot-password-form-BCk4rGIh.js → forgot-password-form-CeTb5p-x.js} +2 -2
  74. package/dist/_chunks/{forgot-password-form-BCk4rGIh.js.map → forgot-password-form-CeTb5p-x.js.map} +1 -1
  75. package/dist/_chunks/{header-settings-C2D74i4g.js → header-settings-Df9q1uHt.js} +2 -2
  76. package/dist/_chunks/{header-settings-C2D74i4g.js.map → header-settings-Df9q1uHt.js.map} +1 -1
  77. package/dist/_chunks/{heatmap-C9tEvqEm.js → heatmap-B2Z1_kDn.js} +2 -2
  78. package/dist/_chunks/{heatmap-C9tEvqEm.js.map → heatmap-B2Z1_kDn.js.map} +1 -1
  79. package/dist/_chunks/{help-me-write-templates-BJSf24xS.js → help-me-write-templates-ra5a__Yy.js} +2 -2
  80. package/dist/_chunks/{help-me-write-templates-BJSf24xS.js.map → help-me-write-templates-ra5a__Yy.js.map} +1 -1
  81. package/dist/_chunks/{iban-input-B9L2QDHh.js → iban-input-DuTwKok5.js} +2 -2
  82. package/dist/_chunks/{iban-input-B9L2QDHh.js.map → iban-input-DuTwKok5.js.map} +1 -1
  83. package/dist/_chunks/{icon-picker-DQMG9L6M.js → icon-picker-BmU6gpZT.js} +2 -2
  84. package/dist/_chunks/{icon-picker-DQMG9L6M.js.map → icon-picker-BmU6gpZT.js.map} +1 -1
  85. package/dist/_chunks/{input-surface-iBmxVBfr.js → input-surface-BMffm2Vd.js} +4 -4
  86. package/dist/_chunks/{input-surface-iBmxVBfr.js.map → input-surface-BMffm2Vd.js.map} +1 -1
  87. package/dist/_chunks/{link-cell-renderer-OmvrkUeN.js → link-cell-renderer-DKMgD-2v.js} +4 -4
  88. package/dist/_chunks/{link-cell-renderer-OmvrkUeN.js.map → link-cell-renderer-DKMgD-2v.js.map} +1 -1
  89. package/dist/_chunks/{locale-picker-B1NAHW4U.js → locale-picker-C86h8Yt1.js} +2 -2
  90. package/dist/_chunks/{locale-picker-B1NAHW4U.js.map → locale-picker-C86h8Yt1.js.map} +1 -1
  91. package/dist/_chunks/{login-dev-card-DcfcFJrm.js → login-dev-card-D5BV5j1i.js} +4 -4
  92. package/dist/_chunks/{login-dev-card-DcfcFJrm.js.map → login-dev-card-D5BV5j1i.js.map} +1 -1
  93. package/dist/_chunks/{map-view--c9bJDRw.js → map-view-V7etHnyF.js} +2 -2
  94. package/dist/_chunks/map-view-V7etHnyF.js.map +1 -0
  95. package/dist/_chunks/{marketplace-app-shell-DDZI-uBl.js → marketplace-app-shell-D2qgIuXX.js} +4 -4
  96. package/dist/_chunks/{marketplace-app-shell-DDZI-uBl.js.map → marketplace-app-shell-D2qgIuXX.js.map} +1 -1
  97. package/dist/_chunks/{message-card-B6SduXJv.js → message-card-BzJEITml.js} +2 -2
  98. package/dist/_chunks/{message-card-B6SduXJv.js.map → message-card-BzJEITml.js.map} +1 -1
  99. package/dist/_chunks/{message-tray-18_TrLCy.js → message-tray-DiPgJbOb.js} +2 -2
  100. package/dist/_chunks/{message-tray-18_TrLCy.js.map → message-tray-DiPgJbOb.js.map} +1 -1
  101. package/dist/_chunks/{multi-select-i5MFRpXg.js → multi-select-Df3R8lv_.js} +30 -30
  102. package/dist/_chunks/multi-select-Df3R8lv_.js.map +1 -0
  103. package/dist/_chunks/{navigation-menu-DbaSlvdO.js → navigation-menu-1MrpIVkY.js} +3 -3
  104. package/dist/_chunks/navigation-menu-1MrpIVkY.js.map +1 -0
  105. package/dist/_chunks/{notes-panel-DfjF83IK.js → notes-panel-BbNLYcdv.js} +3 -3
  106. package/dist/_chunks/{notes-panel-DfjF83IK.js.map → notes-panel-BbNLYcdv.js.map} +1 -1
  107. package/dist/_chunks/{operator-hero-N_ziNGFF.js → operator-hero-BcuPTzS_.js} +2 -2
  108. package/dist/_chunks/{operator-hero-N_ziNGFF.js.map → operator-hero-BcuPTzS_.js.map} +1 -1
  109. package/dist/_chunks/{pagination-DvKGrsXu.js → pagination-C7N_NiRN.js} +2 -2
  110. package/dist/_chunks/{pagination-DvKGrsXu.js.map → pagination-C7N_NiRN.js.map} +1 -1
  111. package/dist/_chunks/{password-input-BokZ_rnT.js → password-input-SJGHFdOO.js} +2 -2
  112. package/dist/_chunks/{password-input-BokZ_rnT.js.map → password-input-SJGHFdOO.js.map} +1 -1
  113. package/dist/_chunks/{patient-details-DGHkAErB.js → patient-details-DoIOWP6j.js} +3 -3
  114. package/dist/_chunks/{patient-details-DGHkAErB.js.map → patient-details-DoIOWP6j.js.map} +1 -1
  115. package/dist/_chunks/{patient-field-row-BVK4y98C.js → patient-field-row--dCDO5oB.js} +9 -9
  116. package/dist/_chunks/{patient-field-row-BVK4y98C.js.map → patient-field-row--dCDO5oB.js.map} +1 -1
  117. package/dist/_chunks/{patient-search-CL6dtBIq.js → patient-search-DJy0IZSx.js} +2 -2
  118. package/dist/_chunks/{patient-search-CL6dtBIq.js.map → patient-search-DJy0IZSx.js.map} +1 -1
  119. package/dist/_chunks/{patient-summary-card-DXz07c2X.js → patient-summary-card-CL04aq8h.js} +3 -3
  120. package/dist/_chunks/{patient-summary-card-DXz07c2X.js.map → patient-summary-card-CL04aq8h.js.map} +1 -1
  121. package/dist/_chunks/{payment-automation-upsell-CZk6f8aK.js → payment-automation-upsell-BPF0c-5D.js} +2 -2
  122. package/dist/_chunks/{payment-automation-upsell-CZk6f8aK.js.map → payment-automation-upsell-BPF0c-5D.js.map} +1 -1
  123. package/dist/_chunks/{pdf-viewer-gAsNUsA8.js → pdf-viewer-DlceXkfW.js} +267 -286
  124. package/dist/_chunks/pdf-viewer-DlceXkfW.js.map +1 -0
  125. package/dist/_chunks/{phone-input-DJ4BN8tG.js → phone-input-BL8Sj6OG.js} +3 -3
  126. package/dist/_chunks/phone-input-BL8Sj6OG.js.map +1 -0
  127. package/dist/_chunks/{postal-code-input-CfZOnIkW.js → postal-code-input-dJdSAVkP.js} +2 -2
  128. package/dist/_chunks/{postal-code-input-CfZOnIkW.js.map → postal-code-input-dJdSAVkP.js.map} +1 -1
  129. package/dist/_chunks/{practice-profile-hero-DKmnB-M0.js → practice-profile-hero-B8vykoci.js} +2 -2
  130. package/dist/_chunks/{practice-profile-hero-DKmnB-M0.js.map → practice-profile-hero-B8vykoci.js.map} +1 -1
  131. package/dist/_chunks/{practice-results-ZOVlrb43.js → practice-results-U-5kpnJa.js} +3 -3
  132. package/dist/_chunks/{practice-results-ZOVlrb43.js.map → practice-results-U-5kpnJa.js.map} +1 -1
  133. package/dist/_chunks/{province-select-D64whw0m.js → province-select-cVOlwEc5.js} +2 -2
  134. package/dist/_chunks/{province-select-D64whw0m.js.map → province-select-cVOlwEc5.js.map} +1 -1
  135. package/dist/_chunks/{public-footer-BiPiU_lk.js → public-footer-t6gx6sjn.js} +163 -152
  136. package/dist/_chunks/public-footer-t6gx6sjn.js.map +1 -0
  137. package/dist/_chunks/{registration-form-K4j2tdLt.js → registration-form-JzzTomhd.js} +5 -5
  138. package/dist/_chunks/{registration-form-K4j2tdLt.js.map → registration-form-JzzTomhd.js.map} +1 -1
  139. package/dist/_chunks/{reserved.agent-TRbKB39d.js → reserved.agent-CB-92Vi9.js} +8 -8
  140. package/dist/_chunks/{reserved.agent-TRbKB39d.js.map → reserved.agent-CB-92Vi9.js.map} +1 -1
  141. package/dist/_chunks/{reset-password-form-C6XLV7SI.js → reset-password-form-DDdGEoIL.js} +3 -3
  142. package/dist/_chunks/{reset-password-form-C6XLV7SI.js.map → reset-password-form-DDdGEoIL.js.map} +1 -1
  143. package/dist/_chunks/{rich-text-editor-CJfT08It.js → rich-text-editor-F04przIt.js} +2 -2
  144. package/dist/_chunks/{rich-text-editor-CJfT08It.js.map → rich-text-editor-F04przIt.js.map} +1 -1
  145. package/dist/_chunks/{search-bar-mA4bPe3t.js → search-bar-CQ9_V3EJ.js} +2 -2
  146. package/dist/_chunks/{search-bar-mA4bPe3t.js.map → search-bar-CQ9_V3EJ.js.map} +1 -1
  147. package/dist/_chunks/{search-input-BAlDd05M.js → search-input-CRAMo1CA.js} +2 -2
  148. package/dist/_chunks/{search-input-BAlDd05M.js.map → search-input-CRAMo1CA.js.map} +1 -1
  149. package/dist/_chunks/{send-registration-link-form-yLSfcaPk.js → send-registration-link-form-DHCQpA4C.js} +3 -3
  150. package/dist/_chunks/{send-registration-link-form-yLSfcaPk.js.map → send-registration-link-form-DHCQpA4C.js.map} +1 -1
  151. package/dist/_chunks/{sidebar-BS24EnYd.js → sidebar-2VsPlNkZ.js} +3 -3
  152. package/dist/_chunks/sidebar-2VsPlNkZ.js.map +1 -0
  153. package/dist/_chunks/{sign-document-BiOTs1P4.js → sign-document-B5qZhthO.js} +10 -10
  154. package/dist/_chunks/sign-document-B5qZhthO.js.map +1 -0
  155. package/dist/_chunks/{signature-capture-Chqh62Pc.js → signature-capture-BJc7kfqi.js} +2 -2
  156. package/dist/_chunks/signature-capture-BJc7kfqi.js.map +1 -0
  157. package/dist/_chunks/{signature-field-Y01UB5DA.js → signature-field-DjabvRZm.js} +28 -34
  158. package/dist/_chunks/{signature-field-Y01UB5DA.js.map → signature-field-DjabvRZm.js.map} +1 -1
  159. package/dist/_chunks/{signature-request-CLtMgQKi.js → signature-request-CQ0torGq.js} +2 -2
  160. package/dist/_chunks/{signature-request-CLtMgQKi.js.map → signature-request-CQ0torGq.js.map} +1 -1
  161. package/dist/_chunks/{signed-out-frame-CRwVTCjY.js → signed-out-frame-BcQE00H1.js} +2 -2
  162. package/dist/_chunks/{signed-out-frame-CRwVTCjY.js.map → signed-out-frame-BcQE00H1.js.map} +1 -1
  163. package/dist/_chunks/{stat-Dno2ZihS.js → stat-BFKZV50y.js} +137 -117
  164. package/dist/_chunks/stat-BFKZV50y.js.map +1 -0
  165. package/dist/_chunks/{state-backed-text-input-Cgh4ms3p.js → state-backed-text-input-DVETOhSS.js} +2 -2
  166. package/dist/_chunks/{state-backed-text-input-Cgh4ms3p.js.map → state-backed-text-input-DVETOhSS.js.map} +1 -1
  167. package/dist/_chunks/{stepper-accordion-DDTSOUHc.js → stepper-accordion-CYjrmRte.js} +44 -44
  168. package/dist/_chunks/stepper-accordion-CYjrmRte.js.map +1 -0
  169. package/dist/_chunks/{task-editor-qXfMbHsy.js → task-editor-BiPGFXtB.js} +3 -3
  170. package/dist/_chunks/{task-editor-qXfMbHsy.js.map → task-editor-BiPGFXtB.js.map} +1 -1
  171. package/dist/_chunks/{text-input-CaG9ApoE.js → text-input-B6iAgCr3.js} +2 -2
  172. package/dist/_chunks/{text-input-CaG9ApoE.js.map → text-input-B6iAgCr3.js.map} +1 -1
  173. package/dist/_chunks/{timeline-B32dylRJ.js → timeline-tn5QQJdS.js} +2 -2
  174. package/dist/_chunks/{timeline-B32dylRJ.js.map → timeline-tn5QQJdS.js.map} +1 -1
  175. package/dist/_chunks/{transcript-panel-CoHHpcFg.js → transcript-panel-A781Pkzr.js} +2 -2
  176. package/dist/_chunks/{transcript-panel-CoHHpcFg.js.map → transcript-panel-A781Pkzr.js.map} +1 -1
  177. package/dist/_chunks/{use-appointment-details-read-UXXvBeGZ.js → use-appointment-details-read-BbIoPWO6.js} +5 -5
  178. package/dist/_chunks/{use-appointment-details-read-UXXvBeGZ.js.map → use-appointment-details-read-BbIoPWO6.js.map} +1 -1
  179. package/dist/_chunks/{widget-picker-B9HpT2Tb.js → widget-picker-DNYIqRT1.js} +2 -2
  180. package/dist/_chunks/{widget-picker-B9HpT2Tb.js.map → widget-picker-DNYIqRT1.js.map} +1 -1
  181. package/dist/_chunks/{workflow-map-flsvqQ3L.js → workflow-map-k-dQkpe7.js} +20 -20
  182. package/dist/_chunks/{workflow-map-flsvqQ3L.js.map → workflow-map-k-dQkpe7.js.map} +1 -1
  183. package/dist/_chunks/{workflow-status-HQ6ziE46.js → workflow-status-9wb7iWUd.js} +2 -2
  184. package/dist/_chunks/{workflow-status-HQ6ziE46.js.map → workflow-status-9wb7iWUd.js.map} +1 -1
  185. package/dist/_chunks/{workflow-webhook-action-BD-6UyOs.js → workflow-webhook-action-B_52rH7O.js} +3 -3
  186. package/dist/_chunks/{workflow-webhook-action-BD-6UyOs.js.map → workflow-webhook-action-B_52rH7O.js.map} +1 -1
  187. package/dist/agent-catalog.json +1 -1
  188. package/dist/components/_shared/input-surface.d.ts +3 -3
  189. package/dist/components/address-autocomplete/index.js +1 -1
  190. package/dist/components/address-fields/index.js +1 -1
  191. package/dist/components/agenda-card/index.js +1 -1
  192. package/dist/components/agenda-tray/index.js +1 -1
  193. package/dist/components/appointment-card/index.js +2 -2
  194. package/dist/components/appointment-details-panel/index.js +1 -1
  195. package/dist/components/appointment-peek/index.js +1 -1
  196. package/dist/components/appointment-timeline/index.js +1 -1
  197. package/dist/components/aspect-ratio/index.js +1 -1
  198. package/dist/components/autocomplete/index.js +1 -1
  199. package/dist/components/avatar/index.js +1 -1
  200. package/dist/components/booking/index.js +1 -1
  201. package/dist/components/breadcrumb/index.js +1 -1
  202. package/dist/components/calendar/index.js +1 -1
  203. package/dist/components/chat-message/index.js +1 -1
  204. package/dist/components/city-input/index.js +1 -1
  205. package/dist/components/clinical-note-card/index.js +1 -1
  206. package/dist/components/combobox/index.js +1 -1
  207. package/dist/components/command-palette/index.js +1 -1
  208. package/dist/components/contact-profile-card/index.js +1 -1
  209. package/dist/components/copy-field/index.js +1 -1
  210. package/dist/components/country-select/index.js +1 -1
  211. package/dist/components/data-table/index.js +3 -3
  212. package/dist/components/data-table-tabs/index.js +1 -1
  213. package/dist/components/dependent-selector/index.js +1 -1
  214. package/dist/components/document-preview/index.js +1 -1
  215. package/dist/components/document-scanner/index.js +1 -1
  216. package/dist/components/email-input/index.js +1 -1
  217. package/dist/components/entity-summary/index.js +1 -1
  218. package/dist/components/face-scheme/index.js +1 -1
  219. package/dist/components/file-manager/index.js +1 -1
  220. package/dist/components/fiscal-code-input/index.js +1 -1
  221. package/dist/components/header-settings/index.js +1 -1
  222. package/dist/components/heatmap/index.js +1 -1
  223. package/dist/components/iban-input/index.js +1 -1
  224. package/dist/components/icon-picker/index.js +1 -1
  225. package/dist/components/locale-picker/index.js +1 -1
  226. package/dist/components/map-view/index.js +1 -1
  227. package/dist/components/message-card/index.js +1 -1
  228. package/dist/components/message-tray/index.js +1 -1
  229. package/dist/components/multi-select/index.js +1 -1
  230. package/dist/components/navigation-menu/index.js +1 -1
  231. package/dist/components/notes-panel/index.js +1 -1
  232. package/dist/components/operator-hero/index.js +1 -1
  233. package/dist/components/pagination/index.js +1 -1
  234. package/dist/components/password-input/index.js +1 -1
  235. package/dist/components/patient-details/index.js +1 -1
  236. package/dist/components/patient-search/index.js +1 -1
  237. package/dist/components/patient-summary-card/index.js +1 -1
  238. package/dist/components/patient-table/index.js +1 -1
  239. package/dist/components/pdf-viewer/index.js +1 -1
  240. package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
  241. package/dist/components/phone-input/index.js +1 -1
  242. package/dist/components/postal-code-input/index.js +1 -1
  243. package/dist/components/practice-profile-hero/index.js +1 -1
  244. package/dist/components/practice-results/index.js +1 -1
  245. package/dist/components/province-select/index.js +1 -1
  246. package/dist/components/public-footer/index.js +1 -1
  247. package/dist/components/public-footer/public-footer.d.ts.map +1 -1
  248. package/dist/components/rich-text-editor/index.js +1 -1
  249. package/dist/components/search-bar/index.js +1 -1
  250. package/dist/components/search-input/index.js +1 -1
  251. package/dist/components/sidebar/index.js +1 -1
  252. package/dist/components/sign-document/index.js +1 -1
  253. package/dist/components/signature-capture/index.js +1 -1
  254. package/dist/components/signature-field/index.js +1 -1
  255. package/dist/components/signature-field/signature-field.d.ts.map +1 -1
  256. package/dist/components/stat/index.js +1 -1
  257. package/dist/components/stat/stat.d.ts +8 -0
  258. package/dist/components/stat/stat.d.ts.map +1 -1
  259. package/dist/components/stepper-accordion/index.js +1 -1
  260. package/dist/components/task-editor/index.js +1 -1
  261. package/dist/components/text-input/index.js +1 -1
  262. package/dist/components/timeline/index.js +1 -1
  263. package/dist/components/transcript-panel/index.js +1 -1
  264. package/dist/components/widget-picker/index.js +1 -1
  265. package/dist/components/workflow/index.js +1 -1
  266. package/dist/components/workflow-status/index.js +1 -1
  267. package/dist/core.css +1 -1
  268. package/dist/host-compat.css +13 -1
  269. package/dist/index.js +88 -88
  270. package/dist/patterns/alia-assistant/index.js +1 -1
  271. package/dist/patterns/anamnesis/index.js +1 -1
  272. package/dist/patterns/calendar/index.js +1 -1
  273. package/dist/patterns/forgot-password-form/index.js +1 -1
  274. package/dist/patterns/help-me-write-templates/index.js +1 -1
  275. package/dist/patterns/login-form/index.js +1 -1
  276. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  277. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  278. package/dist/patterns/registration-form/index.js +1 -1
  279. package/dist/patterns/reset-password-form/index.js +1 -1
  280. package/dist/patterns/send-registration-link-form/index.js +1 -1
  281. package/dist/patterns/signature-request/index.js +1 -1
  282. package/dist/patterns/signed-out-frame/index.js +1 -1
  283. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  284. package/dist/tokens.css +1 -1
  285. package/package.json +1 -1
  286. package/dist/_chunks/aspect-ratio-DeSNzASA.js.map +0 -1
  287. package/dist/_chunks/avatar-a6042Ox2.js.map +0 -1
  288. package/dist/_chunks/breadcrumb-Bn29NCnf.js.map +0 -1
  289. package/dist/_chunks/command-palette-B3dVqm9D.js.map +0 -1
  290. package/dist/_chunks/contact-profile-card-jBf9U4At.js.map +0 -1
  291. package/dist/_chunks/copy-field-hgVSc51W.js.map +0 -1
  292. package/dist/_chunks/document-scanner-BQP0Rqrt.js.map +0 -1
  293. package/dist/_chunks/map-view--c9bJDRw.js.map +0 -1
  294. package/dist/_chunks/multi-select-i5MFRpXg.js.map +0 -1
  295. package/dist/_chunks/navigation-menu-DbaSlvdO.js.map +0 -1
  296. package/dist/_chunks/pdf-viewer-gAsNUsA8.js.map +0 -1
  297. package/dist/_chunks/phone-input-DJ4BN8tG.js.map +0 -1
  298. package/dist/_chunks/public-footer-BiPiU_lk.js.map +0 -1
  299. package/dist/_chunks/sidebar-BS24EnYd.js.map +0 -1
  300. package/dist/_chunks/sign-document-BiOTs1P4.js.map +0 -1
  301. package/dist/_chunks/signature-capture-Chqh62Pc.js.map +0 -1
  302. package/dist/_chunks/stat-Dno2ZihS.js.map +0 -1
  303. package/dist/_chunks/stepper-accordion-DDTSOUHc.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"map-view--c9bJDRw.js","sources":["../../src/components/map-view/map-view.agent.ts","../../src/components/map-view/map-view.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — MapView. */\n/* */\n/* Read-safety actions on the kit's Google Maps wrapper. State is the */\n/* current centre / zoom / selected marker; actions pan, zoom, and */\n/* select markers programmatically. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { MapViewHandle, MapLatLng } from './map-view';\n\nexport const mapViewAgent: AgentAdapter<MapViewHandle> = {\n id: 'map-view',\n // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick\n // (NON-persisting marker focus, no value state slot).\n capabilities: ['scroll', 'set_value', 'pick'],\n // Every action routes through the imperative bridge, which only exists\n // once the map has loaded: consent granted (the default is\n // `consentGranted={false}`) and Google Maps finished loading. Until then\n // all three actions are silent no-ops. `consentGranted` says whether the\n // gate is passed, and a null `center` after it means the map is still\n // loading. `center` / `zoom` are read off the live\n // map because Google clamps zoom and animates pans, so requested is not\n // applied; `selectedMarkerId` is the only confirmation the host accepted\n // a `select_marker` proposal.\n //\n // A9: marker ids only (`MapMarker.id` is a stable opaque id). Never\n // `MapMarker.label`, never the `address` prop (consumer-supplied free\n // text, PII in any patient-address deployment), never `apiKey`.\n state: {\n consentGranted: {\n type: 'boolean',\n descriptionKey: 'ui.agent.mapView.state.consentGranted',\n description:\n 'True when the GDPR consent gate has been passed. Read this FIRST: while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so. When it is true but `center` is still null, Google Maps is loading; wait for `center` before acting.',\n read: (handle) => handle.isConsentGranted(),\n },\n markerCount: {\n type: 'number',\n descriptionKey: 'ui.agent.mapView.state.markerCount',\n description:\n 'Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.',\n read: (handle) => handle.getMarkerCount(),\n },\n selectedMarkerId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.mapView.state.selectedMarkerId',\n description:\n 'Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.',\n read: (handle) => handle.getSelectedMarkerId(),\n },\n center: {\n type: '{ lat: number; lng: number } | null',\n descriptionKey: 'ui.agent.mapView.state.center',\n description:\n 'Live map centre in lat/lng, or null until the map has loaded (consent not granted, or Google Maps still loading). The read-back for `pan_to`, and the sign that the map is ready.',\n read: (handle) => handle.getCenter(),\n },\n zoom: {\n type: 'number | null',\n descriptionKey: 'ui.agent.mapView.state.zoom',\n description:\n \"Live zoom level, or null until the map has loaded. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.\",\n read: (handle) => handle.getZoom(),\n },\n },\n actions: {\n pan_to: {\n // Ephemeral viewport move, no data loss → read.\n safety: 'read',\n argsType: '{ position: { lat: number; lng: number } }',\n argsSchema: {\n type: 'object',\n properties: {\n position: {\n type: 'object',\n properties: {\n lat: { type: 'number', description: 'Latitude in degrees.' },\n lng: { type: 'number', description: 'Longitude in degrees.' },\n },\n required: ['lat', 'lng'],\n },\n },\n required: ['position'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.panTo',\n description:\n 'Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.',\n errors: [\n 'Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).',\n ],\n invoke: (handle, args: { position: MapLatLng }) => {\n handle.panTo(args.position);\n },\n },\n set_zoom: {\n // Ephemeral viewport zoom, no data loss → read.\n safety: 'read',\n argsType: '{ zoom: number }',\n argsSchema: {\n type: 'object',\n properties: {\n zoom: {\n type: 'number',\n description: 'Zoom level, typical range 1–20.',\n },\n },\n required: ['zoom'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.setZoom',\n description:\n 'Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.',\n errors: [\n 'Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).',\n \"Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied.\",\n ],\n invoke: (handle, args: { zoom: number }) => {\n handle.setZoom(args.zoom);\n },\n },\n select_marker: {\n // Ephemeral marker focus, no data loss → read.\n safety: 'read',\n argsType: '{ id: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: ['string', 'null'],\n description: 'Marker id to select, or null to clear the selection.',\n },\n },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.selectMarker',\n description:\n \"Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.\",\n errors: [\n 'Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).',\n 'The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does.',\n ],\n invoke: (handle, args: { id: string | null }) => {\n handle.selectMarker(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'map-view',\n description: 'Marks the element as a kit MapView.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* MapView — kit wrapper over @vis.gl/react-google-maps. */\n/* */\n/* - Loads the Google Maps JS API on demand via the library's */\n/* `APIProvider`; consumer supplies the key (no kit-side cache). */\n/* - Defaults to a CONSENT-GATED placeholder (`consentGranted={false}`) */\n/* so the third-party load never happens before the consumer flips */\n/* the opt-in. GDPR-safe by default. */\n/* - Theme-reactive: the Google Maps `styles` JSON re-resolves on every */\n/* `documentElement.class` mutation (same pattern as Sparkline). */\n/* Consumers may pass `mapId` to switch to a cloud-styled map */\n/* instead, in which case `styles` is ignored. */\n/* - `data-component=\"map-view\"` lives on the outer span; the inner */\n/* `<Map>` mounts inside it. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type MutableRefObject,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { MapPin, ExternalLink } from 'lucide-react';\nimport {\n APIProvider,\n Map as GoogleMap,\n AdvancedMarker,\n Marker,\n Pin,\n useApiIsLoaded,\n useMap,\n useMapsLibrary,\n} from '@vis.gl/react-google-maps';\nimport { Button } from '../button';\nimport { Skeleton } from '../skeleton';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { ErrorBoundary } from '../error-boundary';\nimport { MapsCoreGate } from '../_shared/maps-core-gate';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { mapViewAgent } from './map-view.agent';\nimport { lengthTokenPx } from '../_shared/length-token';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface MapLatLng {\n lat: number;\n lng: number;\n}\n\nexport interface MapBounds {\n north: number;\n south: number;\n east: number;\n west: number;\n}\n\nexport interface MapBoundsChangeDetails {\n /** False for initial load, resizing, fitting and imperative camera moves. */\n userInteraction: boolean;\n}\n\n/**\n * A point to fit the camera to. `id` is its identity (a result id): it\n * decides whether a new set only added points to the old one. Without\n * it the coordinates stand in, so two results at one address count as\n * one.\n */\nexport interface MapFitPoint extends MapLatLng {\n id?: string;\n}\n\nexport interface MapMarker {\n /** Stable id — used for keyed re-rendering and `onMarkerClick`. */\n id: string;\n /** Position in lat/lng. */\n position: MapLatLng;\n /** Optional accessible label — falls back to the id. */\n label?: string;\n}\n\nexport interface MapViewHandle {\n /** Pan the map to a new centre without changing zoom. */\n panTo: (position: MapLatLng) => void;\n /** Set zoom (typical range 1–20). */\n setZoom: (zoom: number) => void;\n /** Programmatically select a marker (fires `onMarkerClick`). */\n selectMarker: (id: string | null) => void;\n /* ---- read-back ------------------------------------------------- */\n /**\n * True once the consent gate has been passed. The map may still be\n * loading: the three actions above stay silent no-ops until\n * `getCenter` returns a value.\n */\n isConsentGranted: () => boolean;\n /** Live map centre, or `null` until the map has loaded. */\n getCenter: () => MapLatLng | null;\n /**\n * Live zoom level, or `null` until the map has loaded.\n * Google clamps to the map type's range, so this is not necessarily\n * the value last passed to `setZoom`.\n */\n getZoom: () => number | null;\n /**\n * The controlled `selectedMarkerId` prop as the host currently holds\n * it. `selectMarker` only proposes a selection — the host is free to\n * ignore it, and this is the only way to see whether it did.\n */\n getSelectedMarkerId: () => string | null;\n /** Number of markers passed to the component. Count only, no ids. */\n getMarkerCount: () => number;\n}\n\n/**\n * The slice of `MapViewHandle` that needs a live `google.maps.Map`.\n * Built inside the `APIProvider` subtree by `MapImperativeBridge`; the\n * outer component composes it with the props-derived getters, and holds\n * `null` whenever the subtree is unmounted.\n */\ntype MapBridgeHandle = Pick<\n MapViewHandle,\n 'panTo' | 'setZoom' | 'selectMarker' | 'getCenter' | 'getZoom'\n> & {\n /** Set centre and zoom in one step, never animated. Internal. */\n jumpTo: (center: MapLatLng, zoom: number) => void;\n};\n\nexport interface MapViewProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>,\n VariantProps<typeof mapViewVariants> {\n /** Opaque instance id — emitted as `data-component-id`. */\n id?: string;\n /** Google Maps JS API key. Consumer-owned; never cached by the kit. */\n apiKey: string;\n /** Map centre (lat/lng). Required so the consent placeholder can also use it. */\n center: MapLatLng;\n /** Initial zoom. Default 15 (city-block detail, matches booking site). */\n zoom?: number;\n /**\n * Markers to render. The first marker auto-selects when no\n * `selectedMarkerId` is given.\n */\n markers?: MapMarker[];\n /** Controlled selection — fires `onMarkerClick` with the new id (or null on map click). */\n selectedMarkerId?: string | null;\n /** Fires when a marker is clicked, or `null` when the map background is clicked. */\n onMarkerClick?: (id: string | null) => void;\n /**\n * The visible viewport once the map settles, including its first bounds.\n * Fires only when bounds change. `userInteraction` is true after patient\n * input that pans or zooms, never for a kit-initiated camera move.\n * Silent until the consented map has loaded.\n */\n onBoundsChange?: (bounds: MapBounds, details: MapBoundsChangeDetails) => void;\n /**\n * GDPR consent gate. When `false` (default) the component renders a\n * placeholder with a translated CTA — the Maps JS API is **not**\n * loaded. Flip to `true` once the consumer has captured opt-in.\n */\n consentGranted?: boolean;\n /** Fires when the consumer clicks the \"Load map\" CTA in the placeholder. */\n onConsentRequest?: () => void;\n /**\n * Optional address string shown in the consent placeholder so the\n * surface is useful before the map loads. Also used to build the\n * fallback \"Open in Google Maps\" link target.\n */\n address?: string;\n /**\n * Cloud-styled-map id. When set, takes precedence over the JSON\n * `styles` array and disables the theme-bridge re-fire. Use when\n * you've provisioned a styled map in Google Cloud Console.\n */\n mapId?: string;\n /**\n * Override the consent-placeholder description text. The default\n * (`t('mapView.consentDescription')`) is a generic IP-disclosure\n * line. Consumers operating under specific GDPR / ePrivacy\n * disclosures (jurisdiction, named controller, policy link) should\n * supply their own text via this prop. Pass any `ReactNode` — a\n * paragraph, a localised `<Trans>` instance, etc.\n */\n consentDescription?: ReactNode;\n /**\n * Replace the kit-rendered \"Load map\" button with custom CTA chrome.\n * Use when the consent dialog needs a policy link, a specific\n * jurisdiction phrasing, or a different surface (Tooltip-wrapped\n * button, link to a settings page, etc.). When omitted the kit\n * renders its own `<Button>` — that button calls `onConsentRequest`\n * if provided, otherwise flips MapView's internal opt-in state so\n * the map loads inline.\n */\n consentCta?: ReactNode;\n /**\n * Visual surface. Default `bordered` (current behaviour: 1px\n * `--border` outline + `--radius-md`). `elevated` replaces the\n * border with `--shadow-card`, matching `<Card variant=\"elevated\">`.\n * `bare` drops both — map is flush against the page canvas.\n */\n surface?: 'bordered' | 'elevated' | 'bare';\n /** Accessible label for the map region. Falls back to `t('mapView.label')`. */\n ariaLabel?: string;\n /**\n * Points the camera fits into view, with a margin, once the map has\n * loaded, and again whenever `fitKey` changes. Use it to show every pin\n * of a result list without the patient moving the map.\n *\n * - One point (or several at the same place) centres on it at\n * `fitMaxZoom`.\n * - No points: no fit, the camera shows `center` / `zoom`. If the\n * points run out after a fit, or the prop is removed, the camera\n * goes back there in one step.\n * - Between key changes nothing refits, so a map the patient has\n * panned or zoomed stays where they left it.\n * - A key change that only adds points (a \"load more\": every fitted\n * point is still there, compared by `id`) refits only if the patient\n * has not moved the map. Any other change refits. Give each point the\n * `id` of its result: two results can share an address.\n * - The camera is set in one step, never animated.\n * - While there are points to fit, the fit owns the camera: later\n * changes to `center` or `zoom` do not move it.\n */\n fitToPoints?: MapFitPoint[];\n /**\n * Identity of the fitted set: the camera refits only when this\n * changes. Pass the ids of the listed results, so re-sorting the same\n * results does not refit. Defaults to the points themselves, in any\n * order.\n */\n fitKey?: string;\n /**\n * The closest a fit may zoom in, so one result does not open at street\n * level. Default 15.\n */\n fitMaxZoom?: number;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst mapViewVariants = cva(\n ['ds:relative ds:overflow-hidden ds:block', 'ds:bg-[var(--muted)]'].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:[--map-block-size:14rem]',\n md: 'ds:[--map-block-size:20rem]',\n lg: 'ds:[--map-block-size:28rem]',\n // `fill` defers sizing to the parent. The outer takes\n // `block-size: 100%` so the inner (also 100%) has something\n // to inherit from. Use inside a viewport-locked column —\n // `<PracticeResults variant=\"map-first\">` wires this through\n // automatically; standalone consumers must give the parent\n // a constrained block-size or the map collapses to 0.\n fill: 'ds:[block-size:100%]',\n },\n surface: {\n bordered:\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n elevated:\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]',\n bare: 'ds:rounded-none ds:border-0',\n },\n },\n defaultVariants: { size: 'md', surface: 'bordered' },\n },\n);\n\n// Inner block-size: percentage when `size=\"fill\"`, rem-token otherwise.\n// Splitting this out (instead of compound-variants) keeps the size\n// switch readable and avoids enumerating every (size × surface) pair.\nconst innerSurfaceVariants = cva('ds:block ds:inline-size-full', {\n variants: {\n size: {\n sm: 'ds:[block-size:var(--map-block-size)]',\n md: 'ds:[block-size:var(--map-block-size)]',\n lg: 'ds:[block-size:var(--map-block-size)]',\n fill: 'ds:[block-size:100%]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\nconst consentChromeVariants = cva(\n [\n 'ds:absolute ds:inset-0',\n 'ds:flex ds:flex-col ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:bg-[var(--muted)] ds:text-[var(--foreground)]',\n 'ds:text-center',\n ].join(' '),\n);\n\nconst consentTitleVariants = cva('type-heading-3 ds:m-0');\n\nconst consentDescriptionVariants = cva(\n 'type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0',\n);\n\n/* ------------------------------------------------------------------ */\n/* Inner imperative bridge */\n/* */\n/* `useMap()` only resolves inside the APIProvider tree, so the */\n/* imperative actions live in a tiny inner component that the outer */\n/* `MapView` mounts conditionally. It exposes the `panTo` / `setZoom` */\n/* etc. to the forwardRef via a `useImperativeHandle` callback prop. */\n/* ------------------------------------------------------------------ */\n\ninterface MapImperativeBridgeProps {\n /** Called with the live handle on mount, and with `null` on unmount. */\n onHandleReady: (handle: MapBridgeHandle | null) => void;\n onMarkerSelect: (id: string | null) => void;\n onCameraMove: () => void;\n}\n\nfunction MapImperativeBridge({\n onHandleReady,\n onMarkerSelect,\n onCameraMove,\n}: MapImperativeBridgeProps): null {\n const map = useMap();\n useEffect(() => {\n if (!map) return;\n onHandleReady({\n panTo: (position) => {\n onCameraMove();\n map.panTo(position);\n },\n setZoom: (zoom) => {\n onCameraMove();\n map.setZoom(zoom);\n },\n jumpTo: (center, zoom) => {\n onCameraMove();\n map.moveCamera({ center, zoom });\n },\n selectMarker: (id) => onMarkerSelect(id),\n // Read straight off the live map: Google clamps `setZoom` to the\n // map type's range and animates `panTo`, so requested and applied\n // are not the same value.\n getCenter: () => map.getCenter()?.toJSON() ?? null,\n getZoom: () => map.getZoom() ?? null,\n });\n // Drop the handle when the subtree unmounts (consent revoked, or the\n // component tears down) so the outer getters answer `null` instead of\n // reporting a dead map's last known position.\n return () => onHandleReady(null);\n }, [map, onHandleReady, onMarkerSelect, onCameraMove]);\n return null;\n}\n\n/** Report once per settled viewport, with patient input kept separate from camera state. */\nfunction MapBoundsBridge({\n onBoundsChange,\n userInteraction,\n}: {\n onBoundsChange: NonNullable<MapViewProps['onBoundsChange']>;\n userInteraction: MutableRefObject<MapInteraction>;\n}): null {\n const map = useMap();\n const callback = useRef(onBoundsChange);\n callback.current = onBoundsChange;\n\n useEffect(() => {\n if (!map) return undefined;\n const div = map.getDiv();\n let previous: {\n bounds: MapBounds;\n center: MapLatLng;\n zoom: number;\n } | null = null;\n const resetInteraction = (): void => {\n userInteraction.current = {\n pendingInput: false,\n moved: false,\n programmatic: false,\n };\n };\n resetInteraction();\n let inputExpiry: ReturnType<typeof setTimeout> | undefined;\n const touchPointers = new Set<number>();\n const markInput = (event: Event): void => {\n if (event instanceof PointerEvent && event.pointerType === 'touch') {\n if (event.type === 'pointerdown') touchPointers.add(event.pointerId);\n if (event.type === 'pointerup' || event.type === 'pointercancel') {\n touchPointers.delete(event.pointerId);\n return;\n }\n }\n if (\n event instanceof PointerEvent &&\n event.type === 'pointermove' &&\n event.buttons === 0 &&\n event.pointerType !== 'touch'\n )\n return;\n if (\n event instanceof KeyboardEvent &&\n ![\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n '+',\n '=',\n '-',\n '_',\n 'Enter',\n ' ',\n 'PageUp',\n 'PageDown',\n ].includes(event.key)\n )\n return;\n // A short panTo can keep animating after the imperative call has\n // returned. Ordinary scrolling or clicking the map must not claim\n // that animation. A real camera gesture can interrupt it.\n const fullscreen = document.fullscreenElement;\n const fullscreenMap = Boolean(\n fullscreen && (fullscreen.contains(div) || div.contains(fullscreen)),\n );\n let cameraInput = event.type === 'dblclick';\n if (event instanceof PointerEvent && event.type === 'pointermove')\n cameraInput =\n event.pointerType !== 'touch' ||\n touchPointers.size >= 2 ||\n fullscreenMap;\n if (event.type === 'touchmove')\n cameraInput =\n (event as TouchEvent).touches.length >= 2 || fullscreenMap;\n if (event instanceof KeyboardEvent)\n cameraInput = event.key !== 'Enter' && event.key !== ' ';\n if (event instanceof WheelEvent)\n cameraInput = event.ctrlKey || event.metaKey || fullscreenMap;\n if (event.type === 'click')\n cameraInput =\n event.target instanceof Element &&\n event.target.closest('button, [role=\"button\"]') != null;\n if (cameraInput) userInteraction.current.programmatic = false;\n userInteraction.current.pendingInput = true;\n clearTimeout(inputExpiry);\n // Controls normally start moving the camera immediately. Expire an\n // input that did nothing; once movement starts it stays attributed\n // until idle, including a long drag or zoom animation.\n inputExpiry = setTimeout(() => {\n userInteraction.current.pendingInput = false;\n }, 250);\n };\n const markCameraChange = (): void => {\n if (\n userInteraction.current.pendingInput &&\n !userInteraction.current.programmatic\n )\n userInteraction.current.moved = true;\n };\n const report = (): void => {\n const bounds = map.getBounds()?.toJSON();\n const center = map.getCenter()?.toJSON();\n const zoom = map.getZoom();\n const fromInput = userInteraction.current.moved;\n resetInteraction();\n clearTimeout(inputExpiry);\n if (!bounds || !center || zoom == null) return;\n const changed =\n !previous ||\n (Object.keys(bounds) as (keyof MapBounds)[]).some(\n (key) => bounds[key] !== previous!.bounds[key],\n );\n const moved =\n previous != null &&\n (zoom !== previous.zoom ||\n center.lat !== previous.center.lat ||\n center.lng !== previous.center.lng);\n previous = { bounds, center, zoom };\n if (changed)\n callback.current(bounds, { userInteraction: fromInput && moved });\n };\n // Camera events alone include initial load, refits and resizes. Input\n // also covers touch, keyboard and Google's zoom controls, without\n // preventing their defaults or depending on vendor DOM selectors.\n const inputEvents = [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel',\n 'touchstart',\n 'touchmove',\n 'click',\n 'dblclick',\n 'wheel',\n 'keydown',\n ] as const;\n inputEvents.forEach((event) =>\n div.addEventListener(event, markInput, { capture: true, passive: true }),\n );\n const listeners = [\n map.addListener('dragstart', () => {\n userInteraction.current.programmatic = false;\n userInteraction.current.moved = true;\n }),\n map.addListener('center_changed', markCameraChange),\n map.addListener('zoom_changed', markCameraChange),\n map.addListener('idle', report),\n ];\n report();\n return () => {\n listeners.forEach((listener) => listener.remove());\n inputEvents.forEach((event) =>\n div.removeEventListener(event, markInput, true),\n );\n clearTimeout(inputExpiry);\n resetInteraction();\n };\n }, [map, userInteraction]);\n return null;\n}\n\ninterface MapInteraction {\n pendingInput: boolean;\n moved: boolean;\n programmatic: boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* Fit to points */\n/* */\n/* Lives inside <GoogleMap>, so it only runs once the `maps` library */\n/* has arrived and `useMap()` holds a real map: the load-race rule */\n/* below applies to it too. The camera is computed here (Web Mercator) */\n/* and set in one step, rather than through fitBounds: fitBounds takes */\n/* no zoom limit, and capping it afterwards needs an `idle` event that */\n/* Google may never send when the view does not change, so the cap */\n/* could fire on the patient's next zoom instead. Setting the camera */\n/* directly is synchronous and never animates (reduced motion). */\n/* */\n/* A map in a hidden column or a sheet still opening has no size yet, */\n/* so the fit waits for the map to be laid out. */\n/* ------------------------------------------------------------------ */\n\n/** Google's world is 256px wide at zoom 0. */\nconst WORLD_PX = 256;\n\nconst toRadians = (degrees: number): number => (degrees * Math.PI) / 180;\n\n/** Web Mercator y of a latitude: the world spans -π..π. */\nfunction mercatorY(lat: number): number {\n const sin = Math.min(Math.max(Math.sin(toRadians(lat)), -0.9999), 0.9999);\n return Math.log((1 + sin) / (1 - sin)) / 2;\n}\n\nconst latitudeOf = (y: number): number =>\n (Math.atan(Math.sinh(y)) * 180) / Math.PI;\n\n/** The box round `points` (not antimeridian-aware: the kit maps Europe). */\nfunction boundsOfPoints(points: MapLatLng[]): google.maps.LatLngBoundsLiteral {\n let north = -90;\n let south = 90;\n let east = -180;\n let west = 180;\n for (const { lat, lng } of points) {\n north = Math.max(north, lat);\n south = Math.min(south, lat);\n east = Math.max(east, lng);\n west = Math.min(west, lng);\n }\n return { north, south, east, west };\n}\n\n/**\n * The centre and the closest whole zoom that shows every point inside a\n * `width` x `height` map, `padding` px in from each edge, no closer than\n * `maxZoom`. Exported for tests.\n */\nexport function cameraForPoints(\n points: MapLatLng[],\n width: number,\n height: number,\n padding: number,\n maxZoom: number,\n): { center: MapLatLng; zoom: number } {\n const { north, south, east, west } = boundsOfPoints(points);\n if (north === south && east === west) {\n return { center: { lat: north, lng: east }, zoom: maxZoom };\n }\n const top = mercatorY(north);\n const bottom = mercatorY(south);\n const center = {\n lat: latitudeOf((top + bottom) / 2),\n lng: (east + west) / 2,\n };\n const fit = (px: number, fraction: number): number =>\n fraction > 0 ? Math.log2(Math.max(px, 1) / WORLD_PX / fraction) : maxZoom;\n const zoom = Math.min(\n fit(width - 2 * padding, (east - west) / 360),\n fit(height - 2 * padding, (top - bottom) / (2 * Math.PI)),\n maxZoom,\n );\n return { center, zoom: Math.max(0, Math.floor(zoom)) };\n}\n\n/** A fit point's identity: its id, or else its coordinates. */\nconst pointKey = ({ id, lat, lng }: MapFitPoint): string =>\n id != null ? `id:${id}` : `at:${lat},${lng}`;\n\ninterface MapFitterProps {\n points: MapFitPoint[];\n fitKey: string;\n maxZoom: number;\n onCameraMove: () => void;\n}\n\nfunction MapFitter({\n points,\n fitKey,\n maxZoom,\n onCameraMove,\n}: MapFitterProps): null {\n const map = useMap();\n const fitted = useRef<{\n map: google.maps.Map;\n key: string;\n points: Set<string>;\n } | null>(null);\n // Whether the patient has panned or zoomed since the last fit: any\n // camera the kit did not set counts. Comparing with the camera the kit\n // last set (rather than flagging the kit's own call) holds whether\n // Google reports the change at once or later, and catches keyboard and\n // control-button pans, which fire no `dragstart`.\n const userMoved = useRef(false);\n const ownCamera = useRef<{ center: MapLatLng; zoom: number } | null>(null);\n\n useEffect(() => {\n if (!map) return undefined;\n const check = (): void => {\n const own = ownCamera.current;\n const center = map.getCenter()?.toJSON();\n const zoom = map.getZoom();\n const same =\n own != null &&\n zoom === own.zoom &&\n center != null &&\n Math.abs(center.lat - own.center.lat) < 1e-6 &&\n Math.abs(center.lng - own.center.lng) < 1e-6;\n if (!same) userMoved.current = true;\n };\n const listeners = [\n map.addListener('dragstart', () => {\n userMoved.current = true;\n }),\n map.addListener('center_changed', check),\n map.addListener('zoom_changed', check),\n ];\n return () => listeners.forEach((listener) => listener.remove());\n }, [map]);\n\n useEffect(() => {\n if (!map) return undefined;\n const last = fitted.current?.map === map ? fitted.current : null;\n if (last?.key === fitKey) return undefined;\n const keys = new Set(points.map(pointKey));\n const moveCamera = (center: MapLatLng, zoom: number): void => {\n ownCamera.current = { center, zoom };\n onCameraMove();\n // One step, never animated.\n map.moveCamera({ center, zoom });\n userMoved.current = false;\n };\n\n if (points.length === 0) {\n // Nothing to fit. MapView returns the camera to center/zoom when\n // fitting ends. Recording the empty set means the same results\n // coming back later count as a change and fit again.\n fitted.current = { map, key: fitKey, points: keys };\n return undefined;\n }\n\n // More of the same results (\"load more\"): every point already fitted\n // is still listed, by identity. If the patient has moved the map,\n // their view wins. A result replaced by another at the same address\n // is a different id, so that set refits.\n const grewOnly =\n last != null &&\n last.points.size > 0 &&\n [...last.points].every((point) => keys.has(point));\n if (grewOnly && userMoved.current) {\n fitted.current = { map, key: fitKey, points: keys };\n return undefined;\n }\n\n const div = map.getDiv();\n // Only a fake map has no element; there is nothing to measure.\n if (!(div instanceof Element)) return undefined;\n const fit = (): void => {\n fitted.current = { map, key: fitKey, points: keys };\n // Never more than a quarter of either side, so a small map still\n // has room to fit the points rather than zooming out to the world.\n const padding = Math.min(\n lengthTokenPx('--spacing-2xl', div, 48),\n div.clientWidth / 4,\n div.clientHeight / 4,\n );\n const { center, zoom } = cameraForPoints(\n points,\n div.clientWidth,\n div.clientHeight,\n padding,\n maxZoom,\n );\n moveCamera(center, zoom);\n };\n const laidOut = (): boolean => div.clientWidth > 0 && div.clientHeight > 0;\n if (laidOut() || typeof ResizeObserver === 'undefined') {\n fit();\n return undefined;\n }\n const observer = new ResizeObserver(() => {\n if (!laidOut()) return;\n observer.disconnect();\n fit();\n });\n observer.observe(div);\n return () => observer.disconnect();\n }, [map, fitKey, points, maxZoom, onCameraMove]);\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Library gates */\n/* */\n/* APIProvider reports LOADED as soon as `google.maps.importLibrary` */\n/* exists when another loader installed it (Google's bootstrap, a host */\n/* Places loader), before the `maps` library itself has arrived. <Map> */\n/* would then run `new google.maps.Map` and throw, taking the host's */\n/* React tree down. The map waits for `maps`, and the markers for */\n/* `marker`, whoever loaded the API. Before the API loads, <Map> only */\n/* renders its empty container, and once a constructor exists nothing */\n/* can throw, so both pass straight through as they always did. */\n/* ------------------------------------------------------------------ */\n\ntype GoogleMapsGlobal = {\n google?: { maps?: { Map?: unknown; Marker?: unknown } };\n};\nconst hasConstructor = (name: 'Map' | 'Marker'): boolean =>\n typeof (globalThis as GoogleMapsGlobal).google?.maps?.[name] === 'function';\n\n/** What the map area shows while Google's map library is on its way.\n * Exported for its story; not part of the public API. */\nexport function MapViewLoading(): ReactNode {\n const { t } = useTranslation('ui');\n return (\n <div\n role=\"status\"\n data-testid=\"map-view-loading\"\n className=\"ds:[inline-size:100%] ds:[block-size:100%]\"\n >\n <Skeleton variant=\"rectangular\" width=\"100%\" height=\"100%\" />\n <VisuallyHidden>{t('common.loading')}</VisuallyHidden>\n </div>\n );\n}\n\nfunction MapsLibraryGate({ children }: { children: ReactNode }): ReactNode {\n const apiIsLoaded = useApiIsLoaded();\n const maps = useMapsLibrary('maps');\n if (maps || !apiIsLoaded || hasConstructor('Map')) return children;\n return <MapViewLoading />;\n}\n\nfunction MarkerLibraryGate({ children }: { children: ReactNode }): ReactNode {\n const marker = useMapsLibrary('marker');\n return marker || hasConstructor('Marker') ? children : null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Consent placeholder */\n/* ------------------------------------------------------------------ */\n\ninterface ConsentPlaceholderProps {\n address: string | undefined;\n description: ReactNode;\n /**\n * Click handler for the \"Load map\" button. Always rendered. When the\n * consumer provides `onConsentRequest` it owns the state transition\n * (typically: open a GDPR dialog, then flip `consentGranted` to true\n * after acceptance). When omitted, the kit's `MapView` falls back to\n * its own internal opt-in toggle — clicking grants consent for this\n * MapView instance only, no consumer plumbing required. This default\n * fixes a regression where the button was conditionally rendered and\n * any consumer omitting `onConsentRequest` left the patient with no\n * way to load the map (booking-website 0.31.0 hit this).\n */\n onLoadMap: () => void;\n openInGoogleMapsHref: string;\n /**\n * Custom CTA — replaces the kit-rendered `<Button>` when the consumer\n * needs a different surface (e.g. a Tooltip-wrapped button with a\n * policy link). The kit's button is still the recommended path; this\n * slot exists for consumers operating under specific compliance UX\n * requirements (jurisdiction, named controller, policy link). Pass\n * any `ReactNode`.\n */\n consentCta: ReactNode | undefined;\n}\n\nfunction ConsentPlaceholder({\n address,\n description,\n onLoadMap,\n openInGoogleMapsHref,\n consentCta,\n}: ConsentPlaceholderProps): ReactNode {\n const { t } = useTranslation('ui');\n return (\n <div className={consentChromeVariants()} data-testid=\"map-view-consent\">\n <MapPin\n aria-hidden=\"true\"\n className=\"ds:size-6 ds:text-[var(--muted-foreground)]\"\n />\n <p className={consentTitleVariants()}>{t('mapView.consentTitle')}</p>\n {address ? (\n <p\n className={consentDescriptionVariants()}\n data-testid=\"map-view-address\"\n >\n {address}\n </p>\n ) : null}\n <p className={consentDescriptionVariants()}>{description}</p>\n <div className=\"ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center\">\n {consentCta ?? (\n <Button\n type=\"button\"\n intent=\"primary\"\n size=\"sm\"\n onClick={onLoadMap}\n data-testid=\"map-view-load-cta\"\n >\n {t('mapView.consentCta')}\n </Button>\n )}\n <a\n href={openInGoogleMapsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2\"\n >\n {t('mapView.openInGoogleMaps')}\n <ExternalLink aria-hidden=\"true\" className=\"ds:size-3\" />\n </a>\n </div>\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MapView */\n/* ------------------------------------------------------------------ */\n\nexport const MapView = forwardRef<MapViewHandle, MapViewProps>(\n (\n {\n id,\n apiKey,\n center,\n zoom = 15,\n markers,\n selectedMarkerId,\n onMarkerClick,\n onBoundsChange,\n consentGranted = false,\n onConsentRequest,\n address,\n consentDescription,\n consentCta,\n mapId,\n size,\n surface,\n ariaLabel,\n fitToPoints,\n fitKey,\n fitMaxZoom = 15,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const fitPoints = useMemo(() => fitToPoints ?? [], [fitToPoints]);\n // Identity and place: a result that keeps its id but moves (a\n // corrected address) still refits. \"Only grew\" uses identity alone.\n const resolvedFitKey = useMemo(\n () =>\n fitKey ??\n fitPoints\n .map((point) => `${pointKey(point)}@${point.lat},${point.lng}`)\n .sort()\n .join('|'),\n [fitKey, fitPoints],\n );\n // While there are points, the fit owns the camera (see `fitToPoints`).\n const fitting = fitPoints.length > 0;\n const wasFitting = useRef(fitting);\n const rawId = useId();\n const instanceId = useMemo(\n () => `map-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n\n // Reduced-motion gating. Google's own pan / zoom animations\n // happen inside the Maps JS API and the kit can't reach into\n // those — but the kit's own programmatic `panTo` calls (triggered\n // by prop changes via the controlled-sync effect below) can be\n // suppressed. When `prefers-reduced-motion: reduce` is set, we\n // skip the synthetic `panTo` so the consumer's prop change\n // results in a hard recenter rather than an animated glide.\n const [reducedMotion, setReducedMotion] = useState(false);\n useEffect(() => {\n if (typeof window === 'undefined') return undefined;\n const mql = window.matchMedia('(prefers-reduced-motion: reduce)');\n const sync = (): void => setReducedMotion(mql.matches);\n sync();\n mql.addEventListener('change', sync);\n return () => mql.removeEventListener('change', sync);\n }, []);\n\n // The \"Open in Google Maps\" fallback link — works without any\n // third-party script load. Uses the modern `?api=1&query=…` form\n // which the booking site already employs.\n const openInGoogleMapsHref = useMemo(() => {\n const query = address\n ? encodeURIComponent(address)\n : `${center.lat},${center.lng}`;\n return `https://www.google.com/maps/search/?api=1&query=${query}`;\n }, [address, center.lat, center.lng]);\n\n // 0.33.5: removed the kit's `getGoogleMapsTheme()` JSON-styles\n // override. Previously, when `mapId` was absent the kit painted\n // water / roads / landscape with kit tokens — a calm muted-grey\n // palette that diverged from the standard Google Maps appearance\n // users expect in every other maps surface they touch. Google's\n // default (blue water, beige land, named-road colours) is more\n // familiar and reads as a \"real map\" rather than a stylised one.\n //\n // Consumers wanting brand-themed colours opt in via `mapId` and\n // configure the palette in Google Cloud Console — that's the\n // Google-recommended path. The `getGoogleMapsTheme` export stays\n // in `src/tokens/google-maps-theme.ts` so consumers wanting the\n // old behaviour can apply the styles themselves, but the kit\n // does NOT install them by default any more.\n //\n // Side benefit: dropped the MutationObserver that previously\n // watched documentElement.class for theme switches — no more\n // observer churn on every theme toggle.\n\n // Imperative handle plumbing — populated by the inner bridge once\n // the APIProvider tree resolves a `Map` instance.\n const handleRef = useRef<MapBridgeHandle | null>(null);\n const userInteraction = useRef<MapInteraction>({\n pendingInput: false,\n moved: false,\n programmatic: false,\n });\n const onCameraMove = useCallback(() => {\n userInteraction.current = {\n pendingInput: false,\n moved: false,\n programmatic: true,\n };\n }, []);\n const handleMarkerClick = useCallback(\n (markerId: string | null) => {\n onCameraMove();\n onMarkerClick?.(markerId);\n },\n [onCameraMove, onMarkerClick],\n );\n const onHandleReady = useCallback((handle: MapBridgeHandle | null) => {\n handleRef.current = handle;\n }, []);\n\n // Read in the OUTER component, not through `handleRef` — these three\n // must still answer when the map subtree is unmounted, which is\n // exactly the situation an agent needs explaining. Assigned during\n // render, below, once `effectiveConsent` exists.\n const consentRef = useRef(false);\n const selectedMarkerIdRef = useRef<string | null>(null);\n const markerCountRef = useRef(0);\n\n const buildHandle = useCallback(\n (): MapViewHandle => ({\n panTo: (position) => handleRef.current?.panTo(position),\n setZoom: (z) => handleRef.current?.setZoom(z),\n selectMarker: (markerId) => handleRef.current?.selectMarker(markerId),\n // Without `isConsentGranted` an agent has no way to learn that\n // its pan / zoom / select was swallowed by the GDPR gate rather\n // than applied: under the default (`consentGranted={false}`) the\n // whole Maps subtree is unmounted and every action optional-chains\n // into nothing.\n isConsentGranted: () => consentRef.current,\n getCenter: () => handleRef.current?.getCenter() ?? null,\n getZoom: () => handleRef.current?.getZoom() ?? null,\n getSelectedMarkerId: () => selectedMarkerIdRef.current,\n getMarkerCount: () => markerCountRef.current,\n }),\n [],\n );\n useImperativeHandle(ref, buildHandle, [buildHandle]);\n\n const agentHandle = useMemo<MapViewHandle>(\n () => buildHandle(),\n [buildHandle],\n );\n useAgentRegistration(mapViewAgent, agentHandle, id);\n\n // Controlled-feeling propagation: vis.gl's `<Map>` reads `center`\n // and `zoom` as initial values only (via `defaultCenter` /\n // `defaultZoom`). To honour the documented \"live prop\" contract\n // we shim post-mount sync through the imperative bridge — a\n // parent that swaps offices by changing `center` re-centres the\n // map. User drag does NOT trigger this because the prop doesn't\n // change on user gesture, so the effect doesn't fire and the\n // map stays where the user left it.\n //\n // While fitting, the fit owns the camera and both syncs stand down.\n // `fitting` is a dependency, so when fitting ends (the points run out\n // or `fitToPoints` is removed) the camera returns to `center` / `zoom`\n // even if neither changed. That return is one step, not animated, so\n // it applies under reduced motion too.\n useEffect(() => {\n const fitEnded = wasFitting.current && !fitting;\n wasFitting.current = fitting;\n if (fitting) return;\n if (fitEnded) {\n handleRef.current?.jumpTo(center, zoom);\n return;\n }\n // Skip the animated pan under reduced-motion preference; the\n // map will still recentre on the next render via the agent\n // handle's `panTo`, but Google's own glide animation runs\n // either way (kit can't reach inside it). At least the kit's\n // own initiated pan is gated.\n if (reducedMotion) return;\n handleRef.current?.panTo(center);\n // Including `center` (the object reference) instead of\n // `center.lat`/`center.lng` would fire on every parent render\n // even when the coordinates are identical, fighting user drag.\n // `zoom` is read only when fitting ends; its own sync is below.\n // The destructured deps are intentional.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [center.lat, center.lng, reducedMotion, fitting]);\n useEffect(() => {\n if (fitting) return;\n handleRef.current?.setZoom(zoom);\n }, [zoom, fitting]);\n\n // Internal opt-in fallback. The `consentGranted` prop is the\n // controlled path — consumer flips it after capturing GDPR\n // acceptance through their own dialog and re-renders. When the\n // consumer omits `onConsentRequest` they're opting out of that\n // workflow, so the kit needs a sensible default click handler on\n // the placeholder's button. `internalConsent` tracks that opt-in\n // for this instance only; the map renders when either signal is\n // truthy. The 0.31.0 regression was conditionally rendering the\n // button on `onConsentRequest` — patients of consumers without the\n // hook saw the placeholder with no way to proceed.\n const [internalConsent, setInternalConsent] = useState(false);\n const effectiveConsent = consentGranted || internalConsent;\n // Mirror the three props-derived agent state slots. Assigned during\n // render so a read immediately after a prop change sees the settled\n // value. Ids and a count only — never `MapMarker.label`, never the\n // `address` prop (consumer-supplied free text, PII in any\n // patient-address deployment), never `apiKey`.\n consentRef.current = effectiveConsent;\n selectedMarkerIdRef.current = selectedMarkerId ?? null;\n markerCountRef.current = (markers ?? []).length;\n const handleLoadMap = useCallback(() => {\n if (onConsentRequest) {\n onConsentRequest();\n // The consumer typically flips `consentGranted` to true on the\n // next render. Flip the internal state too so the map still\n // loads if the consumer forgets to update its prop (the\n // common-case footgun this fallback exists to defuse).\n setInternalConsent(true);\n return;\n }\n setInternalConsent(true);\n }, [onConsentRequest]);\n\n return (\n <div\n className={mapViewVariants({ size, surface, className })}\n data-component=\"map-view\"\n data-component-id={id ?? instanceId}\n role=\"region\"\n aria-label={ariaLabel ?? t('mapView.label')}\n {...rest}\n >\n <div className={innerSurfaceVariants({ size })}>\n {effectiveConsent ? (\n // A provider failure shows the consent placeholder (its \"Open in\n // Google Maps\" link needs no script) with \"Load map\" as the\n // retry, instead of unmounting the host's React tree. The gate\n // starts the provider only once Google's `core` and `maps`\n // libraries have arrived.\n <ErrorBoundary\n fallback={({ reset }) => (\n <ConsentPlaceholder\n address={address}\n description={\n consentDescription ?? t('mapView.consentDescription')\n }\n onLoadMap={reset}\n // Always the kit button: a host's own CTA would not call\n // `reset`, so with consent already granted it would do\n // nothing and the patient could not retry.\n consentCta={undefined}\n openInGoogleMapsHref={openInGoogleMapsHref}\n />\n )}\n >\n <MapsCoreGate libraries={['maps']} pending={<MapViewLoading />}>\n <APIProvider\n apiKey={apiKey}\n // Pull the active i18next locale through so map UI text\n // (zoom controls, attribution) localises to match the\n // surrounding kit chrome.\n language={i18n.language}\n >\n <MapsLibraryGate>\n <GoogleMap\n defaultCenter={center}\n defaultZoom={zoom}\n mapId={mapId}\n gestureHandling=\"cooperative\"\n disableDefaultUI={false}\n onClick={() => handleMarkerClick(null)}\n // `<Map>` reads its own bounding rect for tile sizing.\n // Without explicit dimensions it collapses to 0×0, so\n // we pass kit-class sizing through `className` — vis.gl\n // forwards `className` straight to the rendered root.\n className=\"ds:[inline-size:100%] ds:[block-size:100%]\"\n >\n <MapImperativeBridge\n onHandleReady={onHandleReady}\n onMarkerSelect={handleMarkerClick}\n onCameraMove={onCameraMove}\n />\n {onBoundsChange ? (\n <MapBoundsBridge\n onBoundsChange={onBoundsChange}\n userInteraction={userInteraction}\n />\n ) : null}\n {fitToPoints ? (\n <MapFitter\n points={fitPoints}\n fitKey={resolvedFitKey}\n maxZoom={fitMaxZoom}\n onCameraMove={onCameraMove}\n />\n ) : null}\n <MarkerLibraryGate>\n {(markers ?? []).map((marker) => {\n // Selection state is exposed to the consumer via\n // `data-selected` on the marker root so consumers can\n // style their own InfoWindow / sidebar highlight from\n // it. The kit does NOT swap the Pin's fill colour on\n // selection — `--accent` (magenta-500 in light theme)\n // fails AA on white per 05-accessibility.mdx, and the\n // alternative tokens that pass (`--info`, `--success`)\n // carry semantic baggage. Visual selection state is\n // the consumer's call.\n const isSelected =\n selectedMarkerId != null &&\n selectedMarkerId === marker.id;\n const accessibleLabel = t('mapView.markerLabel', {\n label: marker.label ?? marker.id,\n });\n // Pin implementation switches on whether the\n // consumer supplied `mapId`. Google's\n // AdvancedMarkerElement requires the Map instance to\n // be initialised with a valid Map ID — without one\n // the API logs an error (\"La mappa è stata\n // inizializzata senza un ID mappa valido\") and any\n // AdvancedMarker rendered against that map fails to\n // appear. Cloud Map IDs are an opt-in feature; many\n // consumers (booking-website env without\n // GOOGLE_MAPS_MAP_ID, the OSS demo, etc.) legitimately\n // omit it.\n //\n // Fall back to the classic <Marker> (a thin wrapper\n // around google.maps.Marker) when mapId is absent.\n // Google has formally deprecated google.maps.Marker\n // but it still renders cleanly and produces no\n // console errors; the only loss is the brand-tinted\n // <Pin> chrome (which Marker doesn't accept as a\n // child). When a consumer wants the styled pin they\n // can opt back in by supplying `mapId`.\n if (mapId) {\n return (\n <AdvancedMarker\n key={marker.id}\n position={marker.position}\n // `title` becomes the HTML `title` attribute on\n // Google's marker wrapper — that's a tooltip, not\n // a reliable accessible name. The wrapper also\n // receives `aria-label` which Google honours as\n // the SR-announced name. Both are set so sighted\n // hover tooltips and SR labels stay aligned.\n title={accessibleLabel}\n aria-label={accessibleLabel}\n data-selected={isSelected ? 'true' : 'false'}\n onClick={() => handleMarkerClick(marker.id)}\n >\n <Pin\n background={'var(--primary)'}\n borderColor={'var(--primary)'}\n glyphColor={'var(--primary-foreground)'}\n />\n </AdvancedMarker>\n );\n }\n return (\n <Marker\n key={marker.id}\n position={marker.position}\n title={accessibleLabel}\n onClick={() => handleMarkerClick(marker.id)}\n />\n );\n })}\n </MarkerLibraryGate>\n </GoogleMap>\n </MapsLibraryGate>\n </APIProvider>\n </MapsCoreGate>\n </ErrorBoundary>\n ) : (\n <ConsentPlaceholder\n address={address}\n description={\n consentDescription ?? t('mapView.consentDescription')\n }\n onLoadMap={handleLoadMap}\n consentCta={consentCta}\n openInGoogleMapsHref={openInGoogleMapsHref}\n />\n )}\n </div>\n </div>\n );\n },\n);\nMapView.displayName = 'MapView';\n"],"names":["mapViewAgent","handle","args","mapViewVariants","cva","innerSurfaceVariants","consentChromeVariants","consentTitleVariants","consentDescriptionVariants","MapImperativeBridge","onHandleReady","onMarkerSelect","onCameraMove","map","useMap","useEffect","position","zoom","center","id","_a","MapBoundsBridge","onBoundsChange","userInteraction","callback","useRef","div","previous","resetInteraction","inputExpiry","touchPointers","markInput","event","fullscreen","fullscreenMap","cameraInput","markCameraChange","report","bounds","_b","fromInput","changed","key","moved","inputEvents","listeners","listener","WORLD_PX","toRadians","degrees","mercatorY","lat","sin","latitudeOf","y","boundsOfPoints","points","north","south","east","west","lng","cameraForPoints","width","height","padding","maxZoom","top","bottom","fit","px","fraction","pointKey","MapFitter","fitKey","fitted","userMoved","ownCamera","check","own","last","keys","moveCamera","point","lengthTokenPx","laidOut","observer","hasConstructor","name","MapViewLoading","t","useTranslation","jsxs","jsx","Skeleton","VisuallyHidden","MapsLibraryGate","children","apiIsLoaded","useApiIsLoaded","useMapsLibrary","MarkerLibraryGate","ConsentPlaceholder","address","description","onLoadMap","openInGoogleMapsHref","consentCta","MapPin","Button","ExternalLink","MapView","forwardRef","apiKey","markers","selectedMarkerId","onMarkerClick","consentGranted","onConsentRequest","consentDescription","mapId","size","surface","ariaLabel","fitToPoints","fitMaxZoom","className","rest","ref","i18n","fitPoints","useMemo","resolvedFitKey","fitting","wasFitting","rawId","useId","instanceId","reducedMotion","setReducedMotion","useState","mql","sync","handleRef","useCallback","handleMarkerClick","markerId","consentRef","selectedMarkerIdRef","markerCountRef","buildHandle","z","useImperativeHandle","agentHandle","useAgentRegistration","fitEnded","internalConsent","setInternalConsent","effectiveConsent","handleLoadMap","ErrorBoundary","reset","MapsCoreGate","APIProvider","GoogleMap","marker","isSelected","accessibleLabel","AdvancedMarker","Pin","Marker"],"mappings":";;;;;;;;;;;;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BAAA;AAAA,4BAHrCA,EAAO;AAAA,0BAAA;AAAA,wBAMlB,CAAC,EAAA,CACH;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAAA,EACF,CACF;AAAA,gBAAA;AAAA,cAAA,EACF,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,YAGF,gBAAAxE;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,SAAAC;AAAA,YACA,aACEgB,KAAsB7B,EAAE,4BAA4B;AAAA,YAEtD,WAAWqE;AAAA,YACX,YAAApD;AAAA,YACA,sBAAAD;AAAA,UAAA;AAAA,QAAA,EACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAK,GAAQ,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-select-i5MFRpXg.js","sources":["../../src/components/multi-select/multi-select.agent.ts","../../src/components/multi-select/multi-select.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { MultiSelectHandle } from './multi-select';\n\nexport const multiSelectAgent: AgentAdapter<MultiSelectHandle> = {\n id: 'multi-select',\n // Persisted multi-choice (selection state + set_selection) → select_multiple,\n // plus type-to-filter and open/close of the option list.\n capabilities: ['select_multiple', 'filter', 'open', 'close'],\n state: {\n selection: {\n type: 'string[]',\n descriptionKey: 'ui.agent.multiSelect.state.selection',\n description: 'Values of currently-selected options.',\n read: (handle) => handle.getSelection(),\n },\n query: {\n type: 'string',\n descriptionKey: 'ui.agent.multiSelect.state.query',\n description: 'Current filter query.',\n read: (handle) => handle.getQuery(),\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.multiSelect.state.isOpen',\n description: 'True when the option list is visible.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n set_selection: {\n // Persists the user's chosen options — reversible via the same UI.\n safety: 'write',\n argsType: '{ values: string[] }',\n argsSchema: {\n type: 'object',\n properties: {\n values: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Option values to select (replaces the current selection).',\n },\n },\n required: ['values'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.multiSelect.actions.setSelection',\n description:\n 'Replace the current selection with the given list of values.',\n examples: [\n {\n args: { values: ['a', 'b'] },\n note: 'Select exactly options \"a\" and \"b\".',\n },\n ],\n invoke: (handle, args: { values: string[] }) => {\n handle.setSelection(args.values);\n },\n },\n clear_selection: {\n // Discards the persisted selection — destructive (loses the choices).\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.multiSelect.actions.clearSelection',\n description: 'Clear the current selection.',\n invoke: (handle) => {\n handle.clearSelection();\n },\n },\n apply_filter: {\n // Pure ephemeral filter of the visible options — no persisted change.\n safety: 'read',\n argsType: '{ query: string }',\n argsSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Filter text for the list.' },\n },\n required: ['query'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.multiSelect.actions.applyFilter',\n description: 'Set the filter query for the option list.',\n invoke: (handle, args: { query: string }) => {\n handle.setQuery(args.query);\n },\n },\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.multiSelect.actions.open',\n description: 'Open the option list.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.multiSelect.actions.close',\n description: 'Close the option list.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'multi-select' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-option-id',\n description: 'Each option emits its value as data-option-id.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactElement,\n type Ref,\n} from 'react';\nimport * as Popover from '@radix-ui/react-popover';\nimport { Command } from 'cmdk';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, X } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlRef,\n} from '../form-field/form-field-context';\nimport { Tooltip } from '../tooltip';\nimport type { OptionShape } from '../_shared/option';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { groupOptions } from '../_shared/group-options';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport {\n OPTION_BODY_CLASSES,\n OPTION_END_CLASSES,\n OPTION_LABEL_ROW_CLASSES,\n optionDescriptionVariants,\n optionLabelVariants,\n} from '../_shared/option-row';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_TEXT,\n} from '../_shared/input-surface';\nimport { useAgentRegistration } from '../../agent';\nimport { multiSelectAgent } from './multi-select.agent';\n\n// MultiSelect uses `min-h-*` (not `h-*`) because the wrapper grows vertically\n// as chips wrap to additional lines. The height floor per size mirrors the\n// other inputs' fixed heights in _shared/input-surface.ts.\nconst multiSelectVariants = cva(\n [\n 'ds:inline-flex ds:flex-wrap ds:items-center ds:gap-1 ds:w-full',\n INPUT_SURFACE_CHROME,\n 'ds:aria-[invalid=true]:border-destructive',\n 'ds:aria-disabled:cursor-not-allowed ds:aria-disabled:opacity-50',\n ],\n {\n variants: {\n size: {\n sm: `ds:min-h-8 ds:ps-2 ds:pe-2 ds:py-1 ${INPUT_SURFACE_TEXT.sm}`,\n md: `ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:py-1.5 ${INPUT_SURFACE_TEXT.md}`,\n lg: `ds:min-h-12 ds:ps-4 ds:pe-4 ds:py-2 ${INPUT_SURFACE_TEXT.lg}`,\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst chipVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-1',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-muted',\n 'ds:text-foreground ds:select-none',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ],\n {\n variants: {\n size: {\n sm: 'ds:ps-2 ds:pe-1 ds:py-0.5 ds:text-[length:var(--font-size-xs)]',\n md: 'ds:ps-2 ds:pe-1 ds:py-0.5 ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:ps-3 ds:pe-1.5 ds:py-1 ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst chipDismissClasses = [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-muted-foreground ds:hover:text-foreground',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:size-4',\n 'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"]',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:z-[var(--z-dropdown)] ds:overflow-hidden',\n // At least as wide as the field, at most as wide as the screen allows: a\n // long option wraps or ends in an ellipsis instead of running off the\n // edge. The floor gives way to the cap on a field wider than that.\n 'ds:min-w-[min(var(--radix-popover-trigger-width),var(--radix-popover-content-available-width))]',\n 'ds:max-w-[var(--radix-popover-content-available-width)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:animate-in ds:fade-in ds:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out',\n 'ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2',\n 'ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst commandItemClasses = [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center',\n 'ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5',\n 'ds:text-[var(--font-size-sm)] ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n 'ds:aria-[disabled=true]:pointer-events-none ds:aria-[disabled=true]:opacity-50',\n 'ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50',\n].join(' ');\n\nconst actionItemClasses = [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center',\n 'ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5',\n 'ds:text-[var(--font-size-sm)] ds:font-medium ds:text-primary ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n].join(' ');\n\nconst SELECT_ALL_VALUE = '__ui-multiselect-select-all__';\nconst CLEAR_ALL_VALUE = '__ui-multiselect-clear-all__';\n\ntype HTMLDivAttributes = HTMLAttributes<HTMLDivElement>;\n\n// Curated agent-readiness handle — see multi-select.agent.ts.\nexport interface MultiSelectHandle {\n getSelection: () => string[];\n getQuery: () => string;\n getIsOpen: () => boolean;\n setSelection: (values: string[]) => void;\n clearSelection: () => void;\n setQuery: (query: string) => void;\n open: () => void;\n close: () => void;\n}\n\nexport interface MultiSelectProps<T extends string = string>\n extends\n Omit<HTMLDivAttributes, 'onChange'>,\n VariantProps<typeof multiSelectVariants> {\n options: OptionShape<T>[];\n value?: T[];\n defaultValue?: T[];\n onChange?: (next: T[]) => void;\n onComplete?: (values: T[]) => void;\n placeholder?: string;\n maxSelections?: number;\n allowSelectAll?: boolean;\n allowClear?: boolean;\n filter?: (query: string, option: OptionShape<T>) => boolean;\n size?: 'sm' | 'md' | 'lg';\n disabled?: boolean;\n /**\n * Let a long option label wrap onto a second line instead of ending in an\n * ellipsis. Longer still, it is clipped after two lines. Off by default.\n * An option's `description` always sits on its own line under the label.\n */\n wrapOptionLabels?: boolean;\n}\n\nconst MultiSelectImpl = forwardRef<HTMLDivElement, MultiSelectProps>(\n function MultiSelect(\n {\n options,\n value,\n defaultValue,\n onChange,\n onComplete,\n placeholder,\n maxSelections,\n allowSelectAll = false,\n allowClear = false,\n filter,\n size = 'md',\n disabled,\n wrapOptionLabels = false,\n className,\n id,\n // Pull `aria-label` out of the div spread so it names the combobox\n // INPUT (the interactive control) rather than the wrapper div. Lets a\n // consumer give the trigger a meaningful name when there's no visible\n // label or FormField (e.g. a data-table floating filter naming itself\n // after its column). Untouched callers fall back to the placeholder.\n // Inside a FormField the field's label names the input and this is\n // ignored, so it can never override the visible text (WCAG 2.5.3).\n 'aria-label': ariaLabel,\n ...divProps\n },\n ref,\n ) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const [currentValueRaw, setMultiSelectValue] = useControllableState<\n string[]\n >({\n value,\n defaultValue: defaultValue ?? [],\n onChange,\n });\n const currentValue = currentValueRaw ?? [];\n\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n\n const inputRef = useRef<HTMLInputElement>(null);\n const counterId = `${useId()}-count`;\n const chipRefs = useRef<Array<HTMLSpanElement | null>>([]);\n const triggerRef = useRef<HTMLDivElement>(null);\n const composedRef = composeRefs<HTMLDivElement>(ref, triggerRef);\n\n // Chips are spans: a disabled ancestor fieldset does not reach them.\n const [inDisabledFieldset, setInDisabledFieldset] = useState(false);\n useIsomorphicLayoutEffect(() => {\n setInDisabledFieldset(\n Boolean(triggerRef.current?.closest('fieldset:disabled')),\n );\n });\n const effectiveDisabled =\n (inFormField && ctx.disabled) || Boolean(disabled) || inDisabledFieldset;\n const effectiveRequired = inFormField && ctx.required;\n const effectiveInvalid = inFormField && ctx.invalid;\n const describedBy =\n inFormField && ctx.describedBy ? ctx.describedBy : undefined;\n const triggerId = id ?? (inFormField ? ctx.id : undefined);\n /* cmdk writes its own id on the input, so the field's label follows\n that one. */\n useFormFieldControlRef(ctx, inputRef);\n\n const labelByValue = useMemo(() => {\n const map = new Map<string, string>();\n for (const option of options) map.set(option.value, option.label);\n return map;\n }, [options]);\n const dirByValue = useMemo(() => {\n const map = new Map<string, OptionShape['dir']>();\n for (const option of options) map.set(option.value, option.dir);\n return map;\n }, [options]);\n\n const atCap =\n typeof maxSelections === 'number' && currentValue.length >= maxSelections;\n\n const commit = (next: string[]): void => {\n setMultiSelectValue(next);\n };\n\n const toggle = (val: string): void => {\n if (currentValue.includes(val)) {\n commit(currentValue.filter((v) => v !== val));\n return;\n }\n if (atCap) return;\n commit([...currentValue, val]);\n };\n\n const removeAt = (index: number): string[] => {\n const next = currentValue.filter((_, i) => i !== index);\n commit(next);\n return next;\n };\n\n const handleSelectAll = (): void => {\n const selectable = options.filter((o) => !o.disabled).map((o) => o.value);\n const cap =\n typeof maxSelections === 'number' ? maxSelections : selectable.length;\n commit(selectable.slice(0, cap));\n };\n\n const handleClearAll = (): void => {\n commit([]);\n };\n\n // Agent handle — refs for fresh reads from the memoized handle.\n const valueRef = useRef<string[]>(currentValue);\n useEffect(() => {\n valueRef.current = currentValue;\n }, [currentValue]);\n const queryRef = useRef<string>(query);\n useEffect(() => {\n queryRef.current = query;\n }, [query]);\n const openRef = useRef<boolean>(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n const commitStable = useCallback(\n (next: string[]) => {\n setMultiSelectValue(next);\n },\n [setMultiSelectValue],\n );\n\n const agentHandle = useMemo<MultiSelectHandle>(\n () => ({\n getSelection: () => [...valueRef.current],\n getQuery: () => queryRef.current,\n getIsOpen: () => openRef.current,\n setSelection: (values) => commitStable(values),\n clearSelection: () => commitStable([]),\n setQuery: (next) => setQuery(next),\n open: () => setOpen(true),\n close: () => setOpen(false),\n }),\n [commitStable],\n );\n useAgentRegistration(multiSelectAgent, agentHandle, id);\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.multiSelect.placeholder', 'Select…');\n\n const filteredOptions = useMemo(() => {\n if (!query) return options;\n const needle = query.toLowerCase();\n return options.filter((option) => {\n if (filter) return filter(query, option);\n return option.label.toLowerCase().includes(needle);\n });\n }, [options, query, filter]);\n\n const groups = useMemo(\n () => groupOptions(filteredOptions),\n [filteredOptions],\n );\n\n const handleInputKeyDown = (e: KeyboardEvent<HTMLInputElement>): void => {\n const target = e.currentTarget;\n if (e.key === 'Backspace' && query === '' && currentValue.length > 0) {\n e.preventDefault();\n const removedIndex = currentValue.length - 1;\n const next = removeAt(removedIndex);\n const newLast = next.length - 1;\n if (newLast >= 0) {\n requestAnimationFrame(() => {\n chipRefs.current[newLast]?.focus();\n });\n }\n return;\n }\n const caretAtStart =\n target.selectionStart === 0 && target.selectionEnd === 0;\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowRight') &&\n caretAtStart &&\n currentValue.length > 0\n ) {\n const isRTL = document.dir === 'rtl' || target.dir === 'rtl';\n const shouldNavigate =\n (isRTL && e.key === 'ArrowRight') ||\n (!isRTL && e.key === 'ArrowLeft');\n if (shouldNavigate) {\n e.preventDefault();\n const lastIdx = currentValue.length - 1;\n chipRefs.current[lastIdx]?.focus();\n }\n return;\n }\n if (e.key === 'Escape') {\n setOpen(false);\n return;\n }\n if (!open && (e.key === 'ArrowDown' || e.key === 'Enter')) {\n setOpen(true);\n }\n };\n\n const handleChipKeyDown =\n (index: number) =>\n (e: KeyboardEvent<HTMLSpanElement>): void => {\n if (\n e.key === 'Backspace' ||\n e.key === 'Delete' ||\n e.key === 'Enter' ||\n e.key === ' '\n ) {\n e.preventDefault();\n e.stopPropagation();\n const next = removeAt(index);\n if (next.length === 0) {\n requestAnimationFrame(() => inputRef.current?.focus());\n return;\n }\n const focusIdx = Math.min(index, next.length - 1);\n requestAnimationFrame(() => {\n chipRefs.current[focusIdx]?.focus();\n });\n return;\n }\n const isRTL = document.dir === 'rtl';\n const prevKey = isRTL ? 'ArrowRight' : 'ArrowLeft';\n const nextKey = isRTL ? 'ArrowLeft' : 'ArrowRight';\n if (e.key === prevKey) {\n e.preventDefault();\n const newIdx = Math.max(0, index - 1);\n chipRefs.current[newIdx]?.focus();\n return;\n }\n if (e.key === nextKey) {\n e.preventDefault();\n if (index < currentValue.length - 1) {\n chipRefs.current[index + 1]?.focus();\n } else {\n inputRef.current?.focus();\n }\n return;\n }\n if (e.key === 'Escape') {\n setOpen(false);\n inputRef.current?.focus();\n }\n };\n\n // ----- Chip overflow measurement -----\n // The measurement must read the FULL chip row, never the collapsed one.\n // Counting only the rendered (collapsed) chips is self-referential: hiding\n // the overflow behind \"+N more\" leaves a subset that trivially fits row 1,\n // the next measure concludes \"everything fits\", it expands, re-wraps, and\n // the ResizeObserver oscillates every frame (the visible flicker).\n //\n // Instead we run a two-pass cycle driven by `measureNonce`: a request first\n // renders every chip (visibleCount → ∞), then the layout effect measures\n // that complete row and sets the collapsed count. Both passes are layout\n // effects, so React flushes them before paint — the browser only ever shows\n // the settled, single-line result, with no full-row flash.\n const [visibleCount, setVisibleCount] = useState<number>(\n Number.POSITIVE_INFINITY,\n );\n const [measureNonce, setMeasureNonce] = useState<number>(0);\n const lastWidthRef = useRef<number>(-1);\n\n const requestMeasure = useCallback((): void => {\n setVisibleCount(Number.POSITIVE_INFINITY);\n setMeasureNonce((n) => n + 1);\n }, []);\n\n // Pass two: the \"show all\" render has committed — measure the true wrap\n // point off the complete chip row and collapse to it. Runs once per request\n // (keyed on measureNonce); collapsing does not bump the nonce, so it settles.\n useIsomorphicLayoutEffect(() => {\n const el = triggerRef.current;\n if (!el) return;\n const chipEls = Array.from(\n el.querySelectorAll<HTMLElement>('[data-ui-chip=\"true\"]'),\n );\n if (chipEls.length === 0) {\n setVisibleCount(Number.POSITIVE_INFINITY);\n return;\n }\n const firstTop = chipEls[0].offsetTop;\n let firstRowCount = 0;\n for (const chip of chipEls) {\n if (chip.offsetTop === firstTop) firstRowCount++;\n else break;\n }\n setVisibleCount(\n firstRowCount === chipEls.length\n ? Number.POSITIVE_INFINITY\n : Math.max(1, firstRowCount - 1),\n );\n }, [measureNonce]);\n\n // Re-measure whenever the selected set or the size variant changes.\n useIsomorphicLayoutEffect(() => {\n requestMeasure();\n }, [currentValue.length, size, requestMeasure]);\n\n // Re-measure on a real width change only. Collapsing shrinks the trigger's\n // height, not its width, so a width guard keeps that from re-triggering the\n // cycle — the ResizeObserver never chases its own output.\n useIsomorphicLayoutEffect(() => {\n const el = triggerRef.current;\n if (!el) return;\n const ro = new ResizeObserver((entries) => {\n const width = Math.round(\n entries[0]?.contentRect.width ?? el.clientWidth,\n );\n if (width === lastWidthRef.current) return;\n lastWidthRef.current = width;\n requestMeasure();\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [requestMeasure]);\n\n const chips = currentValue.map((val) => ({\n value: val,\n label: labelByValue.get(val) ?? val,\n }));\n\n const showAllChips =\n visibleCount === Number.POSITIVE_INFINITY || visibleCount >= chips.length;\n const visibleChips = showAllChips ? chips : chips.slice(0, visibleCount);\n const overflowChips = showAllChips ? [] : chips.slice(visibleCount);\n const overflowCount = overflowChips.length;\n\n const handleTriggerClick = (event: MouseEvent<HTMLDivElement>): void => {\n if (effectiveDisabled) return;\n // Ignore clicks on chips/buttons so they can manage their own focus.\n const target = event.target as HTMLElement;\n if (target.closest('[data-ui-chip=\"true\"]')) return;\n if (target.closest('[data-ui-chip-dismiss=\"true\"]')) return;\n setOpen(true);\n inputRef.current?.focus();\n };\n\n const handleOpenChange = (next: boolean): void => {\n if (effectiveDisabled) {\n setOpen(false);\n return;\n }\n setOpen(next);\n if (!next) {\n setQuery('');\n onComplete?.(currentValue);\n }\n };\n\n const hasActionRow = allowSelectAll || allowClear;\n\n const counterMessage = t('inputs.multiSelect.selected', {\n count: currentValue.length,\n defaultValue: `${currentValue.length} selected`,\n });\n\n /* cmdk writes `aria-labelledby` on the input after the props it is\n given, pointing at its own hidden `<label cmdk-label>` whose text is\n the Command root's `label`. So that label is the input's name: the\n host's `aria-label`, else the placeholder, so the input is never\n unnamed. The count of chosen options describes the input rather than\n naming it. */\n const accessibleName =\n (inFormField ? ctx.label || ariaLabel : ariaLabel) || resolvedPlaceholder;\n const inputDescribedBy = [counterId, describedBy].filter(Boolean).join(' ');\n\n /* Inside a FormField the name is the field's own `<label>`, read whole,\n as for every other control: its labelStart and labelEnd marks and\n \"(optional)\" join it, and the host's `aria-label` never overrides\n that visible text. cmdk's hidden label holds the label string only,\n so the input is pointed at the field's label instead. React leaves\n the attribute alone afterwards: cmdk's prop for it never changes. */\n const fieldLabelId = inFormField ? `${ctx.id}-label` : undefined;\n const cmdkLabelledBy = useRef<string | null>(null);\n useIsomorphicLayoutEffect(() => {\n const input = inputRef.current;\n if (!input) return;\n const current = input.getAttribute('aria-labelledby');\n if (fieldLabelId) {\n if (current === fieldLabelId) return;\n cmdkLabelledBy.current = current;\n input.setAttribute('aria-labelledby', fieldLabelId);\n } else if (cmdkLabelledBy.current !== null) {\n // Out of the field again: back to cmdk's own label.\n input.setAttribute('aria-labelledby', cmdkLabelledBy.current);\n cmdkLabelledBy.current = null;\n }\n });\n\n const { onClick: onClickProp, ...restDivProps } = divProps;\n\n return (\n <Command shouldFilter={false} label={accessibleName}>\n <Popover.Root open={open} onOpenChange={handleOpenChange}>\n <Popover.Anchor asChild>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- compound input shell; keyboard handling lives on the inner searchable input which is always rendered */}\n <div\n ref={composedRef}\n className={multiSelectVariants({ size, className })}\n aria-disabled={effectiveDisabled || undefined}\n aria-invalid={effectiveInvalid || undefined}\n data-component=\"multi-select\"\n data-component-id={id}\n onClick={(event) => {\n onClickProp?.(event);\n handleTriggerClick(event);\n }}\n {...restDivProps}\n >\n {visibleChips.map((chip, idx) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- chip pill receives focus via roving tabindex; chip removal uses an inner button\n <span\n key={chip.value}\n ref={(el) => {\n chipRefs.current[idx] = el;\n }}\n tabIndex={effectiveDisabled ? -1 : 0}\n data-ui-chip=\"true\"\n className={chipVariants({ size })}\n onKeyDown={handleChipKeyDown(idx)}\n aria-label={chip.label}\n >\n <span dir={dirByValue.get(chip.value)}>{chip.label}</span>\n <button\n type=\"button\"\n tabIndex={-1}\n data-ui-chip-dismiss=\"true\"\n aria-label={t('inputs.multiSelect.remove', {\n label: chip.label,\n defaultValue: `Remove ${chip.label}`,\n })}\n disabled={effectiveDisabled}\n onClick={(event) => {\n event.stopPropagation();\n removeAt(idx);\n requestAnimationFrame(() => inputRef.current?.focus());\n }}\n className={chipDismissClasses}\n >\n <X aria-hidden=\"true\" className=\"ds:size-3.5\" />\n </button>\n </span>\n ))}\n {overflowCount > 0 ? (\n <Tooltip\n label={overflowChips.map((c) => c.label).join(', ')}\n delayDuration={200}\n >\n <span\n className={chipVariants({ size })}\n tabIndex={effectiveDisabled ? -1 : 0}\n role=\"button\"\n aria-label={t('inputs.multiSelect.overflow', {\n count: overflowCount,\n defaultValue: `+${overflowCount} more`,\n })}\n >\n <span>\n {t('inputs.multiSelect.overflow', {\n count: overflowCount,\n defaultValue: `+${overflowCount} more`,\n })}\n </span>\n </span>\n </Tooltip>\n ) : null}\n <Command.Input\n ref={inputRef}\n value={query}\n onValueChange={setQuery}\n onKeyDown={handleInputKeyDown}\n onFocus={() => {\n if (!effectiveDisabled) setOpen(true);\n }}\n placeholder={\n currentValue.length === 0 ? resolvedPlaceholder : ''\n }\n id={triggerId}\n // The name comes from the Command root's `label` above, or\n // from the FormField's label: cmdk writes `aria-labelledby`\n // after these props, and a layout effect above re-points it.\n aria-describedby={inputDescribedBy}\n aria-invalid={effectiveInvalid || undefined}\n aria-required={effectiveRequired || undefined}\n disabled={effectiveDisabled}\n className={[\n 'ds:flex-1 ds:min-w-[6rem] ds:bg-transparent ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-start',\n 'ds:disabled:cursor-not-allowed',\n ].join(' ')}\n />\n {/* Hidden: read only as the input's description, not as stray\n text on the page. */}\n <span id={counterId} hidden>\n {counterMessage}\n </span>\n </div>\n </Popover.Anchor>\n <Popover.Portal>\n {/* Portalled to <body>, so the list carries its own bounding\n marker: the kit's cascade reset — and a host's shield against\n its own bare-element CSS — scope to [data-component]. */}\n <Popover.Content\n data-component=\"multi-select-list\"\n onOpenAutoFocus={(e) => e.preventDefault()}\n onCloseAutoFocus={(e) => e.preventDefault()}\n align=\"start\"\n sideOffset={4}\n collisionPadding={8}\n className={popoverContentClasses}\n >\n <Command.List\n role=\"listbox\"\n aria-multiselectable=\"true\"\n // cmdk writes its own aria-label after ours, \"Suggestions\"\n // in English unless it gets `label`.\n label={accessibleName}\n className=\"ds:max-h-[20rem] ds:overflow-y-auto ds:p-1\"\n >\n {hasActionRow ? (\n <Command.Group>\n {allowSelectAll ? (\n <Command.Item\n value={SELECT_ALL_VALUE}\n onSelect={handleSelectAll}\n className={actionItemClasses}\n >\n {t('inputs.multiSelect.selectAll', 'Select all')}\n </Command.Item>\n ) : null}\n {allowClear ? (\n <Command.Item\n value={CLEAR_ALL_VALUE}\n onSelect={handleClearAll}\n className={actionItemClasses}\n >\n {t('inputs.multiSelect.clearAll', 'Clear all')}\n </Command.Item>\n ) : null}\n </Command.Group>\n ) : null}\n <Command.Empty className=\"ds:ps-2 ds:pe-2 ds:py-2 type-body-sm ds:text-muted-foreground\">\n {t('inputs.multiSelect.noOptions', 'No options found')}\n </Command.Empty>\n {groups.map(({ group, items }, gi) => {\n const body = items.map((option) => {\n const isSelected = currentValue.includes(option.value);\n const isCapped = !isSelected && atCap;\n const isDisabled = Boolean(option.disabled) || isCapped;\n const item = (\n <Command.Item\n key={option.value}\n value={option.value}\n // Agent DOM hook — see multi-select.agent.ts item.\n data-option-id={option.value}\n disabled={isDisabled}\n onSelect={() => {\n if (isDisabled) return;\n toggle(option.value);\n }}\n aria-selected={isSelected}\n aria-disabled={isDisabled || undefined}\n className={commandItemClasses}\n >\n <span\n // Off, the box is a state indicator, so its edge is\n // the 3:1 --control-border (WCAG 1.4.11), as on\n // Checkbox.\n className={[\n 'ds:inline-flex ds:items-center ds:justify-center ds:me-[var(--spacing-xs)] ds:shrink-0',\n 'ds:size-4 ds:rounded-[var(--radius-sm)] ds:border',\n isSelected\n ? 'ds:bg-primary ds:border-primary ds:text-primary-foreground'\n : 'ds:bg-background ds:border-[color:var(--control-border)]',\n ].join(' ')}\n aria-hidden=\"true\"\n >\n {isSelected ? (\n <Check className=\"ds:size-3.5\" />\n ) : null}\n </span>\n {option.startAdornment ? (\n // Decorative by contract — the accessible name comes\n // from the option label.\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:items-center ds:shrink-0 ds:me-[var(--spacing-xs)]\"\n >\n {option.startAdornment}\n </span>\n ) : null}\n {option.description || wrapOptionLabels ? (\n // Stacked, as in Combobox: the label and its end\n // content on one row, the description under them.\n // The option's name reads in that order.\n <span className={OPTION_BODY_CLASSES}>\n <span className={OPTION_LABEL_ROW_CLASSES}>\n <span\n dir={option.dir}\n className={optionLabelVariants({\n wrap: wrapOptionLabels,\n className: 'ds:flex-1 ds:text-start',\n })}\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Announced, as below.\n <span className={OPTION_END_CLASSES}>\n {option.endContent}\n </span>\n ) : null}\n </span>\n {option.description ? (\n <span\n className={optionDescriptionVariants({\n tone: option.descriptionTone,\n className: 'ds:text-start',\n })}\n >\n {option.description}\n </span>\n ) : null}\n </span>\n ) : (\n <>\n {/* `min-w-0 truncate` matches Combobox and Select.\n Without it a long service name cannot be\n clipped, so it pushes the trailing content and\n overflows the row instead of the name\n ellipsing — the CJK and long-label case. */}\n <span\n dir={option.dir}\n className=\"ds:flex-1 ds:min-w-0 ds:truncate ds:text-start\"\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Deliberately NOT aria-hidden — unlike\n // `startAdornment`, this slot carries meaning\n // (a price, a count) and must reach the\n // option's accessible name. `ms-auto` pins it\n // to the inline-end and flips under RTL.\n <span className=\"ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0 ds:ps-[var(--spacing-xs)]\">\n {option.endContent}\n </span>\n ) : null}\n </>\n )}\n </Command.Item>\n );\n if (isCapped) {\n return (\n <Tooltip\n key={option.value}\n label={t('inputs.multiSelect.maxReached', {\n count: maxSelections,\n defaultValue: `Maximum ${maxSelections} selections`,\n })}\n delayDuration={200}\n >\n {item}\n </Tooltip>\n );\n }\n return item;\n });\n if (!group) {\n return (\n <Command.Group key={`group-${gi}`}>{body}</Command.Group>\n );\n }\n return (\n <Command.Group\n key={`group-${group}`}\n heading={group}\n className=\"ds:[&_[cmdk-group-heading]]:ps-2 ds:[&_[cmdk-group-heading]]:pe-2 ds:[&_[cmdk-group-heading]]:py-1 ds:[&_[cmdk-group-heading]]:type-eyebrow ds:[&_[cmdk-group-heading]]:text-muted-foreground\"\n >\n {body}\n </Command.Group>\n );\n })}\n </Command.List>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n </Command>\n );\n },\n);\nMultiSelectImpl.displayName = 'MultiSelect';\n\ninterface MultiSelectComponent {\n <T extends string = string>(\n props: MultiSelectProps<T> & { ref?: Ref<HTMLDivElement> },\n ): ReactElement | null;\n displayName?: string;\n}\n\nexport const MultiSelect = MultiSelectImpl as unknown as MultiSelectComponent;\n\nexport { multiSelectVariants };\n"],"names":["multiSelectAgent","handle","args","multiSelectVariants","cva","INPUT_SURFACE_CHROME","INPUT_SURFACE_TEXT","chipVariants","chipDismissClasses","popoverContentClasses","commandItemClasses","MENU_ROW_HIGHLIGHT","actionItemClasses","SELECT_ALL_VALUE","CLEAR_ALL_VALUE","MultiSelectImpl","forwardRef","options","value","defaultValue","onChange","onComplete","placeholder","maxSelections","allowSelectAll","allowClear","filter","size","disabled","wrapOptionLabels","className","id","ariaLabel","divProps","ref","t","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","currentValueRaw","setMultiSelectValue","useControllableState","currentValue","open","setOpen","useState","query","setQuery","inputRef","useRef","counterId","useId","chipRefs","triggerRef","composedRef","composeRefs","inDisabledFieldset","setInDisabledFieldset","useIsomorphicLayoutEffect","_a","effectiveDisabled","effectiveRequired","effectiveInvalid","describedBy","triggerId","useFormFieldControlRef","labelByValue","useMemo","map","option","dirByValue","atCap","commit","next","toggle","val","v","removeAt","index","_","i","handleSelectAll","selectable","o","cap","handleClearAll","valueRef","useEffect","queryRef","openRef","commitStable","useCallback","agentHandle","values","useAgentRegistration","resolvedPlaceholder","filteredOptions","needle","groups","groupOptions","handleInputKeyDown","target","removedIndex","newLast","caretAtStart","isRTL","lastIdx","handleChipKeyDown","e","focusIdx","prevKey","nextKey","newIdx","_b","_c","_d","visibleCount","setVisibleCount","measureNonce","setMeasureNonce","lastWidthRef","requestMeasure","n","el","chipEls","firstTop","firstRowCount","chip","ro","entries","width","chips","showAllChips","visibleChips","overflowChips","overflowCount","handleTriggerClick","event","handleOpenChange","hasActionRow","counterMessage","accessibleName","inputDescribedBy","fieldLabelId","cmdkLabelledBy","input","current","onClickProp","restDivProps","jsx","Command","jsxs","Popover","idx","X","Tooltip","c","group","items","gi","body","isSelected","isCapped","isDisabled","item","Check","OPTION_BODY_CLASSES","OPTION_LABEL_ROW_CLASSES","optionLabelVariants","OPTION_END_CLASSES","optionDescriptionVariants","Fragment","MultiSelect"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAMA,KAAoD;AAAA,EAC/D,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,mBAAmB,UAAU,QAAQ,OAAO;AAAA,EAC3D,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,aAAA;AAAA,IAAa;AAAA,IAExC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb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Ac;AASvB,MAAMgK,KAAchK;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation-menu-DbaSlvdO.js","sources":["../../src/components/navigation-menu/navigation-menu.agent.ts","../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — NavigationMenu. */\n/* */\n/* NavigationMenu is the primary top-bar navigation. It exposes the */\n/* currently-active item id (when the consumer routes through the kit), */\n/* the open/closed state of its dropdown, and lets an agent open, close, */\n/* or select a top-level item by id. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the full contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NavigationMenuHandle } from './navigation-menu';\n\nexport const navigationMenuAgent: AgentAdapter<NavigationMenuHandle> = {\n id: 'navigation-menu',\n // `navigate` is host-delegated: route changes happen through the rendered\n // NavigationMenuLink anchors / the consumer's router, not the handle. The\n // handle only opens panels + sets the active top-level item (`select_item`).\n // The capability is kept so a bridge can discover the menu drives navigation.\n capabilities: ['select_single', 'navigate', 'open', 'close'],\n state: {\n activeItem: {\n type: 'string | null',\n descriptionKey: 'ui.agent.navigationMenu.state.activeItem',\n description:\n 'Id of the currently-active top-level navigation item, or null when none is active.',\n read: (handle) => handle.getActiveItem() ?? null,\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.navigationMenu.state.isOpen',\n description: 'Whether a dropdown / mega-menu panel is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n select_item: {\n // Sets the active top-level item (opens its panel) — ephemeral view, read.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description:\n 'Stable opaque top-level item id (emitted as data-nav-id).',\n },\n },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.navigationMenu.actions.selectItem',\n description: 'Activate (open) the top-level item with the given id.',\n examples: [\n { args: { id: 'products' }, note: 'Open the \"products\" menu.' },\n ],\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n open: {\n // Opens one item's panel — ephemeral view, read.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description:\n 'Stable opaque top-level item id whose panel to open (data-nav-id).',\n },\n },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.navigationMenu.actions.open',\n description:\n 'Open the dropdown / mega-menu panel for the given top-level item id.',\n invoke: (handle, args: { id: string }) => {\n handle.open(args.id);\n },\n },\n close: {\n // Closes any open panel — ephemeral view, read.\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.navigationMenu.actions.close',\n description: 'Close any open dropdown / mega-menu panel.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'navigation-menu',\n description: 'Marks the NavigationMenu root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific menu from the agent.',\n },\n item: {\n attr: 'data-nav-id',\n description:\n 'Stable opaque id of a top-level navigation item. Selection / open targets this attribute.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type ComponentPropsWithoutRef,\n type ElementRef,\n} from 'react';\nimport * as RadixNavigationMenu from '@radix-ui/react-navigation-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { useDirection } from '../_shared/use-direction';\nimport { useControllableState } from '../../hooks/use-controllable-state';\n// SkipLink moved to its own module — re-imported for the navigation-menu\n// barrel's backwards-compat re-export. New consumers should import it\n// directly from `@alfadocs/ui-kit`.\nimport { SkipLink } from '../skip-link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { navigationMenuAgent } from './navigation-menu.agent';\n\n/* -------------------------------------------------------------------- */\n/* Root */\n/* -------------------------------------------------------------------- */\n\nconst rootClasses = [\n 'ds:relative ds:z-[var(--z-dropdown)]',\n 'ds:flex ds:max-w-max ds:items-center ds:justify-center',\n].join(' ');\n\nexport interface NavigationMenuProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Root\n> {\n 'aria-label'?: string;\n /**\n * Consumer-supplied instance id, surfaced as `data-component-id` so an\n * agent / UI bridge can address this instance.\n */\n id?: string;\n}\n\n/**\n * Imperative handle for agent-readiness. Exposes the active top-level\n * item id + open/closed state, and lets external drivers select / open /\n * close panels by item id.\n */\nexport interface NavigationMenuHandle {\n getActiveItem: () => string | null;\n getIsOpen: () => boolean;\n selectItem: (id: string) => void;\n open: (id: string) => void;\n close: () => void;\n}\n\ntype NavigationMenuRootElement = ElementRef<typeof RadixNavigationMenu.Root>;\n\nconst NavigationMenu = forwardRef<\n NavigationMenuRootElement,\n NavigationMenuProps\n>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n children,\n id,\n value,\n defaultValue,\n onValueChange,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const rootRef = useRef<ElementRef<typeof RadixNavigationMenu.Root>>(null);\n const dir = useDirection(rootRef);\n\n const [activeValueRaw, handleValueChange] = useControllableState<string>({\n value,\n defaultValue: defaultValue ?? '',\n onChange: onValueChange,\n });\n const activeValue = activeValueRaw ?? '';\n\n const handle = useMemo<NavigationMenuHandle>(\n () => ({\n getActiveItem: () => (activeValue ? activeValue : null),\n getIsOpen: () => Boolean(activeValue),\n selectItem: (nextId: string) => handleValueChange(nextId),\n open: (nextId: string) => handleValueChange(nextId),\n close: () => handleValueChange(''),\n }),\n [activeValue, handleValueChange],\n );\n useImperativeHandle(\n ref,\n () => rootRef.current as NavigationMenuRootElement,\n [],\n );\n useAgentRegistration(navigationMenuAgent, handle, id);\n\n return (\n <RadixNavigationMenu.Root\n ref={rootRef}\n dir={dir}\n aria-label={ariaLabel ?? t('navigation.nav.label')}\n className={[rootClasses, className].filter(Boolean).join(' ')}\n id={id}\n data-component=\"navigation-menu\"\n data-component-id={id}\n value={activeValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n <NavigationMenuViewport />\n </RadixNavigationMenu.Root>\n );\n },\n);\nNavigationMenu.displayName = 'NavigationMenu';\n\n/* -------------------------------------------------------------------- */\n/* List + Item */\n/* -------------------------------------------------------------------- */\n\nconst listClasses = [\n 'ds:group ds:flex ds:flex-1',\n 'ds:list-none ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:m-0 ds:ps-0',\n].join(' ');\n\nconst NavigationMenuList = forwardRef<\n ElementRef<typeof RadixNavigationMenu.List>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.List>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.List\n ref={ref}\n className={[listClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n));\nNavigationMenuList.displayName = 'NavigationMenuList';\n\nexport interface NavigationMenuItemProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Item\n> {\n /**\n * Stable opaque id of this top-level item. When provided, emitted as\n * `data-nav-id` so an agent / UI bridge can target the item. Distinct\n * from Radix's internal `value`, which controls open-state matching;\n * pass the same string to both if you want them aligned.\n */\n navId?: string;\n}\n\nconst NavigationMenuItem = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Item>,\n NavigationMenuItemProps\n>(({ navId, ...rest }, ref) => (\n <RadixNavigationMenu.Item ref={ref} data-nav-id={navId} {...rest} />\n));\nNavigationMenuItem.displayName = 'NavigationMenuItem';\n\n/* -------------------------------------------------------------------- */\n/* Trigger */\n/* -------------------------------------------------------------------- */\n\nconst triggerClasses = [\n 'ds:group ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[state=open]:bg-[var(--muted)]/20',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:gap-[var(--spacing-xs)]',\n].join(' ');\n\nconst chevronClasses = [\n 'ds:size-3 ds:transition-transform ds:duration-[var(--animation-duration)]',\n 'ds:group-data-[state=open]:rotate-180',\n 'ds:rtl:-scale-x-100 ds:motion-reduce:transition-none',\n].join(' ');\n\nconst NavigationMenuTrigger = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Trigger>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Trigger>\n>(({ className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Trigger\n ref={ref}\n className={[triggerClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n <ChevronDown aria-hidden=\"true\" className={chevronClasses} />\n </RadixNavigationMenu.Trigger>\n));\nNavigationMenuTrigger.displayName = 'NavigationMenuTrigger';\n\n/* -------------------------------------------------------------------- */\n/* Content */\n/* -------------------------------------------------------------------- */\n\nconst contentBase = [\n 'ds:absolute ds:start-0 ds:top-0 ds:w-full',\n 'ds:md:w-auto',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:data-[motion^=from-]:animate-in ds:data-[motion^=to-]:animate-out',\n // Logical start/end motion mapped onto physical Tailwind animation utilities.\n // The `rtl:` variants mirror the slide direction so `from-start` enters from\n // the inline-start edge in both LTR and RTL.\n 'ds:data-[motion=from-start]:slide-in-from-left-52 ds:rtl:data-[motion=from-start]:slide-in-from-right-52',\n 'ds:data-[motion=from-end]:slide-in-from-right-52 ds:rtl:data-[motion=from-end]:slide-in-from-left-52',\n 'ds:data-[motion=to-start]:slide-out-to-left-52 ds:rtl:data-[motion=to-start]:slide-out-to-right-52',\n 'ds:data-[motion=to-end]:slide-out-to-right-52 ds:rtl:data-[motion=to-end]:slide-out-to-left-52',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst contentVariants = cva(contentBase, {\n variants: {\n layout: {\n simple: 'ds:min-w-[16rem]',\n mega: 'ds:grid ds:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] ds:gap-[var(--spacing-md)] ds:min-w-[32rem]',\n },\n },\n defaultVariants: { layout: 'simple' },\n});\n\nexport interface NavigationMenuContentProps\n extends\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Content>,\n VariantProps<typeof contentVariants> {}\n\nconst NavigationMenuContent = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Content>,\n NavigationMenuContentProps\n>(({ layout, className, ...rest }, ref) => (\n <RadixNavigationMenu.Content\n ref={ref}\n className={contentVariants({ layout, className })}\n {...rest}\n />\n));\nNavigationMenuContent.displayName = 'NavigationMenuContent';\n\n/* -------------------------------------------------------------------- */\n/* Link */\n/* -------------------------------------------------------------------- */\n\nconst linkClasses = [\n 'ds:block ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:py-[var(--spacing-xs)]',\n 'ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:text-[var(--foreground)]',\n 'ds:no-underline',\n 'ds:hover:bg-[var(--muted)]/20',\n 'ds:data-[active]:underline ds:data-[active]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:underline ds:aria-[current=page]:underline-offset-[var(--spacing-xs)]',\n 'ds:aria-[current=page]:font-[var(--font-weight-semibold)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\nexport interface NavigationMenuLinkProps extends ComponentPropsWithoutRef<\n typeof RadixNavigationMenu.Link\n> {\n /** Render through Radix Slot so routers can inject their own link element. */\n asChild?: boolean;\n}\n\nconst NavigationMenuLink = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Link>,\n NavigationMenuLinkProps\n>(({ asChild = false, className, children, ...rest }, ref) => (\n <RadixNavigationMenu.Link\n ref={ref}\n asChild={asChild}\n className={\n asChild ? undefined : [linkClasses, className].filter(Boolean).join(' ')\n }\n {...rest}\n >\n {asChild ? (\n <Slot className={[linkClasses, className].filter(Boolean).join(' ')}>\n {children}\n </Slot>\n ) : (\n children\n )}\n </RadixNavigationMenu.Link>\n));\nNavigationMenuLink.displayName = 'NavigationMenuLink';\n\n/* -------------------------------------------------------------------- */\n/* Indicator + Viewport */\n/* -------------------------------------------------------------------- */\n\nconst indicatorClasses = [\n 'ds:top-full ds:z-[1] ds:flex ds:h-2 ds:items-end ds:justify-center ds:overflow-hidden',\n 'ds:data-[state=visible]:animate-in ds:data-[state=hidden]:animate-out',\n 'ds:data-[state=visible]:fade-in ds:data-[state=hidden]:fade-out',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuIndicator = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Indicator>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Indicator>\n>(({ className, ...rest }, ref) => (\n <RadixNavigationMenu.Indicator\n ref={ref}\n className={[indicatorClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n <span className=\"ds:relative ds:top-[60%] ds:h-2 ds:w-2 ds:rotate-45 ds:rounded-tl-sm ds:bg-[var(--border)]\" />\n </RadixNavigationMenu.Indicator>\n));\nNavigationMenuIndicator.displayName = 'NavigationMenuIndicator';\n\nconst viewportClasses = [\n 'ds:origin-top-center ds:relative ds:mt-[var(--spacing-xs)]',\n 'ds:h-[var(--radix-navigation-menu-viewport-height)]',\n 'ds:w-full ds:overflow-hidden',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=open]:zoom-in-90 ds:data-[state=closed]:zoom-out-95',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst NavigationMenuViewport = forwardRef<\n ElementRef<typeof RadixNavigationMenu.Viewport>,\n ComponentPropsWithoutRef<typeof RadixNavigationMenu.Viewport>\n>(({ className, ...rest }, ref) => (\n <div className=\"ds:absolute ds:start-0 ds:top-full ds:flex ds:justify-center\">\n <RadixNavigationMenu.Viewport\n ref={ref}\n className={[viewportClasses, className].filter(Boolean).join(' ')}\n {...rest}\n />\n </div>\n));\nNavigationMenuViewport.displayName = 'NavigationMenuViewport';\n\n/* -------------------------------------------------------------------- */\n/* Exports */\n/* -------------------------------------------------------------------- */\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuContent,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n SkipLink,\n};\n"],"names":["navigationMenuAgent","handle","args","rootClasses","NavigationMenu","forwardRef","ariaLabel","className","children","id","value","defaultValue","onValueChange","rest","ref","t","useTranslation","rootRef","useRef","dir","useDirection","activeValueRaw","handleValueChange","useControllableState","activeValue","useMemo","nextId","useImperativeHandle","useAgentRegistration","jsxs","RadixNavigationMenu","NavigationMenuViewport","listClasses","NavigationMenuList","jsx","NavigationMenuItem","navId","triggerClasses","chevronClasses","NavigationMenuTrigger","ChevronDown","contentBase","contentVariants","cva","NavigationMenuContent","layout","linkClasses","Nav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