@alfadocs/ui-kit 1.59.0 → 1.61.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 (312) hide show
  1. package/dist/_chunks/{actions-cell-renderer-KoO3EYrZ.js → actions-cell-renderer-CZWGQFKV.js} +3 -3
  2. package/dist/_chunks/{agenda-tray-D3GH9t3T.js → agenda-tray-DU7O5Z7R.js} +3 -3
  3. package/dist/_chunks/{ai-credits-notice-DAxBt_wr.js → ai-credits-notice-MBgQXxsx.js} +3 -3
  4. package/dist/_chunks/{ai-permission-notice-htJegWcH.js → ai-permission-notice-BJHutKLE.js} +2 -2
  5. package/dist/_chunks/{ai-prompt-input-DRNqTCSK.js → ai-prompt-input-Dzos37rf.js} +2 -2
  6. package/dist/_chunks/{alia-sidebar-bMVUsMmJ.js → alia-sidebar-CU3mVL9J.js} +7 -7
  7. package/dist/_chunks/{anamnesis-card-Bh7Tg6i-.js → anamnesis-card-VjJOUl-t.js} +2 -2
  8. package/dist/_chunks/{anamnesis-summary-rows-D9cFUeXk.js → anamnesis-summary-rows-C5F08WT6.js} +7 -7
  9. package/dist/_chunks/{appointment-peek-drkQF54M.js → appointment-peek-BvzXHYiD.js} +3 -3
  10. package/dist/_chunks/{appointment-timeline-C3mTzaUm.js → appointment-timeline-r-q97cec.js} +4 -4
  11. package/dist/_chunks/{appointment-tray-CUBBT4mL.js → appointment-tray-DF_R9ldY.js} +3 -3
  12. package/dist/_chunks/{audio-recorder-B1TpJoMu.js → audio-recorder-Cssm6jVh.js} +3 -3
  13. package/dist/_chunks/{balance-badge-cell-BC92nTi9.js → balance-badge-cell-DMG06b2C.js} +4 -4
  14. package/dist/_chunks/{bishop-score-BOjlxLzL.js → bishop-score-DxfkcxiV.js} +2 -2
  15. package/dist/_chunks/{bmi-calculator-JNiTHdYJ.js → bmi-calculator-B4kgPqt5.js} +2 -2
  16. package/dist/_chunks/{booking-BdWwr_NM.js → booking-CXaqmdF7.js} +5 -5
  17. package/dist/_chunks/{button-CnUVJg1Y.js → button-D-MQxsA_.js} +66 -57
  18. package/dist/_chunks/{button-group-DLqAoowT.js → button-group-Cfpyu6pc.js} +2 -2
  19. package/dist/_chunks/{calendar-KihOHLCs.js → calendar-DNTVaK6b.js} +2 -2
  20. package/dist/_chunks/{calendar-workspace-DD378Xg8.js → calendar-workspace-UL5xcpWa.js} +21 -21
  21. package/dist/_chunks/{care-plan-card-Cd1En8-p.js → care-plan-card-DFQbU_Gd.js} +2 -2
  22. package/dist/_chunks/{care-plan-entry-card-FIYdF44t.js → care-plan-entry-card-bj784KRk.js} +2 -2
  23. package/dist/_chunks/{care-plan-header-DgPAJWS4.js → care-plan-header-DDhyAfVK.js} +2 -2
  24. package/dist/_chunks/{carousel.agent-C7MXzwUi.js → carousel.agent-Csn24G1k.js} +2 -2
  25. package/dist/_chunks/{chart-0jK6B2ry.js → chart-D7PbNO_M.js} +3 -3
  26. package/dist/_chunks/{chat-input-1c4k4-uk.js → chat-input-Ck34Pnmp.js} +2 -2
  27. package/dist/_chunks/{chat-message-Bv9eW1NW.js → chat-message-DU0X3Xnl.js} +3 -3
  28. package/dist/_chunks/{code-block-DWVvOrUF.js → code-block-DiC4bg-o.js} +2 -2
  29. package/dist/_chunks/{connection-status-D-Zeqpr3.js → connection-status-BAnuwayz.js} +3 -3
  30. package/dist/_chunks/{contact-profile-card-DJe2ld0g.js → contact-profile-card-JTRbnbxy.js} +2 -2
  31. package/dist/_chunks/{control-room-rail-DgS2snUz.js → control-room-rail-BbBEIdws.js} +3 -3
  32. package/dist/_chunks/{copy-field-CY1f0k7O.js → copy-field-BCT7APRE.js} +2 -2
  33. package/dist/_chunks/{cycle-calculator-sOOESGEG.js → cycle-calculator-BuFi6ZJa.js} +2 -2
  34. package/dist/_chunks/dashboard-grid-DRnhIlT-.js +1404 -0
  35. package/dist/_chunks/{data-table-DjDuXaQB.js → data-table-DAPkhyXO.js} +6 -6
  36. package/dist/_chunks/{data-table-tabs-BsCll8sH.js → data-table-tabs-2t0cdk0h.js} +3 -3
  37. package/dist/_chunks/{description-list-ZWlFfbOy.js → description-list-CFEw__MT.js} +2 -2
  38. package/dist/_chunks/{dev-bypass-button-m-eXU2PU.js → dev-bypass-button-dTuUuzsT.js} +2 -2
  39. package/dist/_chunks/{document-preview-E6od-Yy0.js → document-preview-DYX669jE.js} +2 -2
  40. package/dist/_chunks/{document-scanner-DDOMMswN.js → document-scanner-C41n4pNq.js} +2 -2
  41. package/dist/_chunks/{due-date-calculator-rtMADvJ8.js → due-date-calculator-yYvX8Ww_.js} +2 -2
  42. package/dist/_chunks/{editable-currency-cell-renderer-DTtF6IIr.js → editable-currency-cell-renderer-6LDFAWUE.js} +3 -3
  43. package/dist/_chunks/{editable-description-CriawIum.js → editable-description-D9FsTi8e.js} +3 -3
  44. package/dist/_chunks/{editor-overlay-CbFUYsVk.js → editor-overlay-BYkcaLCj.js} +2 -2
  45. package/dist/_chunks/{empty-state-BN_R5AzQ.js → empty-state-pL1qum99.js} +2 -2
  46. package/dist/_chunks/{entity-summary-CoCUJe3N.js → entity-summary-oD_63dlz.js} +3 -3
  47. package/dist/_chunks/{error-boundary-BlwcM1KR.js → error-boundary-Dzgu3O6W.js} +2 -2
  48. package/dist/_chunks/{error-page-B0ER6tPK.js → error-page-DirZKDz2.js} +2 -2
  49. package/dist/_chunks/{face-scheme-BunF1rjI.js → face-scheme-C-5V3MsY.js} +5 -5
  50. package/dist/_chunks/{fetal-weight-67yvef3S.js → fetal-weight-CHv2winC.js} +2 -2
  51. package/dist/_chunks/{field-array-BVitwPIt.js → field-array-dSkD_ePA.js} +3 -3
  52. package/dist/_chunks/{file-manager-YXtUu76I.js → file-manager-C8bdHsYy.js} +7 -7
  53. package/dist/_chunks/{finished-terminal-DdLHDe_5.js → finished-terminal-DuF3xrUv.js} +2 -2
  54. package/dist/_chunks/{fiscal-code-input-Dsa1M6VK.js → fiscal-code-input-BSWwda0C.js} +2 -2
  55. package/dist/_chunks/{forgot-password-form-C2ibWCZT.js → forgot-password-form-CGWV5Q1-.js} +2 -2
  56. package/dist/_chunks/{freemium-paywall-C8CXWbhO.js → freemium-paywall-DjjVPC-5.js} +2 -2
  57. package/dist/_chunks/{gestational-age-calculator-DT8XDFVK.js → gestational-age-calculator-BLccWS_4.js} +2 -2
  58. package/dist/_chunks/{hcg-doubling-BxggoYNV.js → hcg-doubling-CnrY2OVu.js} +2 -2
  59. package/dist/_chunks/{header-C0XQZtu6.js → header-BVHAt7Fi.js} +2 -2
  60. package/dist/_chunks/{header-settings-BJ6M2p9Q.js → header-settings-C200bKyp.js} +3 -3
  61. package/dist/_chunks/{heatmap-COoukTUe.js → heatmap-CRMr7VWC.js} +6 -6
  62. package/dist/_chunks/{help-me-write-templates-DpcMweG1.js → help-me-write-templates-C9T8-DcT.js} +5 -5
  63. package/dist/_chunks/{hover-card-s2qD4RAz.js → hover-card-DbTmj-ea.js} +2 -2
  64. package/dist/_chunks/{icon-button-CsOGhuRB.js → icon-button-dNE6ENLn.js} +12 -9
  65. package/dist/_chunks/{icon-button-group-Cap4-Idv.js → icon-button-group-Du8IvZek.js} +2 -2
  66. package/dist/_chunks/{icon-picker-BbO2FB4y.js → icon-picker-D5NdDbCL.js} +3 -3
  67. package/dist/_chunks/{image-cropper-DXqCUezS.js → image-cropper-s8ej8cxa.js} +2 -2
  68. package/dist/_chunks/{info-tip-CJqR9fhi.js → info-tip-DObdz3w3.js} +2 -2
  69. package/dist/_chunks/{insert-result-BUEtHFMg.js → insert-result-h3WL-gMo.js} +2 -2
  70. package/dist/_chunks/{key-value-pair-BN5lWXcB.js → key-value-pair-BNYHAZwD.js} +2 -2
  71. package/dist/_chunks/{kit-extensions-BVtvnev_.js → kit-extensions-DI2nHVNw.js} +6 -6
  72. package/dist/_chunks/{link-cell-renderer-BZmRw_Yi.js → link-cell-renderer-DvhzS6lu.js} +2 -2
  73. package/dist/_chunks/{locale-picker-DVWHnuDN.js → locale-picker-Bu4YE5b2.js} +3 -3
  74. package/dist/_chunks/{login-dev-card-DQioAtdz.js → login-dev-card-DwWWHclZ.js} +2 -2
  75. package/dist/_chunks/{map-view-9Ro_P8O8.js → map-view-BuVfJMEa.js} +2 -2
  76. package/dist/_chunks/{marketplace-app-shell-DnuHxuoE.js → marketplace-app-shell-p6hPgVwy.js} +279 -236
  77. package/dist/_chunks/{message-card-BNoaKInS.js → message-card-CvZlo3Fn.js} +3 -3
  78. package/dist/_chunks/{message-tray-D4R0boMJ.js → message-tray-DrS_LOed.js} +4 -4
  79. package/dist/_chunks/{notes-panel-0Wots8rp.js → notes-panel-6TElt7jQ.js} +4 -4
  80. package/dist/_chunks/{notification-card-DRLmYlL8.js → notification-card-Qrs52HIA.js} +3 -3
  81. package/dist/_chunks/{notification-tray-qrSc9Fcs.js → notification-tray-DRm1z97G.js} +4 -4
  82. package/dist/_chunks/{optical-prescription-B0ap3kGl.js → optical-prescription-DLIAhJ6f.js} +2 -2
  83. package/dist/_chunks/{panel-subview-Bs0WhwR9.js → panel-subview-CjZgdWwO.js} +2 -2
  84. package/dist/_chunks/{patient-details-C6buDwuI.js → patient-details-BjqKBY2x.js} +3 -3
  85. package/dist/_chunks/{patient-field-row-CKb4FIaM.js → patient-field-row-BiI0BPPK.js} +6 -6
  86. package/dist/_chunks/{patient-search-Cgv8Pjsc.js → patient-search-B5R7FyFO.js} +2 -2
  87. package/dist/_chunks/{patient-summary-card-DWx0emu2.js → patient-summary-card-BOgnWKRV.js} +5 -5
  88. package/dist/_chunks/{payment-automation-upsell-BAJwtVCs.js → payment-automation-upsell-39d5ykBi.js} +2 -2
  89. package/dist/_chunks/{payment-request-card-BNiZqIzT.js → payment-request-card-E3G4aVt6.js} +3 -3
  90. package/dist/_chunks/{periodontal-chart-DMWiP5Ti.js → periodontal-chart-BZ1d6S36.js} +2 -2
  91. package/dist/_chunks/{periodontal-chart-card-D2ZFjN7G.js → periodontal-chart-card-BE5hiQnn.js} +2 -2
  92. package/dist/_chunks/{popover-CltTC2Rg.js → popover-DQr_tljb.js} +2 -2
  93. package/dist/_chunks/{practice-results-PINvX-1g.js → practice-results-Cktx7KaC.js} +5 -5
  94. package/dist/_chunks/{pregnancy-dating-BNSWXA0p.js → pregnancy-dating-26fcvhAx.js} +2 -2
  95. package/dist/_chunks/{pregnancy-weight-gain-CI7R6sA6.js → pregnancy-weight-gain-D8q1IUCT.js} +2 -2
  96. package/dist/_chunks/{privacy-lock-CqLxFiLE.js → privacy-lock-BpVgSgMb.js} +3 -3
  97. package/dist/_chunks/{privacy-mask-CUnJv35j.js → privacy-mask-BfMC57ST.js} +2 -2
  98. package/dist/_chunks/{product-hub-panel-MbiHZwjC.js → product-hub-panel-CH4B49ij.js} +3 -3
  99. package/dist/_chunks/{public-header.agent-1MZVDYY1.js → public-header.agent-BHTDKMsw.js} +3 -3
  100. package/dist/_chunks/{radiograph-panel.agent-CpKvvZIU.js → radiograph-panel.agent-DR0gOeSc.js} +4 -4
  101. package/dist/_chunks/{registration-form-JYravsvu.js → registration-form-B8IeB9kd.js} +3 -3
  102. package/dist/_chunks/{reviews-panel-B1Xirvh4.js → reviews-panel-CHzDqerd.js} +4 -4
  103. package/dist/_chunks/{rich-text-editor-CZXnqI3-.js → rich-text-editor-BRuTo2hm.js} +8 -8
  104. package/dist/_chunks/{session-countdown-DAyI9Wye.js → session-countdown-DWY61IcV.js} +2 -2
  105. package/dist/_chunks/{sheet-D_bERXP2.js → sheet-CqvPYNLn.js} +2 -2
  106. package/dist/_chunks/sidebar-C9Zof0z1.js +2571 -0
  107. package/dist/_chunks/{sign-in-with-alfadocs-button-WfdfqQ8O.js → sign-in-with-alfadocs-button-CIv0GgeA.js} +2 -2
  108. package/dist/_chunks/{signature-request-BZIs36nH.js → signature-request-BH7yKI01.js} +3 -3
  109. package/dist/_chunks/{signed-out-frame-BR5sJSNX.js → signed-out-frame-eaOWHpDr.js} +3 -3
  110. package/dist/_chunks/{slot-grid-JU--9C6W.js → slot-grid-DELa2Nwz.js} +4 -4
  111. package/dist/_chunks/{streaming-text-COuXesoR.js → streaming-text-bPDoG7Y3.js} +2 -2
  112. package/dist/_chunks/{task-card-D9ngXO7p.js → task-card-zaTU1rQa.js} +2 -2
  113. package/dist/_chunks/{task-editor-B7xb-mMs.js → task-editor-CgGcg-2c.js} +6 -6
  114. package/dist/_chunks/{task-tray-BAW_wbTO.js → task-tray-DGMwogWu.js} +4 -4
  115. package/dist/_chunks/{tasks-panel-DQvN3TiB.js → tasks-panel-xGtiEdcj.js} +6 -6
  116. package/dist/_chunks/{theme-toggle-CfjLDUfK.js → theme-toggle-_cfYEK73.js} +3 -3
  117. package/dist/_chunks/{toast-2y0czYHr.js → toast-CNUydTgT.js} +2 -2
  118. package/dist/_chunks/{token-insert-menu-BzNAHiND.js → token-insert-menu-CQvV4u1m.js} +2 -2
  119. package/dist/_chunks/{tool-rail-DQ5qTv4l.js → tool-rail-Blgibz0a.js} +2 -2
  120. package/dist/_chunks/{tooth-scheme-CLyS9UUW.js → tooth-scheme-05DsRMA5.js} +2 -2
  121. package/dist/_chunks/{unit-converter-W62N99Mw.js → unit-converter-BPZ0Ldkb.js} +2 -2
  122. package/dist/_chunks/{use-appointment-details-read-Ba1DBPr7.js → use-appointment-details-read-BGVthJFx.js} +12 -12
  123. package/dist/_chunks/{voice-control-panel-p7WMTj4D.js → voice-control-panel-DyKEaFxt.js} +4 -4
  124. package/dist/_chunks/{warning-stack-DGPuJNVD.js → warning-stack-CAL9xVo1.js} +3 -3
  125. package/dist/_chunks/{workflow-map-DFuVff8U.js → workflow-map-BUYG1oXU.js} +5 -5
  126. package/dist/agent-catalog.json +62 -2
  127. package/dist/agent-i18n/en.json +7 -3
  128. package/dist/components/_shared/aria-keyshortcuts.d.ts +5 -0
  129. package/dist/components/agenda-tray/index.js +1 -1
  130. package/dist/components/ai-credits-notice/index.js +1 -1
  131. package/dist/components/ai-permission-notice/index.js +1 -1
  132. package/dist/components/ai-prompt-input/index.js +1 -1
  133. package/dist/components/anamnesis-card/index.js +1 -1
  134. package/dist/components/appointment-card/index.js +1 -1
  135. package/dist/components/appointment-details-panel/index.js +1 -1
  136. package/dist/components/appointment-peek/index.js +1 -1
  137. package/dist/components/appointment-timeline/index.js +1 -1
  138. package/dist/components/audio-recorder/index.js +1 -1
  139. package/dist/components/bishop-score/index.js +1 -1
  140. package/dist/components/bmi-calculator/index.js +1 -1
  141. package/dist/components/booking/index.js +1 -1
  142. package/dist/components/button/index.js +2 -2
  143. package/dist/components/button-group/index.js +1 -1
  144. package/dist/components/calendar/index.js +1 -1
  145. package/dist/components/care-plan-card/index.js +1 -1
  146. package/dist/components/care-plan-entry-card/index.js +1 -1
  147. package/dist/components/care-plan-header/index.js +1 -1
  148. package/dist/components/carousel/index.js +1 -1
  149. package/dist/components/chart/index.js +1 -1
  150. package/dist/components/chat-input/index.js +1 -1
  151. package/dist/components/chat-message/index.js +1 -1
  152. package/dist/components/connection-status/index.js +1 -1
  153. package/dist/components/contact-profile-card/index.js +1 -1
  154. package/dist/components/control-room-rail/index.js +1 -1
  155. package/dist/components/copy-field/index.js +1 -1
  156. package/dist/components/cycle-calculator/index.js +1 -1
  157. package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +16 -4
  158. package/dist/components/dashboard-grid/dashboard-grid.d.ts +42 -2
  159. package/dist/components/dashboard-grid/index.d.ts +1 -1
  160. package/dist/components/dashboard-grid/index.js +1 -1
  161. package/dist/components/data-table/data-table.d.ts +1 -1
  162. package/dist/components/data-table/index.js +4 -4
  163. package/dist/components/data-table/toolbar.d.ts +1 -1
  164. package/dist/components/data-table-tabs/index.js +1 -1
  165. package/dist/components/description-list/index.js +1 -1
  166. package/dist/components/dev-bypass-button/index.js +1 -1
  167. package/dist/components/document-preview/index.js +1 -1
  168. package/dist/components/document-scanner/index.js +1 -1
  169. package/dist/components/due-date-calculator/index.js +1 -1
  170. package/dist/components/editable-description/index.js +1 -1
  171. package/dist/components/editor-overlay/index.js +1 -1
  172. package/dist/components/empty-state/index.js +1 -1
  173. package/dist/components/entity-summary/index.js +1 -1
  174. package/dist/components/error-boundary/index.js +1 -1
  175. package/dist/components/face-scheme/index.js +1 -1
  176. package/dist/components/fetal-weight/index.js +1 -1
  177. package/dist/components/field-array/index.js +1 -1
  178. package/dist/components/file-manager/index.js +1 -1
  179. package/dist/components/finished-terminal/index.js +1 -1
  180. package/dist/components/fiscal-code-input/index.js +1 -1
  181. package/dist/components/freemium-paywall/index.js +1 -1
  182. package/dist/components/gestational-age-calculator/index.js +1 -1
  183. package/dist/components/hcg-doubling/index.js +1 -1
  184. package/dist/components/header/index.js +1 -1
  185. package/dist/components/header-settings/index.js +1 -1
  186. package/dist/components/heatmap/index.js +1 -1
  187. package/dist/components/hover-card/index.js +1 -1
  188. package/dist/components/icon-button/index.js +1 -1
  189. package/dist/components/icon-button-group/index.js +1 -1
  190. package/dist/components/icon-picker/index.js +1 -1
  191. package/dist/components/image-cropper/index.js +1 -1
  192. package/dist/components/info-tip/index.js +1 -1
  193. package/dist/components/key-value-pair/index.js +1 -1
  194. package/dist/components/locale-picker/index.js +1 -1
  195. package/dist/components/map-view/index.js +1 -1
  196. package/dist/components/message-card/index.js +1 -1
  197. package/dist/components/message-tray/index.js +1 -1
  198. package/dist/components/notes-panel/index.js +1 -1
  199. package/dist/components/notification-card/index.js +1 -1
  200. package/dist/components/notification-tray/index.js +1 -1
  201. package/dist/components/optical-prescription/index.js +1 -1
  202. package/dist/components/panel-subview/index.js +1 -1
  203. package/dist/components/patient-details/index.js +1 -1
  204. package/dist/components/patient-search/index.js +1 -1
  205. package/dist/components/patient-summary-card/index.js +1 -1
  206. package/dist/components/patient-table/index.js +1 -1
  207. package/dist/components/payment-card/index.js +1 -1
  208. package/dist/components/periodontal-chart/index.js +1 -1
  209. package/dist/components/periodontal-chart-card/index.js +1 -1
  210. package/dist/components/popover/index.js +1 -1
  211. package/dist/components/practice-results/index.js +1 -1
  212. package/dist/components/pregnancy-dating/index.js +1 -1
  213. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  214. package/dist/components/privacy-lock/index.js +1 -1
  215. package/dist/components/product-hub-tray/index.js +1 -1
  216. package/dist/components/public-header/index.js +1 -1
  217. package/dist/components/radiograph-panel/index.js +1 -1
  218. package/dist/components/reviews-panel/index.js +1 -1
  219. package/dist/components/rich-text-editor/index.js +2 -2
  220. package/dist/components/session-countdown/index.js +1 -1
  221. package/dist/components/sheet/index.js +1 -1
  222. package/dist/components/sidebar/index.d.ts +2 -2
  223. package/dist/components/sidebar/index.js +24 -21
  224. package/dist/components/sidebar/sidebar.d.ts +61 -1
  225. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  226. package/dist/components/slot-grid/index.js +1 -1
  227. package/dist/components/streaming-text/index.js +1 -1
  228. package/dist/components/task-card/index.js +1 -1
  229. package/dist/components/task-editor/index.js +1 -1
  230. package/dist/components/task-tray/index.js +1 -1
  231. package/dist/components/tasks-panel/index.js +1 -1
  232. package/dist/components/theme-toggle/index.js +1 -1
  233. package/dist/components/toast/index.js +1 -1
  234. package/dist/components/token-insert-menu/index.js +1 -1
  235. package/dist/components/tool-rail/index.js +1 -1
  236. package/dist/components/tooth-scheme/index.js +1 -1
  237. package/dist/components/unit-converter/index.js +1 -1
  238. package/dist/components/voice-control-panel/index.js +1 -1
  239. package/dist/components/warning-stack/index.js +1 -1
  240. package/dist/components/workflow/index.js +1 -1
  241. package/dist/i18n/locales/ar.d.ts +3 -0
  242. package/dist/i18n/locales/ar.js +3 -0
  243. package/dist/i18n/locales/de.d.ts +3 -0
  244. package/dist/i18n/locales/de.js +3 -0
  245. package/dist/i18n/locales/el.d.ts +3 -0
  246. package/dist/i18n/locales/el.js +3 -0
  247. package/dist/i18n/locales/en.d.ts +3 -0
  248. package/dist/i18n/locales/en.js +3 -0
  249. package/dist/i18n/locales/es.d.ts +3 -0
  250. package/dist/i18n/locales/es.js +3 -0
  251. package/dist/i18n/locales/fr.d.ts +3 -0
  252. package/dist/i18n/locales/fr.js +3 -0
  253. package/dist/i18n/locales/hi.d.ts +3 -0
  254. package/dist/i18n/locales/hi.js +3 -0
  255. package/dist/i18n/locales/it.d.ts +3 -0
  256. package/dist/i18n/locales/it.js +3 -0
  257. package/dist/i18n/locales/ja.d.ts +3 -0
  258. package/dist/i18n/locales/ja.js +3 -0
  259. package/dist/i18n/locales/nl.d.ts +3 -0
  260. package/dist/i18n/locales/nl.js +3 -0
  261. package/dist/i18n/locales/pl.d.ts +3 -0
  262. package/dist/i18n/locales/pl.js +3 -0
  263. package/dist/i18n/locales/pt.d.ts +3 -0
  264. package/dist/i18n/locales/pt.js +3 -0
  265. package/dist/i18n/locales/ro.d.ts +3 -0
  266. package/dist/i18n/locales/ro.js +3 -0
  267. package/dist/i18n/locales/ru.d.ts +3 -0
  268. package/dist/i18n/locales/ru.js +3 -0
  269. package/dist/i18n/locales/sq.d.ts +3 -0
  270. package/dist/i18n/locales/sq.js +3 -0
  271. package/dist/i18n/locales/sv.d.ts +3 -0
  272. package/dist/i18n/locales/sv.js +3 -0
  273. package/dist/i18n/locales/tr.d.ts +3 -0
  274. package/dist/i18n/locales/tr.js +3 -0
  275. package/dist/i18n/locales/zh.d.ts +3 -0
  276. package/dist/i18n/locales/zh.js +3 -0
  277. package/dist/index.js +775 -772
  278. package/dist/locales/ar.json +3 -0
  279. package/dist/locales/de.json +3 -0
  280. package/dist/locales/el.json +3 -0
  281. package/dist/locales/en.json +3 -0
  282. package/dist/locales/es.json +3 -0
  283. package/dist/locales/fr.json +3 -0
  284. package/dist/locales/hi.json +3 -0
  285. package/dist/locales/it.json +3 -0
  286. package/dist/locales/ja.json +3 -0
  287. package/dist/locales/nl.json +3 -0
  288. package/dist/locales/pl.json +3 -0
  289. package/dist/locales/pt.json +3 -0
  290. package/dist/locales/ro.json +3 -0
  291. package/dist/locales/ru.json +3 -0
  292. package/dist/locales/sq.json +3 -0
  293. package/dist/locales/sv.json +3 -0
  294. package/dist/locales/tr.json +3 -0
  295. package/dist/locales/zh.json +3 -0
  296. package/dist/patterns/alia-assistant/index.js +1 -1
  297. package/dist/patterns/anamnesis/index.js +1 -1
  298. package/dist/patterns/calendar/index.js +1 -1
  299. package/dist/patterns/error-page/index.js +1 -1
  300. package/dist/patterns/forgot-password-form/index.js +1 -1
  301. package/dist/patterns/help-me-write-templates/index.js +1 -1
  302. package/dist/patterns/login-form/index.js +1 -1
  303. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  304. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +23 -4
  305. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  306. package/dist/patterns/registration-form/index.js +1 -1
  307. package/dist/patterns/signature-request/index.js +1 -1
  308. package/dist/patterns/signed-out-frame/index.js +1 -1
  309. package/dist/tokens.css +1 -1
  310. package/package.json +1 -1
  311. package/dist/_chunks/dashboard-grid-SAGjktTs.js +0 -933
  312. package/dist/_chunks/sidebar-D_S2-SXH.js +0 -2165
@@ -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-CsOGhuRB.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-SAGjktTs.js.map