@alfadocs/ui-kit 1.47.1 → 1.49.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 (448) hide show
  1. package/dist/_chunks/{actions-cell-renderer-B5m9lwgC.js → actions-cell-renderer-DMittsR3.js} +4 -4
  2. package/dist/_chunks/{address-autocomplete-Bq-1n1UX.js → address-autocomplete-Dp5uMvKP.js} +61 -60
  3. package/dist/_chunks/{address-fields-jFfjxOQR.js → address-fields-QfC-N3pw.js} +5 -5
  4. package/dist/_chunks/{agenda-card-DyQtHb9z.js → agenda-card-CjjxlA9K.js} +3 -3
  5. package/dist/_chunks/{agenda-tray-CBaJASb5.js → agenda-tray-BhZASyJm.js} +4 -4
  6. package/dist/_chunks/{ai-credits-notice-xszqOZTC.js → ai-credits-notice-C-kz_RrY.js} +3 -3
  7. package/dist/_chunks/{ai-permission-notice-D7I2U-cz.js → ai-permission-notice-BRZeS3mT.js} +3 -3
  8. package/dist/_chunks/{ai-prompt-input-DXknpQCB.js → ai-prompt-input-CxvnXsAs.js} +82 -82
  9. package/dist/_chunks/{alia-sidebar-CUqaJNPQ.js → alia-sidebar-Dx-oeOV2.js} +8 -8
  10. package/dist/_chunks/{anamnesis-card-xtEhyojD.js → anamnesis-card-D8Si-2GV.js} +3 -3
  11. package/dist/_chunks/{anamnesis-summary-card-CclBbiXg.js → anamnesis-summary-card-DPyScUMM.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-DI-UX5r6.js → anamnesis-summary-rows-CZirLRuv.js} +12 -12
  13. package/dist/_chunks/{antenatal-schedule-timeline-CXk_tzWG.js → antenatal-schedule-timeline-8fm3vPSV.js} +2 -2
  14. package/dist/_chunks/{appointment-card-DluZy8Iv.js → appointment-card-BgLpE6T5.js} +6 -6
  15. package/dist/_chunks/{appointment-peek-BsfCpiJs.js → appointment-peek-BDiCIBb-.js} +6 -6
  16. package/dist/_chunks/{appointment-timeline-Cs5f9viN.js → appointment-timeline-wQ-PdkFV.js} +6 -6
  17. package/dist/_chunks/{appointment-tray-CLrGGnKR.js → appointment-tray-D7Gt6m8x.js} +4 -4
  18. package/dist/_chunks/appointment-workflow-status-CS8ufF1f.js +66 -0
  19. package/dist/_chunks/{audio-recorder-B7dT-Y3v.js → audio-recorder-DZBtAvLH.js} +4 -4
  20. package/dist/_chunks/{autocomplete-MpBhz-fG.js → autocomplete-DSasZUf6.js} +65 -64
  21. package/dist/_chunks/{avatar-CkDeQOSI.js → avatar-BVvjKNTp.js} +2 -2
  22. package/dist/_chunks/{badge-BudgzTe_.js → badge-BAkd6_Pj.js} +24 -17
  23. package/dist/_chunks/{balance-badge-cell-YGrYdrvR.js → balance-badge-cell-klaxFNL_.js} +6 -6
  24. package/dist/_chunks/{bishop-score-Cu70iv9C.js → bishop-score-BMLRvXYF.js} +4 -4
  25. package/dist/_chunks/{bmi-calculator-C9N19aLX.js → bmi-calculator-DUhRyyrA.js} +3 -3
  26. package/dist/_chunks/{booking-C4MwImkS.js → booking-BF9pVa2n.js} +384 -388
  27. package/dist/_chunks/{breadcrumb-agut0PwN.js → breadcrumb-D3boYzD4.js} +50 -49
  28. package/dist/_chunks/{button-CaUe1uyd.js → button-18oBsI3n.js} +54 -50
  29. package/dist/_chunks/button-group-BSDqso_C.js +408 -0
  30. package/dist/_chunks/{calendar-OzSeTb4V.js → calendar-Bt44KMNO.js} +13 -18
  31. package/dist/_chunks/{calendar-event-card-B6N5h1dO.js → calendar-event-card-BUbKBPv_.js} +55 -73
  32. package/dist/_chunks/calendar-workspace-C_eXL1by.js +10464 -0
  33. package/dist/_chunks/{care-plan-card-BOv0NRle.js → care-plan-card-ciBaaguw.js} +4 -4
  34. package/dist/_chunks/{care-plan-entry-card-d-rZD4li.js → care-plan-entry-card-D7A0whiZ.js} +5 -5
  35. package/dist/_chunks/{care-plan-header-CEmBXn6-.js → care-plan-header-DKV1gLqv.js} +4 -4
  36. package/dist/_chunks/{carousel.agent-z1yLBpyC.js → carousel.agent-DqDGR2yH.js} +2 -2
  37. package/dist/_chunks/{chart-D8ucl8hH.js → chart-VjuXDXOZ.js} +3 -3
  38. package/dist/_chunks/{chat-input-Cj7ZYQr5.js → chat-input-BVho_SqP.js} +2 -2
  39. package/dist/_chunks/{chat-message-BMVxiUIX.js → chat-message-B4ihjNy3.js} +4 -4
  40. package/dist/_chunks/{smartphone-DaPcFw-X.js → circle-dashed-CUj6o2cA.js} +3 -14
  41. package/dist/_chunks/{city-input-DaQc-Hbj.js → city-input-BGYc4lRV.js} +2 -2
  42. package/dist/_chunks/{clinical-note-card-DdsGYMmI.js → clinical-note-card-B7s5BtEl.js} +89 -74
  43. package/dist/_chunks/{code-block-BB-viuTn.js → code-block-C_eNHWaa.js} +2 -2
  44. package/dist/_chunks/combobox-B_rLwmSv.js +578 -0
  45. package/dist/_chunks/{command-palette-DQl_SNEv.js → command-palette-DhgGo7GJ.js} +82 -80
  46. package/dist/_chunks/{connection-status-BmA9T0UO.js → connection-status-Cfux3TvH.js} +4 -4
  47. package/dist/_chunks/{contact-profile-card-C0WpwpVV.js → contact-profile-card-Dj4NgBL-.js} +3 -3
  48. package/dist/_chunks/control-room-rail-DAO0qfOI.js +379 -0
  49. package/dist/_chunks/{copy-field-B8XRVmQv.js → copy-field-Cm4y5Bff.js} +2 -2
  50. package/dist/_chunks/{country-select-CfDNFG5c.js → country-select-C5jZjO8O.js} +2 -2
  51. package/dist/_chunks/{cycle-calculator-BH2StWoT.js → cycle-calculator-B9lBRNiZ.js} +3 -3
  52. package/dist/_chunks/{dashboard-grid-BcXWL5S9.js → dashboard-grid-uX7x1ePj.js} +2 -2
  53. package/dist/_chunks/{data-table-DnKOmEVw.js → data-table-CrI3_bjH.js} +416 -415
  54. package/dist/_chunks/{data-table-tabs-B9SXA5VP.js → data-table-tabs-CzYYKp2_.js} +3 -3
  55. package/dist/_chunks/{dependent-selector-BHDP0nBB.js → dependent-selector-58hTg5rB.js} +3 -3
  56. package/dist/_chunks/{description-list-BsJ_6CQE.js → description-list-1A2DEbE6.js} +2 -2
  57. package/dist/_chunks/{document-preview-COV0BC6n.js → document-preview-Od2Hz4z5.js} +13 -12
  58. package/dist/_chunks/{document-scanner-B1abl-A4.js → document-scanner-p0aGlzCy.js} +3 -3
  59. package/dist/_chunks/{dropdown-menu-DU-Hrf33.js → dropdown-menu-C8PaW3lR.js} +110 -96
  60. package/dist/_chunks/{due-date-calculator-Buh_mVHq.js → due-date-calculator-BVqJaxzd.js} +4 -4
  61. package/dist/_chunks/{editable-currency-cell-renderer-OUkUv7U4.js → editable-currency-cell-renderer-D_G2Ap61.js} +4 -4
  62. package/dist/_chunks/{editable-description-ADMVFPUz.js → editable-description-B4NVdjvd.js} +3 -3
  63. package/dist/_chunks/{editor-overlay-DwNKaI22.js → editor-overlay-BDiBvQmL.js} +2 -2
  64. package/dist/_chunks/{empty-state-BUN_UAWf.js → empty-state-DTBZ1ENT.js} +2 -2
  65. package/dist/_chunks/{entity-card-I-Gio5wo.js → entity-card-D1Yrh9wf.js} +2 -1
  66. package/dist/_chunks/{entity-summary-DXejuQ8i.js → entity-summary-CFJfBdVP.js} +4 -4
  67. package/dist/_chunks/{error-boundary-BNT2iQ1w.js → error-boundary-BxTqEXqj.js} +2 -2
  68. package/dist/_chunks/euro-Dsuz4ixO.js +22 -0
  69. package/dist/_chunks/{face-scheme-mIhwrQXt.js → face-scheme-fku-RShg.js} +71 -71
  70. package/dist/_chunks/{fetal-weight-wx4ycKc6.js → fetal-weight-B69yOS9W.js} +3 -3
  71. package/dist/_chunks/{field-array-BW9KeeXG.js → field-array-lIXrFWS0.js} +3 -3
  72. package/dist/_chunks/file-BuG1VMAy.js +21 -0
  73. package/dist/_chunks/{file-Cwe9VC1A.js → file-image-cDgE-BTy.js} +2 -19
  74. package/dist/_chunks/{file-manager-DOcJGIx2.js → file-manager-C6QQPQV5.js} +15 -14
  75. package/dist/_chunks/{file-upload-BDpb08GM.js → file-upload-B242a_Y1.js} +53 -52
  76. package/dist/_chunks/{finished-terminal-DJd7Z_po.js → finished-terminal-B2oqXO0Y.js} +2 -2
  77. package/dist/_chunks/fiscal-code-input-BEF8eKIG.js +572 -0
  78. package/dist/_chunks/{freemium-paywall-BaW5ODc9.js → freemium-paywall-B6JITu4l.js} +2 -2
  79. package/dist/_chunks/{gestational-age-calculator-CwbecTul.js → gestational-age-calculator-DsGN6_HS.js} +5 -5
  80. package/dist/_chunks/handled-rejection-6gqCf5vt.js +13 -0
  81. package/dist/_chunks/{hcg-doubling-BcXriXJe.js → hcg-doubling-D2SH-e7t.js} +3 -3
  82. package/dist/_chunks/{header-3o9o9v_T.js → header-CCjp5GvE.js} +2 -2
  83. package/dist/_chunks/{header-settings-BEfx_-TF.js → header-settings-ZXa6hXuu.js} +5 -5
  84. package/dist/_chunks/{help-me-write-templates-DHIwa4xR.js → help-me-write-templates-DQtT1qs_.js} +5 -5
  85. package/dist/_chunks/history-CK2JaU2g.js +16 -0
  86. package/dist/_chunks/{hover-card-nUae8NPJ.js → hover-card-BplP5SzQ.js} +2 -2
  87. package/dist/_chunks/{icon-button-CehAeZoP.js → icon-button-CY7GU_Se.js} +2 -2
  88. package/dist/_chunks/icon-button-group-B_426QN_.js +431 -0
  89. package/dist/_chunks/{icon-picker-DMEelg9v.js → icon-picker-ZLebyB0U.js} +3 -3
  90. package/dist/_chunks/{image-cropper-BjPjT7wU.js → image-cropper-_HiNN79d.js} +2 -2
  91. package/dist/_chunks/{info-tip-iP2Pm9dh.js → info-tip-laBxZhKu.js} +2 -2
  92. package/dist/_chunks/{insert-result-DPnOBD85.js → insert-result-CSuPQyKL.js} +2 -2
  93. package/dist/_chunks/{key-value-pair-DaQI_LZB.js → key-value-pair-Dcdl3Gni.js} +2 -2
  94. package/dist/_chunks/{kit-extensions-DuoFF1R3.js → kit-extensions-BTJSnM_H.js} +6 -6
  95. package/dist/_chunks/link-cell-renderer-CkNbUsBM.js +867 -0
  96. package/dist/_chunks/{locale-picker-CH3kfrIG.js → locale-picker-DGkQmhV9.js} +170 -180
  97. package/dist/_chunks/{map-view-CHw4RL6w.js → map-view-Bb7ClKSF.js} +2 -2
  98. package/dist/_chunks/{marketplace-app-shell-PB89Dkk_.js → marketplace-app-shell-1uKqs4gD.js} +7 -7
  99. package/dist/_chunks/menu-row-BAr8bx1I.js +95 -0
  100. package/dist/_chunks/{message-card-V3sFPiQI.js → message-card-C2zsvyj0.js} +4 -4
  101. package/dist/_chunks/{message-tray-CrRIHfiQ.js → message-tray-CMlmxdH2.js} +4 -4
  102. package/dist/_chunks/{multi-select-CtPd7g4x.js → multi-select-N4Smh-gj.js} +114 -113
  103. package/dist/_chunks/{muscle-scheme-UVz_x4iE.js → muscle-scheme-Co0NIgbU.js} +3 -3
  104. package/dist/_chunks/{note-attachment-CwDir3kK.js → note-attachment-CGjNTrAC.js} +2 -2
  105. package/dist/_chunks/{note-timeline-Dn_XTo1s.js → note-timeline-CVnKL0p6.js} +2 -2
  106. package/dist/_chunks/notes-panel-xxpFt-I1.js +1111 -0
  107. package/dist/_chunks/{notification-card-B2gLO6dK.js → notification-card-DDzBCi8l.js} +3 -3
  108. package/dist/_chunks/{notification-tray-BOEKegVV.js → notification-tray-PnH2PBlZ.js} +4 -4
  109. package/dist/_chunks/{operator-hero-XIdwDmN2.js → operator-hero-DyrNLoRO.js} +4 -4
  110. package/dist/_chunks/{optical-prescription-LGgmtcST.js → optical-prescription-DUufWXfZ.js} +3 -3
  111. package/dist/_chunks/{pagination-EkD5SiCK.js → pagination-B0N2qGy_.js} +83 -82
  112. package/dist/_chunks/panel-subview-CzHutkA8.js +217 -0
  113. package/dist/_chunks/{patient-details-yrgkSeEY.js → patient-details-tTlvrJSU.js} +4 -4
  114. package/dist/_chunks/{patient-field-row-DCMkFGqI.js → patient-field-row-DElFbpKc.js} +12 -12
  115. package/dist/_chunks/{patient-search-5QcmQKJD.js → patient-search-DgXdGkhK.js} +4 -4
  116. package/dist/_chunks/{patient-summary-card-CmEFflGS.js → patient-summary-card-DQ__6DR-.js} +8 -8
  117. package/dist/_chunks/{payment-automation-upsell-BKmBXU4i.js → payment-automation-upsell-ugi4np1l.js} +3 -3
  118. package/dist/_chunks/{payment-request-card-Cer6XXCn.js → payment-request-card-DMJB57Tv.js} +5 -5
  119. package/dist/_chunks/{periodontal-chart-DJoZS_o7.js → periodontal-chart-DbGzKDj7.js} +2 -2
  120. package/dist/_chunks/{periodontal-chart-card-Nd1ZoYWb.js → periodontal-chart-card-DvHyP47v.js} +3 -3
  121. package/dist/_chunks/{periodontal-diagnosis-C7pfPOct.js → periodontal-diagnosis-B8WqI0eU.js} +2 -2
  122. package/dist/_chunks/{periodontal-risk-chart-B2tNFa15.js → periodontal-risk-chart-DsFRFFSz.js} +2 -2
  123. package/dist/_chunks/{phone-input-IWrGOCwm.js → phone-input-sQj-zi59.js} +85 -86
  124. package/dist/_chunks/{popover-DO-pssF3.js → popover-Dvb40vPH.js} +2 -2
  125. package/dist/_chunks/{practice-profile-hero-DxoLlQr5.js → practice-profile-hero-B-WcJYNH.js} +3 -3
  126. package/dist/_chunks/{practice-results-D11Zpt27.js → practice-results-EKRiqWtQ.js} +8 -8
  127. package/dist/_chunks/{pregnancy-dating-DcyV9ZRD.js → pregnancy-dating-lfjjZVZH.js} +5 -5
  128. package/dist/_chunks/{pregnancy-weight-gain-Bfq4Kwt5.js → pregnancy-weight-gain-WpNt-S0q.js} +3 -3
  129. package/dist/_chunks/{privacy-lock-CbFCAMM3.js → privacy-lock-D6gq0GDg.js} +3 -3
  130. package/dist/_chunks/privacy-mask-BC5lw2zB.js +81 -0
  131. package/dist/_chunks/{product-hub-panel-w40-_-1s.js → product-hub-panel-CKeSCSeE.js} +3 -3
  132. package/dist/_chunks/{province-select-BaUnkg4S.js → province-select-BiszMRRY.js} +2 -2
  133. package/dist/_chunks/{public-header.agent-D-EBVskf.js → public-header.agent-B9wDmUeB.js} +3 -3
  134. package/dist/_chunks/{radiograph-panel.agent-LrILY2lN.js → radiograph-panel.agent-TmyIvTOa.js} +6 -6
  135. package/dist/_chunks/{reviews-panel-2GVuxGeT.js → reviews-panel-BdwFp_0c.js} +4 -4
  136. package/dist/_chunks/{rich-text-editor-BwDV2XkZ.js → rich-text-editor-y6ML0KeV.js} +12 -11
  137. package/dist/_chunks/{search-bar-CCmViqaa.js → search-bar-6bHatpYJ.js} +69 -67
  138. package/dist/_chunks/{select-CLSUnKjF.js → select-upNAltly.js} +89 -88
  139. package/dist/_chunks/{session-countdown-BqppPrw6.js → session-countdown-ACJyTXH2.js} +2 -2
  140. package/dist/_chunks/{sheet-C8WIDFS8.js → sheet-D0Lh0KR2.js} +2 -2
  141. package/dist/_chunks/{sign-in-with-alfadocs-button-DWwBJtyE.js → sign-in-with-alfadocs-button-CDyJAIzW.js} +2 -2
  142. package/dist/_chunks/{signature-request-D_j2aQu1.js → signature-request-BUGeG8oD.js} +7 -7
  143. package/dist/_chunks/{signature-status-chip-D4NsrdeI.js → signature-status-chip-Dz6sS2oA.js} +2 -2
  144. package/dist/_chunks/{slot-grid-B3eOPkKD.js → slot-grid-4fWH3Euk.js} +4 -4
  145. package/dist/_chunks/smartphone-C0rFF2if.js +15 -0
  146. package/dist/_chunks/{streaming-text-CE1u_oGa.js → streaming-text-eRiizArc.js} +2 -2
  147. package/dist/_chunks/{tab-bar-Cw9UK18Z.js → tab-bar-BHFf6knq.js} +9 -9
  148. package/dist/_chunks/{tabs-BnRaLT0y.js → tabs-CFsuMQ5H.js} +82 -81
  149. package/dist/_chunks/{tag-Ci3xJPcH.js → tag-B65tLWvD.js} +24 -21
  150. package/dist/_chunks/{task-card-qTKD1fIT.js → task-card-jaOhnj_q.js} +73 -55
  151. package/dist/_chunks/task-editor-DlvTwAfv.js +1243 -0
  152. package/dist/_chunks/{task-tray-DIwjAIes.js → task-tray-HHyxi9ga.js} +4 -4
  153. package/dist/_chunks/tasks-panel-DbSjq_mz.js +1243 -0
  154. package/dist/_chunks/{theme-toggle-BP0XRGMM.js → theme-toggle-LUBxlNDm.js} +4 -4
  155. package/dist/_chunks/{timeline-61AihzYz.js → timeline-ChY7iZrs.js} +2 -2
  156. package/dist/_chunks/{toast-ZZfhA5u0.js → toast-CT8hjr9r.js} +2 -2
  157. package/dist/_chunks/{token-insert-menu-A9B5AJw6.js → token-insert-menu-klwbxVKh.js} +3 -3
  158. package/dist/_chunks/{tool-rail-CCFqDfAn.js → tool-rail-DEeX4PdN.js} +144 -137
  159. package/dist/_chunks/{tooth-scheme-DPAq0vQK.js → tooth-scheme-BkjhkI8g.js} +4 -4
  160. package/dist/_chunks/{treatment-receipt-DU0OewqH.js → treatment-receipt-C-gWZ6uv.js} +3 -3
  161. package/dist/_chunks/{unit-converter-C-LpGzrN.js → unit-converter-Dp_KDxE6.js} +3 -3
  162. package/dist/_chunks/use-appointment-details-read-5-hV-2xA.js +2045 -0
  163. package/dist/_chunks/use-list-reflow-C7O4Uqnl.js +133 -0
  164. package/dist/_chunks/use-priority-overflow-Cdmb5EiR.js +108 -0
  165. package/dist/_chunks/{variables-menu-vXUaSBj4.js → variables-menu-aJLKJ_cu.js} +127 -136
  166. package/dist/_chunks/{warning-stack-C0glSB7p.js → warning-stack-CEgYkI1z.js} +3 -3
  167. package/dist/_chunks/{widget-picker-B1sj6uyf.js → widget-picker-CilQvcNL.js} +2 -2
  168. package/dist/_chunks/{workflow-map-DhR_h5yw.js → workflow-map-qGkQTNvS.js} +30 -29
  169. package/dist/_chunks/{workflow-status-CuJAOuKL.js → workflow-status-ClHfz4Kr.js} +209 -167
  170. package/dist/agent-catalog.json +371 -26
  171. package/dist/agent-i18n/en.json +41 -9
  172. package/dist/components/_shared/appointment-format.d.ts +52 -0
  173. package/dist/{patterns/calendar/calendar-editor-fields.d.ts → components/_shared/compact-editor-fields.d.ts} +6 -5
  174. package/dist/components/_shared/handled-rejection.d.ts +2 -0
  175. package/dist/components/_shared/menu-row.d.ts +17 -0
  176. package/dist/components/_shared/patient-identity.d.ts +7 -0
  177. package/dist/components/_shared/patient-picker.d.ts +24 -0
  178. package/dist/components/_shared/privacy-mask.d.ts +29 -0
  179. package/dist/components/address-autocomplete/index.js +1 -1
  180. package/dist/components/address-fields/index.js +1 -1
  181. package/dist/components/agenda-card/index.js +1 -1
  182. package/dist/components/agenda-tray/index.js +1 -1
  183. package/dist/components/ai-credits-notice/index.js +1 -1
  184. package/dist/components/ai-permission-notice/index.js +1 -1
  185. package/dist/components/ai-prompt-input/index.js +1 -1
  186. package/dist/components/anamnesis-card/index.js +1 -1
  187. package/dist/components/anamnesis-summary-card/index.js +1 -1
  188. package/dist/components/appointment-card/index.js +2 -2
  189. package/dist/components/appointment-details-panel/appointment-details-panel.agent.d.ts +4 -0
  190. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +134 -0
  191. package/dist/components/appointment-details-panel/appointment-details-panel.focus.d.ts +7 -0
  192. package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +12 -0
  193. package/dist/components/appointment-details-panel/appointment-details-panel.identity.d.ts +41 -0
  194. package/dist/{patterns/calendar/calendar-info-hover.d.ts → components/appointment-details-panel/appointment-details-panel.info-hover.d.ts} +1 -1
  195. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +51 -0
  196. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +326 -0
  197. package/dist/components/appointment-details-panel/index.d.ts +8 -0
  198. package/dist/components/appointment-details-panel/index.js +8 -0
  199. package/dist/components/appointment-details-panel/use-appointment-details-read.d.ts +32 -0
  200. package/dist/components/appointment-peek/index.js +1 -1
  201. package/dist/components/appointment-timeline/index.js +1 -1
  202. package/dist/components/audio-recorder/index.js +1 -1
  203. package/dist/components/autocomplete/index.js +1 -1
  204. package/dist/components/avatar/index.js +1 -1
  205. package/dist/components/badge/index.js +1 -1
  206. package/dist/components/bishop-score/index.js +1 -1
  207. package/dist/components/bmi-calculator/index.js +1 -1
  208. package/dist/components/booking/cascade.d.ts +5 -0
  209. package/dist/components/booking/index.js +1 -1
  210. package/dist/components/breadcrumb/index.js +1 -1
  211. package/dist/components/button/button.d.ts +2 -1
  212. package/dist/components/button/index.js +2 -2
  213. package/dist/components/button-group/button-group.d.ts +19 -2
  214. package/dist/components/button-group/index.js +1 -1
  215. package/dist/components/calendar/calendar.d.ts +5 -1
  216. package/dist/components/calendar/index.js +1 -1
  217. package/dist/components/calendar-event-card/index.js +1 -1
  218. package/dist/components/care-plan-card/index.js +1 -1
  219. package/dist/components/care-plan-entry-card/index.js +1 -1
  220. package/dist/components/care-plan-header/index.js +1 -1
  221. package/dist/components/carousel/index.js +1 -1
  222. package/dist/components/chart/index.js +1 -1
  223. package/dist/components/chat-input/index.js +1 -1
  224. package/dist/components/chat-message/index.js +1 -1
  225. package/dist/components/city-input/index.js +1 -1
  226. package/dist/components/clinical-note-card/clinical-note-card.d.ts +13 -5
  227. package/dist/components/clinical-note-card/index.js +1 -1
  228. package/dist/components/combobox/combobox.d.ts +9 -4
  229. package/dist/components/combobox/index.js +1 -1
  230. package/dist/components/command-palette/index.js +1 -1
  231. package/dist/components/connection-status/index.js +1 -1
  232. package/dist/components/contact-profile-card/index.js +1 -1
  233. package/dist/components/control-room-rail/control-room-rail.d.ts +14 -3
  234. package/dist/components/control-room-rail/index.js +1 -1
  235. package/dist/components/copy-field/index.js +1 -1
  236. package/dist/components/country-select/index.js +1 -1
  237. package/dist/components/cycle-calculator/index.js +1 -1
  238. package/dist/components/dashboard-grid/index.js +1 -1
  239. package/dist/components/data-table/filters/number-filter.d.ts +26 -12
  240. package/dist/components/data-table/index.js +4 -4
  241. package/dist/components/data-table-tabs/index.js +1 -1
  242. package/dist/components/dependent-selector/index.js +1 -1
  243. package/dist/components/description-list/index.js +1 -1
  244. package/dist/components/document-preview/index.js +1 -1
  245. package/dist/components/document-scanner/index.js +1 -1
  246. package/dist/components/dropdown-menu/index.js +1 -1
  247. package/dist/components/due-date-calculator/index.js +2 -2
  248. package/dist/components/editable-description/index.js +1 -1
  249. package/dist/components/editor-overlay/index.js +1 -1
  250. package/dist/components/empty-state/index.js +1 -1
  251. package/dist/components/entity-summary/index.js +1 -1
  252. package/dist/components/error-boundary/index.js +1 -1
  253. package/dist/components/face-scheme/index.js +1 -1
  254. package/dist/components/fetal-weight/index.js +1 -1
  255. package/dist/components/field-array/index.js +1 -1
  256. package/dist/components/file-manager/index.js +1 -1
  257. package/dist/components/file-upload/index.js +1 -1
  258. package/dist/components/finished-terminal/index.js +1 -1
  259. package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +7 -0
  260. package/dist/components/fiscal-code-input/index.d.ts +1 -1
  261. package/dist/components/fiscal-code-input/index.js +8 -7
  262. package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +19 -4
  263. package/dist/components/freemium-paywall/index.js +1 -1
  264. package/dist/components/gestational-age-calculator/index.js +1 -1
  265. package/dist/components/hcg-doubling/index.js +1 -1
  266. package/dist/components/header/index.js +1 -1
  267. package/dist/components/header-settings/index.js +1 -1
  268. package/dist/components/hover-card/index.js +1 -1
  269. package/dist/components/icon-button/index.js +1 -1
  270. package/dist/components/icon-button-group/index.js +1 -1
  271. package/dist/components/icon-picker/index.js +1 -1
  272. package/dist/components/image-cropper/index.js +1 -1
  273. package/dist/components/index.d.ts +2 -0
  274. package/dist/components/info-tip/index.js +1 -1
  275. package/dist/components/key-value-pair/index.js +1 -1
  276. package/dist/components/locale-picker/index.js +1 -1
  277. package/dist/components/map-view/index.js +1 -1
  278. package/dist/components/message-card/index.js +1 -1
  279. package/dist/components/message-tray/index.js +1 -1
  280. package/dist/components/multi-select/index.js +1 -1
  281. package/dist/components/muscle-scheme/index.js +1 -1
  282. package/dist/components/note-timeline/index.js +1 -1
  283. package/dist/components/notes-panel/index.d.ts +1 -1
  284. package/dist/components/notes-panel/index.js +1 -1
  285. package/dist/components/notes-panel/notes-panel.d.ts +102 -26
  286. package/dist/components/notification-card/index.js +1 -1
  287. package/dist/components/notification-tray/index.js +1 -1
  288. package/dist/components/operator-hero/index.js +1 -1
  289. package/dist/components/optical-prescription/index.js +1 -1
  290. package/dist/components/pagination/index.js +1 -1
  291. package/dist/components/panel-subview/index.js +1 -1
  292. package/dist/components/patient-details/index.js +1 -1
  293. package/dist/components/patient-search/index.js +1 -1
  294. package/dist/components/patient-summary-card/index.js +1 -1
  295. package/dist/components/patient-table/index.js +1 -1
  296. package/dist/components/payment-card/index.js +1 -1
  297. package/dist/components/periodontal-chart/index.js +1 -1
  298. package/dist/components/periodontal-chart-card/index.js +1 -1
  299. package/dist/components/periodontal-diagnosis/index.js +1 -1
  300. package/dist/components/periodontal-risk-chart/index.js +1 -1
  301. package/dist/components/phone-input/index.js +1 -1
  302. package/dist/components/popover/index.js +1 -1
  303. package/dist/components/practice-profile-hero/index.js +1 -1
  304. package/dist/components/practice-results/index.js +1 -1
  305. package/dist/components/pregnancy-dating/index.js +1 -1
  306. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  307. package/dist/components/privacy-lock/index.js +1 -1
  308. package/dist/components/product-hub-tray/index.js +1 -1
  309. package/dist/components/province-select/index.js +1 -1
  310. package/dist/components/public-header/index.js +1 -1
  311. package/dist/components/radiograph-panel/index.js +1 -1
  312. package/dist/components/reviews-panel/index.js +1 -1
  313. package/dist/components/rich-text-editor/index.js +2 -2
  314. package/dist/components/search-bar/index.js +1 -1
  315. package/dist/components/select/index.js +1 -1
  316. package/dist/components/session-countdown/index.js +1 -1
  317. package/dist/components/sheet/index.js +1 -1
  318. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  319. package/dist/components/signature-field/signature-field.d.ts +1 -1
  320. package/dist/components/signature-status-chip/index.js +1 -1
  321. package/dist/components/skeleton-scheme/index.js +17 -17
  322. package/dist/components/slot-grid/index.js +1 -1
  323. package/dist/components/streaming-text/index.js +1 -1
  324. package/dist/components/tab-bar/index.js +1 -1
  325. package/dist/components/tabs/index.js +1 -1
  326. package/dist/components/tag/index.js +1 -1
  327. package/dist/components/task-card/index.js +1 -1
  328. package/dist/components/task-card/task-card.d.ts +7 -0
  329. package/dist/components/task-editor/index.d.ts +4 -0
  330. package/dist/components/task-editor/index.js +6 -0
  331. package/dist/components/task-editor/task-editor.agent.d.ts +4 -0
  332. package/dist/components/task-editor/task-editor.d.ts +240 -0
  333. package/dist/components/task-editor/use-task-editor-form.d.ts +101 -0
  334. package/dist/components/task-tray/index.js +1 -1
  335. package/dist/components/tasks-panel/index.d.ts +1 -1
  336. package/dist/components/tasks-panel/index.js +1 -1
  337. package/dist/components/tasks-panel/tasks-panel.d.ts +84 -12
  338. package/dist/components/theme-toggle/index.js +1 -1
  339. package/dist/components/timeline/index.js +1 -1
  340. package/dist/components/toast/index.js +1 -1
  341. package/dist/components/token-insert-menu/index.js +1 -1
  342. package/dist/components/tool-rail/index.js +1 -1
  343. package/dist/components/tooth-scheme/index.js +1 -1
  344. package/dist/components/treatment-receipt/index.js +1 -1
  345. package/dist/components/unit-converter/index.js +1 -1
  346. package/dist/components/variables-menu/index.js +1 -1
  347. package/dist/components/warning-stack/index.js +1 -1
  348. package/dist/components/widget-picker/index.js +1 -1
  349. package/dist/components/workflow/index.js +1 -1
  350. package/dist/components/workflow-status/appointment-workflow-status.d.ts +55 -0
  351. package/dist/components/workflow-status/index.d.ts +2 -0
  352. package/dist/components/workflow-status/index.js +7 -2
  353. package/dist/components/workflow-status/workflow-status.d.ts +35 -0
  354. package/dist/hooks/index.js +2 -2
  355. package/dist/hooks/use-exit-transition.d.ts +5 -0
  356. package/dist/hooks/use-priority-overflow.d.ts +11 -2
  357. package/dist/host-compat.css +7 -1
  358. package/dist/i18n/locales/ar.d.ts +48 -24
  359. package/dist/i18n/locales/ar.js +52 -28
  360. package/dist/i18n/locales/de.d.ts +48 -24
  361. package/dist/i18n/locales/de.js +52 -28
  362. package/dist/i18n/locales/el.d.ts +48 -24
  363. package/dist/i18n/locales/el.js +52 -28
  364. package/dist/i18n/locales/en.d.ts +34 -10
  365. package/dist/i18n/locales/en.js +39 -14
  366. package/dist/i18n/locales/es.d.ts +48 -24
  367. package/dist/i18n/locales/es.js +52 -28
  368. package/dist/i18n/locales/fr.d.ts +48 -24
  369. package/dist/i18n/locales/fr.js +52 -28
  370. package/dist/i18n/locales/hi.d.ts +48 -24
  371. package/dist/i18n/locales/hi.js +52 -28
  372. package/dist/i18n/locales/it.d.ts +34 -10
  373. package/dist/i18n/locales/it.js +39 -14
  374. package/dist/i18n/locales/ja.d.ts +48 -24
  375. package/dist/i18n/locales/ja.js +52 -28
  376. package/dist/i18n/locales/nl.d.ts +48 -24
  377. package/dist/i18n/locales/nl.js +52 -28
  378. package/dist/i18n/locales/pl.d.ts +48 -24
  379. package/dist/i18n/locales/pl.js +52 -28
  380. package/dist/i18n/locales/pt.d.ts +48 -24
  381. package/dist/i18n/locales/pt.js +52 -28
  382. package/dist/i18n/locales/ro.d.ts +48 -24
  383. package/dist/i18n/locales/ro.js +52 -28
  384. package/dist/i18n/locales/ru.d.ts +48 -24
  385. package/dist/i18n/locales/ru.js +52 -28
  386. package/dist/i18n/locales/sq.d.ts +48 -24
  387. package/dist/i18n/locales/sq.js +52 -28
  388. package/dist/i18n/locales/sv.d.ts +48 -24
  389. package/dist/i18n/locales/sv.js +52 -28
  390. package/dist/i18n/locales/tr.d.ts +48 -24
  391. package/dist/i18n/locales/tr.js +52 -28
  392. package/dist/i18n/locales/zh.d.ts +48 -24
  393. package/dist/i18n/locales/zh.js +52 -28
  394. package/dist/i18n/registerUiBundle.d.ts +5 -9
  395. package/dist/index.js +744 -730
  396. package/dist/locales/ar.json +52 -28
  397. package/dist/locales/de.json +52 -28
  398. package/dist/locales/el.json +52 -28
  399. package/dist/locales/en.json +38 -14
  400. package/dist/locales/es.json +52 -28
  401. package/dist/locales/fr.json +52 -28
  402. package/dist/locales/hi.json +52 -28
  403. package/dist/locales/it.json +38 -14
  404. package/dist/locales/ja.json +52 -28
  405. package/dist/locales/nl.json +52 -28
  406. package/dist/locales/pl.json +52 -28
  407. package/dist/locales/pt.json +52 -28
  408. package/dist/locales/ro.json +52 -28
  409. package/dist/locales/ru.json +52 -28
  410. package/dist/locales/sq.json +52 -28
  411. package/dist/locales/sv.json +52 -28
  412. package/dist/locales/tr.json +52 -28
  413. package/dist/locales/zh.json +52 -28
  414. package/dist/patterns/alia-assistant/index.js +1 -1
  415. package/dist/patterns/anamnesis/index.js +1 -1
  416. package/dist/patterns/calendar/calendar-appointment-details.d.ts +25 -95
  417. package/dist/patterns/calendar/calendar-patient-picker.d.ts +4 -3
  418. package/dist/patterns/calendar/calendar-privacy.d.ts +1 -22
  419. package/dist/patterns/calendar/calendar-sticky-offset.d.ts +20 -13
  420. package/dist/patterns/calendar/calendar-task-editor.d.ts +9 -13
  421. package/dist/patterns/calendar/calendar-workspace.d.ts +89 -8
  422. package/dist/patterns/calendar/calendar-workspace.model.d.ts +17 -12
  423. package/dist/patterns/calendar/calendar.journey.d.ts +40 -6
  424. package/dist/patterns/calendar/calendar.model.d.ts +10 -17
  425. package/dist/patterns/calendar/calendar.sheets.d.ts +18 -16
  426. package/dist/patterns/calendar/calendar.surface.d.ts +4 -1
  427. package/dist/patterns/calendar/calendar.types.d.ts +24 -100
  428. package/dist/patterns/calendar/index.d.ts +4 -3
  429. package/dist/patterns/calendar/index.js +1 -1
  430. package/dist/patterns/help-me-write-templates/index.js +1 -1
  431. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  432. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  433. package/dist/patterns/signature-request/index.js +1 -1
  434. package/dist/tokens.css +1 -1
  435. package/package.json +33 -16
  436. package/dist/_chunks/button-group-CA1tmu39.js +0 -325
  437. package/dist/_chunks/calendar-workspace-BmscntRR.js +0 -12528
  438. package/dist/_chunks/combobox-DnSdYssy.js +0 -522
  439. package/dist/_chunks/control-room-rail-CdBOXIqX.js +0 -366
  440. package/dist/_chunks/fiscal-code-input-ODQRd_Sw.js +0 -553
  441. package/dist/_chunks/icon-button-group-DZKC6KGf.js +0 -428
  442. package/dist/_chunks/link-cell-renderer-s3oHzOwi.js +0 -778
  443. package/dist/_chunks/notes-panel-CHbDDMx8.js +0 -683
  444. package/dist/_chunks/panel-subview-CYnuX-KR.js +0 -171
  445. package/dist/_chunks/tasks-panel-DncuBPIZ.js +0 -844
  446. package/dist/_chunks/use-list-reflow-Cw43nxw5.js +0 -100
  447. package/dist/_chunks/use-priority-overflow-c9SjxZkZ.js +0 -101
  448. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +0 -37
