@alfadocs/ui-kit 1.60.0 → 1.62.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 (369) hide show
  1. package/dist/_chunks/{actions-cell-renderer-CZWGQFKV.js → actions-cell-renderer-BXCpK2_0.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DauvvKX6.js → agenda-card-DR9gDdKp.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-DU7O5Z7R.js → agenda-tray-DGB1Zup-.js} +3 -3
  4. package/dist/_chunks/{ai-credits-notice-MBgQXxsx.js → ai-credits-notice-pK9BOmEz.js} +2 -2
  5. package/dist/_chunks/{ai-permission-notice-BJHutKLE.js → ai-permission-notice-DpRmZ9Q3.js} +4 -4
  6. package/dist/_chunks/{ai-prompt-input-Dzos37rf.js → ai-prompt-input-DSGSe4LH.js} +2 -2
  7. package/dist/_chunks/{alert-BhCstf2h.js → alert-DdDpOi-P.js} +2 -2
  8. package/dist/_chunks/{alia-sidebar-CU3mVL9J.js → alia-sidebar-qe0quZkB.js} +6 -6
  9. package/dist/_chunks/{anamnesis-card-VjJOUl-t.js → anamnesis-card-CsUBOG32.js} +3 -3
  10. package/dist/_chunks/{anamnesis-summary-card-cCj7LPh3.js → anamnesis-summary-card-CMzBLTiN.js} +3 -3
  11. package/dist/_chunks/{anamnesis-summary-rows-C5F08WT6.js → anamnesis-summary-rows-DFWws7mM.js} +11 -11
  12. package/dist/_chunks/{antenatal-schedule-timeline-CfNFrej5.js → antenatal-schedule-timeline-DuaAQj1m.js} +2 -2
  13. package/dist/_chunks/app-frame-DUPEwu4E.js +179 -0
  14. package/dist/_chunks/app-frame-context-CPszhDDb.js +10 -0
  15. package/dist/_chunks/{appointment-card-BXQUZlAJ.js → appointment-card-CL32sux-.js} +3 -3
  16. package/dist/_chunks/{appointment-peek-BvzXHYiD.js → appointment-peek-B5mcDcXt.js} +3 -3
  17. package/dist/_chunks/{appointment-timeline-r-q97cec.js → appointment-timeline-DaHKV81s.js} +4 -4
  18. package/dist/_chunks/{appointment-tray-DF_R9ldY.js → appointment-tray-qtpJt8e0.js} +3 -3
  19. package/dist/_chunks/{audio-recorder-Cssm6jVh.js → audio-recorder-DR-u1qbl.js} +3 -3
  20. package/dist/_chunks/{auth-form-parts-CravOf0L.js → auth-form-parts-Cmb41LSQ.js} +2 -2
  21. package/dist/_chunks/{badge-hnBt8o7n.js → badge-BUk4RjTS.js} +2 -2
  22. package/dist/_chunks/{balance-badge-cell-DMG06b2C.js → balance-badge-cell-F7p_ZKEg.js} +5 -5
  23. package/dist/_chunks/{bishop-score-DxfkcxiV.js → bishop-score-CaNTrikJ.js} +2 -2
  24. package/dist/_chunks/{bmi-calculator-B4kgPqt5.js → bmi-calculator-DjmQ04Ch.js} +4 -4
  25. package/dist/_chunks/{booking-CXaqmdF7.js → booking-CGhOtxad.js} +8 -8
  26. package/dist/_chunks/{button-group-Cfpyu6pc.js → button-group-DCOJhvm3.js} +3 -3
  27. package/dist/_chunks/{calendar-DNTVaK6b.js → calendar-DCr65Kt1.js} +3 -3
  28. package/dist/_chunks/{calendar-workspace-UL5xcpWa.js → calendar-workspace-Dvfl9Vf6.js} +29 -29
  29. package/dist/_chunks/{care-plan-card-DFQbU_Gd.js → care-plan-card-BU3p5cLr.js} +3 -3
  30. package/dist/_chunks/{care-plan-entry-card-bj784KRk.js → care-plan-entry-card-DPJcP34v.js} +4 -4
  31. package/dist/_chunks/{care-plan-header-DDhyAfVK.js → care-plan-header-CgFjQLBd.js} +3 -3
  32. package/dist/_chunks/{carousel.agent-Csn24G1k.js → carousel.agent-BaRsN-8H.js} +2 -2
  33. package/dist/_chunks/chart-DgYHN8Xq.js +991 -0
  34. package/dist/_chunks/{chat-input-Ck34Pnmp.js → chat-input-HtTbUUD6.js} +2 -2
  35. package/dist/_chunks/{chat-message-DU0X3Xnl.js → chat-message-fRLZ95O5.js} +2 -2
  36. package/dist/_chunks/{checkbox--ndmyokr.js → checkbox-BjDv-r3o.js} +2 -2
  37. package/dist/_chunks/{checkbox-group-B0oZHNT3.js → checkbox-group-Cw2H5qaq.js} +2 -2
  38. package/dist/_chunks/{clinical-note-card-L6FVM9Gx.js → clinical-note-card-BgURrgL5.js} +3 -3
  39. package/dist/_chunks/{code-block-DiC4bg-o.js → code-block-vwEv1jEa.js} +2 -2
  40. package/dist/_chunks/{connection-status-BAnuwayz.js → connection-status--wYsgreh.js} +3 -3
  41. package/dist/_chunks/{contact-profile-card-JTRbnbxy.js → contact-profile-card-VTCAmQqj.js} +3 -3
  42. package/dist/_chunks/control-room-rail-DUerqHeo.js +416 -0
  43. package/dist/_chunks/{cycle-calculator-BuFi6ZJa.js → cycle-calculator-D-rwX9Pj.js} +2 -2
  44. package/dist/_chunks/dashboard-grid-B2MB7SRS.js +1428 -0
  45. package/dist/_chunks/{data-table-DAPkhyXO.js → data-table-m7GbLJZy.js} +6 -6
  46. package/dist/_chunks/{data-table-tabs-2t0cdk0h.js → data-table-tabs-BfrnefV5.js} +3 -3
  47. package/dist/_chunks/{dependent-selector-DgaAQc-c.js → dependent-selector-DBr1AhLg.js} +3 -3
  48. package/dist/_chunks/{description-list-CFEw__MT.js → description-list-Q8640NHu.js} +2 -2
  49. package/dist/_chunks/{dev-bypass-button-dTuUuzsT.js → dev-bypass-button--CPzzRSj.js} +2 -2
  50. package/dist/_chunks/{document-preview-DYX669jE.js → document-preview-B1dQm292.js} +4 -4
  51. package/dist/_chunks/{document-scanner-C41n4pNq.js → document-scanner-CVPVLK7z.js} +2 -2
  52. package/dist/_chunks/{due-date-calculator-yYvX8Ww_.js → due-date-calculator-DTfxFJCM.js} +5 -5
  53. package/dist/_chunks/{editable-currency-cell-renderer-6LDFAWUE.js → editable-currency-cell-renderer-1ijmzNWh.js} +4 -4
  54. package/dist/_chunks/{editable-description-D9FsTi8e.js → editable-description-ChGNdYY8.js} +2 -2
  55. package/dist/_chunks/{editor-overlay-BYkcaLCj.js → editor-overlay-CpVO1-Kk.js} +2 -2
  56. package/dist/_chunks/{entity-summary-oD_63dlz.js → entity-summary-DXIr5_x2.js} +4 -4
  57. package/dist/_chunks/{error-summary-BhM8FEkl.js → error-summary-DrUfuKu1.js} +2 -2
  58. package/dist/_chunks/{face-scheme-C-5V3MsY.js → face-scheme-DAD-mXzM.js} +4 -4
  59. package/dist/_chunks/{fetal-weight-CHv2winC.js → fetal-weight-DycD_Vqr.js} +2 -2
  60. package/dist/_chunks/{field-array-dSkD_ePA.js → field-array-BJYc1xSu.js} +2 -2
  61. package/dist/_chunks/{file-manager-C8bdHsYy.js → file-manager-G0t8MWbE.js} +6 -6
  62. package/dist/_chunks/{fiscal-code-input-BSWwda0C.js → fiscal-code-input-DwHb2nVW.js} +2 -2
  63. package/dist/_chunks/{forgot-password-form-CGWV5Q1-.js → forgot-password-form-CgZkEvZy.js} +4 -4
  64. package/dist/_chunks/{freemium-paywall-DjjVPC-5.js → freemium-paywall-r-z48YaT.js} +2 -2
  65. package/dist/_chunks/{gestational-age-calculator-BLccWS_4.js → gestational-age-calculator-BnCAL5a-.js} +5 -5
  66. package/dist/_chunks/{hcg-doubling-CnrY2OVu.js → hcg-doubling-DVDiqFyp.js} +2 -2
  67. package/dist/_chunks/{header-BVHAt7Fi.js → header-_TppWBpK.js} +2 -2
  68. package/dist/_chunks/{header-settings-C200bKyp.js → header-settings-BSH9Gk0J.js} +3 -3
  69. package/dist/_chunks/{heatmap-CRMr7VWC.js → heatmap-Bb0-M88T.js} +4 -4
  70. package/dist/_chunks/{help-me-write-templates-C9T8-DcT.js → help-me-write-templates-DFmqnsAa.js} +4 -4
  71. package/dist/_chunks/{hover-card-DbTmj-ea.js → hover-card-CTNhQXWS.js} +2 -2
  72. package/dist/_chunks/{icon-button-dNE6ENLn.js → icon-button-C_1TgRiK.js} +2 -2
  73. package/dist/_chunks/{icon-button-group-Du8IvZek.js → icon-button-group-NIHji7_y.js} +2 -2
  74. package/dist/_chunks/{icon-picker-D5NdDbCL.js → icon-picker-Dq4O32K8.js} +2 -2
  75. package/dist/_chunks/{info-tip-DObdz3w3.js → info-tip-cYszyg6h.js} +2 -2
  76. package/dist/_chunks/{key-value-pair-BNYHAZwD.js → key-value-pair-BscGwZsJ.js} +2 -2
  77. package/dist/_chunks/{kit-extensions-DI2nHVNw.js → kit-extensions-RnddkrXn.js} +6 -6
  78. package/dist/_chunks/{link-cell-renderer-DvhzS6lu.js → link-cell-renderer-dtEYlxi2.js} +6 -6
  79. package/dist/_chunks/{locale-picker-Bu4YE5b2.js → locale-picker-CeveTnDK.js} +3 -3
  80. package/dist/_chunks/{login-dev-card-DwWWHclZ.js → login-dev-card-PnADNcI9.js} +3 -3
  81. package/dist/_chunks/{marketplace-app-shell-DK2pFMpf.js → marketplace-app-shell-C-2e4eCD.js} +139 -136
  82. package/dist/_chunks/{message-card-CvZlo3Fn.js → message-card-A3mJNqfy.js} +2 -2
  83. package/dist/_chunks/{message-tray-DrS_LOed.js → message-tray-Ft6vSr71.js} +3 -3
  84. package/dist/_chunks/{multi-select-BT23EnSA.js → multi-select-CMaAQQgb.js} +2 -2
  85. package/dist/_chunks/{note-attachment-Bt2cddsZ.js → note-attachment-DoVWvjWR.js} +2 -2
  86. package/dist/_chunks/{note-timeline-CX9nAgAR.js → note-timeline-B7l3t5DZ.js} +2 -2
  87. package/dist/_chunks/{notes-panel-6TElt7jQ.js → notes-panel-CTmvrqQn.js} +7 -7
  88. package/dist/_chunks/{notification-card-Qrs52HIA.js → notification-card-c2oX8j3F.js} +2 -2
  89. package/dist/_chunks/{notification-tray-DRm1z97G.js → notification-tray-BR3seWA7.js} +3 -3
  90. package/dist/_chunks/{operator-hero-C_Khr5IU.js → operator-hero-3_RG4Dkj.js} +2 -2
  91. package/dist/_chunks/{optical-prescription-DLIAhJ6f.js → optical-prescription-CxfMsbxi.js} +2 -2
  92. package/dist/_chunks/{panel-header-D_mTdhUp.js → panel-header-BJkaUwnl.js} +2 -2
  93. package/dist/_chunks/{panel-subview-CjZgdWwO.js → panel-subview-yP4qIbKS.js} +3 -3
  94. package/dist/_chunks/{patient-details-BjqKBY2x.js → patient-details-BNDS69Zx.js} +4 -4
  95. package/dist/_chunks/{patient-field-row-BiI0BPPK.js → patient-field-row-BLBi-PjO.js} +7 -7
  96. package/dist/_chunks/{patient-search-B5R7FyFO.js → patient-search-DOnDUVsl.js} +2 -2
  97. package/dist/_chunks/{patient-summary-card-BOgnWKRV.js → patient-summary-card-T9umuZJF.js} +8 -8
  98. package/dist/_chunks/{payment-automation-upsell-39d5ykBi.js → payment-automation-upsell-C8MEu0t6.js} +4 -4
  99. package/dist/_chunks/{payment-form-v6zZuV1_.js → payment-form-i90DUuNK.js} +2 -2
  100. package/dist/_chunks/{payment-request-card-E3G4aVt6.js → payment-request-card-BmzNMY2a.js} +4 -4
  101. package/dist/_chunks/{pdf-viewer-CNQxa4tv.js → pdf-viewer-DJ9VN7cu.js} +2 -2
  102. package/dist/_chunks/{periodontal-chart-BZ1d6S36.js → periodontal-chart-DCcOEYC6.js} +2 -2
  103. package/dist/_chunks/{periodontal-chart-card-BE5hiQnn.js → periodontal-chart-card-CxdjXFb3.js} +3 -3
  104. package/dist/_chunks/{periodontal-diagnosis-6wybid_W.js → periodontal-diagnosis-B9YmmVmM.js} +5 -5
  105. package/dist/_chunks/{periodontal-risk-chart-CgLwBj5c.js → periodontal-risk-chart-CPy7CNFe.js} +2 -2
  106. package/dist/_chunks/{permission-matrix-DuTkUHxe.js → permission-matrix-BoQjENGV.js} +3 -3
  107. package/dist/_chunks/{popover-DQr_tljb.js → popover-4ZVtH_At.js} +2 -2
  108. package/dist/_chunks/{practice-profile-hero-DPbvYfCs.js → practice-profile-hero-Dfc0F60y.js} +2 -2
  109. package/dist/_chunks/{practice-results-Cktx7KaC.js → practice-results-B8L9ZmtR.js} +4 -4
  110. package/dist/_chunks/{pregnancy-dating-26fcvhAx.js → pregnancy-dating-D2XTELiw.js} +5 -5
  111. package/dist/_chunks/{pregnancy-weight-gain-D8q1IUCT.js → pregnancy-weight-gain-BVvyL-j1.js} +4 -4
  112. package/dist/_chunks/{privacy-lock-BpVgSgMb.js → privacy-lock-CEYJ8ehu.js} +2 -2
  113. package/dist/_chunks/{privacy-mask-BfMC57ST.js → privacy-mask-Ch7743uk.js} +2 -2
  114. package/dist/_chunks/{product-hub-panel-CH4B49ij.js → product-hub-panel-D-UELdo0.js} +2 -2
  115. package/dist/_chunks/{public-header.agent-BHTDKMsw.js → public-header.agent-DXRA7ebK.js} +3 -3
  116. package/dist/_chunks/{radio-BBbMdbE_.js → radio-BZQs6_36.js} +2 -2
  117. package/dist/_chunks/{radio-group-DicxWJXP.js → radio-group-ChIKyeSJ.js} +3 -3
  118. package/dist/_chunks/{radiograph-panel.agent-DR0gOeSc.js → radiograph-panel.agent-DDNUo4Ul.js} +4 -4
  119. package/dist/_chunks/{registration-form-B8IeB9kd.js → registration-form-BQyT_kBX.js} +5 -5
  120. package/dist/_chunks/{resource-chip-DQeCJzJf.js → resource-chip-DB5jDwUO.js} +2 -2
  121. package/dist/_chunks/{reviews-panel-CHzDqerd.js → reviews-panel-AvsVgtJu.js} +3 -3
  122. package/dist/_chunks/{rich-text-editor-BRuTo2hm.js → rich-text-editor-M2gT_E7f.js} +9 -9
  123. package/dist/_chunks/{sheet-CqvPYNLn.js → sheet-D2PfJl8n.js} +2 -2
  124. package/dist/_chunks/{sidebar-DhePV1hE.js → sidebar-BS24EnYd.js} +527 -519
  125. package/dist/_chunks/{sign-document-D4iHS_Ug.js → sign-document-CY7xTXbm.js} +2 -2
  126. package/dist/_chunks/{signature-request-BH7yKI01.js → signature-request-BMCHy2ZO.js} +5 -5
  127. package/dist/_chunks/{signature-status-chip-DP3qRijv.js → signature-status-chip-pIoQjvH8.js} +3 -3
  128. package/dist/_chunks/{signed-out-frame-eaOWHpDr.js → signed-out-frame-D5DzqATh.js} +3 -3
  129. package/dist/_chunks/{slot-grid-DELa2Nwz.js → slot-grid-dj5f6R2w.js} +2 -2
  130. package/dist/_chunks/{stat-DmjGfXND.js → stat-D2PNJujA.js} +2 -2
  131. package/dist/_chunks/{streaming-text-bPDoG7Y3.js → streaming-text-zFViGexf.js} +2 -2
  132. package/dist/_chunks/{tab-bar-5GppbMGc.js → tab-bar-BEODTG6k.js} +2 -2
  133. package/dist/_chunks/{tag-CS5cXpfx.js → tag-DOZGz0fT.js} +2 -2
  134. package/dist/_chunks/{task-card-zaTU1rQa.js → task-card-BS7Uqevr.js} +2 -2
  135. package/dist/_chunks/{task-editor-CgGcg-2c.js → task-editor-DoiOzNiC.js} +9 -9
  136. package/dist/_chunks/{task-tray-DGMwogWu.js → task-tray-eQU4KJcA.js} +3 -3
  137. package/dist/_chunks/{tasks-panel-xGtiEdcj.js → tasks-panel-8nLwBw6P.js} +7 -7
  138. package/dist/_chunks/{theme-toggle-_cfYEK73.js → theme-toggle-Ctb77x6O.js} +3 -3
  139. package/dist/_chunks/{toast-CNUydTgT.js → toast-6T519aLz.js} +2 -2
  140. package/dist/_chunks/tool-rail-C-03rH2I.js +973 -0
  141. package/dist/_chunks/tooltip-uEBdD1-5.js +178 -0
  142. package/dist/_chunks/{tooth-scheme-05DsRMA5.js → tooth-scheme-Dkh4JwzT.js} +2 -2
  143. package/dist/_chunks/{transcript-panel-CjsiDB1K.js → transcript-panel-XudW5l6l.js} +2 -2
  144. package/dist/_chunks/{treatment-receipt-BSVOfStA.js → treatment-receipt-BdJ36vNP.js} +3 -3
  145. package/dist/_chunks/{use-appointment-details-read-BGVthJFx.js → use-appointment-details-read-Gu0ehyxj.js} +16 -16
  146. package/dist/_chunks/use-edge-resize-CBtem0j2.js +171 -0
  147. package/dist/_chunks/{voice-control-panel-DyKEaFxt.js → voice-control-panel-C0BfY23Y.js} +4 -4
  148. package/dist/_chunks/{warning-stack-CAL9xVo1.js → warning-stack-HYWAytZV.js} +3 -3
  149. package/dist/_chunks/{widget-picker-CkhoG4Rj.js → widget-picker-DlNPGcnu.js} +2 -2
  150. package/dist/_chunks/{workflow-map-BUYG1oXU.js → workflow-map-C2B2qIr1.js} +5 -5
  151. package/dist/agent-catalog.json +49 -2
  152. package/dist/agent-i18n/en.json +13 -1
  153. package/dist/components/_shared/use-apex-legend-scroll.d.ts +7 -0
  154. package/dist/components/agenda-card/index.js +1 -1
  155. package/dist/components/agenda-tray/index.js +1 -1
  156. package/dist/components/ai-credits-notice/index.js +1 -1
  157. package/dist/components/ai-permission-notice/index.js +1 -1
  158. package/dist/components/ai-prompt-input/index.js +1 -1
  159. package/dist/components/alert/index.js +1 -1
  160. package/dist/components/anamnesis-card/index.js +1 -1
  161. package/dist/components/anamnesis-summary-card/index.js +1 -1
  162. package/dist/components/app-frame/app-frame-context.d.ts +19 -0
  163. package/dist/components/app-frame/app-frame.d.ts +3 -0
  164. package/dist/components/app-frame/index.d.ts +2 -0
  165. package/dist/components/app-frame/index.js +4 -2
  166. package/dist/components/appointment-card/index.js +2 -2
  167. package/dist/components/appointment-details-panel/index.js +1 -1
  168. package/dist/components/appointment-peek/index.js +1 -1
  169. package/dist/components/appointment-timeline/index.js +1 -1
  170. package/dist/components/audio-recorder/index.js +1 -1
  171. package/dist/components/badge/index.js +1 -1
  172. package/dist/components/bishop-score/index.js +1 -1
  173. package/dist/components/bmi-calculator/index.js +1 -1
  174. package/dist/components/booking/index.js +1 -1
  175. package/dist/components/button/index.js +1 -1
  176. package/dist/components/button-group/index.js +1 -1
  177. package/dist/components/calendar/index.js +1 -1
  178. package/dist/components/care-plan-card/index.js +1 -1
  179. package/dist/components/care-plan-entry-card/index.js +1 -1
  180. package/dist/components/care-plan-header/index.js +1 -1
  181. package/dist/components/carousel/index.js +1 -1
  182. package/dist/components/chart/chart.d.ts +3 -1
  183. package/dist/components/chart/index.js +1 -1
  184. package/dist/components/chat-input/index.js +1 -1
  185. package/dist/components/chat-message/index.js +1 -1
  186. package/dist/components/checkbox/index.js +1 -1
  187. package/dist/components/checkbox-group/index.js +1 -1
  188. package/dist/components/clinical-note-card/index.js +1 -1
  189. package/dist/components/connection-status/index.js +1 -1
  190. package/dist/components/contact-profile-card/index.js +1 -1
  191. package/dist/components/control-room-rail/control-room-context.d.ts +10 -4
  192. package/dist/components/control-room-rail/index.js +1 -1
  193. package/dist/components/cycle-calculator/index.js +1 -1
  194. package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +16 -4
  195. package/dist/components/dashboard-grid/dashboard-grid.d.ts +42 -2
  196. package/dist/components/dashboard-grid/index.d.ts +1 -1
  197. package/dist/components/dashboard-grid/index.js +1 -1
  198. package/dist/components/data-table/index.js +4 -4
  199. package/dist/components/data-table-tabs/index.js +1 -1
  200. package/dist/components/dependent-selector/index.js +1 -1
  201. package/dist/components/description-list/index.js +1 -1
  202. package/dist/components/dev-bypass-button/index.js +1 -1
  203. package/dist/components/document-preview/index.js +1 -1
  204. package/dist/components/document-scanner/index.js +1 -1
  205. package/dist/components/due-date-calculator/index.js +2 -2
  206. package/dist/components/editable-description/index.js +1 -1
  207. package/dist/components/editor-overlay/index.js +1 -1
  208. package/dist/components/entity-summary/index.js +1 -1
  209. package/dist/components/error-summary/index.js +1 -1
  210. package/dist/components/face-scheme/index.js +1 -1
  211. package/dist/components/fetal-weight/index.js +1 -1
  212. package/dist/components/field-array/index.js +1 -1
  213. package/dist/components/file-manager/index.js +1 -1
  214. package/dist/components/fiscal-code-input/index.js +1 -1
  215. package/dist/components/freemium-paywall/index.js +1 -1
  216. package/dist/components/gestational-age-calculator/index.js +1 -1
  217. package/dist/components/hcg-doubling/index.js +1 -1
  218. package/dist/components/header/index.js +1 -1
  219. package/dist/components/header-settings/index.js +1 -1
  220. package/dist/components/heatmap/index.js +1 -1
  221. package/dist/components/hover-card/index.js +1 -1
  222. package/dist/components/icon-button/index.js +1 -1
  223. package/dist/components/icon-button-group/index.js +1 -1
  224. package/dist/components/icon-picker/index.js +1 -1
  225. package/dist/components/info-tip/index.js +1 -1
  226. package/dist/components/key-value-pair/index.js +1 -1
  227. package/dist/components/locale-picker/index.js +1 -1
  228. package/dist/components/message-card/index.js +1 -1
  229. package/dist/components/message-tray/index.js +1 -1
  230. package/dist/components/multi-select/index.js +1 -1
  231. package/dist/components/note-timeline/index.js +1 -1
  232. package/dist/components/notes-panel/index.js +1 -1
  233. package/dist/components/notification-card/index.js +1 -1
  234. package/dist/components/notification-tray/index.js +1 -1
  235. package/dist/components/operator-hero/index.js +1 -1
  236. package/dist/components/optical-prescription/index.js +1 -1
  237. package/dist/components/panel-header/index.js +1 -1
  238. package/dist/components/panel-subview/index.js +1 -1
  239. package/dist/components/patient-details/index.js +1 -1
  240. package/dist/components/patient-search/index.js +1 -1
  241. package/dist/components/patient-summary-card/index.js +1 -1
  242. package/dist/components/patient-table/index.js +1 -1
  243. package/dist/components/payment-card/index.js +1 -1
  244. package/dist/components/payment-form/index.js +1 -1
  245. package/dist/components/pdf-viewer/index.js +1 -1
  246. package/dist/components/periodontal-chart/index.js +1 -1
  247. package/dist/components/periodontal-chart-card/index.js +1 -1
  248. package/dist/components/periodontal-diagnosis/index.js +1 -1
  249. package/dist/components/periodontal-risk-chart/index.js +1 -1
  250. package/dist/components/permission-matrix/index.js +1 -1
  251. package/dist/components/popover/index.js +1 -1
  252. package/dist/components/practice-profile-hero/index.js +1 -1
  253. package/dist/components/practice-results/index.js +1 -1
  254. package/dist/components/pregnancy-dating/index.js +1 -1
  255. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  256. package/dist/components/privacy-lock/index.js +1 -1
  257. package/dist/components/product-hub-tray/index.js +1 -1
  258. package/dist/components/public-header/index.js +1 -1
  259. package/dist/components/radio/index.js +1 -1
  260. package/dist/components/radio-group/index.js +2 -2
  261. package/dist/components/radiograph-panel/index.js +1 -1
  262. package/dist/components/resource-chip/index.js +1 -1
  263. package/dist/components/reviews-panel/index.js +1 -1
  264. package/dist/components/rich-text-editor/index.js +2 -2
  265. package/dist/components/sheet/index.js +1 -1
  266. package/dist/components/sidebar/index.js +1 -1
  267. package/dist/components/sidebar/sidebar.d.ts +6 -0
  268. package/dist/components/sign-document/index.js +1 -1
  269. package/dist/components/signature-status-chip/index.js +1 -1
  270. package/dist/components/slot-grid/index.js +1 -1
  271. package/dist/components/stat/index.js +1 -1
  272. package/dist/components/stat/stat.d.ts +7 -2
  273. package/dist/components/streaming-text/index.js +1 -1
  274. package/dist/components/tab-bar/index.js +1 -1
  275. package/dist/components/tag/index.js +1 -1
  276. package/dist/components/task-card/index.js +1 -1
  277. package/dist/components/task-editor/index.js +1 -1
  278. package/dist/components/task-tray/index.js +1 -1
  279. package/dist/components/tasks-panel/index.js +1 -1
  280. package/dist/components/theme-toggle/index.js +1 -1
  281. package/dist/components/toast/index.js +1 -1
  282. package/dist/components/tool-rail/index.js +1 -1
  283. package/dist/components/tool-rail/tool-rail.d.ts +7 -0
  284. package/dist/components/tooltip/index.js +1 -1
  285. package/dist/components/tooth-scheme/index.js +1 -1
  286. package/dist/components/transcript-panel/index.js +1 -1
  287. package/dist/components/treatment-receipt/index.js +1 -1
  288. package/dist/components/voice-control-panel/index.js +1 -1
  289. package/dist/components/warning-stack/index.js +1 -1
  290. package/dist/components/widget-picker/index.js +1 -1
  291. package/dist/components/workflow/index.js +1 -1
  292. package/dist/hooks/index.js +1 -1
  293. package/dist/hooks/use-edge-resize.d.ts +5 -1
  294. package/dist/i18n/locales/ar.d.ts +1 -0
  295. package/dist/i18n/locales/ar.js +1 -0
  296. package/dist/i18n/locales/de.d.ts +1 -0
  297. package/dist/i18n/locales/de.js +1 -0
  298. package/dist/i18n/locales/el.d.ts +1 -0
  299. package/dist/i18n/locales/el.js +1 -0
  300. package/dist/i18n/locales/en.d.ts +1 -0
  301. package/dist/i18n/locales/en.js +1 -0
  302. package/dist/i18n/locales/es.d.ts +1 -0
  303. package/dist/i18n/locales/es.js +1 -0
  304. package/dist/i18n/locales/fr.d.ts +1 -0
  305. package/dist/i18n/locales/fr.js +1 -0
  306. package/dist/i18n/locales/hi.d.ts +1 -0
  307. package/dist/i18n/locales/hi.js +1 -0
  308. package/dist/i18n/locales/it.d.ts +1 -0
  309. package/dist/i18n/locales/it.js +1 -0
  310. package/dist/i18n/locales/ja.d.ts +1 -0
  311. package/dist/i18n/locales/ja.js +1 -0
  312. package/dist/i18n/locales/nl.d.ts +1 -0
  313. package/dist/i18n/locales/nl.js +1 -0
  314. package/dist/i18n/locales/pl.d.ts +1 -0
  315. package/dist/i18n/locales/pl.js +1 -0
  316. package/dist/i18n/locales/pt.d.ts +1 -0
  317. package/dist/i18n/locales/pt.js +1 -0
  318. package/dist/i18n/locales/ro.d.ts +1 -0
  319. package/dist/i18n/locales/ro.js +1 -0
  320. package/dist/i18n/locales/ru.d.ts +1 -0
  321. package/dist/i18n/locales/ru.js +1 -0
  322. package/dist/i18n/locales/sq.d.ts +1 -0
  323. package/dist/i18n/locales/sq.js +1 -0
  324. package/dist/i18n/locales/sv.d.ts +1 -0
  325. package/dist/i18n/locales/sv.js +1 -0
  326. package/dist/i18n/locales/tr.d.ts +1 -0
  327. package/dist/i18n/locales/tr.js +1 -0
  328. package/dist/i18n/locales/zh.d.ts +1 -0
  329. package/dist/i18n/locales/zh.js +1 -0
  330. package/dist/index.js +778 -776
  331. package/dist/locales/ar.json +1 -0
  332. package/dist/locales/de.json +1 -0
  333. package/dist/locales/el.json +1 -0
  334. package/dist/locales/en.json +1 -0
  335. package/dist/locales/es.json +1 -0
  336. package/dist/locales/fr.json +1 -0
  337. package/dist/locales/hi.json +1 -0
  338. package/dist/locales/it.json +1 -0
  339. package/dist/locales/ja.json +1 -0
  340. package/dist/locales/nl.json +1 -0
  341. package/dist/locales/pl.json +1 -0
  342. package/dist/locales/pt.json +1 -0
  343. package/dist/locales/ro.json +1 -0
  344. package/dist/locales/ru.json +1 -0
  345. package/dist/locales/sq.json +1 -0
  346. package/dist/locales/sv.json +1 -0
  347. package/dist/locales/tr.json +1 -0
  348. package/dist/locales/zh.json +1 -0
  349. package/dist/patterns/alia-assistant/index.js +1 -1
  350. package/dist/patterns/anamnesis/index.js +1 -1
  351. package/dist/patterns/calendar/index.js +1 -1
  352. package/dist/patterns/forgot-password-form/index.js +1 -1
  353. package/dist/patterns/help-me-write-templates/index.js +1 -1
  354. package/dist/patterns/login-form/index.js +1 -1
  355. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  356. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +3 -0
  357. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  358. package/dist/patterns/registration-form/index.js +1 -1
  359. package/dist/patterns/signature-request/index.js +1 -1
  360. package/dist/patterns/signed-out-frame/index.js +1 -1
  361. package/dist/tokens.css +8 -1
  362. package/package.json +1 -1
  363. package/dist/_chunks/app-frame-CqmDh2v5.js +0 -134
  364. package/dist/_chunks/chart-D7PbNO_M.js +0 -920
  365. package/dist/_chunks/control-room-rail-BbBEIdws.js +0 -379
  366. package/dist/_chunks/dashboard-grid-DeNEltwI.js +0 -933
  367. package/dist/_chunks/tool-rail-Blgibz0a.js +0 -816
  368. package/dist/_chunks/tooltip-Cp-PLePW.js +0 -119
  369. package/dist/_chunks/use-edge-resize-DHbyQwu8.js +0 -149
