@alfadocs/ui-kit 1.57.0 → 1.59.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 (378) hide show
  1. package/dist/_chunks/{actions-cell-renderer-Dj1ZkvJj.js → actions-cell-renderer-KoO3EYrZ.js} +4 -4
  2. package/dist/_chunks/{address-fields-BfjxS05Z.js → address-fields-CJtu7LQU.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-ZKhDxlfw.js → agenda-tray-D3GH9t3T.js} +3 -3
  4. package/dist/_chunks/{ai-credits-notice-ktklr8fy.js → ai-credits-notice-DAxBt_wr.js} +11 -11
  5. package/dist/_chunks/{ai-permission-notice-DyuEGwAt.js → ai-permission-notice-htJegWcH.js} +2 -2
  6. package/dist/_chunks/{ai-prompt-input-Beh-O_rJ.js → ai-prompt-input-DRNqTCSK.js} +3 -3
  7. package/dist/_chunks/{alia-sidebar-BBKBJCv6.js → alia-sidebar-bMVUsMmJ.js} +8 -8
  8. package/dist/_chunks/{anamnesis-card-BSlAhaoG.js → anamnesis-card-Bh7Tg6i-.js} +3 -3
  9. package/dist/_chunks/{anamnesis-summary-card-2YfIYY2j.js → anamnesis-summary-card-cCj7LPh3.js} +2 -2
  10. package/dist/_chunks/{anamnesis-summary-rows-CCQ62mMN.js → anamnesis-summary-rows-D9cFUeXk.js} +14 -14
  11. package/dist/_chunks/{antenatal-schedule-timeline-Kf2Yg8uo.js → antenatal-schedule-timeline-CfNFrej5.js} +2 -2
  12. package/dist/_chunks/{app-frame-B-0O9CrU.js → app-frame-CqmDh2v5.js} +2 -2
  13. package/dist/_chunks/{appointment-card-Dh3fAcyf.js → appointment-card-BXQUZlAJ.js} +2 -2
  14. package/dist/_chunks/{appointment-peek-WvNbE4JG.js → appointment-peek-drkQF54M.js} +4 -4
  15. package/dist/_chunks/{appointment-timeline-Z0494xO-.js → appointment-timeline-C3mTzaUm.js} +5 -5
  16. package/dist/_chunks/{appointment-tray-CyI_p3zU.js → appointment-tray-CUBBT4mL.js} +4 -4
  17. package/dist/_chunks/{audio-recorder-DWKKjGPt.js → audio-recorder-B1TpJoMu.js} +4 -4
  18. package/dist/_chunks/{balance-badge-cell-CII3SDmR.js → balance-badge-cell-BC92nTi9.js} +5 -5
  19. package/dist/_chunks/{bishop-score-BxA20j9T.js → bishop-score-BOjlxLzL.js} +4 -4
  20. package/dist/_chunks/{bmi-calculator-C0UTxB7R.js → bmi-calculator-JNiTHdYJ.js} +3 -3
  21. package/dist/_chunks/{booking-81WnKDsH.js → booking-BdWwr_NM.js} +8 -8
  22. package/dist/_chunks/{button-Bn16lcFM.js → button-CnUVJg1Y.js} +71 -61
  23. package/dist/_chunks/{button-group-CWlwR-A5.js → button-group-DLqAoowT.js} +73 -73
  24. package/dist/_chunks/{calculator-dialog-CzQv03p0.js → calculator-dialog-BUfaWqvu.js} +2 -2
  25. package/dist/_chunks/{calendar-6-24PQ1u.js → calendar-KihOHLCs.js} +2 -2
  26. package/dist/_chunks/{calendar-workspace-D5-k_9zE.js → calendar-workspace-DD378Xg8.js} +30 -30
  27. package/dist/_chunks/{card-DMO2nkt4.js → card-BA4Ig_kn.js} +9 -8
  28. package/dist/_chunks/{care-plan-card-DxrRLRdW.js → care-plan-card-Cd1En8-p.js} +2 -2
  29. package/dist/_chunks/{care-plan-entry-card-0rpR-4Te.js → care-plan-entry-card-FIYdF44t.js} +2 -2
  30. package/dist/_chunks/{care-plan-header-BMwZIgHJ.js → care-plan-header-DgPAJWS4.js} +2 -2
  31. package/dist/_chunks/{carousel.agent-D3xthzTf.js → carousel.agent-C7MXzwUi.js} +2 -2
  32. package/dist/_chunks/{chart-DQ5GxqgT.js → chart-0jK6B2ry.js} +407 -393
  33. package/dist/_chunks/{chat-input-PtrSu1ZC.js → chat-input-1c4k4-uk.js} +2 -2
  34. package/dist/_chunks/{chat-message-CmGUcajG.js → chat-message-Bv9eW1NW.js} +3 -3
  35. package/dist/_chunks/{city-input-BC_nYINn.js → city-input-3J3bz9EO.js} +2 -2
  36. package/dist/_chunks/{clinical-note-card-hx939bvw.js → clinical-note-card-L6FVM9Gx.js} +2 -2
  37. package/dist/_chunks/{code-block-BQgK70mO.js → code-block-DWVvOrUF.js} +2 -2
  38. package/dist/_chunks/{connection-status-ncTjUPt6.js → connection-status-D-Zeqpr3.js} +4 -4
  39. package/dist/_chunks/{contact-card-fHBMwEsx.js → contact-card-C8rEsC4Q.js} +2 -2
  40. package/dist/_chunks/{contact-profile-card-CMyBYgRR.js → contact-profile-card-DJe2ld0g.js} +3 -3
  41. package/dist/_chunks/{control-room-rail-Tx2jW250.js → control-room-rail-DgS2snUz.js} +3 -3
  42. package/dist/_chunks/{copy-field-CvTIuA_p.js → copy-field-CY1f0k7O.js} +2 -2
  43. package/dist/_chunks/{cycle-calculator-Cww9DzIa.js → cycle-calculator-sOOESGEG.js} +3 -3
  44. package/dist/_chunks/dashboard-grid-SAGjktTs.js +933 -0
  45. package/dist/_chunks/{data-table-fAMTeAjM.js → data-table-DjDuXaQB.js} +11 -11
  46. package/dist/_chunks/{data-table-tabs-CHYAAeHy.js → data-table-tabs-BsCll8sH.js} +3 -3
  47. package/dist/_chunks/{description-list-DkLeHiew.js → description-list-ZWlFfbOy.js} +2 -2
  48. package/dist/_chunks/{dev-bypass-button-BhGn6evf.js → dev-bypass-button-m-eXU2PU.js} +2 -2
  49. package/dist/_chunks/{dialog-Dn-iQ0Jp.js → dialog-D6fkpRc4.js} +72 -61
  50. package/dist/_chunks/{document-preview-CHGGG0l_.js → document-preview-E6od-Yy0.js} +4 -4
  51. package/dist/_chunks/{document-scanner-CQS9kv84.js → document-scanner-DDOMMswN.js} +2 -2
  52. package/dist/_chunks/{dropdown-menu-BQSNVp4x.js → dropdown-menu-D1we7oAY.js} +134 -133
  53. package/dist/_chunks/{due-date-calculator-D_qFUiHp.js → due-date-calculator-rtMADvJ8.js} +4 -4
  54. package/dist/_chunks/{editable-currency-cell-renderer-CmYcMuwi.js → editable-currency-cell-renderer-DTtF6IIr.js} +3 -3
  55. package/dist/_chunks/{editable-description-DuJlvltc.js → editable-description-CriawIum.js} +3 -3
  56. package/dist/_chunks/{editor-overlay-NMxzcO6J.js → editor-overlay-CbFUYsVk.js} +2 -2
  57. package/dist/_chunks/{empty-state-gNG3qYCX.js → empty-state-BN_R5AzQ.js} +61 -59
  58. package/dist/_chunks/{entity-summary-CWcCSThK.js → entity-summary-CoCUJe3N.js} +4 -4
  59. package/dist/_chunks/{error-boundary-ChowhO6w.js → error-boundary-BlwcM1KR.js} +2 -2
  60. package/dist/_chunks/{error-page-CpuYbpOB.js → error-page-B0ER6tPK.js} +2 -2
  61. package/dist/_chunks/{face-scheme-BicuUA2K.js → face-scheme-BunF1rjI.js} +7 -7
  62. package/dist/_chunks/{fetal-weight-BWaqqjea.js → fetal-weight-67yvef3S.js} +3 -3
  63. package/dist/_chunks/{field-array-BO-kaKFK.js → field-array-BVitwPIt.js} +3 -3
  64. package/dist/_chunks/{file-manager-CFsL1KVt.js → file-manager-YXtUu76I.js} +9 -9
  65. package/dist/_chunks/{finished-terminal-CPSDrIMB.js → finished-terminal-DdLHDe_5.js} +3 -3
  66. package/dist/_chunks/{fiscal-code-input-DesSQ6Fh.js → fiscal-code-input-Dsa1M6VK.js} +2 -2
  67. package/dist/_chunks/{forgot-password-form-DEx-M_QR.js → forgot-password-form-C2ibWCZT.js} +4 -4
  68. package/dist/_chunks/{freemium-paywall-DIKuhX8b.js → freemium-paywall-C8CXWbhO.js} +27 -27
  69. package/dist/_chunks/{gestational-age-calculator-CZi43xKG.js → gestational-age-calculator-DT8XDFVK.js} +5 -5
  70. package/dist/_chunks/{hcg-doubling-Ccvh7OaU.js → hcg-doubling-BxggoYNV.js} +3 -3
  71. package/dist/_chunks/{header-B9552pLh.js → header-C0XQZtu6.js} +2 -2
  72. package/dist/_chunks/{header-settings-BMcCx2LC.js → header-settings-BJ6M2p9Q.js} +4 -4
  73. package/dist/_chunks/{heatmap-BEeOThkW.js → heatmap-COoukTUe.js} +6 -6
  74. package/dist/_chunks/{help-me-write-templates-BUoYGo6f.js → help-me-write-templates-DpcMweG1.js} +7 -7
  75. package/dist/_chunks/{hover-card-U_ZYoh1n.js → hover-card-s2qD4RAz.js} +2 -2
  76. package/dist/_chunks/{icon-button-COX76Jdj.js → icon-button-CsOGhuRB.js} +2 -2
  77. package/dist/_chunks/{icon-button-group-C5hhI-R5.js → icon-button-group-Cap4-Idv.js} +3 -3
  78. package/dist/_chunks/{icon-picker-C86lQTIA.js → icon-picker-BbO2FB4y.js} +4 -4
  79. package/dist/_chunks/{image-cropper-D0kkQ4lG.js → image-cropper-DXqCUezS.js} +2 -2
  80. package/dist/_chunks/{info-tip-CJpNpzZe.js → info-tip-CJqR9fhi.js} +2 -2
  81. package/dist/_chunks/{insert-result-C1C2OCc3.js → insert-result-BUEtHFMg.js} +2 -2
  82. package/dist/_chunks/{key-value-pair-BNNITp6S.js → key-value-pair-BN5lWXcB.js} +2 -2
  83. package/dist/_chunks/{kit-extensions-DYVxWcqv.js → kit-extensions-BVtvnev_.js} +6 -6
  84. package/dist/_chunks/{link-cell-renderer-CxW_oLa5.js → link-cell-renderer-BZmRw_Yi.js} +6 -6
  85. package/dist/_chunks/{list-RRN2TJ_7.js → list-CNnn7DOD.js} +75 -73
  86. package/dist/_chunks/{locale-picker-BGfrZyTw.js → locale-picker-DVWHnuDN.js} +3 -3
  87. package/dist/_chunks/{login-dev-card-DmZ1B0lB.js → login-dev-card-DQioAtdz.js} +4 -4
  88. package/dist/_chunks/{map-view-CO2v0hfp.js → map-view-9Ro_P8O8.js} +2 -2
  89. package/dist/_chunks/marketplace-app-shell-DnuHxuoE.js +613 -0
  90. package/dist/_chunks/{message-card-DVo8-dOm.js → message-card-BNoaKInS.js} +3 -3
  91. package/dist/_chunks/{message-tray-QKQutwxj.js → message-tray-D4R0boMJ.js} +5 -5
  92. package/dist/_chunks/{muscle-scheme-BDgIaGeW.js → muscle-scheme-YoN3rYXV.js} +2 -2
  93. package/dist/_chunks/navigation-dismiss-B1mcW1CT.js +9 -0
  94. package/dist/_chunks/{notes-panel-Cm4pttpl.js → notes-panel-0Wots8rp.js} +7 -7
  95. package/dist/_chunks/{notification-card-BGCIL6Mu.js → notification-card-DRLmYlL8.js} +3 -3
  96. package/dist/_chunks/{notification-tray-C5VtbGjd.js → notification-tray-qrSc9Fcs.js} +5 -5
  97. package/dist/_chunks/{operator-hero-Dyd2IGbR.js → operator-hero-C_Khr5IU.js} +2 -2
  98. package/dist/_chunks/{optical-prescription-Do6e3wfs.js → optical-prescription-B0ap3kGl.js} +3 -3
  99. package/dist/_chunks/{pagination-BR1_GfD_.js → pagination-DvKGrsXu.js} +146 -142
  100. package/dist/_chunks/{panel-subview-BT-Apwgb.js → panel-subview-Bs0WhwR9.js} +62 -48
  101. package/dist/_chunks/{patient-details-99kEdtc5.js → patient-details-C6buDwuI.js} +4 -4
  102. package/dist/_chunks/{patient-field-row-DkxY13T6.js → patient-field-row-CKb4FIaM.js} +9 -9
  103. package/dist/_chunks/{patient-search-D5xlXmd2.js → patient-search-Cgv8Pjsc.js} +4 -4
  104. package/dist/_chunks/{patient-summary-card-opdyfeW2.js → patient-summary-card-DWx0emu2.js} +6 -6
  105. package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js → payment-automation-upsell-BAJwtVCs.js} +4 -4
  106. package/dist/_chunks/{payment-request-card-DAniJNLX.js → payment-request-card-BNiZqIzT.js} +4 -4
  107. package/dist/_chunks/{periodontal-chart-DD5C0M3l.js → periodontal-chart-DMWiP5Ti.js} +2 -2
  108. package/dist/_chunks/{periodontal-chart-card-CxdXvsPU.js → periodontal-chart-card-D2ZFjN7G.js} +3 -3
  109. package/dist/_chunks/{periodontal-diagnosis-D-PJv7KS.js → periodontal-diagnosis-6wybid_W.js} +2 -2
  110. package/dist/_chunks/{periodontal-risk-chart-D3DjIymT.js → periodontal-risk-chart-CgLwBj5c.js} +2 -2
  111. package/dist/_chunks/{popover-BG75rYjN.js → popover-CltTC2Rg.js} +2 -2
  112. package/dist/_chunks/popup-region-qz_5_A0V.js +79 -0
  113. package/dist/_chunks/{practice-profile-hero-C8RPACCi.js → practice-profile-hero-DPbvYfCs.js} +2 -2
  114. package/dist/_chunks/{practice-results-CfRkjzsI.js → practice-results-PINvX-1g.js} +6 -6
  115. package/dist/_chunks/{pregnancy-dating-BFzv9g1N.js → pregnancy-dating-BNSWXA0p.js} +5 -5
  116. package/dist/_chunks/{pregnancy-weight-gain-CUUrBTBo.js → pregnancy-weight-gain-CI7R6sA6.js} +3 -3
  117. package/dist/_chunks/{privacy-lock-WkUgwIj_.js → privacy-lock-CqLxFiLE.js} +3 -3
  118. package/dist/_chunks/{privacy-mask-ChIjELJC.js → privacy-mask-CUnJv35j.js} +3 -3
  119. package/dist/_chunks/{product-hub-panel-DlVRK7Ue.js → product-hub-panel-MbiHZwjC.js} +4 -4
  120. package/dist/_chunks/{public-header.agent-BctevbuY.js → public-header.agent-1MZVDYY1.js} +3 -3
  121. package/dist/_chunks/{radiograph-panel.agent-DyqbTECc.js → radiograph-panel.agent-CpKvvZIU.js} +6 -6
  122. package/dist/_chunks/{registration-form-BlTzYywa.js → registration-form-JYravsvu.js} +7 -7
  123. package/dist/_chunks/{reviews-panel-CDcK6W3b.js → reviews-panel-B1Xirvh4.js} +5 -5
  124. package/dist/_chunks/{rich-text-editor-DTnNZ4Ff.js → rich-text-editor-CZXnqI3-.js} +11 -11
  125. package/dist/_chunks/{scroll-area-ZtFCv9K7.js → scroll-area-CY5SLYNw.js} +104 -74
  126. package/dist/_chunks/{search-bar-DQJS0wJN.js → search-bar-mA4bPe3t.js} +294 -255
  127. package/dist/_chunks/{section-card-ChJdOlBU.js → section-card-D5nWiTcK.js} +2 -2
  128. package/dist/_chunks/{select-Ce5RMk93.js → select-k4gBdS8N.js} +249 -224
  129. package/dist/_chunks/{session-countdown-CBINYw8H.js → session-countdown-DAyI9Wye.js} +2 -2
  130. package/dist/_chunks/{sheet-8qsiMoUI.js → sheet-D_bERXP2.js} +8 -8
  131. package/dist/_chunks/sidebar-D_S2-SXH.js +2165 -0
  132. package/dist/_chunks/{sign-in-with-alfadocs-button-D91_x8DX.js → sign-in-with-alfadocs-button-WfdfqQ8O.js} +2 -2
  133. package/dist/_chunks/{signature-request-DRuYAG5I.js → signature-request-BZIs36nH.js} +7 -7
  134. package/dist/_chunks/{signed-out-frame-AhMsNW1r.js → signed-out-frame-BR5sJSNX.js} +4 -4
  135. package/dist/_chunks/{slot-grid-sVZriOiQ.js → slot-grid-JU--9C6W.js} +4 -4
  136. package/dist/_chunks/{state-backed-text-input-DECQy5aA.js → state-backed-text-input-Cgh4ms3p.js} +2 -2
  137. package/dist/_chunks/{streaming-text-BKZmbW1Q.js → streaming-text-COuXesoR.js} +2 -2
  138. package/dist/_chunks/{tab-bar-Bm-rJB7Y.js → tab-bar-5GppbMGc.js} +2 -2
  139. package/dist/_chunks/{tabs-I2wf_nC7.js → tabs-2x3L13jn.js} +3 -3
  140. package/dist/_chunks/{task-card-BMXMh3uE.js → task-card-D9ngXO7p.js} +2 -2
  141. package/dist/_chunks/{task-editor-NkcopDna.js → task-editor-B7xb-mMs.js} +11 -10
  142. package/dist/_chunks/{task-tray-DsBO-AaP.js → task-tray-BAW_wbTO.js} +4 -4
  143. package/dist/_chunks/{tasks-panel-CdgZQQgG.js → tasks-panel-DQvN3TiB.js} +7 -7
  144. package/dist/_chunks/{theme-toggle-PpFcFoYK.js → theme-toggle-CfjLDUfK.js} +4 -4
  145. package/dist/_chunks/{timeline-DG8wAlAx.js → timeline-DEIuHrWz.js} +2 -2
  146. package/dist/_chunks/{toast-CPqguP7G.js → toast-2y0czYHr.js} +2 -2
  147. package/dist/_chunks/{token-insert-menu-B-pWFDKX.js → token-insert-menu-BzNAHiND.js} +3 -3
  148. package/dist/_chunks/{tool-rail-Bwyuw_Ot.js → tool-rail-DQ5qTv4l.js} +115 -114
  149. package/dist/_chunks/{tooth-scheme-BAO_voUO.js → tooth-scheme-CLyS9UUW.js} +3 -3
  150. package/dist/_chunks/{unit-converter-DS4UB_59.js → unit-converter-W62N99Mw.js} +3 -3
  151. package/dist/_chunks/{use-appointment-details-read-CfFQNOF_.js → use-appointment-details-read-Ba1DBPr7.js} +18 -18
  152. package/dist/_chunks/use-state-backed-input-DhRQo6gM.js +57 -0
  153. package/dist/_chunks/{voice-control-panel-BKbgb7FM.js → voice-control-panel-p7WMTj4D.js} +6 -6
  154. package/dist/_chunks/{warning-stack-ubD0IZCy.js → warning-stack-DGPuJNVD.js} +3 -3
  155. package/dist/_chunks/{widget-picker-rBA7MR5P.js → widget-picker-CkhoG4Rj.js} +80 -57
  156. package/dist/_chunks/{workflow-map-Demlpy39.js → workflow-map-DFuVff8U.js} +7 -7
  157. package/dist/_chunks/{workflow-status-BT27_fQp.js → workflow-status-Dc_CyEz5.js} +2 -2
  158. package/dist/agent-catalog.json +2 -2
  159. package/dist/agent-i18n/en.json +1 -1
  160. package/dist/components/_shared/navigation-dismiss.d.ts +8 -0
  161. package/dist/components/_shared/popup-region.d.ts +28 -0
  162. package/dist/components/_shared/use-state-backed-input.d.ts +3 -2
  163. package/dist/components/address-fields/index.js +1 -1
  164. package/dist/components/agenda-tray/index.js +1 -1
  165. package/dist/components/ai-credits-notice/index.js +1 -1
  166. package/dist/components/ai-permission-notice/index.js +1 -1
  167. package/dist/components/ai-prompt-input/index.js +1 -1
  168. package/dist/components/anamnesis-card/index.js +1 -1
  169. package/dist/components/anamnesis-summary-card/index.js +1 -1
  170. package/dist/components/app-frame/index.js +1 -1
  171. package/dist/components/appointment-card/index.js +2 -2
  172. package/dist/components/appointment-details-panel/index.js +1 -1
  173. package/dist/components/appointment-peek/index.js +1 -1
  174. package/dist/components/appointment-timeline/index.js +1 -1
  175. package/dist/components/audio-recorder/index.js +1 -1
  176. package/dist/components/bishop-score/index.js +1 -1
  177. package/dist/components/bmi-calculator/index.js +1 -1
  178. package/dist/components/booking/index.js +1 -1
  179. package/dist/components/button/index.js +2 -2
  180. package/dist/components/button-group/index.js +1 -1
  181. package/dist/components/calculator-dialog/index.js +1 -1
  182. package/dist/components/calendar/index.js +1 -1
  183. package/dist/components/card/index.js +1 -1
  184. package/dist/components/care-plan-card/index.js +1 -1
  185. package/dist/components/care-plan-entry-card/index.js +1 -1
  186. package/dist/components/care-plan-header/index.js +1 -1
  187. package/dist/components/carousel/index.js +1 -1
  188. package/dist/components/chart/index.js +1 -1
  189. package/dist/components/chat-input/index.js +1 -1
  190. package/dist/components/chat-message/index.js +1 -1
  191. package/dist/components/city-input/index.js +1 -1
  192. package/dist/components/clinical-note-card/index.js +1 -1
  193. package/dist/components/connection-status/index.js +1 -1
  194. package/dist/components/contact-card/index.js +1 -1
  195. package/dist/components/contact-profile-card/index.js +1 -1
  196. package/dist/components/control-room-rail/index.js +1 -1
  197. package/dist/components/copy-field/index.js +1 -1
  198. package/dist/components/cycle-calculator/index.js +1 -1
  199. package/dist/components/dashboard-grid/dashboard-grid.d.ts +33 -8
  200. package/dist/components/dashboard-grid/index.js +1 -1
  201. package/dist/components/data-table/index.js +4 -4
  202. package/dist/components/data-table-tabs/index.js +1 -1
  203. package/dist/components/description-list/index.js +1 -1
  204. package/dist/components/dev-bypass-button/index.js +1 -1
  205. package/dist/components/dialog/index.js +1 -1
  206. package/dist/components/document-preview/index.js +1 -1
  207. package/dist/components/document-scanner/index.js +1 -1
  208. package/dist/components/dropdown-menu/index.js +1 -1
  209. package/dist/components/due-date-calculator/index.js +2 -2
  210. package/dist/components/editable-description/index.js +1 -1
  211. package/dist/components/editor-overlay/index.js +1 -1
  212. package/dist/components/empty-state/empty-state.d.ts +8 -0
  213. package/dist/components/empty-state/index.d.ts +1 -1
  214. package/dist/components/empty-state/index.js +1 -1
  215. package/dist/components/entity-summary/index.js +1 -1
  216. package/dist/components/error-boundary/index.js +1 -1
  217. package/dist/components/face-scheme/index.js +1 -1
  218. package/dist/components/fetal-weight/index.js +1 -1
  219. package/dist/components/field-array/index.js +1 -1
  220. package/dist/components/file-manager/index.js +1 -1
  221. package/dist/components/finished-terminal/index.js +1 -1
  222. package/dist/components/fiscal-code-input/index.js +1 -1
  223. package/dist/components/freemium-paywall/index.js +1 -1
  224. package/dist/components/gestational-age-calculator/index.js +1 -1
  225. package/dist/components/hcg-doubling/index.js +1 -1
  226. package/dist/components/header/index.js +1 -1
  227. package/dist/components/header-settings/index.js +1 -1
  228. package/dist/components/heatmap/index.js +1 -1
  229. package/dist/components/hover-card/index.js +1 -1
  230. package/dist/components/icon-button/index.js +1 -1
  231. package/dist/components/icon-button-group/index.js +1 -1
  232. package/dist/components/icon-picker/index.js +1 -1
  233. package/dist/components/image-cropper/index.js +1 -1
  234. package/dist/components/info-tip/index.js +1 -1
  235. package/dist/components/key-value-pair/index.js +1 -1
  236. package/dist/components/list/index.js +1 -1
  237. package/dist/components/locale-picker/index.js +1 -1
  238. package/dist/components/map-view/index.js +1 -1
  239. package/dist/components/message-card/index.js +1 -1
  240. package/dist/components/message-tray/index.js +1 -1
  241. package/dist/components/muscle-scheme/index.js +1 -1
  242. package/dist/components/notes-panel/index.js +1 -1
  243. package/dist/components/notification-card/index.js +1 -1
  244. package/dist/components/notification-tray/index.js +1 -1
  245. package/dist/components/operator-hero/index.js +1 -1
  246. package/dist/components/optical-prescription/index.js +1 -1
  247. package/dist/components/pagination/index.js +1 -1
  248. package/dist/components/panel-subview/index.js +1 -1
  249. package/dist/components/patient-details/index.js +1 -1
  250. package/dist/components/patient-search/index.js +1 -1
  251. package/dist/components/patient-summary-card/index.js +1 -1
  252. package/dist/components/patient-table/index.js +1 -1
  253. package/dist/components/payment-card/index.js +1 -1
  254. package/dist/components/periodontal-chart/index.js +1 -1
  255. package/dist/components/periodontal-chart-card/index.js +1 -1
  256. package/dist/components/periodontal-diagnosis/index.js +1 -1
  257. package/dist/components/periodontal-risk-chart/index.js +1 -1
  258. package/dist/components/popover/index.js +1 -1
  259. package/dist/components/practice-profile-hero/index.js +1 -1
  260. package/dist/components/practice-results/index.js +1 -1
  261. package/dist/components/pregnancy-dating/index.js +1 -1
  262. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  263. package/dist/components/privacy-lock/index.js +1 -1
  264. package/dist/components/product-hub-tray/index.js +1 -1
  265. package/dist/components/public-header/index.js +1 -1
  266. package/dist/components/radiograph-panel/index.js +1 -1
  267. package/dist/components/reviews-panel/index.js +1 -1
  268. package/dist/components/rich-text-editor/index.js +2 -2
  269. package/dist/components/scroll-area/index.js +1 -1
  270. package/dist/components/scroll-area/scroll-area.d.ts +6 -5
  271. package/dist/components/search-bar/index.js +1 -1
  272. package/dist/components/search-bar/search-bar.d.ts +1 -1
  273. package/dist/components/section-card/index.js +1 -1
  274. package/dist/components/select/index.js +1 -1
  275. package/dist/components/select/select.d.ts +1 -1
  276. package/dist/components/session-countdown/index.js +1 -1
  277. package/dist/components/sheet/index.js +1 -1
  278. package/dist/components/sidebar/index.d.ts +1 -1
  279. package/dist/components/sidebar/index.js +1 -1
  280. package/dist/components/sidebar/sidebar-move.d.ts +88 -0
  281. package/dist/components/sidebar/sidebar.d.ts +40 -1
  282. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  283. package/dist/components/skeleton-scheme/index.js +1 -1
  284. package/dist/components/slot-grid/index.js +1 -1
  285. package/dist/components/streaming-text/index.js +1 -1
  286. package/dist/components/tab-bar/index.js +1 -1
  287. package/dist/components/tabs/index.js +1 -1
  288. package/dist/components/task-card/index.js +1 -1
  289. package/dist/components/task-editor/index.js +1 -1
  290. package/dist/components/task-tray/index.js +1 -1
  291. package/dist/components/tasks-panel/index.js +1 -1
  292. package/dist/components/theme-toggle/index.js +1 -1
  293. package/dist/components/timeline/index.js +1 -1
  294. package/dist/components/toast/index.js +1 -1
  295. package/dist/components/token-insert-menu/index.js +1 -1
  296. package/dist/components/tool-rail/index.js +1 -1
  297. package/dist/components/tooth-scheme/index.js +1 -1
  298. package/dist/components/unit-converter/index.js +1 -1
  299. package/dist/components/voice-control-panel/index.js +1 -1
  300. package/dist/components/warning-stack/index.js +1 -1
  301. package/dist/components/widget-picker/index.js +1 -1
  302. package/dist/components/workflow/index.js +1 -1
  303. package/dist/components/workflow-status/index.js +1 -1
  304. package/dist/host-compat.css +2 -1
  305. package/dist/i18n/locales/ar.d.ts +15 -0
  306. package/dist/i18n/locales/ar.js +16 -1
  307. package/dist/i18n/locales/de.d.ts +15 -0
  308. package/dist/i18n/locales/de.js +16 -1
  309. package/dist/i18n/locales/el.d.ts +15 -0
  310. package/dist/i18n/locales/el.js +16 -1
  311. package/dist/i18n/locales/en.d.ts +15 -0
  312. package/dist/i18n/locales/en.js +16 -1
  313. package/dist/i18n/locales/es.d.ts +15 -0
  314. package/dist/i18n/locales/es.js +16 -1
  315. package/dist/i18n/locales/fr.d.ts +15 -0
  316. package/dist/i18n/locales/fr.js +16 -1
  317. package/dist/i18n/locales/hi.d.ts +15 -0
  318. package/dist/i18n/locales/hi.js +16 -1
  319. package/dist/i18n/locales/it.d.ts +15 -0
  320. package/dist/i18n/locales/it.js +16 -1
  321. package/dist/i18n/locales/ja.d.ts +15 -0
  322. package/dist/i18n/locales/ja.js +16 -1
  323. package/dist/i18n/locales/nl.d.ts +15 -0
  324. package/dist/i18n/locales/nl.js +16 -1
  325. package/dist/i18n/locales/pl.d.ts +15 -0
  326. package/dist/i18n/locales/pl.js +16 -1
  327. package/dist/i18n/locales/pt.d.ts +15 -0
  328. package/dist/i18n/locales/pt.js +16 -1
  329. package/dist/i18n/locales/ro.d.ts +15 -0
  330. package/dist/i18n/locales/ro.js +16 -1
  331. package/dist/i18n/locales/ru.d.ts +15 -0
  332. package/dist/i18n/locales/ru.js +16 -1
  333. package/dist/i18n/locales/sq.d.ts +15 -0
  334. package/dist/i18n/locales/sq.js +16 -1
  335. package/dist/i18n/locales/sv.d.ts +15 -0
  336. package/dist/i18n/locales/sv.js +16 -1
  337. package/dist/i18n/locales/tr.d.ts +15 -0
  338. package/dist/i18n/locales/tr.js +16 -1
  339. package/dist/i18n/locales/zh.d.ts +15 -0
  340. package/dist/i18n/locales/zh.js +16 -1
  341. package/dist/index.js +147 -147
  342. package/dist/locales/ar.json +16 -1
  343. package/dist/locales/de.json +16 -1
  344. package/dist/locales/el.json +16 -1
  345. package/dist/locales/en.json +16 -1
  346. package/dist/locales/es.json +16 -1
  347. package/dist/locales/fr.json +16 -1
  348. package/dist/locales/hi.json +16 -1
  349. package/dist/locales/it.json +16 -1
  350. package/dist/locales/ja.json +16 -1
  351. package/dist/locales/nl.json +16 -1
  352. package/dist/locales/pl.json +16 -1
  353. package/dist/locales/pt.json +16 -1
  354. package/dist/locales/ro.json +16 -1
  355. package/dist/locales/ru.json +16 -1
  356. package/dist/locales/sq.json +16 -1
  357. package/dist/locales/sv.json +16 -1
  358. package/dist/locales/tr.json +16 -1
  359. package/dist/locales/zh.json +16 -1
  360. package/dist/patterns/alia-assistant/index.js +1 -1
  361. package/dist/patterns/anamnesis/index.js +1 -1
  362. package/dist/patterns/calendar/index.js +1 -1
  363. package/dist/patterns/error-page/index.js +1 -1
  364. package/dist/patterns/forgot-password-form/index.js +1 -1
  365. package/dist/patterns/help-me-write-templates/index.js +1 -1
  366. package/dist/patterns/login-form/index.js +1 -1
  367. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  368. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +34 -9
  369. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  370. package/dist/patterns/registration-form/index.js +1 -1
  371. package/dist/patterns/signature-request/index.js +1 -1
  372. package/dist/patterns/signed-out-frame/index.js +1 -1
  373. package/dist/tokens.css +6 -3
  374. package/package.json +1 -1
  375. package/dist/_chunks/dashboard-grid-DfEY2qci.js +0 -844
  376. package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js +0 -555
  377. package/dist/_chunks/sidebar-DLsG2AIk.js +0 -1349
  378. package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +0 -59