@@ -0,0 +1,1243 @@
1
+ import { jsx as c, jsxs as b, Fragment as we } from "react/jsx-runtime";
2
+ import { forwardRef as Ls, useId as Rt, useMemo as z, useState as R, useCallback as Ie, useRef as v, useEffect as G, useImperativeHandle as Is } from "react";
3
+ import { c as Hs } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as qs } from "react-i18next";
5
+ import { A as He } from "./alert-CiQ5Pa3Q.js";
6
+ import { B as $s } from "./badge-BAkd6_Pj.js";
7
+ import { B as Pe } from "./button-18oBsI3n.js";
8
+ import { I as qe } from "./icon-button-CY7GU_Se.js";
9
+ import { B as Et } from "./button-group-BSDqso_C.js";
10
+ import { P as Ws } from "./panel-header-D_mTdhUp.js";
11
+ import { S as Ot } from "./select-upNAltly.js";
12
+ import { S as Ks } from "./switch-OILsBLWo.js";
13
+ import { S as Vs } from "./skeleton-B1KTdJ4N.js";
14
+ import { E as $e } from "./empty-state-DTBZ1ENT.js";
15
+ import { T as Cs } from "./task-card-jaOhnj_q.js";
16
+ import { V as Gs } from "./visually-hidden-BHxEUGyT.js";
17
+ import { u as Us } from "./use-check-animation--I3cS00X.js";
18
+ import { a as Ys, u as Dt, R as _t } from "./use-list-reflow-C7O4Uqnl.js";
19
+ import { u as Fs } from "./use-theme-CAuo6EYT.js";
20
+ import { u as We } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
21
+ import { u as Qs } from "./registry-DvAUVLHh.js";
22
+ import { P as Xs } from "./plus-DzMQ_c6b.js";
23
+ import { C as Js } from "./clipboard-check-BeAGxDVT.js";
24
+ import { P as Zs } from "./pencil-B1sKKyuT.js";
25
+ import { X as en } from "./x-B5YnXwCz.js";
26
+ import { c as Se } from "./createLucideIcon-DhHxpK9K.js";
27
+ /**
28
+ * @license lucide-react v1.22.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */
33
+ const tn = [
34
+ ["path", { d: "M13.744 17.736a6 6 0 1 1-7.48-7.48", key: "bq4yh3" }],
35
+ ["path", { d: "M15 6h1v4", key: "11y1tn" }],
36
+ ["path", { d: "m6.134 14.768.866-.5 2 3.464", key: "17snzx" }],
37
+ ["circle", { cx: "16", cy: "8", r: "6", key: "14bfc9" }]
38
+ ], sn = Se("coins", tn);
39
+ /**
40
+ * @license lucide-react v1.22.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ const nn = [
46
+ ["path", { d: "M10.5 3 8 9l4 13 4-13-2.5-6", key: "b3dvk1" }],
47
+ [
48
+ "path",
49
+ {
50
+ d: "M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",
51
+ key: "7w4byz"
52
+ }
53
+ ],
54
+ ["path", { d: "M2 9h20", key: "16fsjt" }]
55
+ ], rn = Se("gem", nn);
56
+ /**
57
+ * @license lucide-react v1.22.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */
62
+ const an = [
63
+ [
64
+ "path",
65
+ {
66
+ d: "M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",
67
+ key: "q8bfy3"
68
+ }
69
+ ],
70
+ ["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14", key: "1853fq" }],
71
+ ["path", { d: "M8 6v8", key: "15ugcq" }]
72
+ ], on = Se("megaphone", an);
73
+ /**
74
+ * @license lucide-react v1.22.0 - ISC
75
+ *
76
+ * This source code is licensed under the ISC license.
77
+ * See the LICENSE file in the root directory of this source tree.
78
+ */
79
+ const cn = [
80
+ [
81
+ "path",
82
+ {
83
+ d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
84
+ key: "vktsd0"
85
+ }
86
+ ],
87
+ ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
88
+ ], jt = Se("tag", cn), dn = {
89
+ id: "tasks-panel",
90
+ // 'pick' backs select_item (non-persisting activation, matching
91
+ // AppointmentTimeline); 'dismiss' backs dismiss; 'scroll' backs
92
+ // jump_to_overdue (re-anchors the viewport); 'filter' backs set_filter (the
93
+ // status / type / assignee / overdue filter bar is genuinely stateful);
94
+ // 'view_change' backs change_scope (the patient ↔ mine segment); 'paginate'
95
+ // backs load_more (append the next page of tasks).
96
+ capabilities: [
97
+ "pick",
98
+ "dismiss",
99
+ "scroll",
100
+ "filter",
101
+ "view_change",
102
+ "paginate"
103
+ ],
104
+ state: {
105
+ items: {
106
+ type: "Array<{ id: string; status: string }>",
107
+ descriptionKey: "ui.agent.tasksPanel.state.items",
108
+ description: "Currently-rendered tasks. Ids + status only — never task note / patient.",
109
+ read: (o) => o.getItems()
110
+ }
111
+ },
112
+ actions: {
113
+ select_item: {
114
+ safety: "read",
115
+ argsType: "{ id: string }",
116
+ argsSchema: {
117
+ type: "object",
118
+ properties: { id: { type: "string" } },
119
+ required: ["id"]
120
+ },
121
+ idempotent: !0,
122
+ descriptionKey: "ui.agent.tasksPanel.actions.selectItem",
123
+ description: "Activate the task with the given id.",
124
+ invoke: (o, a) => {
125
+ o.selectItem(a.id);
126
+ }
127
+ },
128
+ toggle_done: {
129
+ safety: "write",
130
+ argsType: "{ id: string }",
131
+ argsSchema: {
132
+ type: "object",
133
+ properties: { id: { type: "string" } },
134
+ required: ["id"]
135
+ },
136
+ // Reaches the host's data source; settles with the host's answer.
137
+ openWorld: !0,
138
+ descriptionKey: "ui.agent.tasksPanel.actions.toggleDone",
139
+ description: "Request the host to toggle the done state of a task.",
140
+ invoke: (o, a) => o.toggleDone(a.id)
141
+ },
142
+ dismiss: {
143
+ safety: "destructive",
144
+ argsType: "{ id: string }",
145
+ argsSchema: {
146
+ type: "object",
147
+ properties: { id: { type: "string" } },
148
+ required: ["id"]
149
+ },
150
+ idempotent: !0,
151
+ // Reaches the host's data source; settles with the host's answer.
152
+ openWorld: !0,
153
+ descriptionKey: "ui.agent.tasksPanel.actions.dismiss",
154
+ description: "Request the host to dismiss / remove the task with the given id.",
155
+ invoke: (o, a) => o.dismiss(a.id)
156
+ },
157
+ jump_to_overdue: {
158
+ safety: "read",
159
+ idempotent: !0,
160
+ descriptionKey: "ui.agent.tasksPanel.actions.jumpToOverdue",
161
+ description: "Re-anchor the panel scroll on the overdue tasks.",
162
+ invoke: (o) => {
163
+ o.jumpToOverdue();
164
+ }
165
+ },
166
+ set_filter: {
167
+ safety: "read",
168
+ argsType: "{ status?: 'todo' | 'done' | 'all'; type?: string | null; assignee?: string | null; overdueOnly?: boolean }",
169
+ argsSchema: {
170
+ type: "object",
171
+ properties: {
172
+ status: { type: "string", enum: ["todo", "done", "all"] },
173
+ type: { type: ["string", "null"] },
174
+ assignee: { type: ["string", "null"] },
175
+ overdueOnly: { type: "boolean" }
176
+ }
177
+ },
178
+ idempotent: !0,
179
+ descriptionKey: "ui.agent.tasksPanel.actions.setFilter",
180
+ description: "Set the task filters (status segment, type, assignee, overdue-only). Omitted keys are left unchanged. Unchanged values are not re-sent. In server-filtered panels, choosing status 'done' clears overdueOnly.",
181
+ invoke: (o, a) => {
182
+ o.setFilter(a);
183
+ }
184
+ },
185
+ change_scope: {
186
+ safety: "read",
187
+ argsType: "{ scope: 'patient' | 'mine' }",
188
+ argsSchema: {
189
+ type: "object",
190
+ properties: { scope: { type: "string", enum: ["patient", "mine"] } },
191
+ required: ["scope"]
192
+ },
193
+ idempotent: !0,
194
+ descriptionKey: "ui.agent.tasksPanel.actions.changeScope",
195
+ description: "Switch the task scope segment between this patient ('patient') and the operator's own tasks ('mine'). The host re-feeds the items.",
196
+ invoke: (o, a) => {
197
+ o.changeScope(a.scope);
198
+ }
199
+ },
200
+ load_more: {
201
+ safety: "read",
202
+ // Requests the host to append the next page — not idempotent (each call
203
+ // advances the page) and reaches the host data source.
204
+ openWorld: !0,
205
+ descriptionKey: "ui.agent.tasksPanel.actions.loadMore",
206
+ description: "Request the host to append the next page of tasks.",
207
+ invoke: (o) => {
208
+ o.loadMore();
209
+ }
210
+ }
211
+ },
212
+ domHooks: {
213
+ root: {
214
+ attr: "data-component",
215
+ value: "tasks-panel",
216
+ description: "Marks the TasksPanel wrapper."
217
+ },
218
+ instanceId: {
219
+ attr: "data-component-id",
220
+ sourceProp: "id",
221
+ description: "Sourced from the id prop. Required to address a specific panel from the agent."
222
+ },
223
+ item: {
224
+ attr: "data-task-id",
225
+ description: "Stable task id emitted on each rendered TaskCard inside the panel."
226
+ }
227
+ }
228
+ }, ln = 96, un = {
229
+ status: "todo",
230
+ type: null,
231
+ assignee: null,
232
+ overdueOnly: !1
233
+ }, Nt = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Set();
234
+ function Ke(o) {
235
+ return o.map((a) => `${a.id}:${a.status ?? "open"}`).join("|");
236
+ }
237
+ function fn(o, a) {
238
+ return o.status === a.status && o.type === a.type && o.assignee === a.assignee && o.overdueOnly === a.overdueOnly;
239
+ }
240
+ function pn(o, a) {
241
+ return o.status === a.status && (o.type || null) === (a.type || null) && (o.assignee || null) === (a.assignee || null) && o.overdueOnly === a.overdueOnly;
242
+ }
243
+ function xe(o) {
244
+ const a = Promise.reject(o);
245
+ return a.catch(() => {
246
+ }), a;
247
+ }
248
+ function mn(o) {
249
+ try {
250
+ return new Intl.NumberFormat(o);
251
+ } catch {
252
+ return new Intl.NumberFormat();
253
+ }
254
+ }
255
+ function vn(o) {
256
+ const a = Promise.resolve(o);
257
+ return a.catch(() => {
258
+ }), a;
259
+ }
260
+ const hn = Hs(
261
+ [
262
+ "ds:flex ds:flex-col ds:h-full ds:min-h-0",
263
+ "ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
264
+ ].join(" "),
265
+ {
266
+ variants: { size: { xs: "", sm: "", md: "" } },
267
+ defaultVariants: { size: "sm" }
268
+ }
269
+ ), gn = [
270
+ "ds:flex-1 ds:min-h-0 ds:overflow-y-auto",
271
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
272
+ "ds:px-[var(--spacing-md)] ds:py-[var(--spacing-xs)]",
273
+ "ds:[--tpl-mask-top:black] ds:[--tpl-mask-bottom:black]",
274
+ "ds:data-[fade-top=true]:[--tpl-mask-top:transparent]",
275
+ "ds:data-[fade-bottom=true]:[--tpl-mask-bottom:transparent]",
276
+ "ds:[mask-image:linear-gradient(to_bottom,var(--tpl-mask-top)_0,black_var(--tpl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tpl-fade-distance,var(--spacing-lg))),var(--tpl-mask-bottom)_100%)]",
277
+ "ds:motion-reduce:[mask-image:none]",
278
+ "ds:[.theme-accessible_&]:[mask-image:none]",
279
+ "ds:forced-colors:[mask-image:none]",
280
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
281
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
282
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
283
+ ].join(" "), yn = [
284
+ "ds:shadow-[var(--shadow-card)] ds:bg-[color:var(--card)]",
285
+ // Declared at rest, not only while leaving: a transition added at the
286
+ // same moment as the value it animates has nothing to move from.
287
+ "ds:transition-opacity ds:duration-[var(--animation-duration)]",
288
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
289
+ ].join(" "), zt = "ds:opacity-0", kn = 12;
290
+ function bn({
291
+ item: o,
292
+ checked: a,
293
+ pending: h,
294
+ label: g,
295
+ reduceMotion: k,
296
+ onToggle: u
297
+ }) {
298
+ const {
299
+ checked: f,
300
+ drawing: y,
301
+ toggle: E
302
+ } = Us({
303
+ checked: a,
304
+ reduceMotion: k
305
+ }), D = v({ shown: f, checked: a, toggle: E });
306
+ D.current = { shown: f, checked: a, toggle: E };
307
+ const re = f ? (
308
+ // `--accent` is magenta-700 in light, the step that clears AA there.
309
+ "ds:text-[color:var(--accent)]"
310
+ ) : o.priority === "high" ? "ds:text-[color:var(--destructive)]" : "ds:text-[color:var(--muted-foreground)]";
311
+ return /* @__PURE__ */ c(
312
+ "button",
313
+ {
314
+ type: "button",
315
+ role: "checkbox",
316
+ "aria-checked": f,
317
+ "aria-label": g,
318
+ "aria-disabled": h || void 0,
319
+ "data-action": "toggle-done",
320
+ "data-drawing": y ? "" : void 0,
321
+ onClick: () => {
322
+ if (h) return;
323
+ const N = !f, U = u(o, N);
324
+ U.started && (E(), U.result.catch(() => {
325
+ const S = D.current;
326
+ S.shown === N && S.checked !== N && S.toggle();
327
+ }));
328
+ },
329
+ className: [
330
+ "ds:group/check ds:flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
331
+ // 16px glyph + 4px each side = 24px; the accessible theme lifts it
332
+ // to the full target size.
333
+ "ds:p-[var(--spacing-xs)]",
334
+ "ds:[.theme-accessible_&]:min-h-[var(--min-target-size)] ds:[.theme-accessible_&]:min-w-[var(--min-target-size)]",
335
+ "ds:hover:bg-[color:var(--muted)]/40 ds:aria-disabled:cursor-progress",
336
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:forced-colors:focus-visible:outline-[CanvasText]",
337
+ re
338
+ ].join(" "),
339
+ children: /* @__PURE__ */ b(
340
+ "svg",
341
+ {
342
+ viewBox: "0 0 18 18",
343
+ "aria-hidden": "true",
344
+ className: "ds:size-4 ds:transition-transform ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:group-data-[drawing]/check:scale-110 ds:motion-reduce:transition-none",
345
+ children: [
346
+ /* @__PURE__ */ c(
347
+ "rect",
348
+ {
349
+ x: "1.5",
350
+ y: "1.5",
351
+ width: "15",
352
+ height: "15",
353
+ rx: "4",
354
+ className: "ds:fill-none ds:stroke-current ds:[stroke-width:1.5]"
355
+ }
356
+ ),
357
+ /* @__PURE__ */ c(
358
+ "path",
359
+ {
360
+ d: "M5 9.25 L7.75 12 L13 6.25",
361
+ strokeDashoffset: f ? 0 : kn,
362
+ className: "ds:fill-none ds:stroke-current ds:[stroke-width:2] ds:[stroke-linecap:round] ds:[stroke-linejoin:round] ds:[stroke-dasharray:12] ds:transition-[stroke-dashoffset] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
363
+ }
364
+ )
365
+ ]
366
+ }
367
+ )
368
+ }
369
+ );
370
+ }
371
+ const wn = {
372
+ recall: { variant: "info", Icon: on },
373
+ payment: { variant: "warning", Icon: rn },
374
+ collection: { variant: "error", Icon: sn },
375
+ other: { variant: "neutral", Icon: jt }
376
+ }, Pn = [
377
+ "overdue",
378
+ "today",
379
+ "tomorrow",
380
+ "thisWeek",
381
+ "later",
382
+ "done"
383
+ ];
384
+ function xn(o) {
385
+ return new Date(o.getFullYear(), o.getMonth(), o.getDate());
386
+ }
387
+ function Bt(o) {
388
+ const a = xn(o), h = new Date(a);
389
+ h.setDate(a.getDate() + 1);
390
+ const g = new Date(a);
391
+ g.setDate(a.getDate() + 2);
392
+ const k = (a.getDay() + 6) % 7, u = new Date(a);
393
+ return u.setDate(a.getDate() + (7 - k)), {
394
+ startOfToday: +a,
395
+ startOfTomorrow: +h,
396
+ startOfDayAfter: +g,
397
+ startOfNextWeek: +u
398
+ };
399
+ }
400
+ function Sn(o, a, h) {
401
+ if (a) return "done";
402
+ const { startOfToday: g, startOfTomorrow: k, startOfDayAfter: u, startOfNextWeek: f } = Bt(h), y = +new Date(o.dueIso);
403
+ return y < g ? "overdue" : y < k ? "today" : y < u ? "tomorrow" : y < f ? "thisWeek" : "later";
404
+ }
405
+ function Tn(o, a) {
406
+ return o.status === "done" ? !1 : +new Date(o.dueIso) < Bt(a).startOfTomorrow;
407
+ }
408
+ function Rn(o, a, h) {
409
+ const g = /* @__PURE__ */ new Map();
410
+ for (const u of o) {
411
+ const f = Sn(u, h(u), a), y = g.get(f);
412
+ y ? y.push(u) : g.set(f, [u]);
413
+ }
414
+ const k = [];
415
+ for (const u of Pn) {
416
+ const f = g.get(u);
417
+ !f || f.length === 0 || (f.sort((y, E) => +new Date(y.dueIso) - +new Date(E.dueIso)), k.push({ key: u, items: f }));
418
+ }
419
+ return k;
420
+ }
421
+ const En = Ls(
422
+ ({
423
+ id: o,
424
+ items: a,
425
+ nowIso: h,
426
+ title: g,
427
+ icon: k,
428
+ totalCount: u,
429
+ size: f = "sm",
430
+ filtering: y = "client",
431
+ onOpenTask: E,
432
+ onToggleDone: D,
433
+ onEditTask: re,
434
+ onDismissTask: N,
435
+ onAddTask: U,
436
+ readOnly: S = !1,
437
+ renderItemActions: Te,
438
+ renderItemExtraActions: Re,
439
+ scope: Ee,
440
+ defaultScope: Mt,
441
+ onScopeChange: ae,
442
+ availableScopes: B,
443
+ onLoadMore: H,
444
+ hasMore: Oe,
445
+ loadingMore: Y = !1,
446
+ loading: w = !1,
447
+ error: P = !1,
448
+ onRetry: oe,
449
+ showFilters: Lt = !0,
450
+ defaultFilters: It,
451
+ onFiltersChange: M,
452
+ statusFilter: Ve,
453
+ defaultStatusFilter: Ht,
454
+ onStatusFilterChange: ie,
455
+ typeOptions: ce,
456
+ typeFilter: De,
457
+ onTypeFilterChange: de,
458
+ assigneeOptions: le,
459
+ assigneeFilter: Ne,
460
+ onAssigneeFilterChange: ue,
461
+ overdueOnly: Ce,
462
+ defaultOverdueOnly: qt,
463
+ onOverdueOnlyChange: fe,
464
+ emptyTitle: $t,
465
+ emptyDescription: Wt,
466
+ emptyAction: Kt,
467
+ className: Vt,
468
+ "aria-label": Ge,
469
+ ...Ct
470
+ }, Gt) => {
471
+ const { t: d, i18n: Ue } = qs(), Ye = Rt(), Ut = Rt(), Ae = g ?? d("tasksPanel.title"), p = y === "server", q = {
472
+ status: !p || !!M || !!ie,
473
+ type: !p || !!M || !!de,
474
+ assignee: !p || !!M || !!ue,
475
+ overdueOnly: !p || !!M || !!fe
476
+ }, Yt = {
477
+ todo: d("tasksPanel.status.todo"),
478
+ done: d("tasksPanel.status.done"),
479
+ all: d("tasksPanel.status.all")
480
+ }, Ft = {
481
+ patient: d("tasksPanel.scope.patient"),
482
+ mine: d("tasksPanel.scope.mine")
483
+ }, Qt = {
484
+ overdue: d("tasksPanel.buckets.overdue"),
485
+ today: d("tasksPanel.buckets.today"),
486
+ tomorrow: d("tasksPanel.buckets.tomorrow"),
487
+ thisWeek: d("tasksPanel.buckets.thisWeek"),
488
+ later: d("tasksPanel.buckets.later"),
489
+ done: d("tasksPanel.buckets.done")
490
+ }, Xt = {
491
+ recall: d("tasksPanel.types.recall"),
492
+ payment: d("tasksPanel.types.payment"),
493
+ collection: d("tasksPanel.types.collection"),
494
+ other: d("tasksPanel.types.other")
495
+ }, pe = z(
496
+ () => h ? new Date(h) : /* @__PURE__ */ new Date(),
497
+ [h]
498
+ ), Fe = z(
499
+ () => mn(Ue.language),
500
+ [Ue.language]
501
+ ), Qe = (e) => d("tasksPanel.bracketedCount", { value: Fe.format(e) }), [Jt, Zt] = R(
502
+ Mt ?? (B == null ? void 0 : B[0]) ?? "patient"
503
+ ), es = Ee ?? Jt, Xe = Ie(
504
+ (e) => {
505
+ Ee === void 0 && Zt(e), ae == null || ae(e);
506
+ },
507
+ [Ee, ae]
508
+ ), A = It ?? un, [ts, ss] = R(
509
+ Ht ?? A.status
510
+ ), [ns, rs] = R(A.type), [as, os] = R(
511
+ A.assignee
512
+ ), [is, cs] = R(
513
+ qt ?? A.overdueOnly
514
+ ), O = Ve ?? ts, L = De !== void 0 ? De : ns, I = Ne !== void 0 ? Ne : as, $ = Ce ?? is, Je = p ? $ && O !== "done" : $, me = v({
515
+ status: O,
516
+ type: L,
517
+ assignee: I,
518
+ overdueOnly: $
519
+ });
520
+ me.current = {
521
+ status: O,
522
+ type: L,
523
+ assignee: I,
524
+ overdueOnly: $
525
+ };
526
+ const W = (e) => {
527
+ const t = Object.fromEntries(
528
+ Object.entries(e).filter(
529
+ ([l]) => q[l]
530
+ )
531
+ );
532
+ if (Object.keys(e).length > 0 && Object.keys(t).length === 0)
533
+ return;
534
+ const s = me.current, r = p && s.status === "done" && s.overdueOnly ? { ...s, overdueOnly: !1 } : s, n = { ...r, ...t }, i = new Set(Object.keys(t));
535
+ r !== s && i.add("overdueOnly"), p && n.status === "done" && n.overdueOnly && (t.status !== void 0 ? (n.overdueOnly = !1, i.add("overdueOnly")) : (n.status = A.status === "done" ? "todo" : A.status, i.add("status"))), me.current = n, Ve === void 0 && ss(n.status), De === void 0 && rs(n.type), Ne === void 0 && os(n.assignee), Ce === void 0 && cs(n.overdueOnly), i.has("status") && (ie == null || ie(n.status)), i.has("type") && (de == null || de(n.type)), i.has("assignee") && (ue == null || ue(n.assignee)), i.has("overdueOnly") && (fe == null || fe(n.overdueOnly)), fn(s, n) || M == null || M(n);
536
+ }, ds = () => W({ ...A }), [F, ls] = R(Nt), T = v(Nt), [Ze, us] = R(At), Q = v(At), X = v(!0), _e = v(/* @__PURE__ */ new Set());
537
+ G(() => {
538
+ X.current = !0;
539
+ const e = _e.current;
540
+ return () => {
541
+ X.current = !1, e.forEach(
542
+ (t) => t(new Error("TasksPanel: closed before the host was told."))
543
+ ), e.clear();
544
+ };
545
+ }, []);
546
+ const _ = (e) => {
547
+ const t = new Map(T.current);
548
+ e(t), T.current = t, ls(t);
549
+ }, je = (e) => {
550
+ const t = new Set(Q.current);
551
+ e(t), Q.current = t, us(t);
552
+ }, K = z(() => p ? a.filter((e) => !Ze.has(e.id)) : a.filter((e) => {
553
+ const t = e.status === "done";
554
+ return !(O === "todo" && t || O === "done" && !t || L && e.type !== L || I && (e.assignee ?? "") !== I || $ && !Tn(e, pe));
555
+ }), [
556
+ p,
557
+ Ze,
558
+ a,
559
+ O,
560
+ L,
561
+ I,
562
+ $,
563
+ pe
564
+ ]), ve = z(() => Rn(K, pe, (t) => {
565
+ if (p) {
566
+ const s = F.get(t.id);
567
+ if ((s == null ? void 0 : s.kind) === "done" && s.next !== void 0 && !s.leaves)
568
+ return s.next;
569
+ }
570
+ return t.status === "done";
571
+ }), [K, pe, p, F]), ze = z(
572
+ () => ve.flatMap((e) => e.items.map((t) => t.id)),
573
+ [ve]
574
+ ), J = v(null), et = v(null), [fs, ps] = R(!1), [ms, vs] = R(!1), Z = Ie(() => {
575
+ const e = J.current;
576
+ if (!e) return;
577
+ const { scrollTop: t, scrollHeight: s, clientHeight: r } = e;
578
+ ps(t > 1), vs(t + r < s - 1);
579
+ }, []);
580
+ We(() => {
581
+ Z();
582
+ }, [ve, Z]), We(() => {
583
+ const e = J.current;
584
+ if (!e || typeof ResizeObserver > "u") return;
585
+ const t = new ResizeObserver(Z);
586
+ return t.observe(e), () => t.disconnect();
587
+ }, [Z]);
588
+ const tt = p ? Oe === !0 : Oe ?? !!H, j = v(a);
589
+ j.current = a;
590
+ const hs = z(() => Ke(a), [a]), he = z(
591
+ () => a.map((e) => e.id).join("|"),
592
+ [a]
593
+ ), st = v(he);
594
+ st.current = he;
595
+ const ee = v(0), nt = v(w);
596
+ G(() => {
597
+ nt.current && !w && !P && (ee.current += 1), nt.current = w;
598
+ }, [w, P]);
599
+ const ge = v(!0), rt = v(""), at = v(0), Be = () => {
600
+ ge.current = !1, rt.current = st.current, at.current = ee.current, H == null || H();
601
+ };
602
+ G(() => {
603
+ ge.current || (he !== rt.current || ee.current > at.current) && (ge.current = !0);
604
+ }, [he, w, P]);
605
+ const gs = () => {
606
+ Z();
607
+ const e = J.current;
608
+ if (!e) return;
609
+ const { scrollTop: t, scrollHeight: s, clientHeight: r } = e;
610
+ H && tt && !w && !Y && ge.current && s - t - r <= ln && Be();
611
+ }, { resolvedTheme: ys } = Fs(), ye = ys.endsWith("-accessible") || void 0, { containerRef: ks } = Ys({
612
+ key: ze.join(),
613
+ reduceMotion: ye
614
+ }), te = Dt({ delayMs: 200, reduceMotion: ye }), se = Dt({ reduceMotion: ye }), Me = (e) => te.isLeaving(e) || se.isLeaving(e), bs = (e) => {
615
+ const { status: t, overdueOnly: s } = me.current;
616
+ return t === "todo" && e || t === "done" && !e || (p ? s && t !== "done" : s) && e;
617
+ }, ot = (e) => {
618
+ T.current.has(e) && _((t) => t.delete(e)), Q.current.has(e) && je((t) => t.delete(e)), te.cancel(e), se.cancel(e);
619
+ }, it = () => {
620
+ const e = j.current, t = Ke(e), s = new Map(e.map((i) => [i.id, i])), r = [], n = [];
621
+ T.current.forEach((i, l) => {
622
+ const m = s.get(l);
623
+ if (!m) {
624
+ r.push(l);
625
+ return;
626
+ }
627
+ if (!i.settled) return;
628
+ const Bs = i.kind === "done" && m.status === "done" === i.next, Ms = ee.current > i.edgeAtSettle || t !== i.sigAtSettle;
629
+ (Bs || Ms) && (r.push(l), n.push(l));
630
+ }), r.length !== 0 && (_((i) => r.forEach((l) => i.delete(l))), r.some((i) => Q.current.has(i)) && je((i) => r.forEach((l) => i.delete(l))), n.forEach((i) => {
631
+ te.cancel(i), se.cancel(i);
632
+ }));
633
+ }, ws = (e) => {
634
+ const t = T.current.get(e);
635
+ t && (_(
636
+ (s) => s.set(e, {
637
+ ...t,
638
+ settled: !0,
639
+ edgeAtSettle: ee.current,
640
+ sigAtSettle: Ke(j.current)
641
+ })
642
+ ), it());
643
+ };
644
+ G(() => {
645
+ p && it();
646
+ }, [p, hs, w, P]);
647
+ const ct = (e, t, s, r) => {
648
+ const n = e.id;
649
+ _((m) => m.set(n, t));
650
+ let i;
651
+ try {
652
+ i = s();
653
+ } catch (m) {
654
+ return ot(n), { started: !1, result: xe(m) };
655
+ }
656
+ t.leaves && r.leave(n, () => {
657
+ T.current.has(n) && je((m) => m.add(n));
658
+ });
659
+ const l = Promise.resolve(i);
660
+ return l.then(
661
+ () => {
662
+ X.current && ws(n);
663
+ },
664
+ () => {
665
+ X.current && ot(n);
666
+ }
667
+ ), { started: !0, result: l };
668
+ }, V = (e) => ({
669
+ started: !1,
670
+ result: xe(new Error(`TasksPanel: ${e}`))
671
+ }), ne = (e) => {
672
+ X.current && T.current.has(e) && _((t) => t.delete(e));
673
+ }, dt = (e, t, s) => {
674
+ let r, n;
675
+ const i = new Promise((l, m) => {
676
+ r = l, n = m;
677
+ });
678
+ return i.catch(() => {
679
+ }), _e.current.add(n), t.leave(e, () => {
680
+ _e.current.delete(n);
681
+ let l;
682
+ try {
683
+ l = s();
684
+ } catch (m) {
685
+ ne(e), n(m);
686
+ return;
687
+ }
688
+ Promise.resolve(l).then(
689
+ () => {
690
+ ne(e), r();
691
+ },
692
+ (m) => {
693
+ ne(e), n(m);
694
+ }
695
+ );
696
+ }), i;
697
+ }, lt = (e, t) => {
698
+ if (S) return V("the panel is read-only.");
699
+ if (!D) return V("the host gave no onToggleDone.");
700
+ const s = e.id;
701
+ if (T.current.has(s))
702
+ return V("a change to this task is already pending.");
703
+ const r = t ?? e.status !== "done", n = bs(r);
704
+ if (p)
705
+ return ct(
706
+ e,
707
+ {
708
+ kind: "done",
709
+ next: r,
710
+ leaves: n,
711
+ settled: !1,
712
+ edgeAtSettle: 0,
713
+ sigAtSettle: ""
714
+ },
715
+ () => D(e, r),
716
+ te
717
+ );
718
+ if (!n) {
719
+ let i;
720
+ try {
721
+ i = D(e, r);
722
+ } catch (l) {
723
+ return { started: !1, result: xe(l) };
724
+ }
725
+ return i instanceof Promise && (_(
726
+ (l) => l.set(s, {
727
+ kind: "done",
728
+ leaves: n,
729
+ settled: !1,
730
+ edgeAtSettle: 0,
731
+ sigAtSettle: ""
732
+ })
733
+ ), i.then(
734
+ () => ne(s),
735
+ () => ne(s)
736
+ )), { started: !0, result: vn(i) };
737
+ }
738
+ return _(
739
+ (i) => i.set(s, {
740
+ kind: "done",
741
+ next: r,
742
+ leaves: n,
743
+ settled: !1,
744
+ edgeAtSettle: 0,
745
+ sigAtSettle: ""
746
+ })
747
+ ), {
748
+ started: !0,
749
+ result: dt(s, te, () => D(e, r))
750
+ };
751
+ }, ut = (e) => {
752
+ if (S) return V("the panel is read-only.");
753
+ if (!N) return V("the host gave no onDismissTask.");
754
+ const t = e.id;
755
+ if (T.current.has(t))
756
+ return V("a change to this task is already pending.");
757
+ const s = {
758
+ kind: "dismiss",
759
+ leaves: !0,
760
+ settled: !1,
761
+ edgeAtSettle: 0,
762
+ sigAtSettle: ""
763
+ };
764
+ return p ? ct(
765
+ e,
766
+ s,
767
+ () => N(e),
768
+ se
769
+ ) : (_((r) => r.set(t, s)), {
770
+ started: !0,
771
+ result: dt(t, se, () => N(e))
772
+ });
773
+ }, ft = Ie(() => {
774
+ const e = J.current, t = et.current;
775
+ if (!e || !t) {
776
+ e == null || e.scrollTo({ top: 0 });
777
+ return;
778
+ }
779
+ const s = t.getBoundingClientRect().top - e.getBoundingClientRect().top;
780
+ e.scrollTo({ top: e.scrollTop + s });
781
+ }, []), ke = v(null);
782
+ Is(Gt, () => ke.current, []);
783
+ const C = v(null), be = v(ze);
784
+ be.current = ze, G(() => {
785
+ const e = ke.current;
786
+ if (!e) return;
787
+ const t = (r) => {
788
+ var l, m;
789
+ const n = r.target;
790
+ if (!(n instanceof HTMLElement)) return;
791
+ const i = ((l = n.closest("[data-task-id]")) == null ? void 0 : l.dataset.taskId) ?? null;
792
+ C.current = {
793
+ el: n,
794
+ rowId: i,
795
+ action: ((m = n.closest("[data-action]")) == null ? void 0 : m.dataset.action) ?? null,
796
+ index: i ? be.current.indexOf(i) : -1
797
+ };
798
+ }, s = (r) => {
799
+ const n = r.relatedTarget;
800
+ if (n instanceof Node) {
801
+ e.contains(n) || (C.current = null);
802
+ return;
803
+ }
804
+ const i = r.target;
805
+ queueMicrotask(() => {
806
+ const l = C.current;
807
+ l && l.el === i && l.el.isConnected && document.activeElement !== l.el && (C.current = null);
808
+ });
809
+ };
810
+ return e.addEventListener("focusin", t), e.addEventListener("focusout", s), () => {
811
+ e.removeEventListener("focusin", t), e.removeEventListener("focusout", s);
812
+ };
813
+ }, []), We(() => {
814
+ const e = C.current, t = ke.current;
815
+ if (!e || !t) return;
816
+ if (e.el.isConnected) {
817
+ e.rowId && (e.index = be.current.indexOf(e.rowId));
818
+ return;
819
+ }
820
+ C.current = null;
821
+ const s = document.activeElement;
822
+ if (s && s !== document.body) return;
823
+ const r = be.current, n = (m) => m && e.action ? t.querySelector(
824
+ `[data-task-id="${CSS.escape(m)}"] [data-action="${CSS.escape(e.action)}"]`
825
+ ) : null, l = (e.rowId ? n(e.rowId) : null) ?? (e.rowId && e.index >= 0 ? n(r[e.index]) ?? n(r[e.index - 1]) : null) ?? t.querySelector("[data-tasks-panel-region]") ?? t.querySelector(
826
+ '[data-status-filter][aria-pressed="true"]'
827
+ );
828
+ l == null || l.focus();
829
+ });
830
+ const pt = v(null);
831
+ pt.current = {
832
+ toggleDone: (e) => lt(e),
833
+ dismiss: (e) => ut(e),
834
+ onOpenTask: E,
835
+ loadMore: Be,
836
+ changeScope: Xe,
837
+ commitFilters: W,
838
+ serverMode: p
839
+ };
840
+ const Ps = z(() => {
841
+ const e = () => pt.current, t = (s) => xe(new Error(`TasksPanel: no task "${s}".`));
842
+ return {
843
+ getItems: () => e().serverMode ? j.current.filter((s) => !Q.current.has(s.id)).map((s) => {
844
+ const r = T.current.get(s.id), n = (r == null ? void 0 : r.kind) === "done" && r.next !== void 0 ? r.next ? "done" : "open" : s.status ?? "open";
845
+ return { id: s.id, status: n };
846
+ }) : j.current.map((s) => ({
847
+ id: s.id,
848
+ status: s.status ?? "open"
849
+ })),
850
+ selectItem: (s) => {
851
+ var n, i;
852
+ const r = j.current.find((l) => l.id === s);
853
+ r && ((i = (n = e()).onOpenTask) == null || i.call(n, r));
854
+ },
855
+ toggleDone: (s) => {
856
+ const r = j.current.find((n) => n.id === s);
857
+ return r ? e().toggleDone(r).result : t(s);
858
+ },
859
+ dismiss: (s) => {
860
+ const r = j.current.find((n) => n.id === s);
861
+ return r ? e().dismiss(r).result : t(s);
862
+ },
863
+ jumpToOverdue: ft,
864
+ setFilter: (s) => {
865
+ const r = {};
866
+ s.status !== void 0 && (r.status = s.status), s.type !== void 0 && (r.type = s.type), s.assignee !== void 0 && (r.assignee = s.assignee), s.overdueOnly !== void 0 && (r.overdueOnly = s.overdueOnly), e().commitFilters(r);
867
+ },
868
+ changeScope: (s) => e().changeScope(s),
869
+ loadMore: () => e().loadMore()
870
+ };
871
+ }, [ft]);
872
+ Qs(dn, Ps, o);
873
+ const xs = (e) => {
874
+ if (!e.type) return null;
875
+ const t = wn[e.type], s = (t == null ? void 0 : t.variant) ?? "neutral", r = (t == null ? void 0 : t.Icon) ?? jt, n = e.typeLabel || Xt[e.type] || d("tasksPanel.types.other");
876
+ return /* @__PURE__ */ c(
877
+ $s,
878
+ {
879
+ variant: s,
880
+ size: "sm",
881
+ leading: /* @__PURE__ */ c(r, { "aria-hidden": "true" }),
882
+ children: n
883
+ }
884
+ );
885
+ }, Ss = (e) => S ? null : /* @__PURE__ */ b(we, { children: [
886
+ re ? /* @__PURE__ */ c(
887
+ qe,
888
+ {
889
+ icon: /* @__PURE__ */ c(Zs, {}),
890
+ intent: "ghost",
891
+ size: "sm",
892
+ "aria-label": d("tasksPanel.edit"),
893
+ "data-action": "edit-task",
894
+ onClick: () => re(e)
895
+ }
896
+ ) : null,
897
+ N ? /* @__PURE__ */ c(
898
+ qe,
899
+ {
900
+ icon: /* @__PURE__ */ c(en, {}),
901
+ intent: "ghost",
902
+ size: "sm",
903
+ "aria-label": d("tasksPanel.dismiss"),
904
+ "data-action": "dismiss-task",
905
+ onClick: () => {
906
+ ut(e);
907
+ }
908
+ }
909
+ ) : null
910
+ ] }), Ts = (e) => {
911
+ const t = (Re == null ? void 0 : Re(e)) ?? null, r = (S ? null : Te == null ? void 0 : Te(e)) ?? Ss(e), n = xs(e);
912
+ if (!(!n && !t && !r))
913
+ return /* @__PURE__ */ b(we, { children: [
914
+ n,
915
+ t,
916
+ r
917
+ ] });
918
+ }, Rs = (e, t) => lt(e, t), mt = (e) => /* @__PURE__ */ c(
919
+ "div",
920
+ {
921
+ "aria-hidden": "true",
922
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
923
+ children: /* @__PURE__ */ c(Vs, { variant: "rectangular", height: "3.5rem" })
924
+ },
925
+ e
926
+ ), vt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: typeof P == "boolean" ? /* @__PURE__ */ c(
927
+ $e,
928
+ {
929
+ variant: "error",
930
+ size: "sm",
931
+ title: d("tasksPanel.error.title"),
932
+ description: d("tasksPanel.error.description"),
933
+ primaryAction: oe ? { label: d("emptyState.error.cta"), onClick: oe } : void 0
934
+ }
935
+ ) : P }), Le = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [0, 1, 2, 3].map((e) => mt(`skeleton-${e}`)) }), ht = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
936
+ $e,
937
+ {
938
+ variant: "first-use",
939
+ size: "sm",
940
+ title: $t ?? d("tasksPanel.empty.title"),
941
+ description: Wt ?? d("tasksPanel.empty.description"),
942
+ primaryAction: Kt
943
+ }
944
+ ) }), Es = Object.values(q).some(Boolean), gt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
945
+ $e,
946
+ {
947
+ variant: "no-results",
948
+ size: "sm",
949
+ title: d("tasksPanel.filteredEmpty.title"),
950
+ description: d("tasksPanel.filteredEmpty.description"),
951
+ primaryAction: Es ? {
952
+ label: d("tasksPanel.filteredEmpty.clear"),
953
+ onClick: ds
954
+ } : void 0
955
+ }
956
+ ) }), Os = p && P ? /* @__PURE__ */ c("div", { className: "ds:shrink-0 ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]", children: typeof P == "boolean" ? /* @__PURE__ */ b(He, { variant: "error", children: [
957
+ /* @__PURE__ */ c(He.Title, { as: "p", children: d("tasksPanel.error.title") }),
958
+ oe ? /* @__PURE__ */ c(He.Action, { children: /* @__PURE__ */ c(Pe, { intent: "outline", size: "sm", onClick: oe, children: d("emptyState.error.cta") }) }) : null
959
+ ] }) : P }) : null, yt = /* @__PURE__ */ b(we, { children: [
960
+ Os,
961
+ /* @__PURE__ */ b(
962
+ "div",
963
+ {
964
+ ref: (e) => {
965
+ J.current = e, ks.current = e;
966
+ },
967
+ tabIndex: 0,
968
+ onScroll: gs,
969
+ "data-tasks-panel-region": "",
970
+ "data-fade-top": fs ? "true" : void 0,
971
+ "data-fade-bottom": ms ? "true" : void 0,
972
+ className: gn,
973
+ children: [
974
+ /* @__PURE__ */ c(
975
+ "ol",
976
+ {
977
+ "aria-busy": w || void 0,
978
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0",
979
+ children: ve.map((e) => /* @__PURE__ */ b(
980
+ "li",
981
+ {
982
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
983
+ children: [
984
+ /* @__PURE__ */ c(
985
+ On,
986
+ {
987
+ bucketKey: e.key,
988
+ countLabel: Qe(e.items.length),
989
+ showCount: !(p && Oe === !0),
990
+ label: Qt[e.key],
991
+ headerRef: e.key === "overdue" ? et : void 0,
992
+ reflowId: `bucket-${e.key}`,
993
+ leaving: e.items.every((t) => Me(t.id))
994
+ }
995
+ ),
996
+ /* @__PURE__ */ c("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: e.items.map((t) => {
997
+ var s;
998
+ return /* @__PURE__ */ c(
999
+ Cs,
1000
+ {
1001
+ item: t,
1002
+ size: f,
1003
+ onActivate: E ? () => E(t) : void 0,
1004
+ actions: Ts(t),
1005
+ leading: D && !S ? /* @__PURE__ */ c(
1006
+ bn,
1007
+ {
1008
+ item: t,
1009
+ checked: ((s = F.get(t.id)) == null ? void 0 : s.next) ?? t.status === "done",
1010
+ pending: F.has(t.id),
1011
+ label: d("tasksPanel.doneItem", {
1012
+ title: t.title
1013
+ }),
1014
+ reduceMotion: ye,
1015
+ onToggle: Rs
1016
+ }
1017
+ ) : void 0,
1018
+ className: `${yn} ${_t}${Me(t.id) ? ` ${zt}` : ""}`,
1019
+ "data-leaving": Me(t.id) ? "" : void 0,
1020
+ "data-reflow-id": t.id,
1021
+ "data-task-id": t.id
1022
+ },
1023
+ t.id
1024
+ );
1025
+ }) })
1026
+ ]
1027
+ },
1028
+ e.key
1029
+ ))
1030
+ }
1031
+ ),
1032
+ Y ? mt("loading-more") : null,
1033
+ tt && H && !w ? /* @__PURE__ */ c("div", { className: "ds:flex ds:justify-center ds:py-[var(--spacing-sm)]", children: /* @__PURE__ */ c(
1034
+ Pe,
1035
+ {
1036
+ intent: "ghost",
1037
+ size: "sm",
1038
+ "aria-busy": Y || void 0,
1039
+ "aria-disabled": Y || void 0,
1040
+ onClick: () => {
1041
+ Y || Be();
1042
+ },
1043
+ children: d("tasksPanel.loadMore")
1044
+ }
1045
+ ) }) : null
1046
+ ]
1047
+ }
1048
+ )
1049
+ ] });
1050
+ let x;
1051
+ if (p) {
1052
+ const e = [...F.values()].some((s) => !s.settled), t = !pn(
1053
+ {
1054
+ status: O,
1055
+ type: L,
1056
+ assignee: I,
1057
+ overdueOnly: Je
1058
+ },
1059
+ A
1060
+ );
1061
+ P && K.length === 0 ? x = vt : K.length === 0 && (w || e) ? x = Le : K.length === 0 ? x = t ? gt : ht : x = yt;
1062
+ } else P ? x = vt : w ? x = Le : a.length === 0 ? x = ht : K.length === 0 ? x = gt : x = yt;
1063
+ const kt = x === Le, [Ds, Ns] = R(!1);
1064
+ G(() => {
1065
+ Ns(kt);
1066
+ }, [kt]);
1067
+ const As = u === void 0 ? Ae : /* @__PURE__ */ b(we, { children: [
1068
+ Ae,
1069
+ /* @__PURE__ */ c(
1070
+ "span",
1071
+ {
1072
+ "aria-hidden": "true",
1073
+ "data-total-count": "",
1074
+ className: "ds:ms-[var(--spacing-2xs)] ds:text-[color:var(--muted-foreground)]",
1075
+ children: Qe(u)
1076
+ }
1077
+ ),
1078
+ /* @__PURE__ */ c(Gs, { children: ` ${d("tasksPanel.totalCount", { count: u })}` })
1079
+ ] }), bt = ((B == null ? void 0 : B.length) ?? 0) > 1, _s = ["todo", "done", "all"], js = U && !S ? /* @__PURE__ */ c(
1080
+ qe,
1081
+ {
1082
+ icon: /* @__PURE__ */ c(Xs, {}),
1083
+ intent: "outline",
1084
+ size: "sm",
1085
+ "aria-label": d("tasksPanel.add"),
1086
+ "data-action": "add-task",
1087
+ onClick: U
1088
+ }
1089
+ ) : void 0, wt = q.status, Pt = !!(ce != null && ce.length) && q.type, xt = !!(le != null && le.length) && q.assignee, St = q.overdueOnly, Tt = Lt && (wt || Pt || xt || St), zs = bt || Tt ? /* @__PURE__ */ b("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1090
+ bt ? /* @__PURE__ */ c(Et, { label: d("tasksPanel.scope.label"), children: B.map((e) => {
1091
+ const t = es === e;
1092
+ return /* @__PURE__ */ c(
1093
+ Pe,
1094
+ {
1095
+ intent: t ? "primary" : "outline",
1096
+ size: "sm",
1097
+ "aria-pressed": t,
1098
+ onClick: () => Xe(e),
1099
+ children: Ft[e]
1100
+ },
1101
+ e
1102
+ );
1103
+ }) }) : null,
1104
+ Tt ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1105
+ wt ? /* @__PURE__ */ c(Et, { label: d("tasksPanel.status.label"), children: _s.map((e) => {
1106
+ const t = O === e;
1107
+ return /* @__PURE__ */ c(
1108
+ Pe,
1109
+ {
1110
+ intent: t ? "primary" : "outline",
1111
+ size: "sm",
1112
+ "aria-pressed": t,
1113
+ "data-status-filter": e,
1114
+ onClick: () => W({ status: e }),
1115
+ children: Yt[e]
1116
+ },
1117
+ e
1118
+ );
1119
+ }) }) : null,
1120
+ Pt ? /* @__PURE__ */ c(
1121
+ Ot,
1122
+ {
1123
+ size: "sm",
1124
+ clearable: !0,
1125
+ "aria-label": d("tasksPanel.type.label"),
1126
+ placeholder: d("tasksPanel.type.placeholder"),
1127
+ options: ce,
1128
+ value: L ?? "",
1129
+ onValueChange: (e) => W({ type: e || null })
1130
+ }
1131
+ ) : null,
1132
+ xt ? /* @__PURE__ */ c(
1133
+ Ot,
1134
+ {
1135
+ size: "sm",
1136
+ clearable: !0,
1137
+ "aria-label": d("tasksPanel.assignee.label"),
1138
+ placeholder: d("tasksPanel.assignee.placeholder"),
1139
+ options: le,
1140
+ value: I ?? "",
1141
+ onValueChange: (e) => W({ assignee: e || null })
1142
+ }
1143
+ ) : null,
1144
+ St ? /* @__PURE__ */ c(
1145
+ Ks,
1146
+ {
1147
+ id: Ut,
1148
+ size: "sm",
1149
+ label: d("tasksPanel.overdueOnly"),
1150
+ checked: Je,
1151
+ disabled: p && O === "done",
1152
+ onCheckedChange: (e) => W({ overdueOnly: e })
1153
+ }
1154
+ ) : null
1155
+ ] }) : null
1156
+ ] }) : void 0;
1157
+ return /* @__PURE__ */ b(
1158
+ "section",
1159
+ {
1160
+ ref: ke,
1161
+ "data-component": "tasks-panel",
1162
+ "data-component-id": o,
1163
+ "aria-labelledby": Ge ? void 0 : Ye,
1164
+ "aria-label": Ge,
1165
+ className: hn({ size: f, className: Vt }),
1166
+ ...Ct,
1167
+ children: [
1168
+ /* @__PURE__ */ c(
1169
+ Ws,
1170
+ {
1171
+ title: As,
1172
+ titleTooltip: u === void 0 ? void 0 : d("tasksPanel.titleWithCount", {
1173
+ title: Ae,
1174
+ value: Fe.format(u)
1175
+ }),
1176
+ icon: k ?? /* @__PURE__ */ c(Js, {}),
1177
+ headingId: Ye,
1178
+ actions: js,
1179
+ filters: zs
1180
+ }
1181
+ ),
1182
+ /* @__PURE__ */ c("p", { role: "status", className: "ds:sr-only", children: Ds ? d("common.loading") : null }),
1183
+ x
1184
+ ]
1185
+ }
1186
+ );
1187
+ }
1188
+ );
1189
+ En.displayName = "TasksPanel";
1190
+ function On({
1191
+ bucketKey: o,
1192
+ countLabel: a,
1193
+ showCount: h = !0,
1194
+ label: g,
1195
+ headerRef: k,
1196
+ reflowId: u,
1197
+ leaving: f = !1
1198
+ }) {
1199
+ return /* @__PURE__ */ b(
1200
+ "div",
1201
+ {
1202
+ ref: k,
1203
+ "data-bucket": o,
1204
+ "data-reflow-id": u,
1205
+ "data-leaving": f ? "" : void 0,
1206
+ className: [
1207
+ "ds:sticky ds:top-0 ds:z-[2] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
1208
+ "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
1209
+ // A header travels with its bucket, and leaves with it: a heading
1210
+ // left standing over nothing, or snapping while its rows glide,
1211
+ // reads as two lists rather than one.
1212
+ _t,
1213
+ "ds:transition-opacity ds:duration-[var(--animation-duration)]",
1214
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none",
1215
+ f ? zt : "",
1216
+ o === "overdue" ? "ds:text-[color:var(--destructive)] ds:font-semibold" : o === "today" ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
1217
+ ].filter(Boolean).join(" "),
1218
+ children: [
1219
+ o === "today" ? /* @__PURE__ */ c(
1220
+ "span",
1221
+ {
1222
+ "aria-hidden": "true",
1223
+ className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
1224
+ }
1225
+ ) : null,
1226
+ g,
1227
+ h ? /* @__PURE__ */ c(
1228
+ "span",
1229
+ {
1230
+ "data-bucket-count": "",
1231
+ className: "ds:text-[color:var(--muted-foreground)]",
1232
+ children: a
1233
+ }
1234
+ ) : null
1235
+ ]
1236
+ }
1237
+ );
1238
+ }
1239
+ export {
1240
+ En as T,
1241
+ dn as t
1242
+ };
1243
+ //# sourceMappingURL=tasks-panel-DbSjq_mz.js.map