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