@alfadocs/ui-kit-debug 1.50.0 → 1.51.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 (518) hide show
  1. package/dist/_chunks/{actions-cell-renderer-DMittsR3.js → actions-cell-renderer-DBI33cMp.js} +4 -4
  2. package/dist/_chunks/{actions-cell-renderer-DMittsR3.js.map → actions-cell-renderer-DBI33cMp.js.map} +1 -1
  3. package/dist/_chunks/{agenda-tray-BhZASyJm.js → agenda-tray-CGhEEnFE.js} +3 -3
  4. package/dist/_chunks/{agenda-tray-BhZASyJm.js.map → agenda-tray-CGhEEnFE.js.map} +1 -1
  5. package/dist/_chunks/{ai-credits-notice-C-kz_RrY.js → ai-credits-notice-C9K_ley1.js} +3 -3
  6. package/dist/_chunks/{ai-credits-notice-C-kz_RrY.js.map → ai-credits-notice-C9K_ley1.js.map} +1 -1
  7. package/dist/_chunks/{ai-permission-notice-BRZeS3mT.js → ai-permission-notice-DMG1o4Qa.js} +2 -2
  8. package/dist/_chunks/{ai-permission-notice-BRZeS3mT.js.map → ai-permission-notice-DMG1o4Qa.js.map} +1 -1
  9. package/dist/_chunks/{ai-prompt-input-CxvnXsAs.js → ai-prompt-input-ucwO-z8g.js} +2 -2
  10. package/dist/_chunks/{ai-prompt-input-CxvnXsAs.js.map → ai-prompt-input-ucwO-z8g.js.map} +1 -1
  11. package/dist/_chunks/{alia-sidebar-Dx-oeOV2.js → alia-sidebar-K3gaNH94.js} +7 -7
  12. package/dist/_chunks/{alia-sidebar-Dx-oeOV2.js.map → alia-sidebar-K3gaNH94.js.map} +1 -1
  13. package/dist/_chunks/{anamnesis-card-D8Si-2GV.js → anamnesis-card-CPjry4ur.js} +2 -2
  14. package/dist/_chunks/{anamnesis-card-D8Si-2GV.js.map → anamnesis-card-CPjry4ur.js.map} +1 -1
  15. package/dist/_chunks/{anamnesis-summary-rows-CZirLRuv.js → anamnesis-summary-rows-D9LZZHLw.js} +9 -9
  16. package/dist/_chunks/{anamnesis-summary-rows-CZirLRuv.js.map → anamnesis-summary-rows-D9LZZHLw.js.map} +1 -1
  17. package/dist/_chunks/{appointment-card-BgLpE6T5.js → appointment-card-DETaIfBb.js} +2 -2
  18. package/dist/_chunks/{appointment-card-BgLpE6T5.js.map → appointment-card-DETaIfBb.js.map} +1 -1
  19. package/dist/_chunks/{appointment-peek-Dk11UOVW.js → appointment-peek-B79v56Zc.js} +4 -4
  20. package/dist/_chunks/{appointment-peek-Dk11UOVW.js.map → appointment-peek-B79v56Zc.js.map} +1 -1
  21. package/dist/_chunks/{appointment-timeline-wQ-PdkFV.js → appointment-timeline-tyJJPgVU.js} +5 -5
  22. package/dist/_chunks/{appointment-timeline-wQ-PdkFV.js.map → appointment-timeline-tyJJPgVU.js.map} +1 -1
  23. package/dist/_chunks/{appointment-tray-D7Gt6m8x.js → appointment-tray-Dq4zto_L.js} +4 -4
  24. package/dist/_chunks/{appointment-tray-D7Gt6m8x.js.map → appointment-tray-Dq4zto_L.js.map} +1 -1
  25. package/dist/_chunks/{audio-recorder-DZBtAvLH.js → audio-recorder-Ddlp5rVg.js} +3 -3
  26. package/dist/_chunks/{audio-recorder-DZBtAvLH.js.map → audio-recorder-Ddlp5rVg.js.map} +1 -1
  27. package/dist/_chunks/{balance-badge-cell-klaxFNL_.js → balance-badge-cell-BCEsdEOe.js} +4 -4
  28. package/dist/_chunks/{balance-badge-cell-klaxFNL_.js.map → balance-badge-cell-BCEsdEOe.js.map} +1 -1
  29. package/dist/_chunks/{bishop-score-BMLRvXYF.js → bishop-score-1NAiZh0K.js} +2 -2
  30. package/dist/_chunks/{bishop-score-BMLRvXYF.js.map → bishop-score-1NAiZh0K.js.map} +1 -1
  31. package/dist/_chunks/{bmi-calculator-DUhRyyrA.js → bmi-calculator-ZzzPZhhI.js} +2 -2
  32. package/dist/_chunks/{bmi-calculator-DUhRyyrA.js.map → bmi-calculator-ZzzPZhhI.js.map} +1 -1
  33. package/dist/_chunks/{booking-Cdzd8kyY.js → booking-DmyX24Ls.js} +5 -5
  34. package/dist/_chunks/{booking-Cdzd8kyY.js.map → booking-DmyX24Ls.js.map} +1 -1
  35. package/dist/_chunks/{button-18oBsI3n.js → button-CYPx2xFq.js} +38 -36
  36. package/dist/_chunks/button-CYPx2xFq.js.map +1 -0
  37. package/dist/_chunks/{button-group-BSDqso_C.js → button-group-t9RrsCS6.js} +3 -3
  38. package/dist/_chunks/{button-group-BSDqso_C.js.map → button-group-t9RrsCS6.js.map} +1 -1
  39. package/dist/_chunks/{calendar-zpE9qTM4.js → calendar-aqzmITxw.js} +543 -508
  40. package/dist/_chunks/calendar-aqzmITxw.js.map +1 -0
  41. package/dist/_chunks/{calendar-event-card-DplPh1wv.js → calendar-event-card-DyFSIehr.js} +148 -145
  42. package/dist/_chunks/{calendar-event-card-DplPh1wv.js.map → calendar-event-card-DyFSIehr.js.map} +1 -1
  43. package/dist/_chunks/calendar-workspace-BqoPkCUp.js +10597 -0
  44. package/dist/_chunks/calendar-workspace-BqoPkCUp.js.map +1 -0
  45. package/dist/_chunks/{care-plan-card-ciBaaguw.js → care-plan-card-amX33mMF.js} +2 -2
  46. package/dist/_chunks/{care-plan-card-ciBaaguw.js.map → care-plan-card-amX33mMF.js.map} +1 -1
  47. package/dist/_chunks/{care-plan-entry-card-D7A0whiZ.js → care-plan-entry-card-DNkEucjN.js} +2 -2
  48. package/dist/_chunks/{care-plan-entry-card-D7A0whiZ.js.map → care-plan-entry-card-DNkEucjN.js.map} +1 -1
  49. package/dist/_chunks/{care-plan-header-DKV1gLqv.js → care-plan-header-CJi853Rf.js} +2 -2
  50. package/dist/_chunks/{care-plan-header-DKV1gLqv.js.map → care-plan-header-CJi853Rf.js.map} +1 -1
  51. package/dist/_chunks/{carousel.agent-DqDGR2yH.js → carousel.agent-2EhJsAtl.js} +2 -2
  52. package/dist/_chunks/{carousel.agent-DqDGR2yH.js.map → carousel.agent-2EhJsAtl.js.map} +1 -1
  53. package/dist/_chunks/{chart-VjuXDXOZ.js → chart-B2HnwMP5.js} +3 -3
  54. package/dist/_chunks/{chart-VjuXDXOZ.js.map → chart-B2HnwMP5.js.map} +1 -1
  55. package/dist/_chunks/{chat-input-BVho_SqP.js → chat-input-CHUsUFOD.js} +2 -2
  56. package/dist/_chunks/{chat-input-BVho_SqP.js.map → chat-input-CHUsUFOD.js.map} +1 -1
  57. package/dist/_chunks/{chat-message-B4ihjNy3.js → chat-message-DTcRGhNo.js} +3 -3
  58. package/dist/_chunks/{chat-message-B4ihjNy3.js.map → chat-message-DTcRGhNo.js.map} +1 -1
  59. package/dist/_chunks/{code-block-C_eNHWaa.js → code-block-BrwcZNPq.js} +2 -2
  60. package/dist/_chunks/{code-block-C_eNHWaa.js.map → code-block-BrwcZNPq.js.map} +1 -1
  61. package/dist/_chunks/{connection-status-Cfux3TvH.js → connection-status-DMheLE65.js} +3 -3
  62. package/dist/_chunks/{connection-status-Cfux3TvH.js.map → connection-status-DMheLE65.js.map} +1 -1
  63. package/dist/_chunks/{contact-profile-card-Dj4NgBL-.js → contact-profile-card-zQLGGFKG.js} +2 -2
  64. package/dist/_chunks/{contact-profile-card-Dj4NgBL-.js.map → contact-profile-card-zQLGGFKG.js.map} +1 -1
  65. package/dist/_chunks/{control-room-rail-DAO0qfOI.js → control-room-rail-5iuM3jcm.js} +3 -3
  66. package/dist/_chunks/{control-room-rail-DAO0qfOI.js.map → control-room-rail-5iuM3jcm.js.map} +1 -1
  67. package/dist/_chunks/{copy-field-Cm4y5Bff.js → copy-field-C-KvrgOG.js} +2 -2
  68. package/dist/_chunks/{copy-field-Cm4y5Bff.js.map → copy-field-C-KvrgOG.js.map} +1 -1
  69. package/dist/_chunks/{cycle-calculator-B9lBRNiZ.js → cycle-calculator-DQMCeEzn.js} +2 -2
  70. package/dist/_chunks/{cycle-calculator-B9lBRNiZ.js.map → cycle-calculator-DQMCeEzn.js.map} +1 -1
  71. package/dist/_chunks/{dashboard-grid-uX7x1ePj.js → dashboard-grid-H7uph3HO.js} +2 -2
  72. package/dist/_chunks/{dashboard-grid-uX7x1ePj.js.map → dashboard-grid-H7uph3HO.js.map} +1 -1
  73. package/dist/_chunks/{data-table-CrI3_bjH.js → data-table-C4yPR89K.js} +7 -7
  74. package/dist/_chunks/{data-table-CrI3_bjH.js.map → data-table-C4yPR89K.js.map} +1 -1
  75. package/dist/_chunks/{data-table-tabs-CzYYKp2_.js → data-table-tabs-Dd_O1nPY.js} +3 -3
  76. package/dist/_chunks/{data-table-tabs-CzYYKp2_.js.map → data-table-tabs-Dd_O1nPY.js.map} +1 -1
  77. package/dist/_chunks/{description-list-1A2DEbE6.js → description-list-DOPu69Jg.js} +2 -2
  78. package/dist/_chunks/{description-list-1A2DEbE6.js.map → description-list-DOPu69Jg.js.map} +1 -1
  79. package/dist/_chunks/{document-preview-Od2Hz4z5.js → document-preview-Dzh1YAz8.js} +3 -3
  80. package/dist/_chunks/{document-preview-Od2Hz4z5.js.map → document-preview-Dzh1YAz8.js.map} +1 -1
  81. package/dist/_chunks/{document-scanner-p0aGlzCy.js → document-scanner-BSVwMR4V.js} +2 -2
  82. package/dist/_chunks/{document-scanner-p0aGlzCy.js.map → document-scanner-BSVwMR4V.js.map} +1 -1
  83. package/dist/_chunks/dropdown-menu-DIzxr_lp.js +594 -0
  84. package/dist/_chunks/dropdown-menu-DIzxr_lp.js.map +1 -0
  85. package/dist/_chunks/{due-date-calculator-BVqJaxzd.js → due-date-calculator-DUjw4w5O.js} +2 -2
  86. package/dist/_chunks/{due-date-calculator-BVqJaxzd.js.map → due-date-calculator-DUjw4w5O.js.map} +1 -1
  87. package/dist/_chunks/{editable-currency-cell-renderer-D_G2Ap61.js → editable-currency-cell-renderer-Cch3RIJL.js} +3 -3
  88. package/dist/_chunks/{editable-currency-cell-renderer-D_G2Ap61.js.map → editable-currency-cell-renderer-Cch3RIJL.js.map} +1 -1
  89. package/dist/_chunks/{editable-description-B4NVdjvd.js → editable-description-CRQib91p.js} +3 -3
  90. package/dist/_chunks/{editable-description-B4NVdjvd.js.map → editable-description-CRQib91p.js.map} +1 -1
  91. package/dist/_chunks/{editor-overlay-BDiBvQmL.js → editor-overlay-DsA7vR5C.js} +2 -2
  92. package/dist/_chunks/{editor-overlay-BDiBvQmL.js.map → editor-overlay-DsA7vR5C.js.map} +1 -1
  93. package/dist/_chunks/{empty-state-DTBZ1ENT.js → empty-state-Ck1wVWdN.js} +2 -2
  94. package/dist/_chunks/{empty-state-DTBZ1ENT.js.map → empty-state-Ck1wVWdN.js.map} +1 -1
  95. package/dist/_chunks/{entity-summary-CFJfBdVP.js → entity-summary-Cvs21xPr.js} +3 -3
  96. package/dist/_chunks/{entity-summary-CFJfBdVP.js.map → entity-summary-Cvs21xPr.js.map} +1 -1
  97. package/dist/_chunks/{error-boundary-BxTqEXqj.js → error-boundary-C_HAzVLO.js} +2 -2
  98. package/dist/_chunks/{error-boundary-BxTqEXqj.js.map → error-boundary-C_HAzVLO.js.map} +1 -1
  99. package/dist/_chunks/{face-scheme-fku-RShg.js → face-scheme-DVZZTuXT.js} +5 -5
  100. package/dist/_chunks/{face-scheme-fku-RShg.js.map → face-scheme-DVZZTuXT.js.map} +1 -1
  101. package/dist/_chunks/{fetal-weight-B69yOS9W.js → fetal-weight-B-lO-948.js} +2 -2
  102. package/dist/_chunks/{fetal-weight-B69yOS9W.js.map → fetal-weight-B-lO-948.js.map} +1 -1
  103. package/dist/_chunks/{field-array-lIXrFWS0.js → field-array-B3IDOct8.js} +3 -3
  104. package/dist/_chunks/{field-array-lIXrFWS0.js.map → field-array-B3IDOct8.js.map} +1 -1
  105. package/dist/_chunks/{file-manager-C6QQPQV5.js → file-manager-COUb-w8j.js} +7 -7
  106. package/dist/_chunks/{file-manager-C6QQPQV5.js.map → file-manager-COUb-w8j.js.map} +1 -1
  107. package/dist/_chunks/{finished-terminal-B2oqXO0Y.js → finished-terminal-BrAWwfOw.js} +2 -2
  108. package/dist/_chunks/{finished-terminal-B2oqXO0Y.js.map → finished-terminal-BrAWwfOw.js.map} +1 -1
  109. package/dist/_chunks/{fiscal-code-input-BEF8eKIG.js → fiscal-code-input-CwUwhUZy.js} +2 -2
  110. package/dist/_chunks/{fiscal-code-input-BEF8eKIG.js.map → fiscal-code-input-CwUwhUZy.js.map} +1 -1
  111. package/dist/_chunks/floating-action-button-pojvb9gG.js.map +1 -1
  112. package/dist/_chunks/{freemium-paywall-B6JITu4l.js → freemium-paywall-DiPJrL18.js} +2 -2
  113. package/dist/_chunks/{freemium-paywall-B6JITu4l.js.map → freemium-paywall-DiPJrL18.js.map} +1 -1
  114. package/dist/_chunks/{gestational-age-calculator-DsGN6_HS.js → gestational-age-calculator-BVPtrWKf.js} +2 -2
  115. package/dist/_chunks/{gestational-age-calculator-DsGN6_HS.js.map → gestational-age-calculator-BVPtrWKf.js.map} +1 -1
  116. package/dist/_chunks/{hcg-doubling-D2SH-e7t.js → hcg-doubling-CPktiA3H.js} +2 -2
  117. package/dist/_chunks/{hcg-doubling-D2SH-e7t.js.map → hcg-doubling-CPktiA3H.js.map} +1 -1
  118. package/dist/_chunks/{header-CCjp5GvE.js → header-C8NbLgVq.js} +2 -2
  119. package/dist/_chunks/{header-CCjp5GvE.js.map → header-C8NbLgVq.js.map} +1 -1
  120. package/dist/_chunks/header-settings-D0M3WNTS.js +305 -0
  121. package/dist/_chunks/header-settings-D0M3WNTS.js.map +1 -0
  122. package/dist/_chunks/{help-me-write-templates-DQtT1qs_.js → help-me-write-templates-CYAKuXZ3.js} +5 -5
  123. package/dist/_chunks/{help-me-write-templates-DQtT1qs_.js.map → help-me-write-templates-CYAKuXZ3.js.map} +1 -1
  124. package/dist/_chunks/{hover-card-BplP5SzQ.js → hover-card-BM0vNmq4.js} +2 -2
  125. package/dist/_chunks/{hover-card-BplP5SzQ.js.map → hover-card-BM0vNmq4.js.map} +1 -1
  126. package/dist/_chunks/{icon-button-CY7GU_Se.js → icon-button-JAXAkqWC.js} +2 -2
  127. package/dist/_chunks/icon-button-JAXAkqWC.js.map +1 -0
  128. package/dist/_chunks/{icon-button-group-B_426QN_.js → icon-button-group-ud2BLmxe.js} +3 -3
  129. package/dist/_chunks/{icon-button-group-B_426QN_.js.map → icon-button-group-ud2BLmxe.js.map} +1 -1
  130. package/dist/_chunks/{icon-picker-ZLebyB0U.js → icon-picker-B1PwkUHy.js} +3 -3
  131. package/dist/_chunks/{icon-picker-ZLebyB0U.js.map → icon-picker-B1PwkUHy.js.map} +1 -1
  132. package/dist/_chunks/{image-cropper-_HiNN79d.js → image-cropper-DM6hpXUw.js} +2 -2
  133. package/dist/_chunks/{image-cropper-_HiNN79d.js.map → image-cropper-DM6hpXUw.js.map} +1 -1
  134. package/dist/_chunks/{info-tip-laBxZhKu.js → info-tip-CywkQ1NX.js} +2 -2
  135. package/dist/_chunks/{info-tip-laBxZhKu.js.map → info-tip-CywkQ1NX.js.map} +1 -1
  136. package/dist/_chunks/{insert-result-CSuPQyKL.js → insert-result-Fu9AHxR6.js} +2 -2
  137. package/dist/_chunks/{insert-result-CSuPQyKL.js.map → insert-result-Fu9AHxR6.js.map} +1 -1
  138. package/dist/_chunks/{key-value-pair-Dcdl3Gni.js → key-value-pair-BL1J3_Km.js} +2 -2
  139. package/dist/_chunks/{key-value-pair-Dcdl3Gni.js.map → key-value-pair-BL1J3_Km.js.map} +1 -1
  140. package/dist/_chunks/{kit-extensions-BTJSnM_H.js → kit-extensions-B9Qn6VIc.js} +6 -6
  141. package/dist/_chunks/{kit-extensions-BTJSnM_H.js.map → kit-extensions-B9Qn6VIc.js.map} +1 -1
  142. package/dist/_chunks/{link-cell-renderer-CkNbUsBM.js → link-cell-renderer-BcW3F1j9.js} +2 -2
  143. package/dist/_chunks/{link-cell-renderer-CkNbUsBM.js.map → link-cell-renderer-BcW3F1j9.js.map} +1 -1
  144. package/dist/_chunks/{locale-picker-DGkQmhV9.js → locale-picker-Z42P8T-i.js} +218 -213
  145. package/dist/_chunks/locale-picker-Z42P8T-i.js.map +1 -0
  146. package/dist/_chunks/{map-view-Bb7ClKSF.js → map-view-DxYPJjM9.js} +2 -2
  147. package/dist/_chunks/{map-view-Bb7ClKSF.js.map → map-view-DxYPJjM9.js.map} +1 -1
  148. package/dist/_chunks/{marketplace-app-shell-1uKqs4gD.js → marketplace-app-shell-rTTvWRrE.js} +6 -6
  149. package/dist/_chunks/{marketplace-app-shell-1uKqs4gD.js.map → marketplace-app-shell-rTTvWRrE.js.map} +1 -1
  150. package/dist/_chunks/{message-card-C2zsvyj0.js → message-card-CUBPPn4Z.js} +3 -3
  151. package/dist/_chunks/{message-card-C2zsvyj0.js.map → message-card-CUBPPn4Z.js.map} +1 -1
  152. package/dist/_chunks/{message-tray-CMlmxdH2.js → message-tray-uy3DAIbn.js} +4 -4
  153. package/dist/_chunks/{message-tray-CMlmxdH2.js.map → message-tray-uy3DAIbn.js.map} +1 -1
  154. package/dist/_chunks/{muscle-scheme-Co0NIgbU.js → muscle-scheme-CH-vQ7Ch.js} +2 -2
  155. package/dist/_chunks/{muscle-scheme-Co0NIgbU.js.map → muscle-scheme-CH-vQ7Ch.js.map} +1 -1
  156. package/dist/_chunks/{notes-panel-xxpFt-I1.js → notes-panel-Dka4Z2M7.js} +4 -4
  157. package/dist/_chunks/{notes-panel-xxpFt-I1.js.map → notes-panel-Dka4Z2M7.js.map} +1 -1
  158. package/dist/_chunks/{notification-card-DDzBCi8l.js → notification-card-Hy8w3UWx.js} +3 -3
  159. package/dist/_chunks/{notification-card-DDzBCi8l.js.map → notification-card-Hy8w3UWx.js.map} +1 -1
  160. package/dist/_chunks/{notification-tray-PnH2PBlZ.js → notification-tray-VuV3XXB8.js} +4 -4
  161. package/dist/_chunks/{notification-tray-PnH2PBlZ.js.map → notification-tray-VuV3XXB8.js.map} +1 -1
  162. package/dist/_chunks/{optical-prescription-DUufWXfZ.js → optical-prescription-C2n6d0HO.js} +2 -2
  163. package/dist/_chunks/{optical-prescription-DUufWXfZ.js.map → optical-prescription-C2n6d0HO.js.map} +1 -1
  164. package/dist/_chunks/{panel-subview-CzHutkA8.js → panel-subview-DAY-ToM3.js} +2 -2
  165. package/dist/_chunks/{panel-subview-CzHutkA8.js.map → panel-subview-DAY-ToM3.js.map} +1 -1
  166. package/dist/_chunks/{patient-details-tTlvrJSU.js → patient-details-D9sAM3qh.js} +3 -3
  167. package/dist/_chunks/{patient-details-tTlvrJSU.js.map → patient-details-D9sAM3qh.js.map} +1 -1
  168. package/dist/_chunks/{patient-field-row-DElFbpKc.js → patient-field-row-CT04C_lZ.js} +277 -257
  169. package/dist/_chunks/patient-field-row-CT04C_lZ.js.map +1 -0
  170. package/dist/_chunks/{patient-search-DgXdGkhK.js → patient-search-DkIukAMQ.js} +3 -3
  171. package/dist/_chunks/{patient-search-DgXdGkhK.js.map → patient-search-DkIukAMQ.js.map} +1 -1
  172. package/dist/_chunks/{patient-summary-card-DQ__6DR-.js → patient-summary-card-DI0BH-Fe.js} +5 -5
  173. package/dist/_chunks/{patient-summary-card-DQ__6DR-.js.map → patient-summary-card-DI0BH-Fe.js.map} +1 -1
  174. package/dist/_chunks/{payment-automation-upsell-ugi4np1l.js → payment-automation-upsell-vQBIyUky.js} +2 -2
  175. package/dist/_chunks/{payment-automation-upsell-ugi4np1l.js.map → payment-automation-upsell-vQBIyUky.js.map} +1 -1
  176. package/dist/_chunks/{payment-request-card-DMJB57Tv.js → payment-request-card-BSaJzhxz.js} +3 -3
  177. package/dist/_chunks/{payment-request-card-DMJB57Tv.js.map → payment-request-card-BSaJzhxz.js.map} +1 -1
  178. package/dist/_chunks/{periodontal-chart-DbGzKDj7.js → periodontal-chart-BcTcOc79.js} +2 -2
  179. package/dist/_chunks/{periodontal-chart-DbGzKDj7.js.map → periodontal-chart-BcTcOc79.js.map} +1 -1
  180. package/dist/_chunks/{periodontal-chart-card-DvHyP47v.js → periodontal-chart-card-NS_nToBf.js} +2 -2
  181. package/dist/_chunks/{periodontal-chart-card-DvHyP47v.js.map → periodontal-chart-card-NS_nToBf.js.map} +1 -1
  182. package/dist/_chunks/{popover-Dvb40vPH.js → popover-SASSeAdY.js} +2 -2
  183. package/dist/_chunks/{popover-Dvb40vPH.js.map → popover-SASSeAdY.js.map} +1 -1
  184. package/dist/_chunks/{practice-results-EKRiqWtQ.js → practice-results-C3ifcObw.js} +6 -6
  185. package/dist/_chunks/{practice-results-EKRiqWtQ.js.map → practice-results-C3ifcObw.js.map} +1 -1
  186. package/dist/_chunks/{pregnancy-dating-lfjjZVZH.js → pregnancy-dating-CpJ3iYvD.js} +2 -2
  187. package/dist/_chunks/{pregnancy-dating-lfjjZVZH.js.map → pregnancy-dating-CpJ3iYvD.js.map} +1 -1
  188. package/dist/_chunks/{pregnancy-weight-gain-WpNt-S0q.js → pregnancy-weight-gain-kDOhA2vZ.js} +2 -2
  189. package/dist/_chunks/{pregnancy-weight-gain-WpNt-S0q.js.map → pregnancy-weight-gain-kDOhA2vZ.js.map} +1 -1
  190. package/dist/_chunks/{privacy-lock-D6gq0GDg.js → privacy-lock-CEyvNpC8.js} +3 -3
  191. package/dist/_chunks/{privacy-lock-D6gq0GDg.js.map → privacy-lock-CEyvNpC8.js.map} +1 -1
  192. package/dist/_chunks/{privacy-mask-BC5lw2zB.js → privacy-mask-TzMlEu3Q.js} +2 -2
  193. package/dist/_chunks/{privacy-mask-BC5lw2zB.js.map → privacy-mask-TzMlEu3Q.js.map} +1 -1
  194. package/dist/_chunks/{product-hub-panel-CKeSCSeE.js → product-hub-panel-b70i9Hi1.js} +3 -3
  195. package/dist/_chunks/{product-hub-panel-CKeSCSeE.js.map → product-hub-panel-b70i9Hi1.js.map} +1 -1
  196. package/dist/_chunks/{public-header.agent-B9wDmUeB.js → public-header.agent-D0ApOrmx.js} +3 -3
  197. package/dist/_chunks/{public-header.agent-B9wDmUeB.js.map → public-header.agent-D0ApOrmx.js.map} +1 -1
  198. package/dist/_chunks/{radiograph-panel.agent-TmyIvTOa.js → radiograph-panel.agent-jhwaIW8U.js} +4 -4
  199. package/dist/_chunks/{radiograph-panel.agent-TmyIvTOa.js.map → radiograph-panel.agent-jhwaIW8U.js.map} +1 -1
  200. package/dist/_chunks/resource-chip-DQeCJzJf.js +143 -0
  201. package/dist/_chunks/resource-chip-DQeCJzJf.js.map +1 -0
  202. package/dist/_chunks/{reviews-panel-BdwFp_0c.js → reviews-panel-B5QC4FIp.js} +4 -4
  203. package/dist/_chunks/{reviews-panel-BdwFp_0c.js.map → reviews-panel-B5QC4FIp.js.map} +1 -1
  204. package/dist/_chunks/{rich-text-editor-y6ML0KeV.js → rich-text-editor-DoBXdwmx.js} +930 -943
  205. package/dist/_chunks/rich-text-editor-DoBXdwmx.js.map +1 -0
  206. package/dist/_chunks/{session-countdown-ACJyTXH2.js → session-countdown-26XB5u38.js} +2 -2
  207. package/dist/_chunks/{session-countdown-ACJyTXH2.js.map → session-countdown-26XB5u38.js.map} +1 -1
  208. package/dist/_chunks/{sheet-D0Lh0KR2.js → sheet-CwhNzxbr.js} +2 -2
  209. package/dist/_chunks/{sheet-D0Lh0KR2.js.map → sheet-CwhNzxbr.js.map} +1 -1
  210. package/dist/_chunks/{sign-in-with-alfadocs-button-CDyJAIzW.js → sign-in-with-alfadocs-button-jxbze77L.js} +2 -2
  211. package/dist/_chunks/{sign-in-with-alfadocs-button-CDyJAIzW.js.map → sign-in-with-alfadocs-button-jxbze77L.js.map} +1 -1
  212. package/dist/_chunks/{signature-request-BUGeG8oD.js → signature-request-BorHf3CY.js} +4 -4
  213. package/dist/_chunks/{signature-request-BUGeG8oD.js.map → signature-request-BorHf3CY.js.map} +1 -1
  214. package/dist/_chunks/{slot-grid-4fWH3Euk.js → slot-grid-xgf2UKLS.js} +4 -4
  215. package/dist/_chunks/{slot-grid-4fWH3Euk.js.map → slot-grid-xgf2UKLS.js.map} +1 -1
  216. package/dist/_chunks/social-sign-in-button-dlpPI5l7.js.map +1 -1
  217. package/dist/_chunks/{streaming-text-eRiizArc.js → streaming-text-Cos2fVTw.js} +2 -2
  218. package/dist/_chunks/{streaming-text-eRiizArc.js.map → streaming-text-Cos2fVTw.js.map} +1 -1
  219. package/dist/_chunks/{tab-bar-BHFf6knq.js → tab-bar-BrkMUW0c.js} +2 -2
  220. package/dist/_chunks/{tab-bar-BHFf6knq.js.map → tab-bar-BrkMUW0c.js.map} +1 -1
  221. package/dist/_chunks/tabs-tK22Mz7r.js +413 -0
  222. package/dist/_chunks/tabs-tK22Mz7r.js.map +1 -0
  223. package/dist/_chunks/{task-card-jaOhnj_q.js → task-card-CLpHmqEY.js} +2 -2
  224. package/dist/_chunks/{task-card-jaOhnj_q.js.map → task-card-CLpHmqEY.js.map} +1 -1
  225. package/dist/_chunks/{task-editor-DlvTwAfv.js → task-editor-B4UGsU7l.js} +6 -6
  226. package/dist/_chunks/{task-editor-DlvTwAfv.js.map → task-editor-B4UGsU7l.js.map} +1 -1
  227. package/dist/_chunks/{task-tray-HHyxi9ga.js → task-tray-dsmYgjVb.js} +4 -4
  228. package/dist/_chunks/{task-tray-HHyxi9ga.js.map → task-tray-dsmYgjVb.js.map} +1 -1
  229. package/dist/_chunks/{tasks-panel-DbSjq_mz.js → tasks-panel-CwwVw491.js} +6 -6
  230. package/dist/_chunks/{tasks-panel-DbSjq_mz.js.map → tasks-panel-CwwVw491.js.map} +1 -1
  231. package/dist/_chunks/{theme-toggle-LUBxlNDm.js → theme-toggle-jyoyhbJL.js} +4 -4
  232. package/dist/_chunks/{theme-toggle-LUBxlNDm.js.map → theme-toggle-jyoyhbJL.js.map} +1 -1
  233. package/dist/_chunks/{toast-CT8hjr9r.js → toast-FijDyPnv.js} +2 -2
  234. package/dist/_chunks/{toast-CT8hjr9r.js.map → toast-FijDyPnv.js.map} +1 -1
  235. package/dist/_chunks/{token-insert-menu-klwbxVKh.js → token-insert-menu-Cjf99IdN.js} +3 -3
  236. package/dist/_chunks/{token-insert-menu-klwbxVKh.js.map → token-insert-menu-Cjf99IdN.js.map} +1 -1
  237. package/dist/_chunks/{tool-rail-DEeX4PdN.js → tool-rail-DphMl1hX.js} +2 -2
  238. package/dist/_chunks/{tool-rail-DEeX4PdN.js.map → tool-rail-DphMl1hX.js.map} +1 -1
  239. package/dist/_chunks/{tooth-scheme-BkjhkI8g.js → tooth-scheme-BaCJnyg9.js} +663 -718
  240. package/dist/_chunks/tooth-scheme-BaCJnyg9.js.map +1 -0
  241. package/dist/_chunks/{unit-converter-Dp_KDxE6.js → unit-converter-CGpOgarU.js} +2 -2
  242. package/dist/_chunks/{unit-converter-Dp_KDxE6.js.map → unit-converter-CGpOgarU.js.map} +1 -1
  243. package/dist/_chunks/{use-appointment-details-read-5-hV-2xA.js → use-appointment-details-read-uEnJLVfA.js} +14 -14
  244. package/dist/_chunks/{use-appointment-details-read-5-hV-2xA.js.map → use-appointment-details-read-uEnJLVfA.js.map} +1 -1
  245. package/dist/_chunks/wallet-pay-button--dnR6NfJ.js.map +1 -1
  246. package/dist/_chunks/{warning-stack-CEgYkI1z.js → warning-stack-7Hffm7K1.js} +3 -3
  247. package/dist/_chunks/{warning-stack-CEgYkI1z.js.map → warning-stack-7Hffm7K1.js.map} +1 -1
  248. package/dist/_chunks/{workflow-map-qGkQTNvS.js → workflow-map-Jfe9L9Wt.js} +6 -6
  249. package/dist/_chunks/{workflow-map-qGkQTNvS.js.map → workflow-map-Jfe9L9Wt.js.map} +1 -1
  250. package/dist/_chunks/{workflow-status-ClHfz4Kr.js → workflow-status-jHfsIDzi.js} +2 -2
  251. package/dist/_chunks/{workflow-status-ClHfz4Kr.js.map → workflow-status-jHfsIDzi.js.map} +1 -1
  252. package/dist/agent-catalog.json +103 -38
  253. package/dist/agent-i18n/en.json +7 -4
  254. package/dist/components/_shared/entity-card/entity-card.d.ts +1 -1
  255. package/dist/components/_shared/field-visibility-cog.d.ts.map +1 -1
  256. package/dist/components/agenda-tray/index.js +1 -1
  257. package/dist/components/ai-credits-notice/index.js +1 -1
  258. package/dist/components/ai-permission-notice/index.js +1 -1
  259. package/dist/components/ai-prompt-input/index.js +1 -1
  260. package/dist/components/anamnesis-card/index.js +1 -1
  261. package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts +1 -1
  262. package/dist/components/appointment-card/index.js +2 -2
  263. package/dist/components/appointment-details-panel/index.js +1 -1
  264. package/dist/components/appointment-peek/index.js +1 -1
  265. package/dist/components/appointment-timeline/index.js +1 -1
  266. package/dist/components/audio-recorder/index.js +1 -1
  267. package/dist/components/bishop-score/index.js +1 -1
  268. package/dist/components/bmi-calculator/index.js +1 -1
  269. package/dist/components/booking/index.js +1 -1
  270. package/dist/components/button/button.d.ts +11 -0
  271. package/dist/components/button/button.d.ts.map +1 -1
  272. package/dist/components/button/icon-button.d.ts +4 -0
  273. package/dist/components/button/icon-button.d.ts.map +1 -1
  274. package/dist/components/button/index.js +2 -2
  275. package/dist/components/button-group/index.js +1 -1
  276. package/dist/components/calendar/calendar.d.ts +11 -3
  277. package/dist/components/calendar/calendar.d.ts.map +1 -1
  278. package/dist/components/calendar/index.js +1 -1
  279. package/dist/components/calendar-event-card/calendar-event-card.d.ts +6 -0
  280. package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
  281. package/dist/components/calendar-event-card/index.js +1 -1
  282. package/dist/components/care-plan-card/index.js +1 -1
  283. package/dist/components/care-plan-entry-card/index.js +1 -1
  284. package/dist/components/care-plan-header/index.js +1 -1
  285. package/dist/components/carousel/index.js +1 -1
  286. package/dist/components/chart/chart.d.ts +1 -1
  287. package/dist/components/chart/index.js +1 -1
  288. package/dist/components/chat-input/index.js +1 -1
  289. package/dist/components/chat-message/index.js +1 -1
  290. package/dist/components/connection-status/index.js +1 -1
  291. package/dist/components/contact-profile-card/index.js +1 -1
  292. package/dist/components/control-room-rail/index.js +1 -1
  293. package/dist/components/copy-field/index.js +1 -1
  294. package/dist/components/cycle-calculator/index.js +1 -1
  295. package/dist/components/dashboard-grid/index.js +1 -1
  296. package/dist/components/data-table/index.js +4 -4
  297. package/dist/components/data-table-tabs/index.js +1 -1
  298. package/dist/components/description-list/index.js +1 -1
  299. package/dist/components/document-preview/index.js +1 -1
  300. package/dist/components/document-scanner/index.js +1 -1
  301. package/dist/components/dropdown-menu/dropdown-menu.agent.d.ts.map +1 -1
  302. package/dist/components/dropdown-menu/dropdown-menu.d.ts +52 -2
  303. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  304. package/dist/components/dropdown-menu/index.d.ts +1 -1
  305. package/dist/components/dropdown-menu/index.d.ts.map +1 -1
  306. package/dist/components/dropdown-menu/index.js +1 -1
  307. package/dist/components/due-date-calculator/index.js +1 -1
  308. package/dist/components/editable-description/index.js +1 -1
  309. package/dist/components/editor-overlay/index.js +1 -1
  310. package/dist/components/empty-state/index.js +1 -1
  311. package/dist/components/entity-summary/index.js +1 -1
  312. package/dist/components/error-boundary/index.js +1 -1
  313. package/dist/components/face-scheme/index.js +1 -1
  314. package/dist/components/fetal-weight/index.js +1 -1
  315. package/dist/components/field-array/index.js +1 -1
  316. package/dist/components/file-manager/index.js +1 -1
  317. package/dist/components/finished-terminal/index.js +1 -1
  318. package/dist/components/fiscal-code-input/index.js +1 -1
  319. package/dist/components/floating-action-button/floating-action-button.d.ts.map +1 -1
  320. package/dist/components/freemium-paywall/index.js +1 -1
  321. package/dist/components/gestational-age-calculator/index.js +1 -1
  322. package/dist/components/hcg-doubling/index.js +1 -1
  323. package/dist/components/header/index.js +1 -1
  324. package/dist/components/header-settings/header-settings.d.ts +3 -3
  325. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  326. package/dist/components/header-settings/index.js +1 -1
  327. package/dist/components/hover-card/index.js +1 -1
  328. package/dist/components/icon-button/index.js +1 -1
  329. package/dist/components/icon-button-group/index.js +1 -1
  330. package/dist/components/icon-picker/index.js +1 -1
  331. package/dist/components/image-cropper/index.js +1 -1
  332. package/dist/components/info-tip/index.js +1 -1
  333. package/dist/components/key-value-pair/index.js +1 -1
  334. package/dist/components/locale-picker/index.js +1 -1
  335. package/dist/components/locale-picker/locale-picker.d.ts +7 -0
  336. package/dist/components/locale-picker/locale-picker.d.ts.map +1 -1
  337. package/dist/components/map-view/index.js +1 -1
  338. package/dist/components/message-card/index.js +1 -1
  339. package/dist/components/message-tray/index.js +1 -1
  340. package/dist/components/muscle-scheme/index.js +1 -1
  341. package/dist/components/notes-panel/index.js +1 -1
  342. package/dist/components/notification-card/index.js +1 -1
  343. package/dist/components/notification-tray/index.js +1 -1
  344. package/dist/components/operator-hero/operator-hero.d.ts +1 -1
  345. package/dist/components/optical-prescription/index.js +1 -1
  346. package/dist/components/panel-subview/index.js +1 -1
  347. package/dist/components/patient-details/index.js +1 -1
  348. package/dist/components/patient-details/patient-details.d.ts +1 -1
  349. package/dist/components/patient-search/index.js +1 -1
  350. package/dist/components/patient-summary-card/index.js +1 -1
  351. package/dist/components/patient-summary-card/patient-summary-card.d.ts +1 -1
  352. package/dist/components/patient-table/index.js +1 -1
  353. package/dist/components/payment-card/index.js +1 -1
  354. package/dist/components/periodontal-chart/index.js +1 -1
  355. package/dist/components/periodontal-chart-card/index.js +1 -1
  356. package/dist/components/popover/index.js +1 -1
  357. package/dist/components/practice-results/index.js +1 -1
  358. package/dist/components/pregnancy-dating/index.js +1 -1
  359. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  360. package/dist/components/privacy-lock/index.js +1 -1
  361. package/dist/components/product-hub-tray/index.js +1 -1
  362. package/dist/components/public-header/index.js +1 -1
  363. package/dist/components/radiograph-panel/index.js +1 -1
  364. package/dist/components/resource-chip/index.d.ts +1 -1
  365. package/dist/components/resource-chip/index.d.ts.map +1 -1
  366. package/dist/components/resource-chip/index.js +3 -2
  367. package/dist/components/resource-chip/resource-chip.d.ts +20 -0
  368. package/dist/components/resource-chip/resource-chip.d.ts.map +1 -1
  369. package/dist/components/reviews-panel/index.js +1 -1
  370. package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
  371. package/dist/components/rich-text-editor/index.js +2 -2
  372. package/dist/components/session-countdown/index.js +1 -1
  373. package/dist/components/sheet/index.js +1 -1
  374. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  375. package/dist/components/skeleton-scheme/index.js +1 -1
  376. package/dist/components/slot-grid/index.js +1 -1
  377. package/dist/components/social-sign-in-button/social-sign-in-button.d.ts.map +1 -1
  378. package/dist/components/streaming-text/index.js +1 -1
  379. package/dist/components/tab-bar/index.js +1 -1
  380. package/dist/components/tabs/index.js +1 -1
  381. package/dist/components/tabs/tabs.d.ts.map +1 -1
  382. package/dist/components/task-card/index.js +1 -1
  383. package/dist/components/task-editor/index.js +1 -1
  384. package/dist/components/task-tray/index.js +1 -1
  385. package/dist/components/tasks-panel/index.js +1 -1
  386. package/dist/components/theme-toggle/index.js +1 -1
  387. package/dist/components/toast/index.js +1 -1
  388. package/dist/components/token-insert-menu/index.js +1 -1
  389. package/dist/components/tool-rail/index.js +1 -1
  390. package/dist/components/tooth-scheme/index.js +1 -1
  391. package/dist/components/tooth-scheme/tooth-scheme.d.ts +2 -2
  392. package/dist/components/tooth-scheme/tooth-scheme.d.ts.map +1 -1
  393. package/dist/components/unit-converter/index.js +1 -1
  394. package/dist/components/wallet-pay-button/wallet-pay-button.d.ts.map +1 -1
  395. package/dist/components/warning-stack/index.js +1 -1
  396. package/dist/components/workflow/index.js +1 -1
  397. package/dist/components/workflow/workflow-card.d.ts +1 -1
  398. package/dist/components/workflow-status/index.js +1 -1
  399. package/dist/i18n/locales/ar.d.ts +5 -0
  400. package/dist/i18n/locales/ar.d.ts.map +1 -1
  401. package/dist/i18n/locales/ar.js +5 -0
  402. package/dist/i18n/locales/ar.js.map +1 -1
  403. package/dist/i18n/locales/de.d.ts +5 -0
  404. package/dist/i18n/locales/de.d.ts.map +1 -1
  405. package/dist/i18n/locales/de.js +5 -0
  406. package/dist/i18n/locales/de.js.map +1 -1
  407. package/dist/i18n/locales/el.d.ts +5 -0
  408. package/dist/i18n/locales/el.d.ts.map +1 -1
  409. package/dist/i18n/locales/el.js +5 -0
  410. package/dist/i18n/locales/el.js.map +1 -1
  411. package/dist/i18n/locales/en.d.ts +5 -0
  412. package/dist/i18n/locales/en.d.ts.map +1 -1
  413. package/dist/i18n/locales/en.js +5 -0
  414. package/dist/i18n/locales/en.js.map +1 -1
  415. package/dist/i18n/locales/es.d.ts +5 -0
  416. package/dist/i18n/locales/es.d.ts.map +1 -1
  417. package/dist/i18n/locales/es.js +5 -0
  418. package/dist/i18n/locales/es.js.map +1 -1
  419. package/dist/i18n/locales/fr.d.ts +5 -0
  420. package/dist/i18n/locales/fr.d.ts.map +1 -1
  421. package/dist/i18n/locales/fr.js +5 -0
  422. package/dist/i18n/locales/fr.js.map +1 -1
  423. package/dist/i18n/locales/hi.d.ts +5 -0
  424. package/dist/i18n/locales/hi.d.ts.map +1 -1
  425. package/dist/i18n/locales/hi.js +5 -0
  426. package/dist/i18n/locales/hi.js.map +1 -1
  427. package/dist/i18n/locales/it.d.ts +5 -0
  428. package/dist/i18n/locales/it.d.ts.map +1 -1
  429. package/dist/i18n/locales/it.js +5 -0
  430. package/dist/i18n/locales/it.js.map +1 -1
  431. package/dist/i18n/locales/ja.d.ts +5 -0
  432. package/dist/i18n/locales/ja.d.ts.map +1 -1
  433. package/dist/i18n/locales/ja.js +5 -0
  434. package/dist/i18n/locales/ja.js.map +1 -1
  435. package/dist/i18n/locales/nl.d.ts +5 -0
  436. package/dist/i18n/locales/nl.d.ts.map +1 -1
  437. package/dist/i18n/locales/nl.js +5 -0
  438. package/dist/i18n/locales/nl.js.map +1 -1
  439. package/dist/i18n/locales/pl.d.ts +5 -0
  440. package/dist/i18n/locales/pl.d.ts.map +1 -1
  441. package/dist/i18n/locales/pl.js +5 -0
  442. package/dist/i18n/locales/pl.js.map +1 -1
  443. package/dist/i18n/locales/pt.d.ts +5 -0
  444. package/dist/i18n/locales/pt.d.ts.map +1 -1
  445. package/dist/i18n/locales/pt.js +5 -0
  446. package/dist/i18n/locales/pt.js.map +1 -1
  447. package/dist/i18n/locales/ro.d.ts +5 -0
  448. package/dist/i18n/locales/ro.d.ts.map +1 -1
  449. package/dist/i18n/locales/ro.js +5 -0
  450. package/dist/i18n/locales/ro.js.map +1 -1
  451. package/dist/i18n/locales/ru.d.ts +5 -0
  452. package/dist/i18n/locales/ru.d.ts.map +1 -1
  453. package/dist/i18n/locales/ru.js +5 -0
  454. package/dist/i18n/locales/ru.js.map +1 -1
  455. package/dist/i18n/locales/sq.d.ts +5 -0
  456. package/dist/i18n/locales/sq.d.ts.map +1 -1
  457. package/dist/i18n/locales/sq.js +5 -0
  458. package/dist/i18n/locales/sq.js.map +1 -1
  459. package/dist/i18n/locales/sv.d.ts +5 -0
  460. package/dist/i18n/locales/sv.d.ts.map +1 -1
  461. package/dist/i18n/locales/sv.js +5 -0
  462. package/dist/i18n/locales/sv.js.map +1 -1
  463. package/dist/i18n/locales/tr.d.ts +5 -0
  464. package/dist/i18n/locales/tr.d.ts.map +1 -1
  465. package/dist/i18n/locales/tr.js +5 -0
  466. package/dist/i18n/locales/tr.js.map +1 -1
  467. package/dist/i18n/locales/zh.d.ts +5 -0
  468. package/dist/i18n/locales/zh.d.ts.map +1 -1
  469. package/dist/i18n/locales/zh.js +5 -0
  470. package/dist/i18n/locales/zh.js.map +1 -1
  471. package/dist/index.js +478 -477
  472. package/dist/locales/ar.json +5 -0
  473. package/dist/locales/de.json +5 -0
  474. package/dist/locales/el.json +5 -0
  475. package/dist/locales/en.json +5 -0
  476. package/dist/locales/es.json +5 -0
  477. package/dist/locales/fr.json +5 -0
  478. package/dist/locales/hi.json +5 -0
  479. package/dist/locales/it.json +5 -0
  480. package/dist/locales/ja.json +5 -0
  481. package/dist/locales/nl.json +5 -0
  482. package/dist/locales/pl.json +5 -0
  483. package/dist/locales/pt.json +5 -0
  484. package/dist/locales/ro.json +5 -0
  485. package/dist/locales/ru.json +5 -0
  486. package/dist/locales/sq.json +5 -0
  487. package/dist/locales/sv.json +5 -0
  488. package/dist/locales/tr.json +5 -0
  489. package/dist/locales/zh.json +5 -0
  490. package/dist/patterns/alia-assistant/index.js +1 -1
  491. package/dist/patterns/anamnesis/index.js +1 -1
  492. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  493. package/dist/patterns/calendar/calendar.surface.d.ts +4 -1
  494. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  495. package/dist/patterns/calendar/index.js +1 -1
  496. package/dist/patterns/help-me-write-templates/index.js +1 -1
  497. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  498. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  499. package/dist/patterns/signature-request/index.js +1 -1
  500. package/dist/tokens.css +2 -1
  501. package/package.json +1 -1
  502. package/dist/_chunks/button-18oBsI3n.js.map +0 -1
  503. package/dist/_chunks/calendar-workspace-CWRH4x15.js +0 -10577
  504. package/dist/_chunks/calendar-workspace-CWRH4x15.js.map +0 -1
  505. package/dist/_chunks/calendar-zpE9qTM4.js.map +0 -1
  506. package/dist/_chunks/dropdown-menu-C8PaW3lR.js +0 -369
  507. package/dist/_chunks/dropdown-menu-C8PaW3lR.js.map +0 -1
  508. package/dist/_chunks/header-settings-ZXa6hXuu.js +0 -335
  509. package/dist/_chunks/header-settings-ZXa6hXuu.js.map +0 -1
  510. package/dist/_chunks/icon-button-CY7GU_Se.js.map +0 -1
  511. package/dist/_chunks/locale-picker-DGkQmhV9.js.map +0 -1
  512. package/dist/_chunks/patient-field-row-DElFbpKc.js.map +0 -1
  513. package/dist/_chunks/resource-chip-DYTG0IQQ.js +0 -83
  514. package/dist/_chunks/resource-chip-DYTG0IQQ.js.map +0 -1
  515. package/dist/_chunks/rich-text-editor-y6ML0KeV.js.map +0 -1
  516. package/dist/_chunks/tabs-CFsuMQ5H.js +0 -409
  517. package/dist/_chunks/tabs-CFsuMQ5H.js.map +0 -1
  518. package/dist/_chunks/tooth-scheme-BkjhkI8g.js.map +0 -1
