@alfadocs/ui-kit 1.57.0 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-Dj1ZkvJj.js → actions-cell-renderer-KoO3EYrZ.js} +4 -4
- package/dist/_chunks/{address-fields-BfjxS05Z.js → address-fields-CJtu7LQU.js} +2 -2
- package/dist/_chunks/{agenda-tray-ZKhDxlfw.js → agenda-tray-D3GH9t3T.js} +3 -3
- package/dist/_chunks/{ai-credits-notice-ktklr8fy.js → ai-credits-notice-DAxBt_wr.js} +11 -11
- package/dist/_chunks/{ai-permission-notice-DyuEGwAt.js → ai-permission-notice-htJegWcH.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Beh-O_rJ.js → ai-prompt-input-DRNqTCSK.js} +3 -3
- package/dist/_chunks/{alia-sidebar-BBKBJCv6.js → alia-sidebar-bMVUsMmJ.js} +8 -8
- package/dist/_chunks/{anamnesis-card-BSlAhaoG.js → anamnesis-card-Bh7Tg6i-.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-2YfIYY2j.js → anamnesis-summary-card-cCj7LPh3.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-CCQ62mMN.js → anamnesis-summary-rows-D9cFUeXk.js} +14 -14
- package/dist/_chunks/{antenatal-schedule-timeline-Kf2Yg8uo.js → antenatal-schedule-timeline-CfNFrej5.js} +2 -2
- package/dist/_chunks/{app-frame-B-0O9CrU.js → app-frame-CqmDh2v5.js} +2 -2
- package/dist/_chunks/{appointment-card-Dh3fAcyf.js → appointment-card-BXQUZlAJ.js} +2 -2
- package/dist/_chunks/{appointment-peek-WvNbE4JG.js → appointment-peek-drkQF54M.js} +4 -4
- package/dist/_chunks/{appointment-timeline-Z0494xO-.js → appointment-timeline-C3mTzaUm.js} +5 -5
- package/dist/_chunks/{appointment-tray-CyI_p3zU.js → appointment-tray-CUBBT4mL.js} +4 -4
- package/dist/_chunks/{audio-recorder-DWKKjGPt.js → audio-recorder-B1TpJoMu.js} +4 -4
- package/dist/_chunks/{balance-badge-cell-CII3SDmR.js → balance-badge-cell-BC92nTi9.js} +5 -5
- package/dist/_chunks/{bishop-score-BxA20j9T.js → bishop-score-BOjlxLzL.js} +4 -4
- package/dist/_chunks/{bmi-calculator-C0UTxB7R.js → bmi-calculator-JNiTHdYJ.js} +3 -3
- package/dist/_chunks/{booking-81WnKDsH.js → booking-BdWwr_NM.js} +8 -8
- package/dist/_chunks/{button-Bn16lcFM.js → button-CnUVJg1Y.js} +71 -61
- package/dist/_chunks/{button-group-CWlwR-A5.js → button-group-DLqAoowT.js} +73 -73
- package/dist/_chunks/{calculator-dialog-CzQv03p0.js → calculator-dialog-BUfaWqvu.js} +2 -2
- package/dist/_chunks/{calendar-6-24PQ1u.js → calendar-KihOHLCs.js} +2 -2
- package/dist/_chunks/{calendar-workspace-D5-k_9zE.js → calendar-workspace-DD378Xg8.js} +30 -30
- package/dist/_chunks/{card-DMO2nkt4.js → card-BA4Ig_kn.js} +9 -8
- package/dist/_chunks/{care-plan-card-DxrRLRdW.js → care-plan-card-Cd1En8-p.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-0rpR-4Te.js → care-plan-entry-card-FIYdF44t.js} +2 -2
- package/dist/_chunks/{care-plan-header-BMwZIgHJ.js → care-plan-header-DgPAJWS4.js} +2 -2
- package/dist/_chunks/{carousel.agent-D3xthzTf.js → carousel.agent-C7MXzwUi.js} +2 -2
- package/dist/_chunks/{chart-DQ5GxqgT.js → chart-0jK6B2ry.js} +407 -393
- package/dist/_chunks/{chat-input-PtrSu1ZC.js → chat-input-1c4k4-uk.js} +2 -2
- package/dist/_chunks/{chat-message-CmGUcajG.js → chat-message-Bv9eW1NW.js} +3 -3
- package/dist/_chunks/{city-input-BC_nYINn.js → city-input-3J3bz9EO.js} +2 -2
- package/dist/_chunks/{clinical-note-card-hx939bvw.js → clinical-note-card-L6FVM9Gx.js} +2 -2
- package/dist/_chunks/{code-block-BQgK70mO.js → code-block-DWVvOrUF.js} +2 -2
- package/dist/_chunks/{connection-status-ncTjUPt6.js → connection-status-D-Zeqpr3.js} +4 -4
- package/dist/_chunks/{contact-card-fHBMwEsx.js → contact-card-C8rEsC4Q.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CMyBYgRR.js → contact-profile-card-DJe2ld0g.js} +3 -3
- package/dist/_chunks/{control-room-rail-Tx2jW250.js → control-room-rail-DgS2snUz.js} +3 -3
- package/dist/_chunks/{copy-field-CvTIuA_p.js → copy-field-CY1f0k7O.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Cww9DzIa.js → cycle-calculator-sOOESGEG.js} +3 -3
- package/dist/_chunks/dashboard-grid-SAGjktTs.js +933 -0
- package/dist/_chunks/{data-table-fAMTeAjM.js → data-table-DjDuXaQB.js} +11 -11
- package/dist/_chunks/{data-table-tabs-CHYAAeHy.js → data-table-tabs-BsCll8sH.js} +3 -3
- package/dist/_chunks/{description-list-DkLeHiew.js → description-list-ZWlFfbOy.js} +2 -2
- package/dist/_chunks/{dev-bypass-button-BhGn6evf.js → dev-bypass-button-m-eXU2PU.js} +2 -2
- package/dist/_chunks/{dialog-Dn-iQ0Jp.js → dialog-D6fkpRc4.js} +72 -61
- package/dist/_chunks/{document-preview-CHGGG0l_.js → document-preview-E6od-Yy0.js} +4 -4
- package/dist/_chunks/{document-scanner-CQS9kv84.js → document-scanner-DDOMMswN.js} +2 -2
- package/dist/_chunks/{dropdown-menu-BQSNVp4x.js → dropdown-menu-D1we7oAY.js} +134 -133
- package/dist/_chunks/{due-date-calculator-D_qFUiHp.js → due-date-calculator-rtMADvJ8.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-CmYcMuwi.js → editable-currency-cell-renderer-DTtF6IIr.js} +3 -3
- package/dist/_chunks/{editable-description-DuJlvltc.js → editable-description-CriawIum.js} +3 -3
- package/dist/_chunks/{editor-overlay-NMxzcO6J.js → editor-overlay-CbFUYsVk.js} +2 -2
- package/dist/_chunks/{empty-state-gNG3qYCX.js → empty-state-BN_R5AzQ.js} +61 -59
- package/dist/_chunks/{entity-summary-CWcCSThK.js → entity-summary-CoCUJe3N.js} +4 -4
- package/dist/_chunks/{error-boundary-ChowhO6w.js → error-boundary-BlwcM1KR.js} +2 -2
- package/dist/_chunks/{error-page-CpuYbpOB.js → error-page-B0ER6tPK.js} +2 -2
- package/dist/_chunks/{face-scheme-BicuUA2K.js → face-scheme-BunF1rjI.js} +7 -7
- package/dist/_chunks/{fetal-weight-BWaqqjea.js → fetal-weight-67yvef3S.js} +3 -3
- package/dist/_chunks/{field-array-BO-kaKFK.js → field-array-BVitwPIt.js} +3 -3
- package/dist/_chunks/{file-manager-CFsL1KVt.js → file-manager-YXtUu76I.js} +9 -9
- package/dist/_chunks/{finished-terminal-CPSDrIMB.js → finished-terminal-DdLHDe_5.js} +3 -3
- package/dist/_chunks/{fiscal-code-input-DesSQ6Fh.js → fiscal-code-input-Dsa1M6VK.js} +2 -2
- package/dist/_chunks/{forgot-password-form-DEx-M_QR.js → forgot-password-form-C2ibWCZT.js} +4 -4
- package/dist/_chunks/{freemium-paywall-DIKuhX8b.js → freemium-paywall-C8CXWbhO.js} +27 -27
- package/dist/_chunks/{gestational-age-calculator-CZi43xKG.js → gestational-age-calculator-DT8XDFVK.js} +5 -5
- package/dist/_chunks/{hcg-doubling-Ccvh7OaU.js → hcg-doubling-BxggoYNV.js} +3 -3
- package/dist/_chunks/{header-B9552pLh.js → header-C0XQZtu6.js} +2 -2
- package/dist/_chunks/{header-settings-BMcCx2LC.js → header-settings-BJ6M2p9Q.js} +4 -4
- package/dist/_chunks/{heatmap-BEeOThkW.js → heatmap-COoukTUe.js} +6 -6
- package/dist/_chunks/{help-me-write-templates-BUoYGo6f.js → help-me-write-templates-DpcMweG1.js} +7 -7
- package/dist/_chunks/{hover-card-U_ZYoh1n.js → hover-card-s2qD4RAz.js} +2 -2
- package/dist/_chunks/{icon-button-COX76Jdj.js → icon-button-CsOGhuRB.js} +2 -2
- package/dist/_chunks/{icon-button-group-C5hhI-R5.js → icon-button-group-Cap4-Idv.js} +3 -3
- package/dist/_chunks/{icon-picker-C86lQTIA.js → icon-picker-BbO2FB4y.js} +4 -4
- package/dist/_chunks/{image-cropper-D0kkQ4lG.js → image-cropper-DXqCUezS.js} +2 -2
- package/dist/_chunks/{info-tip-CJpNpzZe.js → info-tip-CJqR9fhi.js} +2 -2
- package/dist/_chunks/{insert-result-C1C2OCc3.js → insert-result-BUEtHFMg.js} +2 -2
- package/dist/_chunks/{key-value-pair-BNNITp6S.js → key-value-pair-BN5lWXcB.js} +2 -2
- package/dist/_chunks/{kit-extensions-DYVxWcqv.js → kit-extensions-BVtvnev_.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-CxW_oLa5.js → link-cell-renderer-BZmRw_Yi.js} +6 -6
- package/dist/_chunks/{list-RRN2TJ_7.js → list-CNnn7DOD.js} +75 -73
- package/dist/_chunks/{locale-picker-BGfrZyTw.js → locale-picker-DVWHnuDN.js} +3 -3
- package/dist/_chunks/{login-dev-card-DmZ1B0lB.js → login-dev-card-DQioAtdz.js} +4 -4
- package/dist/_chunks/{map-view-CO2v0hfp.js → map-view-9Ro_P8O8.js} +2 -2
- package/dist/_chunks/marketplace-app-shell-DnuHxuoE.js +613 -0
- package/dist/_chunks/{message-card-DVo8-dOm.js → message-card-BNoaKInS.js} +3 -3
- package/dist/_chunks/{message-tray-QKQutwxj.js → message-tray-D4R0boMJ.js} +5 -5
- package/dist/_chunks/{muscle-scheme-BDgIaGeW.js → muscle-scheme-YoN3rYXV.js} +2 -2
- package/dist/_chunks/navigation-dismiss-B1mcW1CT.js +9 -0
- package/dist/_chunks/{notes-panel-Cm4pttpl.js → notes-panel-0Wots8rp.js} +7 -7
- package/dist/_chunks/{notification-card-BGCIL6Mu.js → notification-card-DRLmYlL8.js} +3 -3
- package/dist/_chunks/{notification-tray-C5VtbGjd.js → notification-tray-qrSc9Fcs.js} +5 -5
- package/dist/_chunks/{operator-hero-Dyd2IGbR.js → operator-hero-C_Khr5IU.js} +2 -2
- package/dist/_chunks/{optical-prescription-Do6e3wfs.js → optical-prescription-B0ap3kGl.js} +3 -3
- package/dist/_chunks/{pagination-BR1_GfD_.js → pagination-DvKGrsXu.js} +146 -142
- package/dist/_chunks/{panel-subview-BT-Apwgb.js → panel-subview-Bs0WhwR9.js} +62 -48
- package/dist/_chunks/{patient-details-99kEdtc5.js → patient-details-C6buDwuI.js} +4 -4
- package/dist/_chunks/{patient-field-row-DkxY13T6.js → patient-field-row-CKb4FIaM.js} +9 -9
- package/dist/_chunks/{patient-search-D5xlXmd2.js → patient-search-Cgv8Pjsc.js} +4 -4
- package/dist/_chunks/{patient-summary-card-opdyfeW2.js → patient-summary-card-DWx0emu2.js} +6 -6
- package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js → payment-automation-upsell-BAJwtVCs.js} +4 -4
- package/dist/_chunks/{payment-request-card-DAniJNLX.js → payment-request-card-BNiZqIzT.js} +4 -4
- package/dist/_chunks/{periodontal-chart-DD5C0M3l.js → periodontal-chart-DMWiP5Ti.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CxdXvsPU.js → periodontal-chart-card-D2ZFjN7G.js} +3 -3
- package/dist/_chunks/{periodontal-diagnosis-D-PJv7KS.js → periodontal-diagnosis-6wybid_W.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-D3DjIymT.js → periodontal-risk-chart-CgLwBj5c.js} +2 -2
- package/dist/_chunks/{popover-BG75rYjN.js → popover-CltTC2Rg.js} +2 -2
- package/dist/_chunks/popup-region-qz_5_A0V.js +79 -0
- package/dist/_chunks/{practice-profile-hero-C8RPACCi.js → practice-profile-hero-DPbvYfCs.js} +2 -2
- package/dist/_chunks/{practice-results-CfRkjzsI.js → practice-results-PINvX-1g.js} +6 -6
- package/dist/_chunks/{pregnancy-dating-BFzv9g1N.js → pregnancy-dating-BNSWXA0p.js} +5 -5
- package/dist/_chunks/{pregnancy-weight-gain-CUUrBTBo.js → pregnancy-weight-gain-CI7R6sA6.js} +3 -3
- package/dist/_chunks/{privacy-lock-WkUgwIj_.js → privacy-lock-CqLxFiLE.js} +3 -3
- package/dist/_chunks/{privacy-mask-ChIjELJC.js → privacy-mask-CUnJv35j.js} +3 -3
- package/dist/_chunks/{product-hub-panel-DlVRK7Ue.js → product-hub-panel-MbiHZwjC.js} +4 -4
- package/dist/_chunks/{public-header.agent-BctevbuY.js → public-header.agent-1MZVDYY1.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-DyqbTECc.js → radiograph-panel.agent-CpKvvZIU.js} +6 -6
- package/dist/_chunks/{registration-form-BlTzYywa.js → registration-form-JYravsvu.js} +7 -7
- package/dist/_chunks/{reviews-panel-CDcK6W3b.js → reviews-panel-B1Xirvh4.js} +5 -5
- package/dist/_chunks/{rich-text-editor-DTnNZ4Ff.js → rich-text-editor-CZXnqI3-.js} +11 -11
- package/dist/_chunks/{scroll-area-ZtFCv9K7.js → scroll-area-CY5SLYNw.js} +104 -74
- package/dist/_chunks/{search-bar-DQJS0wJN.js → search-bar-mA4bPe3t.js} +294 -255
- package/dist/_chunks/{section-card-ChJdOlBU.js → section-card-D5nWiTcK.js} +2 -2
- package/dist/_chunks/{select-Ce5RMk93.js → select-k4gBdS8N.js} +249 -224
- package/dist/_chunks/{session-countdown-CBINYw8H.js → session-countdown-DAyI9Wye.js} +2 -2
- package/dist/_chunks/{sheet-8qsiMoUI.js → sheet-D_bERXP2.js} +8 -8
- package/dist/_chunks/sidebar-D_S2-SXH.js +2165 -0
- package/dist/_chunks/{sign-in-with-alfadocs-button-D91_x8DX.js → sign-in-with-alfadocs-button-WfdfqQ8O.js} +2 -2
- package/dist/_chunks/{signature-request-DRuYAG5I.js → signature-request-BZIs36nH.js} +7 -7
- package/dist/_chunks/{signed-out-frame-AhMsNW1r.js → signed-out-frame-BR5sJSNX.js} +4 -4
- package/dist/_chunks/{slot-grid-sVZriOiQ.js → slot-grid-JU--9C6W.js} +4 -4
- package/dist/_chunks/{state-backed-text-input-DECQy5aA.js → state-backed-text-input-Cgh4ms3p.js} +2 -2
- package/dist/_chunks/{streaming-text-BKZmbW1Q.js → streaming-text-COuXesoR.js} +2 -2
- package/dist/_chunks/{tab-bar-Bm-rJB7Y.js → tab-bar-5GppbMGc.js} +2 -2
- package/dist/_chunks/{tabs-I2wf_nC7.js → tabs-2x3L13jn.js} +3 -3
- package/dist/_chunks/{task-card-BMXMh3uE.js → task-card-D9ngXO7p.js} +2 -2
- package/dist/_chunks/{task-editor-NkcopDna.js → task-editor-B7xb-mMs.js} +11 -10
- package/dist/_chunks/{task-tray-DsBO-AaP.js → task-tray-BAW_wbTO.js} +4 -4
- package/dist/_chunks/{tasks-panel-CdgZQQgG.js → tasks-panel-DQvN3TiB.js} +7 -7
- package/dist/_chunks/{theme-toggle-PpFcFoYK.js → theme-toggle-CfjLDUfK.js} +4 -4
- package/dist/_chunks/{timeline-DG8wAlAx.js → timeline-DEIuHrWz.js} +2 -2
- package/dist/_chunks/{toast-CPqguP7G.js → toast-2y0czYHr.js} +2 -2
- package/dist/_chunks/{token-insert-menu-B-pWFDKX.js → token-insert-menu-BzNAHiND.js} +3 -3
- package/dist/_chunks/{tool-rail-Bwyuw_Ot.js → tool-rail-DQ5qTv4l.js} +115 -114
- package/dist/_chunks/{tooth-scheme-BAO_voUO.js → tooth-scheme-CLyS9UUW.js} +3 -3
- package/dist/_chunks/{unit-converter-DS4UB_59.js → unit-converter-W62N99Mw.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-CfFQNOF_.js → use-appointment-details-read-Ba1DBPr7.js} +18 -18
- package/dist/_chunks/use-state-backed-input-DhRQo6gM.js +57 -0
- package/dist/_chunks/{voice-control-panel-BKbgb7FM.js → voice-control-panel-p7WMTj4D.js} +6 -6
- package/dist/_chunks/{warning-stack-ubD0IZCy.js → warning-stack-DGPuJNVD.js} +3 -3
- package/dist/_chunks/{widget-picker-rBA7MR5P.js → widget-picker-CkhoG4Rj.js} +80 -57
- package/dist/_chunks/{workflow-map-Demlpy39.js → workflow-map-DFuVff8U.js} +7 -7
- package/dist/_chunks/{workflow-status-BT27_fQp.js → workflow-status-Dc_CyEz5.js} +2 -2
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/navigation-dismiss.d.ts +8 -0
- package/dist/components/_shared/popup-region.d.ts +28 -0
- package/dist/components/_shared/use-state-backed-input.d.ts +3 -2
- package/dist/components/address-fields/index.js +1 -1
- 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/anamnesis-summary-card/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- 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/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/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/city-input/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-card/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.d.ts +33 -8
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- 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/dialog/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/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/empty-state/empty-state.d.ts +8 -0
- package/dist/components/empty-state/index.d.ts +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/list/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/muscle-scheme/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/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/pagination/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/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/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/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +6 -5
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-bar/search-bar.d.ts +1 -1
- package/dist/components/section-card/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar-move.d.ts +88 -0
- package/dist/components/sidebar/sidebar.d.ts +40 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/skeleton-scheme/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/tab-bar/index.js +1 -1
- package/dist/components/tabs/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/timeline/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/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/host-compat.css +2 -1
- package/dist/i18n/locales/ar.d.ts +15 -0
- package/dist/i18n/locales/ar.js +16 -1
- package/dist/i18n/locales/de.d.ts +15 -0
- package/dist/i18n/locales/de.js +16 -1
- package/dist/i18n/locales/el.d.ts +15 -0
- package/dist/i18n/locales/el.js +16 -1
- package/dist/i18n/locales/en.d.ts +15 -0
- package/dist/i18n/locales/en.js +16 -1
- package/dist/i18n/locales/es.d.ts +15 -0
- package/dist/i18n/locales/es.js +16 -1
- package/dist/i18n/locales/fr.d.ts +15 -0
- package/dist/i18n/locales/fr.js +16 -1
- package/dist/i18n/locales/hi.d.ts +15 -0
- package/dist/i18n/locales/hi.js +16 -1
- package/dist/i18n/locales/it.d.ts +15 -0
- package/dist/i18n/locales/it.js +16 -1
- package/dist/i18n/locales/ja.d.ts +15 -0
- package/dist/i18n/locales/ja.js +16 -1
- package/dist/i18n/locales/nl.d.ts +15 -0
- package/dist/i18n/locales/nl.js +16 -1
- package/dist/i18n/locales/pl.d.ts +15 -0
- package/dist/i18n/locales/pl.js +16 -1
- package/dist/i18n/locales/pt.d.ts +15 -0
- package/dist/i18n/locales/pt.js +16 -1
- package/dist/i18n/locales/ro.d.ts +15 -0
- package/dist/i18n/locales/ro.js +16 -1
- package/dist/i18n/locales/ru.d.ts +15 -0
- package/dist/i18n/locales/ru.js +16 -1
- package/dist/i18n/locales/sq.d.ts +15 -0
- package/dist/i18n/locales/sq.js +16 -1
- package/dist/i18n/locales/sv.d.ts +15 -0
- package/dist/i18n/locales/sv.js +16 -1
- package/dist/i18n/locales/tr.d.ts +15 -0
- package/dist/i18n/locales/tr.js +16 -1
- package/dist/i18n/locales/zh.d.ts +15 -0
- package/dist/i18n/locales/zh.js +16 -1
- package/dist/index.js +147 -147
- package/dist/locales/ar.json +16 -1
- package/dist/locales/de.json +16 -1
- package/dist/locales/el.json +16 -1
- package/dist/locales/en.json +16 -1
- package/dist/locales/es.json +16 -1
- package/dist/locales/fr.json +16 -1
- package/dist/locales/hi.json +16 -1
- package/dist/locales/it.json +16 -1
- package/dist/locales/ja.json +16 -1
- package/dist/locales/nl.json +16 -1
- package/dist/locales/pl.json +16 -1
- package/dist/locales/pt.json +16 -1
- package/dist/locales/ro.json +16 -1
- package/dist/locales/ru.json +16 -1
- package/dist/locales/sq.json +16 -1
- package/dist/locales/sv.json +16 -1
- package/dist/locales/tr.json +16 -1
- package/dist/locales/zh.json +16 -1
- 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 +34 -9
- 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 +6 -3
- package/package.json +1 -1
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +0 -844
- package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js +0 -555
- package/dist/_chunks/sidebar-DLsG2AIk.js +0 -1349
- package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +0 -59
|
@@ -0,0 +1,933 @@
|
|
|
1
|
+
import { jsxs as Z, jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Be, useRef as x, useState as L, useCallback as C, useMemo as j, useEffect as X, useImperativeHandle as Je, useContext as Qe, Children as Ze, isValidElement as et, Fragment as tt, createContext as rt, cloneElement as Le } from "react";
|
|
3
|
+
import { c as ce } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as We } from "react-i18next";
|
|
5
|
+
import { I as ge } from "./icon-button-CsOGhuRB.js";
|
|
6
|
+
import { T as nt } from "./tooltip-Cp-PLePW.js";
|
|
7
|
+
import { u as _ } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
8
|
+
import { u as st } from "./registry-DvAUVLHh.js";
|
|
9
|
+
import { P as it } from "./plus-DzMQ_c6b.js";
|
|
10
|
+
import { G as ot } from "./grip-vertical-onSb1JXO.js";
|
|
11
|
+
import { X as dt } from "./x-B5YnXwCz.js";
|
|
12
|
+
import { c as at } from "./createLucideIcon-DhHxpK9K.js";
|
|
13
|
+
/**
|
|
14
|
+
* @license lucide-react v1.22.0 - ISC
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the ISC license.
|
|
17
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
const ct = [
|
|
20
|
+
["path", { d: "M19 13v6h-6", key: "1hxl6d" }],
|
|
21
|
+
["path", { d: "M5 11V5h6", key: "12e2xe" }],
|
|
22
|
+
["path", { d: "m5 5 14 14", key: "11anup" }]
|
|
23
|
+
], ut = at("move-diagonal-2", ct), lt = {
|
|
24
|
+
id: "dashboard-grid",
|
|
25
|
+
// The board's whole purpose is in-place rearrangement of its widgets.
|
|
26
|
+
capabilities: ["edit_inline"],
|
|
27
|
+
state: {
|
|
28
|
+
layout: {
|
|
29
|
+
type: "{ id: string, x: number, y: number, w: number, h: number }[]",
|
|
30
|
+
descriptionKey: "ui.agent.dashboardGrid.state.layout",
|
|
31
|
+
description: "Current widget geometry in cell units — ids and rectangles only, no widget content.",
|
|
32
|
+
read: (r) => r.getGridState().layout
|
|
33
|
+
},
|
|
34
|
+
cols: {
|
|
35
|
+
type: "number",
|
|
36
|
+
descriptionKey: "ui.agent.dashboardGrid.state.cols",
|
|
37
|
+
description: "Logical column count of the board.",
|
|
38
|
+
read: (r) => r.getGridState().cols
|
|
39
|
+
},
|
|
40
|
+
editing: {
|
|
41
|
+
type: "boolean",
|
|
42
|
+
descriptionKey: "ui.agent.dashboardGrid.state.editing",
|
|
43
|
+
description: "Whether edit mode is on. Move/resize actions are refused while it is off — the host app owns the toggle.",
|
|
44
|
+
read: (r) => r.getGridState().editing
|
|
45
|
+
},
|
|
46
|
+
stacked: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
descriptionKey: "ui.agent.dashboardGrid.state.stacked",
|
|
49
|
+
description: "Whether the board is narrower than its stackBelow width and shows its widgets as one read-only column. Move/resize actions are unavailable while it is true, even in edit mode; the saved layout is unchanged.",
|
|
50
|
+
read: (r) => r.getGridState().stacked
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
actions: {
|
|
54
|
+
move_widget: {
|
|
55
|
+
// Rearranging the board mutates user configuration — a write,
|
|
56
|
+
// reversible by moving back.
|
|
57
|
+
safety: "write",
|
|
58
|
+
argsType: "id, x, y",
|
|
59
|
+
argsSchema: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
id: { type: "string", description: "Widget id (see layout state)." },
|
|
63
|
+
x: {
|
|
64
|
+
type: "integer",
|
|
65
|
+
minimum: 0,
|
|
66
|
+
description: "0-based logical column."
|
|
67
|
+
},
|
|
68
|
+
y: { type: "integer", minimum: 0, description: "0-based row." }
|
|
69
|
+
},
|
|
70
|
+
required: ["id", "x", "y"]
|
|
71
|
+
},
|
|
72
|
+
returns: "boolean (accepted)",
|
|
73
|
+
returnsSchema: {
|
|
74
|
+
type: "boolean",
|
|
75
|
+
description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
|
|
76
|
+
},
|
|
77
|
+
idempotent: !0,
|
|
78
|
+
errors: [
|
|
79
|
+
"Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
|
|
80
|
+
"Unavailable while edit mode is off: returns false.",
|
|
81
|
+
"Unknown widget id: returns false."
|
|
82
|
+
],
|
|
83
|
+
descriptionKey: "ui.agent.dashboardGrid.actions.moveWidget",
|
|
84
|
+
description: "Move a widget to a cell. Out-of-bounds targets are clamped; colliding widgets are pushed down and the layout re-compacts. Refused while edit mode is off or the board is stacked.",
|
|
85
|
+
invoke: (r, o) => r.moveWidgetTo(o.id, o.x, o.y)
|
|
86
|
+
},
|
|
87
|
+
resize_widget: {
|
|
88
|
+
safety: "write",
|
|
89
|
+
argsType: "id, w, h",
|
|
90
|
+
argsSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
id: { type: "string", description: "Widget id (see layout state)." },
|
|
94
|
+
w: {
|
|
95
|
+
type: "integer",
|
|
96
|
+
minimum: 1,
|
|
97
|
+
description: "Column span (≥ 1)."
|
|
98
|
+
},
|
|
99
|
+
h: { type: "integer", minimum: 1, description: "Row span (≥ 1)." }
|
|
100
|
+
},
|
|
101
|
+
required: ["id", "w", "h"]
|
|
102
|
+
},
|
|
103
|
+
returns: "boolean (accepted)",
|
|
104
|
+
returnsSchema: {
|
|
105
|
+
type: "boolean",
|
|
106
|
+
description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
|
|
107
|
+
},
|
|
108
|
+
idempotent: !0,
|
|
109
|
+
errors: [
|
|
110
|
+
"Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
|
|
111
|
+
"Unavailable while edit mode is off: returns false.",
|
|
112
|
+
"Unknown widget id: returns false."
|
|
113
|
+
],
|
|
114
|
+
descriptionKey: "ui.agent.dashboardGrid.actions.resizeWidget",
|
|
115
|
+
description: "Resize a widget to a span. Clamped to the grid and the widget’s min/max; colliding widgets are pushed down. Refused while edit mode is off or the board is stacked.",
|
|
116
|
+
invoke: (r, o) => r.resizeWidgetTo(o.id, o.w, o.h)
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
domHooks: {
|
|
120
|
+
root: {
|
|
121
|
+
attr: "data-component",
|
|
122
|
+
value: "dashboard-grid",
|
|
123
|
+
description: 'Also carries data-stacked="true" while the board shows one read-only column.'
|
|
124
|
+
},
|
|
125
|
+
instanceId: {
|
|
126
|
+
attr: "data-component-id",
|
|
127
|
+
sourceProp: "id",
|
|
128
|
+
description: "Sourced from the id prop."
|
|
129
|
+
},
|
|
130
|
+
item: {
|
|
131
|
+
attr: "data-widget-id",
|
|
132
|
+
description: "Each widget wrapper carries its layout id."
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
function q(r, o) {
|
|
137
|
+
return r.x < o.x + o.w && o.x < r.x + r.w && r.y < o.y + o.h && o.y < r.y + r.h;
|
|
138
|
+
}
|
|
139
|
+
function ue(r, o) {
|
|
140
|
+
const s = Math.max(1, r.minW ?? 1), u = Math.max(1, r.minH ?? 1), l = Math.min(o, r.maxW ?? o), b = r.maxH ?? Number.POSITIVE_INFINITY, a = Math.min(Math.max(r.w, s), l), h = Math.min(Math.max(r.h, u), b), i = Math.min(Math.max(0, r.x), o - a), m = Math.max(0, r.y);
|
|
141
|
+
return { ...r, x: i, y: m, w: a, h };
|
|
142
|
+
}
|
|
143
|
+
function H(r, o, s) {
|
|
144
|
+
const u = r.map((i) => ue(i, o)), l = [...u].sort((i, m) => i.id === s ? -1 : m.id === s ? 1 : i.y - m.y || i.x - m.x), b = [], a = s ? u.find((i) => i.id === s) : void 0;
|
|
145
|
+
for (const i of l) {
|
|
146
|
+
if (i.id !== s) {
|
|
147
|
+
if (a && q(a, i)) {
|
|
148
|
+
const m = { ...i, y: Math.max(0, a.y - i.h) };
|
|
149
|
+
!q(a, m) && !b.some((M) => M.id !== s && q(M, m)) && (i.y = m.y);
|
|
150
|
+
}
|
|
151
|
+
for (; b.some((m) => q(m, i)); )
|
|
152
|
+
i.y += 1;
|
|
153
|
+
for (; i.y > 0; ) {
|
|
154
|
+
const m = { ...i, y: i.y - 1 };
|
|
155
|
+
if (b.some((M) => q(M, m))) break;
|
|
156
|
+
i.y -= 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
b.push(i);
|
|
160
|
+
}
|
|
161
|
+
const h = new Map(b.map((i) => [i.id, i]));
|
|
162
|
+
return r.map((i) => h.get(i.id));
|
|
163
|
+
}
|
|
164
|
+
function be(r, o, s, u, l) {
|
|
165
|
+
const b = r.map(
|
|
166
|
+
(a) => a.id === o ? ue({ ...a, x: s, y: u }, l) : a
|
|
167
|
+
);
|
|
168
|
+
return H(b, l, o);
|
|
169
|
+
}
|
|
170
|
+
function he(r, o, s, u, l) {
|
|
171
|
+
const b = r.map(
|
|
172
|
+
(a) => a.id === o ? (
|
|
173
|
+
// Resizing never moves the widget: the width clamps to the space
|
|
174
|
+
// between its position and the grid edge (clampRect would slide it).
|
|
175
|
+
// minW wins over the edge clamp so clampRect cannot re-raise w and
|
|
176
|
+
// slide x as a side effect.
|
|
177
|
+
ue(
|
|
178
|
+
{
|
|
179
|
+
...a,
|
|
180
|
+
w: Math.max(a.minW ?? 1, Math.min(s, l - a.x)),
|
|
181
|
+
h: u
|
|
182
|
+
},
|
|
183
|
+
l
|
|
184
|
+
)
|
|
185
|
+
) : a
|
|
186
|
+
);
|
|
187
|
+
return H(b, l, o);
|
|
188
|
+
}
|
|
189
|
+
function $e(r, o, s, u) {
|
|
190
|
+
const l = Math.min(Math.max(1, s), o), b = r.reduce((a, h) => Math.max(a, h.y + h.h), 0);
|
|
191
|
+
for (let a = 0; a <= b; a += 1)
|
|
192
|
+
for (let h = 0; h <= o - l; h += 1) {
|
|
193
|
+
const i = {
|
|
194
|
+
x: h,
|
|
195
|
+
y: a,
|
|
196
|
+
w: l,
|
|
197
|
+
h: u
|
|
198
|
+
};
|
|
199
|
+
if (!r.some((m) => q(m, i)))
|
|
200
|
+
return { x: h, y: a };
|
|
201
|
+
}
|
|
202
|
+
return { x: 0, y: b };
|
|
203
|
+
}
|
|
204
|
+
function ft(r) {
|
|
205
|
+
return r.reduce((o, s) => Math.max(o, s.y + s.h), 0);
|
|
206
|
+
}
|
|
207
|
+
const pt = 24;
|
|
208
|
+
function Ae(r, o, s) {
|
|
209
|
+
return o === void 0 || !Number.isFinite(o) || o <= 0 ? !1 : !Number.isFinite(r) || r <= 0 ? s : s ? r < o + pt : r < o;
|
|
210
|
+
}
|
|
211
|
+
function mt(r, o) {
|
|
212
|
+
const s = new Map(o.map((u) => [u.id, u]));
|
|
213
|
+
return r.map((u, l) => ({ id: u, index: l, entry: s.get(u) })).sort((u, l) => !u.entry || !l.entry ? u.entry ? -1 : l.entry ? 1 : u.index - l.index : u.entry.y - l.entry.y || u.entry.x - l.entry.x || u.index - l.index).map(({ id: u }) => u);
|
|
214
|
+
}
|
|
215
|
+
const gt = ce(
|
|
216
|
+
[
|
|
217
|
+
"ds:grid ds:w-full",
|
|
218
|
+
"ds:gap-[var(--spacing-md)]",
|
|
219
|
+
// Edit-mode surface: tint the whole plane, draw faint cell lines, and
|
|
220
|
+
// reserve spare rows (--dg-min-block) so the AVAILABLE space reads at
|
|
221
|
+
// a glance instead of the board ending at the last occupied row.
|
|
222
|
+
"ds:data-[editing=true]:rounded-[var(--radius-lg)] ds:data-[editing=true]:bg-muted/10",
|
|
223
|
+
"ds:data-[editing=true]:[background-image:var(--dg-grid-lines)]",
|
|
224
|
+
"ds:data-[editing=true]:min-h-[var(--dg-min-block)]"
|
|
225
|
+
].join(" "),
|
|
226
|
+
{
|
|
227
|
+
variants: {
|
|
228
|
+
// Stacked: one full-width column; each row takes its widget's block
|
|
229
|
+
// size. Focus can fall back to the board here (see the focus effect),
|
|
230
|
+
// so it gets the kit's focus ring.
|
|
231
|
+
stacked: {
|
|
232
|
+
false: [
|
|
233
|
+
"ds:[grid-template-columns:repeat(var(--dg-cols),minmax(0,1fr))]",
|
|
234
|
+
"ds:[grid-auto-rows:var(--dg-row)]"
|
|
235
|
+
].join(" "),
|
|
236
|
+
true: [
|
|
237
|
+
"ds:grid-cols-1 ds:auto-rows-auto",
|
|
238
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
239
|
+
].join(" ")
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
defaultVariants: { stacked: !1 }
|
|
243
|
+
}
|
|
244
|
+
), bt = ce(
|
|
245
|
+
[
|
|
246
|
+
"ds:relative ds:min-h-0 ds:min-w-0 ds:overflow-hidden",
|
|
247
|
+
// Mirror of Card variant="elevated" so widgets read as kit cards.
|
|
248
|
+
"ds:rounded-[var(--radius-lg)] ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
|
|
249
|
+
"ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)]",
|
|
250
|
+
// Grabbed feedback (keyboard or pointer drag in flight).
|
|
251
|
+
"ds:data-[grabbed=true]:ring-[length:var(--focus-ring-width)] ds:data-[grabbed=true]:ring-ring ds:data-[grabbed=true]:z-10",
|
|
252
|
+
// Only reachable when stacking removes the focused edit control: the
|
|
253
|
+
// widget then takes focus itself (tabindex -1, set at that moment).
|
|
254
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
255
|
+
].join(" "),
|
|
256
|
+
{
|
|
257
|
+
variants: {
|
|
258
|
+
stacked: {
|
|
259
|
+
false: [
|
|
260
|
+
"ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
|
|
261
|
+
"ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
|
|
262
|
+
].join(" "),
|
|
263
|
+
true: "ds:col-span-full ds:row-auto"
|
|
264
|
+
},
|
|
265
|
+
stackedHeight: { grid: "", content: "" }
|
|
266
|
+
},
|
|
267
|
+
compoundVariants: [
|
|
268
|
+
{ stacked: !1, class: "ds:flex ds:flex-col" },
|
|
269
|
+
// At least the block size the widget has in the grid (h rows plus the
|
|
270
|
+
// h - 1 gaps). A minimum, not a fixed size: at 200% zoom the widget
|
|
271
|
+
// grows instead of clipping its content (WCAG 1.4.4, 1.4.10).
|
|
272
|
+
{
|
|
273
|
+
stacked: !0,
|
|
274
|
+
stackedHeight: "grid",
|
|
275
|
+
class: [
|
|
276
|
+
"ds:flex ds:flex-col",
|
|
277
|
+
"ds:[min-block-size:calc(var(--dg-h)*var(--dg-row)_+_(var(--dg-h)_-_1)*var(--spacing-md))]"
|
|
278
|
+
].join(" ")
|
|
279
|
+
},
|
|
280
|
+
// As tall as the content, or minStackedHeight. A grid, not a flex
|
|
281
|
+
// column, so the body row is a definite box a 100% chart can fill.
|
|
282
|
+
{
|
|
283
|
+
stacked: !0,
|
|
284
|
+
stackedHeight: "content",
|
|
285
|
+
class: [
|
|
286
|
+
"ds:grid ds:grid-cols-[minmax(0,1fr)] ds:grid-rows-[auto_1fr]",
|
|
287
|
+
"ds:[min-block-size:var(--dg-min-stacked)]"
|
|
288
|
+
].join(" ")
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
defaultVariants: { stacked: !1, stackedHeight: "grid" }
|
|
292
|
+
}
|
|
293
|
+
), ht = ce(
|
|
294
|
+
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]",
|
|
295
|
+
{
|
|
296
|
+
variants: {
|
|
297
|
+
// `box`: fill the widget's block size and clip to it. `content`: take
|
|
298
|
+
// the content's own height (the content-height stack), never a box.
|
|
299
|
+
fit: {
|
|
300
|
+
box: "ds:min-h-0 ds:flex-1 ds:overflow-hidden",
|
|
301
|
+
content: "ds:min-w-0"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
defaultVariants: { fit: "box" }
|
|
305
|
+
}
|
|
306
|
+
), yt = ce(
|
|
307
|
+
[
|
|
308
|
+
"ds:m-0 ds:min-w-0 ds:flex-1 ds:truncate ds:text-sm ds:font-medium",
|
|
309
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
310
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
311
|
+
].join(" ")
|
|
312
|
+
), Fe = rt(
|
|
313
|
+
null
|
|
314
|
+
);
|
|
315
|
+
function ae(r, o) {
|
|
316
|
+
Ze.forEach(r, (s) => {
|
|
317
|
+
if (et(s)) {
|
|
318
|
+
if (s.type === tt) {
|
|
319
|
+
ae(
|
|
320
|
+
s.props.children,
|
|
321
|
+
o
|
|
322
|
+
);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
o(s);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function je({
|
|
330
|
+
id: r,
|
|
331
|
+
title: o,
|
|
332
|
+
minStackedHeight: s,
|
|
333
|
+
actionsSlot: u,
|
|
334
|
+
children: l
|
|
335
|
+
}) {
|
|
336
|
+
var g, ne, P;
|
|
337
|
+
const { t: b } = We("ui"), a = Qe(Fe), h = x(null), i = a == null ? void 0 : a.layoutById.get(r), [m, M] = L(null), [$, ee] = L(!1), [te, E] = L(!1), [le, re] = L(!1);
|
|
338
|
+
if (X(() => {
|
|
339
|
+
if (!m) return;
|
|
340
|
+
const p = () => ee(m.scrollWidth > m.clientWidth);
|
|
341
|
+
p();
|
|
342
|
+
const N = typeof document < "u" ? document.fonts : void 0;
|
|
343
|
+
N == null || N.addEventListener("loadingdone", p);
|
|
344
|
+
const v = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(p);
|
|
345
|
+
return v == null || v.observe(m), () => {
|
|
346
|
+
N == null || N.removeEventListener("loadingdone", p), v == null || v.disconnect();
|
|
347
|
+
};
|
|
348
|
+
}, [m, o]), X(() => {
|
|
349
|
+
$ || re(!1);
|
|
350
|
+
}, [$]), _(() => {
|
|
351
|
+
const p = h.current;
|
|
352
|
+
!p || !i || (p.style.setProperty("--dg-x", String(i.x + 1)), p.style.setProperty("--dg-y", String(i.y + 1)), p.style.setProperty("--dg-w", String(i.w)), p.style.setProperty("--dg-h", String(i.h)), p.style.setProperty(
|
|
353
|
+
"--dg-min-stacked",
|
|
354
|
+
s !== void 0 && Number.isFinite(s) && s > 0 ? `${s}px` : "auto"
|
|
355
|
+
));
|
|
356
|
+
}, [i == null ? void 0 : i.x, i == null ? void 0 : i.y, i == null ? void 0 : i.w, i == null ? void 0 : i.h, i, s]), !a || !i) return null;
|
|
357
|
+
const y = ((g = a.grab) == null ? void 0 : g.id) === r, A = a.editing, R = a.headingLevel ? `h${a.headingLevel}` : "span";
|
|
358
|
+
return /* @__PURE__ */ Z(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
ref: h,
|
|
362
|
+
role: "listitem",
|
|
363
|
+
"aria-label": o,
|
|
364
|
+
"data-component": "dashboard-grid-widget",
|
|
365
|
+
"data-widget-id": r,
|
|
366
|
+
"data-grabbed": y || void 0,
|
|
367
|
+
className: bt({
|
|
368
|
+
stacked: a.stacked,
|
|
369
|
+
stackedHeight: a.stackedHeight
|
|
370
|
+
}),
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ Z("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]", children: [
|
|
373
|
+
A ? /* @__PURE__ */ G(
|
|
374
|
+
ge,
|
|
375
|
+
{
|
|
376
|
+
size: "sm",
|
|
377
|
+
intent: "outline",
|
|
378
|
+
type: "button",
|
|
379
|
+
icon: /* @__PURE__ */ G(ot, {}),
|
|
380
|
+
"aria-label": b("dashboardGrid.move", { title: o }),
|
|
381
|
+
"aria-pressed": y && ((ne = a.grab) == null ? void 0 : ne.kind) === "move",
|
|
382
|
+
className: "ds:cursor-grab ds:touch-none ds:bg-[var(--card)]",
|
|
383
|
+
onPointerDown: (p) => a.startPointerGrab("move", r, p),
|
|
384
|
+
onKeyDown: (p) => a.keyboardStep(p, r),
|
|
385
|
+
onClick: () => a.startKeyboardGrab("move", r)
|
|
386
|
+
}
|
|
387
|
+
) : null,
|
|
388
|
+
/* @__PURE__ */ G(
|
|
389
|
+
nt,
|
|
390
|
+
{
|
|
391
|
+
label: o,
|
|
392
|
+
open: $ && le,
|
|
393
|
+
onOpenChange: (p) => re(p && $),
|
|
394
|
+
children: /* @__PURE__ */ G(
|
|
395
|
+
R,
|
|
396
|
+
{
|
|
397
|
+
ref: M,
|
|
398
|
+
tabIndex: $ || te ? 0 : void 0,
|
|
399
|
+
onFocus: () => E(!0),
|
|
400
|
+
onBlur: () => E(!1),
|
|
401
|
+
className: yt(),
|
|
402
|
+
children: o
|
|
403
|
+
}
|
|
404
|
+
)
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
u,
|
|
408
|
+
A && a.canRemove ? /* @__PURE__ */ G(
|
|
409
|
+
ge,
|
|
410
|
+
{
|
|
411
|
+
size: "sm",
|
|
412
|
+
intent: "outline",
|
|
413
|
+
type: "button",
|
|
414
|
+
icon: /* @__PURE__ */ G(dt, {}),
|
|
415
|
+
className: "ds:bg-[var(--card)]",
|
|
416
|
+
"aria-label": b("dashboardGrid.remove", { title: o }),
|
|
417
|
+
onClick: () => a.requestRemove(r)
|
|
418
|
+
}
|
|
419
|
+
) : null
|
|
420
|
+
] }),
|
|
421
|
+
/* @__PURE__ */ G(
|
|
422
|
+
"div",
|
|
423
|
+
{
|
|
424
|
+
className: ht({
|
|
425
|
+
fit: a.stacked && a.stackedHeight === "content" ? "content" : "box"
|
|
426
|
+
}),
|
|
427
|
+
children: l
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
A ? /* @__PURE__ */ G("span", { className: "ds:absolute ds:bottom-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]", children: /* @__PURE__ */ G(
|
|
431
|
+
ge,
|
|
432
|
+
{
|
|
433
|
+
size: "sm",
|
|
434
|
+
intent: "outline",
|
|
435
|
+
type: "button",
|
|
436
|
+
icon: /* @__PURE__ */ G(ut, {}),
|
|
437
|
+
flipIconInRtl: !0,
|
|
438
|
+
"aria-label": b("dashboardGrid.resize", { title: o }),
|
|
439
|
+
"aria-pressed": y && ((P = a.grab) == null ? void 0 : P.kind) === "resize",
|
|
440
|
+
className: "ds:touch-none ds:bg-[var(--card)]",
|
|
441
|
+
onPointerDown: (p) => a.startPointerGrab("resize", r, p),
|
|
442
|
+
onKeyDown: (p) => a.keyboardStep(p, r),
|
|
443
|
+
onClick: () => a.startKeyboardGrab("resize", r)
|
|
444
|
+
}
|
|
445
|
+
) }) : null
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
je.displayName = "DashboardGrid.Widget";
|
|
451
|
+
const _e = Be(
|
|
452
|
+
({
|
|
453
|
+
"aria-label": r,
|
|
454
|
+
id: o,
|
|
455
|
+
cols: s = 12,
|
|
456
|
+
rowHeight: u = 96,
|
|
457
|
+
layout: l,
|
|
458
|
+
defaultLayout: b,
|
|
459
|
+
onLayoutChange: a,
|
|
460
|
+
editing: h = !1,
|
|
461
|
+
onRemoveWidget: i,
|
|
462
|
+
onRequestAdd: m,
|
|
463
|
+
stackBelow: M,
|
|
464
|
+
onStackedChange: $,
|
|
465
|
+
stackedHeight: ee = "grid",
|
|
466
|
+
widgetHeadingLevel: te,
|
|
467
|
+
children: E,
|
|
468
|
+
className: le
|
|
469
|
+
}, re) => {
|
|
470
|
+
const { t: y } = We("ui"), A = x(null), R = x(null), [g, ne] = L(!1), P = x(!1);
|
|
471
|
+
P.current = g;
|
|
472
|
+
const p = x(null), N = C((e) => {
|
|
473
|
+
var d;
|
|
474
|
+
if (e === P.current) return;
|
|
475
|
+
const t = A.current, n = typeof document < "u" ? document.activeElement : null;
|
|
476
|
+
p.current = t && n instanceof HTMLElement && t.contains(n) ? {
|
|
477
|
+
element: n,
|
|
478
|
+
widgetId: ((d = n.closest("[data-widget-id]")) == null ? void 0 : d.getAttribute("data-widget-id")) ?? null
|
|
479
|
+
} : null, P.current = e, ne(e);
|
|
480
|
+
}, []);
|
|
481
|
+
_(() => {
|
|
482
|
+
const e = A.current;
|
|
483
|
+
if (!e) return;
|
|
484
|
+
if (M === void 0) {
|
|
485
|
+
N(!1);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (N(
|
|
489
|
+
Ae(e.offsetWidth, M, P.current)
|
|
490
|
+
), typeof ResizeObserver > "u") return;
|
|
491
|
+
const t = new ResizeObserver((n) => {
|
|
492
|
+
var f, w;
|
|
493
|
+
const d = n[n.length - 1];
|
|
494
|
+
if (!d) return;
|
|
495
|
+
const c = ((w = (f = d.borderBoxSize) == null ? void 0 : f[0]) == null ? void 0 : w.inlineSize) ?? d.contentRect.width;
|
|
496
|
+
N(Ae(c, M, P.current));
|
|
497
|
+
});
|
|
498
|
+
return t.observe(e), () => t.disconnect();
|
|
499
|
+
}, [M, N]);
|
|
500
|
+
const v = h && !g, ye = j(() => {
|
|
501
|
+
const e = [];
|
|
502
|
+
return ae(E, (t) => {
|
|
503
|
+
t.props.id && e.push(t.props.id);
|
|
504
|
+
}), e;
|
|
505
|
+
}, [E]), ve = j(() => {
|
|
506
|
+
const e = /* @__PURE__ */ new Map();
|
|
507
|
+
return ae(E, (t) => {
|
|
508
|
+
t.props.id && e.set(t.props.id, {
|
|
509
|
+
defaultW: t.props.defaultW ?? 4,
|
|
510
|
+
defaultH: t.props.defaultH ?? 2
|
|
511
|
+
});
|
|
512
|
+
}), e;
|
|
513
|
+
}, [E]), [Oe, Ke] = L(() => b ?? []), we = l ?? Oe, I = C(
|
|
514
|
+
(e) => {
|
|
515
|
+
l === void 0 && Ke(e), a == null || a(e);
|
|
516
|
+
},
|
|
517
|
+
[l, a]
|
|
518
|
+
), { resolved: k, autoPlaced: xe } = j(() => {
|
|
519
|
+
const e = we.map((d) => ue(d, s)), t = ye.filter(
|
|
520
|
+
(d) => !e.some((c) => c.id === d)
|
|
521
|
+
);
|
|
522
|
+
if (t.length === 0)
|
|
523
|
+
return { resolved: e, autoPlaced: !1 };
|
|
524
|
+
const n = [...e];
|
|
525
|
+
for (const d of t) {
|
|
526
|
+
const c = ve.get(d) ?? { defaultW: 4, defaultH: 2 }, f = Math.min(c.defaultW, s), w = $e(n, s, f, c.defaultH);
|
|
527
|
+
n.push({ id: d, x: w.x, y: w.y, w: f, h: c.defaultH });
|
|
528
|
+
}
|
|
529
|
+
return { resolved: H(n, s), autoPlaced: !0 };
|
|
530
|
+
}, [we, ye, ve, s]), ke = x("");
|
|
531
|
+
X(() => {
|
|
532
|
+
if (!xe) return;
|
|
533
|
+
const e = k.map(
|
|
534
|
+
(t) => `${t.id}:${t.x},${t.y},${t.w},${t.h}`
|
|
535
|
+
).join("|");
|
|
536
|
+
ke.current !== e && (ke.current = e, I(k));
|
|
537
|
+
}, [xe, k, I]);
|
|
538
|
+
const [Ve, He] = L(null), [z, Ge] = L(null), [Ue, O] = L(""), fe = x(null), W = x(null), B = x(null), se = x(!1), J = x(s);
|
|
539
|
+
J.current = s;
|
|
540
|
+
const U = x(k);
|
|
541
|
+
U.current = k;
|
|
542
|
+
const F = C((e) => {
|
|
543
|
+
fe.current = e, He(e);
|
|
544
|
+
}, []), ie = C(
|
|
545
|
+
(e, t, n) => {
|
|
546
|
+
const d = { kind: e, id: t, via: n };
|
|
547
|
+
W.current = { ...d, baseLayout: U.current }, Ge(d), F(U.current);
|
|
548
|
+
},
|
|
549
|
+
[F]
|
|
550
|
+
), Q = Ve ?? k, Me = j(
|
|
551
|
+
() => new Map(Q.map((e) => [e.id, e])),
|
|
552
|
+
[Q]
|
|
553
|
+
), Se = C(
|
|
554
|
+
(e, t) => {
|
|
555
|
+
O(
|
|
556
|
+
e === "move" ? y("dashboardGrid.movedTo", { col: t.x + 1, row: t.y + 1 }) : y("dashboardGrid.resizedTo", { cols: t.w, rows: t.h })
|
|
557
|
+
);
|
|
558
|
+
},
|
|
559
|
+
[y]
|
|
560
|
+
), S = C(
|
|
561
|
+
(e) => {
|
|
562
|
+
const t = fe.current, n = W.current;
|
|
563
|
+
if (W.current = null, B.current = null, Ge(null), F(null), !e || !t || !n) {
|
|
564
|
+
O(y("dashboardGrid.cancelled"));
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
const d = H(t, J.current), c = (w) => w.map((T) => `${T.id}:${T.x},${T.y},${T.w},${T.h}`).join("|");
|
|
568
|
+
if (c(d) === c(U.current)) {
|
|
569
|
+
O(y("dashboardGrid.cancelled"));
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
I(d);
|
|
573
|
+
const f = d.find((w) => w.id === n.id);
|
|
574
|
+
O(
|
|
575
|
+
f ? y("dashboardGrid.droppedAt", {
|
|
576
|
+
col: f.x + 1,
|
|
577
|
+
row: f.y + 1
|
|
578
|
+
}) : y("dashboardGrid.cancelled")
|
|
579
|
+
);
|
|
580
|
+
},
|
|
581
|
+
[F, I, y]
|
|
582
|
+
), Re = C(
|
|
583
|
+
(e, t) => {
|
|
584
|
+
if (!v) return;
|
|
585
|
+
if (se.current) {
|
|
586
|
+
se.current = !1;
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
const n = W.current;
|
|
590
|
+
if ((n == null ? void 0 : n.via) !== "pointer") {
|
|
591
|
+
if (n && n.id === t && n.kind === e) {
|
|
592
|
+
S(!0);
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
ie(e, t, "keyboard"), O(
|
|
596
|
+
y(e === "move" ? "dashboardGrid.grabbed" : "dashboardGrid.resizeGrabbed")
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
[v, ie, S, y]
|
|
601
|
+
), Ne = C(
|
|
602
|
+
(e, t) => {
|
|
603
|
+
const n = W.current;
|
|
604
|
+
if (!n || n.id !== t || n.via !== "keyboard")
|
|
605
|
+
return;
|
|
606
|
+
if (e.key === "Escape") {
|
|
607
|
+
e.preventDefault(), S(!1);
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) return;
|
|
611
|
+
e.preventDefault();
|
|
612
|
+
const c = typeof window < "u" && R.current ? window.getComputedStyle(R.current).direction === "rtl" : !1, f = e.key === "ArrowRight" ? c ? -1 : 1 : e.key === "ArrowLeft" ? c ? 1 : -1 : 0, w = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0, D = (fe.current ?? n.baseLayout).find((Y) => Y.id === t);
|
|
613
|
+
if (!D) return;
|
|
614
|
+
const K = n.kind === "move" ? be(
|
|
615
|
+
n.baseLayout,
|
|
616
|
+
t,
|
|
617
|
+
D.x + f,
|
|
618
|
+
D.y + w,
|
|
619
|
+
s
|
|
620
|
+
) : he(
|
|
621
|
+
n.baseLayout,
|
|
622
|
+
t,
|
|
623
|
+
D.w + f,
|
|
624
|
+
D.h + w,
|
|
625
|
+
s
|
|
626
|
+
);
|
|
627
|
+
F(K);
|
|
628
|
+
const V = K.find((Y) => Y.id === t);
|
|
629
|
+
V && Se(n.kind, V);
|
|
630
|
+
},
|
|
631
|
+
[s, S, F, Se]
|
|
632
|
+
), Te = C(
|
|
633
|
+
(e, t, n) => {
|
|
634
|
+
var V, Y, Ce, Ie;
|
|
635
|
+
if (!v || W.current) return;
|
|
636
|
+
const d = R.current, c = U.current.find((Xe) => Xe.id === t);
|
|
637
|
+
if (!d || !c) return;
|
|
638
|
+
n.preventDefault(), (Y = (V = n.currentTarget).focus) == null || Y.call(V);
|
|
639
|
+
const f = d.getBoundingClientRect();
|
|
640
|
+
if (f.width <= 0) return;
|
|
641
|
+
const w = window.getComputedStyle(d), T = Number.parseFloat(w.columnGap) || 0, D = Number.parseFloat(w.rowGap) || 0, K = (f.width - T * (s - 1)) / s;
|
|
642
|
+
B.current = {
|
|
643
|
+
kind: e,
|
|
644
|
+
id: t,
|
|
645
|
+
pointerId: n.pointerId,
|
|
646
|
+
startClientX: n.clientX,
|
|
647
|
+
startClientY: n.clientY,
|
|
648
|
+
origin: c,
|
|
649
|
+
colStride: K + T,
|
|
650
|
+
rowStride: u + D,
|
|
651
|
+
isRtl: w.direction === "rtl"
|
|
652
|
+
};
|
|
653
|
+
try {
|
|
654
|
+
(Ie = (Ce = n.currentTarget).setPointerCapture) == null || Ie.call(Ce, n.pointerId);
|
|
655
|
+
} catch {
|
|
656
|
+
}
|
|
657
|
+
ie(e, t, "pointer");
|
|
658
|
+
},
|
|
659
|
+
[v, s, u, ie]
|
|
660
|
+
);
|
|
661
|
+
X(() => {
|
|
662
|
+
if (!z || z.via !== "pointer") return;
|
|
663
|
+
const e = (d) => {
|
|
664
|
+
const c = B.current, f = W.current;
|
|
665
|
+
if (!c || !f || d.pointerId !== c.pointerId)
|
|
666
|
+
return;
|
|
667
|
+
const w = d.clientX - c.startClientX, T = d.clientY - c.startClientY, D = Math.round(w / c.colStride) * (c.isRtl ? -1 : 1), K = Math.round(T / c.rowStride), V = c.kind === "move" ? be(
|
|
668
|
+
f.baseLayout,
|
|
669
|
+
c.id,
|
|
670
|
+
c.origin.x + D,
|
|
671
|
+
c.origin.y + K,
|
|
672
|
+
J.current
|
|
673
|
+
) : he(
|
|
674
|
+
f.baseLayout,
|
|
675
|
+
c.id,
|
|
676
|
+
c.origin.w + D,
|
|
677
|
+
c.origin.h + K,
|
|
678
|
+
J.current
|
|
679
|
+
);
|
|
680
|
+
F(V);
|
|
681
|
+
}, t = (d) => {
|
|
682
|
+
const c = B.current;
|
|
683
|
+
!c || d.pointerId !== c.pointerId || (se.current = !0, S(!0));
|
|
684
|
+
}, n = (d) => {
|
|
685
|
+
const c = B.current;
|
|
686
|
+
!c || d.pointerId !== c.pointerId || (se.current = !0, S(!1));
|
|
687
|
+
};
|
|
688
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", n), () => {
|
|
689
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", n);
|
|
690
|
+
};
|
|
691
|
+
}, [z, S, F]), X(() => {
|
|
692
|
+
if (!z) return;
|
|
693
|
+
const e = (t) => {
|
|
694
|
+
t.key === "Escape" && S(!1);
|
|
695
|
+
};
|
|
696
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
697
|
+
}, [z, S]), X(() => {
|
|
698
|
+
if (!z || z.via !== "keyboard") return;
|
|
699
|
+
const e = (n) => {
|
|
700
|
+
var c;
|
|
701
|
+
const d = n.relatedTarget;
|
|
702
|
+
(!d || !((c = R.current) != null && c.contains(d))) && S(!1);
|
|
703
|
+
}, t = R.current;
|
|
704
|
+
return t == null || t.addEventListener("focusout", e), () => t == null ? void 0 : t.removeEventListener("focusout", e);
|
|
705
|
+
}, [z, S]), _(() => {
|
|
706
|
+
g && (W.current && S(!1), h && O(y("dashboardGrid.stackedReadOnly")));
|
|
707
|
+
}, [g, h, S, y]), _(() => {
|
|
708
|
+
var c;
|
|
709
|
+
const e = p.current;
|
|
710
|
+
p.current = null;
|
|
711
|
+
const t = A.current;
|
|
712
|
+
if (!e || !t) return;
|
|
713
|
+
const n = document.activeElement;
|
|
714
|
+
if (n === e.element || n !== null && n !== document.body) return;
|
|
715
|
+
if (t.contains(e.element)) {
|
|
716
|
+
e.element.focus();
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
const d = e.widgetId ? Array.from(
|
|
720
|
+
t.querySelectorAll("[data-widget-id]")
|
|
721
|
+
).find(
|
|
722
|
+
(f) => f.getAttribute("data-widget-id") === e.widgetId
|
|
723
|
+
) : void 0;
|
|
724
|
+
if (d) {
|
|
725
|
+
d.setAttribute("tabindex", "-1"), d.focus();
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
(c = R.current) == null || c.focus();
|
|
729
|
+
}, [g]);
|
|
730
|
+
const oe = x($);
|
|
731
|
+
oe.current = $;
|
|
732
|
+
const Ee = x(!1);
|
|
733
|
+
_(() => {
|
|
734
|
+
var e;
|
|
735
|
+
Ee.current !== g && (Ee.current = g, (e = oe.current) == null || e.call(oe, g));
|
|
736
|
+
}, [g]), _(() => {
|
|
737
|
+
const e = R.current;
|
|
738
|
+
e && (e.style.setProperty("--dg-cols", String(s)), e.style.setProperty("--dg-row", `${u}px`));
|
|
739
|
+
}, [s, u]);
|
|
740
|
+
const Pe = ft(Q);
|
|
741
|
+
_(() => {
|
|
742
|
+
const e = R.current;
|
|
743
|
+
e && (e.style.setProperty(
|
|
744
|
+
"--dg-grid-lines",
|
|
745
|
+
`repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${s})), repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc(${u}px + var(--spacing-md)))`
|
|
746
|
+
), e.style.setProperty(
|
|
747
|
+
"--dg-min-block",
|
|
748
|
+
`calc(${Pe + 2} * (${u}px + var(--spacing-md)) - var(--spacing-md))`
|
|
749
|
+
));
|
|
750
|
+
}, [s, u, Pe]);
|
|
751
|
+
const ze = x(null), pe = v && !!m, de = j(
|
|
752
|
+
() => pe ? $e(Q, s, 2, 2) : null,
|
|
753
|
+
[pe, Q, s]
|
|
754
|
+
);
|
|
755
|
+
_(() => {
|
|
756
|
+
const e = ze.current;
|
|
757
|
+
!e || !de || (e.style.setProperty("--dg-x", String(de.x + 1)), e.style.setProperty("--dg-y", String(de.y + 1)), e.style.setProperty("--dg-w", "2"), e.style.setProperty("--dg-h", "2"));
|
|
758
|
+
}, [de]);
|
|
759
|
+
const De = C(
|
|
760
|
+
(e) => {
|
|
761
|
+
I(
|
|
762
|
+
H(
|
|
763
|
+
U.current.filter((t) => t.id !== e),
|
|
764
|
+
J.current
|
|
765
|
+
)
|
|
766
|
+
), O(y("dashboardGrid.removed")), i == null || i(e), requestAnimationFrame(() => {
|
|
767
|
+
const t = R.current;
|
|
768
|
+
if (!t) return;
|
|
769
|
+
const n = t.querySelector("button");
|
|
770
|
+
n ? n.focus() : t.focus();
|
|
771
|
+
});
|
|
772
|
+
},
|
|
773
|
+
[I, i, y]
|
|
774
|
+
), me = j(
|
|
775
|
+
() => ({
|
|
776
|
+
moveWidgetTo(e, t, n) {
|
|
777
|
+
return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
|
|
778
|
+
H(
|
|
779
|
+
be(k, e, Math.round(t), Math.round(n), s),
|
|
780
|
+
s
|
|
781
|
+
)
|
|
782
|
+
), !0);
|
|
783
|
+
},
|
|
784
|
+
resizeWidgetTo(e, t, n) {
|
|
785
|
+
return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
|
|
786
|
+
H(
|
|
787
|
+
he(
|
|
788
|
+
k,
|
|
789
|
+
e,
|
|
790
|
+
Math.round(t),
|
|
791
|
+
Math.round(n),
|
|
792
|
+
s
|
|
793
|
+
),
|
|
794
|
+
s
|
|
795
|
+
)
|
|
796
|
+
), !0);
|
|
797
|
+
},
|
|
798
|
+
getGridState() {
|
|
799
|
+
return {
|
|
800
|
+
cols: s,
|
|
801
|
+
editing: h,
|
|
802
|
+
stacked: g,
|
|
803
|
+
layout: k.map((e) => ({ ...e }))
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
}),
|
|
807
|
+
[v, h, g, k, s, I]
|
|
808
|
+
);
|
|
809
|
+
Je(re, () => me, [me]), st(lt, me, o);
|
|
810
|
+
const Ye = j(
|
|
811
|
+
() => ({
|
|
812
|
+
editing: v,
|
|
813
|
+
stacked: g,
|
|
814
|
+
stackedHeight: ee,
|
|
815
|
+
headingLevel: te,
|
|
816
|
+
layoutById: Me,
|
|
817
|
+
grab: z,
|
|
818
|
+
canRemove: !!i,
|
|
819
|
+
requestRemove: De,
|
|
820
|
+
startKeyboardGrab: Re,
|
|
821
|
+
keyboardStep: Ne,
|
|
822
|
+
startPointerGrab: Te
|
|
823
|
+
}),
|
|
824
|
+
[
|
|
825
|
+
v,
|
|
826
|
+
g,
|
|
827
|
+
ee,
|
|
828
|
+
te,
|
|
829
|
+
Me,
|
|
830
|
+
z,
|
|
831
|
+
i,
|
|
832
|
+
De,
|
|
833
|
+
Re,
|
|
834
|
+
Ne,
|
|
835
|
+
Te
|
|
836
|
+
]
|
|
837
|
+
), qe = j(() => {
|
|
838
|
+
if (M === void 0) return E;
|
|
839
|
+
const e = [], t = /* @__PURE__ */ new Map(), n = [];
|
|
840
|
+
return ae(E, (d) => {
|
|
841
|
+
const c = d.props.id;
|
|
842
|
+
if (c && !t.has(c)) {
|
|
843
|
+
const f = Le(d, {
|
|
844
|
+
key: `widget:${c}:${d.key ?? ""}`
|
|
845
|
+
});
|
|
846
|
+
t.set(c, f), e.push(f);
|
|
847
|
+
} else {
|
|
848
|
+
const f = Le(d, {
|
|
849
|
+
key: d.key === null ? `child:at:${n.length}` : `child:key:${d.key}`
|
|
850
|
+
});
|
|
851
|
+
n.push(f), e.push(f);
|
|
852
|
+
}
|
|
853
|
+
}), g ? [
|
|
854
|
+
...mt([...t.keys()], k).map(
|
|
855
|
+
(d) => t.get(d)
|
|
856
|
+
),
|
|
857
|
+
...n
|
|
858
|
+
] : e;
|
|
859
|
+
}, [M, E, g, k]);
|
|
860
|
+
return /* @__PURE__ */ Z(
|
|
861
|
+
"div",
|
|
862
|
+
{
|
|
863
|
+
ref: A,
|
|
864
|
+
"data-component": "dashboard-grid",
|
|
865
|
+
"data-component-id": o,
|
|
866
|
+
"data-editing": v || void 0,
|
|
867
|
+
"data-stacked": g || void 0,
|
|
868
|
+
className: `ds:block ds:w-full ${le ?? ""}`.trim(),
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ G("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: Ue }),
|
|
871
|
+
/* @__PURE__ */ Z(
|
|
872
|
+
"div",
|
|
873
|
+
{
|
|
874
|
+
ref: R,
|
|
875
|
+
role: "list",
|
|
876
|
+
"aria-label": r,
|
|
877
|
+
tabIndex: -1,
|
|
878
|
+
"data-editing": v || void 0,
|
|
879
|
+
"data-stacked": g || void 0,
|
|
880
|
+
className: gt({ stacked: g }),
|
|
881
|
+
children: [
|
|
882
|
+
/* @__PURE__ */ G(Fe.Provider, { value: Ye, children: qe }),
|
|
883
|
+
pe ? (
|
|
884
|
+
// role="list" allows only listitem children — the tile wrapper
|
|
885
|
+
// carries the grid placement, the button fills it.
|
|
886
|
+
/* @__PURE__ */ G(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
ref: ze,
|
|
890
|
+
role: "listitem",
|
|
891
|
+
className: [
|
|
892
|
+
"ds:flex",
|
|
893
|
+
"ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
|
|
894
|
+
"ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
|
|
895
|
+
].join(" "),
|
|
896
|
+
children: /* @__PURE__ */ Z(
|
|
897
|
+
"button",
|
|
898
|
+
{
|
|
899
|
+
type: "button",
|
|
900
|
+
onClick: m,
|
|
901
|
+
className: [
|
|
902
|
+
"ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
903
|
+
"ds:rounded-[var(--radius-lg)] ds:border ds:border-dashed ds:border-border",
|
|
904
|
+
"ds:text-sm ds:text-muted-foreground ds:transition-colors",
|
|
905
|
+
"ds:hover:bg-muted/10 ds:hover:text-foreground",
|
|
906
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring"
|
|
907
|
+
].join(" "),
|
|
908
|
+
children: [
|
|
909
|
+
/* @__PURE__ */ G(it, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
910
|
+
y("dashboardGrid.add")
|
|
911
|
+
]
|
|
912
|
+
}
|
|
913
|
+
)
|
|
914
|
+
}
|
|
915
|
+
)
|
|
916
|
+
) : null
|
|
917
|
+
]
|
|
918
|
+
}
|
|
919
|
+
)
|
|
920
|
+
]
|
|
921
|
+
}
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
_e.displayName = "DashboardGrid";
|
|
926
|
+
const zt = Object.assign(_e, {
|
|
927
|
+
Widget: je
|
|
928
|
+
});
|
|
929
|
+
export {
|
|
930
|
+
zt as D,
|
|
931
|
+
lt as d
|
|
932
|
+
};
|
|
933
|
+
//# sourceMappingURL=dashboard-grid-SAGjktTs.js.map
|