@@ -0,0 +1,2165 @@
1
+ import { jsxs as x, Fragment as ye, jsx as s } from "react/jsx-runtime";
2
+ import { useId as fe, useState as se, useRef as V, useCallback as B, useEffect as ee, useMemo as xe, createContext as le, useContext as ce, forwardRef as $, isValidElement as Ze } from "react";
3
+ import * as ge from "@radix-ui/react-dialog";
4
+ import * as Ne from "@radix-ui/react-collapsible";
5
+ import * as he from "@radix-ui/react-accordion";
6
+ import * as C from "@radix-ui/react-tooltip";
7
+ import { a as Je } from "./accordion-Ch3xp0mX.js";
8
+ import { S as Qe } from "./scroll-area-CY5SLYNw.js";
9
+ import { Slot as Le, Slottable as es } from "@radix-ui/react-slot";
10
+ import { c as te } from "./index-D2ZczOXr.js";
11
+ import { useTranslation as ue } from "react-i18next";
12
+ import { u as ss } from "./registry-DvAUVLHh.js";
13
+ import { u as ts } from "./use-edge-resize-DHbyQwu8.js";
14
+ import { c as rs } from "./compose-refs-C0k0tdqF.js";
15
+ import { a as ns, b as as, d as is } from "./input-surface-iBmxVBfr.js";
16
+ import { u as os } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
17
+ import { i as ds } from "./is-development-CLUAnsU7.js";
18
+ import { X as cs } from "./x-B5YnXwCz.js";
19
+ import { c as Me } from "./createLucideIcon-DhHxpK9K.js";
20
+ import { G as ls } from "./grip-vertical-onSb1JXO.js";
21
+ import { C as we } from "./chevron-right-I9AeSxH2.js";
22
+ import { S as us } from "./star-Bf9L2Uot.js";
23
+ import { T as ms } from "./trending-up-C_luYBzS.js";
24
+ /**
25
+ * @license lucide-react v1.22.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */
30
+ const fs = [
31
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
32
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
33
+ ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
34
+ ], ps = Me("panel-left-close", fs);
35
+ /**
36
+ * @license lucide-react v1.22.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */
41
+ const vs = [
42
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
43
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
44
+ ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
45
+ ], gs = Me("panel-left-open", vs), bs = {
46
+ id: "sidebar",
47
+ capabilities: ["expand"],
48
+ state: {
49
+ isCollapsed: {
50
+ type: "boolean",
51
+ descriptionKey: "ui.agent.sidebar.state.isCollapsed",
52
+ description: "True when the sidebar is in its collapsed (rail) state.",
53
+ read: (e) => e.getIsCollapsed()
54
+ }
55
+ },
56
+ actions: {
57
+ toggle_collapsed: {
58
+ // Pure ephemeral chrome state — toggling the rail loses no data.
59
+ safety: "read",
60
+ descriptionKey: "ui.agent.sidebar.actions.toggleCollapsed",
61
+ description: "Toggle the sidebar between collapsed and expanded.",
62
+ invoke: (e) => {
63
+ e.toggleCollapsed();
64
+ }
65
+ }
66
+ },
67
+ domHooks: {
68
+ root: { attr: "data-component", value: "sidebar" },
69
+ instanceId: {
70
+ attr: "data-component-id",
71
+ sourceProp: "id",
72
+ description: "Sourced from the id prop."
73
+ },
74
+ item: {
75
+ attr: "data-nav-id",
76
+ sourceProp: "navId",
77
+ description: "Each Sidebar.Item emits its `navId` prop as data-nav-id. Agents activate a nav item via native click on the matching anchor."
78
+ }
79
+ }
80
+ }, ze = le({
81
+ enabled: !1,
82
+ move: null
83
+ }), Se = () => ce(ze), Be = le(null), de = (e, r) => e.sectionId === r.sectionId && e.index === r.index, Fe = "[data-sidebar-item-id]", He = "[data-sidebar-section-id]";
84
+ function me(e, r) {
85
+ var a;
86
+ const t = (a = e.parentElement) == null ? void 0 : a.closest(He);
87
+ return t && r.contains(t) ? t.dataset.sidebarSectionId ?? null : null;
88
+ }
89
+ function hs(e, r) {
90
+ var m;
91
+ const t = e.querySelector("[data-sidebar-body]") ?? e, a = Array.from(
92
+ t.querySelectorAll(`${He},${Fe}`)
93
+ ), i = /* @__PURE__ */ new Map([[null, []]]), c = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
94
+ let p = null;
95
+ for (const l of a) {
96
+ const g = l.dataset.sidebarSectionId;
97
+ if (g !== void 0) {
98
+ i.set(g, []), c.set(g, l.dataset.sidebarSectionOpen !== "false"), o.set(g, l.dataset.sidebarSectionLabel ?? "");
99
+ continue;
100
+ }
101
+ if (l.dataset.sidebarItemId === r) {
102
+ p = l;
103
+ continue;
104
+ }
105
+ const h = me(l, t);
106
+ (m = i.get(h)) == null || m.push(l);
107
+ }
108
+ if (!p) return null;
109
+ const u = (l) => {
110
+ var g;
111
+ return (((g = i.get(l)) == null ? void 0 : g.length) ?? 0) + 1;
112
+ }, v = [], I = i.get(null) ?? [], z = I.length === 0 && me(p, t) === null;
113
+ for (const l of a) {
114
+ const g = l.dataset.sidebarSectionId;
115
+ if (g !== void 0) {
116
+ const w = i.get(g) ?? [];
117
+ (!c.get(g) || w.length === 0) && v.push({
118
+ sectionId: g,
119
+ index: w.length,
120
+ total: u(g),
121
+ indicator: { kind: "section", sectionId: g }
122
+ });
123
+ continue;
124
+ }
125
+ if (l === p) {
126
+ z && v.push({
127
+ sectionId: null,
128
+ index: 0,
129
+ total: 1,
130
+ indicator: { kind: "item", itemId: r, edge: "before" }
131
+ });
132
+ continue;
133
+ }
134
+ const h = me(l, t);
135
+ if (h !== null && !c.get(h)) continue;
136
+ const D = i.get(h) ?? [], R = D.indexOf(l), j = l.dataset.sidebarItemId ?? "";
137
+ v.push({
138
+ sectionId: h,
139
+ index: R,
140
+ total: u(h),
141
+ indicator: { kind: "item", itemId: j, edge: "before" }
142
+ }), R === D.length - 1 && v.push({
143
+ sectionId: h,
144
+ index: R + 1,
145
+ total: u(h),
146
+ indicator: { kind: "item", itemId: j, edge: "after" }
147
+ });
148
+ }
149
+ I.length === 0 && !z && v.push({
150
+ sectionId: null,
151
+ index: 0,
152
+ total: 1,
153
+ indicator: { kind: "list" }
154
+ });
155
+ const N = me(p, t), A = (i.get(N) ?? []).filter(
156
+ (l) => l.compareDocumentPosition(p) & Node.DOCUMENT_POSITION_FOLLOWING
157
+ ).length;
158
+ return {
159
+ places: v,
160
+ originIndex: v.findIndex(
161
+ (l) => de(l, { sectionId: N, index: A })
162
+ ),
163
+ emptySectionIds: [...i.entries()].filter(([l, g]) => l !== null && c.get(l) && !g.length).map(([l]) => l),
164
+ listEmpty: I.length === 0 && !z,
165
+ sectionLabels: o
166
+ };
167
+ }
168
+ function xs(e, r) {
169
+ const t = e.querySelector("[data-sidebar-body]") ?? e, a = me(r, t), i = Array.from(t.querySelectorAll(Fe)).filter(
170
+ (c) => c !== r && me(c, t) === a && c.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING
171
+ ).length;
172
+ return { sectionId: a, index: i };
173
+ }
174
+ function Ue(e, r) {
175
+ var a;
176
+ const { indicator: t } = r;
177
+ return t.kind === "item" ? e.querySelector(
178
+ `[data-sidebar-item-id="${CSS.escape(t.itemId)}"]`
179
+ ) : t.kind === "list" ? e.querySelector("[data-sidebar-drop-zone-list]") : e.querySelector(
180
+ `[data-sidebar-drop-zone="${CSS.escape(t.sectionId)}"]`
181
+ ) ?? ((a = e.querySelector(
182
+ `[data-sidebar-section-id="${CSS.escape(t.sectionId)}"]`
183
+ )) == null ? void 0 : a.querySelector("[data-sidebar-section-heading]")) ?? null;
184
+ }
185
+ function ys(e, r) {
186
+ var a;
187
+ const t = (a = Ue(e, r)) == null ? void 0 : a.getBoundingClientRect();
188
+ return t ? r.indicator.kind === "item" ? r.indicator.edge === "before" ? t.top : t.bottom : t.top + t.height / 2 : r.indicator.kind === "item" ? Number.POSITIVE_INFINITY : e.getBoundingClientRect().bottom;
189
+ }
190
+ const ws = 450, Ss = 6, Ns = 5e3, Ie = 48, Is = 14;
191
+ function zs({
192
+ onMoveItem: e,
193
+ enabled: r,
194
+ rootRef: t,
195
+ quietFocusRef: a
196
+ }) {
197
+ const { t: i } = ue("ui"), c = fe(), [o, p] = se(null), u = V(null), v = V([]), I = V(/* @__PURE__ */ new Map()), z = V(/* @__PURE__ */ new Map()), N = V(null), A = V(e);
198
+ A.current = e;
199
+ const m = V(null), l = V(null), g = B((n) => {
200
+ u.current = n, p(n);
201
+ }, []), [h, D] = se(""), R = V(!1), j = B((n) => {
202
+ R.current = !R.current, D(R.current ? n : `${n}​`);
203
+ }, []), w = B(
204
+ (n) => n.sectionId === null ? i("navigation.sidebar.move.inList", {
205
+ position: n.index + 1,
206
+ total: n.total
207
+ }) : i("navigation.sidebar.move.inSection", {
208
+ section: I.current.get(n.sectionId) ?? "",
209
+ position: n.index + 1,
210
+ total: n.total
211
+ }),
212
+ [i]
213
+ ), F = B(
214
+ (n, y, T) => {
215
+ var X;
216
+ const d = t.current;
217
+ if (!d) return !1;
218
+ const b = hs(d, n);
219
+ if (!b || b.originIndex < 0) return !1;
220
+ v.current = b.places, I.current = b.sectionLabels;
221
+ const S = b.places[b.originIndex], M = T.getAttribute("aria-label") ?? ((X = T.textContent) == null ? void 0 : X.trim()) ?? "";
222
+ return g({
223
+ itemId: n,
224
+ label: M,
225
+ via: y,
226
+ origin: S,
227
+ target: S,
228
+ emptySectionIds: b.emptySectionIds,
229
+ listEmpty: b.listEmpty
230
+ }), j(
231
+ i("navigation.sidebar.move.pickedUp", {
232
+ item: M,
233
+ place: w(S)
234
+ })
235
+ ), !0;
236
+ },
237
+ [t, g, j, i, w]
238
+ ), E = B(
239
+ (n, y) => {
240
+ const T = u.current;
241
+ !T || de(T.target, n) || (g({ ...T, target: n }), y && (j(w(n)), requestAnimationFrame(() => {
242
+ var b, S;
243
+ const d = t.current;
244
+ d && ((S = (b = Ue(d, n)) == null ? void 0 : b.scrollIntoView) == null || S.call(b, { block: "nearest" }));
245
+ })));
246
+ },
247
+ [g, j, w, t]
248
+ ), H = B(() => {
249
+ var S, M;
250
+ const n = u.current;
251
+ if (!n) return;
252
+ g(null), v.current = [];
253
+ const { itemId: y, origin: T, target: d, label: b } = n;
254
+ de(T, d) || (N.current = {
255
+ itemId: y,
256
+ sectionId: d.sectionId,
257
+ index: d.index,
258
+ until: Date.now() + Ns
259
+ }, d.sectionId !== null && ((S = z.current.get(d.sectionId)) == null || S()), (M = A.current) == null || M.call(A, {
260
+ itemId: y,
261
+ toSectionId: d.sectionId,
262
+ index: d.index
263
+ })), j(
264
+ i("navigation.sidebar.move.dropped", {
265
+ item: b,
266
+ place: w(d)
267
+ })
268
+ );
269
+ }, [g, j, i, w]), O = B(() => {
270
+ const n = u.current;
271
+ n && (g(null), v.current = [], j(
272
+ i("navigation.sidebar.move.cancelled", {
273
+ item: n.label,
274
+ place: w(n.origin)
275
+ })
276
+ ));
277
+ }, [g, j, i, w]), _ = B(
278
+ (n, y) => {
279
+ const T = u.current, d = !n.altKey && !n.ctrlKey && !n.metaKey && !n.shiftKey;
280
+ if (!T) {
281
+ n.key === " " && d && !n.repeat && (n.preventDefault(), F(y, "keyboard", n.currentTarget));
282
+ return;
283
+ }
284
+ if (T.itemId !== y || T.via !== "keyboard") return;
285
+ const b = v.current, S = b.findIndex((X) => de(X, T.target)), M = (X) => {
286
+ const ae = b[Math.max(0, Math.min(b.length - 1, X))];
287
+ ae && E(ae, !0);
288
+ };
289
+ switch (n.key) {
290
+ case "ArrowDown":
291
+ n.preventDefault(), M(S + 1);
292
+ break;
293
+ case "ArrowUp":
294
+ n.preventDefault(), M(S - 1);
295
+ break;
296
+ case "Home":
297
+ n.preventDefault(), M(0);
298
+ break;
299
+ case "End":
300
+ n.preventDefault(), M(b.length - 1);
301
+ break;
302
+ case " ":
303
+ case "Enter":
304
+ n.preventDefault(), n.repeat || H();
305
+ break;
306
+ case "Escape":
307
+ n.preventDefault(), n.stopPropagation(), O();
308
+ break;
309
+ case "Tab":
310
+ O();
311
+ break;
312
+ }
313
+ },
314
+ [F, E, H, O]
315
+ ), P = B(
316
+ (n) => {
317
+ const y = u.current;
318
+ (y == null ? void 0 : y.via) === "keyboard" && y.itemId === n && O();
319
+ },
320
+ [O]
321
+ ), f = B(() => {
322
+ var y;
323
+ const n = m.current;
324
+ n != null && n.timer && clearTimeout(n.timer), n != null && n.frame && cancelAnimationFrame(n.frame), m.current = null, (y = l.current) == null || y.call(l), l.current = null;
325
+ }, []), Y = B(
326
+ (n, y) => {
327
+ if (u.current || m.current || !n.isPrimary || n.button !== 0) return;
328
+ const T = n.pointerType === "touch", d = {
329
+ pointerId: n.pointerId,
330
+ itemId: y,
331
+ node: n.currentTarget,
332
+ touch: T,
333
+ startX: n.clientX,
334
+ startY: n.clientY,
335
+ dragging: !1,
336
+ timer: null,
337
+ lastY: n.clientY,
338
+ frame: 0
339
+ };
340
+ m.current = d;
341
+ const b = () => {
342
+ var k, Z;
343
+ if (!F(d.itemId, "pointer", d.node)) {
344
+ f();
345
+ return;
346
+ }
347
+ d.dragging = !0, (Z = (k = window.getSelection) == null ? void 0 : k.call(window)) == null || Z.removeAllRanges();
348
+ }, S = (k) => {
349
+ const Z = t.current;
350
+ if (!Z) return;
351
+ let J = null, ve = Number.POSITIVE_INFINITY;
352
+ for (const ie of v.current) {
353
+ const oe = Math.abs(ys(Z, ie) - k);
354
+ oe < ve && (J = ie, ve = oe);
355
+ }
356
+ J && E(J, !1);
357
+ }, M = () => {
358
+ var De, Pe;
359
+ if (d.frame = 0, !d.dragging) return;
360
+ const k = (Pe = (De = t.current) == null ? void 0 : De.querySelector("[data-sidebar-body]")) == null ? void 0 : Pe.closest("[data-radix-scroll-area-viewport]");
361
+ if (!k) return;
362
+ const Z = k.getBoundingClientRect(), J = Z.top + Ie - d.lastY, ve = d.lastY - (Z.bottom - Ie), ie = Math.max(J, ve);
363
+ if (ie <= 0) return;
364
+ const oe = Math.ceil(Is * Math.min(1, ie / Ie)), be = k.scrollTop;
365
+ k.scrollTop += J > 0 ? -oe : oe, k.scrollTop !== be && (S(d.lastY), d.frame = requestAnimationFrame(M));
366
+ }, X = (k) => {
367
+ if (k.pointerId === d.pointerId) {
368
+ if (!d.dragging) {
369
+ if (Math.hypot(
370
+ k.clientX - d.startX,
371
+ k.clientY - d.startY
372
+ ) < Ss) return;
373
+ if (d.touch) {
374
+ f();
375
+ return;
376
+ }
377
+ if (b(), !d.dragging) return;
378
+ }
379
+ d.lastY = k.clientY, S(k.clientY), d.frame || (d.frame = requestAnimationFrame(M));
380
+ }
381
+ }, ae = (k) => {
382
+ var oe;
383
+ if (k.pointerId !== d.pointerId) return;
384
+ const Z = d.dragging;
385
+ if (f(), !Z) return;
386
+ const J = (oe = t.current) == null ? void 0 : oe.getBoundingClientRect();
387
+ if (!J || k.clientX < J.left || k.clientX > J.right || k.clientY < J.top || k.clientY > J.bottom) {
388
+ O();
389
+ return;
390
+ }
391
+ H();
392
+ const ie = (be) => {
393
+ be.preventDefault(), be.stopPropagation();
394
+ };
395
+ window.addEventListener("click", ie, {
396
+ capture: !0,
397
+ once: !0
398
+ }), setTimeout(() => window.removeEventListener("click", ie, !0), 0);
399
+ }, Te = (k) => {
400
+ if (k.pointerId !== d.pointerId) return;
401
+ const Z = d.dragging;
402
+ f(), Z && O();
403
+ }, ke = (k) => k.preventDefault(), Ee = (k) => {
404
+ k.key !== "Escape" || !d.dragging || (k.preventDefault(), f(), O());
405
+ };
406
+ window.addEventListener("pointermove", X), window.addEventListener("pointerup", ae), window.addEventListener("pointercancel", Te), window.addEventListener("keydown", Ee, !0), T && (window.addEventListener("contextmenu", ke, !0), d.timer = setTimeout(() => {
407
+ d.timer = null, b();
408
+ }, ws)), l.current = () => {
409
+ window.removeEventListener("pointermove", X), window.removeEventListener("pointerup", ae), window.removeEventListener("pointercancel", Te), window.removeEventListener("keydown", Ee, !0), window.removeEventListener("contextmenu", ke, !0);
410
+ };
411
+ },
412
+ [F, E, H, O, f, t]
413
+ );
414
+ ee(() => f, [f]);
415
+ const W = V(null), q = B((n) => {
416
+ var y;
417
+ (y = m.current) != null && y.dragging && n.preventDefault();
418
+ }, []), K = B(
419
+ (n) => {
420
+ var y;
421
+ W.current !== n && ((y = W.current) == null || y.removeEventListener("touchmove", q), W.current = n, n == null || n.addEventListener("touchmove", q, { passive: !1 }));
422
+ },
423
+ [q]
424
+ ), re = V(r);
425
+ re.current = r;
426
+ const ne = B(
427
+ (n) => K(n && re.current ? n : null),
428
+ [K]
429
+ );
430
+ ee(() => {
431
+ K(r ? t.current : null);
432
+ }, [r, K, t]), ee(() => () => K(null), [K]), ee(() => {
433
+ !r && u.current && O();
434
+ }, [r, O]);
435
+ const L = B((n, y) => (z.current.set(n, y), () => {
436
+ z.current.get(n) === y && z.current.delete(n);
437
+ }), []), U = B(() => {
438
+ const n = N.current, y = t.current;
439
+ if (!n || !y) return;
440
+ if (Date.now() > n.until) {
441
+ N.current = null;
442
+ return;
443
+ }
444
+ const T = y.querySelector(
445
+ `[data-sidebar-item-id="${CSS.escape(n.itemId)}"]`
446
+ );
447
+ if (!T) return;
448
+ const d = document.activeElement, b = d !== null && d !== document.body && d !== T;
449
+ if (!de(xs(y, T), n)) {
450
+ b && (N.current = null);
451
+ return;
452
+ }
453
+ N.current = null, !(d === T || b) && (a.current = !0, T.focus(), a.current = !1);
454
+ }, [t, a]);
455
+ return {
456
+ context: xe(
457
+ () => r ? {
458
+ enabled: r,
459
+ instructionsId: c,
460
+ move: o,
461
+ onItemKeyDown: _,
462
+ onItemPointerDown: Y,
463
+ onItemBlur: P,
464
+ registerSection: L
465
+ } : { enabled: !1, move: null, registerSection: L },
466
+ [
467
+ r,
468
+ c,
469
+ o,
470
+ _,
471
+ Y,
472
+ P,
473
+ L
474
+ ]
475
+ ),
476
+ message: h,
477
+ instructionsId: c,
478
+ restoreFocus: U,
479
+ touchGuardRef: ne,
480
+ /** True while any move runs: Escape cancels it, not the drawer. */
481
+ cancelIfMoving: () => u.current ? (O(), !0) : !1
482
+ };
483
+ }
484
+ const Ce = le({
485
+ mode: "expanded",
486
+ density: "default"
487
+ }), G = () => ce(Ce), Ve = "ui.sidebar.state";
488
+ function Cs(e) {
489
+ if (typeof window > "u") return e;
490
+ try {
491
+ const r = window.localStorage.getItem(Ve);
492
+ if (r === "expanded" || r === "icon" || r === "overlay") return r;
493
+ } catch {
494
+ }
495
+ return e;
496
+ }
497
+ function js(e) {
498
+ if (!(typeof window > "u"))
499
+ try {
500
+ window.localStorage.setItem(Ve, e);
501
+ } catch {
502
+ }
503
+ }
504
+ const Oe = te(
505
+ [
506
+ "ds:flex ds:flex-col",
507
+ // `--sidebar-surface`: the page background in light mode (white-on-white
508
+ // chrome separated by --shadow-md). In dark mode the Header already
509
+ // blends with --background, so the token steps the sidebar one layer
510
+ // down (blue-600) to keep it visually distinct from the header band —
511
+ // matches the PDF dark mockups' "flat Dark Blue surface with subtle
512
+ // depth via layering" recipe. A token, so a light sidebar nested in a
513
+ // dark page stays light.
514
+ "ds:bg-[var(--sidebar-surface,var(--background))] ds:text-[var(--foreground)]",
515
+ // The inline-end hairline is drawn in the accessible themes only
516
+ // (--accessible-edge-width is 0 elsewhere).
517
+ "ds:[:where(&)]:border-e-[length:var(--accessible-edge-width,0px)] ds:border-[var(--border)]",
518
+ // Elevation is set per mode below. Forced colours strip shadows, so
519
+ // there only the accessible themes' `border-e` separates the rail.
520
+ "ds:transition-[inline-size] ds:duration-[var(--animation-duration)]",
521
+ "ds:motion-reduce:transition-none",
522
+ // While the resize handle is dragging, the width must track the
523
+ // pointer 1:1 — the data attribute suppresses the width transition.
524
+ "ds:data-[resizing]:transition-none"
525
+ ].join(" "),
526
+ {
527
+ variants: {
528
+ // Tokenised widths (Linear / Jira proportions) and one elevation per
529
+ // mode: chrome `--shadow-md` docked, `--shadow-xl` for the drawer, none
530
+ // in the accessible themes. `[:where(&)]` lets a className shadow win.
531
+ mode: {
532
+ // Docked, `relative z-[1]` lifts the rail over a sibling that paints
533
+ // a background (AppFrame's <main>), which would cover its shadow. The
534
+ // drawer must never get them: they beat its `fixed` and `h-dvh`.
535
+ expanded: "ds:relative ds:z-[1] ds:h-full ds:w-[var(--sidebar-modern-expanded-size)] ds:[:where(&)]:[box-shadow:var(--accessible-off,var(--shadow-md))]",
536
+ icon: "ds:relative ds:z-[1] ds:h-full ds:w-[var(--sidebar-modern-icon-size)] ds:[:where(&)]:[box-shadow:var(--accessible-off,var(--shadow-md))]",
537
+ overlay: "ds:w-[var(--sidebar-modern-expanded-size)] ds:[:where(&)]:[box-shadow:var(--accessible-off,var(--shadow-xl))]"
538
+ },
539
+ density: {
540
+ default: "",
541
+ compact: ""
542
+ }
543
+ },
544
+ defaultVariants: { mode: "expanded", density: "default" }
545
+ }
546
+ ), Ts = 192, ks = 384, Es = 248, Ds = [
547
+ "ds:absolute ds:[inset-block:0] ds:end-0 ds:z-[2]",
548
+ "ds:w-[var(--resizable-handle-size)]",
549
+ "ds:cursor-col-resize ds:select-none ds:touch-none",
550
+ "ds:hover:bg-[var(--accent)] ds:focus-visible:bg-[var(--accent)]",
551
+ "ds:data-[resizing]:bg-[var(--accent)]",
552
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
553
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
554
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
555
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
556
+ "ds:before:absolute ds:before:content-['']",
557
+ "ds:before:[inset-block:0]",
558
+ "ds:before:[inline-size:var(--min-target-size)]",
559
+ "ds:before:[inset-inline:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]"
560
+ ].join(" "), Ps = $(
561
+ ({
562
+ state: e,
563
+ defaultState: r = "expanded",
564
+ onStateChange: t,
565
+ density: a = "default",
566
+ open: i,
567
+ onOpenChange: c,
568
+ resizable: o = !1,
569
+ onMoveItem: p,
570
+ "aria-label": u,
571
+ className: v,
572
+ children: I,
573
+ id: z,
574
+ ...N
575
+ }, A) => {
576
+ const { t: m } = ue("ui"), l = e !== void 0, [g, h] = se(
577
+ () => Cs(r)
578
+ ), D = l ? e : g;
579
+ ee(() => {
580
+ l || js(g);
581
+ }, [g, l]);
582
+ const R = B(
583
+ (L) => {
584
+ l || h(L), t == null || t(L);
585
+ },
586
+ [l, t]
587
+ ), j = u ?? m("navigation.sidebar.label"), w = fe(), F = z ?? w, E = V(D);
588
+ ee(() => {
589
+ E.current = D;
590
+ }, [D]);
591
+ const H = xe(
592
+ () => ({
593
+ getIsCollapsed: () => E.current !== "expanded",
594
+ toggleCollapsed: () => {
595
+ const L = E.current === "expanded" ? "icon" : "expanded";
596
+ R(L);
597
+ }
598
+ }),
599
+ [R]
600
+ );
601
+ ss(bs, H, z);
602
+ const O = V(null), _ = V(null), P = V(!1), { separatorProps: f, isResizing: Y } = ts({
603
+ edge: "inline-end",
604
+ targetRef: O,
605
+ cssProperty: "--sidebar-modern-expanded-size",
606
+ minSize: Ts,
607
+ maxSize: ks,
608
+ defaultSize: Es,
609
+ disabled: !o || D !== "expanded"
610
+ }), W = o && D === "expanded", q = zs({
611
+ onMoveItem: p,
612
+ enabled: p !== void 0 && D !== "icon",
613
+ rootRef: O,
614
+ quietFocusRef: P
615
+ }), { touchGuardRef: K } = q, re = xe(
616
+ () => rs(A, O, K),
617
+ [A, K]
618
+ );
619
+ os(() => q.restoreFocus());
620
+ const ne = p !== void 0 ? /* @__PURE__ */ x(ye, { children: [
621
+ /* @__PURE__ */ s("span", { id: q.instructionsId, hidden: !0, children: m("navigation.sidebar.move.instructions") }),
622
+ /* @__PURE__ */ s(
623
+ "span",
624
+ {
625
+ role: "status",
626
+ "aria-live": "polite",
627
+ "data-sidebar-move-status": "",
628
+ className: "ds:sr-only",
629
+ children: q.message
630
+ }
631
+ )
632
+ ] }) : null;
633
+ return D === "overlay" ? /* @__PURE__ */ s(
634
+ Ce.Provider,
635
+ {
636
+ value: {
637
+ mode: "overlay",
638
+ density: a,
639
+ transitionTo: R,
640
+ navElementId: F,
641
+ quietFocusRef: P
642
+ },
643
+ children: /* @__PURE__ */ s(C.Provider, { delayDuration: 300, children: /* @__PURE__ */ s(ge.Root, { open: i, onOpenChange: c, children: /* @__PURE__ */ x(ge.Portal, { children: [
644
+ /* @__PURE__ */ s(
645
+ ge.Overlay,
646
+ {
647
+ className: [
648
+ "ds:fixed ds:inset-0 ds:z-[var(--z-modal-backdrop)]",
649
+ "ds:bg-[var(--foreground)]/20 ds:backdrop-blur-sm",
650
+ "ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in",
651
+ "ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out",
652
+ "ds:motion-reduce:animate-none"
653
+ ].join(" ")
654
+ }
655
+ ),
656
+ /* @__PURE__ */ x(
657
+ ge.Content,
658
+ {
659
+ onOpenAutoFocus: (L) => {
660
+ var Q;
661
+ _.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
662
+ const U = (Q = O.current) == null ? void 0 : Q.querySelector(
663
+ '[aria-current="page"]'
664
+ );
665
+ P.current = !0, U == null || U.focus(), P.current = !1, U && document.activeElement === U && L.preventDefault();
666
+ },
667
+ onCloseAutoFocus: (L) => {
668
+ var Q;
669
+ const U = document.activeElement;
670
+ U && U !== document.body || (Q = _.current) != null && Q.isConnected && (L.preventDefault(), _.current.focus());
671
+ },
672
+ onEscapeKeyDown: (L) => {
673
+ q.cancelIfMoving() && L.preventDefault();
674
+ },
675
+ "aria-label": j,
676
+ className: [
677
+ "ds:fixed ds:z-[var(--z-modal)]",
678
+ // `start-0`/`top-0` — the `inset-inline-start-0` /
679
+ // `inset-block-start-0` spellings are not Tailwind
680
+ // utilities and compiled to nothing.
681
+ "ds:start-0 ds:top-0",
682
+ "ds:h-dvh",
683
+ Oe({ mode: "overlay", density: a }),
684
+ "ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
685
+ "ds:data-[state=open]:slide-in-from-left ds:data-[state=closed]:slide-out-to-left",
686
+ "ds:rtl:data-[state=open]:slide-in-from-right ds:rtl:data-[state=closed]:slide-out-to-right",
687
+ "ds:motion-reduce:animate-none",
688
+ "ds:focus:outline-none",
689
+ v ?? ""
690
+ ].filter(Boolean).join(" "),
691
+ children: [
692
+ /* @__PURE__ */ x(
693
+ "nav",
694
+ {
695
+ ref: re,
696
+ id: F,
697
+ "aria-label": j,
698
+ "data-component": "sidebar",
699
+ "data-component-id": z,
700
+ className: "ds:flex ds:flex-col ds:h-full",
701
+ ...N,
702
+ children: [
703
+ /* @__PURE__ */ s(ze.Provider, { value: q.context, children: I }),
704
+ ne
705
+ ]
706
+ }
707
+ ),
708
+ /* @__PURE__ */ s(ge.Close, { asChild: !0, children: /* @__PURE__ */ s(
709
+ "button",
710
+ {
711
+ type: "button",
712
+ "aria-label": m("navigation.sidebar.close"),
713
+ className: [
714
+ "ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]",
715
+ "ds:inline-flex ds:items-center ds:justify-center",
716
+ "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
717
+ "ds:rounded-[var(--radius-sm)] ds:text-[var(--muted-foreground)]",
718
+ "ds:hover:bg-[var(--muted)]/20 ds:focus-visible:outline-[length:var(--focus-ring-width)]",
719
+ "ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)]",
720
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
721
+ ].join(" "),
722
+ children: /* @__PURE__ */ s(cs, { "aria-hidden": "true", className: "ds:size-4" })
723
+ }
724
+ ) })
725
+ ]
726
+ }
727
+ )
728
+ ] }) }) })
729
+ }
730
+ ) : /* @__PURE__ */ s(
731
+ Ce.Provider,
732
+ {
733
+ value: {
734
+ mode: D,
735
+ density: a,
736
+ transitionTo: R,
737
+ navElementId: F,
738
+ quietFocusRef: P
739
+ },
740
+ children: /* @__PURE__ */ s(C.Provider, { delayDuration: 300, children: /* @__PURE__ */ x(
741
+ "nav",
742
+ {
743
+ ref: re,
744
+ id: F,
745
+ "aria-label": j,
746
+ "data-component": "sidebar",
747
+ "data-component-id": z,
748
+ "data-mode": D,
749
+ "data-density": a,
750
+ "data-resizing": Y ? "" : void 0,
751
+ className: [
752
+ Oe({ mode: D, density: a }),
753
+ a === "compact" ? "ds:density-compact" : "",
754
+ v ?? ""
755
+ ].filter(Boolean).join(" "),
756
+ ...N,
757
+ children: [
758
+ /* @__PURE__ */ s(ze.Provider, { value: q.context, children: I }),
759
+ ne,
760
+ W ? /* @__PURE__ */ s(
761
+ "div",
762
+ {
763
+ ...f,
764
+ "aria-label": m("navigation.sidebar.resize"),
765
+ "data-resizing": Y ? "" : void 0,
766
+ className: Ds
767
+ }
768
+ ) : null
769
+ ]
770
+ }
771
+ ) })
772
+ }
773
+ );
774
+ }
775
+ );
776
+ Ps.displayName = "Sidebar";
777
+ const Os = $(({ className: e, ...r }, t) => {
778
+ const { mode: a } = G();
779
+ return /* @__PURE__ */ s(
780
+ "div",
781
+ {
782
+ ref: t,
783
+ className: [
784
+ "ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
785
+ "ds:min-h-[var(--min-target-size)]",
786
+ // Expanded uses the SAME inline padding as `SidebarBody`, so the
787
+ // header's first control starts on the nav items' left edge and its
788
+ // icon can land on the nav icon column (the trigger adds the item's
789
+ // own `ps` on top — see `SidebarCollapseTrigger`). In the rail,
790
+ // `justify-center` centres the control exactly as the nav icons
791
+ // centre. Header content therefore tracks the nav column in both
792
+ // modes instead of sitting on its own axis.
793
+ a === "icon" ? "ds:justify-center ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
794
+ "ds:py-[var(--spacing-sm)]",
795
+ // Hairline border + downward chrome shadow cast the header as a
796
+ // sticky top band above the scrolling body.
797
+ "ds:border-block-end ds:border-[var(--border)]",
798
+ "ds:shadow-[var(--shadow-chrome-down)]",
799
+ e ?? ""
800
+ ].filter(Boolean).join(" "),
801
+ ...r
802
+ }
803
+ );
804
+ });
805
+ Os.displayName = "SidebarHeader";
806
+ const Ye = te(
807
+ [
808
+ "ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
809
+ "ds:border ds:border-dashed ds:border-[color:var(--border)]"
810
+ ].join(" "),
811
+ {
812
+ variants: {
813
+ active: {
814
+ true: "ds:border-[color:var(--primary)] ds:bg-[var(--muted)]/20 ds:forced-colors:border-[Highlight]",
815
+ false: ""
816
+ }
817
+ },
818
+ defaultVariants: { active: !1 }
819
+ }
820
+ ), As = $(
821
+ ({ className: e, children: r, ...t }, a) => {
822
+ const { navElementId: i } = G(), { enabled: c, move: o } = Se(), p = c && (o != null && o.listEmpty) ? /* @__PURE__ */ s(
823
+ "div",
824
+ {
825
+ "aria-hidden": "true",
826
+ "data-sidebar-drop-zone-list": "",
827
+ className: Ye({
828
+ active: o.target.indicator.kind === "list" && !de(o.target, o.origin)
829
+ })
830
+ }
831
+ ) : null;
832
+ return (
833
+ // Scroll the nav sections through the kit `ScrollArea` (8px tokenised
834
+ // scrollbar) instead of native `overflow-auto` (the OS scrollbar), so the
835
+ // sidebar matches the Control Room rail and the kit's trays. `flex-1 min-h-0`
836
+ // fills the column and bounds the height; the layout `className` lands on the
837
+ // body box (the ScrollArea root). Padding + `ref` + div props go on the inner
838
+ // content div so the scrollbar sits flush at the inline-end edge.
839
+ /* @__PURE__ */ s(
840
+ Qe,
841
+ {
842
+ orientation: "vertical",
843
+ ...i ? { role: "group", "aria-labelledby": i } : {},
844
+ className: ["ds:flex-1 ds:min-h-0", e ?? ""].filter(Boolean).join(" "),
845
+ children: /* @__PURE__ */ x(
846
+ "div",
847
+ {
848
+ ref: a,
849
+ "data-sidebar-body": "",
850
+ className: "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:py-[var(--spacing-sm)]",
851
+ ...t,
852
+ children: [
853
+ r,
854
+ p
855
+ ]
856
+ }
857
+ )
858
+ }
859
+ )
860
+ );
861
+ }
862
+ );
863
+ As.displayName = "SidebarBody";
864
+ const Rs = $(({ className: e, ...r }, t) => {
865
+ const { mode: a } = G();
866
+ return /* @__PURE__ */ s(
867
+ "div",
868
+ {
869
+ ref: t,
870
+ className: [
871
+ "ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
872
+ // Icon-rail is 64px — two 44×44 controls can't sit side-by-side,
873
+ // so switch to a vertical stack and let each row self-centre.
874
+ a === "icon" ? "ds:flex-col ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
875
+ "ds:min-h-[var(--min-target-size)]",
876
+ "ds:py-[var(--spacing-sm)]",
877
+ // Hairline border + upward chrome shadow cast the footer as a
878
+ // sticky bottom band below the scrolling body.
879
+ "ds:border-block-start ds:border-[var(--border)]",
880
+ "ds:shadow-[var(--shadow-chrome-up)]",
881
+ e ?? ""
882
+ ].filter(Boolean).join(" "),
883
+ ...r
884
+ }
885
+ );
886
+ });
887
+ Rs.displayName = "SidebarFooter";
888
+ const _s = [
889
+ "ds:group/section-label ds:flex ds:w-full ds:items-center",
890
+ // A full target, 44px (48px accessible): the row gains height, the text
891
+ // keeps its size, and no hit area overlaps the items around it.
892
+ "ds:min-h-[var(--min-target-size)]",
893
+ "type-eyebrow",
894
+ "ds:text-[var(--muted-foreground)]",
895
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
896
+ "ds:py-[var(--spacing-xs)]",
897
+ "ds:hover:text-[var(--foreground)] ds:data-[holds-current]:text-[var(--foreground)]",
898
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
899
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
900
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
901
+ ].join(" "), Ae = [
902
+ "ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
903
+ "ds:size-4",
904
+ "ds:text-[var(--accent)]",
905
+ "ds:me-[var(--spacing-xs)]"
906
+ ].join(" "), Re = te(
907
+ "ds:flex ds:items-center ds:rounded-[var(--radius-sm)]",
908
+ {
909
+ variants: {
910
+ dropInto: {
911
+ true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[color:var(--primary)] ds:forced-colors:outline-[CanvasText]",
912
+ false: ""
913
+ }
914
+ },
915
+ defaultVariants: { dropInto: !1 }
916
+ }
917
+ ), Ls = [
918
+ "ds:flex ds:shrink-0 ds:items-center",
919
+ "ds:[&>*]:min-w-[var(--min-target-size)] ds:[&>*]:min-h-[var(--min-target-size)]"
920
+ ].join(" "), Ms = [
921
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]",
922
+ "ds:[[data-sidebar-section-items]:not(:empty)~&]:hidden"
923
+ ].join(" "), Bs = [
924
+ "ds:[&:has(+[data-sidebar-item])]:[border-block-end:var(--border-width-hairline)_solid_var(--border)]",
925
+ "ds:[&:has(+[data-sidebar-item])]:pb-[var(--spacing-xs)]",
926
+ "ds:[&:has(+[data-sidebar-item])]:mb-[var(--spacing-xs)]"
927
+ ].join(" "), $e = le(null), Fs = [
928
+ "ds:size-2 ds:shrink-0 ds:me-[var(--spacing-xs)] ds:rounded-[var(--radius-full)]",
929
+ "ds:bg-[var(--primary)] ds:border-[length:var(--border-width-sm)] ds:border-[color:var(--primary)]"
930
+ ].join(" "), Hs = "ds:min-w-0 ds:line-clamp-2 ds:[overflow-wrap:anywhere]";
931
+ function Us({
932
+ name: e,
933
+ nameRef: r,
934
+ children: t
935
+ }) {
936
+ const { navElementId: a, quietFocusRef: i } = G(), { move: c } = Se();
937
+ if (a === void 0) return t;
938
+ const o = (p) => {
939
+ const u = r.current;
940
+ (!(u != null && u.scrollHeight > u.clientHeight) || i != null && i.current || c !== null) && p.preventDefault();
941
+ };
942
+ return /* @__PURE__ */ x(C.Root, { children: [
943
+ /* @__PURE__ */ s(
944
+ C.Trigger,
945
+ {
946
+ asChild: !0,
947
+ onPointerMove: o,
948
+ onFocus: o,
949
+ children: t
950
+ }
951
+ ),
952
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
953
+ C.Content,
954
+ {
955
+ side: "right",
956
+ sideOffset: 6,
957
+ className: pe,
958
+ children: [
959
+ e,
960
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
961
+ ]
962
+ }
963
+ ) })
964
+ ] });
965
+ }
966
+ const qe = le(!1), Ge = $(
967
+ ({
968
+ label: e,
969
+ icon: r,
970
+ collapsible: t = !0,
971
+ defaultOpen: a = !0,
972
+ open: i,
973
+ onOpenChange: c,
974
+ sectionId: o,
975
+ actions: p,
976
+ className: u,
977
+ children: v,
978
+ ...I
979
+ }, z) => {
980
+ const { t: N } = ue("ui"), { mode: A } = G(), m = A === "icon", l = fe(), g = fe(), h = V(null), [D, R] = se(
981
+ () => /* @__PURE__ */ new Set()
982
+ ), j = B((d, b) => {
983
+ R((S) => {
984
+ if (S.has(d) === b) return S;
985
+ const M = new Set(S);
986
+ return b ? M.add(d) : M.delete(d), M;
987
+ });
988
+ }, []), w = t && !m && !!e, [F, E] = se(a), H = i ?? F, O = V(H);
989
+ O.current = H;
990
+ const _ = B(
991
+ (d) => {
992
+ i === void 0 && E(d), c == null || c(d);
993
+ },
994
+ [i, c]
995
+ ), { enabled: P, move: f, registerSection: Y } = Se(), W = ce(qe);
996
+ ee(() => {
997
+ P && o === void 0 && !W && ds() && console.warn(
998
+ `SidebarSection "${e ?? ""}": moves are on but it has no sectionId, so its items cannot move.`
999
+ );
1000
+ }, [P, o, W, e]), ee(() => {
1001
+ if (!(o === void 0 || !Y))
1002
+ return Y(o, () => {
1003
+ O.current || _(!0);
1004
+ });
1005
+ }, [o, Y, _]);
1006
+ const q = P && f !== null && o !== void 0, K = q && f.target.indicator.kind === "section" && f.target.indicator.sectionId === o && !de(f.target, f.origin), re = q && f.emptySectionIds.includes(o) ? /* @__PURE__ */ s(
1007
+ "div",
1008
+ {
1009
+ "aria-hidden": "true",
1010
+ "data-sidebar-drop-zone": o,
1011
+ className: Ye({ active: K })
1012
+ }
1013
+ ) : null, ne = o !== void 0 ? {
1014
+ "data-sidebar-section-id": o,
1015
+ "data-sidebar-section-label": e ?? "",
1016
+ "data-sidebar-section-open": String(!w || H)
1017
+ } : {}, L = p && !m ? /* @__PURE__ */ s(
1018
+ "span",
1019
+ {
1020
+ role: "group",
1021
+ "aria-label": e ? N("navigation.sidebar.sectionActions", { section: e }) : void 0,
1022
+ className: Ls,
1023
+ children: p
1024
+ }
1025
+ ) : null, U = w && !H && D.size > 0, Q = e && !m ? /* @__PURE__ */ s("p", { "data-sidebar-section-empty": "", className: Ms, children: N(P && o !== void 0 ? "navigation.sidebar.section.emptyMove" : "navigation.sidebar.section.empty") }) : null, n = /* @__PURE__ */ s(Be.Provider, { value: { sectionId: o }, children: /* @__PURE__ */ x($e.Provider, { value: j, children: [
1026
+ /* @__PURE__ */ s("div", { "data-sidebar-section-items": "", className: "ds:contents", children: v }),
1027
+ Q,
1028
+ re
1029
+ ] }) }), y = [
1030
+ "ds:flex ds:flex-col",
1031
+ "ds:gap-[var(--spacing-xs)]",
1032
+ "ds:mt-[var(--spacing-sm)]",
1033
+ Bs,
1034
+ u ?? ""
1035
+ ].filter(Boolean).join(" ");
1036
+ if (!w) {
1037
+ const d = !!e || !!r, b = e ? { role: "group", "aria-labelledby": l } : {}, S = d ? /* @__PURE__ */ x(
1038
+ "span",
1039
+ {
1040
+ className: [
1041
+ "ds:flex ds:items-center",
1042
+ "type-eyebrow",
1043
+ "ds:text-[var(--muted-foreground)]",
1044
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
1045
+ "ds:py-[var(--spacing-xs)]",
1046
+ L ? "ds:min-w-0 ds:flex-1" : "",
1047
+ m && !r ? "ds:sr-only" : ""
1048
+ ].filter(Boolean).join(" "),
1049
+ children: [
1050
+ r ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: Ae, children: r }) : null,
1051
+ e ? /* @__PURE__ */ s("span", { id: l, className: m ? "ds:sr-only" : "", children: e }) : null
1052
+ ]
1053
+ }
1054
+ ) : null;
1055
+ return /* @__PURE__ */ x(
1056
+ "div",
1057
+ {
1058
+ ref: z,
1059
+ className: y,
1060
+ ...b,
1061
+ ...ne,
1062
+ ...I,
1063
+ children: [
1064
+ L ? /* @__PURE__ */ x(
1065
+ "div",
1066
+ {
1067
+ "data-sidebar-section-heading": "",
1068
+ className: Re(),
1069
+ children: [
1070
+ S,
1071
+ L
1072
+ ]
1073
+ }
1074
+ ) : S,
1075
+ n
1076
+ ]
1077
+ }
1078
+ );
1079
+ }
1080
+ const T = "section";
1081
+ return /* @__PURE__ */ s(
1082
+ he.Root,
1083
+ {
1084
+ type: "single",
1085
+ collapsible: !0,
1086
+ value: H ? T : "",
1087
+ onValueChange: (d) => _(d === T),
1088
+ asChild: !0,
1089
+ children: /* @__PURE__ */ s("div", { ref: z, className: y, ...ne, ...I, children: /* @__PURE__ */ x(he.Item, { value: T, children: [
1090
+ /* @__PURE__ */ x(
1091
+ "div",
1092
+ {
1093
+ "data-sidebar-section-heading": "",
1094
+ className: Re({
1095
+ dropInto: K && !H
1096
+ }),
1097
+ children: [
1098
+ /* @__PURE__ */ s(Us, { name: e ?? "", nameRef: h, children: /* @__PURE__ */ s("div", { className: "ds:flex ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ s(he.Header, { className: "ds:flex ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ x(
1099
+ he.Trigger,
1100
+ {
1101
+ className: _s,
1102
+ "data-holds-current": U ? "" : void 0,
1103
+ "aria-describedby": U ? g : void 0,
1104
+ children: [
1105
+ r ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: Ae, children: r }) : null,
1106
+ /* @__PURE__ */ s(
1107
+ "span",
1108
+ {
1109
+ ref: h,
1110
+ className: `ds:flex-1 ds:text-start ${Hs}`,
1111
+ children: e
1112
+ }
1113
+ ),
1114
+ U ? /* @__PURE__ */ s(
1115
+ "span",
1116
+ {
1117
+ "aria-hidden": "true",
1118
+ "data-sidebar-section-current": "",
1119
+ className: Fs
1120
+ }
1121
+ ) : null,
1122
+ /* @__PURE__ */ s(
1123
+ we,
1124
+ {
1125
+ "aria-hidden": "true",
1126
+ className: "ds:size-3 ds:shrink-0 ds:transition-transform ds:group-data-[state=open]/section-label:rotate-90 ds:rtl:-scale-x-100 ds:motion-reduce:transition-none"
1127
+ }
1128
+ )
1129
+ ]
1130
+ }
1131
+ ) }) }) }),
1132
+ L,
1133
+ U ? (
1134
+ // Hidden, yet still the fold button's description.
1135
+ /* @__PURE__ */ s("span", { id: g, hidden: !0, children: N("navigation.sidebar.section.containsCurrent") })
1136
+ ) : null
1137
+ ]
1138
+ }
1139
+ ),
1140
+ /* @__PURE__ */ s(
1141
+ Je,
1142
+ {
1143
+ role: "group",
1144
+ "aria-label": e,
1145
+ forceMount: !0,
1146
+ className: [
1147
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:[&>div]:contents",
1148
+ // Force-mounted content is never hidden by Radix: do it here.
1149
+ "ds:data-[state=closed]:hidden"
1150
+ ].join(" "),
1151
+ children: n
1152
+ }
1153
+ )
1154
+ ] }) })
1155
+ }
1156
+ );
1157
+ }
1158
+ );
1159
+ Ge.displayName = "SidebarSection";
1160
+ const Vs = [
1161
+ "ds:group ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
1162
+ "ds:min-h-[var(--min-target-size)]",
1163
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
1164
+ "ds:rounded-[var(--radius-sm)]",
1165
+ "ds:text-[var(--foreground)] ds:text-[var(--font-size-sm)]",
1166
+ "ds:font-[var(--font-weight-medium)]",
1167
+ "ds:hover:bg-[var(--muted)]/20",
1168
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1169
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1170
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
1171
+ ].join(" "), Ys = $(
1172
+ ({
1173
+ label: e,
1174
+ icon: r,
1175
+ children: t,
1176
+ className: a,
1177
+ defaultOpen: i,
1178
+ open: c,
1179
+ onOpenChange: o,
1180
+ ...p
1181
+ }, u) => {
1182
+ const { mode: v } = G();
1183
+ return /* @__PURE__ */ x(
1184
+ Ne.Root,
1185
+ {
1186
+ ref: u,
1187
+ defaultOpen: i,
1188
+ open: c,
1189
+ onOpenChange: o,
1190
+ className: a,
1191
+ ...p,
1192
+ children: [
1193
+ /* @__PURE__ */ x(Ne.Trigger, { className: Vs, children: [
1194
+ r ? /* @__PURE__ */ s(
1195
+ "span",
1196
+ {
1197
+ "aria-hidden": "true",
1198
+ className: "ds:inline-flex ds:items-center ds:text-[var(--accent)]",
1199
+ children: r
1200
+ }
1201
+ ) : null,
1202
+ /* @__PURE__ */ s(
1203
+ "span",
1204
+ {
1205
+ className: [
1206
+ "ds:flex-1 ds:text-start",
1207
+ v === "icon" ? "ds:sr-only" : ""
1208
+ ].join(" "),
1209
+ children: e
1210
+ }
1211
+ ),
1212
+ v !== "icon" ? /* @__PURE__ */ s(
1213
+ we,
1214
+ {
1215
+ "aria-hidden": "true",
1216
+ className: "ds:size-4 ds:transition-transform ds:group-data-[state=open]:rotate-90 ds:rtl:-scale-x-100 ds:motion-reduce:transition-none"
1217
+ }
1218
+ ) : null
1219
+ ] }),
1220
+ /* @__PURE__ */ s(
1221
+ Ne.Content,
1222
+ {
1223
+ className: [
1224
+ "ds:overflow-hidden",
1225
+ "ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
1226
+ "ds:motion-reduce:animate-none",
1227
+ "ds:ps-[var(--spacing-md)]"
1228
+ ].join(" "),
1229
+ children: t
1230
+ }
1231
+ )
1232
+ ]
1233
+ }
1234
+ );
1235
+ }
1236
+ );
1237
+ Ys.displayName = "SidebarGroup";
1238
+ const pe = [
1239
+ "ds:z-[var(--z-tooltip)] ds:max-w-[16rem]",
1240
+ "ds:rounded-[var(--radius-sm)]",
1241
+ "ds:bg-[var(--foreground)] ds:text-[var(--background)]",
1242
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)]",
1243
+ "ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
1244
+ ].join(" "), $s = te(
1245
+ [
1246
+ // Every row is a pin-hover parent so inline pin / reorder affordances can
1247
+ // fade in on hover of the whole row — keep `group/item` on this selector.
1248
+ // `!text-[var(--foreground)]` forces the label colour over the browser's
1249
+ // default `<a>` link colour (blue-violet) and any inherited hue. The
1250
+ // active variant also uses `!text-*` so it still wins when needed.
1251
+ "ds:group/item ds:relative ds:flex ds:items-center",
1252
+ "ds:gap-[var(--spacing-sm)]",
1253
+ "ds:no-underline ds:!text-[var(--foreground)] ds:text-[length:var(--font-size-sm)]",
1254
+ "ds:hover:bg-[var(--muted)]/12",
1255
+ "ds:transition-colors ds:duration-[var(--animation-duration)]",
1256
+ "ds:motion-reduce:transition-none",
1257
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1258
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1259
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
1260
+ ].join(" "),
1261
+ {
1262
+ variants: {
1263
+ mode: {
1264
+ expanded: [
1265
+ "ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
1266
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]"
1267
+ ].join(" "),
1268
+ // Icon-only: each item is a 44×44 pill tile centered in the rail.
1269
+ // The active / hover background fills just the tile rather than the
1270
+ // whole row — matching Linear / Asana chrome.
1271
+ icon: [
1272
+ "ds:justify-center ds:ms-auto ds:me-auto",
1273
+ "ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
1274
+ "ds:ps-0 ds:pe-0 ds:rounded-[var(--radius-md)]"
1275
+ ].join(" "),
1276
+ overlay: [
1277
+ "ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
1278
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]"
1279
+ ].join(" ")
1280
+ },
1281
+ density: {
1282
+ default: "",
1283
+ compact: "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
1284
+ },
1285
+ isActive: {
1286
+ // Filled pill — multi-carrier (bg + text + weight + aria-current at
1287
+ // render time) so colour is never the sole identifier. `!text-*`
1288
+ // forces the foreground over any inherited / base rule so the icon
1289
+ // and label read clearly against the primary fill in every theme.
1290
+ true: [
1291
+ "ds:bg-[var(--primary)] ds:!text-[var(--primary-foreground)]",
1292
+ "ds:font-[var(--font-weight-semibold)]",
1293
+ // Keep hover from dimming the active fill.
1294
+ "ds:hover:bg-[var(--primary)]"
1295
+ ].join(" "),
1296
+ false: ""
1297
+ }
1298
+ },
1299
+ defaultVariants: {
1300
+ mode: "expanded",
1301
+ density: "default",
1302
+ isActive: !1
1303
+ }
1304
+ }
1305
+ ), _e = [
1306
+ "ds:before:pointer-events-none ds:before:absolute ds:before:start-0 ds:before:end-0",
1307
+ "ds:before:h-[length:var(--focus-ring-width)] ds:before:content-['']",
1308
+ "ds:before:rounded-[var(--radius-full)] ds:before:bg-[var(--primary)]",
1309
+ "ds:forced-colors:before:bg-[CanvasText]"
1310
+ ].join(" "), qs = te("", {
1311
+ variants: {
1312
+ movable: {
1313
+ true: "ds:select-none ds:[-webkit-touch-callout:none]",
1314
+ false: ""
1315
+ },
1316
+ moving: { true: "ds:opacity-60", false: "" },
1317
+ drop: {
1318
+ before: `${_e} ds:before:top-[calc(var(--spacing-xs)/-2)] ds:before:-translate-y-1/2`,
1319
+ after: `${_e} ds:before:bottom-[calc(var(--spacing-xs)/-2)] ds:before:translate-y-1/2`,
1320
+ none: ""
1321
+ }
1322
+ },
1323
+ defaultVariants: { movable: !1, moving: !1, drop: "none" }
1324
+ }), Ke = le(null), Xe = $(
1325
+ ({
1326
+ asChild: e = !1,
1327
+ isActive: r = !1,
1328
+ navId: t,
1329
+ isPinned: a = !1,
1330
+ onPinChange: i,
1331
+ pinLabel: c,
1332
+ className: o,
1333
+ children: p,
1334
+ "aria-label": u,
1335
+ "aria-describedby": v,
1336
+ onKeyDown: I,
1337
+ onPointerDown: z,
1338
+ onBlur: N,
1339
+ ...A
1340
+ }, m) => {
1341
+ const { mode: l, density: g, quietFocusRef: h, navElementId: D } = G(), R = e ? Le : "a", j = i !== void 0 && l !== "icon", w = Se(), F = ce(Be), E = ce($e), H = fe(), O = r || A["aria-current"] === "page";
1342
+ ee(() => {
1343
+ if (E)
1344
+ return E(H, O), () => E(H, !1);
1345
+ }, [E, H, O]);
1346
+ const _ = w.enabled && l !== "icon" && t !== void 0 && (F === null || F.sectionId !== void 0) ? t : void 0, P = w.move, f = P && !de(P.target, P.origin) ? P.target : null, Y = _ !== void 0 && (f == null ? void 0 : f.indicator.kind) === "item" && f.indicator.itemId === _ ? f.indicator.edge : "none", W = _ !== void 0 ? {
1347
+ "data-sidebar-item-id": _,
1348
+ "data-moving": (P == null ? void 0 : P.itemId) === _ ? "" : void 0,
1349
+ // A link would otherwise start the browser's own link drag.
1350
+ draggable: !1,
1351
+ "aria-describedby": [v, w.instructionsId].filter(Boolean).join(" "),
1352
+ // An image inside the item would start its own native drag.
1353
+ onDragStart: (b) => b.preventDefault(),
1354
+ onKeyDown: (b) => {
1355
+ var M, X;
1356
+ I == null || I(b);
1357
+ const S = b.key === "Escape" && ((M = w.move) == null ? void 0 : M.itemId) === _;
1358
+ (!b.defaultPrevented || S) && ((X = w.onItemKeyDown) == null || X.call(w, b, _));
1359
+ },
1360
+ onPointerDown: (b) => {
1361
+ var S;
1362
+ z == null || z(b), (S = w.onItemPointerDown) == null || S.call(w, b, _);
1363
+ },
1364
+ onBlur: (b) => {
1365
+ var S;
1366
+ N == null || N(b), (S = w.onItemBlur) == null || S.call(w, _);
1367
+ }
1368
+ } : {
1369
+ // Keys left out when unset: an undefined one would override the
1370
+ // tooltip's own description through Slot.
1371
+ ...v !== void 0 ? { "aria-describedby": v } : {},
1372
+ ...I ? { onKeyDown: I } : {},
1373
+ ...z ? { onPointerDown: z } : {},
1374
+ ...N ? { onBlur: N } : {}
1375
+ }, q = qs({
1376
+ movable: _ !== void 0,
1377
+ moving: P !== null && P.itemId === _,
1378
+ drop: Y
1379
+ }), [K, re] = se(null), ne = l === "icon" && u != null && K ? `${u}, ${K}` : u, L = /* @__PURE__ */ s(
1380
+ R,
1381
+ {
1382
+ ref: m,
1383
+ "aria-current": r ? "page" : void 0,
1384
+ "aria-label": ne,
1385
+ "data-nav-id": t,
1386
+ "data-sidebar-item": j ? void 0 : "",
1387
+ className: $s({
1388
+ mode: l,
1389
+ density: g,
1390
+ isActive: r,
1391
+ className: [j ? "ds:flex-1 ds:min-w-0" : o, q].filter(Boolean).join(" ")
1392
+ }),
1393
+ ...W,
1394
+ ...A,
1395
+ children: p
1396
+ }
1397
+ ), U = j ? /* @__PURE__ */ x(
1398
+ "div",
1399
+ {
1400
+ "data-sidebar-item": "",
1401
+ className: [
1402
+ "ds:group/item ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1403
+ o ?? ""
1404
+ ].filter(Boolean).join(" "),
1405
+ children: [
1406
+ L,
1407
+ /* @__PURE__ */ s(
1408
+ je,
1409
+ {
1410
+ isPinned: a,
1411
+ label: c ?? u ?? "",
1412
+ onPinChange: i
1413
+ }
1414
+ )
1415
+ ]
1416
+ }
1417
+ ) : L, Q = V(null), [n, y] = se(), T = (b) => {
1418
+ var X, ae;
1419
+ const S = (X = Q.current) == null ? void 0 : X.querySelector(
1420
+ "[data-sidebar-item-label]"
1421
+ );
1422
+ if (!(S != null && S.scrollWidth > S.clientWidth) || h != null && h.current || w.move !== null) {
1423
+ b.preventDefault();
1424
+ return;
1425
+ }
1426
+ y(((ae = S.textContent) == null ? void 0 : ae.trim()) || void 0);
1427
+ }, d = l !== "icon" && D !== void 0 ? /* @__PURE__ */ x(C.Root, { children: [
1428
+ /* @__PURE__ */ s(
1429
+ C.Trigger,
1430
+ {
1431
+ asChild: !0,
1432
+ ref: Q,
1433
+ onPointerMove: T,
1434
+ onFocus: T,
1435
+ children: U
1436
+ }
1437
+ ),
1438
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
1439
+ C.Content,
1440
+ {
1441
+ side: "right",
1442
+ sideOffset: 6,
1443
+ className: pe,
1444
+ children: [
1445
+ u ?? n,
1446
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
1447
+ ]
1448
+ }
1449
+ ) })
1450
+ ] }) : l === "icon" && u ? /* @__PURE__ */ x(C.Root, { children: [
1451
+ /* @__PURE__ */ s(C.Trigger, { asChild: !0, children: U }),
1452
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
1453
+ C.Content,
1454
+ {
1455
+ side: "right",
1456
+ sideOffset: 6,
1457
+ className: pe,
1458
+ children: [
1459
+ u,
1460
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
1461
+ ]
1462
+ }
1463
+ ) })
1464
+ ] }) : U;
1465
+ return /* @__PURE__ */ s(Ke.Provider, { value: re, children: d });
1466
+ }
1467
+ );
1468
+ Xe.displayName = "SidebarItem";
1469
+ const Gs = $(({ className: e, children: r, ...t }, a) => /* @__PURE__ */ s(
1470
+ "span",
1471
+ {
1472
+ ref: a,
1473
+ "aria-hidden": "true",
1474
+ className: [
1475
+ "ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
1476
+ "ds:size-5",
1477
+ // Icons carry the accent tint by default so the rail reads less
1478
+ // monotone against the violet active pill. The active row sets
1479
+ // `aria-current="page"` on the anchor (which is `group/item`), so
1480
+ // the icon flips to the primary-foreground (white) on the filled
1481
+ // pill — keeping it readable on the primary background.
1482
+ "ds:text-[var(--accent)]",
1483
+ "ds:group-aria-[current=page]/item:text-[var(--primary-foreground)]",
1484
+ e ?? ""
1485
+ ].filter(Boolean).join(" "),
1486
+ ...t,
1487
+ children: r
1488
+ }
1489
+ ));
1490
+ Gs.displayName = "SidebarItemIcon";
1491
+ const Ks = $(({ className: e, children: r, ...t }, a) => {
1492
+ const { mode: i } = G();
1493
+ return /* @__PURE__ */ s(
1494
+ "span",
1495
+ {
1496
+ ref: a,
1497
+ "data-sidebar-item-label": "",
1498
+ className: [
1499
+ "ds:flex-1",
1500
+ "ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap ds:break-normal",
1501
+ "ds:text-start",
1502
+ i === "icon" ? "ds:sr-only" : "",
1503
+ e ?? ""
1504
+ ].filter(Boolean).join(" "),
1505
+ ...t,
1506
+ children: r
1507
+ }
1508
+ );
1509
+ });
1510
+ Ks.displayName = "SidebarItemLabel";
1511
+ const Xs = $(({ className: e, children: r, ...t }, a) => {
1512
+ const { mode: i } = G(), c = i === "icon", o = ce(Ke);
1513
+ return ee(() => {
1514
+ if (!o || !c) return;
1515
+ const p = r == null || r === !1 ? null : String(r).trim() || null;
1516
+ return o(p), () => o(null);
1517
+ }, [o, r, c]), /* @__PURE__ */ s(
1518
+ "span",
1519
+ {
1520
+ ref: a,
1521
+ "aria-hidden": c ? "true" : void 0,
1522
+ className: [
1523
+ "ds:inline-flex ds:items-center ds:justify-center",
1524
+ "ds:font-[var(--font-weight-semibold)]",
1525
+ c ? [
1526
+ "ds:absolute ds:top-[2px] ds:end-[2px]",
1527
+ "ds:min-w-0 ds:size-[10px] ds:ps-0 ds:pe-0",
1528
+ "ds:rounded-[var(--radius-full)]",
1529
+ "ds:bg-[var(--primary)] ds:text-transparent",
1530
+ "ds:ring-2 ds:ring-[var(--background)]",
1531
+ "ds:pointer-events-none"
1532
+ ].join(" ") : [
1533
+ "ds:min-w-[var(--spacing-lg)] ds:h-[var(--spacing-lg)]",
1534
+ "ds:rounded-[var(--radius-full)]",
1535
+ "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
1536
+ "ds:text-[length:var(--font-size-xs)]",
1537
+ "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
1538
+ ].join(" "),
1539
+ e ?? ""
1540
+ ].filter(Boolean).join(" "),
1541
+ ...t,
1542
+ children: r
1543
+ }
1544
+ );
1545
+ });
1546
+ Xs.displayName = "SidebarItemBadge";
1547
+ const Ws = te(
1548
+ [
1549
+ "ds:flex ds:items-center",
1550
+ "ds:text-[var(--foreground)]",
1551
+ "ds:transition-colors ds:motion-reduce:transition-none",
1552
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1553
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1554
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1555
+ "ds:no-underline"
1556
+ ].join(" "),
1557
+ {
1558
+ variants: {
1559
+ variant: {
1560
+ // Borderless (Linear / Notion style): transparent at rest with a
1561
+ // muted hover fill, a 44px tap target, roomier radius, and the dense
1562
+ // `--font-size-sm` label. The historical default.
1563
+ ghost: [
1564
+ "ds:min-h-[var(--min-target-size)]",
1565
+ "ds:gap-[var(--spacing-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
1566
+ "ds:text-[length:var(--font-size-sm)]",
1567
+ "ds:rounded-[var(--radius-md)]",
1568
+ "ds:hover:bg-[var(--muted)]/20"
1569
+ ].join(" "),
1570
+ // Input-field look: consumes the SAME shared input-surface tokens as
1571
+ // <TextInput size="sm"> — height, text size and horizontal inset — so
1572
+ // a practice / workspace selector stacked directly above the sidebar
1573
+ // <SearchBar size="sm"> renders as a genuinely matched pair (identical
1574
+ // 32px box and label size) and stays in lockstep if that surface
1575
+ // evolves. `gap-3` + the shared `ps-3` line the pin glyph and label up
1576
+ // with the search input's icon and text below. The 3:1
1577
+ // `--control-border` edge and the `--input`/`--shadow-input`/
1578
+ // `--radius-sm` chrome mirror the input's resting surface; opaque
1579
+ // hover keeps the fill solid over a brand-tinted parent. 32px clears
1580
+ // WCAG 2.5.8 (24px AA).
1581
+ field: [
1582
+ ns.sm,
1583
+ as.sm,
1584
+ is.sm,
1585
+ "ds:gap-3",
1586
+ "ds:rounded-[var(--radius-sm)]",
1587
+ "ds:border ds:border-[color:var(--control-border)] ds:bg-[var(--input)]",
1588
+ "ds:shadow-[var(--shadow-input)]",
1589
+ "ds:hover:bg-[color-mix(in_srgb,var(--muted)_20%,var(--input))]"
1590
+ ].join(" ")
1591
+ }
1592
+ },
1593
+ defaultVariants: { variant: "ghost" }
1594
+ }
1595
+ ), Zs = $(
1596
+ ({ logo: e, name: r, showChevron: t = !0, variant: a = "ghost", className: i, ...c }, o) => {
1597
+ const { mode: p } = G(), u = p !== "icon";
1598
+ return /* @__PURE__ */ x(
1599
+ "button",
1600
+ {
1601
+ ref: o,
1602
+ type: "button",
1603
+ "aria-label": r,
1604
+ className: [Ws({ variant: a }), i].filter(Boolean).join(" "),
1605
+ ...c,
1606
+ children: [
1607
+ /* @__PURE__ */ s(
1608
+ "span",
1609
+ {
1610
+ "aria-hidden": "true",
1611
+ className: "ds:inline-flex ds:items-center ds:shrink-0",
1612
+ children: e
1613
+ }
1614
+ ),
1615
+ u ? /* @__PURE__ */ x(ye, { children: [
1616
+ /* @__PURE__ */ s("span", { className: "ds:truncate ds:flex-1 ds:text-start ds:max-w-[var(--header-workspace-max-inline-size)]", children: r }),
1617
+ t ? /* @__PURE__ */ s(
1618
+ we,
1619
+ {
1620
+ "aria-hidden": "true",
1621
+ className: "ds:size-4 ds:shrink-0 ds:rotate-90"
1622
+ }
1623
+ ) : null
1624
+ ] }) : null
1625
+ ]
1626
+ }
1627
+ );
1628
+ }
1629
+ );
1630
+ Zs.displayName = "SidebarWorkspaceSwitcher";
1631
+ const Js = te(
1632
+ [
1633
+ "ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
1634
+ "ds:min-h-[var(--min-target-size)]",
1635
+ "ds:rounded-[var(--radius-md)]",
1636
+ "ds:bg-[var(--primary)] ds:!text-[var(--primary-foreground)] ds:no-underline",
1637
+ "ds:font-[var(--font-weight-semibold)] ds:text-[length:var(--font-size-sm)]",
1638
+ "ds:hover:bg-[var(--primary-hover)]",
1639
+ "ds:transition-colors ds:motion-reduce:transition-none",
1640
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1641
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1642
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1643
+ // Disabled: the fill and contents fade, not the element, so its focus
1644
+ // ring keeps full contrast. No hover; still focusable.
1645
+ "ds:aria-disabled:bg-[var(--primary)]/50 ds:aria-disabled:hover:bg-[var(--primary)]/50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:[&>*]:opacity-50",
1646
+ "ds:forced-colors:aria-disabled:!text-[GrayText]",
1647
+ // The current page: an inner ring (a border in forced colours, which drop
1648
+ // shadows) and an underlined label when shown.
1649
+ "ds:aria-[current=page]:shadow-[inset_0_0_0_var(--border-width-md)_var(--primary-foreground)]",
1650
+ "ds:forced-colors:aria-[current=page]:border-[length:var(--border-width-md)] ds:forced-colors:aria-[current=page]:border-solid ds:forced-colors:aria-[current=page]:border-[color:CanvasText]",
1651
+ "ds:aria-[current=page]:[&_[data-sidebar-primary-label]]:underline ds:aria-[current=page]:[&_[data-sidebar-primary-label]]:underline-offset-[var(--spacing-xs)]"
1652
+ ].join(" "),
1653
+ {
1654
+ variants: {
1655
+ mode: {
1656
+ expanded: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
1657
+ // A full target-size tile, like the rail's items: 44px, 48px in the
1658
+ // accessible themes.
1659
+ icon: "ds:ps-0 ds:pe-0 ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)] ds:ms-auto ds:me-auto",
1660
+ overlay: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
1661
+ }
1662
+ },
1663
+ defaultVariants: { mode: "expanded" }
1664
+ }
1665
+ ), Qs = $(
1666
+ ({
1667
+ icon: e,
1668
+ label: r,
1669
+ shortcut: t,
1670
+ asChild: a = !1,
1671
+ isActive: i = !1,
1672
+ disabled: c = !1,
1673
+ className: o,
1674
+ children: p,
1675
+ onClickCapture: u,
1676
+ onAuxClickCapture: v,
1677
+ ...I
1678
+ }, z) => {
1679
+ const { mode: N } = G(), A = N !== "icon", m = (E) => {
1680
+ c && (E.preventDefault(), E.stopPropagation());
1681
+ }, l = a && c, g = l ? "a" : a ? Le : "button", h = l && Ze(p) ? p.props : {}, D = Object.fromEntries(
1682
+ Object.entries(h).filter(([E]) => E.startsWith("data-"))
1683
+ ), R = l ? { role: "link", tabIndex: 0 } : a ? {} : { type: "button" }, j = /* @__PURE__ */ s(
1684
+ "span",
1685
+ {
1686
+ "aria-hidden": "true",
1687
+ className: "ds:inline-flex ds:size-4 ds:items-center ds:justify-center",
1688
+ children: e
1689
+ }
1690
+ ), w = A ? /* @__PURE__ */ x(ye, { children: [
1691
+ /* @__PURE__ */ s("span", { "data-sidebar-primary-label": "", className: "ds:truncate", children: r }),
1692
+ t && !c ? /* @__PURE__ */ s("kbd", { className: "ds:ms-auto ds:text-[length:var(--font-size-xs)] ds:font-[family-name:var(--font-mono)] ds:opacity-80", children: t }) : null
1693
+ ] }) : null, F = /* @__PURE__ */ x(
1694
+ g,
1695
+ {
1696
+ ref: z,
1697
+ ...R,
1698
+ ...D,
1699
+ "aria-label": r,
1700
+ "aria-keyshortcuts": c ? void 0 : t,
1701
+ "aria-current": i ? "page" : void 0,
1702
+ "aria-disabled": c ? !0 : void 0,
1703
+ className: [
1704
+ Js({ mode: N }),
1705
+ typeof h.className == "string" ? h.className : "",
1706
+ o
1707
+ ].filter(Boolean).join(" "),
1708
+ onClickCapture: (E) => {
1709
+ if (c) return m(E);
1710
+ u == null || u(E);
1711
+ },
1712
+ onAuxClickCapture: (E) => {
1713
+ if (c) return m(E);
1714
+ v == null || v(E);
1715
+ },
1716
+ ...I,
1717
+ children: [
1718
+ j,
1719
+ a && !c ? /* @__PURE__ */ s(es, { children: p }) : null,
1720
+ w
1721
+ ]
1722
+ }
1723
+ );
1724
+ return A ? F : /* @__PURE__ */ x(C.Root, { children: [
1725
+ /* @__PURE__ */ s(C.Trigger, { asChild: !0, children: F }),
1726
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
1727
+ C.Content,
1728
+ {
1729
+ side: "right",
1730
+ sideOffset: 6,
1731
+ className: pe,
1732
+ children: [
1733
+ r,
1734
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
1735
+ ]
1736
+ }
1737
+ ) })
1738
+ ] });
1739
+ }
1740
+ );
1741
+ Qs.displayName = "SidebarPrimaryAction";
1742
+ const et = [
1743
+ "ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
1744
+ "ds:size-6 ds:rounded-[var(--radius-sm)]",
1745
+ // Lift above the Sidebar's opt-in resize handle (z-[2]). When `resizable`,
1746
+ // that handle's ::before hit-area reaches ~--min-target-size/2 inward from
1747
+ // the inline-end edge — exactly where these end-aligned pin stars sit — so
1748
+ // without a higher stacking order the separator swallows the click and
1749
+ // pinning silently fails. Pointer-events stay off until the row is hovered
1750
+ // or the star is focused, so the handle is still fully grabbable at rest
1751
+ // (including touch, where the star never reveals). On a NON-resizable
1752
+ // sidebar there's no handle to clear, but the same gating is inert — the
1753
+ // star reveals and accepts clicks on hover/focus exactly as before.
1754
+ "ds:relative ds:z-[3]",
1755
+ "ds:pointer-events-none ds:group-hover/item:pointer-events-auto ds:focus-visible:pointer-events-auto",
1756
+ // Pin stars carry the accent tint to match every other icon in the rail.
1757
+ // Stays quiet via opacity — reveals only on row hover / focus.
1758
+ "ds:text-[var(--accent)]",
1759
+ "ds:opacity-0 ds:group-hover/item:opacity-100 ds:focus-visible:opacity-100",
1760
+ "ds:hover:bg-[var(--muted)]/20",
1761
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1762
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1763
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1764
+ "ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)]",
1765
+ "ds:motion-reduce:transition-none"
1766
+ ].join(" "), je = $(
1767
+ ({ isPinned: e, onPinChange: r, label: t, className: a, onClick: i, ...c }, o) => {
1768
+ const { t: p } = ue("ui"), { mode: u } = G();
1769
+ if (u === "icon") return null;
1770
+ const v = e ? p("navigation.sidebar.unpinItem", "Unpin {{label}}", { label: t }) : p("navigation.sidebar.pinItem", "Pin {{label}}", { label: t });
1771
+ return /* @__PURE__ */ s(
1772
+ "button",
1773
+ {
1774
+ ref: o,
1775
+ type: "button",
1776
+ "aria-label": v,
1777
+ "aria-pressed": e,
1778
+ className: [et, a].filter(Boolean).join(" "),
1779
+ onClick: (I) => {
1780
+ I.preventDefault(), I.stopPropagation(), r == null || r(!e), i == null || i(I);
1781
+ },
1782
+ ...c,
1783
+ children: /* @__PURE__ */ s(
1784
+ us,
1785
+ {
1786
+ "aria-hidden": "true",
1787
+ className: "ds:size-4",
1788
+ fill: e ? "currentColor" : "none"
1789
+ }
1790
+ )
1791
+ }
1792
+ );
1793
+ }
1794
+ );
1795
+ je.displayName = "SidebarPinButton";
1796
+ const We = le(null), st = () => ce(We), tt = $(
1797
+ ({ heading: e, emptyMessage: r, onReorder: t, className: a, children: i, ...c }, o) => {
1798
+ const { t: p } = ue("ui"), u = e ?? p("navigation.sidebar.favorites", "Favourites"), v = Array.isArray(i) ? i.filter(Boolean) : i ? [i] : [], I = v.length, z = I > 0, [N, A] = se(null), [m, l] = se(""), g = V(!1), h = B((R) => {
1799
+ g.current = !g.current, l(g.current ? R : `${R}​`);
1800
+ }, []), D = xe(
1801
+ () => ({ onReorder: t, count: I, dragSource: N, setDragSource: A, announce: h }),
1802
+ [t, I, N, h]
1803
+ );
1804
+ return !z && !r ? null : /* @__PURE__ */ s(We.Provider, { value: D, children: /* @__PURE__ */ s(qe.Provider, { value: !0, children: /* @__PURE__ */ x(
1805
+ Ge,
1806
+ {
1807
+ ref: o,
1808
+ label: u,
1809
+ className: a,
1810
+ ...c,
1811
+ children: [
1812
+ z ? v : /* @__PURE__ */ s("p", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] type-meta ds:text-[color:var(--muted-foreground)]", children: r }),
1813
+ /* @__PURE__ */ s("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: m })
1814
+ ]
1815
+ }
1816
+ ) }) });
1817
+ }
1818
+ );
1819
+ tt.displayName = "SidebarFavorites";
1820
+ const rt = te(
1821
+ [
1822
+ "ds:group/item ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1823
+ "ds:rounded-[var(--radius-sm)]",
1824
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
1825
+ ].join(" "),
1826
+ {
1827
+ variants: {
1828
+ dragging: {
1829
+ true: "ds:opacity-60",
1830
+ false: ""
1831
+ },
1832
+ dropTarget: {
1833
+ true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--primary)] ds:outline-offset-[-2px]",
1834
+ false: ""
1835
+ }
1836
+ },
1837
+ defaultVariants: { dragging: !1, dropTarget: !1 }
1838
+ }
1839
+ ), nt = [
1840
+ "ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
1841
+ "ds:size-6 ds:rounded-[var(--radius-sm)]",
1842
+ "ds:cursor-grab ds:active:cursor-grabbing",
1843
+ "ds:text-[var(--muted-foreground)]",
1844
+ // Quiet chrome — only reveal the grip when the row is hovered or the
1845
+ // handle itself is focused (keyboard / AT). Matches the pin-star's
1846
+ // reveal-on-hover behaviour so the two siblings appear together.
1847
+ "ds:opacity-0 ds:group-hover/item:opacity-100 ds:focus-visible:opacity-100",
1848
+ "ds:hover:bg-[var(--muted)]/20 ds:hover:text-[var(--foreground)]",
1849
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1850
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1851
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1852
+ "ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
1853
+ ].join(" "), at = $(
1854
+ ({
1855
+ index: e,
1856
+ isActive: r = !1,
1857
+ asChild: t = !1,
1858
+ reorderLabel: a,
1859
+ isPinned: i = !1,
1860
+ onPinChange: c,
1861
+ pinLabel: o,
1862
+ "aria-label": p,
1863
+ className: u,
1864
+ children: v,
1865
+ ...I
1866
+ }, z) => {
1867
+ const { t: N } = ue("ui"), { mode: A } = G(), m = st(), [l, g] = se(!1), h = !!(m != null && m.onReorder) && A !== "icon", D = a ?? p ?? "", R = fe(), j = (f, Y) => {
1868
+ if (!(m != null && m.onReorder)) return;
1869
+ const W = Math.max(0, Math.min(m.count - 1, Y));
1870
+ W !== f && (m.onReorder(f, W), m.announce(
1871
+ N(
1872
+ "navigation.sidebar.reorderAnnounce",
1873
+ "{{label}} moved to position {{to}} of {{total}}",
1874
+ { label: D, to: W + 1, total: m.count }
1875
+ )
1876
+ ));
1877
+ }, w = (f) => {
1878
+ h && (f.altKey && f.key === "ArrowUp" ? (f.preventDefault(), j(e, e - 1)) : f.altKey && f.key === "ArrowDown" ? (f.preventDefault(), j(e, e + 1)) : f.key === "Home" && f.altKey ? (f.preventDefault(), j(e, 0)) : f.key === "End" && f.altKey && (f.preventDefault(), j(e, m.count - 1)));
1879
+ }, F = (f) => {
1880
+ h && (m == null || m.setDragSource(e), f.dataTransfer && (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("ds:text/plain", String(e))));
1881
+ }, E = () => {
1882
+ m == null || m.setDragSource(null), g(!1);
1883
+ }, H = (f) => {
1884
+ !h || (m == null ? void 0 : m.dragSource) === null || (f.preventDefault(), f.dataTransfer && (f.dataTransfer.dropEffect = "move"), g(!0));
1885
+ }, O = () => g(!1), _ = (f) => {
1886
+ if (!h) return;
1887
+ f.preventDefault();
1888
+ const Y = m == null ? void 0 : m.dragSource;
1889
+ g(!1), !(Y == null || Y === e) && j(Y, e);
1890
+ }, P = (m == null ? void 0 : m.dragSource) === e;
1891
+ return /* @__PURE__ */ x(
1892
+ "div",
1893
+ {
1894
+ className: rt({
1895
+ dragging: P,
1896
+ dropTarget: l && !P
1897
+ }),
1898
+ draggable: h || void 0,
1899
+ onDragStart: h ? F : void 0,
1900
+ onDragEnd: h ? E : void 0,
1901
+ onDragOver: H,
1902
+ onDragLeave: O,
1903
+ onDrop: _,
1904
+ children: [
1905
+ /* @__PURE__ */ s(
1906
+ Xe,
1907
+ {
1908
+ ref: z,
1909
+ isActive: r,
1910
+ asChild: t,
1911
+ "aria-label": p,
1912
+ "aria-describedby": h ? R : void 0,
1913
+ draggable: h ? !1 : void 0,
1914
+ className: [h ? "ds:flex-1 ds:min-w-0" : "", u ?? ""].filter(Boolean).join(" "),
1915
+ ...I,
1916
+ children: v
1917
+ }
1918
+ ),
1919
+ h ? /* @__PURE__ */ s(
1920
+ "button",
1921
+ {
1922
+ type: "button",
1923
+ id: R,
1924
+ "aria-label": N(
1925
+ "navigation.sidebar.reorderHandle",
1926
+ "Reorder {{label}}. Press Alt + Up or Alt + Down to move.",
1927
+ { label: D }
1928
+ ),
1929
+ className: nt,
1930
+ onKeyDown: w,
1931
+ children: /* @__PURE__ */ s(ls, { "aria-hidden": "true", className: "ds:size-4" })
1932
+ }
1933
+ ) : null,
1934
+ c && A !== "icon" ? /* @__PURE__ */ s(
1935
+ je,
1936
+ {
1937
+ isPinned: i,
1938
+ label: o ?? p ?? "",
1939
+ onPinChange: c
1940
+ }
1941
+ ) : null
1942
+ ]
1943
+ }
1944
+ );
1945
+ }
1946
+ );
1947
+ at.displayName = "SidebarFavoriteItem";
1948
+ const it = te(
1949
+ [
1950
+ "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1951
+ "ds:min-h-[var(--min-target-size)]",
1952
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
1953
+ "ds:rounded-[var(--radius-md)]",
1954
+ "ds:text-[var(--foreground)] ds:text-[length:var(--font-size-sm)]",
1955
+ "ds:hover:bg-[var(--muted)]/20",
1956
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1957
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1958
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1959
+ "ds:no-underline"
1960
+ ].join(" ")
1961
+ ), ot = $(({ avatar: e, name: r, subtitle: t, subtitleLabel: a, className: i, ...c }, o) => {
1962
+ const { mode: p } = G(), u = p !== "icon", v = typeof t == "string" ? t : a;
1963
+ return /* @__PURE__ */ x(
1964
+ "button",
1965
+ {
1966
+ ref: o,
1967
+ type: "button",
1968
+ "aria-label": v ? `${r}, ${v}` : r,
1969
+ className: [it(), i].filter(Boolean).join(" "),
1970
+ ...c,
1971
+ children: [
1972
+ /* @__PURE__ */ s(
1973
+ "span",
1974
+ {
1975
+ "aria-hidden": "true",
1976
+ className: "ds:inline-flex ds:items-center ds:shrink-0",
1977
+ children: e
1978
+ }
1979
+ ),
1980
+ u ? /* @__PURE__ */ x("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
1981
+ /* @__PURE__ */ s("span", { className: "ds:block ds:truncate type-label", children: r }),
1982
+ t ? typeof t == "string" ? /* @__PURE__ */ s("span", { className: "ds:block ds:truncate type-meta ds:text-[color:var(--muted-foreground)]", children: t }) : /* @__PURE__ */ s("span", { className: "ds:flex ds:items-center ds:gap-[length:var(--spacing-xs)] ds:min-w-0 type-meta ds:text-[color:var(--muted-foreground)]", children: t }) : null
1983
+ ] }) : null
1984
+ ]
1985
+ }
1986
+ );
1987
+ });
1988
+ ot.displayName = "SidebarProfilePill";
1989
+ const dt = [
1990
+ "ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
1991
+ "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
1992
+ "ds:rounded-[var(--radius-sm)]",
1993
+ "ds:text-[var(--muted-foreground)]",
1994
+ "ds:hover:bg-[var(--muted)]/20 ds:hover:text-[var(--foreground)]",
1995
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1996
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1997
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
1998
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
1999
+ ].join(" "), ct = $(({ className: e, "aria-label": r, onClick: t, ...a }, i) => {
2000
+ const { t: c } = ue("ui"), { mode: o, density: p, transitionTo: u } = G();
2001
+ if (o === "overlay") return null;
2002
+ const v = o === "expanded", I = v ? [
2003
+ "ds:justify-start",
2004
+ p === "compact" ? "ds:ps-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-sm)]"
2005
+ ].join(" ") : "ds:justify-center", z = r ?? (v ? c("navigation.sidebar.collapse", "Collapse sidebar") : c("navigation.sidebar.expand", "Expand sidebar")), N = /* @__PURE__ */ s(
2006
+ "button",
2007
+ {
2008
+ ref: i,
2009
+ type: "button",
2010
+ "aria-label": z,
2011
+ "aria-expanded": v,
2012
+ onClick: (A) => {
2013
+ u == null || u(v ? "icon" : "expanded"), t == null || t(A);
2014
+ },
2015
+ className: [dt, I, e].filter(Boolean).join(" "),
2016
+ ...a,
2017
+ children: /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center", children: v ? /* @__PURE__ */ s(
2018
+ ps,
2019
+ {
2020
+ "aria-hidden": "true",
2021
+ className: "ds:size-4 ds:rtl:-scale-x-100"
2022
+ }
2023
+ ) : /* @__PURE__ */ s(
2024
+ gs,
2025
+ {
2026
+ "aria-hidden": "true",
2027
+ className: "ds:size-4 ds:rtl:-scale-x-100"
2028
+ }
2029
+ ) })
2030
+ }
2031
+ );
2032
+ return /* @__PURE__ */ x(C.Root, { children: [
2033
+ /* @__PURE__ */ s(C.Trigger, { asChild: !0, children: N }),
2034
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
2035
+ C.Content,
2036
+ {
2037
+ side: o === "icon" ? "right" : "top",
2038
+ sideOffset: 6,
2039
+ className: pe,
2040
+ children: [
2041
+ z,
2042
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
2043
+ ]
2044
+ }
2045
+ ) })
2046
+ ] });
2047
+ });
2048
+ ct.displayName = "SidebarCollapseTrigger";
2049
+ const lt = te(
2050
+ [
2051
+ "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
2052
+ "ds:rounded-[var(--radius-md)]",
2053
+ "ds:border ds:border-[var(--border)]",
2054
+ "ds:bg-[image:var(--gradient-surface-subtle-accent)]",
2055
+ "ds:no-underline ds:!text-[var(--foreground)]",
2056
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
2057
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2058
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
2059
+ ].join(" "),
2060
+ {
2061
+ variants: {
2062
+ mode: {
2063
+ expanded: [
2064
+ "ds:min-h-[var(--min-target-size)]",
2065
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]"
2066
+ ].join(" "),
2067
+ icon: [
2068
+ "ds:justify-center",
2069
+ "ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
2070
+ "ds:ms-auto ds:me-auto ds:ps-0 ds:pe-0"
2071
+ ].join(" "),
2072
+ overlay: [
2073
+ "ds:min-h-[var(--min-target-size)]",
2074
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]"
2075
+ ].join(" ")
2076
+ }
2077
+ },
2078
+ defaultVariants: { mode: "expanded" }
2079
+ }
2080
+ ), ut = $(({ title: e, description: r, icon: t, className: a, ...i }, c) => {
2081
+ const { mode: o } = G(), p = o === "icon", u = (
2082
+ // aria-label only in icon mode (where the copy is hidden) — in
2083
+ // expanded mode the accessible name comes from the visible contents
2084
+ // so the description isn't excluded from it.
2085
+ /* @__PURE__ */ x(
2086
+ "a",
2087
+ {
2088
+ ref: c,
2089
+ "aria-label": p ? e : void 0,
2090
+ className: lt({ mode: o, className: a }),
2091
+ ...i,
2092
+ children: [
2093
+ /* @__PURE__ */ s(
2094
+ "span",
2095
+ {
2096
+ "aria-hidden": "true",
2097
+ className: [
2098
+ "ds:inline-flex ds:size-8 ds:shrink-0 ds:items-center ds:justify-center",
2099
+ "ds:rounded-[var(--radius-sm)]",
2100
+ "ds:bg-[var(--accent)] ds:text-[var(--accent-foreground)]"
2101
+ ].join(" "),
2102
+ children: t ?? /* @__PURE__ */ s(ms, { className: "ds:size-4" })
2103
+ }
2104
+ ),
2105
+ p ? null : /* @__PURE__ */ x(ye, { children: [
2106
+ /* @__PURE__ */ x("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
2107
+ /* @__PURE__ */ s("span", { className: "ds:block ds:line-clamp-2 type-label", children: e }),
2108
+ r ? (
2109
+ // Foreground (not muted) on the tinted surface — the gradient
2110
+ // stops leave muted text short of AA in both colour schemes.
2111
+ /* @__PURE__ */ s("span", { className: "ds:block ds:line-clamp-2 type-meta", children: r })
2112
+ ) : null
2113
+ ] }),
2114
+ /* @__PURE__ */ s(
2115
+ we,
2116
+ {
2117
+ "aria-hidden": "true",
2118
+ className: "ds:size-4 ds:shrink-0 ds:rtl:-scale-x-100"
2119
+ }
2120
+ )
2121
+ ] })
2122
+ ]
2123
+ }
2124
+ )
2125
+ );
2126
+ return p ? /* @__PURE__ */ x(C.Root, { children: [
2127
+ /* @__PURE__ */ s(C.Trigger, { asChild: !0, children: u }),
2128
+ /* @__PURE__ */ s(C.Portal, { children: /* @__PURE__ */ x(
2129
+ C.Content,
2130
+ {
2131
+ side: "right",
2132
+ sideOffset: 6,
2133
+ className: pe,
2134
+ children: [
2135
+ e,
2136
+ /* @__PURE__ */ s(C.Arrow, { className: "ds:fill-[var(--foreground)]" })
2137
+ ]
2138
+ }
2139
+ ) })
2140
+ ] }) : u;
2141
+ });
2142
+ ut.displayName = "SidebarUpgradeChip";
2143
+ export {
2144
+ Ps as S,
2145
+ As as a,
2146
+ ct as b,
2147
+ at as c,
2148
+ tt as d,
2149
+ Rs as e,
2150
+ Ys as f,
2151
+ Os as g,
2152
+ Xe as h,
2153
+ Xs as i,
2154
+ Gs as j,
2155
+ Ks as k,
2156
+ je as l,
2157
+ Qs as m,
2158
+ ot as n,
2159
+ Ge as o,
2160
+ ut as p,
2161
+ Zs as q,
2162
+ bs as s,
2163
+ G as u
2164
+ };
2165
+ //# sourceMappingURL=sidebar-D_S2-SXH.js.map