@@ -2,9 +2,9 @@ import { jsx as r, jsxs as k } from "react/jsx-runtime";
2
2
  import { forwardRef as ye, useId as he, useState as me, useCallback as M, useRef as ge, useEffect as ve, useMemo as be } from "react";
3
3
  import { c as m } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as we } from "react-i18next";
5
- import { B as F } from "./button-18oBsI3n.js";
6
- import { I as q } from "./icon-button-CY7GU_Se.js";
7
- import { E as xe } from "./empty-state-DTBZ1ENT.js";
5
+ import { B as F } from "./button-CYPx2xFq.js";
6
+ import { I as q } from "./icon-button-JAXAkqWC.js";
7
+ import { E as xe } from "./empty-state-Ck1wVWdN.js";
8
8
  import { S as W } from "./skeleton-B1KTdJ4N.js";
9
9
  import { u as Se } from "./registry-DvAUVLHh.js";
10
10
  import { b as ke, f as De } from "./format-4HNwNGrN.js";
@@ -637,4 +637,4 @@ export {
637
637
  Qe as i,
638
638
  Ge as s
639
639
  };
640
- //# sourceMappingURL=slot-grid-4fWH3Euk.js.map
640
+ //# sourceMappingURL=slot-grid-xgf2UKLS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-grid-4fWH3Euk.js","sources":["../../src/components/slot-grid/slot-grid.agent.ts","../../src/components/slot-grid/slot-grid.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — SlotGrid. */\n/* */\n/* Multi-day time-slot picker. Selection stays fully CONTROLLED by the */\n/* consumer (`selectedSlotId` + `onSlotSelect`) — the adapter never */\n/* stores a choice, it reports the committed prop and fires the same */\n/* callback a native click would (the `combobox.set_value` contract). */\n/* */\n/* Two channels reach the same component: */\n/* • the registry — `SlotGridHandle` resolved by (`slot-grid`, id), */\n/* which is the ONLY channel the MCP bridge has (PRS §26 §8.1); */\n/* • the DOM — `data-slot-id` on every rendered slot button, for */\n/* DOM-driving tools (browser extension / computer use) that never */\n/* touch the registry. */\n/* */\n/* PHI (§6.1 / §7): a slot id is an AVAILABILITY identifier and a day */\n/* key is a calendar date. SlotGrid is never handed a patient — its */\n/* inputs are `{ id, start, end?, available?, label? }` plus */\n/* `Intl`-formatted time strings — so no state slot can leak PHI. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SlotGridHandle } from './slot-grid';\n\nexport const slotGridAgent: AgentAdapter<SlotGridHandle> = {\n id: 'slot-grid',\n // pick → `select_slot` + the `selectedSlotId` state slot.\n // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.\n // expand → `show_more_day` + the `expandedDays` state slot.\n //\n // Host-delegated, deliberately WITHOUT an action: the optional\n // \"Next available\" CTA (`showNextAvailable` + `onJumpToNextAvailable`)\n // stays a native click on the toolbar button. It is a consumer-owned\n // jump to a window the grid has not been given, so the agent reaches it\n // through the DOM, or by reading `slotsByDay` and paging with\n // `next_days` until availability appears.\n capabilities: ['pick', 'range_navigate', 'expand'],\n state: {\n status: {\n type: \"'default' | 'loading' | 'disabled' | 'empty'\",\n descriptionKey: 'ui.agent.slotGrid.state.status',\n description:\n 'Visual state of the grid. Read this before concluding \"no availability\" — `loading` means the window has not resolved yet.',\n read: (handle) => handle.getStatus(),\n },\n selectedSlotId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.slotGrid.state.selectedSlotId',\n description:\n 'Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.',\n read: (handle) => handle.getSelectedSlotId(),\n },\n visibleDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.visibleDays',\n description:\n 'Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.',\n read: (handle) => handle.getVisibleDays(),\n },\n slotsByDay: {\n type: 'Record<string, string[]>',\n descriptionKey: 'ui.agent.slotGrid.state.slotsByDay',\n description:\n 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind \"Show more\".',\n read: (handle) => handle.getSlotsByDay(),\n },\n expandedDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.expandedDays',\n description:\n 'Day keys whose \"Show more\" control has been used, so every slot for that day is rendered.',\n read: (handle) => handle.getExpandedDays(),\n },\n hasPrevious: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasPrevious',\n description:\n 'True when an earlier window of days exists — the \"previous days\" arrow is offered.',\n read: (handle) => handle.getHasPrevious(),\n },\n hasNext: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasNext',\n description:\n 'True when a later window of days exists — the \"next days\" arrow is offered.',\n read: (handle) => handle.getHasNext(),\n },\n },\n actions: {\n select_slot: {\n // Fires the consumer's `onSlotSelect`, exactly as a click on the slot\n // button does. Persistent in the consumer's booking draft, and\n // reversible by selecting another slot — `write`, not `phi`: a slot is\n // availability, not patient data.\n safety: 'write',\n argsType: '{ slotId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n slotId: {\n type: 'string',\n description:\n 'Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot.',\n },\n },\n required: ['slotId'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the selection callback fired.',\n },\n errors: [\n 'Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.',\n 'Returns false when the slot is unavailable, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.selectSlot',\n description:\n 'Select an available slot by id. Emits the same selection the user would by clicking the slot button.',\n examples: [\n {\n args: { slotId: 'avail-2026-09-01-0930' },\n note: 'Book the 09:30 slot on 1 September.',\n },\n ],\n invoke: (handle, args: { slotId: string }) =>\n handle.selectSlot(args.slotId),\n },\n next_days: {\n // View-window paging only — the consumer fetches, nothing is persisted.\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasNext` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.nextDays',\n description:\n 'Page the visible window forward to the next group of days, as the \"next days\" arrow does.',\n invoke: (handle) => handle.nextDays(),\n },\n previous_days: {\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasPrevious` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.previousDays',\n description:\n 'Page the visible window back to the previous group of days, as the \"previous days\" arrow does.',\n invoke: (handle) => handle.previousDays(),\n },\n show_more_day: {\n // Reveals slots the grid already holds — ephemeral disclosure state.\n safety: 'read',\n argsType: '{ dayKey: string }',\n argsSchema: {\n type: 'object',\n properties: {\n dayKey: {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n description:\n 'Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot.',\n },\n },\n required: ['dayKey'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the day was expanded.',\n },\n errors: [\n 'Returns false when the day key is not one of the visible columns, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.showMoreDay',\n description:\n 'Render every slot for one day, as the day’s \"Show more\" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',\n examples: [\n {\n args: { dayKey: '2026-09-01' },\n note: 'Reveal the rest of 1 September so every slot button is clickable.',\n },\n ],\n invoke: (handle, args: { dayKey: string }) =>\n handle.showMoreDay(args.dayKey),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'slot-grid',\n description:\n 'Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works.',\n },\n item: {\n attr: 'data-slot-id',\n sourceProp: 'days[].slots[].id',\n description:\n 'Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* SlotGrid — multi-day time-slot picker for patient booking. */\n/* */\n/* Renders N day columns side-by-side. Each column shows a day header */\n/* (formatted via `Intl.DateTimeFormat(locale)`) plus a vertical list */\n/* of slot buttons. Long days collapse to `maxInitialSlotsPerDay` and */\n/* reveal the rest via a \"Show more\" button (progressive disclosure). */\n/* */\n/* Navigation arrows (`onPreviousDays` / `onNextDays`) let the consumer */\n/* page the window of days; the optional \"Next available\" CTA jumps to */\n/* the first day with an open slot. */\n/* */\n/* Purely presentational — no business logic, no data fetching. Date */\n/* comparisons use `date-fns` (never moment.js) and the rendered labels */\n/* come exclusively from `Intl.DateTimeFormat` or the `ui.slotGrid` */\n/* namespace via `useTranslation()`. */\n/* */\n/* Agent surface: `ref` is the outer <div>; a separate `SlotGridHandle` */\n/* (built with `useMemo`, registered via `useAgentRegistration`) gives */\n/* the MCP bridge a read-only view of the visible days + available slot */\n/* ids and the four interactions the UI itself offers. See */\n/* `slot-grid.agent.ts` and PRS §26. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, isSameDay, parseISO } from 'date-fns';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { useAgentRegistration } from '../../agent';\nimport { slotGridAgent } from './slot-grid.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type SlotGridState = 'default' | 'loading' | 'disabled' | 'empty';\n\nexport type SlotGridSize = 'sm' | 'md' | 'lg';\n\nexport interface SlotGridSlot {\n /** Stable identity — used by consumers to resolve selection. */\n id: string;\n /** Slot start — ISO string or `Date`. Rendered via `Intl.DateTimeFormat`. */\n start: string | Date;\n /** Optional slot end — if omitted only the start time is announced. */\n end?: string | Date;\n /** Defaults to `true`. Unavailable slots render disabled and are not focusable. */\n available?: boolean;\n /** Override the default `Intl`-formatted time label. */\n label?: string;\n /** Override the accessible name of the slot button. */\n ariaLabel?: string;\n}\n\nexport interface SlotGridDay {\n /** The calendar day the column represents. */\n date: string | Date;\n /** Slots for this day, in chronological order. Empty array ⇒ empty day. */\n slots: SlotGridSlot[];\n /** Override the default `Intl`-formatted day header. */\n label?: string;\n}\n\nexport interface SlotGridProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'onSelect'>,\n VariantProps<typeof slotGridVariants> {\n /** Days to render, one column per entry. */\n days: SlotGridDay[];\n /** Visual / interactive state. Defaults to `'default'`. */\n state?: SlotGridState;\n /** Density of the slot buttons and day headers. Defaults to `'md'`. */\n size?: SlotGridSize;\n /** Id of the currently selected slot (controlled). */\n selectedSlotId?: string;\n /**\n * Initial number of slots to render per day before the \"Show more\"\n * progressive-disclosure control collapses the rest. Defaults to `6`.\n */\n maxInitialSlotsPerDay?: number;\n /**\n * BCP-47 locale tag for `Intl.DateTimeFormat`. Defaults to the active\n * i18next language.\n */\n locale?: string;\n /** IANA time zone for `Intl.DateTimeFormat`. Optional. */\n timeZone?: string;\n /** Whether the \"previous days\" navigation arrow should be enabled. */\n hasPrevious?: boolean;\n /** Whether the \"next days\" navigation arrow should be enabled. */\n hasNext?: boolean;\n /**\n * When `true`, renders the \"Next available\" CTA at the end of the\n * toolbar. Only emits a callback — the consumer owns the navigation.\n */\n showNextAvailable?: boolean;\n /** Accessible label for the outer grid region. */\n ariaLabel?: string;\n /** Fires when the user selects an available slot. */\n onSlotSelect?: (slot: SlotGridSlot, day: SlotGridDay) => void;\n /** Fires when the user clicks the \"previous days\" arrow. */\n onPreviousDays?: () => void;\n /** Fires when the user clicks the \"next days\" arrow. */\n onNextDays?: () => void;\n /** Fires when the user clicks a day's \"Show more\" button. */\n onShowMore?: (day: SlotGridDay) => void;\n /** Fires when the user clicks the \"Next available\" CTA. */\n onJumpToNextAvailable?: () => void;\n}\n\n/**\n * Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.\n *\n * It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing\n * consumers are unaffected. The handle is built with `useMemo` and handed to\n * `useAgentRegistration`, the same shape Autocomplete uses.\n *\n * Every getter returns identifiers and structural state only — availability\n * slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).\n */\nexport interface SlotGridHandle {\n /** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */\n getStatus: () => SlotGridState;\n /** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */\n getSelectedSlotId: () => string | null;\n /** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */\n getVisibleDays: () => string[];\n /** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */\n getSlotsByDay: () => Record<string, string[]>;\n /** Day keys whose \"Show more\" control has been used. */\n getExpandedDays: () => string[];\n /** Mirrors the `hasPrevious` prop — whether an earlier window exists. */\n getHasPrevious: () => boolean;\n /** Mirrors the `hasNext` prop — whether a later window exists. */\n getHasNext: () => boolean;\n /** Select an available slot by id. Returns `false` when it cannot be selected. */\n selectSlot: (slotId: string) => boolean;\n /** Page the window forward. Returns `false` when the arrow would be disabled. */\n nextDays: () => boolean;\n /** Page the window back. Returns `false` when the arrow would be disabled. */\n previousDays: () => boolean;\n /** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */\n showMoreDay: (dayKey: string) => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst slotGridVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:w-full',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst toolbarVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n);\n\n/**\n * Column-count is dynamic (1–12), so it is declared as a full CVA variant —\n * this keeps every `grid-cols-N` string statically visible to Tailwind's\n * JIT and keeps the variant table inside CVA rather than hand-rolled.\n */\nconst COLS_MAX = 12;\n\nconst columnsVariants = cva(\n 'ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start',\n {\n variants: {\n cols: {\n 1: 'ds:grid-cols-1',\n 2: 'ds:grid-cols-2',\n 3: 'ds:grid-cols-3',\n 4: 'ds:grid-cols-4',\n 5: 'ds:grid-cols-5',\n 6: 'ds:grid-cols-6',\n 7: 'ds:grid-cols-7',\n 8: 'ds:grid-cols-8',\n 9: 'ds:grid-cols-9',\n 10: 'ds:grid-cols-10',\n 11: 'ds:grid-cols-11',\n 12: 'ds:grid-cols-12',\n },\n },\n defaultVariants: { cols: 1 },\n },\n);\n\ntype ColumnsCount = NonNullable<VariantProps<typeof columnsVariants>['cols']>;\n\nfunction clampCols(count: number): ColumnsCount {\n return Math.max(1, Math.min(count, COLS_MAX)) as ColumnsCount;\n}\n\nconst columnVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:bg-[var(--card)]',\n 'ds:min-w-0',\n ].join(' '),\n);\n\nconst dayHeaderVariants = cva(\n [\n 'ds:font-[var(--font-weight-semibold)]',\n 'ds:text-[var(--foreground)]',\n 'ds:text-start',\n 'ds:truncate',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-xs)]',\n md: 'ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst slotListVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none',\n);\n\nconst slotButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:w-full',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:bg-[var(--secondary)]',\n 'ds:shadow-[var(--shadow-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,color,box-shadow]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[var(--focus-ring-offset)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none',\n 'ds:hover:enabled:shadow-[var(--shadow-md)]',\n 'ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : parseISO(value);\n}\n\n/**\n * Internal identity for one rendered column. The index guards against a\n * consumer passing the same calendar date twice.\n */\nfunction columnKey(day: SlotGridDay, index: number): string {\n return `${toDate(day.date).toISOString()}-${index}`;\n}\n\n/**\n * Agent-facing key for one column — the local calendar date as `yyyy-MM-dd`.\n * Structural, locale-independent, and carries no patient data.\n */\nfunction dayKeyOf(day: SlotGridDay): string {\n return format(toDate(day.date), 'yyyy-MM-dd');\n}\n\n/** Is `a` the same calendar day as `b`? Uses `date-fns`, locale-agnostic. */\nexport function isSameDate(a: string | Date, b: string | Date): boolean {\n return isSameDay(toDate(a), toDate(b));\n}\n\n/** Find the first day in a list that has at least one available slot. */\nexport function findFirstAvailable(\n days: SlotGridDay[],\n): { day: SlotGridDay; slot: SlotGridSlot } | undefined {\n for (const day of days) {\n const slot = day.slots.find((s) => s.available !== false);\n if (slot) return { day, slot };\n }\n return undefined;\n}\n\nfunction formatDayHeader(\n date: Date,\n locale: string,\n timeZone?: string,\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n }).format(date);\n } catch {\n return new Intl.DateTimeFormat('en', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n}\n\nfunction formatSlotTime(\n slot: SlotGridSlot,\n locale: string,\n timeZone?: string,\n): string {\n if (slot.label !== undefined) return slot.label;\n const start = toDate(slot.start);\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n });\n if (slot.end) {\n const end = toDate(slot.end);\n if (typeof fmt.formatRange === 'function') {\n try {\n return fmt.formatRange(start, end);\n } catch {\n /* fall through */\n }\n }\n return `${fmt.format(start)} – ${fmt.format(end)}`;\n }\n return fmt.format(start);\n } catch {\n return start.toISOString();\n }\n}\n\nfunction formatSlotAriaLabel(\n slot: SlotGridSlot,\n day: SlotGridDay,\n locale: string,\n timeZone: string | undefined,\n template: (opts: { time: string; day: string }) => string,\n): string {\n if (slot.ariaLabel !== undefined) return slot.ariaLabel;\n const time = formatSlotTime(slot, locale, timeZone);\n const dayLabel =\n day.label !== undefined\n ? day.label\n : formatDayHeader(toDate(day.date), locale, timeZone);\n return template({ time, day: dayLabel });\n}\n\n/* ------------------------------------------------------------------ */\n/* Glyphs — logical-direction arrows */\n/* ------------------------------------------------------------------ */\n\nfunction ChevronStartIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n );\n}\n\nfunction ChevronEndIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SlotGrid = forwardRef<HTMLDivElement, SlotGridProps>(\n (\n {\n days,\n state = 'default',\n size = 'md',\n selectedSlotId,\n maxInitialSlotsPerDay = 6,\n locale: localeProp,\n timeZone,\n hasPrevious = false,\n hasNext = false,\n showNextAvailable = false,\n ariaLabel,\n onSlotSelect,\n onPreviousDays,\n onNextDays,\n onShowMore,\n onJumpToNextAvailable,\n className,\n id,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const locale = localeProp ?? i18n.language ?? 'en';\n const idBase = useId();\n\n const [expanded, setExpanded] = useState<Record<string, boolean>>({});\n\n const isLoading = state === 'loading';\n const isDisabled = state === 'disabled';\n const isInteractionSuppressed = isLoading || isDisabled;\n const isEmpty =\n state === 'empty' ||\n days.length === 0 ||\n days.every((day) => day.slots.length === 0);\n\n const resolvedAriaLabel = ariaLabel ?? t('slotGrid.ariaLabel');\n\n const handleSlotClick = useCallback(\n (slot: SlotGridSlot, day: SlotGridDay) => {\n if (isInteractionSuppressed) return;\n if (slot.available === false) return;\n onSlotSelect?.(slot, day);\n },\n [isInteractionSuppressed, onSlotSelect],\n );\n\n const handleShowMore = useCallback(\n (day: SlotGridDay, key: string) => {\n setExpanded((prev) => ({ ...prev, [key]: true }));\n onShowMore?.(day);\n },\n [onShowMore],\n );\n\n const handleSlotKeyDown = useCallback(\n (\n event: KeyboardEvent<HTMLButtonElement>,\n slot: SlotGridSlot,\n day: SlotGridDay,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSlotClick(slot, day);\n }\n },\n [handleSlotClick],\n );\n\n /* ---- Agent handle ---------------------------------------------- */\n /* `ref` stays the outer <div> (unchanged for consumers). The agent */\n /* handle is a separate, memo-stable object — the Autocomplete shape. */\n /* A snapshot ref mirrors props + internal state so the handle reads */\n /* fresh values without re-registering on every render. */\n\n const snapshot = {\n days,\n selectedSlotId,\n hasPrevious,\n hasNext,\n state,\n expanded,\n isInteractionSuppressed,\n onPreviousDays,\n onNextDays,\n handleSlotClick,\n handleShowMore,\n };\n const latest = useRef(snapshot);\n useEffect(() => {\n latest.current = snapshot;\n });\n\n const agentHandle = useMemo<SlotGridHandle>(\n () => ({\n getStatus: () => latest.current.state,\n getSelectedSlotId: () => latest.current.selectedSlotId ?? null,\n getVisibleDays: () => latest.current.days.map(dayKeyOf),\n getSlotsByDay: () => {\n // Ids only — never the slot objects (PRS §26 §7 / auditor A9).\n const byDay: Record<string, string[]> = {};\n for (const day of latest.current.days) {\n const key = dayKeyOf(day);\n const ids = day.slots\n .filter((slot) => slot.available !== false)\n .map((slot) => slot.id);\n byDay[key] = byDay[key] ? [...byDay[key], ...ids] : ids;\n }\n return byDay;\n },\n getExpandedDays: () =>\n latest.current.days\n .filter(\n (day, index) =>\n latest.current.expanded[columnKey(day, index)] === true,\n )\n .map(dayKeyOf),\n getHasPrevious: () => latest.current.hasPrevious,\n getHasNext: () => latest.current.hasNext,\n selectSlot: (slotId) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n for (const day of current.days) {\n const slot = day.slots.find((candidate) => candidate.id === slotId);\n if (!slot) continue;\n if (slot.available === false) return false;\n // Same code path as a native click on the slot button.\n current.handleSlotClick(slot, day);\n return true;\n }\n return false;\n },\n nextDays: () => {\n const current = latest.current;\n if (!current.hasNext || current.isInteractionSuppressed) return false;\n if (!current.onNextDays) return false;\n current.onNextDays();\n return true;\n },\n previousDays: () => {\n const current = latest.current;\n if (!current.hasPrevious || current.isInteractionSuppressed) {\n return false;\n }\n if (!current.onPreviousDays) return false;\n current.onPreviousDays();\n return true;\n },\n showMoreDay: (dayKey) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n const index = current.days.findIndex(\n (day) => dayKeyOf(day) === dayKey,\n );\n if (index < 0) return false;\n const day = current.days[index];\n current.handleShowMore(day, columnKey(day, index));\n return true;\n },\n }),\n [],\n );\n\n useAgentRegistration(slotGridAgent, agentHandle, id);\n\n const columnCount = clampCols(days.length || 1);\n const columnsClass = columnsVariants({ cols: columnCount });\n\n /* ---- Rendered content ------------------------------------------ */\n\n let body: ReactNode;\n if (isLoading) {\n body = (\n <div\n className={columnsClass}\n data-state=\"loading\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t('common.loading')}\n >\n {Array.from({ length: columnCount }, (_, colIdx) => (\n <div key={`loading-col-${colIdx}`} className={columnVariants()}>\n <Skeleton variant=\"text\" size={size} width=\"60%\" />\n <div className={slotListVariants()}>\n {Array.from(\n { length: Math.min(maxInitialSlotsPerDay, 4) },\n (_, rowIdx) => (\n <Skeleton\n key={`loading-slot-${colIdx}-${rowIdx}`}\n variant=\"rounded\"\n size={size}\n height=\"40px\"\n />\n ),\n )}\n </div>\n </div>\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div data-state=\"empty\">\n <EmptyState variant=\"no-results\" title={t('slotGrid.noSlots')} />\n </div>\n );\n } else {\n body = (\n <div\n className={columnsClass}\n data-state={isDisabled ? 'disabled' : 'default'}\n >\n {days.map((day, dayIdx) => {\n const dayKey = columnKey(day, dayIdx);\n const headerLabel =\n day.label ?? formatDayHeader(toDate(day.date), locale, timeZone);\n const headerId = `${idBase}-day-${dayIdx}-header`;\n const isExpanded = expanded[dayKey] ?? false;\n const visibleSlots = isExpanded\n ? day.slots\n : day.slots.slice(0, maxInitialSlotsPerDay);\n const hiddenCount = day.slots.length - visibleSlots.length;\n\n const isDayEmpty = day.slots.length === 0;\n\n return (\n // Use a plain <div role=\"group\"> rather than <section> — a\n // <section> with aria-labelledby is a landmark, and nesting many\n // landmarks inside the outer slot-grid landmark fails axe's\n // landmark-unique rule.\n <div\n key={dayKey}\n role=\"group\"\n className={columnVariants()}\n aria-labelledby={headerId}\n data-empty={isDayEmpty || undefined}\n >\n <h3 id={headerId} className={dayHeaderVariants({ size })}>\n {headerLabel}\n </h3>\n {isDayEmpty ? (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0\">\n {t('slotGrid.noSlots')}\n </p>\n ) : null}\n <ul className={slotListVariants()}>\n {visibleSlots.map((slot) => {\n const ariaLabelSlot = formatSlotAriaLabel(\n slot,\n day,\n locale,\n timeZone,\n ({ time, day: dayLabel }) =>\n t('slotGrid.slotLabel', { time, day: dayLabel }),\n );\n const isSelected = selectedSlotId === slot.id;\n const isSlotDisabled =\n slot.available === false || isInteractionSuppressed;\n return (\n <li key={slot.id}>\n <button\n type=\"button\"\n className={slotButtonVariants({ size })}\n aria-label={ariaLabelSlot}\n aria-pressed={isSelected}\n disabled={isSlotDisabled}\n aria-disabled={isSlotDisabled || undefined}\n data-slot-id={slot.id}\n onClick={() => handleSlotClick(slot, day)}\n onKeyDown={(event) =>\n handleSlotKeyDown(event, slot, day)\n }\n >\n {formatSlotTime(slot, locale, timeZone)}\n </button>\n </li>\n );\n })}\n </ul>\n {hiddenCount > 0 ? (\n <Button\n intent=\"ghost\"\n size={size === 'lg' ? 'md' : 'sm'}\n onClick={() => handleShowMore(day, dayKey)}\n disabled={isInteractionSuppressed}\n >\n {t('slotGrid.showMore', { count: hiddenCount })}\n </Button>\n ) : null}\n </div>\n );\n })}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n id={id}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n className={slotGridVariants({ size, className })}\n data-component=\"slot-grid\"\n data-component-id={id}\n data-state={state}\n {...rest}\n >\n <div className={toolbarVariants()}>\n <IconButton\n icon={<ChevronStartIcon />}\n aria-label={t('slotGrid.previousDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasPrevious || isInteractionSuppressed}\n onClick={onPreviousDays}\n />\n {showNextAvailable ? (\n <Button\n intent=\"secondary\"\n size={size === 'lg' ? 'md' : 'sm'}\n disabled={isInteractionSuppressed}\n onClick={onJumpToNextAvailable}\n >\n {t('slotGrid.nextAvailable')}\n </Button>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n <IconButton\n icon={<ChevronEndIcon />}\n aria-label={t('slotGrid.nextDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasNext || isInteractionSuppressed}\n onClick={onNextDays}\n />\n </div>\n\n {body}\n </div>\n );\n },\n);\n\nSlotGrid.displayName = 'SlotGrid';\n"],"names":["slotGridAgent","handle","args","slotGridVariants","cva","toolbarVariants","COLS_MAX","columnsVariants","clampCols","count","columnVariants","dayHeaderVariants","slotListVariants","slotButtonVariants","toDate","value","parseISO","columnKey","day","index","dayKeyOf","format","isSameDate","a","b","isSameDay","findFirstAvailable","days","slot","s","formatDayHeader","date","locale","timeZone","formatSlotTime","start","fmt","end","formatSlotAriaLabel","template","time","dayLabel","ChevronStartIcon","jsx","ChevronEndIcon","SlotGrid","forwardRef","state","size","selectedSlotId","maxInitialSlotsPerDay","localeProp","hasPrevious","hasNext","showNextAvailable","ariaLabel","onSlotSelect","onPreviousDays","onNextDays","onShowMore","onJumpToNextAvailable","className","id","rest","ref","t","i18n","useTranslation","idBase","useId","expanded","setExpanded","useState","isLoading","isDisabled","isInteractionSuppressed","isEmpty","resolvedAriaLabel","handleSlotClick","useCallback","handleShowMore","key","prev","handleSlotKeyDown","event","snapshot","latest","useRef","useEffect","agentHandle","useMemo","byDay","ids","slotId","current","candidate","dayKey","useAgentRegistration","columnCount","columnsClass","body","_","colIdx","jsxs","Skeleton","rowIdx","EmptyState","dayIdx","headerLabel","headerId","visibleSlots","hiddenCount","isDayEmpty","ariaLabelSlot","isSelected","isSlotDisabled","Button","IconButton"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWJ,cAAc,CAAC,QAAQ,kBAAkB,QAAQ;AAAA,EACjD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,kBAAA;AAAA,IAAkB;AAAA,IAE7C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,cAAA;AAAA,IAAc;AAAA,IAEzC,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,gBAAA;AAAA,IAAgB;AAAA,IAE3C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IA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,gBACrC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACI,KAAeuB;AAAA,gBAC1B,SAASlB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEVH,IACC,gBAAAX;AAAA,cAACyE;AAAA,cAAA;AAAA,gBACC,QAAO;AAAA,gBACP,MAAMpE,MAAS,OAAO,OAAO;AAAA,gBAC7B,UAAU2B;AAAA,gBACV,SAASf;AAAA,gBAER,YAAE,wBAAwB;AAAA,cAAA;AAAA,YAAA,IAG7B,gBAAAjB,EAAC,QAAA,EAAK,eAAY,OAAA,CAAO;AAAA,YAE3B,gBAAAA;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAOzE,IAAA,EAAe;AAAA,gBACtB,cAAYqB,EAAE,mBAAmB;AAAA,gBACjC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACK,KAAWsB;AAAA,gBACtB,SAASjB;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAEC0C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvD,GAAS,cAAc;"}
1
+ {"version":3,"file":"slot-grid-xgf2UKLS.js","sources":["../../src/components/slot-grid/slot-grid.agent.ts","../../src/components/slot-grid/slot-grid.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — SlotGrid. */\n/* */\n/* Multi-day time-slot picker. Selection stays fully CONTROLLED by the */\n/* consumer (`selectedSlotId` + `onSlotSelect`) — the adapter never */\n/* stores a choice, it reports the committed prop and fires the same */\n/* callback a native click would (the `combobox.set_value` contract). */\n/* */\n/* Two channels reach the same component: */\n/* • the registry — `SlotGridHandle` resolved by (`slot-grid`, id), */\n/* which is the ONLY channel the MCP bridge has (PRS §26 §8.1); */\n/* • the DOM — `data-slot-id` on every rendered slot button, for */\n/* DOM-driving tools (browser extension / computer use) that never */\n/* touch the registry. */\n/* */\n/* PHI (§6.1 / §7): a slot id is an AVAILABILITY identifier and a day */\n/* key is a calendar date. SlotGrid is never handed a patient — its */\n/* inputs are `{ id, start, end?, available?, label? }` plus */\n/* `Intl`-formatted time strings — so no state slot can leak PHI. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SlotGridHandle } from './slot-grid';\n\nexport const slotGridAgent: AgentAdapter<SlotGridHandle> = {\n id: 'slot-grid',\n // pick → `select_slot` + the `selectedSlotId` state slot.\n // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.\n // expand → `show_more_day` + the `expandedDays` state slot.\n //\n // Host-delegated, deliberately WITHOUT an action: the optional\n // \"Next available\" CTA (`showNextAvailable` + `onJumpToNextAvailable`)\n // stays a native click on the toolbar button. It is a consumer-owned\n // jump to a window the grid has not been given, so the agent reaches it\n // through the DOM, or by reading `slotsByDay` and paging with\n // `next_days` until availability appears.\n capabilities: ['pick', 'range_navigate', 'expand'],\n state: {\n status: {\n type: \"'default' | 'loading' | 'disabled' | 'empty'\",\n descriptionKey: 'ui.agent.slotGrid.state.status',\n description:\n 'Visual state of the grid. Read this before concluding \"no availability\" — `loading` means the window has not resolved yet.',\n read: (handle) => handle.getStatus(),\n },\n selectedSlotId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.slotGrid.state.selectedSlotId',\n description:\n 'Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.',\n read: (handle) => handle.getSelectedSlotId(),\n },\n visibleDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.visibleDays',\n description:\n 'Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.',\n read: (handle) => handle.getVisibleDays(),\n },\n slotsByDay: {\n type: 'Record<string, string[]>',\n descriptionKey: 'ui.agent.slotGrid.state.slotsByDay',\n description:\n 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind \"Show more\".',\n read: (handle) => handle.getSlotsByDay(),\n },\n expandedDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.expandedDays',\n description:\n 'Day keys whose \"Show more\" control has been used, so every slot for that day is rendered.',\n read: (handle) => handle.getExpandedDays(),\n },\n hasPrevious: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasPrevious',\n description:\n 'True when an earlier window of days exists — the \"previous days\" arrow is offered.',\n read: (handle) => handle.getHasPrevious(),\n },\n hasNext: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasNext',\n description:\n 'True when a later window of days exists — the \"next days\" arrow is offered.',\n read: (handle) => handle.getHasNext(),\n },\n },\n actions: {\n select_slot: {\n // Fires the consumer's `onSlotSelect`, exactly as a click on the slot\n // button does. Persistent in the consumer's booking draft, and\n // reversible by selecting another slot — `write`, not `phi`: a slot is\n // availability, not patient data.\n safety: 'write',\n argsType: '{ slotId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n slotId: {\n type: 'string',\n description:\n 'Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot.',\n },\n },\n required: ['slotId'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the selection callback fired.',\n },\n errors: [\n 'Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.',\n 'Returns false when the slot is unavailable, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.selectSlot',\n description:\n 'Select an available slot by id. Emits the same selection the user would by clicking the slot button.',\n examples: [\n {\n args: { slotId: 'avail-2026-09-01-0930' },\n note: 'Book the 09:30 slot on 1 September.',\n },\n ],\n invoke: (handle, args: { slotId: string }) =>\n handle.selectSlot(args.slotId),\n },\n next_days: {\n // View-window paging only — the consumer fetches, nothing is persisted.\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasNext` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.nextDays',\n description:\n 'Page the visible window forward to the next group of days, as the \"next days\" arrow does.',\n invoke: (handle) => handle.nextDays(),\n },\n previous_days: {\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasPrevious` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.previousDays',\n description:\n 'Page the visible window back to the previous group of days, as the \"previous days\" arrow does.',\n invoke: (handle) => handle.previousDays(),\n },\n show_more_day: {\n // Reveals slots the grid already holds — ephemeral disclosure state.\n safety: 'read',\n argsType: '{ dayKey: string }',\n argsSchema: {\n type: 'object',\n properties: {\n dayKey: {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n description:\n 'Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot.',\n },\n },\n required: ['dayKey'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the day was expanded.',\n },\n errors: [\n 'Returns false when the day key is not one of the visible columns, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.showMoreDay',\n description:\n 'Render every slot for one day, as the day’s \"Show more\" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',\n examples: [\n {\n args: { dayKey: '2026-09-01' },\n note: 'Reveal the rest of 1 September so every slot button is clickable.',\n },\n ],\n invoke: (handle, args: { dayKey: string }) =>\n handle.showMoreDay(args.dayKey),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'slot-grid',\n description:\n 'Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works.',\n },\n item: {\n attr: 'data-slot-id',\n sourceProp: 'days[].slots[].id',\n description:\n 'Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* SlotGrid — multi-day time-slot picker for patient booking. */\n/* */\n/* Renders N day columns side-by-side. Each column shows a day header */\n/* (formatted via `Intl.DateTimeFormat(locale)`) plus a vertical list */\n/* of slot buttons. Long days collapse to `maxInitialSlotsPerDay` and */\n/* reveal the rest via a \"Show more\" button (progressive disclosure). */\n/* */\n/* Navigation arrows (`onPreviousDays` / `onNextDays`) let the consumer */\n/* page the window of days; the optional \"Next available\" CTA jumps to */\n/* the first day with an open slot. */\n/* */\n/* Purely presentational — no business logic, no data fetching. Date */\n/* comparisons use `date-fns` (never moment.js) and the rendered labels */\n/* come exclusively from `Intl.DateTimeFormat` or the `ui.slotGrid` */\n/* namespace via `useTranslation()`. */\n/* */\n/* Agent surface: `ref` is the outer <div>; a separate `SlotGridHandle` */\n/* (built with `useMemo`, registered via `useAgentRegistration`) gives */\n/* the MCP bridge a read-only view of the visible days + available slot */\n/* ids and the four interactions the UI itself offers. See */\n/* `slot-grid.agent.ts` and PRS §26. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, isSameDay, parseISO } from 'date-fns';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { useAgentRegistration } from '../../agent';\nimport { slotGridAgent } from './slot-grid.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type SlotGridState = 'default' | 'loading' | 'disabled' | 'empty';\n\nexport type SlotGridSize = 'sm' | 'md' | 'lg';\n\nexport interface SlotGridSlot {\n /** Stable identity — used by consumers to resolve selection. */\n id: string;\n /** Slot start — ISO string or `Date`. Rendered via `Intl.DateTimeFormat`. */\n start: string | Date;\n /** Optional slot end — if omitted only the start time is announced. */\n end?: string | Date;\n /** Defaults to `true`. Unavailable slots render disabled and are not focusable. */\n available?: boolean;\n /** Override the default `Intl`-formatted time label. */\n label?: string;\n /** Override the accessible name of the slot button. */\n ariaLabel?: string;\n}\n\nexport interface SlotGridDay {\n /** The calendar day the column represents. */\n date: string | Date;\n /** Slots for this day, in chronological order. Empty array ⇒ empty day. */\n slots: SlotGridSlot[];\n /** Override the default `Intl`-formatted day header. */\n label?: string;\n}\n\nexport interface SlotGridProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'onSelect'>,\n VariantProps<typeof slotGridVariants> {\n /** Days to render, one column per entry. */\n days: SlotGridDay[];\n /** Visual / interactive state. Defaults to `'default'`. */\n state?: SlotGridState;\n /** Density of the slot buttons and day headers. Defaults to `'md'`. */\n size?: SlotGridSize;\n /** Id of the currently selected slot (controlled). */\n selectedSlotId?: string;\n /**\n * Initial number of slots to render per day before the \"Show more\"\n * progressive-disclosure control collapses the rest. Defaults to `6`.\n */\n maxInitialSlotsPerDay?: number;\n /**\n * BCP-47 locale tag for `Intl.DateTimeFormat`. Defaults to the active\n * i18next language.\n */\n locale?: string;\n /** IANA time zone for `Intl.DateTimeFormat`. Optional. */\n timeZone?: string;\n /** Whether the \"previous days\" navigation arrow should be enabled. */\n hasPrevious?: boolean;\n /** Whether the \"next days\" navigation arrow should be enabled. */\n hasNext?: boolean;\n /**\n * When `true`, renders the \"Next available\" CTA at the end of the\n * toolbar. Only emits a callback — the consumer owns the navigation.\n */\n showNextAvailable?: boolean;\n /** Accessible label for the outer grid region. */\n ariaLabel?: string;\n /** Fires when the user selects an available slot. */\n onSlotSelect?: (slot: SlotGridSlot, day: SlotGridDay) => void;\n /** Fires when the user clicks the \"previous days\" arrow. */\n onPreviousDays?: () => void;\n /** Fires when the user clicks the \"next days\" arrow. */\n onNextDays?: () => void;\n /** Fires when the user clicks a day's \"Show more\" button. */\n onShowMore?: (day: SlotGridDay) => void;\n /** Fires when the user clicks the \"Next available\" CTA. */\n onJumpToNextAvailable?: () => void;\n}\n\n/**\n * Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.\n *\n * It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing\n * consumers are unaffected. The handle is built with `useMemo` and handed to\n * `useAgentRegistration`, the same shape Autocomplete uses.\n *\n * Every getter returns identifiers and structural state only — availability\n * slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).\n */\nexport interface SlotGridHandle {\n /** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */\n getStatus: () => SlotGridState;\n /** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */\n getSelectedSlotId: () => string | null;\n /** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */\n getVisibleDays: () => string[];\n /** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */\n getSlotsByDay: () => Record<string, string[]>;\n /** Day keys whose \"Show more\" control has been used. */\n getExpandedDays: () => string[];\n /** Mirrors the `hasPrevious` prop — whether an earlier window exists. */\n getHasPrevious: () => boolean;\n /** Mirrors the `hasNext` prop — whether a later window exists. */\n getHasNext: () => boolean;\n /** Select an available slot by id. Returns `false` when it cannot be selected. */\n selectSlot: (slotId: string) => boolean;\n /** Page the window forward. Returns `false` when the arrow would be disabled. */\n nextDays: () => boolean;\n /** Page the window back. Returns `false` when the arrow would be disabled. */\n previousDays: () => boolean;\n /** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */\n showMoreDay: (dayKey: string) => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst slotGridVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:w-full',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst toolbarVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n);\n\n/**\n * Column-count is dynamic (1–12), so it is declared as a full CVA variant —\n * this keeps every `grid-cols-N` string statically visible to Tailwind's\n * JIT and keeps the variant table inside CVA rather than hand-rolled.\n */\nconst COLS_MAX = 12;\n\nconst columnsVariants = cva(\n 'ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start',\n {\n variants: {\n cols: {\n 1: 'ds:grid-cols-1',\n 2: 'ds:grid-cols-2',\n 3: 'ds:grid-cols-3',\n 4: 'ds:grid-cols-4',\n 5: 'ds:grid-cols-5',\n 6: 'ds:grid-cols-6',\n 7: 'ds:grid-cols-7',\n 8: 'ds:grid-cols-8',\n 9: 'ds:grid-cols-9',\n 10: 'ds:grid-cols-10',\n 11: 'ds:grid-cols-11',\n 12: 'ds:grid-cols-12',\n },\n },\n defaultVariants: { cols: 1 },\n },\n);\n\ntype ColumnsCount = NonNullable<VariantProps<typeof columnsVariants>['cols']>;\n\nfunction clampCols(count: number): ColumnsCount {\n return Math.max(1, Math.min(count, COLS_MAX)) as ColumnsCount;\n}\n\nconst columnVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:bg-[var(--card)]',\n 'ds:min-w-0',\n ].join(' '),\n);\n\nconst dayHeaderVariants = cva(\n [\n 'ds:font-[var(--font-weight-semibold)]',\n 'ds:text-[var(--foreground)]',\n 'ds:text-start',\n 'ds:truncate',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-xs)]',\n md: 'ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst slotListVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none',\n);\n\nconst slotButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:w-full',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:bg-[var(--secondary)]',\n 'ds:shadow-[var(--shadow-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,color,box-shadow]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[var(--focus-ring-offset)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none',\n 'ds:hover:enabled:shadow-[var(--shadow-md)]',\n 'ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : parseISO(value);\n}\n\n/**\n * Internal identity for one rendered column. The index guards against a\n * consumer passing the same calendar date twice.\n */\nfunction columnKey(day: SlotGridDay, index: number): string {\n return `${toDate(day.date).toISOString()}-${index}`;\n}\n\n/**\n * Agent-facing key for one column — the local calendar date as `yyyy-MM-dd`.\n * Structural, locale-independent, and carries no patient data.\n */\nfunction dayKeyOf(day: SlotGridDay): string {\n return format(toDate(day.date), 'yyyy-MM-dd');\n}\n\n/** Is `a` the same calendar day as `b`? Uses `date-fns`, locale-agnostic. */\nexport function isSameDate(a: string | Date, b: string | Date): boolean {\n return isSameDay(toDate(a), toDate(b));\n}\n\n/** Find the first day in a list that has at least one available slot. */\nexport function findFirstAvailable(\n days: SlotGridDay[],\n): { day: SlotGridDay; slot: SlotGridSlot } | undefined {\n for (const day of days) {\n const slot = day.slots.find((s) => s.available !== false);\n if (slot) return { day, slot };\n }\n return undefined;\n}\n\nfunction formatDayHeader(\n date: Date,\n locale: string,\n timeZone?: string,\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n }).format(date);\n } catch {\n return new Intl.DateTimeFormat('en', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n}\n\nfunction formatSlotTime(\n slot: SlotGridSlot,\n locale: string,\n timeZone?: string,\n): string {\n if (slot.label !== undefined) return slot.label;\n const start = toDate(slot.start);\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n });\n if (slot.end) {\n const end = toDate(slot.end);\n if (typeof fmt.formatRange === 'function') {\n try {\n return fmt.formatRange(start, end);\n } catch {\n /* fall through */\n }\n }\n return `${fmt.format(start)} – ${fmt.format(end)}`;\n }\n return fmt.format(start);\n } catch {\n return start.toISOString();\n }\n}\n\nfunction formatSlotAriaLabel(\n slot: SlotGridSlot,\n day: SlotGridDay,\n locale: string,\n timeZone: string | undefined,\n template: (opts: { time: string; day: string }) => string,\n): string {\n if (slot.ariaLabel !== undefined) return slot.ariaLabel;\n const time = formatSlotTime(slot, locale, timeZone);\n const dayLabel =\n day.label !== undefined\n ? day.label\n : formatDayHeader(toDate(day.date), locale, timeZone);\n return template({ time, day: dayLabel });\n}\n\n/* ------------------------------------------------------------------ */\n/* Glyphs — logical-direction arrows */\n/* ------------------------------------------------------------------ */\n\nfunction ChevronStartIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n );\n}\n\nfunction ChevronEndIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SlotGrid = forwardRef<HTMLDivElement, SlotGridProps>(\n (\n {\n days,\n state = 'default',\n size = 'md',\n selectedSlotId,\n maxInitialSlotsPerDay = 6,\n locale: localeProp,\n timeZone,\n hasPrevious = false,\n hasNext = false,\n showNextAvailable = false,\n ariaLabel,\n onSlotSelect,\n onPreviousDays,\n onNextDays,\n onShowMore,\n onJumpToNextAvailable,\n className,\n id,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const locale = localeProp ?? i18n.language ?? 'en';\n const idBase = useId();\n\n const [expanded, setExpanded] = useState<Record<string, boolean>>({});\n\n const isLoading = state === 'loading';\n const isDisabled = state === 'disabled';\n const isInteractionSuppressed = isLoading || isDisabled;\n const isEmpty =\n state === 'empty' ||\n days.length === 0 ||\n days.every((day) => day.slots.length === 0);\n\n const resolvedAriaLabel = ariaLabel ?? t('slotGrid.ariaLabel');\n\n const handleSlotClick = useCallback(\n (slot: SlotGridSlot, day: SlotGridDay) => {\n if (isInteractionSuppressed) return;\n if (slot.available === false) return;\n onSlotSelect?.(slot, day);\n },\n [isInteractionSuppressed, onSlotSelect],\n );\n\n const handleShowMore = useCallback(\n (day: SlotGridDay, key: string) => {\n setExpanded((prev) => ({ ...prev, [key]: true }));\n onShowMore?.(day);\n },\n [onShowMore],\n );\n\n const handleSlotKeyDown = useCallback(\n (\n event: KeyboardEvent<HTMLButtonElement>,\n slot: SlotGridSlot,\n day: SlotGridDay,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSlotClick(slot, day);\n }\n },\n [handleSlotClick],\n );\n\n /* ---- Agent handle ---------------------------------------------- */\n /* `ref` stays the outer <div> (unchanged for consumers). The agent */\n /* handle is a separate, memo-stable object — the Autocomplete shape. */\n /* A snapshot ref mirrors props + internal state so the handle reads */\n /* fresh values without re-registering on every render. */\n\n const snapshot = {\n days,\n selectedSlotId,\n hasPrevious,\n hasNext,\n state,\n expanded,\n isInteractionSuppressed,\n onPreviousDays,\n onNextDays,\n handleSlotClick,\n handleShowMore,\n };\n const latest = useRef(snapshot);\n useEffect(() => {\n latest.current = snapshot;\n });\n\n const agentHandle = useMemo<SlotGridHandle>(\n () => ({\n getStatus: () => latest.current.state,\n getSelectedSlotId: () => latest.current.selectedSlotId ?? null,\n getVisibleDays: () => latest.current.days.map(dayKeyOf),\n getSlotsByDay: () => {\n // Ids only — never the slot objects (PRS §26 §7 / auditor A9).\n const byDay: Record<string, string[]> = {};\n for (const day of latest.current.days) {\n const key = dayKeyOf(day);\n const ids = day.slots\n .filter((slot) => slot.available !== false)\n .map((slot) => slot.id);\n byDay[key] = byDay[key] ? [...byDay[key], ...ids] : ids;\n }\n return byDay;\n },\n getExpandedDays: () =>\n latest.current.days\n .filter(\n (day, index) =>\n latest.current.expanded[columnKey(day, index)] === true,\n )\n .map(dayKeyOf),\n getHasPrevious: () => latest.current.hasPrevious,\n getHasNext: () => latest.current.hasNext,\n selectSlot: (slotId) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n for (const day of current.days) {\n const slot = day.slots.find((candidate) => candidate.id === slotId);\n if (!slot) continue;\n if (slot.available === false) return false;\n // Same code path as a native click on the slot button.\n current.handleSlotClick(slot, day);\n return true;\n }\n return false;\n },\n nextDays: () => {\n const current = latest.current;\n if (!current.hasNext || current.isInteractionSuppressed) return false;\n if (!current.onNextDays) return false;\n current.onNextDays();\n return true;\n },\n previousDays: () => {\n const current = latest.current;\n if (!current.hasPrevious || current.isInteractionSuppressed) {\n return false;\n }\n if (!current.onPreviousDays) return false;\n current.onPreviousDays();\n return true;\n },\n showMoreDay: (dayKey) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n const index = current.days.findIndex(\n (day) => dayKeyOf(day) === dayKey,\n );\n if (index < 0) return false;\n const day = current.days[index];\n current.handleShowMore(day, columnKey(day, index));\n return true;\n },\n }),\n [],\n );\n\n useAgentRegistration(slotGridAgent, agentHandle, id);\n\n const columnCount = clampCols(days.length || 1);\n const columnsClass = columnsVariants({ cols: columnCount });\n\n /* ---- Rendered content ------------------------------------------ */\n\n let body: ReactNode;\n if (isLoading) {\n body = (\n <div\n className={columnsClass}\n data-state=\"loading\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t('common.loading')}\n >\n {Array.from({ length: columnCount }, (_, colIdx) => (\n <div key={`loading-col-${colIdx}`} className={columnVariants()}>\n <Skeleton variant=\"text\" size={size} width=\"60%\" />\n <div className={slotListVariants()}>\n {Array.from(\n { length: Math.min(maxInitialSlotsPerDay, 4) },\n (_, rowIdx) => (\n <Skeleton\n key={`loading-slot-${colIdx}-${rowIdx}`}\n variant=\"rounded\"\n size={size}\n height=\"40px\"\n />\n ),\n )}\n </div>\n </div>\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div data-state=\"empty\">\n <EmptyState variant=\"no-results\" title={t('slotGrid.noSlots')} />\n </div>\n );\n } else {\n body = (\n <div\n className={columnsClass}\n data-state={isDisabled ? 'disabled' : 'default'}\n >\n {days.map((day, dayIdx) => {\n const dayKey = columnKey(day, dayIdx);\n const headerLabel =\n day.label ?? formatDayHeader(toDate(day.date), locale, timeZone);\n const headerId = `${idBase}-day-${dayIdx}-header`;\n const isExpanded = expanded[dayKey] ?? false;\n const visibleSlots = isExpanded\n ? day.slots\n : day.slots.slice(0, maxInitialSlotsPerDay);\n const hiddenCount = day.slots.length - visibleSlots.length;\n\n const isDayEmpty = day.slots.length === 0;\n\n return (\n // Use a plain <div role=\"group\"> rather than <section> — a\n // <section> with aria-labelledby is a landmark, and nesting many\n // landmarks inside the outer slot-grid landmark fails axe's\n // landmark-unique rule.\n <div\n key={dayKey}\n role=\"group\"\n className={columnVariants()}\n aria-labelledby={headerId}\n data-empty={isDayEmpty || undefined}\n >\n <h3 id={headerId} className={dayHeaderVariants({ size })}>\n {headerLabel}\n </h3>\n {isDayEmpty ? (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0\">\n {t('slotGrid.noSlots')}\n </p>\n ) : null}\n <ul className={slotListVariants()}>\n {visibleSlots.map((slot) => {\n const ariaLabelSlot = formatSlotAriaLabel(\n slot,\n day,\n locale,\n timeZone,\n ({ time, day: dayLabel }) =>\n t('slotGrid.slotLabel', { time, day: dayLabel }),\n );\n const isSelected = selectedSlotId === slot.id;\n const isSlotDisabled =\n slot.available === false || isInteractionSuppressed;\n return (\n <li key={slot.id}>\n <button\n type=\"button\"\n className={slotButtonVariants({ size })}\n aria-label={ariaLabelSlot}\n aria-pressed={isSelected}\n disabled={isSlotDisabled}\n aria-disabled={isSlotDisabled || undefined}\n data-slot-id={slot.id}\n onClick={() => handleSlotClick(slot, day)}\n onKeyDown={(event) =>\n handleSlotKeyDown(event, slot, day)\n }\n >\n {formatSlotTime(slot, locale, timeZone)}\n </button>\n </li>\n );\n })}\n </ul>\n {hiddenCount > 0 ? (\n <Button\n intent=\"ghost\"\n size={size === 'lg' ? 'md' : 'sm'}\n onClick={() => handleShowMore(day, dayKey)}\n disabled={isInteractionSuppressed}\n >\n {t('slotGrid.showMore', { count: hiddenCount })}\n </Button>\n ) : null}\n </div>\n );\n })}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n id={id}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n className={slotGridVariants({ size, className })}\n data-component=\"slot-grid\"\n data-component-id={id}\n data-state={state}\n {...rest}\n >\n <div className={toolbarVariants()}>\n <IconButton\n icon={<ChevronStartIcon />}\n aria-label={t('slotGrid.previousDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasPrevious || isInteractionSuppressed}\n onClick={onPreviousDays}\n />\n {showNextAvailable ? (\n <Button\n intent=\"secondary\"\n size={size === 'lg' ? 'md' : 'sm'}\n disabled={isInteractionSuppressed}\n onClick={onJumpToNextAvailable}\n >\n {t('slotGrid.nextAvailable')}\n </Button>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n <IconButton\n icon={<ChevronEndIcon />}\n aria-label={t('slotGrid.nextDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasNext || isInteractionSuppressed}\n onClick={onNextDays}\n />\n </div>\n\n {body}\n </div>\n );\n },\n);\n\nSlotGrid.displayName = 'SlotGrid';\n"],"names":["slotGridAgent","handle","args","slotGridVariants","cva","toolbarVariants","COLS_MAX","columnsVariants","clampCols","count","columnVariants","dayHeaderVariants","slotListVariants","slotButtonVariants","toDate","value","parseISO","columnKey","day","index","dayKeyOf","format","isSameDate","a","b","isSameDay","findFirstAvailable","days","slot","s","formatDayHeader","date","locale","timeZone","formatSlotTime","start","fmt","end","formatSlotAriaLabel","template","time","dayLabel","ChevronStartIcon","jsx","ChevronEndIcon","SlotGrid","forwardRef","state","size","selectedSlotId","maxInitialSlotsPerDay","localeProp","hasPrevious","hasNext","showNextAvailable","ariaLabel","onSlotSelect","onPreviousDays","onNextDays","onShowMore","onJumpToNextAvailable","className","id","rest","ref","t","i18n","useTranslation","idBase","useId","expanded","setExpanded","useState","isLoading","isDisabled","isInteractionSuppressed","isEmpty","resolvedAriaLabel","handleSlotClick","useCallback","handleShowMore","key","prev","handleSlotKeyDown","event","snapshot","latest","useRef","useEffect","agentHandle","useMemo","byDay","ids","slotId","current","candidate","dayKey","useAgentRegistration","columnCount","columnsClass","body","_","colIdx","jsxs","Skeleton","rowIdx","EmptyState","dayIdx","headerLabel","headerId","visibleSlots","hiddenCount","isDayEmpty","ariaLabelSlot","isSelected","isSlotDisabled","Button","IconButton"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWJ,cAAc,CAAC,QAAQ,kBAAkB,QAAQ;AAAA,EACjD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,kBAAA;AAAA,IAAkB;AAAA,IAE7C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MA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QAC/C,kBAAe;AAAA,QACf,qBAAmBC;AAAA,QACnB,cAAYf;AAAA,QACX,GAAGgB;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAwC,EAAC,OAAA,EAAI,WAAWlG,GAAA,GACd,UAAA;AAAA,YAAA,gBAAAsC;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAO3E,IAAA,EAAiB;AAAA,gBACxB,cAAYuB,EAAE,uBAAuB;AAAA,gBACrC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACI,KAAeuB;AAAA,gBAC1B,SAASlB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEVH,IACC,gBAAAX;AAAA,cAACyE;AAAA,cAAA;AAAA,gBACC,QAAO;AAAA,gBACP,MAAMpE,MAAS,OAAO,OAAO;AAAA,gBAC7B,UAAU2B;AAAA,gBACV,SAASf;AAAA,gBAER,YAAE,wBAAwB;AAAA,cAAA;AAAA,YAAA,IAG7B,gBAAAjB,EAAC,QAAA,EAAK,eAAY,OAAA,CAAO;AAAA,YAE3B,gBAAAA;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAOzE,IAAA,EAAe;AAAA,gBACtB,cAAYqB,EAAE,mBAAmB;AAAA,gBACjC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACK,KAAWsB;AAAA,gBACtB,SAASjB;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAEC0C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvD,GAAS,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"social-sign-in-button-dlpPI5l7.js","sources":["../../src/brand/provider-marks/apple.tsx","../../src/brand/provider-marks/google.tsx","../../src/components/social-sign-in-button/social-sign-in-button.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Apple brand mark — \"Sign in with Apple\". */\n/* */\n/* Lives under src/brand/** (the sanctioned hex-literal exception zone */\n/* per CLAUDE.md §2) alongside the Google mark, even though this glyph */\n/* is single-colour and follows `currentColor`. Keeping both provider */\n/* marks in one folder gives token-auditor a single brand path to reason */\n/* about and matches the WhatsAppButton inline-glyph precedent. */\n/* */\n/* Per Apple Human Interface Guidelines the Apple logo is a single-colour */\n/* mark that inherits the button's text colour: black on a white (light) */\n/* surface, white on a black (dark) surface. We paint it with */\n/* `fill=\"currentColor\"` so the consuming button's foreground token */\n/* drives the colour from one CVA class — never recolour the Apple logo */\n/* to a brand hue (HIG forbids it). The mark is decorative: the visible */\n/* localized \"Sign in with Apple\" text is the accessible name, so the */\n/* SVG carries `aria-hidden=\"true\"` and the button announces only its */\n/* text label. */\n/* -------------------------------------------------------------------- */\n\nimport type { ReactNode } from 'react';\n\nexport interface ProviderMarkProps {\n /** Forwarded to the root `<svg>` for size / colour utility classes. */\n className?: string;\n}\n\n/**\n * The Apple logo glyph. Single path, `currentColor` fill so it follows\n * the button foreground across light / dark appearances and all four kit\n * themes. Decorative — `aria-hidden`.\n */\nexport function AppleMark({ className }: ProviderMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M17.05 12.536c-.024-2.51 2.05-3.715 2.143-3.774-1.168-1.708-2.985-1.942-3.63-1.967-1.546-.157-3.018.91-3.802.91-.783 0-1.99-.888-3.273-.864-1.684.025-3.236.978-4.102 2.485-1.748 3.03-.448 7.513 1.255 9.97.832 1.203 1.825 2.552 3.127 2.504 1.255-.05 1.73-.81 3.247-.81 1.518 0 1.945.81 3.273.786 1.351-.025 2.206-1.227 3.03-2.434.955-1.394 1.348-2.745 1.372-2.815-.03-.013-2.633-1.01-2.66-4.001m-2.48-7.343c.692-.838 1.158-2.002 1.03-3.163-.997.04-2.205.664-2.92 1.502-.64.742-1.2 1.927-1.05 3.066 1.112.086 2.247-.566 2.94-1.405\" />\n </svg>\n );\n}\n","/* -------------------------------------------------------------------- */\n/* Google brand mark — \"Sign in with Google\". */\n/* */\n/* Lives under src/brand/** — the ONLY zone where hex-colour literals are */\n/* permitted (CLAUDE.md §2). The Google \"G\" is a FIXED four-colour mark */\n/* that Google Identity Services brand guidelines forbid recolouring: */\n/* blue #4285F4 */\n/* red #EA4335 */\n/* yellow #FBBC05 */\n/* green #34A853 */\n/* These literals are therefore mandatory and intentional — they MUST NOT */\n/* be swapped for tokens or `currentColor`, and they MUST NOT shift across */\n/* the four kit themes or between light/dark button appearances. The mark */\n/* is rendered on a white tile (see SocialSignInButton) on coloured */\n/* surfaces, per GIS guidance, so the colours always read. */\n/* */\n/* The mark is decorative: the visible localized \"Sign in with Google\" */\n/* text is the accessible name, so the SVG carries `aria-hidden=\"true\"` */\n/* and screen readers never announce the individual colour paths. */\n/* -------------------------------------------------------------------- */\n\nimport type { ReactNode } from 'react';\n\nexport interface ProviderMarkProps {\n /** Forwarded to the root `<svg>` for size utility classes. */\n className?: string;\n}\n\n/**\n * The Google \"G\" glyph — the canonical Google Identity Services asset.\n * Four hardcoded brand hues (blue / red / yellow / green) that brand\n * guidelines forbid altering; this is why the file lives under\n * src/brand/** and not src/components/**. Decorative — `aria-hidden`.\n */\nexport function GoogleMark({ className }: ProviderMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n {/* Brand-mandated fixed colours — do NOT tokenise (GIS guidelines). */}\n <path\n fill=\"#4285F4\"\n d=\"M23.52 12.273c0-.851-.076-1.67-.218-2.455H12v4.642h6.458a5.52 5.52 0 0 1-2.394 3.622v3.01h3.878c2.269-2.09 3.578-5.166 3.578-8.819z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M12 24c3.24 0 5.956-1.075 7.942-2.908l-3.878-3.01c-1.075.72-2.45 1.146-4.064 1.146-3.125 0-5.77-2.11-6.714-4.946H1.276v3.106A11.995 11.995 0 0 0 12 24z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M5.286 14.282A7.213 7.213 0 0 1 4.91 12c0-.792.136-1.562.376-2.282V6.612H1.276A11.995 11.995 0 0 0 0 12c0 1.936.464 3.768 1.276 5.388l4.01-3.106z\"\n />\n <path\n fill=\"#EA4335\"\n d=\"M12 4.773c1.762 0 3.344.605 4.589 1.794l3.442-3.442C17.951 1.19 15.235 0 12 0A11.995 11.995 0 0 0 1.276 6.612l4.01 3.106C6.23 6.882 8.875 4.773 12 4.773z\"\n />\n </svg>\n );\n}\n","/* -------------------------------------------------------------------- */\n/* SocialSignInButton — brand-compliant provider sign-in (Apple, Google). */\n/* */\n/* Rendered as a REAL native <button> (forwardRef<HTMLButtonElement>) — */\n/* shown as secondary passwordless options beneath the primary email-OTP */\n/* in patient check-in (HTP-5104). One component, a CVA `provider` axis */\n/* (apple | google, designed to grow), each carrying its official inline */\n/* brand mark and brand surface: */\n/* */\n/* - Apple HIG: light = white button + black logo/text; */\n/* dark = black button + white logo/text. The Apple mark */\n/* follows `currentColor`. */\n/* - Google Identity Services: light = white/neutral button + grey */\n/* text; dark = Google-blue button + white text. The fixed */\n/* 4-colour \"G\" never recolours and sits on a white tile on */\n/* the dark (coloured) surface per GIS guidance. */\n/* */\n/* This mirrors WhatsAppButton's brand-token EXCEPTION pattern: */\n/* `--brand-apple-*` / `--brand-google-*` tokens live in */\n/* src/tokens/index.css across all four themes, and the brand marks ship */\n/* as inline SVGs under src/brand/provider-marks/ (the sanctioned hex */\n/* zone for Google's mandated colours). It also mirrors */\n/* SignInWithAlfadocsButton's provider-button shape: i18n default label, */\n/* Spinner-on-loading, aria-busy, and the bfcache `pageshow` listener that */\n/* fires `onLoadingCancelled` when the user returns from the IDP via the */\n/* browser back button. */\n/* */\n/* Presentation only: it renders the brand-correct trigger and exposes */\n/* onClick — the consuming auth pattern wires the actual OAuth/OIDC */\n/* redirect. `asChild` is intentionally NOT supported (brand guidelines */\n/* require a real button and forbid wrapping the mark in arbitrary link */\n/* chrome). `type` defaults to 'button' so it never implicitly submits an */\n/* ambient form. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useRef,\n type ButtonHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Spinner } from '../spinner';\nimport { AppleMark } from '../../brand/provider-marks/apple';\nimport { GoogleMark } from '../../brand/provider-marks/google';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rootVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:items-center ds:justify-center',\n 'ds:font-medium ds:whitespace-nowrap',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:border ds:border-solid',\n 'ds:active:opacity-90',\n 'ds:transition-[background-color,box-shadow,opacity]',\n 'ds:duration-[var(--animation-duration)]',\n // Focus ring is `var(--ring)` (the kit primary), NEVER the brand\n // surface colour — painting the ring in the brand hue on a brand\n // surface makes it invisible. Same rule WhatsAppButton codifies.\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 // Windows High Contrast Mode strips brand fills — repaint a solid\n // border edge + swap the focus ring to CanvasText so the affordance\n // stays identifiable.\n 'ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'ds:aria-busy:cursor-wait',\n 'ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n provider: {\n apple: '',\n google: '',\n },\n appearance: {\n light: '',\n dark: '',\n },\n size: {\n // Heights mirror Button (sm 32 / md 40 / lg 48). `sm` (32px) and\n // `md` (40px) both fall below `--min-target-size` (44 base / 48\n // accessible), so each adds the ::before pseudo-element touch-\n // target expansion to reach the minimum on mobile, collapsing\n // above the `sm:` breakpoint. This component is the patient\n // check-in (HTP-5104) mobile sign-in surface and `md` is the\n // DEFAULT size rendered there, so it MUST meet WCAG 2.5.5 at both\n // theme levels — unlike Button/WhatsApp, we do not leave md short.\n // `lg` (48px) already meets the minimum natively.\n sm: [\n 'ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)] ds:[&_svg]:size-4',\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n md: [\n 'ds:h-10 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-base)] ds:[&_svg]:size-5',\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n lg: 'ds:h-12 ds:ps-5 ds:pe-5 ds:text-[length:var(--font-size-lg)] ds:[&_svg]:size-6',\n },\n },\n compoundVariants: [\n /* Apple — light: white surface, black logo + text. */\n {\n provider: 'apple',\n appearance: 'light',\n class:\n 'ds:bg-[var(--brand-apple-light)] ds:text-[var(--brand-apple-light-foreground)] ds:border-[var(--brand-apple-light-border)] ds:hover:bg-[var(--brand-apple-light-hover)]',\n },\n /* Apple — dark: black surface, white logo + text. */\n {\n provider: 'apple',\n appearance: 'dark',\n class:\n 'ds:bg-[var(--brand-apple-dark)] ds:text-[var(--brand-apple-dark-foreground)] ds:border-[var(--brand-apple-dark)] ds:hover:bg-[var(--brand-apple-dark-hover)]',\n },\n /* Google — light: white/neutral surface, grey text. */\n {\n provider: 'google',\n appearance: 'light',\n class:\n 'ds:bg-[var(--brand-google-light)] ds:text-[var(--brand-google-light-foreground)] ds:border-[var(--brand-google-light-border)] ds:hover:bg-[var(--brand-google-light-hover)]',\n },\n /* Google — dark: Google-blue surface, white text. */\n {\n provider: 'google',\n appearance: 'dark',\n class:\n 'ds:bg-[var(--brand-google-dark)] ds:text-[var(--brand-google-dark-foreground)] ds:border-[var(--brand-google-dark)] ds:hover:bg-[var(--brand-google-dark-hover)]',\n },\n ],\n defaultVariants: {\n appearance: 'light',\n size: 'md',\n },\n },\n);\n\n/* The loading Spinner stands in for the brand mark, so it must occupy the\n SAME footprint (the button's `[&_svg]:size-4/5/6` = 16/20/24px). The\n Spinner's own size ramp is one step smaller (sm/md/lg = 12/16/20px), so\n we bump it one step and wrap it in a size-matched box; without this the\n spinner is ~4px smaller than the glyph it replaces and the button jumps\n on load. `lg` button → `lg` spinner (20px) inside a 24px box that the\n button's `[&_svg]:size-6` then drives via the inner svg. */\nconst SPINNER_SIZE: Record<\n NonNullable<VariantProps<typeof rootVariants>['size']>,\n 'sm' | 'md' | 'lg'\n> = {\n sm: 'md',\n md: 'lg',\n lg: 'lg',\n};\n\nconst spinnerBoxVariants = cva(\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n {\n variants: {\n size: {\n sm: 'ds:size-4',\n md: 'ds:size-5',\n lg: 'ds:size-6',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* The Google mark on a coloured (dark) surface sits inside a white tile\n per Google Identity Services guidance, so the 4-colour G always reads.\n On the light/neutral surface it sits directly on the button. The tile\n is a presentational chrome detail (not the mandated mark), so it uses\n tokens. */\nconst googleTileVariants = cva(\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n {\n variants: {\n appearance: {\n light: '',\n dark: 'ds:rounded-[var(--radius-sm)] ds:bg-[var(--brand-google-tile)]',\n },\n size: {\n sm: 'ds:[&_svg]:size-4',\n md: 'ds:[&_svg]:size-5',\n lg: 'ds:[&_svg]:size-6',\n },\n },\n compoundVariants: [\n { appearance: 'dark', size: 'sm', class: 'ds:p-1' },\n { appearance: 'dark', size: 'md', class: 'ds:p-1.5' },\n { appearance: 'dark', size: 'lg', class: 'ds:p-2' },\n ],\n defaultVariants: { appearance: 'light', size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport type SocialSignInProvider = 'apple' | 'google';\n\n/**\n * Brand surface variant — independent of the kit theme. Apple HIG:\n * `light` = white button + black mark/text, `dark` = black button +\n * white mark/text. Google: `light` = white/neutral button, `dark` =\n * Google-blue button. Pick the appearance that contrasts with your\n * auth-card background; do NOT bind it to `useTheme()`. Defaults to\n * `'light'`. Derived from `rootVariants` so the prop union tracks the\n * CVA option list automatically.\n */\nexport type SocialSignInAppearance = NonNullable<\n VariantProps<typeof rootVariants>['appearance']\n>;\n\n/** Button size. Defaults to `'md'`. Derived from `rootVariants`. */\nexport type SocialSignInSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n\nexport interface SocialSignInButtonProps\n extends\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n Omit<VariantProps<typeof rootVariants>, 'provider'> {\n /**\n * Which identity provider this button represents. Drives the brand\n * mark, the surface colour token, and the default i18n verb + name.\n * Designed extensible — the union and the CVA option list grow\n * together when a new provider (e.g. `'microsoft'`) is added.\n */\n provider: SocialSignInProvider;\n /**\n * Swaps the brand mark for the kit Spinner (size-matched), sets\n * `aria-busy='true'`, and disables the button so the user cannot\n * double-submit the OAuth redirect. The label stays visible.\n */\n loading?: boolean;\n /**\n * Override the visible label. When omitted, reads\n * `socialSignInButton.<provider>` (\"Sign in with Apple\" / \"Sign in\n * with Google\"). Override only to switch the verb to \"Continue with\"\n * — never for marketing copy, and the provider NAME (\"Apple\" /\n * \"Google\") must stay verbatim per brand rules.\n */\n label?: ReactNode;\n /**\n * Fired when the component detects the user cancelled an in-flight\n * sign-in — typically by pressing browser back after the OAuth\n * redirect, which restores the page from bfcache with `loading` still\n * true. Wire this to your loading-state setter so the button returns\n * to idle. Only fires when `loading` is currently true; never on first\n * mount. Mirrors SignInWithAlfadocsButton — the component does not\n * reset state it doesn't own.\n */\n onLoadingCancelled?: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* SocialSignInButton */\n/* ------------------------------------------------------------------ */\n\nexport const SocialSignInButton = forwardRef<\n HTMLButtonElement,\n SocialSignInButtonProps\n>(\n (\n {\n provider,\n appearance = 'light',\n size = 'md',\n loading = false,\n disabled,\n label,\n onLoadingCancelled,\n type = 'button',\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n // VariantProps types size/appearance as nullable; the destructure\n // default only narrows `undefined`. Normalise to a non-null value\n // before indexing the spinner-size map and box variant.\n const resolvedSize: SocialSignInSize = size ?? 'md';\n // Default label resolves from the provider key. The provider NAME is\n // a brand constant carried verbatim by the translation value.\n const resolvedLabel = label ?? t(`socialSignInButton.${provider}`);\n\n // Stash latest values in refs so the `pageshow` listener reads them\n // without re-binding on every render. One listener for the lifetime.\n const loadingRef = useRef(loading);\n const onCancelRef = useRef(onLoadingCancelled);\n loadingRef.current = loading;\n onCancelRef.current = onLoadingCancelled;\n\n useEffect(() => {\n const onPageShow = (event: PageTransitionEvent) => {\n // `event.persisted` is true when the page was restored from the\n // back/forward cache — the canonical \"user navigated away and\n // came back without a fresh load\" signal. If the button still\n // thinks it's loading, an OAuth redirect was started but never\n // completed.\n if (event.persisted && loadingRef.current && onCancelRef.current) {\n onCancelRef.current();\n }\n };\n window.addEventListener('pageshow', onPageShow);\n return () => window.removeEventListener('pageshow', onPageShow);\n }, []);\n\n const composedClassName = [\n rootVariants({ provider, appearance, size }),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // The mark sits at the inline-start; it does NOT mirror in RTL\n // (a logo is not a directional glyph). Logical `gap`/`ps`/`pe` keep\n // the layout direction-correct without flipping the mark itself.\n const mark =\n provider === 'apple' ? (\n <AppleMark className=\"ds:shrink-0\" />\n ) : appearance === 'dark' ? (\n <span className={googleTileVariants({ appearance, size })}>\n <GoogleMark />\n </span>\n ) : (\n <GoogleMark className=\"ds:shrink-0\" />\n );\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n data-component=\"social-sign-in-button\"\n data-provider={provider}\n data-appearance={appearance}\n className={composedClassName}\n {...props}\n >\n {loading ? (\n <span className={spinnerBoxVariants({ size: resolvedSize })}>\n <Spinner\n size={SPINNER_SIZE[resolvedSize]}\n variant=\"pulse\"\n className=\"ds:size-full\"\n label={t('socialSignInButton.loading')}\n />\n </span>\n ) : (\n mark\n )}\n <span>{resolvedLabel}</span>\n </button>\n );\n },\n);\n\nSocialSignInButton.displayName = 'SocialSignInButton';\n"],"names":["AppleMark","className","jsx","GoogleMark","jsxs","rootVariants","cva","SPINNER_SIZE","spinnerBoxVariants","googleTileVariants","SocialSignInButton","forwardRef","provider","appearance","size","loading","disabled","label","onLoadingCancelled","type","props","ref","useTranslation","resolvedSize","resolvedLabel","loadingRef","useRef","onCancelRef","useEffect","onPageShow","event","composedClassName","mark","Spinner"],"mappings":";;;;;AAgCO,SAASA,EAAU,EAAE,WAAAC,KAA2C;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,WAAAD;AAAA,MAEA,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,mhBAAA,CAAmhB;AAAA,IAAA;AAAA,EAAA;AAGjiB;ACXO,SAASC,EAAW,EAAE,WAAAF,KAA2C;AACtE,SACE,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,WAAAH;A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AAA,QACjB,WAAWkB;AAAA,QACV,GAAGX;AAAA,QAEH,UAAA;AAAA,UAAAL,IACC,gBAAAb,EAAC,UAAK,WAAWM,EAAmB,EAAE,MAAMe,EAAA,CAAc,GACxD,UAAA,gBAAArB;AAAA,YAAC+B;AAAA,YAAA;AAAA,cACC,MAAM1B,EAAagB,CAAY;AAAA,cAC/B,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,OAAO,EAAE,4BAA4B;AAAA,YAAA;AAAA,UAAA,GAEzC,IAEAS;AAAA,UAEF,gBAAA9B,EAAC,UAAM,UAAAsB,EAAA,CAAc;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG3B;AACF;AAEAd,EAAmB,cAAc;"}
1
+ {"version":3,"file":"social-sign-in-button-dlpPI5l7.js","sources":["../../src/brand/provider-marks/apple.tsx","../../src/brand/provider-marks/google.tsx","../../src/components/social-sign-in-button/social-sign-in-button.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Apple brand mark — \"Sign in with Apple\". */\n/* */\n/* Lives under src/brand/** (the sanctioned hex-literal exception zone */\n/* per CLAUDE.md §2) alongside the Google mark, even though this glyph */\n/* is single-colour and follows `currentColor`. Keeping both provider */\n/* marks in one folder gives token-auditor a single brand path to reason */\n/* about and matches the WhatsAppButton inline-glyph precedent. */\n/* */\n/* Per Apple Human Interface Guidelines the Apple logo is a single-colour */\n/* mark that inherits the button's text colour: black on a white (light) */\n/* surface, white on a black (dark) surface. We paint it with */\n/* `fill=\"currentColor\"` so the consuming button's foreground token */\n/* drives the colour from one CVA class — never recolour the Apple logo */\n/* to a brand hue (HIG forbids it). The mark is decorative: the visible */\n/* localized \"Sign in with Apple\" text is the accessible name, so the */\n/* SVG carries `aria-hidden=\"true\"` and the button announces only its */\n/* text label. */\n/* -------------------------------------------------------------------- */\n\nimport type { ReactNode } from 'react';\n\nexport interface ProviderMarkProps {\n /** Forwarded to the root `<svg>` for size / colour utility classes. */\n className?: string;\n}\n\n/**\n * The Apple logo glyph. Single path, `currentColor` fill so it follows\n * the button foreground across light / dark appearances and all four kit\n * themes. Decorative — `aria-hidden`.\n */\nexport function AppleMark({ className }: ProviderMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M17.05 12.536c-.024-2.51 2.05-3.715 2.143-3.774-1.168-1.708-2.985-1.942-3.63-1.967-1.546-.157-3.018.91-3.802.91-.783 0-1.99-.888-3.273-.864-1.684.025-3.236.978-4.102 2.485-1.748 3.03-.448 7.513 1.255 9.97.832 1.203 1.825 2.552 3.127 2.504 1.255-.05 1.73-.81 3.247-.81 1.518 0 1.945.81 3.273.786 1.351-.025 2.206-1.227 3.03-2.434.955-1.394 1.348-2.745 1.372-2.815-.03-.013-2.633-1.01-2.66-4.001m-2.48-7.343c.692-.838 1.158-2.002 1.03-3.163-.997.04-2.205.664-2.92 1.502-.64.742-1.2 1.927-1.05 3.066 1.112.086 2.247-.566 2.94-1.405\" />\n </svg>\n );\n}\n","/* -------------------------------------------------------------------- */\n/* Google brand mark — \"Sign in with Google\". */\n/* */\n/* Lives under src/brand/** — the ONLY zone where hex-colour literals are */\n/* permitted (CLAUDE.md §2). The Google \"G\" is a FIXED four-colour mark */\n/* that Google Identity Services brand guidelines forbid recolouring: */\n/* blue #4285F4 */\n/* red #EA4335 */\n/* yellow #FBBC05 */\n/* green #34A853 */\n/* These literals are therefore mandatory and intentional — they MUST NOT */\n/* be swapped for tokens or `currentColor`, and they MUST NOT shift across */\n/* the four kit themes or between light/dark button appearances. The mark */\n/* is rendered on a white tile (see SocialSignInButton) on coloured */\n/* surfaces, per GIS guidance, so the colours always read. */\n/* */\n/* The mark is decorative: the visible localized \"Sign in with Google\" */\n/* text is the accessible name, so the SVG carries `aria-hidden=\"true\"` */\n/* and screen readers never announce the individual colour paths. */\n/* -------------------------------------------------------------------- */\n\nimport type { ReactNode } from 'react';\n\nexport interface ProviderMarkProps {\n /** Forwarded to the root `<svg>` for size utility classes. */\n className?: string;\n}\n\n/**\n * The Google \"G\" glyph — the canonical Google Identity Services asset.\n * Four hardcoded brand hues (blue / red / yellow / green) that brand\n * guidelines forbid altering; this is why the file lives under\n * src/brand/** and not src/components/**. Decorative — `aria-hidden`.\n */\nexport function GoogleMark({ className }: ProviderMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n {/* Brand-mandated fixed colours — do NOT tokenise (GIS guidelines). */}\n <path\n fill=\"#4285F4\"\n d=\"M23.52 12.273c0-.851-.076-1.67-.218-2.455H12v4.642h6.458a5.52 5.52 0 0 1-2.394 3.622v3.01h3.878c2.269-2.09 3.578-5.166 3.578-8.819z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M12 24c3.24 0 5.956-1.075 7.942-2.908l-3.878-3.01c-1.075.72-2.45 1.146-4.064 1.146-3.125 0-5.77-2.11-6.714-4.946H1.276v3.106A11.995 11.995 0 0 0 12 24z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M5.286 14.282A7.213 7.213 0 0 1 4.91 12c0-.792.136-1.562.376-2.282V6.612H1.276A11.995 11.995 0 0 0 0 12c0 1.936.464 3.768 1.276 5.388l4.01-3.106z\"\n />\n <path\n fill=\"#EA4335\"\n d=\"M12 4.773c1.762 0 3.344.605 4.589 1.794l3.442-3.442C17.951 1.19 15.235 0 12 0A11.995 11.995 0 0 0 1.276 6.612l4.01 3.106C6.23 6.882 8.875 4.773 12 4.773z\"\n />\n </svg>\n );\n}\n","/* -------------------------------------------------------------------- */\n/* SocialSignInButton — brand-compliant provider sign-in (Apple, Google). */\n/* */\n/* Rendered as a REAL native <button> (forwardRef<HTMLButtonElement>) — */\n/* shown as secondary passwordless options beneath the primary email-OTP */\n/* in patient check-in (HTP-5104). One component, a CVA `provider` axis */\n/* (apple | google, designed to grow), each carrying its official inline */\n/* brand mark and brand surface: */\n/* */\n/* - Apple HIG: light = white button + black logo/text; */\n/* dark = black button + white logo/text. The Apple mark */\n/* follows `currentColor`. */\n/* - Google Identity Services: light = white/neutral button + grey */\n/* text; dark = Google-blue button + white text. The fixed */\n/* 4-colour \"G\" never recolours and sits on a white tile on */\n/* the dark (coloured) surface per GIS guidance. */\n/* */\n/* This mirrors WhatsAppButton's brand-token EXCEPTION pattern: */\n/* `--brand-apple-*` / `--brand-google-*` tokens live in */\n/* src/tokens/index.css across all four themes, and the brand marks ship */\n/* as inline SVGs under src/brand/provider-marks/ (the sanctioned hex */\n/* zone for Google's mandated colours). It also mirrors */\n/* SignInWithAlfadocsButton's provider-button shape: i18n default label, */\n/* Spinner-on-loading, aria-busy, and the bfcache `pageshow` listener that */\n/* fires `onLoadingCancelled` when the user returns from the IDP via the */\n/* browser back button. */\n/* */\n/* Presentation only: it renders the brand-correct trigger and exposes */\n/* onClick — the consuming auth pattern wires the actual OAuth/OIDC */\n/* redirect. `asChild` is intentionally NOT supported (brand guidelines */\n/* require a real button and forbid wrapping the mark in arbitrary link */\n/* chrome). `type` defaults to 'button' so it never implicitly submits an */\n/* ambient form. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useRef,\n type ButtonHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Spinner } from '../spinner';\nimport { AppleMark } from '../../brand/provider-marks/apple';\nimport { GoogleMark } from '../../brand/provider-marks/google';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rootVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:items-center ds:justify-center',\n 'ds:font-medium ds:whitespace-nowrap',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:border ds:border-solid',\n 'ds:active:opacity-90',\n 'ds:transition-[background-color,box-shadow,opacity]',\n 'ds:duration-[var(--animation-duration)]',\n // Focus ring is `var(--ring)` (the kit primary), NEVER the brand\n // surface colour — painting the ring in the brand hue on a brand\n // surface makes it invisible. Same rule WhatsAppButton codifies.\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 // Windows High Contrast Mode strips brand fills — repaint a solid\n // border edge + swap the focus ring to CanvasText so the affordance\n // stays identifiable.\n 'ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'ds:aria-busy:cursor-wait',\n 'ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n provider: {\n apple: '',\n google: '',\n },\n appearance: {\n light: '',\n dark: '',\n },\n size: {\n // Heights mirror Button (sm 32 / md 40 / lg 48). `sm` (32px) and\n // `md` (40px) both fall below `--min-target-size` (44 base / 48\n // accessible), so each adds the ::before pseudo-element touch-\n // target expansion to reach the minimum on mobile, collapsing\n // above the `sm:` breakpoint. This component is the patient\n // check-in (HTP-5104) mobile sign-in surface and `md` is the\n // DEFAULT size rendered there, so it MUST meet WCAG 2.5.5 at both\n // theme levels — unlike Button/WhatsApp, we do not leave md short.\n // `lg` (48px) already meets the minimum natively.\n sm: [\n 'ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)] ds:[&_svg]:size-4',\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n md: [\n 'ds:h-10 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-base)] ds:[&_svg]:size-5',\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n lg: 'ds:h-12 ds:ps-5 ds:pe-5 ds:text-[length:var(--font-size-lg)] ds:[&_svg]:size-6',\n },\n },\n compoundVariants: [\n /* Apple — light: white surface, black logo + text. */\n {\n provider: 'apple',\n appearance: 'light',\n class:\n 'ds:bg-[var(--brand-apple-light)] ds:text-[var(--brand-apple-light-foreground)] ds:border-[var(--brand-apple-light-border)] ds:hover:bg-[var(--brand-apple-light-hover)]',\n },\n /* Apple — dark: black surface, white logo + text. */\n {\n provider: 'apple',\n appearance: 'dark',\n class:\n 'ds:bg-[var(--brand-apple-dark)] ds:text-[var(--brand-apple-dark-foreground)] ds:border-[var(--brand-apple-dark)] ds:hover:bg-[var(--brand-apple-dark-hover)]',\n },\n /* Google — light: white/neutral surface, grey text. */\n {\n provider: 'google',\n appearance: 'light',\n class:\n 'ds:bg-[var(--brand-google-light)] ds:text-[var(--brand-google-light-foreground)] ds:border-[var(--brand-google-light-border)] ds:hover:bg-[var(--brand-google-light-hover)]',\n },\n /* Google — dark: Google-blue surface, white text. */\n {\n provider: 'google',\n appearance: 'dark',\n class:\n 'ds:bg-[var(--brand-google-dark)] ds:text-[var(--brand-google-dark-foreground)] ds:border-[var(--brand-google-dark)] ds:hover:bg-[var(--brand-google-dark-hover)]',\n },\n ],\n defaultVariants: {\n appearance: 'light',\n size: 'md',\n },\n },\n);\n\n/* The loading Spinner stands in for the brand mark, so it must occupy the\n SAME footprint (the button's `[&_svg]:size-4/5/6` = 16/20/24px). The\n Spinner's own size ramp is one step smaller (sm/md/lg = 12/16/20px), so\n we bump it one step and wrap it in a size-matched box; without this the\n spinner is ~4px smaller than the glyph it replaces and the button jumps\n on load. `lg` button → `lg` spinner (20px) inside a 24px box that the\n button's `[&_svg]:size-6` then drives via the inner svg. */\nconst SPINNER_SIZE: Record<\n NonNullable<VariantProps<typeof rootVariants>['size']>,\n 'sm' | 'md' | 'lg'\n> = {\n sm: 'md',\n md: 'lg',\n lg: 'lg',\n};\n\nconst spinnerBoxVariants = cva(\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n {\n variants: {\n size: {\n sm: 'ds:size-4',\n md: 'ds:size-5',\n lg: 'ds:size-6',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* The Google mark on a coloured (dark) surface sits inside a white tile\n per Google Identity Services guidance, so the 4-colour G always reads.\n On the light/neutral surface it sits directly on the button. The tile\n is a presentational chrome detail (not the mandated mark), so it uses\n tokens. */\nconst googleTileVariants = cva(\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n {\n variants: {\n appearance: {\n light: '',\n dark: 'ds:rounded-[var(--radius-sm)] ds:bg-[var(--brand-google-tile)]',\n },\n size: {\n sm: 'ds:[&_svg]:size-4',\n md: 'ds:[&_svg]:size-5',\n lg: 'ds:[&_svg]:size-6',\n },\n },\n compoundVariants: [\n { appearance: 'dark', size: 'sm', class: 'ds:p-1' },\n { appearance: 'dark', size: 'md', class: 'ds:p-1.5' },\n { appearance: 'dark', size: 'lg', class: 'ds:p-2' },\n ],\n defaultVariants: { appearance: 'light', size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport type SocialSignInProvider = 'apple' | 'google';\n\n/**\n * Brand surface variant — independent of the kit theme. Apple HIG:\n * `light` = white button + black mark/text, `dark` = black button +\n * white mark/text. Google: `light` = white/neutral button, `dark` =\n * Google-blue button. Pick the appearance that contrasts with your\n * auth-card background; do NOT bind it to `useTheme()`. Defaults to\n * `'light'`. Derived from `rootVariants` so the prop union tracks the\n * CVA option list automatically.\n */\nexport type SocialSignInAppearance = NonNullable<\n VariantProps<typeof rootVariants>['appearance']\n>;\n\n/** Button size. Defaults to `'md'`. Derived from `rootVariants`. */\nexport type SocialSignInSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n\nexport interface SocialSignInButtonProps\n extends\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n Omit<VariantProps<typeof rootVariants>, 'provider'> {\n /**\n * Which identity provider this button represents. Drives the brand\n * mark, the surface colour token, and the default i18n verb + name.\n * Designed extensible — the union and the CVA option list grow\n * together when a new provider (e.g. `'microsoft'`) is added.\n */\n provider: SocialSignInProvider;\n /**\n * Swaps the brand mark for the kit Spinner (size-matched), sets\n * `aria-busy='true'`, and disables the button so the user cannot\n * double-submit the OAuth redirect. The label stays visible.\n */\n loading?: boolean;\n /**\n * Override the visible label. When omitted, reads\n * `socialSignInButton.<provider>` (\"Sign in with Apple\" / \"Sign in\n * with Google\"). Override only to switch the verb to \"Continue with\"\n * — never for marketing copy, and the provider NAME (\"Apple\" /\n * \"Google\") must stay verbatim per brand rules.\n */\n label?: ReactNode;\n /**\n * Fired when the component detects the user cancelled an in-flight\n * sign-in — typically by pressing browser back after the OAuth\n * redirect, which restores the page from bfcache with `loading` still\n * true. Wire this to your loading-state setter so the button returns\n * to idle. Only fires when `loading` is currently true; never on first\n * mount. Mirrors SignInWithAlfadocsButton — the component does not\n * reset state it doesn't own.\n */\n onLoadingCancelled?: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* SocialSignInButton */\n/* ------------------------------------------------------------------ */\n\nexport const SocialSignInButton = forwardRef<\n HTMLButtonElement,\n SocialSignInButtonProps\n>(\n (\n {\n provider,\n appearance = 'light',\n size = 'md',\n loading = false,\n disabled,\n label,\n onLoadingCancelled,\n type = 'button',\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n // VariantProps types size/appearance as nullable; the destructure\n // default only narrows `undefined`. Normalise to a non-null value\n // before indexing the spinner-size map and box variant.\n const resolvedSize: SocialSignInSize = size ?? 'md';\n // Default label resolves from the provider key. The provider NAME is\n // a brand constant carried verbatim by the translation value.\n const resolvedLabel = label ?? t(`socialSignInButton.${provider}`);\n\n // Stash latest values in refs so the `pageshow` listener reads them\n // without re-binding on every render. One listener for the lifetime.\n const loadingRef = useRef(loading);\n const onCancelRef = useRef(onLoadingCancelled);\n loadingRef.current = loading;\n onCancelRef.current = onLoadingCancelled;\n\n useEffect(() => {\n const onPageShow = (event: PageTransitionEvent) => {\n // `event.persisted` is true when the page was restored from the\n // back/forward cache — the canonical \"user navigated away and\n // came back without a fresh load\" signal. If the button still\n // thinks it's loading, an OAuth redirect was started but never\n // completed.\n if (event.persisted && loadingRef.current && onCancelRef.current) {\n onCancelRef.current();\n }\n };\n window.addEventListener('pageshow', onPageShow);\n return () => window.removeEventListener('pageshow', onPageShow);\n }, []);\n\n const composedClassName = [\n rootVariants({ provider, appearance, size }),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // The mark sits at the inline-start; it does NOT mirror in RTL\n // (a logo is not a directional glyph). Logical `gap`/`ps`/`pe` keep\n // the layout direction-correct without flipping the mark itself.\n const mark =\n provider === 'apple' ? (\n <AppleMark className=\"ds:shrink-0\" />\n ) : appearance === 'dark' ? (\n <span className={googleTileVariants({ appearance, size })}>\n <GoogleMark />\n </span>\n ) : (\n <GoogleMark className=\"ds:shrink-0\" />\n );\n\n return (\n <button\n ref={ref}\n // eslint-disable-next-line react/button-has-type -- the destructure defaults type to \"button\"\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n data-component=\"social-sign-in-button\"\n data-provider={provider}\n data-appearance={appearance}\n className={composedClassName}\n {...props}\n >\n {loading ? (\n <span className={spinnerBoxVariants({ size: resolvedSize })}>\n <Spinner\n size={SPINNER_SIZE[resolvedSize]}\n variant=\"pulse\"\n className=\"ds:size-full\"\n label={t('socialSignInButton.loading')}\n />\n </span>\n ) : (\n mark\n )}\n <span>{resolvedLabel}</span>\n </button>\n );\n },\n);\n\nSocialSignInButton.displayName = 'SocialSignInButton';\n"],"names":["AppleMark","className","jsx","GoogleMark","jsxs","rootVariants","cva","SPINNER_SIZE","spinnerBoxVariants","googleTileVariants","SocialSignInButton","forwardRef","provider","appearance","size","loading","disabled","label","onLoadingCancelled","type","props","ref","useTranslation","resolvedSize","resolvedLabel","loadingRef","useRef","onCancelRef","useEffect","onPageShow","event","composedClassName","mark","Spinner"],"mappings":";;;;;AAgCO,SAASA,EAAU,EAAE,WAAAC,KAA2C;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,WAAAD;AAAA,MAEA,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,mhBAAA,CAAmhB;AAAA,IAAA;AAAA,EAAA;AAGjiB;ACXO,SAASC,EAAW,EAAE,WAAAF,KAA2C;AACtE,SACE,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,WAAAH;AAAA,MAGA,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAEJ,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAEJ,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAEJ,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,EAAA;AAGN;ACVA,MAAMG,IAAeC;AAAA,EACnB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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;AAAA,IAChE,GAAG,CAAA,CAAE;AAEL,UAAME,IAAoB;AAAA,MACxB1B,EAAa,EAAE,UAAAO,GAAU,YAAAC,GAAY,MAAAC,GAAM;AAAA,MAC3Cb;AAAA,IAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GAKL+B,IACJpB,MAAa,UACX,gBAAAV,EAACF,GAAA,EAAU,WAAU,cAAA,CAAc,IACjCa,MAAe,SACjB,gBAAAX,EAAC,QAAA,EAAK,WAAWO,EAAmB,EAAE,YAAAI,GAAY,MAAAC,EAAA,CAAM,GACtD,UAAA,gBAAAZ,EAACC,GAAA,CAAA,CAAW,EAAA,CACd,IAEA,gBAAAD,EAACC,GAAA,EAAW,WAAU,cAAA,CAAc;AAGxC,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAiB;AAAA,QAEA,MAAAF;AAAA,QACA,UAAUH,KAAYD;AAAA,QACtB,aAAWA,KAAW;AAAA,QACtB,kBAAe;AAAA,QACf,iBAAeH;AAAA,QACf,mBAAiBC;AAAA,QACjB,WAAWkB;AAAA,QACV,GAAGX;AAAA,QAEH,UAAA;AAAA,UAAAL,IACC,gBAAAb,EAAC,UAAK,WAAWM,EAAmB,EAAE,MAAMe,EAAA,CAAc,GACxD,UAAA,gBAAArB;AAAA,YAAC+B;AAAA,YAAA;AAAA,cACC,MAAM1B,EAAagB,CAAY;AAAA,cAC/B,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,OAAO,EAAE,4BAA4B;AAAA,YAAA;AAAA,UAAA,GAEzC,IAEAS;AAAA,UAEF,gBAAA9B,EAAC,UAAM,UAAAsB,EAAA,CAAc;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG3B;AACF;AAEAd,EAAmB,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as h, jsx as i } from "react/jsx-runtime";
2
2
  import { forwardRef as y, useState as v, useEffect as b, Fragment as m } from "react";
3
3
  import { c as x } from "./index-D2ZczOXr.js";
4
- import { s as g, C } from "./code-block-C_eNHWaa.js";
4
+ import { s as g, C } from "./code-block-BrwcZNPq.js";
5
5
  const z = x(
6
6
  "type-body ds:block ds:whitespace-pre-wrap ds:break-words",
7
7
  {
@@ -128,4 +128,4 @@ j.displayName = "StreamingText";
128
128
  export {
129
129
  j as S
130
130
  };
131
- //# sourceMappingURL=streaming-text-eRiizArc.js.map
131
+ //# sourceMappingURL=streaming-text-Cos2fVTw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"streaming-text-eRiizArc.js","sources":["../../src/components/streaming-text/streaming-text.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useEffect,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\nconst containerVariants = cva(\n 'type-body ds:block ds:whitespace-pre-wrap ds:break-words',\n {\n variants: {\n // Family, weight, tracking, line-height all come from `.type-body` on the base.\n // Size variants override --type-body-size to shift the ramp step.\n size: {\n sm: 'ds:[--type-body-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-body-size:var(--font-size-lg)]',\n },\n density: {\n default: '',\n compact: 'ds:[--type-body-size:var(--font-size-sm)] ds:leading-snug',\n },\n },\n defaultVariants: { size: 'md', density: 'default' },\n },\n);\n\ntype NativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-busy' | 'aria-live'\n>;\n\nexport interface StreamingTextProps\n extends NativeProps, VariantProps<typeof containerVariants> {\n /** Accumulated plain-text content. Parent appends tokens as they arrive. */\n content: string;\n /** While true the blinking cursor is shown and aria-busy is set. */\n isStreaming: boolean;\n /** When true, parse a small, safe subset of markdown (bold, inline code, line-breaks).\n * No HTML passes through; no dangerouslySetInnerHTML is ever used. */\n renderMarkdown?: boolean;\n /** Announce updates more aggressively when the streamed content is primary\n * (not wrapped by a higher-level log region). Defaults to 'polite'; never\n * set to 'assertive' for streamed output. */\n ariaLive?: 'polite' | 'off';\n}\n\n/* ------------------------------------------------------------------ */\n/* Safe, dependency-free markdown-ish renderer. */\n/* Handles **bold**, `inline code`, and newlines. Anything that looks */\n/* like HTML stays as text — no dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' };\n\nfunction tokenize(input: string): Token[] {\n // Single-pass O(n) scanner. Avoids regex backtracking on `***` triples.\n const tokens: Token[] = [];\n const len = input.length;\n const STAR = 42; // '*'\n const BACKTICK = 96; // '`'\n const LF = 10; // '\\n'\n let textStart = 0;\n let i = 0;\n\n const flushText = (end: number) => {\n if (end > textStart) {\n tokens.push({ type: 'text', value: input.slice(textStart, end) });\n }\n };\n\n while (i < len) {\n const c = input.charCodeAt(i);\n\n if (c === STAR && i + 1 < len && input.charCodeAt(i + 1) === STAR) {\n // Look for closing `**`; inner content must not contain `*`.\n let j = i + 2;\n while (j < len && input.charCodeAt(j) !== STAR) j++;\n if (j < len - 1 && input.charCodeAt(j + 1) === STAR && j > i + 2) {\n flushText(i);\n tokens.push({ type: 'bold', value: input.slice(i + 2, j) });\n i = j + 2;\n textStart = i;\n continue;\n }\n i += 2;\n continue;\n }\n\n if (c === BACKTICK) {\n let j = i + 1;\n while (j < len && input.charCodeAt(j) !== BACKTICK) j++;\n if (j < len && j > i + 1) {\n flushText(i);\n tokens.push({ type: 'code', value: input.slice(i + 1, j) });\n i = j + 1;\n textStart = i;\n continue;\n }\n i += 1;\n continue;\n }\n\n if (c === LF) {\n flushText(i);\n tokens.push({ type: 'br' });\n i += 1;\n textStart = i;\n continue;\n }\n\n i += 1;\n }\n\n flushText(len);\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render the streamed body: split fenced code blocks out to `<CodeBlock>` and\n * run the inline tokenizer over the surrounding text. Tolerates an open fence\n * (closing ``` not yet streamed) — the prompt renders as a code block live.\n */\nfunction renderTokens(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\nexport const StreamingText = forwardRef<HTMLSpanElement, StreamingTextProps>(\n (\n {\n content,\n isStreaming,\n renderMarkdown = false,\n ariaLive = 'polite',\n size = 'md',\n density = 'default',\n className,\n ...rest\n },\n ref,\n ) => {\n // Throttle visible content to at most ~10 updates per second so assistive\n // tech doesn't receive one announcement per token. We keep the full text in\n // a ref and push it to state on a timer.\n const [visible, setVisible] = useState<string>(content);\n\n useEffect(() => {\n if (!isStreaming) {\n // Streaming ended — flush immediately.\n setVisible(content);\n return;\n }\n // Global `setTimeout` works in both Node and browsers — avoid the\n // `window.` prefix so SSR (Next.js App Router, Remix) doesn't throw.\n const handle = setTimeout(() => setVisible(content), 100);\n return () => clearTimeout(handle);\n }, [content, isStreaming]);\n\n const body = renderMarkdown ? renderTokens(visible) : visible;\n\n return (\n <span\n ref={ref}\n aria-live={ariaLive}\n aria-busy={isStreaming ? true : false}\n data-component=\"streaming-text\"\n className={containerVariants({ size, density, className })}\n {...rest}\n >\n {body}\n {isStreaming ? (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:inline-block ds:align-baseline',\n 'ds:text-[color:var(--primary)]',\n 'ds:motion-safe:animate-[streaming-cursor-blink_1s_step-end_infinite]',\n 'ds:motion-reduce:opacity-100',\n 'ds:[.theme-accessible_&]:animate-none',\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:ms-[1px]',\n ].join(' ')}\n >\n {'\\u258D'}\n </span>\n ) : null}\n </span>\n );\n },\n);\n\nStreamingText.displayName = 'StreamingText';\n"],"names":["containerVariants","cva","tokenize","input","tokens","len","STAR","BACKTICK","LF","textStart","i","flushText","end","c","j","renderInline","tok","jsx","Fragment","renderTokens","splitCodeFences","seg","CodeBlock","StreamingText","forwardRef","content","isStreaming","renderMarkdown","ariaLive","size","density","className","rest","ref","visible","setVisible","useState","useEffect","handle","body","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAoBC;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,SAAS,UAAA;AAAA,EAAU;AAEtD;AAkCA,SAASC,EAASC,GAAwB;AAExC,QAAMC,IAAkB,CAAA,GAClBC,IAAMF,EAAM,QACZG,IAAO,IACPC,IAAW,IACXC,IAAK;AACX,MAAIC,IAAY,GACZC,IAAI;AAER,QAAMC,IAAY,CAACC,MAAgB;AACjC,IAAIA,IAAMH,KACRL,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOD,EAAM,MAAMM,GAAWG,CAAG,GAAG;AAAA,EAEpE;AAEA,SAAOF,IAAIL,KAAK;AACd,UAAMQ,IAAIV,EAAM,WAAWO,CAAC;AAE5B,QAAIG,MAAMP,KAAQI,IAAI,IAAIL,KAAOF,EAAM,WAAWO,IAAI,CAAC,MAAMJ,GAAM;AAEjE,UAAIQ,IAAIJ,IAAI;AACZ,aAAOI,IAAIT,KAAOF,EAAM,WAAWW,CAAC,MAAMR,IA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AAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAA;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAM,EAAc,cAAc;"}
1
+ {"version":3,"file":"streaming-text-Cos2fVTw.js","sources":["../../src/components/streaming-text/streaming-text.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useEffect,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\nconst containerVariants = cva(\n 'type-body ds:block ds:whitespace-pre-wrap ds:break-words',\n {\n variants: {\n // Family, weight, tracking, line-height all come from `.type-body` on the base.\n // Size variants override --type-body-size to shift the ramp step.\n size: {\n sm: 'ds:[--type-body-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-body-size:var(--font-size-lg)]',\n },\n density: {\n default: '',\n compact: 'ds:[--type-body-size:var(--font-size-sm)] ds:leading-snug',\n },\n },\n defaultVariants: { size: 'md', density: 'default' },\n },\n);\n\ntype NativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-busy' | 'aria-live'\n>;\n\nexport interface StreamingTextProps\n extends NativeProps, VariantProps<typeof containerVariants> {\n /** Accumulated plain-text content. Parent appends tokens as they arrive. */\n content: string;\n /** While true the blinking cursor is shown and aria-busy is set. */\n isStreaming: boolean;\n /** When true, parse a small, safe subset of markdown (bold, inline code, line-breaks).\n * No HTML passes through; no dangerouslySetInnerHTML is ever used. */\n renderMarkdown?: boolean;\n /** Announce updates more aggressively when the streamed content is primary\n * (not wrapped by a higher-level log region). Defaults to 'polite'; never\n * set to 'assertive' for streamed output. */\n ariaLive?: 'polite' | 'off';\n}\n\n/* ------------------------------------------------------------------ */\n/* Safe, dependency-free markdown-ish renderer. */\n/* Handles **bold**, `inline code`, and newlines. Anything that looks */\n/* like HTML stays as text — no dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' };\n\nfunction tokenize(input: string): Token[] {\n // Single-pass O(n) scanner. Avoids regex backtracking on `***` triples.\n const tokens: Token[] = [];\n const len = input.length;\n const STAR = 42; // '*'\n const BACKTICK = 96; // '`'\n const LF = 10; // '\\n'\n let textStart = 0;\n let i = 0;\n\n const flushText = (end: number) => {\n if (end > textStart) {\n tokens.push({ type: 'text', value: input.slice(textStart, end) });\n }\n };\n\n while (i < len) {\n const c = input.charCodeAt(i);\n\n if (c === STAR && i + 1 < len && input.charCodeAt(i + 1) === STAR) {\n // Look for closing `**`; inner content must not contain `*`.\n let j = i + 2;\n while (j < len && input.charCodeAt(j) !== STAR) j++;\n if (j < len - 1 && input.charCodeAt(j + 1) === STAR && j > i + 2) {\n flushText(i);\n tokens.push({ type: 'bold', value: input.slice(i + 2, j) });\n i = j + 2;\n textStart = i;\n continue;\n }\n i += 2;\n continue;\n }\n\n if (c === BACKTICK) {\n let j = i + 1;\n while (j < len && input.charCodeAt(j) !== BACKTICK) j++;\n if (j < len && j > i + 1) {\n flushText(i);\n tokens.push({ type: 'code', value: input.slice(i + 1, j) });\n i = j + 1;\n textStart = i;\n continue;\n }\n i += 1;\n continue;\n }\n\n if (c === LF) {\n flushText(i);\n tokens.push({ type: 'br' });\n i += 1;\n textStart = i;\n continue;\n }\n\n i += 1;\n }\n\n flushText(len);\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render the streamed body: split fenced code blocks out to `<CodeBlock>` and\n * run the inline tokenizer over the surrounding text. Tolerates an open fence\n * (closing ``` not yet streamed) — the prompt renders as a code block live.\n */\nfunction renderTokens(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\nexport const StreamingText = forwardRef<HTMLSpanElement, StreamingTextProps>(\n (\n {\n content,\n isStreaming,\n renderMarkdown = false,\n ariaLive = 'polite',\n size = 'md',\n density = 'default',\n className,\n ...rest\n },\n ref,\n ) => {\n // Throttle visible content to at most ~10 updates per second so assistive\n // tech doesn't receive one announcement per token. We keep the full text in\n // a ref and push it to state on a timer.\n const [visible, setVisible] = useState<string>(content);\n\n useEffect(() => {\n if (!isStreaming) {\n // Streaming ended — flush immediately.\n setVisible(content);\n return;\n }\n // Global `setTimeout` works in both Node and browsers — avoid the\n // `window.` prefix so SSR (Next.js App Router, Remix) doesn't throw.\n const handle = setTimeout(() => setVisible(content), 100);\n return () => clearTimeout(handle);\n }, [content, isStreaming]);\n\n const body = renderMarkdown ? renderTokens(visible) : visible;\n\n return (\n <span\n ref={ref}\n aria-live={ariaLive}\n aria-busy={isStreaming ? true : false}\n data-component=\"streaming-text\"\n className={containerVariants({ size, density, className })}\n {...rest}\n >\n {body}\n {isStreaming ? (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:inline-block ds:align-baseline',\n 'ds:text-[color:var(--primary)]',\n 'ds:motion-safe:animate-[streaming-cursor-blink_1s_step-end_infinite]',\n 'ds:motion-reduce:opacity-100',\n 'ds:[.theme-accessible_&]:animate-none',\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:ms-[1px]',\n ].join(' ')}\n >\n {'\\u258D'}\n </span>\n ) : null}\n </span>\n );\n },\n);\n\nStreamingText.displayName = 'StreamingText';\n"],"names":["containerVariants","cva","tokenize","input","tokens","len","STAR","BACKTICK","LF","textStart","i","flushText","end","c","j","renderInline","tok","jsx","Fragment","renderTokens","splitCodeFences","seg","CodeBlock","StreamingText","forwardRef","content","isStreaming","renderMarkdown","ariaLive","size","density","className","rest","ref","visible","setVisible","useState","useEffect","handle","body","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAoBC;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,SAAS,UAAA;AAAA,EAAU;AAEtD;AAkCA,SAASC,EAASC,GAAwB;AAExC,QAAMC,IAAkB,CAAA,GAClBC,IAAMF,EAAM,QACZG,IAAO,IACPC,IAAW,IACXC,IAAK;AACX,MAAIC,IAAY,GACZC,IAAI;AAER,QAAMC,IAAY,CAACC,MAAgB;AACjC,IAAIA,IAAMH,KACRL,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOD,EAAM,MAAMM,GAAWG,CAAG,GAAG;AAAA,EAEpE;AAEA,SAAOF,IAAIL,KAAK;AACd,UAAMQ,IAAIV,EAAM,WAAWO,CAAC;AAE5B,QAAIG,MAAMP,KAAQI,IAAI,IAAIL,KAAOF,EAAM,WAAWO,IAAI,CAAC,MAAMJ,GAAM;AAEjE,UAAIQ,IAAIJ,IAAI;AACZ,aAAOI,IAAIT,KAAOF,EAAM,WAAWW,CAAC,MAAMR,IAAM,CAAAQ;AAChD,UAAIA,IAAIT,IAAM,KAAKF,EAAM,WAAWW,IAAI,CA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ACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAA;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAM,EAAc,cAAc;"}
@@ -3,7 +3,7 @@ import { forwardRef as F, Fragment as O } from "react";
3
3
  import { c } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as E } from "react-i18next";
5
5
  import { B as M } from "./badge-BAkd6_Pj.js";
6
- import { D as o } from "./dropdown-menu-C8PaW3lR.js";
6
+ import { D as o } from "./dropdown-menu-DIzxr_lp.js";
7
7
  import { u as P } from "./use-media-query-CcAx5SMM.js";
8
8
  import { u as Q, a as q } from "./use-scroll-overflow-UbLrUfBo.js";
9
9
  import { C as G } from "./chevron-down-DWE7GSq9.js";
@@ -225,4 +225,4 @@ as.displayName = "TabBar";
225
225
  export {
226
226
  as as T
227
227
  };
228
- //# sourceMappingURL=tab-bar-BHFf6knq.js.map
228
+ //# sourceMappingURL=tab-bar-BrkMUW0c.js.map