@@ -1,933 +0,0 @@
1
- import { jsxs as Z, jsx as G } from "react/jsx-runtime";
2
- import { forwardRef as Be, useRef as x, useState as L, useCallback as C, useMemo as j, useEffect as X, useImperativeHandle as Je, useContext as Qe, Children as Ze, isValidElement as et, Fragment as tt, createContext as rt, cloneElement as Le } from "react";
3
- import { c as ce } from "./index-D2ZczOXr.js";
4
- import { useTranslation as We } from "react-i18next";
5
- import { I as ge } from "./icon-button-dNE6ENLn.js";
6
- import { T as nt } from "./tooltip-Cp-PLePW.js";
7
- import { u as _ } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
- import { u as st } from "./registry-DvAUVLHh.js";
9
- import { P as it } from "./plus-DzMQ_c6b.js";
10
- import { G as ot } from "./grip-vertical-onSb1JXO.js";
11
- import { X as dt } from "./x-B5YnXwCz.js";
12
- import { c as at } from "./createLucideIcon-DhHxpK9K.js";
13
- /**
14
- * @license lucide-react v1.22.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */
19
- const ct = [
20
- ["path", { d: "M19 13v6h-6", key: "1hxl6d" }],
21
- ["path", { d: "M5 11V5h6", key: "12e2xe" }],
22
- ["path", { d: "m5 5 14 14", key: "11anup" }]
23
- ], ut = at("move-diagonal-2", ct), lt = {
24
- id: "dashboard-grid",
25
- // The board's whole purpose is in-place rearrangement of its widgets.
26
- capabilities: ["edit_inline"],
27
- state: {
28
- layout: {
29
- type: "{ id: string, x: number, y: number, w: number, h: number }[]",
30
- descriptionKey: "ui.agent.dashboardGrid.state.layout",
31
- description: "Current widget geometry in cell units — ids and rectangles only, no widget content.",
32
- read: (r) => r.getGridState().layout
33
- },
34
- cols: {
35
- type: "number",
36
- descriptionKey: "ui.agent.dashboardGrid.state.cols",
37
- description: "Logical column count of the board.",
38
- read: (r) => r.getGridState().cols
39
- },
40
- editing: {
41
- type: "boolean",
42
- descriptionKey: "ui.agent.dashboardGrid.state.editing",
43
- description: "Whether edit mode is on. Move/resize actions are refused while it is off — the host app owns the toggle.",
44
- read: (r) => r.getGridState().editing
45
- },
46
- stacked: {
47
- type: "boolean",
48
- descriptionKey: "ui.agent.dashboardGrid.state.stacked",
49
- description: "Whether the board is narrower than its stackBelow width and shows its widgets as one read-only column. Move/resize actions are unavailable while it is true, even in edit mode; the saved layout is unchanged.",
50
- read: (r) => r.getGridState().stacked
51
- }
52
- },
53
- actions: {
54
- move_widget: {
55
- // Rearranging the board mutates user configuration — a write,
56
- // reversible by moving back.
57
- safety: "write",
58
- argsType: "id, x, y",
59
- argsSchema: {
60
- type: "object",
61
- properties: {
62
- id: { type: "string", description: "Widget id (see layout state)." },
63
- x: {
64
- type: "integer",
65
- minimum: 0,
66
- description: "0-based logical column."
67
- },
68
- y: { type: "integer", minimum: 0, description: "0-based row." }
69
- },
70
- required: ["id", "x", "y"]
71
- },
72
- returns: "boolean (accepted)",
73
- returnsSchema: {
74
- type: "boolean",
75
- description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
76
- },
77
- idempotent: !0,
78
- errors: [
79
- "Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
80
- "Unavailable while edit mode is off: returns false.",
81
- "Unknown widget id: returns false."
82
- ],
83
- descriptionKey: "ui.agent.dashboardGrid.actions.moveWidget",
84
- description: "Move a widget to a cell. Out-of-bounds targets are clamped; colliding widgets are pushed down and the layout re-compacts. Refused while edit mode is off or the board is stacked.",
85
- invoke: (r, o) => r.moveWidgetTo(o.id, o.x, o.y)
86
- },
87
- resize_widget: {
88
- safety: "write",
89
- argsType: "id, w, h",
90
- argsSchema: {
91
- type: "object",
92
- properties: {
93
- id: { type: "string", description: "Widget id (see layout state)." },
94
- w: {
95
- type: "integer",
96
- minimum: 1,
97
- description: "Column span (≥ 1)."
98
- },
99
- h: { type: "integer", minimum: 1, description: "Row span (≥ 1)." }
100
- },
101
- required: ["id", "w", "h"]
102
- },
103
- returns: "boolean (accepted)",
104
- returnsSchema: {
105
- type: "boolean",
106
- description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
107
- },
108
- idempotent: !0,
109
- errors: [
110
- "Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
111
- "Unavailable while edit mode is off: returns false.",
112
- "Unknown widget id: returns false."
113
- ],
114
- descriptionKey: "ui.agent.dashboardGrid.actions.resizeWidget",
115
- description: "Resize a widget to a span. Clamped to the grid and the widget’s min/max; colliding widgets are pushed down. Refused while edit mode is off or the board is stacked.",
116
- invoke: (r, o) => r.resizeWidgetTo(o.id, o.w, o.h)
117
- }
118
- },
119
- domHooks: {
120
- root: {
121
- attr: "data-component",
122
- value: "dashboard-grid",
123
- description: 'Also carries data-stacked="true" while the board shows one read-only column.'
124
- },
125
- instanceId: {
126
- attr: "data-component-id",
127
- sourceProp: "id",
128
- description: "Sourced from the id prop."
129
- },
130
- item: {
131
- attr: "data-widget-id",
132
- description: "Each widget wrapper carries its layout id."
133
- }
134
- }
135
- };
136
- function q(r, o) {
137
- return r.x < o.x + o.w && o.x < r.x + r.w && r.y < o.y + o.h && o.y < r.y + r.h;
138
- }
139
- function ue(r, o) {
140
- const s = Math.max(1, r.minW ?? 1), u = Math.max(1, r.minH ?? 1), l = Math.min(o, r.maxW ?? o), b = r.maxH ?? Number.POSITIVE_INFINITY, a = Math.min(Math.max(r.w, s), l), h = Math.min(Math.max(r.h, u), b), i = Math.min(Math.max(0, r.x), o - a), m = Math.max(0, r.y);
141
- return { ...r, x: i, y: m, w: a, h };
142
- }
143
- function H(r, o, s) {
144
- const u = r.map((i) => ue(i, o)), l = [...u].sort((i, m) => i.id === s ? -1 : m.id === s ? 1 : i.y - m.y || i.x - m.x), b = [], a = s ? u.find((i) => i.id === s) : void 0;
145
- for (const i of l) {
146
- if (i.id !== s) {
147
- if (a && q(a, i)) {
148
- const m = { ...i, y: Math.max(0, a.y - i.h) };
149
- !q(a, m) && !b.some((M) => M.id !== s && q(M, m)) && (i.y = m.y);
150
- }
151
- for (; b.some((m) => q(m, i)); )
152
- i.y += 1;
153
- for (; i.y > 0; ) {
154
- const m = { ...i, y: i.y - 1 };
155
- if (b.some((M) => q(M, m))) break;
156
- i.y -= 1;
157
- }
158
- }
159
- b.push(i);
160
- }
161
- const h = new Map(b.map((i) => [i.id, i]));
162
- return r.map((i) => h.get(i.id));
163
- }
164
- function be(r, o, s, u, l) {
165
- const b = r.map(
166
- (a) => a.id === o ? ue({ ...a, x: s, y: u }, l) : a
167
- );
168
- return H(b, l, o);
169
- }
170
- function he(r, o, s, u, l) {
171
- const b = r.map(
172
- (a) => a.id === o ? (
173
- // Resizing never moves the widget: the width clamps to the space
174
- // between its position and the grid edge (clampRect would slide it).
175
- // minW wins over the edge clamp so clampRect cannot re-raise w and
176
- // slide x as a side effect.
177
- ue(
178
- {
179
- ...a,
180
- w: Math.max(a.minW ?? 1, Math.min(s, l - a.x)),
181
- h: u
182
- },
183
- l
184
- )
185
- ) : a
186
- );
187
- return H(b, l, o);
188
- }
189
- function $e(r, o, s, u) {
190
- const l = Math.min(Math.max(1, s), o), b = r.reduce((a, h) => Math.max(a, h.y + h.h), 0);
191
- for (let a = 0; a <= b; a += 1)
192
- for (let h = 0; h <= o - l; h += 1) {
193
- const i = {
194
- x: h,
195
- y: a,
196
- w: l,
197
- h: u
198
- };
199
- if (!r.some((m) => q(m, i)))
200
- return { x: h, y: a };
201
- }
202
- return { x: 0, y: b };
203
- }
204
- function ft(r) {
205
- return r.reduce((o, s) => Math.max(o, s.y + s.h), 0);
206
- }
207
- const pt = 24;
208
- function Ae(r, o, s) {
209
- return o === void 0 || !Number.isFinite(o) || o <= 0 ? !1 : !Number.isFinite(r) || r <= 0 ? s : s ? r < o + pt : r < o;
210
- }
211
- function mt(r, o) {
212
- const s = new Map(o.map((u) => [u.id, u]));
213
- return r.map((u, l) => ({ id: u, index: l, entry: s.get(u) })).sort((u, l) => !u.entry || !l.entry ? u.entry ? -1 : l.entry ? 1 : u.index - l.index : u.entry.y - l.entry.y || u.entry.x - l.entry.x || u.index - l.index).map(({ id: u }) => u);
214
- }
215
- const gt = ce(
216
- [
217
- "ds:grid ds:w-full",
218
- "ds:gap-[var(--spacing-md)]",
219
- // Edit-mode surface: tint the whole plane, draw faint cell lines, and
220
- // reserve spare rows (--dg-min-block) so the AVAILABLE space reads at
221
- // a glance instead of the board ending at the last occupied row.
222
- "ds:data-[editing=true]:rounded-[var(--radius-lg)] ds:data-[editing=true]:bg-muted/10",
223
- "ds:data-[editing=true]:[background-image:var(--dg-grid-lines)]",
224
- "ds:data-[editing=true]:min-h-[var(--dg-min-block)]"
225
- ].join(" "),
226
- {
227
- variants: {
228
- // Stacked: one full-width column; each row takes its widget's block
229
- // size. Focus can fall back to the board here (see the focus effect),
230
- // so it gets the kit's focus ring.
231
- stacked: {
232
- false: [
233
- "ds:[grid-template-columns:repeat(var(--dg-cols),minmax(0,1fr))]",
234
- "ds:[grid-auto-rows:var(--dg-row)]"
235
- ].join(" "),
236
- true: [
237
- "ds:grid-cols-1 ds:auto-rows-auto",
238
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
239
- ].join(" ")
240
- }
241
- },
242
- defaultVariants: { stacked: !1 }
243
- }
244
- ), bt = ce(
245
- [
246
- "ds:relative ds:min-h-0 ds:min-w-0 ds:overflow-hidden",
247
- // Mirror of Card variant="elevated" so widgets read as kit cards.
248
- "ds:rounded-[var(--radius-lg)] ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
249
- "ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)]",
250
- // Grabbed feedback (keyboard or pointer drag in flight).
251
- "ds:data-[grabbed=true]:ring-[length:var(--focus-ring-width)] ds:data-[grabbed=true]:ring-ring ds:data-[grabbed=true]:z-10",
252
- // Only reachable when stacking removes the focused edit control: the
253
- // widget then takes focus itself (tabindex -1, set at that moment).
254
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
255
- ].join(" "),
256
- {
257
- variants: {
258
- stacked: {
259
- false: [
260
- "ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
261
- "ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
262
- ].join(" "),
263
- true: "ds:col-span-full ds:row-auto"
264
- },
265
- stackedHeight: { grid: "", content: "" }
266
- },
267
- compoundVariants: [
268
- { stacked: !1, class: "ds:flex ds:flex-col" },
269
- // At least the block size the widget has in the grid (h rows plus the
270
- // h - 1 gaps). A minimum, not a fixed size: at 200% zoom the widget
271
- // grows instead of clipping its content (WCAG 1.4.4, 1.4.10).
272
- {
273
- stacked: !0,
274
- stackedHeight: "grid",
275
- class: [
276
- "ds:flex ds:flex-col",
277
- "ds:[min-block-size:calc(var(--dg-h)*var(--dg-row)_+_(var(--dg-h)_-_1)*var(--spacing-md))]"
278
- ].join(" ")
279
- },
280
- // As tall as the content, or minStackedHeight. A grid, not a flex
281
- // column, so the body row is a definite box a 100% chart can fill.
282
- {
283
- stacked: !0,
284
- stackedHeight: "content",
285
- class: [
286
- "ds:grid ds:grid-cols-[minmax(0,1fr)] ds:grid-rows-[auto_1fr]",
287
- "ds:[min-block-size:var(--dg-min-stacked)]"
288
- ].join(" ")
289
- }
290
- ],
291
- defaultVariants: { stacked: !1, stackedHeight: "grid" }
292
- }
293
- ), ht = ce(
294
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]",
295
- {
296
- variants: {
297
- // `box`: fill the widget's block size and clip to it. `content`: take
298
- // the content's own height (the content-height stack), never a box.
299
- fit: {
300
- box: "ds:min-h-0 ds:flex-1 ds:overflow-hidden",
301
- content: "ds:min-w-0"
302
- }
303
- },
304
- defaultVariants: { fit: "box" }
305
- }
306
- ), yt = ce(
307
- [
308
- "ds:m-0 ds:min-w-0 ds:flex-1 ds:truncate ds:text-sm ds:font-medium",
309
- "ds:rounded-[var(--radius-sm)]",
310
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
311
- ].join(" ")
312
- ), Fe = rt(
313
- null
314
- );
315
- function ae(r, o) {
316
- Ze.forEach(r, (s) => {
317
- if (et(s)) {
318
- if (s.type === tt) {
319
- ae(
320
- s.props.children,
321
- o
322
- );
323
- return;
324
- }
325
- o(s);
326
- }
327
- });
328
- }
329
- function je({
330
- id: r,
331
- title: o,
332
- minStackedHeight: s,
333
- actionsSlot: u,
334
- children: l
335
- }) {
336
- var g, ne, P;
337
- const { t: b } = We("ui"), a = Qe(Fe), h = x(null), i = a == null ? void 0 : a.layoutById.get(r), [m, M] = L(null), [$, ee] = L(!1), [te, E] = L(!1), [le, re] = L(!1);
338
- if (X(() => {
339
- if (!m) return;
340
- const p = () => ee(m.scrollWidth > m.clientWidth);
341
- p();
342
- const N = typeof document < "u" ? document.fonts : void 0;
343
- N == null || N.addEventListener("loadingdone", p);
344
- const v = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(p);
345
- return v == null || v.observe(m), () => {
346
- N == null || N.removeEventListener("loadingdone", p), v == null || v.disconnect();
347
- };
348
- }, [m, o]), X(() => {
349
- $ || re(!1);
350
- }, [$]), _(() => {
351
- const p = h.current;
352
- !p || !i || (p.style.setProperty("--dg-x", String(i.x + 1)), p.style.setProperty("--dg-y", String(i.y + 1)), p.style.setProperty("--dg-w", String(i.w)), p.style.setProperty("--dg-h", String(i.h)), p.style.setProperty(
353
- "--dg-min-stacked",
354
- s !== void 0 && Number.isFinite(s) && s > 0 ? `${s}px` : "auto"
355
- ));
356
- }, [i == null ? void 0 : i.x, i == null ? void 0 : i.y, i == null ? void 0 : i.w, i == null ? void 0 : i.h, i, s]), !a || !i) return null;
357
- const y = ((g = a.grab) == null ? void 0 : g.id) === r, A = a.editing, R = a.headingLevel ? `h${a.headingLevel}` : "span";
358
- return /* @__PURE__ */ Z(
359
- "div",
360
- {
361
- ref: h,
362
- role: "listitem",
363
- "aria-label": o,
364
- "data-component": "dashboard-grid-widget",
365
- "data-widget-id": r,
366
- "data-grabbed": y || void 0,
367
- className: bt({
368
- stacked: a.stacked,
369
- stackedHeight: a.stackedHeight
370
- }),
371
- children: [
372
- /* @__PURE__ */ Z("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]", children: [
373
- A ? /* @__PURE__ */ G(
374
- ge,
375
- {
376
- size: "sm",
377
- intent: "outline",
378
- type: "button",
379
- icon: /* @__PURE__ */ G(ot, {}),
380
- "aria-label": b("dashboardGrid.move", { title: o }),
381
- "aria-pressed": y && ((ne = a.grab) == null ? void 0 : ne.kind) === "move",
382
- className: "ds:cursor-grab ds:touch-none ds:bg-[var(--card)]",
383
- onPointerDown: (p) => a.startPointerGrab("move", r, p),
384
- onKeyDown: (p) => a.keyboardStep(p, r),
385
- onClick: () => a.startKeyboardGrab("move", r)
386
- }
387
- ) : null,
388
- /* @__PURE__ */ G(
389
- nt,
390
- {
391
- label: o,
392
- open: $ && le,
393
- onOpenChange: (p) => re(p && $),
394
- children: /* @__PURE__ */ G(
395
- R,
396
- {
397
- ref: M,
398
- tabIndex: $ || te ? 0 : void 0,
399
- onFocus: () => E(!0),
400
- onBlur: () => E(!1),
401
- className: yt(),
402
- children: o
403
- }
404
- )
405
- }
406
- ),
407
- u,
408
- A && a.canRemove ? /* @__PURE__ */ G(
409
- ge,
410
- {
411
- size: "sm",
412
- intent: "outline",
413
- type: "button",
414
- icon: /* @__PURE__ */ G(dt, {}),
415
- className: "ds:bg-[var(--card)]",
416
- "aria-label": b("dashboardGrid.remove", { title: o }),
417
- onClick: () => a.requestRemove(r)
418
- }
419
- ) : null
420
- ] }),
421
- /* @__PURE__ */ G(
422
- "div",
423
- {
424
- className: ht({
425
- fit: a.stacked && a.stackedHeight === "content" ? "content" : "box"
426
- }),
427
- children: l
428
- }
429
- ),
430
- A ? /* @__PURE__ */ G("span", { className: "ds:absolute ds:bottom-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]", children: /* @__PURE__ */ G(
431
- ge,
432
- {
433
- size: "sm",
434
- intent: "outline",
435
- type: "button",
436
- icon: /* @__PURE__ */ G(ut, {}),
437
- flipIconInRtl: !0,
438
- "aria-label": b("dashboardGrid.resize", { title: o }),
439
- "aria-pressed": y && ((P = a.grab) == null ? void 0 : P.kind) === "resize",
440
- className: "ds:touch-none ds:bg-[var(--card)]",
441
- onPointerDown: (p) => a.startPointerGrab("resize", r, p),
442
- onKeyDown: (p) => a.keyboardStep(p, r),
443
- onClick: () => a.startKeyboardGrab("resize", r)
444
- }
445
- ) }) : null
446
- ]
447
- }
448
- );
449
- }
450
- je.displayName = "DashboardGrid.Widget";
451
- const _e = Be(
452
- ({
453
- "aria-label": r,
454
- id: o,
455
- cols: s = 12,
456
- rowHeight: u = 96,
457
- layout: l,
458
- defaultLayout: b,
459
- onLayoutChange: a,
460
- editing: h = !1,
461
- onRemoveWidget: i,
462
- onRequestAdd: m,
463
- stackBelow: M,
464
- onStackedChange: $,
465
- stackedHeight: ee = "grid",
466
- widgetHeadingLevel: te,
467
- children: E,
468
- className: le
469
- }, re) => {
470
- const { t: y } = We("ui"), A = x(null), R = x(null), [g, ne] = L(!1), P = x(!1);
471
- P.current = g;
472
- const p = x(null), N = C((e) => {
473
- var d;
474
- if (e === P.current) return;
475
- const t = A.current, n = typeof document < "u" ? document.activeElement : null;
476
- p.current = t && n instanceof HTMLElement && t.contains(n) ? {
477
- element: n,
478
- widgetId: ((d = n.closest("[data-widget-id]")) == null ? void 0 : d.getAttribute("data-widget-id")) ?? null
479
- } : null, P.current = e, ne(e);
480
- }, []);
481
- _(() => {
482
- const e = A.current;
483
- if (!e) return;
484
- if (M === void 0) {
485
- N(!1);
486
- return;
487
- }
488
- if (N(
489
- Ae(e.offsetWidth, M, P.current)
490
- ), typeof ResizeObserver > "u") return;
491
- const t = new ResizeObserver((n) => {
492
- var f, w;
493
- const d = n[n.length - 1];
494
- if (!d) return;
495
- const c = ((w = (f = d.borderBoxSize) == null ? void 0 : f[0]) == null ? void 0 : w.inlineSize) ?? d.contentRect.width;
496
- N(Ae(c, M, P.current));
497
- });
498
- return t.observe(e), () => t.disconnect();
499
- }, [M, N]);
500
- const v = h && !g, ye = j(() => {
501
- const e = [];
502
- return ae(E, (t) => {
503
- t.props.id && e.push(t.props.id);
504
- }), e;
505
- }, [E]), ve = j(() => {
506
- const e = /* @__PURE__ */ new Map();
507
- return ae(E, (t) => {
508
- t.props.id && e.set(t.props.id, {
509
- defaultW: t.props.defaultW ?? 4,
510
- defaultH: t.props.defaultH ?? 2
511
- });
512
- }), e;
513
- }, [E]), [Oe, Ke] = L(() => b ?? []), we = l ?? Oe, I = C(
514
- (e) => {
515
- l === void 0 && Ke(e), a == null || a(e);
516
- },
517
- [l, a]
518
- ), { resolved: k, autoPlaced: xe } = j(() => {
519
- const e = we.map((d) => ue(d, s)), t = ye.filter(
520
- (d) => !e.some((c) => c.id === d)
521
- );
522
- if (t.length === 0)
523
- return { resolved: e, autoPlaced: !1 };
524
- const n = [...e];
525
- for (const d of t) {
526
- const c = ve.get(d) ?? { defaultW: 4, defaultH: 2 }, f = Math.min(c.defaultW, s), w = $e(n, s, f, c.defaultH);
527
- n.push({ id: d, x: w.x, y: w.y, w: f, h: c.defaultH });
528
- }
529
- return { resolved: H(n, s), autoPlaced: !0 };
530
- }, [we, ye, ve, s]), ke = x("");
531
- X(() => {
532
- if (!xe) return;
533
- const e = k.map(
534
- (t) => `${t.id}:${t.x},${t.y},${t.w},${t.h}`
535
- ).join("|");
536
- ke.current !== e && (ke.current = e, I(k));
537
- }, [xe, k, I]);
538
- const [Ve, He] = L(null), [z, Ge] = L(null), [Ue, O] = L(""), fe = x(null), W = x(null), B = x(null), se = x(!1), J = x(s);
539
- J.current = s;
540
- const U = x(k);
541
- U.current = k;
542
- const F = C((e) => {
543
- fe.current = e, He(e);
544
- }, []), ie = C(
545
- (e, t, n) => {
546
- const d = { kind: e, id: t, via: n };
547
- W.current = { ...d, baseLayout: U.current }, Ge(d), F(U.current);
548
- },
549
- [F]
550
- ), Q = Ve ?? k, Me = j(
551
- () => new Map(Q.map((e) => [e.id, e])),
552
- [Q]
553
- ), Se = C(
554
- (e, t) => {
555
- O(
556
- e === "move" ? y("dashboardGrid.movedTo", { col: t.x + 1, row: t.y + 1 }) : y("dashboardGrid.resizedTo", { cols: t.w, rows: t.h })
557
- );
558
- },
559
- [y]
560
- ), S = C(
561
- (e) => {
562
- const t = fe.current, n = W.current;
563
- if (W.current = null, B.current = null, Ge(null), F(null), !e || !t || !n) {
564
- O(y("dashboardGrid.cancelled"));
565
- return;
566
- }
567
- const d = H(t, J.current), c = (w) => w.map((T) => `${T.id}:${T.x},${T.y},${T.w},${T.h}`).join("|");
568
- if (c(d) === c(U.current)) {
569
- O(y("dashboardGrid.cancelled"));
570
- return;
571
- }
572
- I(d);
573
- const f = d.find((w) => w.id === n.id);
574
- O(
575
- f ? y("dashboardGrid.droppedAt", {
576
- col: f.x + 1,
577
- row: f.y + 1
578
- }) : y("dashboardGrid.cancelled")
579
- );
580
- },
581
- [F, I, y]
582
- ), Re = C(
583
- (e, t) => {
584
- if (!v) return;
585
- if (se.current) {
586
- se.current = !1;
587
- return;
588
- }
589
- const n = W.current;
590
- if ((n == null ? void 0 : n.via) !== "pointer") {
591
- if (n && n.id === t && n.kind === e) {
592
- S(!0);
593
- return;
594
- }
595
- ie(e, t, "keyboard"), O(
596
- y(e === "move" ? "dashboardGrid.grabbed" : "dashboardGrid.resizeGrabbed")
597
- );
598
- }
599
- },
600
- [v, ie, S, y]
601
- ), Ne = C(
602
- (e, t) => {
603
- const n = W.current;
604
- if (!n || n.id !== t || n.via !== "keyboard")
605
- return;
606
- if (e.key === "Escape") {
607
- e.preventDefault(), S(!1);
608
- return;
609
- }
610
- if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) return;
611
- e.preventDefault();
612
- const c = typeof window < "u" && R.current ? window.getComputedStyle(R.current).direction === "rtl" : !1, f = e.key === "ArrowRight" ? c ? -1 : 1 : e.key === "ArrowLeft" ? c ? 1 : -1 : 0, w = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0, D = (fe.current ?? n.baseLayout).find((Y) => Y.id === t);
613
- if (!D) return;
614
- const K = n.kind === "move" ? be(
615
- n.baseLayout,
616
- t,
617
- D.x + f,
618
- D.y + w,
619
- s
620
- ) : he(
621
- n.baseLayout,
622
- t,
623
- D.w + f,
624
- D.h + w,
625
- s
626
- );
627
- F(K);
628
- const V = K.find((Y) => Y.id === t);
629
- V && Se(n.kind, V);
630
- },
631
- [s, S, F, Se]
632
- ), Te = C(
633
- (e, t, n) => {
634
- var V, Y, Ce, Ie;
635
- if (!v || W.current) return;
636
- const d = R.current, c = U.current.find((Xe) => Xe.id === t);
637
- if (!d || !c) return;
638
- n.preventDefault(), (Y = (V = n.currentTarget).focus) == null || Y.call(V);
639
- const f = d.getBoundingClientRect();
640
- if (f.width <= 0) return;
641
- const w = window.getComputedStyle(d), T = Number.parseFloat(w.columnGap) || 0, D = Number.parseFloat(w.rowGap) || 0, K = (f.width - T * (s - 1)) / s;
642
- B.current = {
643
- kind: e,
644
- id: t,
645
- pointerId: n.pointerId,
646
- startClientX: n.clientX,
647
- startClientY: n.clientY,
648
- origin: c,
649
- colStride: K + T,
650
- rowStride: u + D,
651
- isRtl: w.direction === "rtl"
652
- };
653
- try {
654
- (Ie = (Ce = n.currentTarget).setPointerCapture) == null || Ie.call(Ce, n.pointerId);
655
- } catch {
656
- }
657
- ie(e, t, "pointer");
658
- },
659
- [v, s, u, ie]
660
- );
661
- X(() => {
662
- if (!z || z.via !== "pointer") return;
663
- const e = (d) => {
664
- const c = B.current, f = W.current;
665
- if (!c || !f || d.pointerId !== c.pointerId)
666
- return;
667
- const w = d.clientX - c.startClientX, T = d.clientY - c.startClientY, D = Math.round(w / c.colStride) * (c.isRtl ? -1 : 1), K = Math.round(T / c.rowStride), V = c.kind === "move" ? be(
668
- f.baseLayout,
669
- c.id,
670
- c.origin.x + D,
671
- c.origin.y + K,
672
- J.current
673
- ) : he(
674
- f.baseLayout,
675
- c.id,
676
- c.origin.w + D,
677
- c.origin.h + K,
678
- J.current
679
- );
680
- F(V);
681
- }, t = (d) => {
682
- const c = B.current;
683
- !c || d.pointerId !== c.pointerId || (se.current = !0, S(!0));
684
- }, n = (d) => {
685
- const c = B.current;
686
- !c || d.pointerId !== c.pointerId || (se.current = !0, S(!1));
687
- };
688
- return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", n), () => {
689
- window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", n);
690
- };
691
- }, [z, S, F]), X(() => {
692
- if (!z) return;
693
- const e = (t) => {
694
- t.key === "Escape" && S(!1);
695
- };
696
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
697
- }, [z, S]), X(() => {
698
- if (!z || z.via !== "keyboard") return;
699
- const e = (n) => {
700
- var c;
701
- const d = n.relatedTarget;
702
- (!d || !((c = R.current) != null && c.contains(d))) && S(!1);
703
- }, t = R.current;
704
- return t == null || t.addEventListener("focusout", e), () => t == null ? void 0 : t.removeEventListener("focusout", e);
705
- }, [z, S]), _(() => {
706
- g && (W.current && S(!1), h && O(y("dashboardGrid.stackedReadOnly")));
707
- }, [g, h, S, y]), _(() => {
708
- var c;
709
- const e = p.current;
710
- p.current = null;
711
- const t = A.current;
712
- if (!e || !t) return;
713
- const n = document.activeElement;
714
- if (n === e.element || n !== null && n !== document.body) return;
715
- if (t.contains(e.element)) {
716
- e.element.focus();
717
- return;
718
- }
719
- const d = e.widgetId ? Array.from(
720
- t.querySelectorAll("[data-widget-id]")
721
- ).find(
722
- (f) => f.getAttribute("data-widget-id") === e.widgetId
723
- ) : void 0;
724
- if (d) {
725
- d.setAttribute("tabindex", "-1"), d.focus();
726
- return;
727
- }
728
- (c = R.current) == null || c.focus();
729
- }, [g]);
730
- const oe = x($);
731
- oe.current = $;
732
- const Ee = x(!1);
733
- _(() => {
734
- var e;
735
- Ee.current !== g && (Ee.current = g, (e = oe.current) == null || e.call(oe, g));
736
- }, [g]), _(() => {
737
- const e = R.current;
738
- e && (e.style.setProperty("--dg-cols", String(s)), e.style.setProperty("--dg-row", `${u}px`));
739
- }, [s, u]);
740
- const Pe = ft(Q);
741
- _(() => {
742
- const e = R.current;
743
- e && (e.style.setProperty(
744
- "--dg-grid-lines",
745
- `repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${s})), repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc(${u}px + var(--spacing-md)))`
746
- ), e.style.setProperty(
747
- "--dg-min-block",
748
- `calc(${Pe + 2} * (${u}px + var(--spacing-md)) - var(--spacing-md))`
749
- ));
750
- }, [s, u, Pe]);
751
- const ze = x(null), pe = v && !!m, de = j(
752
- () => pe ? $e(Q, s, 2, 2) : null,
753
- [pe, Q, s]
754
- );
755
- _(() => {
756
- const e = ze.current;
757
- !e || !de || (e.style.setProperty("--dg-x", String(de.x + 1)), e.style.setProperty("--dg-y", String(de.y + 1)), e.style.setProperty("--dg-w", "2"), e.style.setProperty("--dg-h", "2"));
758
- }, [de]);
759
- const De = C(
760
- (e) => {
761
- I(
762
- H(
763
- U.current.filter((t) => t.id !== e),
764
- J.current
765
- )
766
- ), O(y("dashboardGrid.removed")), i == null || i(e), requestAnimationFrame(() => {
767
- const t = R.current;
768
- if (!t) return;
769
- const n = t.querySelector("button");
770
- n ? n.focus() : t.focus();
771
- });
772
- },
773
- [I, i, y]
774
- ), me = j(
775
- () => ({
776
- moveWidgetTo(e, t, n) {
777
- return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
778
- H(
779
- be(k, e, Math.round(t), Math.round(n), s),
780
- s
781
- )
782
- ), !0);
783
- },
784
- resizeWidgetTo(e, t, n) {
785
- return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
786
- H(
787
- he(
788
- k,
789
- e,
790
- Math.round(t),
791
- Math.round(n),
792
- s
793
- ),
794
- s
795
- )
796
- ), !0);
797
- },
798
- getGridState() {
799
- return {
800
- cols: s,
801
- editing: h,
802
- stacked: g,
803
- layout: k.map((e) => ({ ...e }))
804
- };
805
- }
806
- }),
807
- [v, h, g, k, s, I]
808
- );
809
- Je(re, () => me, [me]), st(lt, me, o);
810
- const Ye = j(
811
- () => ({
812
- editing: v,
813
- stacked: g,
814
- stackedHeight: ee,
815
- headingLevel: te,
816
- layoutById: Me,
817
- grab: z,
818
- canRemove: !!i,
819
- requestRemove: De,
820
- startKeyboardGrab: Re,
821
- keyboardStep: Ne,
822
- startPointerGrab: Te
823
- }),
824
- [
825
- v,
826
- g,
827
- ee,
828
- te,
829
- Me,
830
- z,
831
- i,
832
- De,
833
- Re,
834
- Ne,
835
- Te
836
- ]
837
- ), qe = j(() => {
838
- if (M === void 0) return E;
839
- const e = [], t = /* @__PURE__ */ new Map(), n = [];
840
- return ae(E, (d) => {
841
- const c = d.props.id;
842
- if (c && !t.has(c)) {
843
- const f = Le(d, {
844
- key: `widget:${c}:${d.key ?? ""}`
845
- });
846
- t.set(c, f), e.push(f);
847
- } else {
848
- const f = Le(d, {
849
- key: d.key === null ? `child:at:${n.length}` : `child:key:${d.key}`
850
- });
851
- n.push(f), e.push(f);
852
- }
853
- }), g ? [
854
- ...mt([...t.keys()], k).map(
855
- (d) => t.get(d)
856
- ),
857
- ...n
858
- ] : e;
859
- }, [M, E, g, k]);
860
- return /* @__PURE__ */ Z(
861
- "div",
862
- {
863
- ref: A,
864
- "data-component": "dashboard-grid",
865
- "data-component-id": o,
866
- "data-editing": v || void 0,
867
- "data-stacked": g || void 0,
868
- className: `ds:block ds:w-full ${le ?? ""}`.trim(),
869
- children: [
870
- /* @__PURE__ */ G("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: Ue }),
871
- /* @__PURE__ */ Z(
872
- "div",
873
- {
874
- ref: R,
875
- role: "list",
876
- "aria-label": r,
877
- tabIndex: -1,
878
- "data-editing": v || void 0,
879
- "data-stacked": g || void 0,
880
- className: gt({ stacked: g }),
881
- children: [
882
- /* @__PURE__ */ G(Fe.Provider, { value: Ye, children: qe }),
883
- pe ? (
884
- // role="list" allows only listitem children — the tile wrapper
885
- // carries the grid placement, the button fills it.
886
- /* @__PURE__ */ G(
887
- "div",
888
- {
889
- ref: ze,
890
- role: "listitem",
891
- className: [
892
- "ds:flex",
893
- "ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
894
- "ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
895
- ].join(" "),
896
- children: /* @__PURE__ */ Z(
897
- "button",
898
- {
899
- type: "button",
900
- onClick: m,
901
- className: [
902
- "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
903
- "ds:rounded-[var(--radius-lg)] ds:border ds:border-dashed ds:border-border",
904
- "ds:text-sm ds:text-muted-foreground ds:transition-colors",
905
- "ds:hover:bg-muted/10 ds:hover:text-foreground",
906
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring"
907
- ].join(" "),
908
- children: [
909
- /* @__PURE__ */ G(it, { "aria-hidden": "true", className: "ds:size-4" }),
910
- y("dashboardGrid.add")
911
- ]
912
- }
913
- )
914
- }
915
- )
916
- ) : null
917
- ]
918
- }
919
- )
920
- ]
921
- }
922
- );
923
- }
924
- );
925
- _e.displayName = "DashboardGrid";
926
- const zt = Object.assign(_e, {
927
- Widget: je
928
- });
929
- export {
930
- zt as D,
931
- lt as d
932
- };
933
- //# sourceMappingURL=dashboard-grid-DeNEltwI.js.map