@alfadocs/ui-kit 1.59.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-KoO3EYrZ.js → actions-cell-renderer-CZWGQFKV.js} +3 -3
- package/dist/_chunks/{agenda-tray-D3GH9t3T.js → agenda-tray-DU7O5Z7R.js} +3 -3
- package/dist/_chunks/{ai-credits-notice-DAxBt_wr.js → ai-credits-notice-MBgQXxsx.js} +3 -3
- package/dist/_chunks/{ai-permission-notice-htJegWcH.js → ai-permission-notice-BJHutKLE.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-DRNqTCSK.js → ai-prompt-input-Dzos37rf.js} +2 -2
- package/dist/_chunks/{alia-sidebar-bMVUsMmJ.js → alia-sidebar-CU3mVL9J.js} +7 -7
- package/dist/_chunks/{anamnesis-card-Bh7Tg6i-.js → anamnesis-card-VjJOUl-t.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-D9cFUeXk.js → anamnesis-summary-rows-C5F08WT6.js} +7 -7
- package/dist/_chunks/{appointment-peek-drkQF54M.js → appointment-peek-BvzXHYiD.js} +3 -3
- package/dist/_chunks/{appointment-timeline-C3mTzaUm.js → appointment-timeline-r-q97cec.js} +4 -4
- package/dist/_chunks/{appointment-tray-CUBBT4mL.js → appointment-tray-DF_R9ldY.js} +3 -3
- package/dist/_chunks/{audio-recorder-B1TpJoMu.js → audio-recorder-Cssm6jVh.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-BC92nTi9.js → balance-badge-cell-DMG06b2C.js} +4 -4
- package/dist/_chunks/{bishop-score-BOjlxLzL.js → bishop-score-DxfkcxiV.js} +2 -2
- package/dist/_chunks/{bmi-calculator-JNiTHdYJ.js → bmi-calculator-B4kgPqt5.js} +2 -2
- package/dist/_chunks/{booking-BdWwr_NM.js → booking-CXaqmdF7.js} +5 -5
- package/dist/_chunks/{button-CnUVJg1Y.js → button-D-MQxsA_.js} +66 -57
- package/dist/_chunks/{button-group-DLqAoowT.js → button-group-Cfpyu6pc.js} +2 -2
- package/dist/_chunks/{calendar-KihOHLCs.js → calendar-DNTVaK6b.js} +2 -2
- package/dist/_chunks/{calendar-workspace-DD378Xg8.js → calendar-workspace-UL5xcpWa.js} +21 -21
- package/dist/_chunks/{care-plan-card-Cd1En8-p.js → care-plan-card-DFQbU_Gd.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-FIYdF44t.js → care-plan-entry-card-bj784KRk.js} +2 -2
- package/dist/_chunks/{care-plan-header-DgPAJWS4.js → care-plan-header-DDhyAfVK.js} +2 -2
- package/dist/_chunks/{carousel.agent-C7MXzwUi.js → carousel.agent-Csn24G1k.js} +2 -2
- package/dist/_chunks/{chart-0jK6B2ry.js → chart-D7PbNO_M.js} +3 -3
- package/dist/_chunks/{chat-input-1c4k4-uk.js → chat-input-Ck34Pnmp.js} +2 -2
- package/dist/_chunks/{chat-message-Bv9eW1NW.js → chat-message-DU0X3Xnl.js} +3 -3
- package/dist/_chunks/{code-block-DWVvOrUF.js → code-block-DiC4bg-o.js} +2 -2
- package/dist/_chunks/{connection-status-D-Zeqpr3.js → connection-status-BAnuwayz.js} +3 -3
- package/dist/_chunks/{contact-profile-card-DJe2ld0g.js → contact-profile-card-JTRbnbxy.js} +2 -2
- package/dist/_chunks/{control-room-rail-DgS2snUz.js → control-room-rail-BbBEIdws.js} +3 -3
- package/dist/_chunks/{copy-field-CY1f0k7O.js → copy-field-BCT7APRE.js} +2 -2
- package/dist/_chunks/{cycle-calculator-sOOESGEG.js → cycle-calculator-BuFi6ZJa.js} +2 -2
- package/dist/_chunks/dashboard-grid-DRnhIlT-.js +1404 -0
- package/dist/_chunks/{data-table-DjDuXaQB.js → data-table-DAPkhyXO.js} +6 -6
- package/dist/_chunks/{data-table-tabs-BsCll8sH.js → data-table-tabs-2t0cdk0h.js} +3 -3
- package/dist/_chunks/{description-list-ZWlFfbOy.js → description-list-CFEw__MT.js} +2 -2
- package/dist/_chunks/{dev-bypass-button-m-eXU2PU.js → dev-bypass-button-dTuUuzsT.js} +2 -2
- package/dist/_chunks/{document-preview-E6od-Yy0.js → document-preview-DYX669jE.js} +2 -2
- package/dist/_chunks/{document-scanner-DDOMMswN.js → document-scanner-C41n4pNq.js} +2 -2
- package/dist/_chunks/{due-date-calculator-rtMADvJ8.js → due-date-calculator-yYvX8Ww_.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-DTtF6IIr.js → editable-currency-cell-renderer-6LDFAWUE.js} +3 -3
- package/dist/_chunks/{editable-description-CriawIum.js → editable-description-D9FsTi8e.js} +3 -3
- package/dist/_chunks/{editor-overlay-CbFUYsVk.js → editor-overlay-BYkcaLCj.js} +2 -2
- package/dist/_chunks/{empty-state-BN_R5AzQ.js → empty-state-pL1qum99.js} +2 -2
- package/dist/_chunks/{entity-summary-CoCUJe3N.js → entity-summary-oD_63dlz.js} +3 -3
- package/dist/_chunks/{error-boundary-BlwcM1KR.js → error-boundary-Dzgu3O6W.js} +2 -2
- package/dist/_chunks/{error-page-B0ER6tPK.js → error-page-DirZKDz2.js} +2 -2
- package/dist/_chunks/{face-scheme-BunF1rjI.js → face-scheme-C-5V3MsY.js} +5 -5
- package/dist/_chunks/{fetal-weight-67yvef3S.js → fetal-weight-CHv2winC.js} +2 -2
- package/dist/_chunks/{field-array-BVitwPIt.js → field-array-dSkD_ePA.js} +3 -3
- package/dist/_chunks/{file-manager-YXtUu76I.js → file-manager-C8bdHsYy.js} +7 -7
- package/dist/_chunks/{finished-terminal-DdLHDe_5.js → finished-terminal-DuF3xrUv.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-Dsa1M6VK.js → fiscal-code-input-BSWwda0C.js} +2 -2
- package/dist/_chunks/{forgot-password-form-C2ibWCZT.js → forgot-password-form-CGWV5Q1-.js} +2 -2
- package/dist/_chunks/{freemium-paywall-C8CXWbhO.js → freemium-paywall-DjjVPC-5.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-DT8XDFVK.js → gestational-age-calculator-BLccWS_4.js} +2 -2
- package/dist/_chunks/{hcg-doubling-BxggoYNV.js → hcg-doubling-CnrY2OVu.js} +2 -2
- package/dist/_chunks/{header-C0XQZtu6.js → header-BVHAt7Fi.js} +2 -2
- package/dist/_chunks/{header-settings-BJ6M2p9Q.js → header-settings-C200bKyp.js} +3 -3
- package/dist/_chunks/{heatmap-COoukTUe.js → heatmap-CRMr7VWC.js} +6 -6
- package/dist/_chunks/{help-me-write-templates-DpcMweG1.js → help-me-write-templates-C9T8-DcT.js} +5 -5
- package/dist/_chunks/{hover-card-s2qD4RAz.js → hover-card-DbTmj-ea.js} +2 -2
- package/dist/_chunks/{icon-button-CsOGhuRB.js → icon-button-dNE6ENLn.js} +12 -9
- package/dist/_chunks/{icon-button-group-Cap4-Idv.js → icon-button-group-Du8IvZek.js} +2 -2
- package/dist/_chunks/{icon-picker-BbO2FB4y.js → icon-picker-D5NdDbCL.js} +3 -3
- package/dist/_chunks/{image-cropper-DXqCUezS.js → image-cropper-s8ej8cxa.js} +2 -2
- package/dist/_chunks/{info-tip-CJqR9fhi.js → info-tip-DObdz3w3.js} +2 -2
- package/dist/_chunks/{insert-result-BUEtHFMg.js → insert-result-h3WL-gMo.js} +2 -2
- package/dist/_chunks/{key-value-pair-BN5lWXcB.js → key-value-pair-BNYHAZwD.js} +2 -2
- package/dist/_chunks/{kit-extensions-BVtvnev_.js → kit-extensions-DI2nHVNw.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-BZmRw_Yi.js → link-cell-renderer-DvhzS6lu.js} +2 -2
- package/dist/_chunks/{locale-picker-DVWHnuDN.js → locale-picker-Bu4YE5b2.js} +3 -3
- package/dist/_chunks/{login-dev-card-DQioAtdz.js → login-dev-card-DwWWHclZ.js} +2 -2
- package/dist/_chunks/{map-view-9Ro_P8O8.js → map-view-BuVfJMEa.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-DnuHxuoE.js → marketplace-app-shell-p6hPgVwy.js} +279 -236
- package/dist/_chunks/{message-card-BNoaKInS.js → message-card-CvZlo3Fn.js} +3 -3
- package/dist/_chunks/{message-tray-D4R0boMJ.js → message-tray-DrS_LOed.js} +4 -4
- package/dist/_chunks/{notes-panel-0Wots8rp.js → notes-panel-6TElt7jQ.js} +4 -4
- package/dist/_chunks/{notification-card-DRLmYlL8.js → notification-card-Qrs52HIA.js} +3 -3
- package/dist/_chunks/{notification-tray-qrSc9Fcs.js → notification-tray-DRm1z97G.js} +4 -4
- package/dist/_chunks/{optical-prescription-B0ap3kGl.js → optical-prescription-DLIAhJ6f.js} +2 -2
- package/dist/_chunks/{panel-subview-Bs0WhwR9.js → panel-subview-CjZgdWwO.js} +2 -2
- package/dist/_chunks/{patient-details-C6buDwuI.js → patient-details-BjqKBY2x.js} +3 -3
- package/dist/_chunks/{patient-field-row-CKb4FIaM.js → patient-field-row-BiI0BPPK.js} +6 -6
- package/dist/_chunks/{patient-search-Cgv8Pjsc.js → patient-search-B5R7FyFO.js} +2 -2
- package/dist/_chunks/{patient-summary-card-DWx0emu2.js → patient-summary-card-BOgnWKRV.js} +5 -5
- package/dist/_chunks/{payment-automation-upsell-BAJwtVCs.js → payment-automation-upsell-39d5ykBi.js} +2 -2
- package/dist/_chunks/{payment-request-card-BNiZqIzT.js → payment-request-card-E3G4aVt6.js} +3 -3
- package/dist/_chunks/{periodontal-chart-DMWiP5Ti.js → periodontal-chart-BZ1d6S36.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-D2ZFjN7G.js → periodontal-chart-card-BE5hiQnn.js} +2 -2
- package/dist/_chunks/{popover-CltTC2Rg.js → popover-DQr_tljb.js} +2 -2
- package/dist/_chunks/{practice-results-PINvX-1g.js → practice-results-Cktx7KaC.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BNSWXA0p.js → pregnancy-dating-26fcvhAx.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-CI7R6sA6.js → pregnancy-weight-gain-D8q1IUCT.js} +2 -2
- package/dist/_chunks/{privacy-lock-CqLxFiLE.js → privacy-lock-BpVgSgMb.js} +3 -3
- package/dist/_chunks/{privacy-mask-CUnJv35j.js → privacy-mask-BfMC57ST.js} +2 -2
- package/dist/_chunks/{product-hub-panel-MbiHZwjC.js → product-hub-panel-CH4B49ij.js} +3 -3
- package/dist/_chunks/{public-header.agent-1MZVDYY1.js → public-header.agent-BHTDKMsw.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-CpKvvZIU.js → radiograph-panel.agent-DR0gOeSc.js} +4 -4
- package/dist/_chunks/{registration-form-JYravsvu.js → registration-form-B8IeB9kd.js} +3 -3
- package/dist/_chunks/{reviews-panel-B1Xirvh4.js → reviews-panel-CHzDqerd.js} +4 -4
- package/dist/_chunks/{rich-text-editor-CZXnqI3-.js → rich-text-editor-BRuTo2hm.js} +8 -8
- package/dist/_chunks/{session-countdown-DAyI9Wye.js → session-countdown-DWY61IcV.js} +2 -2
- package/dist/_chunks/{sheet-D_bERXP2.js → sheet-CqvPYNLn.js} +2 -2
- package/dist/_chunks/sidebar-C9Zof0z1.js +2571 -0
- package/dist/_chunks/{sign-in-with-alfadocs-button-WfdfqQ8O.js → sign-in-with-alfadocs-button-CIv0GgeA.js} +2 -2
- package/dist/_chunks/{signature-request-BZIs36nH.js → signature-request-BH7yKI01.js} +3 -3
- package/dist/_chunks/{signed-out-frame-BR5sJSNX.js → signed-out-frame-eaOWHpDr.js} +3 -3
- package/dist/_chunks/{slot-grid-JU--9C6W.js → slot-grid-DELa2Nwz.js} +4 -4
- package/dist/_chunks/{streaming-text-COuXesoR.js → streaming-text-bPDoG7Y3.js} +2 -2
- package/dist/_chunks/{task-card-D9ngXO7p.js → task-card-zaTU1rQa.js} +2 -2
- package/dist/_chunks/{task-editor-B7xb-mMs.js → task-editor-CgGcg-2c.js} +6 -6
- package/dist/_chunks/{task-tray-BAW_wbTO.js → task-tray-DGMwogWu.js} +4 -4
- package/dist/_chunks/{tasks-panel-DQvN3TiB.js → tasks-panel-xGtiEdcj.js} +6 -6
- package/dist/_chunks/{theme-toggle-CfjLDUfK.js → theme-toggle-_cfYEK73.js} +3 -3
- package/dist/_chunks/{toast-2y0czYHr.js → toast-CNUydTgT.js} +2 -2
- package/dist/_chunks/{token-insert-menu-BzNAHiND.js → token-insert-menu-CQvV4u1m.js} +2 -2
- package/dist/_chunks/{tool-rail-DQ5qTv4l.js → tool-rail-Blgibz0a.js} +2 -2
- package/dist/_chunks/{tooth-scheme-CLyS9UUW.js → tooth-scheme-05DsRMA5.js} +2 -2
- package/dist/_chunks/{unit-converter-W62N99Mw.js → unit-converter-BPZ0Ldkb.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-Ba1DBPr7.js → use-appointment-details-read-BGVthJFx.js} +12 -12
- package/dist/_chunks/{voice-control-panel-p7WMTj4D.js → voice-control-panel-DyKEaFxt.js} +4 -4
- package/dist/_chunks/{warning-stack-DGPuJNVD.js → warning-stack-CAL9xVo1.js} +3 -3
- package/dist/_chunks/{workflow-map-DFuVff8U.js → workflow-map-BUYG1oXU.js} +5 -5
- package/dist/agent-catalog.json +62 -2
- package/dist/agent-i18n/en.json +7 -3
- package/dist/components/_shared/aria-keyshortcuts.d.ts +5 -0
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +16 -4
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +42 -2
- package/dist/components/dashboard-grid/index.d.ts +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table/toolbar.d.ts +1 -1
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/image-cropper/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.d.ts +2 -2
- package/dist/components/sidebar/index.js +24 -21
- package/dist/components/sidebar/sidebar.d.ts +61 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.js +3 -0
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.js +3 -0
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.js +3 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.js +3 -0
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.js +3 -0
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.js +3 -0
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.js +3 -0
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.js +3 -0
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.js +3 -0
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.js +3 -0
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.js +3 -0
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.js +3 -0
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.js +3 -0
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.js +3 -0
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.js +3 -0
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.js +3 -0
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.js +3 -0
- package/dist/index.js +775 -772
- package/dist/locales/ar.json +3 -0
- package/dist/locales/de.json +3 -0
- package/dist/locales/el.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +3 -0
- package/dist/locales/fr.json +3 -0
- package/dist/locales/hi.json +3 -0
- package/dist/locales/it.json +3 -0
- package/dist/locales/ja.json +3 -0
- package/dist/locales/nl.json +3 -0
- package/dist/locales/pl.json +3 -0
- package/dist/locales/pt.json +3 -0
- package/dist/locales/ro.json +3 -0
- package/dist/locales/ru.json +3 -0
- package/dist/locales/sq.json +3 -0
- package/dist/locales/sv.json +3 -0
- package/dist/locales/tr.json +3 -0
- package/dist/locales/zh.json +3 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +23 -4
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/dashboard-grid-SAGjktTs.js +0 -933
- package/dist/_chunks/sidebar-D_S2-SXH.js +0 -2165
|
@@ -0,0 +1,2571 @@
|
|
|
1
|
+
import { jsx as r, jsxs as h, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import { useId as ve, useState as Z, useRef as U, useCallback as F, useEffect as ne, useMemo as ye, createContext as ie, useContext as oe, forwardRef as $, isValidElement as ds } from "react";
|
|
3
|
+
import * as ge 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 ae } 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 xe } 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 = () => oe(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 be(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 v;
|
|
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 p of i) {
|
|
228
|
+
const b = p.dataset.sidebarSectionId;
|
|
229
|
+
if (b !== void 0) {
|
|
230
|
+
d.set(b, []), a.set(b, p.dataset.sidebarSectionOpen !== "false"), n.set(b, p.dataset.sidebarSectionLabel ?? "");
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (p.dataset.sidebarItemId === s) {
|
|
234
|
+
u = p;
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
const x = be(p, t);
|
|
238
|
+
(v = d.get(x)) == null || v.push(p);
|
|
239
|
+
}
|
|
240
|
+
if (!u) return null;
|
|
241
|
+
const c = (p) => {
|
|
242
|
+
var b;
|
|
243
|
+
return (((b = d.get(p)) == null ? void 0 : b.length) ?? 0) + 1;
|
|
244
|
+
}, l = [], w = d.get(null) ?? [], C = w.length === 0 && be(u, t) === null;
|
|
245
|
+
for (const p of i) {
|
|
246
|
+
const b = p.dataset.sidebarSectionId;
|
|
247
|
+
if (b !== void 0) {
|
|
248
|
+
const T = d.get(b) ?? [];
|
|
249
|
+
(!a.get(b) || T.length === 0) && l.push({
|
|
250
|
+
sectionId: b,
|
|
251
|
+
index: T.length,
|
|
252
|
+
total: c(b),
|
|
253
|
+
indicator: { kind: "section", sectionId: b }
|
|
254
|
+
});
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (p === 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 x = be(p, t);
|
|
267
|
+
if (x !== null && !a.get(x)) continue;
|
|
268
|
+
const P = d.get(x) ?? [], L = P.indexOf(p), A = p.dataset.sidebarItemId ?? "";
|
|
269
|
+
l.push({
|
|
270
|
+
sectionId: x,
|
|
271
|
+
index: L,
|
|
272
|
+
total: c(x),
|
|
273
|
+
indicator: { kind: "item", itemId: A, edge: "before" }
|
|
274
|
+
}), L === P.length - 1 && l.push({
|
|
275
|
+
sectionId: x,
|
|
276
|
+
index: L + 1,
|
|
277
|
+
total: c(x),
|
|
278
|
+
indicator: { kind: "item", itemId: A, edge: "after" }
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
w.length === 0 && !C && l.push({
|
|
282
|
+
sectionId: null,
|
|
283
|
+
index: 0,
|
|
284
|
+
total: 1,
|
|
285
|
+
indicator: { kind: "list" }
|
|
286
|
+
});
|
|
287
|
+
const I = be(u, t), j = (d.get(I) ?? []).filter(
|
|
288
|
+
(p) => p.compareDocumentPosition(u) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
289
|
+
).length;
|
|
290
|
+
return {
|
|
291
|
+
places: l,
|
|
292
|
+
originIndex: l.findIndex(
|
|
293
|
+
(p) => fe(p, { sectionId: I, index: j })
|
|
294
|
+
),
|
|
295
|
+
emptySectionIds: [...d.entries()].filter(([p, b]) => p !== null && a.get(p) && !b.length).map(([p]) => p),
|
|
296
|
+
listEmpty: w.length === 0 && !C,
|
|
297
|
+
sectionLabels: n
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function _s(e, s) {
|
|
301
|
+
const t = e.querySelector("[data-sidebar-body]") ?? e, i = be(s, t), d = Array.from(t.querySelectorAll(Ve)).filter(
|
|
302
|
+
(a) => a !== s && be(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] = Z(null), c = U(null), l = U([]), w = U(/* @__PURE__ */ new Map()), C = U(/* @__PURE__ */ new Map()), I = U(null), j = U(e);
|
|
330
|
+
j.current = e;
|
|
331
|
+
const v = U(null), p = U(null), b = F((o) => {
|
|
332
|
+
c.current = o, u(o);
|
|
333
|
+
}, []), [x, P] = Z(""), L = U(!1), A = F((o) => {
|
|
334
|
+
L.current = !L.current, P(L.current ? o : `${o}`);
|
|
335
|
+
}, []), T = 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: w.current.get(o.sectionId) ?? "",
|
|
341
|
+
position: o.index + 1,
|
|
342
|
+
total: o.total
|
|
343
|
+
}),
|
|
344
|
+
[d]
|
|
345
|
+
), _ = F(
|
|
346
|
+
(o, S, E) => {
|
|
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, w.current = f.sectionLabels;
|
|
353
|
+
const N = f.places[f.originIndex], D = E.getAttribute("aria-label") ?? ((B = E.textContent) == null ? void 0 : B.trim()) ?? "";
|
|
354
|
+
return b({
|
|
355
|
+
itemId: o,
|
|
356
|
+
label: D,
|
|
357
|
+
via: S,
|
|
358
|
+
origin: N,
|
|
359
|
+
target: N,
|
|
360
|
+
emptySectionIds: f.emptySectionIds,
|
|
361
|
+
listEmpty: f.listEmpty
|
|
362
|
+
}), A(
|
|
363
|
+
d("navigation.sidebar.move.pickedUp", {
|
|
364
|
+
item: D,
|
|
365
|
+
place: T(N)
|
|
366
|
+
})
|
|
367
|
+
), !0;
|
|
368
|
+
},
|
|
369
|
+
[t, b, A, d, T]
|
|
370
|
+
), K = F(
|
|
371
|
+
(o, S) => {
|
|
372
|
+
const E = c.current;
|
|
373
|
+
!E || fe(E.target, o) || (b({ ...E, target: o }), S && (A(T(o)), requestAnimationFrame(() => {
|
|
374
|
+
var f, N;
|
|
375
|
+
const m = t.current;
|
|
376
|
+
m && ((N = (f = qe(m, o)) == null ? void 0 : f.scrollIntoView) == null || N.call(f, { block: "nearest" }));
|
|
377
|
+
})));
|
|
378
|
+
},
|
|
379
|
+
[b, A, T, t]
|
|
380
|
+
), Y = F(() => {
|
|
381
|
+
var N, D;
|
|
382
|
+
const o = c.current;
|
|
383
|
+
if (!o) return;
|
|
384
|
+
b(null), l.current = [];
|
|
385
|
+
const { itemId: S, origin: E, target: m, label: f } = o;
|
|
386
|
+
fe(E, m) || (I.current = {
|
|
387
|
+
itemId: S,
|
|
388
|
+
sectionId: m.sectionId,
|
|
389
|
+
index: m.index,
|
|
390
|
+
until: Date.now() + Bs
|
|
391
|
+
}, m.sectionId !== null && ((N = C.current.get(m.sectionId)) == null || N()), (D = j.current) == null || D.call(j, {
|
|
392
|
+
itemId: S,
|
|
393
|
+
toSectionId: m.sectionId,
|
|
394
|
+
index: m.index
|
|
395
|
+
})), A(
|
|
396
|
+
d("navigation.sidebar.move.dropped", {
|
|
397
|
+
item: f,
|
|
398
|
+
place: T(m)
|
|
399
|
+
})
|
|
400
|
+
);
|
|
401
|
+
}, [b, A, d, T]), k = F(() => {
|
|
402
|
+
const o = c.current;
|
|
403
|
+
o && (b(null), l.current = [], A(
|
|
404
|
+
d("navigation.sidebar.move.cancelled", {
|
|
405
|
+
item: o.label,
|
|
406
|
+
place: T(o.origin)
|
|
407
|
+
})
|
|
408
|
+
));
|
|
409
|
+
}, [b, A, d, T]), R = F(
|
|
410
|
+
(o, S) => {
|
|
411
|
+
const E = c.current, m = !o.altKey && !o.ctrlKey && !o.metaKey && !o.shiftKey;
|
|
412
|
+
if (!E) {
|
|
413
|
+
o.key === " " && m && !o.repeat && (o.preventDefault(), _(S, "keyboard", o.currentTarget));
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (E.itemId !== S || E.via !== "keyboard") return;
|
|
417
|
+
const f = l.current, N = f.findIndex((B) => fe(B, E.target)), D = (B) => {
|
|
418
|
+
const se = f[Math.max(0, Math.min(f.length - 1, B))];
|
|
419
|
+
se && K(se, !0);
|
|
420
|
+
};
|
|
421
|
+
switch (o.key) {
|
|
422
|
+
case "ArrowDown":
|
|
423
|
+
o.preventDefault(), D(N + 1);
|
|
424
|
+
break;
|
|
425
|
+
case "ArrowUp":
|
|
426
|
+
o.preventDefault(), D(N - 1);
|
|
427
|
+
break;
|
|
428
|
+
case "Home":
|
|
429
|
+
o.preventDefault(), D(0);
|
|
430
|
+
break;
|
|
431
|
+
case "End":
|
|
432
|
+
o.preventDefault(), D(f.length - 1);
|
|
433
|
+
break;
|
|
434
|
+
case " ":
|
|
435
|
+
case "Enter":
|
|
436
|
+
o.preventDefault(), o.repeat || Y();
|
|
437
|
+
break;
|
|
438
|
+
case "Escape":
|
|
439
|
+
o.preventDefault(), o.stopPropagation(), k();
|
|
440
|
+
break;
|
|
441
|
+
case "Tab":
|
|
442
|
+
k();
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
[_, K, Y, k]
|
|
447
|
+
), O = F(
|
|
448
|
+
(o) => {
|
|
449
|
+
const S = c.current;
|
|
450
|
+
(S == null ? void 0 : S.via) === "keyboard" && S.itemId === o && k();
|
|
451
|
+
},
|
|
452
|
+
[k]
|
|
453
|
+
), g = F(() => {
|
|
454
|
+
var S;
|
|
455
|
+
const o = v.current;
|
|
456
|
+
o != null && o.timer && clearTimeout(o.timer), o != null && o.frame && cancelAnimationFrame(o.frame), v.current = null, (S = p.current) == null || S.call(p), p.current = null;
|
|
457
|
+
}, []), M = F(
|
|
458
|
+
(o, S) => {
|
|
459
|
+
if (c.current || v.current || !o.isPrimary || o.button !== 0) return;
|
|
460
|
+
const E = o.pointerType === "touch", m = {
|
|
461
|
+
pointerId: o.pointerId,
|
|
462
|
+
itemId: S,
|
|
463
|
+
node: o.currentTarget,
|
|
464
|
+
touch: E,
|
|
465
|
+
startX: o.clientX,
|
|
466
|
+
startY: o.clientY,
|
|
467
|
+
dragging: !1,
|
|
468
|
+
timer: null,
|
|
469
|
+
lastY: o.clientY,
|
|
470
|
+
frame: 0
|
|
471
|
+
};
|
|
472
|
+
v.current = m;
|
|
473
|
+
const f = () => {
|
|
474
|
+
var z, V;
|
|
475
|
+
if (!_(m.itemId, "pointer", m.node)) {
|
|
476
|
+
g();
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
m.dragging = !0, (V = (z = window.getSelection) == null ? void 0 : z.call(window)) == null || V.removeAllRanges();
|
|
480
|
+
}, N = (z) => {
|
|
481
|
+
const V = t.current;
|
|
482
|
+
if (!V) return;
|
|
483
|
+
let te = null, he = Number.POSITIVE_INFINITY;
|
|
484
|
+
for (const ce of l.current) {
|
|
485
|
+
const ue = Math.abs(Rs(V, ce) - z);
|
|
486
|
+
ue < he && (te = ce, he = ue);
|
|
487
|
+
}
|
|
488
|
+
te && K(te, !1);
|
|
489
|
+
}, D = () => {
|
|
490
|
+
var _e, Re;
|
|
491
|
+
if (m.frame = 0, !m.dragging) return;
|
|
492
|
+
const z = (Re = (_e = t.current) == null ? void 0 : _e.querySelector("[data-sidebar-body]")) == null ? void 0 : Re.closest("[data-radix-scroll-area-viewport]");
|
|
493
|
+
if (!z) return;
|
|
494
|
+
const V = z.getBoundingClientRect(), te = V.top + je - m.lastY, he = m.lastY - (V.bottom - je), ce = Math.max(te, he);
|
|
495
|
+
if (ce <= 0) return;
|
|
496
|
+
const ue = Math.ceil(Fs * Math.min(1, ce / je)), Se = z.scrollTop;
|
|
497
|
+
z.scrollTop += te > 0 ? -ue : ue, z.scrollTop !== Se && (N(m.lastY), m.frame = requestAnimationFrame(D));
|
|
498
|
+
}, B = (z) => {
|
|
499
|
+
if (z.pointerId === m.pointerId) {
|
|
500
|
+
if (!m.dragging) {
|
|
501
|
+
if (Math.hypot(
|
|
502
|
+
z.clientX - m.startX,
|
|
503
|
+
z.clientY - m.startY
|
|
504
|
+
) < Ms) return;
|
|
505
|
+
if (m.touch) {
|
|
506
|
+
g();
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
if (f(), !m.dragging) return;
|
|
510
|
+
}
|
|
511
|
+
m.lastY = z.clientY, N(z.clientY), m.frame || (m.frame = requestAnimationFrame(D));
|
|
512
|
+
}
|
|
513
|
+
}, se = (z) => {
|
|
514
|
+
var ue;
|
|
515
|
+
if (z.pointerId !== m.pointerId) return;
|
|
516
|
+
const V = m.dragging;
|
|
517
|
+
if (g(), !V) return;
|
|
518
|
+
const te = (ue = t.current) == null ? void 0 : ue.getBoundingClientRect();
|
|
519
|
+
if (!te || z.clientX < te.left || z.clientX > te.right || z.clientY < te.top || z.clientY > te.bottom) {
|
|
520
|
+
k();
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
Y();
|
|
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
|
+
}, we = (z) => {
|
|
532
|
+
if (z.pointerId !== m.pointerId) return;
|
|
533
|
+
const V = m.dragging;
|
|
534
|
+
g(), V && k();
|
|
535
|
+
}, X = (z) => z.preventDefault(), pe = (z) => {
|
|
536
|
+
z.key !== "Escape" || !m.dragging || (z.preventDefault(), g(), k());
|
|
537
|
+
};
|
|
538
|
+
window.addEventListener("pointermove", B), window.addEventListener("pointerup", se), window.addEventListener("pointercancel", we), window.addEventListener("keydown", pe, !0), E && (window.addEventListener("contextmenu", X, !0), m.timer = setTimeout(() => {
|
|
539
|
+
m.timer = null, f();
|
|
540
|
+
}, Ls)), p.current = () => {
|
|
541
|
+
window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", se), window.removeEventListener("pointercancel", we), window.removeEventListener("keydown", pe, !0), window.removeEventListener("contextmenu", X, !0);
|
|
542
|
+
};
|
|
543
|
+
},
|
|
544
|
+
[_, K, Y, k, g, t]
|
|
545
|
+
);
|
|
546
|
+
ne(() => g, [g]);
|
|
547
|
+
const G = U(null), W = F((o) => {
|
|
548
|
+
var S;
|
|
549
|
+
(S = v.current) != null && S.dragging && o.preventDefault();
|
|
550
|
+
}, []), q = F(
|
|
551
|
+
(o) => {
|
|
552
|
+
var S;
|
|
553
|
+
G.current !== o && ((S = G.current) == null || S.removeEventListener("touchmove", W), G.current = o, o == null || o.addEventListener("touchmove", W, { passive: !1 }));
|
|
554
|
+
},
|
|
555
|
+
[W]
|
|
556
|
+
), J = U(s);
|
|
557
|
+
J.current = s;
|
|
558
|
+
const Q = F(
|
|
559
|
+
(o) => q(o && J.current ? o : null),
|
|
560
|
+
[q]
|
|
561
|
+
);
|
|
562
|
+
ne(() => {
|
|
563
|
+
q(s ? t.current : null);
|
|
564
|
+
}, [s, q, t]), ne(() => () => q(null), [q]), ne(() => {
|
|
565
|
+
!s && c.current && k();
|
|
566
|
+
}, [s, k]);
|
|
567
|
+
const ee = F((o, S) => (C.current.set(o, S), () => {
|
|
568
|
+
C.current.get(o) === S && C.current.delete(o);
|
|
569
|
+
}), []), re = F(() => {
|
|
570
|
+
const o = I.current, S = t.current;
|
|
571
|
+
if (!o || !S) return;
|
|
572
|
+
if (Date.now() > o.until) {
|
|
573
|
+
I.current = null;
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
const E = S.querySelector(
|
|
577
|
+
`[data-sidebar-item-id="${CSS.escape(o.itemId)}"]`
|
|
578
|
+
);
|
|
579
|
+
if (!E) return;
|
|
580
|
+
const m = document.activeElement, f = m !== null && m !== document.body && m !== E;
|
|
581
|
+
if (!fe(_s(S, E), o)) {
|
|
582
|
+
f && (I.current = null);
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
I.current = null, !(m === E || f) && (i.current = !0, E.focus(), i.current = !1);
|
|
586
|
+
}, [t, i]);
|
|
587
|
+
return {
|
|
588
|
+
context: ye(
|
|
589
|
+
() => s ? {
|
|
590
|
+
enabled: s,
|
|
591
|
+
instructionsId: a,
|
|
592
|
+
move: n,
|
|
593
|
+
onItemKeyDown: R,
|
|
594
|
+
onItemPointerDown: M,
|
|
595
|
+
onItemBlur: O,
|
|
596
|
+
registerSection: ee
|
|
597
|
+
} : { enabled: !1, move: null, registerSection: ee },
|
|
598
|
+
[
|
|
599
|
+
s,
|
|
600
|
+
a,
|
|
601
|
+
n,
|
|
602
|
+
R,
|
|
603
|
+
M,
|
|
604
|
+
O,
|
|
605
|
+
ee
|
|
606
|
+
]
|
|
607
|
+
),
|
|
608
|
+
message: x,
|
|
609
|
+
instructionsId: a,
|
|
610
|
+
restoreFocus: re,
|
|
611
|
+
touchGuardRef: Q,
|
|
612
|
+
/** True while any move runs: Escape cancels it, not the drawer. */
|
|
613
|
+
cancelIfMoving: () => c.current ? (k(), !0) : !1
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
const De = ie({
|
|
617
|
+
mode: "expanded",
|
|
618
|
+
density: "default"
|
|
619
|
+
}), H = () => oe(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, w) => {
|
|
646
|
+
const C = l.element(), I = w.element();
|
|
647
|
+
return !C || !I ? 0 : C.compareDocumentPosition(I) & 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 = ae(
|
|
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: w,
|
|
756
|
+
children: C,
|
|
757
|
+
id: I,
|
|
758
|
+
...j
|
|
759
|
+
}, v) => {
|
|
760
|
+
const p = U(c);
|
|
761
|
+
p.current = c;
|
|
762
|
+
const [b] = Z(() => $s(p)), x = /* @__PURE__ */ r(Oe.Provider, { value: b, children: C }), { t: P } = de("ui"), L = e !== void 0, [A, T] = Z(
|
|
763
|
+
() => Ks(s)
|
|
764
|
+
), _ = L ? e : A;
|
|
765
|
+
ne(() => {
|
|
766
|
+
L || Ys(A);
|
|
767
|
+
}, [A, L]);
|
|
768
|
+
const K = F(
|
|
769
|
+
(f) => {
|
|
770
|
+
L || T(f), t == null || t(f);
|
|
771
|
+
},
|
|
772
|
+
[L, t]
|
|
773
|
+
), Y = l ?? P("navigation.sidebar.label"), k = ve(), R = I ?? k, O = U(_);
|
|
774
|
+
ne(() => {
|
|
775
|
+
O.current = _;
|
|
776
|
+
}, [_]);
|
|
777
|
+
const g = ye(
|
|
778
|
+
() => ({
|
|
779
|
+
getIsCollapsed: () => O.current !== "expanded",
|
|
780
|
+
toggleCollapsed: () => {
|
|
781
|
+
const f = O.current === "expanded" ? "icon" : "expanded";
|
|
782
|
+
K(f);
|
|
783
|
+
},
|
|
784
|
+
getAnySectionOpen: () => b.getSnapshot().open > 0,
|
|
785
|
+
setAllSectionsOpen: (f) => b.setAll(f)
|
|
786
|
+
}),
|
|
787
|
+
[K, b]
|
|
788
|
+
);
|
|
789
|
+
fs(Os, g, I);
|
|
790
|
+
const M = U(null), G = U(null), W = U(!1), [q, J] = Z(0), Q = F(() => (J((f) => f + 1), () => J((f) => f - 1)), []), { separatorProps: ee, isResizing: re } = ms({
|
|
791
|
+
edge: "inline-end",
|
|
792
|
+
targetRef: M,
|
|
793
|
+
cssProperty: "--sidebar-modern-expanded-size",
|
|
794
|
+
minSize: Vs,
|
|
795
|
+
maxSize: Gs,
|
|
796
|
+
defaultSize: qs,
|
|
797
|
+
disabled: !n || _ !== "expanded"
|
|
798
|
+
}), le = n && _ === "expanded", o = Us({
|
|
799
|
+
onMoveItem: u,
|
|
800
|
+
enabled: u !== void 0 && _ !== "icon",
|
|
801
|
+
rootRef: M,
|
|
802
|
+
quietFocusRef: W
|
|
803
|
+
}), { touchGuardRef: S } = o, E = ye(
|
|
804
|
+
() => $e(v, M, S),
|
|
805
|
+
[v, S]
|
|
806
|
+
);
|
|
807
|
+
xe(() => 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 _ === "overlay" ? /* @__PURE__ */ r(
|
|
822
|
+
De.Provider,
|
|
823
|
+
{
|
|
824
|
+
value: {
|
|
825
|
+
mode: "overlay",
|
|
826
|
+
density: i,
|
|
827
|
+
transitionTo: K,
|
|
828
|
+
navElementId: R,
|
|
829
|
+
quietFocusRef: W
|
|
830
|
+
},
|
|
831
|
+
children: /* @__PURE__ */ r(y.Provider, { delayDuration: 300, children: /* @__PURE__ */ r(ge.Root, { open: d, onOpenChange: a, children: /* @__PURE__ */ h(ge.Portal, { children: [
|
|
832
|
+
/* @__PURE__ */ r(
|
|
833
|
+
ge.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
|
+
ge.Content,
|
|
846
|
+
{
|
|
847
|
+
onOpenAutoFocus: (f) => {
|
|
848
|
+
var D, B;
|
|
849
|
+
G.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
850
|
+
const N = ((D = M.current) == null ? void 0 : D.querySelector(
|
|
851
|
+
'[aria-current="page"]'
|
|
852
|
+
)) ?? ((B = M.current) == null ? void 0 : B.querySelector(
|
|
853
|
+
'a[href], button:not([disabled]), input:not([disabled]), [tabindex="0"]'
|
|
854
|
+
));
|
|
855
|
+
W.current = !0, N == null || N.focus(), W.current = !1, N && document.activeElement === N && f.preventDefault();
|
|
856
|
+
},
|
|
857
|
+
onCloseAutoFocus: (f) => {
|
|
858
|
+
var D;
|
|
859
|
+
const N = document.activeElement;
|
|
860
|
+
N && N !== document.body || (D = G.current) != null && D.isConnected && (f.preventDefault(), G.current.focus());
|
|
861
|
+
},
|
|
862
|
+
onEscapeKeyDown: (f) => {
|
|
863
|
+
o.cancelIfMoving() && f.preventDefault();
|
|
864
|
+
},
|
|
865
|
+
"aria-label": Y,
|
|
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
|
+
w ?? ""
|
|
880
|
+
].filter(Boolean).join(" "),
|
|
881
|
+
children: [
|
|
882
|
+
/* @__PURE__ */ h(
|
|
883
|
+
"nav",
|
|
884
|
+
{
|
|
885
|
+
ref: E,
|
|
886
|
+
id: R,
|
|
887
|
+
"aria-label": Y,
|
|
888
|
+
"data-component": "sidebar",
|
|
889
|
+
"data-component-id": I,
|
|
890
|
+
className: "ds:flex ds:flex-col ds:h-full",
|
|
891
|
+
...j,
|
|
892
|
+
children: [
|
|
893
|
+
/* @__PURE__ */ r(Ae.Provider, { value: o.context, children: /* @__PURE__ */ r(
|
|
894
|
+
We.Provider,
|
|
895
|
+
{
|
|
896
|
+
value: Q,
|
|
897
|
+
children: x
|
|
898
|
+
}
|
|
899
|
+
) }),
|
|
900
|
+
m
|
|
901
|
+
]
|
|
902
|
+
}
|
|
903
|
+
),
|
|
904
|
+
q === 0 ? /* @__PURE__ */ r(ge.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: _,
|
|
923
|
+
density: i,
|
|
924
|
+
transitionTo: K,
|
|
925
|
+
navElementId: R,
|
|
926
|
+
quietFocusRef: W
|
|
927
|
+
},
|
|
928
|
+
children: /* @__PURE__ */ r(y.Provider, { delayDuration: 300, children: /* @__PURE__ */ h(
|
|
929
|
+
"nav",
|
|
930
|
+
{
|
|
931
|
+
ref: E,
|
|
932
|
+
id: R,
|
|
933
|
+
"aria-label": Y,
|
|
934
|
+
"data-component": "sidebar",
|
|
935
|
+
"data-component-id": I,
|
|
936
|
+
"data-mode": _,
|
|
937
|
+
"data-density": i,
|
|
938
|
+
"data-resizing": re ? "" : void 0,
|
|
939
|
+
className: [
|
|
940
|
+
Le({ mode: _, density: i }),
|
|
941
|
+
i === "compact" ? "ds:density-compact" : "",
|
|
942
|
+
w ?? ""
|
|
943
|
+
].filter(Boolean).join(" "),
|
|
944
|
+
...j,
|
|
945
|
+
children: [
|
|
946
|
+
/* @__PURE__ */ r(Ae.Provider, { value: o.context, children: x }),
|
|
947
|
+
m,
|
|
948
|
+
le ? /* @__PURE__ */ r(
|
|
949
|
+
"div",
|
|
950
|
+
{
|
|
951
|
+
...ee,
|
|
952
|
+
"aria-label": P("navigation.sidebar.resize"),
|
|
953
|
+
"data-resizing": re ? "" : 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 } = H();
|
|
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 = ae(
|
|
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 } = H(), { 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 } = H();
|
|
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 = ae(
|
|
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 } = H(), { 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
|
+
headingLevel: c = 3,
|
|
1165
|
+
className: l,
|
|
1166
|
+
children: w,
|
|
1167
|
+
...C
|
|
1168
|
+
}, I) => {
|
|
1169
|
+
const { t: j } = de("ui"), { mode: v } = H(), p = v === "icon", b = ve(), x = ve(), P = U(null), [L, A] = Z(
|
|
1170
|
+
() => /* @__PURE__ */ new Set()
|
|
1171
|
+
), T = F((X, pe) => {
|
|
1172
|
+
A((z) => {
|
|
1173
|
+
if (z.has(X) === pe) return z;
|
|
1174
|
+
const V = new Set(z);
|
|
1175
|
+
return pe ? V.add(X) : V.delete(X), V;
|
|
1176
|
+
});
|
|
1177
|
+
}, []), _ = t && !p && !!e, [K, Y] = Z(i), k = d ?? K, R = U(k);
|
|
1178
|
+
R.current = k;
|
|
1179
|
+
const O = F(
|
|
1180
|
+
(X) => {
|
|
1181
|
+
d === void 0 && Y(X), a == null || a(X);
|
|
1182
|
+
},
|
|
1183
|
+
[d, a]
|
|
1184
|
+
), g = oe(Oe), M = ve(), G = U(null), W = ye(
|
|
1185
|
+
() => $e(I, G),
|
|
1186
|
+
[I]
|
|
1187
|
+
), q = t && !!e;
|
|
1188
|
+
xe(() => {
|
|
1189
|
+
if (!(!g || !q))
|
|
1190
|
+
return () => g.remove(M);
|
|
1191
|
+
}, [g, M, q]), xe(() => {
|
|
1192
|
+
!g || !q || g.set(M, {
|
|
1193
|
+
open: k,
|
|
1194
|
+
sectionId: n,
|
|
1195
|
+
controlled: d !== void 0,
|
|
1196
|
+
setOpen: O,
|
|
1197
|
+
setInner: Y,
|
|
1198
|
+
element: () => G.current
|
|
1199
|
+
});
|
|
1200
|
+
}, [g, M, q, k, n, d, O]);
|
|
1201
|
+
const { enabled: J, move: Q, registerSection: ee } = Te(), re = oe(es);
|
|
1202
|
+
ne(() => {
|
|
1203
|
+
J && n === void 0 && !re && bs() && console.warn(
|
|
1204
|
+
`SidebarSection "${e ?? ""}": moves are on but it has no sectionId, so its items cannot move.`
|
|
1205
|
+
);
|
|
1206
|
+
}, [J, n, re, e]), ne(() => {
|
|
1207
|
+
if (!(n === void 0 || !ee))
|
|
1208
|
+
return ee(n, () => {
|
|
1209
|
+
R.current || O(!0);
|
|
1210
|
+
});
|
|
1211
|
+
}, [n, ee, O]);
|
|
1212
|
+
const le = J && Q !== null && n !== void 0, o = le && Q.target.indicator.kind === "section" && Q.target.indicator.sectionId === n && !fe(Q.target, Q.origin), S = le && Q.emptySectionIds.includes(n) ? /* @__PURE__ */ r(
|
|
1213
|
+
"div",
|
|
1214
|
+
{
|
|
1215
|
+
"aria-hidden": "true",
|
|
1216
|
+
"data-sidebar-drop-zone": n,
|
|
1217
|
+
className: Je({ active: o })
|
|
1218
|
+
}
|
|
1219
|
+
) : null, E = n !== void 0 ? {
|
|
1220
|
+
"data-sidebar-section-id": n,
|
|
1221
|
+
"data-sidebar-section-label": e ?? "",
|
|
1222
|
+
"data-sidebar-section-open": String(!_ || k)
|
|
1223
|
+
} : {}, m = u && !p ? /* @__PURE__ */ r(
|
|
1224
|
+
"span",
|
|
1225
|
+
{
|
|
1226
|
+
role: "group",
|
|
1227
|
+
"aria-label": e ? j("navigation.sidebar.sectionActions", { section: e }) : void 0,
|
|
1228
|
+
className: st,
|
|
1229
|
+
children: u
|
|
1230
|
+
}
|
|
1231
|
+
) : null, f = _ && !k && L.size > 0, N = e && !p ? /* @__PURE__ */ r("p", { "data-sidebar-section-empty": "", className: tt, children: j(J && n !== void 0 ? "navigation.sidebar.section.emptyMove" : "navigation.sidebar.section.empty") }) : null, D = /* @__PURE__ */ r(Ye.Provider, { value: { sectionId: n }, children: /* @__PURE__ */ h(Qe.Provider, { value: T, children: [
|
|
1232
|
+
/* @__PURE__ */ r("div", { "data-sidebar-section-items": "", className: "ds:contents", children: w }),
|
|
1233
|
+
N,
|
|
1234
|
+
S
|
|
1235
|
+
] }) }), B = [
|
|
1236
|
+
"ds:flex ds:flex-col",
|
|
1237
|
+
"ds:gap-[var(--spacing-xs)]",
|
|
1238
|
+
"ds:mt-[var(--spacing-sm)]",
|
|
1239
|
+
rt,
|
|
1240
|
+
l ?? ""
|
|
1241
|
+
].filter(Boolean).join(" ");
|
|
1242
|
+
if (!_) {
|
|
1243
|
+
const X = !!e || !!s, pe = e ? { role: "group", "aria-labelledby": b } : {}, z = X ? /* @__PURE__ */ h(
|
|
1244
|
+
"span",
|
|
1245
|
+
{
|
|
1246
|
+
className: [
|
|
1247
|
+
"ds:flex ds:items-center",
|
|
1248
|
+
"type-eyebrow",
|
|
1249
|
+
"ds:text-[var(--muted-foreground)]",
|
|
1250
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
1251
|
+
"ds:py-[var(--spacing-xs)]",
|
|
1252
|
+
m ? "ds:min-w-0 ds:flex-1" : "",
|
|
1253
|
+
p && !s ? "ds:sr-only" : ""
|
|
1254
|
+
].filter(Boolean).join(" "),
|
|
1255
|
+
children: [
|
|
1256
|
+
s ? /* @__PURE__ */ r("span", { "aria-hidden": "true", className: Me, children: s }) : null,
|
|
1257
|
+
e ? /* @__PURE__ */ r("span", { id: b, className: p ? "ds:sr-only" : "", children: e }) : null
|
|
1258
|
+
]
|
|
1259
|
+
}
|
|
1260
|
+
) : null;
|
|
1261
|
+
return /* @__PURE__ */ h(
|
|
1262
|
+
"div",
|
|
1263
|
+
{
|
|
1264
|
+
ref: W,
|
|
1265
|
+
className: B,
|
|
1266
|
+
...pe,
|
|
1267
|
+
...E,
|
|
1268
|
+
...C,
|
|
1269
|
+
children: [
|
|
1270
|
+
m ? /* @__PURE__ */ h(
|
|
1271
|
+
"div",
|
|
1272
|
+
{
|
|
1273
|
+
"data-sidebar-section-heading": "",
|
|
1274
|
+
className: Be(),
|
|
1275
|
+
children: [
|
|
1276
|
+
z,
|
|
1277
|
+
m
|
|
1278
|
+
]
|
|
1279
|
+
}
|
|
1280
|
+
) : z,
|
|
1281
|
+
D
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
const se = "section", we = c === !1 ? "div" : `h${c}`;
|
|
1287
|
+
return /* @__PURE__ */ r(
|
|
1288
|
+
Ne.Root,
|
|
1289
|
+
{
|
|
1290
|
+
type: "single",
|
|
1291
|
+
collapsible: !0,
|
|
1292
|
+
value: k ? se : "",
|
|
1293
|
+
onValueChange: (X) => O(X === se),
|
|
1294
|
+
asChild: !0,
|
|
1295
|
+
children: /* @__PURE__ */ r(
|
|
1296
|
+
"div",
|
|
1297
|
+
{
|
|
1298
|
+
ref: W,
|
|
1299
|
+
className: B,
|
|
1300
|
+
...E,
|
|
1301
|
+
...C,
|
|
1302
|
+
children: /* @__PURE__ */ h(Ne.Item, { value: se, children: [
|
|
1303
|
+
/* @__PURE__ */ h(
|
|
1304
|
+
"div",
|
|
1305
|
+
{
|
|
1306
|
+
"data-sidebar-section-heading": "",
|
|
1307
|
+
className: Be({
|
|
1308
|
+
dropInto: o && !k
|
|
1309
|
+
}),
|
|
1310
|
+
children: [
|
|
1311
|
+
/* @__PURE__ */ r(at, { name: e ?? "", nameRef: P, children: /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ r(Ne.Header, { asChild: !0, children: /* @__PURE__ */ r(we, { className: "ds:flex ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ h(
|
|
1312
|
+
Ne.Trigger,
|
|
1313
|
+
{
|
|
1314
|
+
className: et,
|
|
1315
|
+
"data-holds-current": f ? "" : void 0,
|
|
1316
|
+
"aria-describedby": f ? x : void 0,
|
|
1317
|
+
children: [
|
|
1318
|
+
s ? /* @__PURE__ */ r(
|
|
1319
|
+
"span",
|
|
1320
|
+
{
|
|
1321
|
+
"aria-hidden": "true",
|
|
1322
|
+
className: Me,
|
|
1323
|
+
children: s
|
|
1324
|
+
}
|
|
1325
|
+
) : null,
|
|
1326
|
+
/* @__PURE__ */ r(
|
|
1327
|
+
"span",
|
|
1328
|
+
{
|
|
1329
|
+
ref: P,
|
|
1330
|
+
className: `ds:flex-1 ds:text-start ${ot}`,
|
|
1331
|
+
children: e
|
|
1332
|
+
}
|
|
1333
|
+
),
|
|
1334
|
+
f ? /* @__PURE__ */ r(
|
|
1335
|
+
"span",
|
|
1336
|
+
{
|
|
1337
|
+
"aria-hidden": "true",
|
|
1338
|
+
"data-sidebar-section-current": "",
|
|
1339
|
+
className: nt
|
|
1340
|
+
}
|
|
1341
|
+
) : null,
|
|
1342
|
+
/* @__PURE__ */ r(
|
|
1343
|
+
ze,
|
|
1344
|
+
{
|
|
1345
|
+
"aria-hidden": "true",
|
|
1346
|
+
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"
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
]
|
|
1350
|
+
}
|
|
1351
|
+
) }) }) }) }),
|
|
1352
|
+
m,
|
|
1353
|
+
f ? (
|
|
1354
|
+
// Hidden, yet still the fold button's description.
|
|
1355
|
+
/* @__PURE__ */ r("span", { id: x, hidden: !0, children: j("navigation.sidebar.section.containsCurrent") })
|
|
1356
|
+
) : null
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
),
|
|
1360
|
+
/* @__PURE__ */ r(
|
|
1361
|
+
ls,
|
|
1362
|
+
{
|
|
1363
|
+
role: "group",
|
|
1364
|
+
"aria-label": e,
|
|
1365
|
+
forceMount: !0,
|
|
1366
|
+
className: [
|
|
1367
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:[&>div]:contents",
|
|
1368
|
+
// Force-mounted content is never hidden by Radix: do it here.
|
|
1369
|
+
"ds:data-[state=closed]:hidden"
|
|
1370
|
+
].join(" "),
|
|
1371
|
+
children: D
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
] })
|
|
1375
|
+
}
|
|
1376
|
+
)
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
);
|
|
1381
|
+
ss.displayName = "SidebarSection";
|
|
1382
|
+
const it = [
|
|
1383
|
+
"ds:group ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
1384
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
1385
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
1386
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
1387
|
+
"ds:text-[var(--foreground)] ds:text-[var(--font-size-sm)]",
|
|
1388
|
+
"ds:font-[var(--font-weight-medium)]",
|
|
1389
|
+
"ds:hover:bg-[var(--muted)]/20",
|
|
1390
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1391
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1392
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
1393
|
+
].join(" "), dt = $(
|
|
1394
|
+
({
|
|
1395
|
+
label: e,
|
|
1396
|
+
icon: s,
|
|
1397
|
+
children: t,
|
|
1398
|
+
className: i,
|
|
1399
|
+
defaultOpen: d,
|
|
1400
|
+
open: a,
|
|
1401
|
+
onOpenChange: n,
|
|
1402
|
+
...u
|
|
1403
|
+
}, c) => {
|
|
1404
|
+
const { mode: l } = H();
|
|
1405
|
+
return /* @__PURE__ */ h(
|
|
1406
|
+
Ee.Root,
|
|
1407
|
+
{
|
|
1408
|
+
ref: c,
|
|
1409
|
+
defaultOpen: d,
|
|
1410
|
+
open: a,
|
|
1411
|
+
onOpenChange: n,
|
|
1412
|
+
className: i,
|
|
1413
|
+
...u,
|
|
1414
|
+
children: [
|
|
1415
|
+
/* @__PURE__ */ h(Ee.Trigger, { className: it, children: [
|
|
1416
|
+
s ? /* @__PURE__ */ r(
|
|
1417
|
+
"span",
|
|
1418
|
+
{
|
|
1419
|
+
"aria-hidden": "true",
|
|
1420
|
+
className: "ds:inline-flex ds:items-center ds:text-[var(--accent)]",
|
|
1421
|
+
children: s
|
|
1422
|
+
}
|
|
1423
|
+
) : null,
|
|
1424
|
+
/* @__PURE__ */ r(
|
|
1425
|
+
"span",
|
|
1426
|
+
{
|
|
1427
|
+
className: [
|
|
1428
|
+
"ds:flex-1 ds:text-start",
|
|
1429
|
+
l === "icon" ? "ds:sr-only" : ""
|
|
1430
|
+
].join(" "),
|
|
1431
|
+
children: e
|
|
1432
|
+
}
|
|
1433
|
+
),
|
|
1434
|
+
l !== "icon" ? /* @__PURE__ */ r(
|
|
1435
|
+
ze,
|
|
1436
|
+
{
|
|
1437
|
+
"aria-hidden": "true",
|
|
1438
|
+
className: "ds:size-4 ds:transition-transform ds:group-data-[state=open]:rotate-90 ds:rtl:-scale-x-100 ds:motion-reduce:transition-none"
|
|
1439
|
+
}
|
|
1440
|
+
) : null
|
|
1441
|
+
] }),
|
|
1442
|
+
/* @__PURE__ */ r(
|
|
1443
|
+
Ee.Content,
|
|
1444
|
+
{
|
|
1445
|
+
className: [
|
|
1446
|
+
"ds:overflow-hidden",
|
|
1447
|
+
"ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
|
|
1448
|
+
"ds:motion-reduce:animate-none",
|
|
1449
|
+
"ds:ps-[var(--spacing-md)]"
|
|
1450
|
+
].join(" "),
|
|
1451
|
+
children: t
|
|
1452
|
+
}
|
|
1453
|
+
)
|
|
1454
|
+
]
|
|
1455
|
+
}
|
|
1456
|
+
);
|
|
1457
|
+
}
|
|
1458
|
+
);
|
|
1459
|
+
dt.displayName = "SidebarGroup";
|
|
1460
|
+
const me = [
|
|
1461
|
+
"ds:z-[var(--z-tooltip)] ds:max-w-[16rem]",
|
|
1462
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
1463
|
+
"ds:bg-[var(--foreground)] ds:text-[var(--background)]",
|
|
1464
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)]",
|
|
1465
|
+
"ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
|
|
1466
|
+
].join(" "), lt = ae(
|
|
1467
|
+
[
|
|
1468
|
+
// Every row is a pin-hover parent so inline pin / reorder affordances can
|
|
1469
|
+
// fade in on hover of the whole row — keep `group/item` on this selector.
|
|
1470
|
+
// `!text-[var(--foreground)]` forces the label colour over the browser's
|
|
1471
|
+
// default `<a>` link colour (blue-violet) and any inherited hue. The
|
|
1472
|
+
// active variant also uses `!text-*` so it still wins when needed.
|
|
1473
|
+
"ds:group/item ds:relative ds:flex ds:items-center",
|
|
1474
|
+
"ds:gap-[var(--spacing-sm)]",
|
|
1475
|
+
"ds:no-underline ds:!text-[var(--foreground)] ds:text-[length:var(--font-size-sm)]",
|
|
1476
|
+
"ds:hover:bg-[var(--muted)]/12",
|
|
1477
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)]",
|
|
1478
|
+
"ds:motion-reduce:transition-none",
|
|
1479
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1480
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1481
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1482
|
+
].join(" "),
|
|
1483
|
+
{
|
|
1484
|
+
variants: {
|
|
1485
|
+
mode: {
|
|
1486
|
+
expanded: [
|
|
1487
|
+
"ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
|
|
1488
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]"
|
|
1489
|
+
].join(" "),
|
|
1490
|
+
// Icon-only: each item is a 44×44 pill tile centered in the rail.
|
|
1491
|
+
// The active / hover background fills just the tile rather than the
|
|
1492
|
+
// whole row — matching Linear / Asana chrome.
|
|
1493
|
+
icon: [
|
|
1494
|
+
"ds:justify-center ds:ms-auto ds:me-auto",
|
|
1495
|
+
"ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
|
|
1496
|
+
"ds:ps-0 ds:pe-0 ds:rounded-[var(--radius-md)]"
|
|
1497
|
+
].join(" "),
|
|
1498
|
+
overlay: [
|
|
1499
|
+
"ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
|
|
1500
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]"
|
|
1501
|
+
].join(" ")
|
|
1502
|
+
},
|
|
1503
|
+
density: {
|
|
1504
|
+
default: "",
|
|
1505
|
+
compact: "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
|
|
1506
|
+
},
|
|
1507
|
+
isActive: {
|
|
1508
|
+
// Filled pill — multi-carrier (bg + text + weight + aria-current at
|
|
1509
|
+
// render time) so colour is never the sole identifier. `!text-*`
|
|
1510
|
+
// forces the foreground over any inherited / base rule so the icon
|
|
1511
|
+
// and label read clearly against the primary fill in every theme.
|
|
1512
|
+
true: [
|
|
1513
|
+
"ds:bg-[var(--primary)] ds:!text-[var(--primary-foreground)]",
|
|
1514
|
+
"ds:font-[var(--font-weight-semibold)]",
|
|
1515
|
+
// Keep hover from dimming the active fill.
|
|
1516
|
+
"ds:hover:bg-[var(--primary)]"
|
|
1517
|
+
].join(" "),
|
|
1518
|
+
false: ""
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
defaultVariants: {
|
|
1522
|
+
mode: "expanded",
|
|
1523
|
+
density: "default",
|
|
1524
|
+
isActive: !1
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
), Fe = [
|
|
1528
|
+
"ds:before:pointer-events-none ds:before:absolute ds:before:start-0 ds:before:end-0",
|
|
1529
|
+
"ds:before:h-[length:var(--focus-ring-width)] ds:before:content-['']",
|
|
1530
|
+
"ds:before:rounded-[var(--radius-full)] ds:before:bg-[var(--primary)]",
|
|
1531
|
+
"ds:forced-colors:before:bg-[CanvasText]"
|
|
1532
|
+
].join(" "), ct = ae("", {
|
|
1533
|
+
variants: {
|
|
1534
|
+
movable: {
|
|
1535
|
+
true: "ds:select-none ds:[-webkit-touch-callout:none]",
|
|
1536
|
+
false: ""
|
|
1537
|
+
},
|
|
1538
|
+
moving: { true: "ds:opacity-60", false: "" },
|
|
1539
|
+
drop: {
|
|
1540
|
+
before: `${Fe} ds:before:top-[calc(var(--spacing-xs)/-2)] ds:before:-translate-y-1/2`,
|
|
1541
|
+
after: `${Fe} ds:before:bottom-[calc(var(--spacing-xs)/-2)] ds:before:translate-y-1/2`,
|
|
1542
|
+
none: ""
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
defaultVariants: { movable: !1, moving: !1, drop: "none" }
|
|
1546
|
+
}), ts = ie(null), rs = $(
|
|
1547
|
+
({
|
|
1548
|
+
asChild: e = !1,
|
|
1549
|
+
isActive: s = !1,
|
|
1550
|
+
navId: t,
|
|
1551
|
+
isPinned: i = !1,
|
|
1552
|
+
onPinChange: d,
|
|
1553
|
+
pinLabel: a,
|
|
1554
|
+
className: n,
|
|
1555
|
+
children: u,
|
|
1556
|
+
"aria-label": c,
|
|
1557
|
+
"aria-describedby": l,
|
|
1558
|
+
onKeyDown: w,
|
|
1559
|
+
onPointerDown: C,
|
|
1560
|
+
onBlur: I,
|
|
1561
|
+
...j
|
|
1562
|
+
}, v) => {
|
|
1563
|
+
const { mode: p, density: b, quietFocusRef: x, navElementId: P } = H(), L = e ? Ue : "a", A = d !== void 0 && p !== "icon", T = Te(), _ = oe(Ye), K = oe(Qe), Y = ve(), k = s || j["aria-current"] === "page";
|
|
1564
|
+
ne(() => {
|
|
1565
|
+
if (K)
|
|
1566
|
+
return K(Y, k), () => K(Y, !1);
|
|
1567
|
+
}, [K, Y, k]);
|
|
1568
|
+
const R = T.enabled && p !== "icon" && t !== void 0 && (_ === null || _.sectionId !== void 0) ? t : void 0, O = T.move, g = O && !fe(O.target, O.origin) ? O.target : null, M = R !== void 0 && (g == null ? void 0 : g.indicator.kind) === "item" && g.indicator.itemId === R ? g.indicator.edge : "none", G = R !== void 0 ? {
|
|
1569
|
+
"data-sidebar-item-id": R,
|
|
1570
|
+
"data-moving": (O == null ? void 0 : O.itemId) === R ? "" : void 0,
|
|
1571
|
+
// A link would otherwise start the browser's own link drag.
|
|
1572
|
+
draggable: !1,
|
|
1573
|
+
"aria-describedby": [l, T.instructionsId].filter(Boolean).join(" "),
|
|
1574
|
+
// An image inside the item would start its own native drag.
|
|
1575
|
+
onDragStart: (f) => f.preventDefault(),
|
|
1576
|
+
onKeyDown: (f) => {
|
|
1577
|
+
var D, B;
|
|
1578
|
+
w == null || w(f);
|
|
1579
|
+
const N = f.key === "Escape" && ((D = T.move) == null ? void 0 : D.itemId) === R;
|
|
1580
|
+
(!f.defaultPrevented || N) && ((B = T.onItemKeyDown) == null || B.call(T, f, R));
|
|
1581
|
+
},
|
|
1582
|
+
onPointerDown: (f) => {
|
|
1583
|
+
var N;
|
|
1584
|
+
C == null || C(f), (N = T.onItemPointerDown) == null || N.call(T, f, R);
|
|
1585
|
+
},
|
|
1586
|
+
onBlur: (f) => {
|
|
1587
|
+
var N;
|
|
1588
|
+
I == null || I(f), (N = T.onItemBlur) == null || N.call(T, R);
|
|
1589
|
+
}
|
|
1590
|
+
} : {
|
|
1591
|
+
// Keys left out when unset: an undefined one would override the
|
|
1592
|
+
// tooltip's own description through Slot.
|
|
1593
|
+
...l !== void 0 ? { "aria-describedby": l } : {},
|
|
1594
|
+
...w ? { onKeyDown: w } : {},
|
|
1595
|
+
...C ? { onPointerDown: C } : {},
|
|
1596
|
+
...I ? { onBlur: I } : {}
|
|
1597
|
+
}, W = ct({
|
|
1598
|
+
movable: R !== void 0,
|
|
1599
|
+
moving: O !== null && O.itemId === R,
|
|
1600
|
+
drop: M
|
|
1601
|
+
}), [q, J] = Z(null), Q = p === "icon" && c != null && q ? `${c}, ${q}` : c, ee = /* @__PURE__ */ r(
|
|
1602
|
+
L,
|
|
1603
|
+
{
|
|
1604
|
+
ref: v,
|
|
1605
|
+
"aria-current": s ? "page" : void 0,
|
|
1606
|
+
"aria-label": Q,
|
|
1607
|
+
"data-nav-id": t,
|
|
1608
|
+
"data-sidebar-item": A ? void 0 : "",
|
|
1609
|
+
className: lt({
|
|
1610
|
+
mode: p,
|
|
1611
|
+
density: b,
|
|
1612
|
+
isActive: s,
|
|
1613
|
+
className: [A ? "ds:flex-1 ds:min-w-0" : n, W].filter(Boolean).join(" ")
|
|
1614
|
+
}),
|
|
1615
|
+
...G,
|
|
1616
|
+
...j,
|
|
1617
|
+
children: u
|
|
1618
|
+
}
|
|
1619
|
+
), re = A ? /* @__PURE__ */ h(
|
|
1620
|
+
"div",
|
|
1621
|
+
{
|
|
1622
|
+
"data-sidebar-item": "",
|
|
1623
|
+
className: [
|
|
1624
|
+
"ds:group/item ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1625
|
+
n ?? ""
|
|
1626
|
+
].filter(Boolean).join(" "),
|
|
1627
|
+
children: [
|
|
1628
|
+
ee,
|
|
1629
|
+
/* @__PURE__ */ r(
|
|
1630
|
+
Pe,
|
|
1631
|
+
{
|
|
1632
|
+
isPinned: i,
|
|
1633
|
+
label: a ?? c ?? "",
|
|
1634
|
+
onPinChange: d
|
|
1635
|
+
}
|
|
1636
|
+
)
|
|
1637
|
+
]
|
|
1638
|
+
}
|
|
1639
|
+
) : ee, le = U(null), [o, S] = Z(), E = (f) => {
|
|
1640
|
+
var B, se;
|
|
1641
|
+
const N = (B = le.current) == null ? void 0 : B.querySelector(
|
|
1642
|
+
"[data-sidebar-item-label]"
|
|
1643
|
+
);
|
|
1644
|
+
if (!(N != null && N.scrollWidth > N.clientWidth) || x != null && x.current || T.move !== null) {
|
|
1645
|
+
f.preventDefault();
|
|
1646
|
+
return;
|
|
1647
|
+
}
|
|
1648
|
+
S(((se = N.textContent) == null ? void 0 : se.trim()) || void 0);
|
|
1649
|
+
}, m = p !== "icon" && P !== void 0 ? /* @__PURE__ */ h(y.Root, { children: [
|
|
1650
|
+
/* @__PURE__ */ r(
|
|
1651
|
+
y.Trigger,
|
|
1652
|
+
{
|
|
1653
|
+
asChild: !0,
|
|
1654
|
+
ref: le,
|
|
1655
|
+
onPointerMove: E,
|
|
1656
|
+
onFocus: E,
|
|
1657
|
+
children: re
|
|
1658
|
+
}
|
|
1659
|
+
),
|
|
1660
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
1661
|
+
y.Content,
|
|
1662
|
+
{
|
|
1663
|
+
side: "right",
|
|
1664
|
+
sideOffset: 6,
|
|
1665
|
+
className: me,
|
|
1666
|
+
children: [
|
|
1667
|
+
c ?? o,
|
|
1668
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
) })
|
|
1672
|
+
] }) : p === "icon" && c ? /* @__PURE__ */ h(y.Root, { children: [
|
|
1673
|
+
/* @__PURE__ */ r(y.Trigger, { asChild: !0, children: re }),
|
|
1674
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
1675
|
+
y.Content,
|
|
1676
|
+
{
|
|
1677
|
+
side: "right",
|
|
1678
|
+
sideOffset: 6,
|
|
1679
|
+
className: me,
|
|
1680
|
+
children: [
|
|
1681
|
+
c,
|
|
1682
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1683
|
+
]
|
|
1684
|
+
}
|
|
1685
|
+
) })
|
|
1686
|
+
] }) : re;
|
|
1687
|
+
return /* @__PURE__ */ r(ts.Provider, { value: J, children: m });
|
|
1688
|
+
}
|
|
1689
|
+
);
|
|
1690
|
+
rs.displayName = "SidebarItem";
|
|
1691
|
+
const ut = $(({ className: e, children: s, ...t }, i) => /* @__PURE__ */ r(
|
|
1692
|
+
"span",
|
|
1693
|
+
{
|
|
1694
|
+
ref: i,
|
|
1695
|
+
"aria-hidden": "true",
|
|
1696
|
+
className: [
|
|
1697
|
+
"ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
|
|
1698
|
+
"ds:size-5",
|
|
1699
|
+
// Icons carry the accent tint by default so the rail reads less
|
|
1700
|
+
// monotone against the violet active pill. The active row sets
|
|
1701
|
+
// `aria-current="page"` on the anchor (which is `group/item`), so
|
|
1702
|
+
// the icon flips to the primary-foreground (white) on the filled
|
|
1703
|
+
// pill — keeping it readable on the primary background.
|
|
1704
|
+
"ds:text-[var(--accent)]",
|
|
1705
|
+
"ds:group-aria-[current=page]/item:text-[var(--primary-foreground)]",
|
|
1706
|
+
e ?? ""
|
|
1707
|
+
].filter(Boolean).join(" "),
|
|
1708
|
+
...t,
|
|
1709
|
+
children: s
|
|
1710
|
+
}
|
|
1711
|
+
));
|
|
1712
|
+
ut.displayName = "SidebarItemIcon";
|
|
1713
|
+
const ft = $(({ className: e, children: s, ...t }, i) => {
|
|
1714
|
+
const { mode: d } = H();
|
|
1715
|
+
return /* @__PURE__ */ r(
|
|
1716
|
+
"span",
|
|
1717
|
+
{
|
|
1718
|
+
ref: i,
|
|
1719
|
+
"data-sidebar-item-label": "",
|
|
1720
|
+
className: [
|
|
1721
|
+
"ds:flex-1",
|
|
1722
|
+
"ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap ds:break-normal",
|
|
1723
|
+
"ds:text-start",
|
|
1724
|
+
d === "icon" ? "ds:sr-only" : "",
|
|
1725
|
+
e ?? ""
|
|
1726
|
+
].filter(Boolean).join(" "),
|
|
1727
|
+
...t,
|
|
1728
|
+
children: s
|
|
1729
|
+
}
|
|
1730
|
+
);
|
|
1731
|
+
});
|
|
1732
|
+
ft.displayName = "SidebarItemLabel";
|
|
1733
|
+
const mt = $(({ className: e, children: s, ...t }, i) => {
|
|
1734
|
+
const { mode: d } = H(), a = d === "icon", n = oe(ts);
|
|
1735
|
+
return ne(() => {
|
|
1736
|
+
if (!n || !a) return;
|
|
1737
|
+
const u = s == null || s === !1 ? null : String(s).trim() || null;
|
|
1738
|
+
return n(u), () => n(null);
|
|
1739
|
+
}, [n, s, a]), /* @__PURE__ */ r(
|
|
1740
|
+
"span",
|
|
1741
|
+
{
|
|
1742
|
+
ref: i,
|
|
1743
|
+
"aria-hidden": a ? "true" : void 0,
|
|
1744
|
+
className: [
|
|
1745
|
+
"ds:inline-flex ds:items-center ds:justify-center",
|
|
1746
|
+
"ds:font-[var(--font-weight-semibold)]",
|
|
1747
|
+
a ? [
|
|
1748
|
+
"ds:absolute ds:top-[2px] ds:end-[2px]",
|
|
1749
|
+
"ds:min-w-0 ds:size-[10px] ds:ps-0 ds:pe-0",
|
|
1750
|
+
"ds:rounded-[var(--radius-full)]",
|
|
1751
|
+
"ds:bg-[var(--primary)] ds:text-transparent",
|
|
1752
|
+
"ds:ring-2 ds:ring-[var(--background)]",
|
|
1753
|
+
"ds:pointer-events-none"
|
|
1754
|
+
].join(" ") : [
|
|
1755
|
+
"ds:min-w-[var(--spacing-lg)] ds:h-[var(--spacing-lg)]",
|
|
1756
|
+
"ds:rounded-[var(--radius-full)]",
|
|
1757
|
+
"ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
|
|
1758
|
+
"ds:text-[length:var(--font-size-xs)]",
|
|
1759
|
+
"ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
|
|
1760
|
+
].join(" "),
|
|
1761
|
+
e ?? ""
|
|
1762
|
+
].filter(Boolean).join(" "),
|
|
1763
|
+
...t,
|
|
1764
|
+
children: s
|
|
1765
|
+
}
|
|
1766
|
+
);
|
|
1767
|
+
});
|
|
1768
|
+
mt.displayName = "SidebarItemBadge";
|
|
1769
|
+
const pt = ae(
|
|
1770
|
+
[
|
|
1771
|
+
"ds:flex ds:items-center",
|
|
1772
|
+
"ds:text-[var(--foreground)]",
|
|
1773
|
+
"ds:transition-colors ds:motion-reduce:transition-none",
|
|
1774
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1775
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1776
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1777
|
+
"ds:no-underline"
|
|
1778
|
+
].join(" "),
|
|
1779
|
+
{
|
|
1780
|
+
variants: {
|
|
1781
|
+
variant: {
|
|
1782
|
+
// Borderless (Linear / Notion style): transparent at rest with a
|
|
1783
|
+
// muted hover fill, a 44px tap target, roomier radius, and the dense
|
|
1784
|
+
// `--font-size-sm` label. The historical default.
|
|
1785
|
+
ghost: [
|
|
1786
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
1787
|
+
"ds:gap-[var(--spacing-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
1788
|
+
"ds:text-[length:var(--font-size-sm)]",
|
|
1789
|
+
"ds:rounded-[var(--radius-md)]",
|
|
1790
|
+
"ds:hover:bg-[var(--muted)]/20"
|
|
1791
|
+
].join(" "),
|
|
1792
|
+
// Input-field look: consumes the SAME shared input-surface tokens as
|
|
1793
|
+
// <TextInput size="sm"> — height, text size and horizontal inset — so
|
|
1794
|
+
// a practice / workspace selector stacked directly above the sidebar
|
|
1795
|
+
// <SearchBar size="sm"> renders as a genuinely matched pair (identical
|
|
1796
|
+
// 32px box and label size) and stays in lockstep if that surface
|
|
1797
|
+
// evolves. `gap-3` + the shared `ps-3` line the pin glyph and label up
|
|
1798
|
+
// with the search input's icon and text below. The 3:1
|
|
1799
|
+
// `--control-border` edge and the `--input`/`--shadow-input`/
|
|
1800
|
+
// `--radius-sm` chrome mirror the input's resting surface; opaque
|
|
1801
|
+
// hover keeps the fill solid over a brand-tinted parent. 32px clears
|
|
1802
|
+
// WCAG 2.5.8 (24px AA).
|
|
1803
|
+
field: [
|
|
1804
|
+
ps.sm,
|
|
1805
|
+
vs.sm,
|
|
1806
|
+
gs.sm,
|
|
1807
|
+
"ds:gap-3",
|
|
1808
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
1809
|
+
"ds:border ds:border-[color:var(--control-border)] ds:bg-[var(--input)]",
|
|
1810
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
1811
|
+
"ds:hover:bg-[color-mix(in_srgb,var(--muted)_20%,var(--input))]"
|
|
1812
|
+
].join(" ")
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
defaultVariants: { variant: "ghost" }
|
|
1816
|
+
}
|
|
1817
|
+
), vt = $(
|
|
1818
|
+
({ logo: e, name: s, showChevron: t = !0, variant: i = "ghost", className: d, ...a }, n) => {
|
|
1819
|
+
const { mode: u } = H(), c = u !== "icon";
|
|
1820
|
+
return /* @__PURE__ */ h(
|
|
1821
|
+
"button",
|
|
1822
|
+
{
|
|
1823
|
+
ref: n,
|
|
1824
|
+
type: "button",
|
|
1825
|
+
"aria-label": s,
|
|
1826
|
+
className: [pt({ variant: i }), d].filter(Boolean).join(" "),
|
|
1827
|
+
...a,
|
|
1828
|
+
children: [
|
|
1829
|
+
/* @__PURE__ */ r(
|
|
1830
|
+
"span",
|
|
1831
|
+
{
|
|
1832
|
+
"aria-hidden": "true",
|
|
1833
|
+
className: "ds:inline-flex ds:items-center ds:shrink-0",
|
|
1834
|
+
children: e
|
|
1835
|
+
}
|
|
1836
|
+
),
|
|
1837
|
+
c ? /* @__PURE__ */ h(Ie, { children: [
|
|
1838
|
+
/* @__PURE__ */ r("span", { className: "ds:truncate ds:flex-1 ds:text-start ds:max-w-[var(--header-workspace-max-inline-size)]", children: s }),
|
|
1839
|
+
t ? /* @__PURE__ */ r(
|
|
1840
|
+
ze,
|
|
1841
|
+
{
|
|
1842
|
+
"aria-hidden": "true",
|
|
1843
|
+
className: "ds:size-4 ds:shrink-0 ds:rotate-90"
|
|
1844
|
+
}
|
|
1845
|
+
) : null
|
|
1846
|
+
] }) : null
|
|
1847
|
+
]
|
|
1848
|
+
}
|
|
1849
|
+
);
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
vt.displayName = "SidebarWorkspaceSwitcher";
|
|
1853
|
+
const ns = [
|
|
1854
|
+
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
1855
|
+
"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
|
|
1856
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
1857
|
+
"ds:text-[var(--muted-foreground)]",
|
|
1858
|
+
"ds:hover:bg-[var(--muted)]/20 ds:hover:text-[var(--foreground)]",
|
|
1859
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1860
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1861
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1862
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
1863
|
+
].join(" ");
|
|
1864
|
+
function os({
|
|
1865
|
+
asChild: e,
|
|
1866
|
+
disabled: s,
|
|
1867
|
+
children: t,
|
|
1868
|
+
onClickCapture: i,
|
|
1869
|
+
onAuxClickCapture: d
|
|
1870
|
+
}) {
|
|
1871
|
+
const a = e && s, n = a && ds(t) ? t.props : {}, u = (l) => {
|
|
1872
|
+
s && (l.preventDefault(), l.stopPropagation());
|
|
1873
|
+
};
|
|
1874
|
+
return {
|
|
1875
|
+
Comp: a ? "a" : e ? Ue : "button",
|
|
1876
|
+
props: {
|
|
1877
|
+
...a ? { role: "link", tabIndex: 0 } : e ? {} : { type: "button" },
|
|
1878
|
+
...Object.fromEntries(
|
|
1879
|
+
Object.entries(n).filter(([l]) => l.startsWith("data-"))
|
|
1880
|
+
),
|
|
1881
|
+
"aria-disabled": s ? !0 : void 0,
|
|
1882
|
+
// Disabled: block first, so no host handler can run the action.
|
|
1883
|
+
onClickCapture: (l) => {
|
|
1884
|
+
if (s) return u(l);
|
|
1885
|
+
i == null || i(l);
|
|
1886
|
+
},
|
|
1887
|
+
onAuxClickCapture: (l) => {
|
|
1888
|
+
if (s) return u(l);
|
|
1889
|
+
d == null || d(l);
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
hostClassName: typeof n.className == "string" ? n.className : "",
|
|
1893
|
+
// Separate children, not one fragment: Slot moves the kit's icon and
|
|
1894
|
+
// label into the host's link around its own children.
|
|
1895
|
+
slot: e && !s ? /* @__PURE__ */ r(us, { children: t }) : null
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
const gt = ae(
|
|
1899
|
+
[
|
|
1900
|
+
"ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
1901
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
1902
|
+
"ds:rounded-[var(--radius-md)]",
|
|
1903
|
+
"ds:bg-[var(--primary)] ds:!text-[var(--primary-foreground)] ds:no-underline",
|
|
1904
|
+
"ds:font-[var(--font-weight-semibold)] ds:text-[length:var(--font-size-sm)]",
|
|
1905
|
+
"ds:hover:bg-[var(--primary-hover)]",
|
|
1906
|
+
"ds:transition-colors ds:motion-reduce:transition-none",
|
|
1907
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1908
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1909
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
1910
|
+
// Disabled: the fill and contents fade, not the element, so its focus
|
|
1911
|
+
// ring keeps full contrast. No hover; still focusable.
|
|
1912
|
+
"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",
|
|
1913
|
+
"ds:forced-colors:aria-disabled:!text-[GrayText]",
|
|
1914
|
+
// The current page: an inner ring (a border in forced colours, which drop
|
|
1915
|
+
// shadows) and an underlined label when shown.
|
|
1916
|
+
"ds:aria-[current=page]:shadow-[inset_0_0_0_var(--border-width-md)_var(--primary-foreground)]",
|
|
1917
|
+
"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]",
|
|
1918
|
+
"ds:aria-[current=page]:[&_[data-sidebar-primary-label]]:underline ds:aria-[current=page]:[&_[data-sidebar-primary-label]]:underline-offset-[var(--spacing-xs)]"
|
|
1919
|
+
].join(" "),
|
|
1920
|
+
{
|
|
1921
|
+
variants: {
|
|
1922
|
+
mode: {
|
|
1923
|
+
expanded: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
1924
|
+
// A full target-size tile, like the rail's items: 44px, 48px in the
|
|
1925
|
+
// accessible themes.
|
|
1926
|
+
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",
|
|
1927
|
+
overlay: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
defaultVariants: { mode: "expanded" }
|
|
1931
|
+
}
|
|
1932
|
+
), bt = $(
|
|
1933
|
+
({
|
|
1934
|
+
icon: e,
|
|
1935
|
+
label: s,
|
|
1936
|
+
shortcut: t,
|
|
1937
|
+
asChild: i = !1,
|
|
1938
|
+
isActive: d = !1,
|
|
1939
|
+
disabled: a = !1,
|
|
1940
|
+
className: n,
|
|
1941
|
+
children: u,
|
|
1942
|
+
onClickCapture: c,
|
|
1943
|
+
onAuxClickCapture: l,
|
|
1944
|
+
...w
|
|
1945
|
+
}, C) => {
|
|
1946
|
+
const { mode: I } = H(), j = I !== "icon", v = os({
|
|
1947
|
+
asChild: i,
|
|
1948
|
+
disabled: a,
|
|
1949
|
+
children: u,
|
|
1950
|
+
onClickCapture: c,
|
|
1951
|
+
onAuxClickCapture: l
|
|
1952
|
+
}), { Comp: p } = v, b = /* @__PURE__ */ r(
|
|
1953
|
+
"span",
|
|
1954
|
+
{
|
|
1955
|
+
"aria-hidden": "true",
|
|
1956
|
+
className: "ds:inline-flex ds:size-4 ds:items-center ds:justify-center",
|
|
1957
|
+
children: e
|
|
1958
|
+
}
|
|
1959
|
+
), x = j ? /* @__PURE__ */ h(Ie, { children: [
|
|
1960
|
+
/* @__PURE__ */ r("span", { "data-sidebar-primary-label": "", className: "ds:truncate", children: s }),
|
|
1961
|
+
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
|
|
1962
|
+
] }) : null, P = /* @__PURE__ */ h(
|
|
1963
|
+
p,
|
|
1964
|
+
{
|
|
1965
|
+
ref: C,
|
|
1966
|
+
...v.props,
|
|
1967
|
+
"aria-label": s,
|
|
1968
|
+
"aria-keyshortcuts": a ? void 0 : Ke(t),
|
|
1969
|
+
"aria-current": d ? "page" : void 0,
|
|
1970
|
+
className: [
|
|
1971
|
+
gt({ mode: I }),
|
|
1972
|
+
v.hostClassName,
|
|
1973
|
+
n
|
|
1974
|
+
].filter(Boolean).join(" "),
|
|
1975
|
+
...w,
|
|
1976
|
+
children: [
|
|
1977
|
+
b,
|
|
1978
|
+
v.slot,
|
|
1979
|
+
x
|
|
1980
|
+
]
|
|
1981
|
+
}
|
|
1982
|
+
);
|
|
1983
|
+
return j ? P : /* @__PURE__ */ h(y.Root, { children: [
|
|
1984
|
+
/* @__PURE__ */ r(y.Trigger, { asChild: !0, children: P }),
|
|
1985
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
1986
|
+
y.Content,
|
|
1987
|
+
{
|
|
1988
|
+
side: "right",
|
|
1989
|
+
sideOffset: 6,
|
|
1990
|
+
className: me,
|
|
1991
|
+
children: [
|
|
1992
|
+
s,
|
|
1993
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1994
|
+
]
|
|
1995
|
+
}
|
|
1996
|
+
) })
|
|
1997
|
+
] });
|
|
1998
|
+
}
|
|
1999
|
+
);
|
|
2000
|
+
bt.displayName = "SidebarPrimaryAction";
|
|
2001
|
+
const ht = [
|
|
2002
|
+
ns,
|
|
2003
|
+
"ds:relative ds:no-underline",
|
|
2004
|
+
// Disabled: the icon fades, not the focus ring; no hover; still focusable.
|
|
2005
|
+
"ds:aria-disabled:cursor-not-allowed ds:aria-disabled:[&>*]:opacity-50",
|
|
2006
|
+
"ds:aria-disabled:hover:bg-transparent ds:aria-disabled:hover:text-[var(--muted-foreground)]",
|
|
2007
|
+
"ds:forced-colors:aria-disabled:!text-[GrayText]",
|
|
2008
|
+
// The current page: an inner ring (a border in forced colours, which drop
|
|
2009
|
+
// shadows) and full-strength ink.
|
|
2010
|
+
"ds:aria-[current=page]:text-[var(--foreground)] ds:aria-[current=page]:shadow-[inset_0_0_0_var(--border-width-md)_var(--primary)]",
|
|
2011
|
+
"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]"
|
|
2012
|
+
].join(" "), as = $(
|
|
2013
|
+
({
|
|
2014
|
+
icon: e,
|
|
2015
|
+
label: s,
|
|
2016
|
+
shortcut: t,
|
|
2017
|
+
asChild: i = !1,
|
|
2018
|
+
isActive: d = !1,
|
|
2019
|
+
disabled: a = !1,
|
|
2020
|
+
className: n,
|
|
2021
|
+
children: u,
|
|
2022
|
+
onClickCapture: c,
|
|
2023
|
+
onAuxClickCapture: l,
|
|
2024
|
+
...w
|
|
2025
|
+
}, C) => {
|
|
2026
|
+
const { mode: I, navElementId: j, quietFocusRef: v } = H(), p = os({
|
|
2027
|
+
asChild: i,
|
|
2028
|
+
disabled: a,
|
|
2029
|
+
children: u,
|
|
2030
|
+
onClickCapture: c,
|
|
2031
|
+
onAuxClickCapture: l
|
|
2032
|
+
}), { Comp: b } = p, x = /* @__PURE__ */ h(y.Root, { children: [
|
|
2033
|
+
/* @__PURE__ */ r(
|
|
2034
|
+
y.Trigger,
|
|
2035
|
+
{
|
|
2036
|
+
asChild: !0,
|
|
2037
|
+
onFocus: (P) => {
|
|
2038
|
+
v != null && v.current && P.preventDefault();
|
|
2039
|
+
},
|
|
2040
|
+
children: /* @__PURE__ */ h(
|
|
2041
|
+
b,
|
|
2042
|
+
{
|
|
2043
|
+
ref: C,
|
|
2044
|
+
"data-component": "sidebar-header-action",
|
|
2045
|
+
...p.props,
|
|
2046
|
+
"aria-label": s,
|
|
2047
|
+
"aria-keyshortcuts": a ? void 0 : Ke(t),
|
|
2048
|
+
"aria-current": d ? "page" : void 0,
|
|
2049
|
+
className: [ht, p.hostClassName, n].filter(Boolean).join(" "),
|
|
2050
|
+
...w,
|
|
2051
|
+
children: [
|
|
2052
|
+
/* @__PURE__ */ r(
|
|
2053
|
+
"span",
|
|
2054
|
+
{
|
|
2055
|
+
"aria-hidden": "true",
|
|
2056
|
+
className: "ds:inline-flex ds:size-4 ds:items-center ds:justify-center",
|
|
2057
|
+
children: e
|
|
2058
|
+
}
|
|
2059
|
+
),
|
|
2060
|
+
p.slot
|
|
2061
|
+
]
|
|
2062
|
+
}
|
|
2063
|
+
)
|
|
2064
|
+
}
|
|
2065
|
+
),
|
|
2066
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
2067
|
+
y.Content,
|
|
2068
|
+
{
|
|
2069
|
+
side: I === "icon" ? "right" : "bottom",
|
|
2070
|
+
sideOffset: 6,
|
|
2071
|
+
className: me,
|
|
2072
|
+
children: [
|
|
2073
|
+
s,
|
|
2074
|
+
t ? ` (${t})` : null,
|
|
2075
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
2076
|
+
]
|
|
2077
|
+
}
|
|
2078
|
+
) })
|
|
2079
|
+
] });
|
|
2080
|
+
return j !== void 0 ? x : /* @__PURE__ */ r(y.Provider, { delayDuration: 300, children: x });
|
|
2081
|
+
}
|
|
2082
|
+
);
|
|
2083
|
+
as.displayName = "SidebarHeaderAction";
|
|
2084
|
+
const yt = $(({ onClick: e, disabled: s = !1, ...t }, i) => {
|
|
2085
|
+
const { t: d } = de("ui"), { mode: a } = H(), n = oe(Oe), [{ total: u, open: c }, l] = Z(
|
|
2086
|
+
() => (n == null ? void 0 : n.getSnapshot()) ?? Hs
|
|
2087
|
+
);
|
|
2088
|
+
if (xe(() => {
|
|
2089
|
+
if (n)
|
|
2090
|
+
return l(n.getSnapshot()), n.subscribe(() => l(n.getSnapshot()));
|
|
2091
|
+
}, [n]), !n || u === 0) return null;
|
|
2092
|
+
const w = c > 0;
|
|
2093
|
+
return /* @__PURE__ */ r(
|
|
2094
|
+
as,
|
|
2095
|
+
{
|
|
2096
|
+
ref: i,
|
|
2097
|
+
icon: w ? /* @__PURE__ */ r(Ss, { "aria-hidden": "true", className: "ds:size-4" }) : /* @__PURE__ */ r(Is, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
2098
|
+
label: d(
|
|
2099
|
+
w ? "navigation.sidebar.collapseAllSections" : "navigation.sidebar.expandAllSections"
|
|
2100
|
+
),
|
|
2101
|
+
"aria-expanded": w,
|
|
2102
|
+
"data-sidebar-sections-toggle": "",
|
|
2103
|
+
disabled: a === "icon" || s,
|
|
2104
|
+
onClick: (C) => {
|
|
2105
|
+
e == null || e(C), C.defaultPrevented || n.setAll(!w);
|
|
2106
|
+
},
|
|
2107
|
+
...t
|
|
2108
|
+
}
|
|
2109
|
+
);
|
|
2110
|
+
});
|
|
2111
|
+
yt.displayName = "SidebarSectionsToggle";
|
|
2112
|
+
const xt = [
|
|
2113
|
+
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
2114
|
+
"ds:size-6 ds:rounded-[var(--radius-sm)]",
|
|
2115
|
+
// Lift above the Sidebar's opt-in resize handle (z-[2]). When `resizable`,
|
|
2116
|
+
// that handle's ::before hit-area reaches ~--min-target-size/2 inward from
|
|
2117
|
+
// the inline-end edge — exactly where these end-aligned pin stars sit — so
|
|
2118
|
+
// without a higher stacking order the separator swallows the click and
|
|
2119
|
+
// pinning silently fails. Pointer-events stay off until the row is hovered
|
|
2120
|
+
// or the star is focused, so the handle is still fully grabbable at rest
|
|
2121
|
+
// (including touch, where the star never reveals). On a NON-resizable
|
|
2122
|
+
// sidebar there's no handle to clear, but the same gating is inert — the
|
|
2123
|
+
// star reveals and accepts clicks on hover/focus exactly as before.
|
|
2124
|
+
"ds:relative ds:z-[3]",
|
|
2125
|
+
"ds:pointer-events-none ds:group-hover/item:pointer-events-auto ds:focus-visible:pointer-events-auto",
|
|
2126
|
+
// Pin stars carry the accent tint to match every other icon in the rail.
|
|
2127
|
+
// Stays quiet via opacity — reveals only on row hover / focus.
|
|
2128
|
+
"ds:text-[var(--accent)]",
|
|
2129
|
+
"ds:opacity-0 ds:group-hover/item:opacity-100 ds:focus-visible:opacity-100",
|
|
2130
|
+
"ds:hover:bg-[var(--muted)]/20",
|
|
2131
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2132
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2133
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
2134
|
+
"ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)]",
|
|
2135
|
+
"ds:motion-reduce:transition-none"
|
|
2136
|
+
].join(" "), Pe = $(
|
|
2137
|
+
({ isPinned: e, onPinChange: s, label: t, className: i, onClick: d, ...a }, n) => {
|
|
2138
|
+
const { t: u } = de("ui"), { mode: c } = H();
|
|
2139
|
+
if (c === "icon") return null;
|
|
2140
|
+
const l = e ? u("navigation.sidebar.unpinItem", "Unpin {{label}}", { label: t }) : u("navigation.sidebar.pinItem", "Pin {{label}}", { label: t });
|
|
2141
|
+
return /* @__PURE__ */ r(
|
|
2142
|
+
"button",
|
|
2143
|
+
{
|
|
2144
|
+
ref: n,
|
|
2145
|
+
type: "button",
|
|
2146
|
+
"aria-label": l,
|
|
2147
|
+
"aria-pressed": e,
|
|
2148
|
+
className: [xt, i].filter(Boolean).join(" "),
|
|
2149
|
+
onClick: (w) => {
|
|
2150
|
+
w.preventDefault(), w.stopPropagation(), s == null || s(!e), d == null || d(w);
|
|
2151
|
+
},
|
|
2152
|
+
...a,
|
|
2153
|
+
children: /* @__PURE__ */ r(
|
|
2154
|
+
ys,
|
|
2155
|
+
{
|
|
2156
|
+
"aria-hidden": "true",
|
|
2157
|
+
className: "ds:size-4",
|
|
2158
|
+
fill: e ? "currentColor" : "none"
|
|
2159
|
+
}
|
|
2160
|
+
)
|
|
2161
|
+
}
|
|
2162
|
+
);
|
|
2163
|
+
}
|
|
2164
|
+
);
|
|
2165
|
+
Pe.displayName = "SidebarPinButton";
|
|
2166
|
+
const is = ie(null), wt = () => oe(is), St = $(
|
|
2167
|
+
({ heading: e, emptyMessage: s, onReorder: t, className: i, children: d, ...a }, n) => {
|
|
2168
|
+
const { t: u } = de("ui"), c = e ?? u("navigation.sidebar.favorites", "Favourites"), l = Array.isArray(d) ? d.filter(Boolean) : d ? [d] : [], w = l.length, C = w > 0, [I, j] = Z(null), [v, p] = Z(""), b = U(!1), x = F((L) => {
|
|
2169
|
+
b.current = !b.current, p(b.current ? L : `${L}`);
|
|
2170
|
+
}, []), P = ye(
|
|
2171
|
+
() => ({ onReorder: t, count: w, dragSource: I, setDragSource: j, announce: x }),
|
|
2172
|
+
[t, w, I, x]
|
|
2173
|
+
);
|
|
2174
|
+
return !C && !s ? null : /* @__PURE__ */ r(is.Provider, { value: P, children: /* @__PURE__ */ r(es.Provider, { value: !0, children: /* @__PURE__ */ h(
|
|
2175
|
+
ss,
|
|
2176
|
+
{
|
|
2177
|
+
ref: n,
|
|
2178
|
+
label: c,
|
|
2179
|
+
className: i,
|
|
2180
|
+
...a,
|
|
2181
|
+
children: [
|
|
2182
|
+
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 }),
|
|
2183
|
+
/* @__PURE__ */ r("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: v })
|
|
2184
|
+
]
|
|
2185
|
+
}
|
|
2186
|
+
) }) });
|
|
2187
|
+
}
|
|
2188
|
+
);
|
|
2189
|
+
St.displayName = "SidebarFavorites";
|
|
2190
|
+
const Nt = ae(
|
|
2191
|
+
[
|
|
2192
|
+
"ds:group/item ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
2193
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
2194
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
2195
|
+
].join(" "),
|
|
2196
|
+
{
|
|
2197
|
+
variants: {
|
|
2198
|
+
dragging: {
|
|
2199
|
+
true: "ds:opacity-60",
|
|
2200
|
+
false: ""
|
|
2201
|
+
},
|
|
2202
|
+
dropTarget: {
|
|
2203
|
+
true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--primary)] ds:outline-offset-[-2px]",
|
|
2204
|
+
false: ""
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
defaultVariants: { dragging: !1, dropTarget: !1 }
|
|
2208
|
+
}
|
|
2209
|
+
), It = [
|
|
2210
|
+
"ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
|
|
2211
|
+
"ds:size-6 ds:rounded-[var(--radius-sm)]",
|
|
2212
|
+
"ds:cursor-grab ds:active:cursor-grabbing",
|
|
2213
|
+
"ds:text-[var(--muted-foreground)]",
|
|
2214
|
+
// Quiet chrome — only reveal the grip when the row is hovered or the
|
|
2215
|
+
// handle itself is focused (keyboard / AT). Matches the pin-star's
|
|
2216
|
+
// reveal-on-hover behaviour so the two siblings appear together.
|
|
2217
|
+
"ds:opacity-0 ds:group-hover/item:opacity-100 ds:focus-visible:opacity-100",
|
|
2218
|
+
"ds:hover:bg-[var(--muted)]/20 ds:hover:text-[var(--foreground)]",
|
|
2219
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2220
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2221
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
2222
|
+
"ds:transition-[color,opacity,background-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
2223
|
+
].join(" "), Ct = $(
|
|
2224
|
+
({
|
|
2225
|
+
index: e,
|
|
2226
|
+
isActive: s = !1,
|
|
2227
|
+
asChild: t = !1,
|
|
2228
|
+
reorderLabel: i,
|
|
2229
|
+
isPinned: d = !1,
|
|
2230
|
+
onPinChange: a,
|
|
2231
|
+
pinLabel: n,
|
|
2232
|
+
"aria-label": u,
|
|
2233
|
+
className: c,
|
|
2234
|
+
children: l,
|
|
2235
|
+
...w
|
|
2236
|
+
}, C) => {
|
|
2237
|
+
const { t: I } = de("ui"), { mode: j } = H(), v = wt(), [p, b] = Z(!1), x = !!(v != null && v.onReorder) && j !== "icon", P = i ?? u ?? "", L = ve(), A = (g, M) => {
|
|
2238
|
+
if (!(v != null && v.onReorder)) return;
|
|
2239
|
+
const G = Math.max(0, Math.min(v.count - 1, M));
|
|
2240
|
+
G !== g && (v.onReorder(g, G), v.announce(
|
|
2241
|
+
I(
|
|
2242
|
+
"navigation.sidebar.reorderAnnounce",
|
|
2243
|
+
"{{label}} moved to position {{to}} of {{total}}",
|
|
2244
|
+
{ label: P, to: G + 1, total: v.count }
|
|
2245
|
+
)
|
|
2246
|
+
));
|
|
2247
|
+
}, T = (g) => {
|
|
2248
|
+
x && (g.altKey && g.key === "ArrowUp" ? (g.preventDefault(), A(e, e - 1)) : g.altKey && g.key === "ArrowDown" ? (g.preventDefault(), A(e, e + 1)) : g.key === "Home" && g.altKey ? (g.preventDefault(), A(e, 0)) : g.key === "End" && g.altKey && (g.preventDefault(), A(e, v.count - 1)));
|
|
2249
|
+
}, _ = (g) => {
|
|
2250
|
+
x && (v == null || v.setDragSource(e), g.dataTransfer && (g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("ds:text/plain", String(e))));
|
|
2251
|
+
}, K = () => {
|
|
2252
|
+
v == null || v.setDragSource(null), b(!1);
|
|
2253
|
+
}, Y = (g) => {
|
|
2254
|
+
!x || (v == null ? void 0 : v.dragSource) === null || (g.preventDefault(), g.dataTransfer && (g.dataTransfer.dropEffect = "move"), b(!0));
|
|
2255
|
+
}, k = () => b(!1), R = (g) => {
|
|
2256
|
+
if (!x) return;
|
|
2257
|
+
g.preventDefault();
|
|
2258
|
+
const M = v == null ? void 0 : v.dragSource;
|
|
2259
|
+
b(!1), !(M == null || M === e) && A(M, e);
|
|
2260
|
+
}, O = (v == null ? void 0 : v.dragSource) === e;
|
|
2261
|
+
return /* @__PURE__ */ h(
|
|
2262
|
+
"div",
|
|
2263
|
+
{
|
|
2264
|
+
className: Nt({
|
|
2265
|
+
dragging: O,
|
|
2266
|
+
dropTarget: p && !O
|
|
2267
|
+
}),
|
|
2268
|
+
draggable: x || void 0,
|
|
2269
|
+
onDragStart: x ? _ : void 0,
|
|
2270
|
+
onDragEnd: x ? K : void 0,
|
|
2271
|
+
onDragOver: Y,
|
|
2272
|
+
onDragLeave: k,
|
|
2273
|
+
onDrop: R,
|
|
2274
|
+
children: [
|
|
2275
|
+
/* @__PURE__ */ r(
|
|
2276
|
+
rs,
|
|
2277
|
+
{
|
|
2278
|
+
ref: C,
|
|
2279
|
+
isActive: s,
|
|
2280
|
+
asChild: t,
|
|
2281
|
+
"aria-label": u,
|
|
2282
|
+
"aria-describedby": x ? L : void 0,
|
|
2283
|
+
draggable: x ? !1 : void 0,
|
|
2284
|
+
className: [x ? "ds:flex-1 ds:min-w-0" : "", c ?? ""].filter(Boolean).join(" "),
|
|
2285
|
+
...w,
|
|
2286
|
+
children: l
|
|
2287
|
+
}
|
|
2288
|
+
),
|
|
2289
|
+
x ? /* @__PURE__ */ r(
|
|
2290
|
+
"button",
|
|
2291
|
+
{
|
|
2292
|
+
type: "button",
|
|
2293
|
+
id: L,
|
|
2294
|
+
"aria-label": I(
|
|
2295
|
+
"navigation.sidebar.reorderHandle",
|
|
2296
|
+
"Reorder {{label}}. Press Alt + Up or Alt + Down to move.",
|
|
2297
|
+
{ label: P }
|
|
2298
|
+
),
|
|
2299
|
+
className: It,
|
|
2300
|
+
onKeyDown: T,
|
|
2301
|
+
children: /* @__PURE__ */ r(hs, { "aria-hidden": "true", className: "ds:size-4" })
|
|
2302
|
+
}
|
|
2303
|
+
) : null,
|
|
2304
|
+
a && j !== "icon" ? /* @__PURE__ */ r(
|
|
2305
|
+
Pe,
|
|
2306
|
+
{
|
|
2307
|
+
isPinned: d,
|
|
2308
|
+
label: n ?? u ?? "",
|
|
2309
|
+
onPinChange: a
|
|
2310
|
+
}
|
|
2311
|
+
) : null
|
|
2312
|
+
]
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2315
|
+
}
|
|
2316
|
+
);
|
|
2317
|
+
Ct.displayName = "SidebarFavoriteItem";
|
|
2318
|
+
const zt = ae(
|
|
2319
|
+
[
|
|
2320
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
2321
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
2322
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
2323
|
+
"ds:rounded-[var(--radius-md)]",
|
|
2324
|
+
"ds:text-[var(--foreground)] ds:text-[length:var(--font-size-sm)]",
|
|
2325
|
+
"ds:hover:bg-[var(--muted)]/20",
|
|
2326
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2327
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2328
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
2329
|
+
"ds:no-underline"
|
|
2330
|
+
].join(" ")
|
|
2331
|
+
), Tt = $(({ avatar: e, name: s, subtitle: t, subtitleLabel: i, className: d, ...a }, n) => {
|
|
2332
|
+
const { mode: u } = H(), c = u !== "icon", l = typeof t == "string" ? t : i;
|
|
2333
|
+
return /* @__PURE__ */ h(
|
|
2334
|
+
"button",
|
|
2335
|
+
{
|
|
2336
|
+
ref: n,
|
|
2337
|
+
type: "button",
|
|
2338
|
+
"aria-label": l ? `${s}, ${l}` : s,
|
|
2339
|
+
className: [zt(), d].filter(Boolean).join(" "),
|
|
2340
|
+
...a,
|
|
2341
|
+
children: [
|
|
2342
|
+
/* @__PURE__ */ r(
|
|
2343
|
+
"span",
|
|
2344
|
+
{
|
|
2345
|
+
"aria-hidden": "true",
|
|
2346
|
+
className: "ds:inline-flex ds:items-center ds:shrink-0",
|
|
2347
|
+
children: e
|
|
2348
|
+
}
|
|
2349
|
+
),
|
|
2350
|
+
c ? /* @__PURE__ */ h("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
|
|
2351
|
+
/* @__PURE__ */ r("span", { className: "ds:block ds:truncate type-label", children: s }),
|
|
2352
|
+
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
|
|
2353
|
+
] }) : null
|
|
2354
|
+
]
|
|
2355
|
+
}
|
|
2356
|
+
);
|
|
2357
|
+
});
|
|
2358
|
+
Tt.displayName = "SidebarProfilePill";
|
|
2359
|
+
const Et = $(({ className: e, "aria-label": s, onClick: t, ...i }, d) => {
|
|
2360
|
+
const { t: a } = de("ui"), { mode: n, density: u, transitionTo: c } = H();
|
|
2361
|
+
if (n === "overlay") return null;
|
|
2362
|
+
const l = n === "expanded", w = l ? [
|
|
2363
|
+
"ds:justify-start",
|
|
2364
|
+
u === "compact" ? "ds:ps-[var(--spacing-xs)]" : "ds:ps-[var(--spacing-sm)]"
|
|
2365
|
+
].join(" ") : "ds:justify-center", C = s ?? (l ? a("navigation.sidebar.collapse", "Collapse sidebar") : a("navigation.sidebar.expand", "Expand sidebar")), I = /* @__PURE__ */ r(
|
|
2366
|
+
"button",
|
|
2367
|
+
{
|
|
2368
|
+
ref: d,
|
|
2369
|
+
type: "button",
|
|
2370
|
+
"aria-label": C,
|
|
2371
|
+
"aria-expanded": l,
|
|
2372
|
+
onClick: (j) => {
|
|
2373
|
+
c == null || c(l ? "icon" : "expanded"), t == null || t(j);
|
|
2374
|
+
},
|
|
2375
|
+
className: [ns, w, e].filter(Boolean).join(" "),
|
|
2376
|
+
...i,
|
|
2377
|
+
children: /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center", children: l ? /* @__PURE__ */ r(
|
|
2378
|
+
zs,
|
|
2379
|
+
{
|
|
2380
|
+
"aria-hidden": "true",
|
|
2381
|
+
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
2382
|
+
}
|
|
2383
|
+
) : /* @__PURE__ */ r(
|
|
2384
|
+
Es,
|
|
2385
|
+
{
|
|
2386
|
+
"aria-hidden": "true",
|
|
2387
|
+
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
2388
|
+
}
|
|
2389
|
+
) })
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
return /* @__PURE__ */ h(y.Root, { children: [
|
|
2393
|
+
/* @__PURE__ */ r(y.Trigger, { asChild: !0, children: I }),
|
|
2394
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
2395
|
+
y.Content,
|
|
2396
|
+
{
|
|
2397
|
+
side: n === "icon" ? "right" : "top",
|
|
2398
|
+
sideOffset: 6,
|
|
2399
|
+
className: me,
|
|
2400
|
+
children: [
|
|
2401
|
+
C,
|
|
2402
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
2403
|
+
]
|
|
2404
|
+
}
|
|
2405
|
+
) })
|
|
2406
|
+
] });
|
|
2407
|
+
});
|
|
2408
|
+
Et.displayName = "SidebarCollapseTrigger";
|
|
2409
|
+
const jt = $(({ className: e, ...s }, t) => {
|
|
2410
|
+
const { t: i } = de("ui"), { mode: d, quietFocusRef: a } = H(), n = oe(We), u = d === "overlay" && n !== null;
|
|
2411
|
+
if (xe(() => {
|
|
2412
|
+
if (!(!u || !n))
|
|
2413
|
+
return n();
|
|
2414
|
+
}, [u, n]), !u) return null;
|
|
2415
|
+
const c = i("navigation.sidebar.close");
|
|
2416
|
+
return /* @__PURE__ */ h(y.Root, { children: [
|
|
2417
|
+
/* @__PURE__ */ r(
|
|
2418
|
+
y.Trigger,
|
|
2419
|
+
{
|
|
2420
|
+
asChild: !0,
|
|
2421
|
+
onFocus: (l) => {
|
|
2422
|
+
a != null && a.current && l.preventDefault();
|
|
2423
|
+
},
|
|
2424
|
+
children: /* @__PURE__ */ r(ge.Close, { asChild: !0, children: /* @__PURE__ */ r(
|
|
2425
|
+
"button",
|
|
2426
|
+
{
|
|
2427
|
+
ref: t,
|
|
2428
|
+
type: "button",
|
|
2429
|
+
"aria-label": c,
|
|
2430
|
+
className: [Xe, e].filter(Boolean).join(" "),
|
|
2431
|
+
...s,
|
|
2432
|
+
children: /* @__PURE__ */ r(He, { "aria-hidden": "true", className: "ds:size-4" })
|
|
2433
|
+
}
|
|
2434
|
+
) })
|
|
2435
|
+
}
|
|
2436
|
+
),
|
|
2437
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
2438
|
+
y.Content,
|
|
2439
|
+
{
|
|
2440
|
+
side: "bottom",
|
|
2441
|
+
sideOffset: 6,
|
|
2442
|
+
className: me,
|
|
2443
|
+
children: [
|
|
2444
|
+
c,
|
|
2445
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
2446
|
+
]
|
|
2447
|
+
}
|
|
2448
|
+
) })
|
|
2449
|
+
] });
|
|
2450
|
+
});
|
|
2451
|
+
jt.displayName = "SidebarCloseTrigger";
|
|
2452
|
+
const kt = ae(
|
|
2453
|
+
[
|
|
2454
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
2455
|
+
"ds:rounded-[var(--radius-md)]",
|
|
2456
|
+
"ds:border ds:border-[var(--border)]",
|
|
2457
|
+
"ds:bg-[image:var(--gradient-surface-subtle-accent)]",
|
|
2458
|
+
"ds:no-underline ds:!text-[var(--foreground)]",
|
|
2459
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2460
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2461
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
2462
|
+
].join(" "),
|
|
2463
|
+
{
|
|
2464
|
+
variants: {
|
|
2465
|
+
mode: {
|
|
2466
|
+
expanded: [
|
|
2467
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
2468
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]"
|
|
2469
|
+
].join(" "),
|
|
2470
|
+
icon: [
|
|
2471
|
+
"ds:justify-center",
|
|
2472
|
+
"ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
|
|
2473
|
+
"ds:ms-auto ds:me-auto ds:ps-0 ds:pe-0"
|
|
2474
|
+
].join(" "),
|
|
2475
|
+
overlay: [
|
|
2476
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
2477
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]"
|
|
2478
|
+
].join(" ")
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2481
|
+
defaultVariants: { mode: "expanded" }
|
|
2482
|
+
}
|
|
2483
|
+
), At = $(({ title: e, description: s, icon: t, className: i, ...d }, a) => {
|
|
2484
|
+
const { mode: n } = H(), u = n === "icon", c = (
|
|
2485
|
+
// aria-label only in icon mode (where the copy is hidden) — in
|
|
2486
|
+
// expanded mode the accessible name comes from the visible contents
|
|
2487
|
+
// so the description isn't excluded from it.
|
|
2488
|
+
/* @__PURE__ */ h(
|
|
2489
|
+
"a",
|
|
2490
|
+
{
|
|
2491
|
+
ref: a,
|
|
2492
|
+
"aria-label": u ? e : void 0,
|
|
2493
|
+
className: kt({ mode: n, className: i }),
|
|
2494
|
+
...d,
|
|
2495
|
+
children: [
|
|
2496
|
+
/* @__PURE__ */ r(
|
|
2497
|
+
"span",
|
|
2498
|
+
{
|
|
2499
|
+
"aria-hidden": "true",
|
|
2500
|
+
className: [
|
|
2501
|
+
"ds:inline-flex ds:size-8 ds:shrink-0 ds:items-center ds:justify-center",
|
|
2502
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
2503
|
+
"ds:bg-[var(--accent)] ds:text-[var(--accent-foreground)]"
|
|
2504
|
+
].join(" "),
|
|
2505
|
+
children: t ?? /* @__PURE__ */ r(xs, { className: "ds:size-4" })
|
|
2506
|
+
}
|
|
2507
|
+
),
|
|
2508
|
+
u ? null : /* @__PURE__ */ h(Ie, { children: [
|
|
2509
|
+
/* @__PURE__ */ h("span", { className: "ds:flex-1 ds:min-w-0 ds:text-start", children: [
|
|
2510
|
+
/* @__PURE__ */ r("span", { className: "ds:block ds:line-clamp-2 type-label", children: e }),
|
|
2511
|
+
s ? (
|
|
2512
|
+
// Foreground (not muted) on the tinted surface — the gradient
|
|
2513
|
+
// stops leave muted text short of AA in both colour schemes.
|
|
2514
|
+
/* @__PURE__ */ r("span", { className: "ds:block ds:line-clamp-2 type-meta", children: s })
|
|
2515
|
+
) : null
|
|
2516
|
+
] }),
|
|
2517
|
+
/* @__PURE__ */ r(
|
|
2518
|
+
ze,
|
|
2519
|
+
{
|
|
2520
|
+
"aria-hidden": "true",
|
|
2521
|
+
className: "ds:size-4 ds:shrink-0 ds:rtl:-scale-x-100"
|
|
2522
|
+
}
|
|
2523
|
+
)
|
|
2524
|
+
] })
|
|
2525
|
+
]
|
|
2526
|
+
}
|
|
2527
|
+
)
|
|
2528
|
+
);
|
|
2529
|
+
return u ? /* @__PURE__ */ h(y.Root, { children: [
|
|
2530
|
+
/* @__PURE__ */ r(y.Trigger, { asChild: !0, children: c }),
|
|
2531
|
+
/* @__PURE__ */ r(y.Portal, { children: /* @__PURE__ */ h(
|
|
2532
|
+
y.Content,
|
|
2533
|
+
{
|
|
2534
|
+
side: "right",
|
|
2535
|
+
sideOffset: 6,
|
|
2536
|
+
className: me,
|
|
2537
|
+
children: [
|
|
2538
|
+
e,
|
|
2539
|
+
/* @__PURE__ */ r(y.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
2540
|
+
]
|
|
2541
|
+
}
|
|
2542
|
+
) })
|
|
2543
|
+
] }) : c;
|
|
2544
|
+
});
|
|
2545
|
+
At.displayName = "SidebarUpgradeChip";
|
|
2546
|
+
export {
|
|
2547
|
+
Xs as S,
|
|
2548
|
+
Js as a,
|
|
2549
|
+
jt as b,
|
|
2550
|
+
Et as c,
|
|
2551
|
+
Ct as d,
|
|
2552
|
+
St as e,
|
|
2553
|
+
Qs as f,
|
|
2554
|
+
dt as g,
|
|
2555
|
+
Zs as h,
|
|
2556
|
+
as as i,
|
|
2557
|
+
rs as j,
|
|
2558
|
+
mt as k,
|
|
2559
|
+
ut as l,
|
|
2560
|
+
ft as m,
|
|
2561
|
+
Pe as n,
|
|
2562
|
+
bt as o,
|
|
2563
|
+
Tt as p,
|
|
2564
|
+
ss as q,
|
|
2565
|
+
yt as r,
|
|
2566
|
+
At as s,
|
|
2567
|
+
vt as t,
|
|
2568
|
+
Os as u,
|
|
2569
|
+
H as v
|
|
2570
|
+
};
|
|
2571
|
+
//# sourceMappingURL=sidebar-C9Zof0z1.js.map
|