@alfadocs/ui-kit 0.1.3 → 0.1.5
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/{agenda-card-C_hQGErS.js → agenda-card-DIWDvWum.js} +10 -10
- package/dist/_chunks/agenda-card-DIWDvWum.js.map +1 -0
- package/dist/_chunks/{agenda-tray-CBaVMJLO.js → agenda-tray-BqQZwiHc.js} +5 -5
- package/dist/_chunks/{agenda-tray-CBaVMJLO.js.map → agenda-tray-BqQZwiHc.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-K94oVLG2.js → ai-prompt-input-CI27KmZ1.js} +4 -4
- package/dist/_chunks/ai-prompt-input-CI27KmZ1.js.map +1 -0
- package/dist/_chunks/{alert-rOM4EG0P.js → alert-BlOUMkXj.js} +39 -39
- package/dist/_chunks/alert-BlOUMkXj.js.map +1 -0
- package/dist/_chunks/{audio-recorder-Cn8z2zC9.js → audio-recorder-B-8SKgKn.js} +5 -5
- package/dist/_chunks/{audio-recorder-Cn8z2zC9.js.map → audio-recorder-B-8SKgKn.js.map} +1 -1
- package/dist/_chunks/{autocomplete.agent-DRrp-Rsx.js → autocomplete.agent-DqOy0_1P.js} +31 -31
- package/dist/_chunks/autocomplete.agent-DqOy0_1P.js.map +1 -0
- package/dist/_chunks/{avatar-Biffh-_H.js → avatar-Dcr6XuDQ.js} +19 -19
- package/dist/_chunks/avatar-Dcr6XuDQ.js.map +1 -0
- package/dist/_chunks/{balance-cell-renderer-CiyezQhi.js → balance-cell-renderer-BRWt3neo.js} +166 -166
- package/dist/_chunks/balance-cell-renderer-BRWt3neo.js.map +1 -0
- package/dist/_chunks/breadcrumb-D6xpsP7n.js +293 -0
- package/dist/_chunks/breadcrumb-D6xpsP7n.js.map +1 -0
- package/dist/_chunks/{button-7dTew-IV.js → button-7mLWcMp_.js} +9 -9
- package/dist/_chunks/{button-7dTew-IV.js.map → button-7mLWcMp_.js.map} +1 -1
- package/dist/_chunks/{calendar-BkDeDTaX.js → calendar-nGEgelJs.js} +100 -100
- package/dist/_chunks/calendar-nGEgelJs.js.map +1 -0
- package/dist/_chunks/{chat-input-xiBIujMv.js → chat-input-DsIrWM4f.js} +2 -2
- package/dist/_chunks/{chat-input-xiBIujMv.js.map → chat-input-DsIrWM4f.js.map} +1 -1
- package/dist/_chunks/{chat-message-BtxUyugB.js → chat-message-ByouZpPP.js} +3 -3
- package/dist/_chunks/{chat-message-BtxUyugB.js.map → chat-message-ByouZpPP.js.map} +1 -1
- package/dist/_chunks/{checkbox-Ni6C_KJg.js → checkbox-DNK4qS2_.js} +13 -13
- package/dist/_chunks/checkbox-DNK4qS2_.js.map +1 -0
- package/dist/_chunks/{checkbox-group-BFZ4oN5t.js → checkbox-group-CWpGZEF6.js} +13 -13
- package/dist/_chunks/checkbox-group-CWpGZEF6.js.map +1 -0
- package/dist/_chunks/{collapsible-fFMqzpdL.js → collapsible-D4LOdLxp.js} +18 -18
- package/dist/_chunks/collapsible-D4LOdLxp.js.map +1 -0
- package/dist/_chunks/{color-picker-Cl3KdjJd.js → color-picker-e9PmpaGH.js} +161 -161
- package/dist/_chunks/color-picker-e9PmpaGH.js.map +1 -0
- package/dist/_chunks/{combobox.agent-DjdivI3X.js → combobox.agent-ByobCLJ_.js} +28 -28
- package/dist/_chunks/combobox.agent-ByobCLJ_.js.map +1 -0
- package/dist/_chunks/{command-palette.agent-BUjzr2ET.js → command-palette.agent-js2rxgeR.js} +117 -117
- package/dist/_chunks/command-palette.agent-js2rxgeR.js.map +1 -0
- package/dist/_chunks/{description-list-C_1NX8P3.js → description-list-DvJbp6Yg.js} +2 -2
- package/dist/_chunks/{description-list-C_1NX8P3.js.map → description-list-DvJbp6Yg.js.map} +1 -1
- package/dist/_chunks/{dialog.agent-C2lP9H0h.js → dialog.agent-DEG_fVzG.js} +42 -42
- package/dist/_chunks/dialog.agent-DEG_fVzG.js.map +1 -0
- package/dist/_chunks/{dropdown-menu-2HgU1Emf.js → dropdown-menu-JNo66A-j.js} +2 -2
- package/dist/_chunks/dropdown-menu-JNo66A-j.js.map +1 -0
- package/dist/_chunks/{empty-state-BHrItOiE.js → empty-state-DQPtRp2b.js} +2 -2
- package/dist/_chunks/{empty-state-BHrItOiE.js.map → empty-state-DQPtRp2b.js.map} +1 -1
- package/dist/_chunks/{file-upload.agent-LlC0W468.js → file-upload.agent-B9AN82LA.js} +2 -2
- package/dist/_chunks/{file-upload.agent-LlC0W468.js.map → file-upload.agent-B9AN82LA.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-Dr9aOtOC.js → freemium-paywall-CkefGLM_.js} +4 -4
- package/dist/_chunks/{freemium-paywall-Dr9aOtOC.js.map → freemium-paywall-CkefGLM_.js.map} +1 -1
- package/dist/_chunks/{header-BpU9U-1X.js → header-BGn1mRp8.js} +2 -2
- package/dist/_chunks/{header-BpU9U-1X.js.map → header-BGn1mRp8.js.map} +1 -1
- package/dist/_chunks/{icon-button-CNjWCD1X.js → icon-button-Wnnde5lc.js} +6 -6
- package/dist/_chunks/icon-button-Wnnde5lc.js.map +1 -0
- package/dist/_chunks/input-surface-u4QB0lxe.js +32 -0
- package/dist/_chunks/input-surface-u4QB0lxe.js.map +1 -0
- package/dist/_chunks/{key-value-pair-C9hpjC_B.js → key-value-pair-JRFS9Xrh.js} +10 -10
- package/dist/_chunks/key-value-pair-JRFS9Xrh.js.map +1 -0
- package/dist/_chunks/{leo-sidebar-CNjZqljo.js → leo-sidebar-BzN4pJ7j.js} +16 -16
- package/dist/_chunks/leo-sidebar-BzN4pJ7j.js.map +1 -0
- package/dist/_chunks/{message-card-CZzNO4ov.js → message-card-qAp2-WQK.js} +12 -12
- package/dist/_chunks/message-card-qAp2-WQK.js.map +1 -0
- package/dist/_chunks/{message-tray-BWbjXW3F.js → message-tray-VaLpQU5t.js} +5 -5
- package/dist/_chunks/{message-tray-BWbjXW3F.js.map → message-tray-VaLpQU5t.js.map} +1 -1
- package/dist/_chunks/{multi-select.agent-BSGEW10d.js → multi-select.agent-CNsyW3n9.js} +66 -66
- package/dist/_chunks/multi-select.agent-CNsyW3n9.js.map +1 -0
- package/dist/_chunks/navigation-menu-EVFau1O2.js +180 -0
- package/dist/_chunks/navigation-menu-EVFau1O2.js.map +1 -0
- package/dist/_chunks/{notification-card-DgW-vVg-.js → notification-card-BF2_veHy.js} +11 -11
- package/dist/_chunks/notification-card-BF2_veHy.js.map +1 -0
- package/dist/_chunks/{notification-tray-CKUgl2jc.js → notification-tray-Bq-08ReD.js} +5 -5
- package/dist/_chunks/{notification-tray-CKUgl2jc.js.map → notification-tray-Bq-08ReD.js.map} +1 -1
- package/dist/_chunks/{number-input-BPPhekLu.js → number-input-DjpT_RXJ.js} +46 -46
- package/dist/_chunks/number-input-DjpT_RXJ.js.map +1 -0
- package/dist/_chunks/pagination.agent-oEaqmtx5.js +380 -0
- package/dist/_chunks/pagination.agent-oEaqmtx5.js.map +1 -0
- package/dist/_chunks/{password-input-DAT5HQth.js → password-input-DJDVznWH.js} +5 -5
- package/dist/_chunks/password-input-DJDVznWH.js.map +1 -0
- package/dist/_chunks/{patient-shell-BzHhg6uA.js → patient-shell-DP54y6rc.js} +5 -5
- package/dist/_chunks/{patient-shell-BzHhg6uA.js.map → patient-shell-DP54y6rc.js.map} +1 -1
- package/dist/_chunks/{payment-form-YlxrCpZQ.js → payment-form-hcl-gGrp.js} +2 -2
- package/dist/_chunks/{payment-form-YlxrCpZQ.js.map → payment-form-hcl-gGrp.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer.agent-sMned5Xn.js → pdf-viewer.agent-CfIHhcHx.js} +3 -3
- package/dist/_chunks/{pdf-viewer.agent-sMned5Xn.js.map → pdf-viewer.agent-CfIHhcHx.js.map} +1 -1
- package/dist/_chunks/{phone-input-BuRe5PyI.js → phone-input-DE_39q65.js} +103 -103
- package/dist/_chunks/phone-input-DE_39q65.js.map +1 -0
- package/dist/_chunks/{popover-Ds1iOdiv.js → popover-DvAtFOi-.js} +2 -2
- package/dist/_chunks/{popover-Ds1iOdiv.js.map → popover-DvAtFOi-.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-KEruBpM1.js → privacy-lock-DS6QRo2N.js} +43 -42
- package/dist/_chunks/{privacy-lock-KEruBpM1.js.map → privacy-lock-DS6QRo2N.js.map} +1 -1
- package/dist/_chunks/{progress-D4ELgHG3.js → progress-B4Of_pzz.js} +57 -57
- package/dist/_chunks/progress-B4Of_pzz.js.map +1 -0
- package/dist/_chunks/{radio-XSSNX3Af.js → radio-cs8N1wJi.js} +29 -29
- package/dist/_chunks/radio-cs8N1wJi.js.map +1 -0
- package/dist/_chunks/{radio-group-DBrUOPcy.js → radio-group-BIUbpWml.js} +3 -3
- package/dist/_chunks/radio-group-BIUbpWml.js.map +1 -0
- package/dist/_chunks/{scroll-area-HIq0hJyJ.js → scroll-area-DLr5w9Dd.js} +9 -9
- package/dist/_chunks/scroll-area-DLr5w9Dd.js.map +1 -0
- package/dist/_chunks/{search-bar-9Zbew4yM.js → search-bar-fcGqDFW3.js} +30 -30
- package/dist/_chunks/{search-bar-9Zbew4yM.js.map → search-bar-fcGqDFW3.js.map} +1 -1
- package/dist/_chunks/{search-input-CtkWITO2.js → search-input-BVMCONyN.js} +2 -2
- package/dist/_chunks/{search-input-CtkWITO2.js.map → search-input-BVMCONyN.js.map} +1 -1
- package/dist/_chunks/{select-DdAOtomN.js → select-IY_JQa-F.js} +50 -50
- package/dist/_chunks/select-IY_JQa-F.js.map +1 -0
- package/dist/_chunks/{sheet-D7GRhnWw.js → sheet-BhNpLHc9.js} +8 -8
- package/dist/_chunks/sheet-BhNpLHc9.js.map +1 -0
- package/dist/_chunks/{sidebar-Dc2ffrbf.js → sidebar-OVzwN3jE.js} +294 -294
- package/dist/_chunks/sidebar-OVzwN3jE.js.map +1 -0
- package/dist/_chunks/{sign-in-with-alfadocs-button-BotwPDcW.js → sign-in-with-alfadocs-button-BN_FPGHT.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-BotwPDcW.js.map → sign-in-with-alfadocs-button-BN_FPGHT.js.map} +1 -1
- package/dist/_chunks/{skeleton-DAdPFx9d.js → skeleton-dtqyF09N.js} +8 -8
- package/dist/_chunks/skeleton-dtqyF09N.js.map +1 -0
- package/dist/_chunks/{slot-grid-WHc5A8-z.js → slot-grid-D_l5VsHG.js} +5 -5
- package/dist/_chunks/{slot-grid-WHc5A8-z.js.map → slot-grid-D_l5VsHG.js.map} +1 -1
- package/dist/_chunks/{stepper-accordion-2_7Pw0tC.js → stepper-accordion-CGog0JSF.js} +64 -64
- package/dist/_chunks/stepper-accordion-CGog0JSF.js.map +1 -0
- package/dist/_chunks/{stepper-calendar-CWZcFgt_.js → stepper-calendar-_fLOAjus.js} +7 -7
- package/dist/_chunks/{stepper-calendar-CWZcFgt_.js.map → stepper-calendar-_fLOAjus.js.map} +1 -1
- package/dist/_chunks/{switch-DhSORO9C.js → switch-aN2EYxHh.js} +4 -4
- package/dist/_chunks/switch-aN2EYxHh.js.map +1 -0
- package/dist/_chunks/{tabs.agent-BtaNGxRh.js → tabs.agent-BpbVA-Zh.js} +55 -55
- package/dist/_chunks/tabs.agent-BpbVA-Zh.js.map +1 -0
- package/dist/_chunks/{tag--uLKOb9f.js → tag-BqidXKo3.js} +2 -2
- package/dist/_chunks/tag-BqidXKo3.js.map +1 -0
- package/dist/_chunks/{task-card-BeSuntXP.js → task-card-yW7tKlG4.js} +17 -17
- package/dist/_chunks/task-card-yW7tKlG4.js.map +1 -0
- package/dist/_chunks/{task-tray-pRk6u8Ik.js → task-tray-BzahI5FQ.js} +5 -5
- package/dist/_chunks/{task-tray-pRk6u8Ik.js.map → task-tray-BzahI5FQ.js.map} +1 -1
- package/dist/_chunks/{text-area-xf9-6iDf.js → text-area-DmKSd2DG.js} +2 -2
- package/dist/_chunks/text-area-DmKSd2DG.js.map +1 -0
- package/dist/_chunks/{text-input-exh7VD7D.js → text-input-CRHvl5zk.js} +19 -19
- package/dist/_chunks/text-input-CRHvl5zk.js.map +1 -0
- package/dist/_chunks/{theme-toggle-CJgA6G24.js → theme-toggle-COHFwO2H.js} +4 -4
- package/dist/_chunks/{theme-toggle-CJgA6G24.js.map → theme-toggle-COHFwO2H.js.map} +1 -1
- package/dist/_chunks/{timeline-DIueH4TJ.js → timeline-RgAIzpMd.js} +2 -2
- package/dist/_chunks/{timeline-DIueH4TJ.js.map → timeline-RgAIzpMd.js.map} +1 -1
- package/dist/_chunks/{toast-q0SlabGr.js → toast-lOhJDKOH.js} +12 -12
- package/dist/_chunks/{toast-q0SlabGr.js.map → toast-lOhJDKOH.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-DFnhbrlQ.js → transcript-panel-CNbVGG9L.js} +59 -59
- package/dist/_chunks/transcript-panel-CNbVGG9L.js.map +1 -0
- package/dist/_chunks/{visually-hidden-BlkhaZWe.js → visually-hidden-Bw7vBHLm.js} +6 -6
- package/dist/_chunks/{visually-hidden-BlkhaZWe.js.map → visually-hidden-Bw7vBHLm.js.map} +1 -1
- package/dist/_chunks/{warning-stack-DCmO0R07.js → warning-stack-8Pa3pekh.js} +24 -24
- package/dist/_chunks/warning-stack-8Pa3pekh.js.map +1 -0
- package/dist/_chunks/{workflow-map-CAM6Uy_J.js → workflow-map-DGJwVcO-.js} +106 -106
- package/dist/_chunks/workflow-map-DGJwVcO-.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/input-surface.d.ts +11 -11
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendar/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/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/key-value-pair/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/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/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/number-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/privacy-lock/privacy-lock.d.ts.map +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/stepper-calendar/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/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/transcript-panel/index.js +1 -1
- package/dist/components/visually-hidden/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/index.js +72 -72
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +504 -135
- package/dist/_chunks/agenda-card-C_hQGErS.js.map +0 -1
- package/dist/_chunks/ai-prompt-input-K94oVLG2.js.map +0 -1
- package/dist/_chunks/alert-rOM4EG0P.js.map +0 -1
- package/dist/_chunks/autocomplete.agent-DRrp-Rsx.js.map +0 -1
- package/dist/_chunks/avatar-Biffh-_H.js.map +0 -1
- package/dist/_chunks/balance-cell-renderer-CiyezQhi.js.map +0 -1
- package/dist/_chunks/breadcrumb-CcZovmIq.js +0 -293
- package/dist/_chunks/breadcrumb-CcZovmIq.js.map +0 -1
- package/dist/_chunks/calendar-BkDeDTaX.js.map +0 -1
- package/dist/_chunks/checkbox-Ni6C_KJg.js.map +0 -1
- package/dist/_chunks/checkbox-group-BFZ4oN5t.js.map +0 -1
- package/dist/_chunks/collapsible-fFMqzpdL.js.map +0 -1
- package/dist/_chunks/color-picker-Cl3KdjJd.js.map +0 -1
- package/dist/_chunks/combobox.agent-DjdivI3X.js.map +0 -1
- package/dist/_chunks/command-palette.agent-BUjzr2ET.js.map +0 -1
- package/dist/_chunks/dialog.agent-C2lP9H0h.js.map +0 -1
- package/dist/_chunks/dropdown-menu-2HgU1Emf.js.map +0 -1
- package/dist/_chunks/icon-button-CNjWCD1X.js.map +0 -1
- package/dist/_chunks/input-surface-D5OMCB1W.js +0 -32
- package/dist/_chunks/input-surface-D5OMCB1W.js.map +0 -1
- package/dist/_chunks/key-value-pair-C9hpjC_B.js.map +0 -1
- package/dist/_chunks/leo-sidebar-CNjZqljo.js.map +0 -1
- package/dist/_chunks/message-card-CZzNO4ov.js.map +0 -1
- package/dist/_chunks/multi-select.agent-BSGEW10d.js.map +0 -1
- package/dist/_chunks/navigation-menu-DxOMvrKM.js +0 -180
- package/dist/_chunks/navigation-menu-DxOMvrKM.js.map +0 -1
- package/dist/_chunks/notification-card-DgW-vVg-.js.map +0 -1
- package/dist/_chunks/number-input-BPPhekLu.js.map +0 -1
- package/dist/_chunks/pagination.agent-CmA0Ocr5.js +0 -380
- package/dist/_chunks/pagination.agent-CmA0Ocr5.js.map +0 -1
- package/dist/_chunks/password-input-DAT5HQth.js.map +0 -1
- package/dist/_chunks/phone-input-BuRe5PyI.js.map +0 -1
- package/dist/_chunks/progress-D4ELgHG3.js.map +0 -1
- package/dist/_chunks/radio-XSSNX3Af.js.map +0 -1
- package/dist/_chunks/radio-group-DBrUOPcy.js.map +0 -1
- package/dist/_chunks/scroll-area-HIq0hJyJ.js.map +0 -1
- package/dist/_chunks/select-DdAOtomN.js.map +0 -1
- package/dist/_chunks/sheet-D7GRhnWw.js.map +0 -1
- package/dist/_chunks/sidebar-Dc2ffrbf.js.map +0 -1
- package/dist/_chunks/skeleton-DAdPFx9d.js.map +0 -1
- package/dist/_chunks/stepper-accordion-2_7Pw0tC.js.map +0 -1
- package/dist/_chunks/switch-DhSORO9C.js.map +0 -1
- package/dist/_chunks/tabs.agent-BtaNGxRh.js.map +0 -1
- package/dist/_chunks/tag--uLKOb9f.js.map +0 -1
- package/dist/_chunks/task-card-BeSuntXP.js.map +0 -1
- package/dist/_chunks/text-area-xf9-6iDf.js.map +0 -1
- package/dist/_chunks/text-input-exh7VD7D.js.map +0 -1
- package/dist/_chunks/transcript-panel-DFnhbrlQ.js.map +0 -1
- package/dist/_chunks/warning-stack-DCmO0R07.js.map +0 -1
- package/dist/_chunks/workflow-map-CAM6Uy_J.js.map +0 -1
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as v, Children as j, isValidElement as B, cloneElement as I, useContext as T, createContext as V } from "react";
|
|
3
|
-
import * as g from "@radix-ui/react-dropdown-menu";
|
|
4
|
-
import { Slot as D } from "@radix-ui/react-slot";
|
|
5
|
-
import { c as G } from "./index-D2ZczOXr.js";
|
|
6
|
-
import { useTranslation as y } from "react-i18next";
|
|
7
|
-
import { E as H } from "./ellipsis-rgGdiK_9.js";
|
|
8
|
-
import { C as M } from "./chevron-right-BrpYejk0.js";
|
|
9
|
-
const L = V({
|
|
10
|
-
separator: "chevron"
|
|
11
|
-
}), O = v(
|
|
12
|
-
({
|
|
13
|
-
children: o,
|
|
14
|
-
className: i,
|
|
15
|
-
"aria-label": t,
|
|
16
|
-
separator: s = "chevron",
|
|
17
|
-
maxItems: n = 4,
|
|
18
|
-
itemsBeforeCollapse: r = 1,
|
|
19
|
-
itemsAfterCollapse: a = 1,
|
|
20
|
-
disableCollapse: m = !1,
|
|
21
|
-
...d
|
|
22
|
-
}, p) => {
|
|
23
|
-
const { t: x } = y();
|
|
24
|
-
return /* @__PURE__ */ e(L.Provider, { value: { separator: s }, children: /* @__PURE__ */ e(
|
|
25
|
-
"nav",
|
|
26
|
-
{
|
|
27
|
-
ref: p,
|
|
28
|
-
"aria-label": t ?? x("ui.navigation.breadcrumb.label"),
|
|
29
|
-
"data-component": "breadcrumb",
|
|
30
|
-
className: i,
|
|
31
|
-
...d,
|
|
32
|
-
children: /* @__PURE__ */ e(
|
|
33
|
-
$,
|
|
34
|
-
{
|
|
35
|
-
maxItems: n,
|
|
36
|
-
itemsBeforeCollapse: r,
|
|
37
|
-
itemsAfterCollapse: a,
|
|
38
|
-
disableCollapse: m,
|
|
39
|
-
children: o
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
) });
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
O.displayName = "Breadcrumb";
|
|
47
|
-
const _ = [
|
|
48
|
-
"flex flex-wrap items-center",
|
|
49
|
-
"gap-[var(--spacing-xs)]",
|
|
50
|
-
"text-[var(--font-size-sm)] text-[var(--muted-foreground)]",
|
|
51
|
-
"ps-0 m-0",
|
|
52
|
-
"list-none"
|
|
53
|
-
].join(" "), $ = v(
|
|
54
|
-
({
|
|
55
|
-
children: o,
|
|
56
|
-
className: i,
|
|
57
|
-
maxItems: t = 4,
|
|
58
|
-
itemsBeforeCollapse: s = 1,
|
|
59
|
-
itemsAfterCollapse: n = 1,
|
|
60
|
-
disableCollapse: r = !1,
|
|
61
|
-
...a
|
|
62
|
-
}, m) => {
|
|
63
|
-
const d = j.toArray(o).filter((l) => B(l)), p = d.length, x = !r && p > t && s + n < p, w = (l, c, f) => I(l, {
|
|
64
|
-
isCurrent: l.props.isCurrent ?? c,
|
|
65
|
-
key: f
|
|
66
|
-
}), b = (l, c) => l ? /* @__PURE__ */ e(R, {}, c) : null;
|
|
67
|
-
let u = [];
|
|
68
|
-
if (!x)
|
|
69
|
-
d.forEach((l, c) => {
|
|
70
|
-
const f = c === p - 1;
|
|
71
|
-
u.push(w(l, f, `item-${c}`)), u.push(b(!f, `sep-${c}`));
|
|
72
|
-
});
|
|
73
|
-
else {
|
|
74
|
-
const l = d.slice(0, s), c = d.slice(p - n), f = d.slice(s, p - n);
|
|
75
|
-
l.forEach((C, h) => {
|
|
76
|
-
u.push(w(C, !1, `b-${h}`)), u.push(b(!0, `b-sep-${h}`));
|
|
77
|
-
}), u.push(
|
|
78
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(S, { hiddenItems: f }) }, "ellipsis")
|
|
79
|
-
), u.push(b(!0, "ellipsis-sep")), c.forEach((C, h) => {
|
|
80
|
-
const z = h === c.length - 1;
|
|
81
|
-
u.push(w(C, z, `a-${h}`)), u.push(b(!z, `a-sep-${h}`));
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
return /* @__PURE__ */ e("ol", { ref: m, className: [_, i].filter(Boolean).join(" "), ...a, children: u });
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
$.displayName = "BreadcrumbList";
|
|
88
|
-
const q = [
|
|
89
|
-
"inline-flex items-center",
|
|
90
|
-
"max-inline-size-[16rem]",
|
|
91
|
-
"min-h-[var(--min-target-size)]",
|
|
92
|
-
"py-[var(--spacing-xs)]"
|
|
93
|
-
].join(" "), P = v(
|
|
94
|
-
({ children: o, className: i, isCurrent: t = !1, ...s }, n) => /* @__PURE__ */ e(
|
|
95
|
-
"li",
|
|
96
|
-
{
|
|
97
|
-
ref: n,
|
|
98
|
-
className: [q, i].filter(Boolean).join(" "),
|
|
99
|
-
...s,
|
|
100
|
-
children: j.map(
|
|
101
|
-
o,
|
|
102
|
-
(r) => {
|
|
103
|
-
var a;
|
|
104
|
-
return B(r) && (r.type === N || (a = r.props) != null && a._link) ? I(r, {
|
|
105
|
-
isCurrent: t
|
|
106
|
-
}) : r;
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
);
|
|
112
|
-
P.displayName = "BreadcrumbItem";
|
|
113
|
-
const E = [
|
|
114
|
-
"inline-flex items-center",
|
|
115
|
-
"max-inline-size-[16rem]",
|
|
116
|
-
"overflow-hidden text-ellipsis whitespace-nowrap",
|
|
117
|
-
"break-normal",
|
|
118
|
-
"text-[var(--muted-foreground)] no-underline",
|
|
119
|
-
"hover:text-[var(--foreground)] hover:underline",
|
|
120
|
-
"focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-solid",
|
|
121
|
-
"focus-visible:outline-[var(--ring)] focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
122
|
-
"rounded-[var(--radius-sm)]",
|
|
123
|
-
"transition-colors duration-[var(--animation-duration)] motion-reduce:transition-none",
|
|
124
|
-
"min-h-[var(--min-target-size)] ps-[var(--spacing-xs)] pe-[var(--spacing-xs)]"
|
|
125
|
-
].join(" "), F = [
|
|
126
|
-
"inline-flex items-center",
|
|
127
|
-
"max-inline-size-[16rem]",
|
|
128
|
-
"overflow-hidden text-ellipsis whitespace-nowrap",
|
|
129
|
-
"break-normal",
|
|
130
|
-
"text-[var(--foreground)] font-[var(--font-weight-semibold)]",
|
|
131
|
-
"min-h-[var(--min-target-size)] ps-[var(--spacing-xs)] pe-[var(--spacing-xs)]"
|
|
132
|
-
].join(" "), N = v(
|
|
133
|
-
({ asChild: o = !1, isCurrent: i = !1, className: t, children: s, ...n }, r) => {
|
|
134
|
-
const { t: a } = y();
|
|
135
|
-
return i ? /* @__PURE__ */ e(
|
|
136
|
-
"span",
|
|
137
|
-
{
|
|
138
|
-
"aria-current": "page",
|
|
139
|
-
"aria-label": n["aria-label"] ?? a("ui.navigation.breadcrumb.current"),
|
|
140
|
-
className: [F, t].filter(Boolean).join(" "),
|
|
141
|
-
children: s
|
|
142
|
-
}
|
|
143
|
-
) : o ? /* @__PURE__ */ e(
|
|
144
|
-
D,
|
|
145
|
-
{
|
|
146
|
-
ref: r,
|
|
147
|
-
className: [E, t].filter(Boolean).join(" "),
|
|
148
|
-
...n,
|
|
149
|
-
children: s
|
|
150
|
-
}
|
|
151
|
-
) : /* @__PURE__ */ e(
|
|
152
|
-
"a",
|
|
153
|
-
{
|
|
154
|
-
ref: r,
|
|
155
|
-
className: [E, t].filter(Boolean).join(" "),
|
|
156
|
-
...n,
|
|
157
|
-
children: s
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
N.displayName = "BreadcrumbLink";
|
|
163
|
-
const J = G(
|
|
164
|
-
[
|
|
165
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
166
|
-
"ds:text-[var(--muted-foreground)]",
|
|
167
|
-
"ds:ms-[var(--spacing-xs)] ds:me-[var(--spacing-xs)]",
|
|
168
|
-
"ds:select-none"
|
|
169
|
-
].join(" "),
|
|
170
|
-
{
|
|
171
|
-
variants: {
|
|
172
|
-
variant: {
|
|
173
|
-
chevron: "",
|
|
174
|
-
slash: ""
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
defaultVariants: { variant: "chevron" }
|
|
178
|
-
}
|
|
179
|
-
), R = v(
|
|
180
|
-
({ className: o, variant: i, children: t, ...s }, n) => {
|
|
181
|
-
const r = T(L), a = i ?? r.separator, m = a === "slash" ? /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "/" }) : /* @__PURE__ */ e(
|
|
182
|
-
M,
|
|
183
|
-
{
|
|
184
|
-
"aria-hidden": "true",
|
|
185
|
-
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
return /* @__PURE__ */ e(
|
|
189
|
-
"li",
|
|
190
|
-
{
|
|
191
|
-
ref: n,
|
|
192
|
-
"aria-hidden": "true",
|
|
193
|
-
role: "presentation",
|
|
194
|
-
className: J({ variant: a, className: o }),
|
|
195
|
-
...s,
|
|
196
|
-
children: t ?? m
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
R.displayName = "BreadcrumbSeparator";
|
|
202
|
-
const K = [
|
|
203
|
-
"inline-flex items-center justify-center",
|
|
204
|
-
"min-w-[var(--min-target-size)] min-h-[var(--min-target-size)]",
|
|
205
|
-
"rounded-[var(--radius-sm)]",
|
|
206
|
-
"text-[var(--muted-foreground)]",
|
|
207
|
-
"hover:text-[var(--foreground)]",
|
|
208
|
-
"focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-solid",
|
|
209
|
-
"focus-visible:outline-[var(--ring)] focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
210
|
-
"transition-colors duration-[var(--animation-duration)] motion-reduce:transition-none"
|
|
211
|
-
].join(" "), Q = [
|
|
212
|
-
"z-[var(--z-dropdown)] min-w-[12rem] overflow-hidden",
|
|
213
|
-
"rounded-[var(--radius-md)] border border-[var(--border)]",
|
|
214
|
-
"bg-[var(--background)] text-[var(--foreground)]",
|
|
215
|
-
"shadow-[var(--shadow-lg)]",
|
|
216
|
-
"p-[var(--spacing-xs)]",
|
|
217
|
-
"animate-in fade-in zoom-in-95 motion-reduce:animate-none"
|
|
218
|
-
].join(" "), U = [
|
|
219
|
-
"flex items-center",
|
|
220
|
-
"min-h-[var(--min-target-size)]",
|
|
221
|
-
"ps-[var(--spacing-sm)] pe-[var(--spacing-sm)]",
|
|
222
|
-
"rounded-[var(--radius-sm)]",
|
|
223
|
-
"text-[var(--foreground)] cursor-pointer select-none",
|
|
224
|
-
"data-[highlighted]:bg-[var(--muted)] data-[highlighted]:text-[var(--foreground)]",
|
|
225
|
-
"outline-none"
|
|
226
|
-
].join(" "), S = v(
|
|
227
|
-
({ className: o, hiddenItems: i = [], ...t }, s) => {
|
|
228
|
-
const { t: n } = y(), r = n("ui.navigation.breadcrumb.showPath");
|
|
229
|
-
return /* @__PURE__ */ k(g.Root, { children: [
|
|
230
|
-
/* @__PURE__ */ e(g.Trigger, { asChild: !0, children: /* @__PURE__ */ k(
|
|
231
|
-
"button",
|
|
232
|
-
{
|
|
233
|
-
ref: s,
|
|
234
|
-
type: "button",
|
|
235
|
-
"aria-label": r,
|
|
236
|
-
className: [K, o].filter(Boolean).join(" "),
|
|
237
|
-
...t,
|
|
238
|
-
children: [
|
|
239
|
-
/* @__PURE__ */ e(H, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
240
|
-
/* @__PURE__ */ e("span", { className: "ds:sr-only", children: r })
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
) }),
|
|
244
|
-
/* @__PURE__ */ e(g.Portal, { children: /* @__PURE__ */ e(
|
|
245
|
-
g.Content,
|
|
246
|
-
{
|
|
247
|
-
className: Q,
|
|
248
|
-
align: "start",
|
|
249
|
-
sideOffset: 6,
|
|
250
|
-
children: i.map((a, m) => {
|
|
251
|
-
const d = W(a);
|
|
252
|
-
return /* @__PURE__ */ e(
|
|
253
|
-
g.Item,
|
|
254
|
-
{
|
|
255
|
-
asChild: !0,
|
|
256
|
-
className: U,
|
|
257
|
-
children: d ?? /* @__PURE__ */ e("span", { children: a })
|
|
258
|
-
},
|
|
259
|
-
`hidden-${m}`
|
|
260
|
-
);
|
|
261
|
-
})
|
|
262
|
-
}
|
|
263
|
-
) })
|
|
264
|
-
] });
|
|
265
|
-
}
|
|
266
|
-
);
|
|
267
|
-
S.displayName = "BreadcrumbEllipsis";
|
|
268
|
-
function W(o) {
|
|
269
|
-
let i = null;
|
|
270
|
-
const t = o.props.children;
|
|
271
|
-
return j.forEach(t, (s) => {
|
|
272
|
-
if (!i && B(s) && s.type === N) {
|
|
273
|
-
const n = s.props, r = typeof n.href == "string" ? n.href : void 0, a = r && /^\s*javascript:/i.test(r) ? void 0 : r;
|
|
274
|
-
i = /* @__PURE__ */ e(
|
|
275
|
-
"a",
|
|
276
|
-
{
|
|
277
|
-
href: a,
|
|
278
|
-
onClick: n.onClick,
|
|
279
|
-
children: n.children
|
|
280
|
-
}
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
}), i;
|
|
284
|
-
}
|
|
285
|
-
export {
|
|
286
|
-
O as B,
|
|
287
|
-
S as a,
|
|
288
|
-
P as b,
|
|
289
|
-
N as c,
|
|
290
|
-
$ as d,
|
|
291
|
-
R as e
|
|
292
|
-
};
|
|
293
|
-
//# sourceMappingURL=breadcrumb-CcZovmIq.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-CcZovmIq.js","sources":["../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n createContext,\n forwardRef,\n isValidElement,\n useContext,\n type AnchorHTMLAttributes,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport * as DropdownMenu from '@radix-ui/react-dropdown-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\n\n/* -------------------------------------------------------------------- */\n/* Context — shares separator variant between siblings */\n/* -------------------------------------------------------------------- */\n\ntype SeparatorVariant = 'chevron' | 'slash';\n\ninterface BreadcrumbContextValue {\n separator: SeparatorVariant;\n}\n\nconst BreadcrumbContext = createContext<BreadcrumbContextValue>({\n separator: 'chevron',\n});\n\n/* -------------------------------------------------------------------- */\n/* Root — <nav aria-label> wrapper + truncation engine */\n/* -------------------------------------------------------------------- */\n\nexport interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {\n /** Override the default `aria-label` (falls back to translated `ui.navigation.breadcrumb.label`). */\n 'aria-label'?: string;\n /** Separator glyph between items. @default 'chevron' */\n separator?: SeparatorVariant;\n /** Maximum number of visible crumbs before collapsing. @default 4 */\n maxItems?: number;\n /** Items kept visible at the start. @default 1 */\n itemsBeforeCollapse?: number;\n /** Items kept visible at the end. @default 1 */\n itemsAfterCollapse?: number;\n /** If true, disables collapse behaviour. */\n disableCollapse?: boolean;\n}\n\nconst Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n (\n {\n children,\n className,\n 'aria-label': ariaLabel,\n separator = 'chevron',\n maxItems = 4,\n itemsBeforeCollapse = 1,\n itemsAfterCollapse = 1,\n disableCollapse = false,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n return (\n <BreadcrumbContext.Provider value={{ separator }}>\n <nav\n ref={ref}\n aria-label={ariaLabel ?? t('ui.navigation.breadcrumb.label')}\n data-component=\"breadcrumb\"\n className={className}\n {...rest}\n >\n <BreadcrumbList\n maxItems={maxItems}\n itemsBeforeCollapse={itemsBeforeCollapse}\n itemsAfterCollapse={itemsAfterCollapse}\n disableCollapse={disableCollapse}\n >\n {children}\n </BreadcrumbList>\n </nav>\n </BreadcrumbContext.Provider>\n );\n },\n);\nBreadcrumb.displayName = 'Breadcrumb';\n\n/* -------------------------------------------------------------------- */\n/* List — walks its children, injects separators & ellipsis */\n/* -------------------------------------------------------------------- */\n\nconst listClasses = [\n 'flex flex-wrap items-center',\n 'gap-[var(--spacing-xs)]',\n 'text-[var(--font-size-sm)] text-[var(--muted-foreground)]',\n 'ps-0 m-0',\n 'list-none',\n].join(' ');\n\nexport interface BreadcrumbListProps extends ComponentPropsWithoutRef<'ol'> {\n maxItems?: number;\n itemsBeforeCollapse?: number;\n itemsAfterCollapse?: number;\n disableCollapse?: boolean;\n}\n\nconst BreadcrumbList = forwardRef<HTMLOListElement, BreadcrumbListProps>(\n (\n {\n children,\n className,\n maxItems = 4,\n itemsBeforeCollapse = 1,\n itemsAfterCollapse = 1,\n disableCollapse = false,\n ...rest\n },\n ref,\n ) => {\n const arr = Children.toArray(children).filter((c) => isValidElement(c)) as ReactElement[];\n const total = arr.length;\n\n const shouldCollapse =\n !disableCollapse &&\n total > maxItems &&\n itemsBeforeCollapse + itemsAfterCollapse < total;\n\n const renderItem = (child: ReactElement, isLast: boolean, key: string) =>\n cloneElement(child, {\n isCurrent: (child.props as BreadcrumbItemProps).isCurrent ?? isLast,\n key,\n } as Partial<BreadcrumbItemProps>);\n\n const renderSeparatorIf = (condition: boolean, key: string) =>\n condition ? <BreadcrumbSeparator key={key} /> : null;\n\n let nodes: ReactNode[] = [];\n if (!shouldCollapse) {\n arr.forEach((child, i) => {\n const isLast = i === total - 1;\n nodes.push(renderItem(child, isLast, `item-${i}`));\n nodes.push(renderSeparatorIf(!isLast, `sep-${i}`));\n });\n } else {\n const before = arr.slice(0, itemsBeforeCollapse);\n const after = arr.slice(total - itemsAfterCollapse);\n const hidden = arr.slice(itemsBeforeCollapse, total - itemsAfterCollapse);\n\n before.forEach((child, i) => {\n nodes.push(renderItem(child, false, `b-${i}`));\n nodes.push(renderSeparatorIf(true, `b-sep-${i}`));\n });\n\n nodes.push(\n <BreadcrumbItem key=\"ellipsis\">\n <BreadcrumbEllipsis hiddenItems={hidden} />\n </BreadcrumbItem>,\n );\n nodes.push(renderSeparatorIf(true, 'ellipsis-sep'));\n\n after.forEach((child, i) => {\n const isLast = i === after.length - 1;\n nodes.push(renderItem(child, isLast, `a-${i}`));\n nodes.push(renderSeparatorIf(!isLast, `a-sep-${i}`));\n });\n }\n\n return (\n <ol ref={ref} className={[listClasses, className].filter(Boolean).join(' ')} {...rest}>\n {nodes}\n </ol>\n );\n },\n);\nBreadcrumbList.displayName = 'BreadcrumbList';\n\n/* -------------------------------------------------------------------- */\n/* Item — <li> marks current when `isCurrent` */\n/* -------------------------------------------------------------------- */\n\nconst itemClasses = [\n 'inline-flex items-center',\n 'max-inline-size-[16rem]',\n 'min-h-[var(--min-target-size)]',\n 'py-[var(--spacing-xs)]',\n].join(' ');\n\nexport interface BreadcrumbItemProps extends ComponentPropsWithoutRef<'li'> {\n /** Set automatically by `BreadcrumbList` on the final item. */\n isCurrent?: boolean;\n}\n\nconst BreadcrumbItem = forwardRef<HTMLLIElement, BreadcrumbItemProps>(\n ({ children, className, isCurrent = false, ...rest }, ref) => (\n <li\n ref={ref}\n className={[itemClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {Children.map(children, (child) =>\n isValidElement(child) &&\n (child.type === BreadcrumbLink || (child.props as { _link?: boolean })?._link)\n ? cloneElement(child as ReactElement<BreadcrumbLinkProps>, {\n isCurrent,\n })\n : child,\n )}\n </li>\n ),\n);\nBreadcrumbItem.displayName = 'BreadcrumbItem';\n\n/* -------------------------------------------------------------------- */\n/* Link — renders <a>, or plain text when current */\n/* -------------------------------------------------------------------- */\n\nconst linkClasses = [\n 'inline-flex items-center',\n 'max-inline-size-[16rem]',\n 'overflow-hidden text-ellipsis whitespace-nowrap',\n 'break-normal',\n 'text-[var(--muted-foreground)] no-underline',\n 'hover:text-[var(--foreground)] hover:underline',\n 'focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-solid',\n 'focus-visible:outline-[var(--ring)] focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'rounded-[var(--radius-sm)]',\n 'transition-colors duration-[var(--animation-duration)] motion-reduce:transition-none',\n 'min-h-[var(--min-target-size)] ps-[var(--spacing-xs)] pe-[var(--spacing-xs)]',\n].join(' ');\n\nconst currentClasses = [\n 'inline-flex items-center',\n 'max-inline-size-[16rem]',\n 'overflow-hidden text-ellipsis whitespace-nowrap',\n 'break-normal',\n 'text-[var(--foreground)] font-[var(--font-weight-semibold)]',\n 'min-h-[var(--min-target-size)] ps-[var(--spacing-xs)] pe-[var(--spacing-xs)]',\n].join(' ');\n\nexport interface BreadcrumbLinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Use Radix `Slot` so consumers can pass a router link. */\n asChild?: boolean;\n /** Set by the parent Item when this is the current page. */\n isCurrent?: boolean;\n}\n\nconst BreadcrumbLink = forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(\n ({ asChild = false, isCurrent = false, className, children, ...rest }, ref) => {\n const { t } = useTranslation();\n\n if (isCurrent) {\n return (\n <span\n aria-current=\"page\"\n aria-label={\n (rest['aria-label'] as string | undefined) ??\n t('ui.navigation.breadcrumb.current')\n }\n className={[currentClasses, className].filter(Boolean).join(' ')}\n >\n {children}\n </span>\n );\n }\n\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={[linkClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n </Slot>\n );\n }\n\n return (\n <a\n ref={ref}\n className={[linkClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n </a>\n );\n },\n);\nBreadcrumbLink.displayName = 'BreadcrumbLink';\n\n/* -------------------------------------------------------------------- */\n/* Separator */\n/* -------------------------------------------------------------------- */\n\nconst separatorVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:text-[var(--muted-foreground)]',\n 'ds:ms-[var(--spacing-xs)] ds:me-[var(--spacing-xs)]',\n 'ds:select-none',\n ].join(' '),\n {\n variants: {\n variant: {\n chevron: '',\n slash: '',\n },\n },\n defaultVariants: { variant: 'chevron' },\n },\n);\n\nexport interface BreadcrumbSeparatorProps\n extends Omit<ComponentPropsWithoutRef<'li'>, 'children'>,\n VariantProps<typeof separatorVariants> {\n children?: ReactNode;\n}\n\nconst BreadcrumbSeparator = forwardRef<HTMLLIElement, BreadcrumbSeparatorProps>(\n ({ className, variant, children, ...rest }, ref) => {\n const ctx = useContext(BreadcrumbContext);\n const resolved = variant ?? ctx.separator;\n const defaultGlyph =\n resolved === 'slash' ? (\n <span aria-hidden=\"true\">/</span>\n ) : (\n <ChevronRight\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n );\n return (\n <li\n ref={ref}\n aria-hidden=\"true\"\n role=\"presentation\"\n className={separatorVariants({ variant: resolved, className })}\n {...rest}\n >\n {children ?? defaultGlyph}\n </li>\n );\n },\n);\nBreadcrumbSeparator.displayName = 'BreadcrumbSeparator';\n\n/* -------------------------------------------------------------------- */\n/* Ellipsis — opens a Radix DropdownMenu with hidden crumbs */\n/* -------------------------------------------------------------------- */\n\nconst ellipsisTriggerClasses = [\n 'inline-flex items-center justify-center',\n 'min-w-[var(--min-target-size)] min-h-[var(--min-target-size)]',\n 'rounded-[var(--radius-sm)]',\n 'text-[var(--muted-foreground)]',\n 'hover:text-[var(--foreground)]',\n 'focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-solid',\n 'focus-visible:outline-[var(--ring)] focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'transition-colors duration-[var(--animation-duration)] motion-reduce:transition-none',\n].join(' ');\n\nconst ellipsisContentClasses = [\n 'z-[var(--z-dropdown)] min-w-[12rem] overflow-hidden',\n 'rounded-[var(--radius-md)] border border-[var(--border)]',\n 'bg-[var(--background)] text-[var(--foreground)]',\n 'shadow-[var(--shadow-lg)]',\n 'p-[var(--spacing-xs)]',\n 'animate-in fade-in zoom-in-95 motion-reduce:animate-none',\n].join(' ');\n\nconst ellipsisItemClasses = [\n 'flex items-center',\n 'min-h-[var(--min-target-size)]',\n 'ps-[var(--spacing-sm)] pe-[var(--spacing-sm)]',\n 'rounded-[var(--radius-sm)]',\n 'text-[var(--foreground)] cursor-pointer select-none',\n 'data-[highlighted]:bg-[var(--muted)] data-[highlighted]:text-[var(--foreground)]',\n 'outline-none',\n].join(' ');\n\nexport interface BreadcrumbEllipsisProps extends ComponentPropsWithoutRef<'button'> {\n /** Hidden crumb elements rendered inside the dropdown menu. */\n hiddenItems?: ReactElement[];\n}\n\nconst BreadcrumbEllipsis = forwardRef<HTMLButtonElement, BreadcrumbEllipsisProps>(\n ({ className, hiddenItems = [], ...rest }, ref) => {\n const { t } = useTranslation();\n const showPath = t('ui.navigation.breadcrumb.showPath');\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n aria-label={showPath}\n className={[ellipsisTriggerClasses, className].filter(Boolean).join(' ')}\n {...rest}\n >\n <MoreHorizontal aria-hidden=\"true\" className=\"ds:size-4\" />\n <span className=\"ds:sr-only\">{showPath}</span>\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n className={ellipsisContentClasses}\n align=\"start\"\n sideOffset={6}\n >\n {hiddenItems.map((item, i) => {\n // Extract the anchor inside the hidden BreadcrumbItem (if any)\n const linkChild = extractLink(item);\n return (\n <DropdownMenu.Item\n key={`hidden-${i}`}\n asChild\n className={ellipsisItemClasses}\n >\n {linkChild ?? <span>{item}</span>}\n </DropdownMenu.Item>\n );\n })}\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\nBreadcrumbEllipsis.displayName = 'BreadcrumbEllipsis';\n\n/**\n * Walks a `BreadcrumbItem` to find the first child whose type is\n * `BreadcrumbLink` and returns the link rendered as a plain `<a>` so the\n * dropdown item can adopt its navigational behaviour.\n */\nfunction extractLink(item: ReactElement): ReactElement | null {\n let found: ReactElement | null = null;\n const itemChildren = (item.props as { children?: ReactNode }).children;\n Children.forEach(itemChildren, (child) => {\n if (found) return;\n if (!isValidElement(child)) return;\n if (child.type === BreadcrumbLink) {\n const linkProps = child.props as BreadcrumbLinkProps & { children?: ReactNode };\n const href = typeof linkProps.href === 'string' ? linkProps.href : undefined;\n const safeHref =\n href && /^\\s*javascript:/i.test(href) ? undefined : href;\n found = (\n <a\n href={safeHref}\n onClick={linkProps.onClick as AnchorHTMLAttributes<HTMLAnchorElement>['onClick']}\n >\n {linkProps.children}\n </a>\n );\n }\n });\n return found;\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n"],"names":["BreadcrumbContext","createContext","Breadcrumb","forwardRef","children","className","ariaLabel","separator","maxItems","itemsBeforeCollapse","itemsAfterCollapse","disableCollapse","rest","ref","t","useTranslation","jsx","BreadcrumbList","listClasses","arr","Children","c","isValidElement","total","shouldCollapse","renderItem","child","isLast","key","cloneElement","renderSeparatorIf","condition","BreadcrumbSeparator","nodes","i","before","after","hidden","BreadcrumbItem","BreadcrumbEllipsis","itemClasses","isCurrent","BreadcrumbLink","_a","linkClasses","currentClasses","asChild","Slot","separatorVariants","cva","variant","ctx","useContext","resolved","defaultGlyph","ChevronRight","ellipsisTriggerClasses","ellipsisContentClasses","ellipsisItemClasses","hiddenItems","showPath","jsxs","DropdownMenu","MoreHorizontal","item","linkChild","extractLink","found","itemChildren","linkProps","href","safeHref"],"mappings":";;;;;;;;AA4BA,MAAMA,IAAoBC,EAAsC;AAAA,EAC9D,WAAW;AACb,CAAC,GAqBKC,IAAaC;AAAA,EACjB,CACE;AAAA,IACE,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAcC;AAAA,IACd,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,qBAAAC,IAAsB;AAAA,IACtB,oBAAAC,IAAqB;AAAA,IACrB,iBAAAC,IAAkB;AAAA,IAClB,GAAGC;AAAA,EAA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C,UAAA,gBAAA9C;AAAA,QAAC8C,EAAa;AAAA,QAAb;AAAA,UACC,WAAWL;AAAA,UACX,OAAM;AAAA,UACN,YAAY;AAAA,UAEX,UAAAE,EAAY,IAAI,CAACK,GAAM9B,MAAM;AAE5B,kBAAM+B,IAAYC,EAAYF,CAAI;AAClC,mBACE,gBAAAhD;AAAA,cAAC8C,EAAa;AAAA,cAAb;AAAA,gBAEC,SAAO;AAAA,gBACP,WAAWJ;AAAA,gBAEV,UAAAO,KAAa,gBAAAjD,EAAC,QAAA,EAAM,UAAAgD,EAAA,CAAK;AAAA,cAAA;AAAA,cAJrB,UAAU9B,CAAC;AAAA,YAAA;AAAA,UAOtB,CAAC;AAAA,QAAA;AAAA,MAAA,EACH,CACF;AAAA,IAAA,GACF;AAAA,EAEJ;AACF;AACAK,EAAmB,cAAc;AAOjC,SAAS2B,EAAYF,GAAyC;AAC5D,MAAIG,IAA6B;AACjC,QAAMC,IAAgBJ,EAAK,MAAmC;AAC9D,SAAA5C,EAAS,QAAQgD,GAAc,CAAC1C,MAAU;AACxC,QAAI,CAAAyC,KACC7C,EAAeI,CAAK,KACrBA,EAAM,SAASgB,GAAgB;AACjC,YAAM2B,IAAY3C,EAAM,OAClB4C,IAAO,OAAOD,EAAU,QAAS,WAAWA,EAAU,OAAO,QAC7DE,IACJD,KAAQ,mBAAmB,KAAKA,CAAI,IAAI,SAAYA;AACtD,MAAAH,IACE,gBAAAnD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAMuD;AAAA,UACN,SAASF,EAAU;AAAA,UAElB,UAAAA,EAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IAGjB;AAAA,EACF,CAAC,GACMF;AACT;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-BkDeDTaX.js","sources":["../../node_modules/lucide-react/dist/esm/icons/ban.js","../../node_modules/lucide-react/dist/esm/icons/euro.js","../../node_modules/lucide-react/dist/esm/icons/heart-pulse.js","../../node_modules/lucide-react/dist/esm/icons/stethoscope.js","../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js","../../node_modules/lucide-react/dist/esm/icons/video.js","../../node_modules/lucide-react/dist/esm/icons/zap.js","../../src/components/calendar/calendar.agent.ts","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M4.929 4.929 19.07 19.071\", key: \"196cmz\" }]\n];\nconst Ban = createLucideIcon(\"ban\", __iconNode);\n\nexport { __iconNode, Ban as default };\n//# sourceMappingURL=ban.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M4 10h12\", key: \"1y6xl8\" }],\n [\"path\", { d: \"M4 14h9\", key: \"1loblj\" }],\n [\n \"path\",\n {\n d: \"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2\",\n key: \"1j6lzo\"\n }\n ]\n];\nconst Euro = createLucideIcon(\"euro\", __iconNode);\n\nexport { __iconNode, Euro as default };\n//# sourceMappingURL=euro.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\",\n key: \"mvr1a0\"\n }\n ],\n [\"path\", { d: \"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27\", key: \"auskq0\" }]\n];\nconst HeartPulse = createLucideIcon(\"heart-pulse\", __iconNode);\n\nexport { __iconNode, HeartPulse as default };\n//# sourceMappingURL=heart-pulse.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M11 2v2\", key: \"1539x4\" }],\n [\"path\", { d: \"M5 2v2\", key: \"1yf1q8\" }],\n [\"path\", { d: \"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1\", key: \"rb5t3r\" }],\n [\"path\", { d: \"M8 15a6 6 0 0 0 12 0v-3\", key: \"x18d4x\" }],\n [\"circle\", { cx: \"20\", cy: \"10\", r: \"2\", key: \"ts1r5v\" }]\n];\nconst Stethoscope = createLucideIcon(\"stethoscope\", __iconNode);\n\nexport { __iconNode, Stethoscope as default };\n//# sourceMappingURL=stethoscope.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\",\n key: \"emmmcr\"\n }\n ],\n [\"path\", { d: \"M7 10v12\", key: \"1qc93n\" }]\n];\nconst ThumbsUp = createLucideIcon(\"thumbs-up\", __iconNode);\n\nexport { __iconNode, ThumbsUp as default };\n//# sourceMappingURL=thumbs-up.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\",\n key: \"ftymec\"\n }\n ],\n [\"rect\", { x: \"2\", y: \"6\", width: \"14\", height: \"12\", rx: \"2\", key: \"158x01\" }]\n];\nconst Video = createLucideIcon(\"video\", __iconNode);\n\nexport { __iconNode, Video as default };\n//# sourceMappingURL=video.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\",\n key: \"1xq2db\"\n }\n ]\n];\nconst Zap = createLucideIcon(\"zap\", __iconNode);\n\nexport { __iconNode, Zap as default };\n//# sourceMappingURL=zap.js.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — Calendar. */\n/* */\n/* Calendar's existing `CalendarHandle` is the canonical shape for an */\n/* agent-friendly third-party wrapper — see `26-agent-readiness.mdx` */\n/* §15. The handle methods translate directly into adapter actions. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CalendarHandle, CalendarView } from './calendar';\n\nexport const calendarAgent: AgentAdapter<CalendarHandle> = {\n id: 'calendar',\n capabilities: ['view_change', 'range_navigate', 'pick'],\n state: {\n currentView: {\n type: 'CalendarView',\n descriptionKey: 'ui.agent.calendar.state.currentView',\n description: 'Active view name (e.g. dayGridMonth, timeGridWeek).',\n read: (handle) => handle.getCurrentView() ?? null,\n },\n currentDate: {\n type: 'iso-date',\n descriptionKey: 'ui.agent.calendar.state.currentDate',\n description: 'ISO date anchor of the visible range.',\n read: (handle) => handle.getCurrentDate()?.toISOString() ?? null,\n },\n currentTitle: {\n type: 'string',\n descriptionKey: 'ui.agent.calendar.state.currentTitle',\n description: 'Human title of the current range (e.g. \"April 2026\").',\n read: (handle) => handle.getTitle(),\n },\n },\n actions: {\n today: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.today',\n description: 'Jump to the current day.',\n invoke: (handle) => {\n handle.today();\n },\n },\n prev: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.prev',\n description: 'Move to the previous range.',\n invoke: (handle) => {\n handle.prev();\n },\n },\n next: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.next',\n description: 'Move to the next range.',\n invoke: (handle) => {\n handle.next();\n },\n },\n goto_date: {\n safety: 'read',\n argsType: '{ date: string | Date }',\n descriptionKey: 'ui.agent.calendar.actions.gotoDate',\n description: 'Navigate to a specific date.',\n invoke: (handle, args: { date: string | Date }) => {\n handle.gotoDate(args.date);\n },\n },\n change_view: {\n safety: 'read',\n argsType: '{ view: CalendarView }',\n descriptionKey: 'ui.agent.calendar.actions.changeView',\n description: 'Switch the calendar to the given view.',\n invoke: (handle, args: { view: CalendarView }) => {\n handle.changeView(args.view);\n },\n },\n focus_event: {\n safety: 'read',\n argsType: '{ eventId: string }',\n descriptionKey: 'ui.agent.calendar.actions.focusEvent',\n description: 'Scroll an event into view and briefly highlight it.',\n invoke: (handle, args: { eventId: string }) => {\n handle.focusEvent(args.eventId);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'calendar',\n description: 'Marks the Calendar wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description: 'Emitted on every rendered FullCalendar event by the kit event renderer. Used by focusEvent.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Calendar — a thin, typed wrapper over FullCalendar. */\n/* */\n/* - Plugins are registered once internally so consumers never import */\n/* `@fullcalendar/core` / plugins directly (08-third-party §Calendar).*/\n/* - Chrome is styled entirely from `fullcalendar-theme.css` via the */\n/* `.fc-theme-alfadocs` root class — no inline styles anywhere. */\n/* - Locale, week-start, date formats, and direction all flow from the */\n/* active i18next language (06-i18n.mdx). */\n/* */\n/* TODO (deferred, per implementation plan): */\n/* - Virtualised resource timeline with @tanstack/react-virtual for */\n/* > 50 resources (performance user story). */\n/* - Protanopia screenshot stories (colour-blind story acceptance). */\n/* - Playwright performance trace for 1000 events / 50 resources. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport FullCalendar from '@fullcalendar/react';\nimport dayGridPlugin from '@fullcalendar/daygrid';\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport listPlugin from '@fullcalendar/list';\nimport resourcePlugin from '@fullcalendar/resource';\nimport type { ResourceLabelContentArg } from '@fullcalendar/resource';\nimport resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';\nimport resourceTimelinePlugin from '@fullcalendar/resource-timeline';\nimport timelinePlugin from '@fullcalendar/timeline';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport type { EventResizeDoneArg } from '@fullcalendar/interaction';\nimport type {\n DatesSetArg,\n EventClickArg,\n EventContentArg,\n EventDropArg,\n DateSelectArg,\n EventInput,\n} from '@fullcalendar/core';\nimport {\n ThumbsUp,\n Clock,\n Stethoscope,\n Check,\n Ban,\n Zap,\n Globe,\n AlertTriangle,\n HeartPulse,\n Euro,\n Video,\n ChevronLeft,\n ChevronRight,\n type LucideIcon,\n} from 'lucide-react';\nimport '../../tokens/themes/bridges/fullcalendar-theme.css';\n\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { useAgentRegistration } from '../../agent';\nimport { warnLowContrast } from './contrast-warning';\nimport { calendarAgent } from './calendar.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type CalendarView =\n // Standard views\n | 'dayGridMonth'\n | 'timeGridWeek'\n | 'timeGridDay'\n | 'listWeek'\n // Chair resource views\n | 'resourceTimeGridDayChair'\n | 'resourceTimeGridThreeDaysChair'\n | 'resourceTimeGridWeekChair'\n // Operator resource views\n | 'resourceTimeGridDayOperator'\n | 'resourceTimeGridThreeDaysOperator'\n | 'resourceTimeGridWeekOperator';\n\n/**\n * View-name mapping table — maps the DS public view name (with the\n * Chair/Operator semantic suffix stripped) onto the internal FullCalendar\n * view name for each `resourceLayout` orientation. The table is exported\n * via `resolveFullCalendarView`; invalid combinations are caught at\n * compile time because the `CalendarView` union is exhaustive.\n */\nconst RESOURCE_VIEW_MAP = {\n vertical: {\n Day: 'resourceTimeGridDay',\n ThreeDays: 'resourceTimeGridThreeDays',\n Week: 'resourceTimeGridWeek',\n },\n horizontal: {\n Day: 'resourceTimelineDay',\n ThreeDays: 'resourceTimelineThreeDays',\n Week: 'resourceTimelineWeek',\n },\n} as const satisfies Record<\n 'vertical' | 'horizontal',\n Record<'Day' | 'ThreeDays' | 'Week', string>\n>;\n\ntype ResourceViewStem = keyof (typeof RESOURCE_VIEW_MAP)['vertical'];\n\nconst STANDARD_VIEWS = new Set<CalendarView>([\n 'dayGridMonth',\n 'timeGridWeek',\n 'timeGridDay',\n 'listWeek',\n]);\n\n/**\n * Maps a public `CalendarView` name to the internal FullCalendar view\n * name. `resourceLayout` selects between `resourceTimeGrid*` (vertical)\n * and `resourceTimeline*` (horizontal) for the 6 resource views; the\n * 4 standard views are returned as-is.\n */\nexport function resolveFullCalendarView(\n view: CalendarView,\n resourceLayout: 'vertical' | 'horizontal' = 'vertical',\n): string {\n if (STANDARD_VIEWS.has(view)) {\n return view;\n }\n // Strip the trailing Chair / Operator suffix — the DS maps both to the\n // same internal FC view name. The suffix is semantic only.\n const withoutPrefix = view.replace(/^resourceTimeGrid/, '');\n const stem = withoutPrefix.replace(/(Chair|Operator)$/, '') as ResourceViewStem;\n return RESOURCE_VIEW_MAP[resourceLayout][stem];\n}\n\n/**\n * Registered custom FC view shapes — the two 3-day views are defined as\n * durations over the base `resourceTimeGrid` / `resourceTimeline` types.\n * Kept at module scope because the object is a compile-time constant.\n * Typed loosely to match FC's `ViewConfigInputHash` ( `[viewType: string]:\n * ViewConfigInput` ).\n */\nconst CALENDAR_CUSTOM_VIEWS: Record<\n string,\n { type: string; duration: { days: number } }\n> = {\n resourceTimeGridThreeDays: {\n type: 'resourceTimeGrid',\n duration: { days: 3 },\n },\n resourceTimelineThreeDays: {\n type: 'resourceTimeline',\n duration: { days: 3 },\n },\n};\n\nexport type CalendarEventStatus =\n | 'confirmed'\n | 'waiting'\n | 'in_care'\n | 'done'\n | 'cancelled'\n | 'absent';\n\nexport type CalendarMode = 'default' | 'create' | 'move' | 'copy';\n\nexport interface CalendarEvent {\n id: string;\n title: string;\n start: string | Date;\n end?: string | Date;\n resourceId?: string;\n allDay?: boolean;\n\n /* Appointment-specific (all optional) */\n status?: CalendarEventStatus;\n /** Hex colour from a DoctorColor palette — overrides CVA bg. */\n backgroundColor?: string;\n /** Hex colour from a DoctorColor palette — overrides CVA text. */\n textColor?: string;\n /** Extra description rendered after the title in normal weight. */\n suffix?: string;\n /** Masked title shown when `privacyMode` is true. */\n privacyModeTitle?: string;\n /** Shows a Globe icon + zebra overlay. */\n isBookedOnline?: boolean;\n /** Shows an AlertTriangle icon. */\n hasUnassignedPatient?: boolean;\n /** Shows a HeartPulse icon. */\n hasHighlightedAnamnesis?: boolean;\n /** Shows a Euro icon. */\n hasBillableAmount?: boolean;\n /** Shows a Video icon. */\n isTelehealth?: boolean;\n isRecurrenceParent?: boolean;\n /** Rendered as a background event; not clickable. */\n isInternal?: boolean;\n patientId?: string | number;\n operatorId?: string | number;\n}\n\nexport interface CalendarResource {\n id: string;\n title: string;\n /** Initials for the compact \"avatar\" label (e.g. \"MR\"). */\n shortTitle?: string;\n /** Hex background colour for the dot or initials circle. */\n color?: string;\n /** Hex text colour for the initials circle. */\n shortTitleTextColor?: string;\n /** Numeric ordering — passed to FullCalendar's `resourceOrder`. */\n sequenceNumber?: number;\n}\n\nexport interface CalendarEventDropInfo {\n event: CalendarEvent;\n oldStart: Date;\n newStart: Date;\n}\n\nexport interface CalendarEventResizeInfo {\n event: CalendarEvent;\n oldEnd: Date;\n newEnd: Date;\n}\n\nexport interface CalendarDateSelectInfo {\n start: Date;\n end: Date;\n allDay: boolean;\n resourceId?: string;\n}\n\nexport interface CalendarProps {\n /**\n * Stable identifier for this calendar instance. Used for the agent-readiness\n * `data-component-id` attribute and the agent registry. Required only when\n * the consuming app expects an MCP / agent integration to address this\n * specific calendar.\n */\n id?: string;\n /** Events to render on the calendar. */\n events: CalendarEvent[];\n /** Resources for `resourceTimeline` view. */\n resources?: CalendarResource[];\n /** Active view. */\n view?: CalendarView;\n /** Initial date (string or Date). */\n initialDate?: string | Date;\n /** Locale override — defaults to the active i18next language. */\n locale?: string;\n /** Fires when an event is dragged to a new slot. */\n onEventDrop?: (info: CalendarEventDropInfo) => void;\n /** Fires when an event is resized. */\n onEventResize?: (info: CalendarEventResizeInfo) => void;\n /** Fires when an event resize gesture begins. */\n onEventResizeStart?: () => void;\n /** Fires when an event is clicked. */\n onEventClick?: (event: CalendarEvent) => void;\n /** Fires when the user click-drags a range to create a new event. */\n onDateSelect?: (range: CalendarDateSelectInfo) => void;\n /** Allow drag-drop rescheduling. */\n editable?: boolean;\n /** Allow resize gestures on events. Defaults to `editable`. */\n eventDurationEditable?: boolean;\n /** Allow click-drag to create. */\n selectable?: boolean;\n /** Height of the calendar. */\n height?: number | string;\n /** Extra class names on the wrapper. */\n className?: string;\n /** Mask patient titles — announces state changes via aria-live. */\n privacyMode?: boolean;\n /** Interaction mode — renders a sticky banner when not `'default'`. */\n mode?: CalendarMode;\n /** Override text for the mode banner. */\n modeLabel?: string;\n /** Hex background colour for the mode banner (consuming-app supplied). */\n modeBannerColor?: string;\n /** Hex text colour for the mode banner. */\n modeBannerTextColor?: string;\n /** Cancel handler wired to the mode banner button. */\n onModeCancel?: () => void;\n /** Optional alert banner rendered above the mode banner. */\n alertBanner?: ReactNode;\n /** Lower bound of the time axis (e.g. '07:00'). */\n slotMinTime?: string;\n /** Upper bound of the time axis (e.g. '23:00'). */\n slotMaxTime?: string;\n /** Slot duration (e.g. '00:15'). */\n slotDuration?: string;\n /** When false, hides the inline time pill on events. */\n showTime?: boolean;\n /** Place date headers above the resource axis. */\n datesAboveResources?: boolean;\n /** Allow overlapping events in the same slot. */\n slotEventOverlap?: boolean;\n /** Keep date headers pinned during scroll. */\n stickyHeaderDates?: boolean;\n /** Show a now-indicator line on time-grid views. */\n nowIndicator?: boolean;\n /** Collapse overflow events into \"+N more\" links. */\n dayMaxEvents?: boolean | number;\n /**\n * FullCalendar Scheduler premium license key. Required for the\n * `resourceTimeline` view. Defaults to `VITE_FULLCALENDAR_LICENSE_KEY`\n * from the environment; consumers can override per-instance.\n */\n schedulerLicenseKey?: string;\n /**\n * Show the built-in toolbar. Default true. Pass false to hide it\n * entirely (e.g. when the consuming app renders its own\n * `<Calendar.Toolbar ... />` elsewhere on the page).\n */\n toolbar?: boolean;\n /**\n * Extra controls rendered at the inline-end of the default toolbar —\n * commonly a view switcher, a privacy toggle, or an \"add appointment\"\n * button. Ignored when `toolbar` is false.\n */\n toolbarEnd?: ReactNode;\n /**\n * Orientation for resource views. `vertical` (default) uses\n * `resourceTimeGrid` — resources as columns, time as rows.\n * `horizontal` uses `resourceTimeline` — resources as rows, time as columns.\n * Ignored for non-resource views.\n */\n resourceLayout?: 'vertical' | 'horizontal';\n /**\n * When true, render a round initials avatar (using\n * `resource.shortTitle` + `resource.color` + `resource.shortTitleTextColor`)\n * in the resource label. When false (default), a small coloured dot\n * prefixes the title when `resource.color` is set.\n */\n showResourceInitials?: boolean;\n}\n\nexport interface CalendarHandle {\n /** Returns the internal FullCalendar instance for advanced use. */\n getApi: () => unknown;\n /** Jump to today. */\n today: () => void;\n /** Navigate to the previous period. */\n prev: () => void;\n /** Navigate to the next period. */\n next: () => void;\n /** Navigate to an arbitrary date. */\n gotoDate: (date: Date | string) => void;\n /** Switch the active view. */\n changeView: (view: CalendarView) => void;\n /** Current view title (e.g. \"April 2026\") — reflects the FC API getter. */\n getTitle: () => string;\n /** Currently active view name. */\n getCurrentView: () => CalendarView | undefined;\n /** Currently focused date — the anchor of the visible range. */\n getCurrentDate: () => Date | undefined;\n /** Scroll to an event by id and briefly highlight it. */\n focusEvent: (eventId: string) => void;\n}\n\n/* Narrow structural interface for the subset of the FullCalendar API\n we actually invoke. Keeps the handle methods typed without pulling\n `@fullcalendar/core` types across the public boundary. */\ninterface FcApi {\n today: () => void;\n prev: () => void;\n next: () => void;\n gotoDate: (date: Date | string) => void;\n changeView: (view: string) => void;\n render: () => void;\n getDate: () => Date;\n view: { title: string; type: string };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — status → event card classes */\n/* ------------------------------------------------------------------ */\n\nconst eventCardVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:w-full ds:h-full',\n 'ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[length:var(--font-size-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:overflow-hidden',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n {\n variants: {\n status: {\n // Note: every text-[…] uses the explicit `color:` prefix so\n // Tailwind interprets it as a colour, not a length. Without the\n // prefix, `text-[var(--X)]` resolves to font-size and the text\n // colour falls through to the inherited `--foreground` — which\n // produced 2.07:1 axe failures on saturated backgrounds.\n confirmed:\n 'ds:bg-[color:var(--success)] ds:text-[color:var(--success-solid-foreground)] ds:border ds:border-[color:var(--success)]',\n waiting:\n 'ds:bg-[color:var(--info)] ds:text-[color:var(--info-solid-foreground)] ds:border ds:border-[color:var(--info)]',\n in_care:\n 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]',\n // `done` reads as \"completed, fading out\". Previously\n // `bg-color-mix(--success 70%, transparent) text-success-solid-foreground`,\n // composited to ~#65a586 with white text → 2.88:1 fail.\n // Now uses a low-saturation tint background with dark\n // `--foreground` text + a left accent bar carrying the status\n // hue.\n done:\n 'ds:bg-[color:color-mix(in_srgb,var(--success)_18%,var(--background))] ds:text-[color:var(--foreground)] ds:border-s-[3px] ds:border-s-[color:var(--success)] ds:border-y ds:border-e ds:border-y-[color:color-mix(in_srgb,var(--success)_25%,var(--border))] ds:border-e-[color:color-mix(in_srgb,var(--success)_25%,var(--border))]',\n cancelled:\n 'ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)] ds:border ds:border-[color:var(--destructive)] ds:line-through',\n absent:\n 'ds:bg-[color:var(--warning)] ds:text-[color:var(--warning-solid-foreground)] ds:border ds:border-[color:var(--warning)]',\n default:\n 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]',\n },\n },\n defaultVariants: { status: 'default' },\n },\n);\n\nconst STATUS_ICON: Record<CalendarEventStatus, LucideIcon> = {\n confirmed: ThumbsUp,\n waiting: Clock,\n in_care: Stethoscope,\n done: Check,\n cancelled: Ban,\n absent: Zap,\n};\n\n/* Mode banner → i18n key lookup. Kept as a literal object (not a\n template) so static-analysis extractors can find every key. */\nconst MODE_BANNER_KEYS: Record<Exclude<CalendarMode, 'default'>, string> = {\n create: 'calendar.modeBanner.create',\n move: 'calendar.modeBanner.move',\n copy: 'calendar.modeBanner.copy',\n};\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\ninterface LocaleWeekInfo {\n firstDay?: number;\n}\n\ninterface LocaleWithWeekInfo {\n getWeekInfo?: () => LocaleWeekInfo;\n weekInfo?: LocaleWeekInfo;\n}\n\n/**\n * Resolve the first day of the week for a locale using the modern\n * `Intl.Locale.getWeekInfo()` API when available, falling back to Monday\n * for EU-leaning locales and Sunday for en-US / he-IL / ar-SA.\n */\nexport function resolveFirstDay(locale: string): number {\n try {\n const intlLocale = new Intl.Locale(locale) as unknown as LocaleWithWeekInfo;\n const info =\n typeof intlLocale.getWeekInfo === 'function'\n ? intlLocale.getWeekInfo()\n : intlLocale.weekInfo;\n if (info && typeof info.firstDay === 'number') {\n return info.firstDay % 7;\n }\n } catch {\n /* no-op — fall through to heuristic */\n }\n if (\n locale.startsWith('en-US') ||\n locale.startsWith('he') ||\n locale.startsWith('ar-SA')\n ) {\n return 0;\n }\n return 1;\n}\n\n/**\n * Small hook that mirrors the parent Calendar's document-dir observer\n * so sub-components can swap physical icons for logical direction\n * without threading a prop through. Returns true when the effective\n * document direction is RTL.\n */\nfunction useIsRtl(): boolean {\n const { i18n } = useTranslation();\n const [isRtl, setIsRtl] = useState<boolean>(() => {\n if (typeof document === 'undefined') return false;\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n return docDir === 'rtl' || i18nDir === 'rtl';\n });\n\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const observer = new MutationObserver(() => {\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n setIsRtl(docDir === 'rtl' || i18nDir === 'rtl');\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang'],\n });\n return () => observer.disconnect();\n }, [i18n]);\n\n return isRtl;\n}\n\n/* ------------------------------------------------------------------ */\n/* Event content render-prop */\n/* */\n/* Renders the event card with: */\n/* - a status icon (aria-hidden) coloured by status token */\n/* - indicator icons (online, unassigned, anamnesis, billable, tele) */\n/* - a time range pill (when !allDay && showTime) */\n/* - the event title (bold, masked in privacy mode) */\n/* - an optional suffix (regular weight) */\n/* - an aria-label built from title + range + resource + status */\n/* ------------------------------------------------------------------ */\n\ninterface RenderEventContentParams {\n arg: EventContentArg;\n locale: string;\n resources: CalendarResource[];\n statusLabels: Record<CalendarEventStatus, string>;\n privacyMode: boolean;\n showTime: boolean;\n}\n\ntype EventExtendedProps = Omit<CalendarEvent, 'id' | 'title' | 'start' | 'end' | 'allDay'>;\n\nfunction renderEventContent({\n arg,\n locale,\n resources,\n statusLabels,\n privacyMode,\n showTime,\n}: RenderEventContentParams): ReactElement {\n const extended = (arg.event.extendedProps ?? {}) as EventExtendedProps;\n const {\n status,\n backgroundColor,\n textColor,\n suffix,\n privacyModeTitle,\n isBookedOnline,\n hasUnassignedPatient,\n hasHighlightedAnamnesis,\n hasBillableAmount,\n isTelehealth,\n resourceId,\n } = extended;\n\n const StatusIcon = status ? STATUS_ICON[status] : null;\n\n const start = arg.event.start;\n const end = arg.event.end ?? arg.event.start;\n const allDay = arg.event.allDay;\n\n let rangeText = '';\n if (start && end) {\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n rangeText =\n typeof fmt.formatRange === 'function'\n ? fmt.formatRange(start, end)\n : `${fmt.format(start)} – ${fmt.format(end)}`;\n } catch {\n rangeText = '';\n }\n }\n\n const resourceTitle = resourceId\n ? resources.find((r) => r.id === resourceId)?.title\n : undefined;\n const statusLabel = status ? statusLabels[status] : undefined;\n\n const displayTitle = privacyMode\n ? (privacyModeTitle ?? '•••')\n : arg.event.title;\n\n const ariaLabel = [displayTitle, rangeText, resourceTitle, statusLabel]\n .filter(Boolean)\n .join(', ');\n\n /* Per-event colour override: the consuming app passes a runtime hex\n from a DoctorColor (Material-Design style) palette. 23-constraints\n permits inline `style` only as a CSS custom property setter for\n runtime values that can't be enumerated at build time — the\n consuming `background-color` / `color` references live in the\n className as Tailwind arbitrary values. */\n const colourOverrides: CSSProperties | undefined =\n backgroundColor || textColor\n ? {\n ...(backgroundColor\n ? ({ '--calendar-event-bg': backgroundColor } as CSSProperties)\n : {}),\n ...(textColor\n ? ({ '--calendar-event-text': textColor } as CSSProperties)\n : {}),\n }\n : undefined;\n\n /* DEV-only guardrail: warn when caller-supplied bg/fg hex pair falls\n below WCAG AA. No-op when either half is missing (fg missing falls\n back to the DS foreground token, which isn't a hex we can check). */\n if (backgroundColor || textColor) {\n warnLowContrast(backgroundColor, textColor, `event ${arg.event.id}`);\n }\n\n const className = [\n eventCardVariants({ status: status ?? 'default' }),\n isBookedOnline ? 'event-booked-online' : null,\n backgroundColor ? '[background-color:var(--calendar-event-bg)]' : null,\n textColor ? '[color:var(--calendar-event-text)]' : null,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n className={className}\n style={colourOverrides}\n aria-label={ariaLabel}\n data-event-id={arg.event.id}\n >\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:self-end\">\n {StatusIcon ? (\n <StatusIcon size={14} aria-hidden=\"true\" />\n ) : null}\n {isBookedOnline ? <Globe size={12} aria-hidden=\"true\" /> : null}\n {hasUnassignedPatient ? (\n <AlertTriangle size={12} aria-hidden=\"true\" />\n ) : null}\n {hasHighlightedAnamnesis ? (\n <HeartPulse size={12} aria-hidden=\"true\" />\n ) : null}\n {hasBillableAmount ? <Euro size={12} aria-hidden=\"true\" /> : null}\n {isTelehealth ? <Video size={12} aria-hidden=\"true\" /> : null}\n </div>\n {showTime && !allDay && rangeText ? (\n // No opacity here — composing 70% over saturated bgs (success /\n // destructive / primary) drops effective contrast below WCAG AA\n // (≤ 3.82:1 measured). The smaller font-size-xs vs the title's\n // font-weight-semibold provides sufficient visual hierarchy.\n <span className=\"ds:text-[length:var(--font-size-xs)]\">\n {rangeText}\n </span>\n ) : null}\n <span className=\"ds:font-[var(--font-weight-semibold)] ds:truncate ds:text-start\">\n {displayTitle}\n </span>\n {suffix ? (\n <span className=\"ds:truncate ds:text-start ds:text-[length:var(--font-size-xs)]\">\n {suffix}\n </span>\n ) : null}\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* CalendarToolbar — compound sub-component */\n/* */\n/* Renders the DS-styled prev/today/next controls + a centered <h2> */\n/* title (aria-live so navigation updates announce politely) plus an */\n/* optional inline-end slot. Logical properties only; physical icons */\n/* (ChevronLeft / ChevronRight) are swapped in RTL so the pair always */\n/* points in the expected reading direction. */\n/* ------------------------------------------------------------------ */\n\nexport interface CalendarToolbarProps {\n /** Title shown in the toolbar (e.g. \"April 2026\"). Typically\n * produced by `calendarHandle.getTitle()`. */\n title?: string;\n /** Jump to today. */\n onToday: () => void;\n /** Navigate to the previous period. */\n onPrev: () => void;\n /** Navigate to the next period. */\n onNext: () => void;\n /** Extra controls rendered at the inline-end. */\n end?: ReactNode;\n /** Additional className. */\n className?: string;\n}\n\nconst toolbarButtonBaseClass = [\n 'inline-flex items-center justify-center',\n 'min-h-[var(--min-target-size)]',\n 'bg-[var(--background)] text-[var(--foreground)]',\n 'border border-[var(--border)]',\n 'rounded-[var(--radius-full)]',\n 'font-[var(--font-weight-medium)] text-[length:var(--font-size-sm)]',\n 'transition-colors duration-[var(--animation-duration)] ease-[var(--ease-out)]',\n 'hover:bg-[var(--muted)]',\n 'focus-visible:outline-[length:var(--focus-ring-width)]',\n 'focus-visible:outline-[var(--ring)]',\n 'focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'motion-reduce:transition-none',\n].join(' ');\n\nconst toolbarTextButtonClass = [\n toolbarButtonBaseClass,\n 'ps-[var(--spacing-md)] pe-[var(--spacing-md)]',\n].join(' ');\n\nconst toolbarIconButtonClass = [\n toolbarButtonBaseClass,\n 'min-w-[var(--min-target-size)]',\n].join(' ');\n\nexport const CalendarToolbar = forwardRef<HTMLDivElement, CalendarToolbarProps>(\n ({ title, onToday, onPrev, onNext, end, className }, ref) => {\n const { t } = useTranslation();\n const isRtl = useIsRtl();\n const PrevIcon = isRtl ? ChevronRight : ChevronLeft;\n const NextIcon = isRtl ? ChevronLeft : ChevronRight;\n\n const rootClassName = [\n 'calendar-toolbar',\n 'sticky top-0 z-20',\n 'flex items-center gap-[var(--spacing-sm)]',\n 'ps-[var(--spacing-md)] pe-[var(--spacing-md)]',\n 'py-[var(--spacing-sm)]',\n 'bg-[var(--background)]',\n 'border-b border-[var(--border)]',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div ref={ref} className={rootClassName}>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <button\n type=\"button\"\n onClick={onToday}\n className={toolbarTextButtonClass}\n >\n {t('calendar.today')}\n </button>\n <button\n type=\"button\"\n onClick={onPrev}\n aria-label={t('calendar.previousPeriod')}\n className={toolbarIconButtonClass}\n >\n <PrevIcon size={16} aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n onClick={onNext}\n aria-label={t('calendar.nextPeriod')}\n className={toolbarIconButtonClass}\n >\n <NextIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n {title ? (\n <h2\n aria-live=\"polite\"\n className=\"ds:flex-1 ds:text-center ds:truncate type-title-card\"\n >\n {title}\n </h2>\n ) : (\n /* Keep the centering slot stable even before the first\n `datesSet` populates the title — an empty <h2> would trip\n axe's `empty-heading` rule, so we substitute a decorative\n spacer that matches the h2's flex sizing. Once `title` is\n non-empty the h2 renders in the same slot. */\n <div\n aria-hidden=\"true\"\n className=\"ds:flex-1 ds:text-center\"\n />\n )}\n {end ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">{end}</div>\n ) : null}\n </div>\n );\n },\n);\nCalendarToolbar.displayName = 'Calendar.Toolbar';\n\n/* ------------------------------------------------------------------ */\n/* Calendar component */\n/* ------------------------------------------------------------------ */\n\nconst CalendarInner = forwardRef<CalendarHandle, CalendarProps>(\n (\n {\n id,\n events,\n resources,\n view = 'dayGridMonth',\n initialDate,\n locale: localeProp,\n onEventDrop,\n onEventResize,\n onEventResizeStart,\n onEventClick,\n onDateSelect,\n editable = false,\n eventDurationEditable,\n selectable = false,\n height,\n className,\n privacyMode = false,\n mode = 'default',\n modeLabel,\n modeBannerColor,\n modeBannerTextColor,\n onModeCancel,\n alertBanner,\n slotMinTime,\n slotMaxTime,\n slotDuration,\n showTime = true,\n datesAboveResources = true,\n slotEventOverlap = false,\n stickyHeaderDates = true,\n nowIndicator = true,\n dayMaxEvents = true,\n schedulerLicenseKey = import.meta.env.VITE_FULLCALENDAR_LICENSE_KEY,\n toolbar = true,\n toolbarEnd,\n resourceLayout = 'vertical',\n showResourceInitials = false,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const fcRef = useRef<FullCalendar | null>(null);\n const rootRef = useRef<HTMLDivElement>(null);\n const liveRegionRef = useRef<HTMLDivElement>(null);\n const focusTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const focusedElRef = useRef<HTMLElement | null>(null);\n\n const locale = localeProp ?? i18n.language ?? 'en';\n\n /* ---- direction reacts to dir attribute changes ----------------- */\n const [direction, setDirection] = useState<'ltr' | 'rtl'>(() => {\n if (typeof document === 'undefined') return 'ltr';\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n return docDir === 'rtl' || i18nDir === 'rtl' ? 'rtl' : 'ltr';\n });\n\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const observer = new MutationObserver(() => {\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n setDirection(docDir === 'rtl' || i18nDir === 'rtl' ? 'rtl' : 'ltr');\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang'],\n });\n return () => observer.disconnect();\n }, [i18n]);\n\n /* ---- theme class-change observer → forces FullCalendar repaint - */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n const api = fcRef.current?.getApi() as unknown;\n if (\n api &&\n typeof (api as { render?: () => void }).render === 'function'\n ) {\n (api as { render: () => void }).render();\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- FullCalendar markup a11y patches --------------------------- */\n /* */\n /* FullCalendar emits a few markup patterns that axe (correctly) */\n /* flags but we cannot fix without forking FC. Patching at */\n /* render-time via MutationObserver keeps the fix scoped: */\n /* */\n /* 1. `<a aria-expanded aria-controls>` for the daygrid \"+N more\" */\n /* trigger has no `role` — `aria-expanded` is not allowed on a */\n /* bare anchor. Add `role=\"button\"`. */\n /* 2. `.fc-scroller` is a scrollable region with no keyboard */\n /* access — give it `tabindex=\"0\"` and `role=\"region\"` so */\n /* keyboard users can scroll it. */\n /* 3. `.fc-bg-event` (background events used for highlight ranges) */\n /* is rendered with `aria-hidden=\"true\"` ancestor + an inner */\n /* `<a tabindex=\"0\">` — strip the focusability when */\n /* `aria-hidden` is in effect. */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const root = rootRef.current;\n if (!root) return undefined;\n\n const patchMarkup = () => {\n root\n .querySelectorAll<HTMLAnchorElement>('.fc-daygrid-more-link')\n .forEach((link) => {\n if (!link.getAttribute('role')) {\n link.setAttribute('role', 'button');\n }\n });\n // `.fc-scroller` cannot be patched — adding `tabindex=\"0\"`\n // makes it a focusable direct child of FC's `<table\n // role=\"grid\">`, which axe (correctly) flags as a violation of\n // `aria-required-children` (a grid expects only `role=\"row\"`\n // children). The `scrollable-region-focusable` rule will need\n // an upstream FC fix or per-story override; for now we accept\n // it. (Tracked: deferred.)\n // Inside any aria-hidden subtree, force focusable descendants to\n // tabindex=\"-1\" so they leave the tab sequence (axe\n // aria-hidden-focus). FC marks decorative rows / mirror events\n // aria-hidden but leaves the inner anchors focusable.\n root.querySelectorAll<HTMLElement>('[aria-hidden=\"true\"]').forEach(\n (hidden) => {\n hidden\n .querySelectorAll<HTMLElement>(\n 'a[href], button, [tabindex]:not([tabindex=\"-1\"])',\n )\n .forEach((el) => {\n el.setAttribute('tabindex', '-1');\n });\n },\n );\n };\n\n patchMarkup();\n const observer = new MutationObserver(patchMarkup);\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden'],\n });\n return () => observer.disconnect();\n }, [t]);\n\n /* ---- reduced-motion gate --------------------------------------- */\n const reducedMotion = usePrefersReducedMotion();\n\n /* ---- current title (synced from FC via datesSet) --------------- */\n const [currentTitle, setCurrentTitle] = useState('');\n\n /* ---- imperative handle ----------------------------------------- */\n const handle = useMemo<CalendarHandle>(() => {\n const getRawApi = (): FcApi | undefined =>\n fcRef.current?.getApi() as FcApi | undefined;\n\n return {\n getApi: () => fcRef.current?.getApi(),\n today: () => {\n getRawApi()?.today();\n },\n prev: () => {\n getRawApi()?.prev();\n },\n next: () => {\n getRawApi()?.next();\n },\n gotoDate: (date: Date | string) => {\n getRawApi()?.gotoDate(date);\n },\n changeView: (nextView: CalendarView) => {\n getRawApi()?.changeView(\n resolveFullCalendarView(nextView, resourceLayout),\n );\n },\n getTitle: () => getRawApi()?.view.title ?? '',\n getCurrentView: () => {\n const type = getRawApi()?.view.type;\n return type as CalendarView | undefined;\n },\n getCurrentDate: () => getRawApi()?.getDate(),\n focusEvent: (eventId: string) => {\n const root = rootRef.current;\n if (!root) return;\n const selector = `[data-event-id=\"${CSS.escape(eventId)}\"]`;\n const element = root.querySelector<HTMLElement>(selector);\n if (!element) {\n if (import.meta.env.DEV) {\n console.warn(\n `[Calendar] focusEvent: no DOM node matches event id \"${eventId}\".`,\n );\n }\n return;\n }\n /* Clear any previous highlight still in-flight before\n starting a new one — prevents overlapping timers from\n removing the className mid-animation. */\n if (focusTimerRef.current) {\n clearTimeout(focusTimerRef.current);\n focusTimerRef.current = null;\n }\n if (\n focusedElRef.current &&\n focusedElRef.current !== element\n ) {\n focusedElRef.current.classList.remove('calendar-event-focused');\n }\n \n element.scrollIntoView({\n behavior: reducedMotion ? 'auto' : 'smooth',\n block: 'center',\n });\n element.classList.add('calendar-event-focused');\n focusedElRef.current = element;\n \n /* Announce via aria-live, masking the title under privacy\n mode the same way drop/resize do. */\n if (liveRegionRef.current) {\n const titleAttr =\n element.getAttribute('aria-label') ?? eventId;\n const announcedTitle = privacyMode ? '•••' : titleAttr;\n liveRegionRef.current.textContent = t('calendar.focusedEvent', {\n title: announcedTitle,\n });\n }\n \n focusTimerRef.current = setTimeout(() => {\n element.classList.remove('calendar-event-focused');\n if (focusedElRef.current === element) {\n focusedElRef.current = null;\n }\n focusTimerRef.current = null;\n }, 3000);\n },\n };\n }, [reducedMotion, privacyMode, t, resourceLayout]);\n\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(calendarAgent, handle, id);\n\n /* Clean up any pending focus timer on unmount. */\n useEffect(\n () => () => {\n if (focusTimerRef.current) {\n clearTimeout(focusTimerRef.current);\n focusTimerRef.current = null;\n }\n },\n [],\n );\n\n /* ---- translated toolbar button labels (used by FC internal when\n we opt in to its toolbar — currently always off in the default\n path; retained for noEventsText / allDayText completeness) ---- */\n const statusLabels = useMemo<Record<CalendarEventStatus, string>>(\n () => ({\n confirmed: t('calendar.status.confirmed'),\n waiting: t('calendar.status.waiting'),\n in_care: t('calendar.status.inCare'),\n done: t('calendar.status.done'),\n cancelled: t('calendar.status.cancelled'),\n absent: t('calendar.status.absent'),\n }),\n [t],\n );\n\n /* ---- privacy-mode announcer (skip initial render) --------------- */\n const privacyFirstRun = useRef(true);\n useEffect(() => {\n if (privacyFirstRun.current) {\n privacyFirstRun.current = false;\n return;\n }\n if (liveRegionRef.current) {\n liveRegionRef.current.textContent = privacyMode\n ? t('calendar.privacyModeOn')\n : t('calendar.privacyModeOff');\n }\n }, [privacyMode, t]);\n\n /* ---- adapt events for FullCalendar ----------------------------- */\n const fcEvents = useMemo<EventInput[]>(\n () =>\n events.map((event) => ({\n id: event.id,\n title: event.title,\n start: event.start,\n end: event.end,\n allDay: event.allDay,\n resourceId: event.resourceId,\n display: event.isInternal ? 'background' : undefined,\n extendedProps: {\n status: event.status,\n resourceId: event.resourceId,\n backgroundColor: event.backgroundColor,\n textColor: event.textColor,\n suffix: event.suffix,\n privacyModeTitle: event.privacyModeTitle,\n isBookedOnline: event.isBookedOnline ?? false,\n hasUnassignedPatient: event.hasUnassignedPatient ?? false,\n hasHighlightedAnamnesis: event.hasHighlightedAnamnesis ?? false,\n hasBillableAmount: event.hasBillableAmount ?? false,\n isTelehealth: event.isTelehealth ?? false,\n isRecurrenceParent: event.isRecurrenceParent ?? false,\n isInternal: event.isInternal ?? false,\n patientId: event.patientId,\n operatorId: event.operatorId,\n },\n })),\n [events],\n );\n\n /* ---- formatters (Intl, never literal format strings) ----------- */\n const titleFormat = useMemo(\n () => ({\n year: 'numeric' as const,\n month: 'long' as const,\n }),\n [],\n );\n const dayHeaderFormat = useMemo(\n () => ({\n weekday: 'short' as const,\n }),\n [],\n );\n const eventTimeFormat = useMemo(\n () => ({\n hour: 'numeric' as const,\n minute: '2-digit' as const,\n }),\n [],\n );\n const slotLabelFormat = useMemo(\n () => ({\n hour: 'numeric' as const,\n minute: '2-digit' as const,\n }),\n [],\n );\n\n /* ---- helper: adapt FC event to CalendarEvent -------------------- */\n const adaptEvent = (\n fcEvent: EventDropArg['event'] | EventClickArg['event'],\n ): CalendarEvent => {\n const ext = (fcEvent.extendedProps ?? {}) as EventExtendedProps;\n return {\n id: fcEvent.id,\n title: fcEvent.title,\n start: fcEvent.start ?? new Date(),\n end: fcEvent.end ?? undefined,\n resourceId: ext.resourceId,\n status: ext.status,\n allDay: fcEvent.allDay,\n backgroundColor: ext.backgroundColor,\n textColor: ext.textColor,\n suffix: ext.suffix,\n privacyModeTitle: ext.privacyModeTitle,\n isBookedOnline: ext.isBookedOnline,\n hasUnassignedPatient: ext.hasUnassignedPatient,\n hasHighlightedAnamnesis: ext.hasHighlightedAnamnesis,\n hasBillableAmount: ext.hasBillableAmount,\n isTelehealth: ext.isTelehealth,\n isRecurrenceParent: ext.isRecurrenceParent,\n isInternal: ext.isInternal,\n patientId: ext.patientId,\n operatorId: ext.operatorId,\n };\n };\n\n /* ---- callbacks ------------------------------------------------- */\n const handleEventDrop = useMemo(() => {\n if (!onEventDrop) return undefined;\n return (info: EventDropArg) => {\n if (!info.event.start) return;\n // `info.oldEvent.start` is the only reliable source for the pre-drag\n // time — FullCalendar guarantees it is non-null for a drop on an\n // event that had a start. The `delta` field is unsafe to subtract\n // because it reports calendrical components (years/months/days +\n // sub-day ms), not a single ms offset, and month/year reconstruction\n // is ambiguous across boundaries. If oldStart is somehow missing we\n // bail rather than produce a silently-wrong value.\n const oldStart = info.oldEvent.start;\n if (!oldStart) {\n if (import.meta.env.DEV) {\n console.warn(\n '[Calendar] handleEventDrop: oldEvent.start was null — dropping the event-drop callback rather than emitting wrong oldStart data.',\n );\n }\n return;\n }\n onEventDrop({\n event: adaptEvent(info.event),\n oldStart,\n newStart: info.event.start,\n });\n /* Announce via aria-live. The announced title must honour\n privacyMode — the event card's aria-label already masks, but\n the live-region text is a separate codepath that would leak\n the raw name on drop if not masked here too. */\n if (liveRegionRef.current) {\n const ext = (info.event.extendedProps ?? {}) as EventExtendedProps;\n const announcedTitle = privacyMode\n ? (ext.privacyModeTitle ?? '•••')\n : info.event.title;\n liveRegionRef.current.textContent = t('calendar.eventMoved', {\n title: announcedTitle,\n });\n }\n };\n }, [onEventDrop, privacyMode, t]);\n\n const handleEventResize = useMemo(() => {\n if (!onEventResize) return undefined;\n return (info: EventResizeDoneArg) => {\n if (!info.event.end) return;\n // Mirror the drop path: rely on `info.oldEvent.end` for the pre-resize\n // boundary. Bail on null rather than fabricating a value from deltas.\n const oldEnd = info.oldEvent.end;\n if (!oldEnd) {\n if (import.meta.env.DEV) {\n console.warn(\n '[Calendar] handleEventResize: oldEvent.end was null — dropping the resize callback rather than emitting wrong oldEnd data.',\n );\n }\n return;\n }\n const newEnd = info.event.end;\n const newStart = info.event.start ?? oldEnd;\n onEventResize({\n event: adaptEvent(info.event),\n oldEnd,\n newEnd,\n });\n if (liveRegionRef.current) {\n const duration = Math.round(\n (newEnd.getTime() - newStart.getTime()) / 60000,\n );\n /* Mirror the drop path: mask the title when privacyMode is on. */\n const ext = (info.event.extendedProps ?? {}) as EventExtendedProps;\n const announcedTitle = privacyMode\n ? (ext.privacyModeTitle ?? '•••')\n : info.event.title;\n liveRegionRef.current.textContent = t('calendar.eventResized', {\n title: announcedTitle,\n duration,\n });\n }\n };\n }, [onEventResize, privacyMode, t]);\n\n const handleEventClick = useMemo(() => {\n if (!onEventClick) return undefined;\n return (info: EventClickArg) => {\n if (!info.event.start) return;\n onEventClick(adaptEvent(info.event));\n };\n }, [onEventClick]);\n\n const handleDateSelect = useMemo(() => {\n if (!onDateSelect) return undefined;\n return (info: DateSelectArg) => {\n onDateSelect({\n start: info.start,\n end: info.end,\n allDay: info.allDay,\n resourceId: info.resource?.id,\n });\n };\n }, [onDateSelect]);\n\n const handleDatesSet = useCallback((info: DatesSetArg) => {\n setCurrentTitle(info.view.title);\n }, []);\n\n /* ---- firstDay from locale -------------------------------------- */\n const firstDay = useMemo(() => resolveFirstDay(locale), [locale]);\n\n /* ---- plugins --------------------------------------------------- */\n const plugins = useMemo(\n () => [\n dayGridPlugin,\n timeGridPlugin,\n listPlugin,\n interactionPlugin,\n resourcePlugin,\n resourceTimeGridPlugin,\n resourceTimelinePlugin,\n timelinePlugin,\n ],\n [],\n );\n\n /* ---- resolved internal FC view name ---------------------------- */\n const resolvedView = useMemo(\n () => resolveFullCalendarView(view, resourceLayout),\n [view, resourceLayout],\n );\n\n /* ---- resource label render prop -------------------------------- */\n /* FC's `resourceLabelContent` supplies a `ResourceApi` whose\n `extendedProps` is typed as `{ [k: string]: any }`. We narrow to\n just the fields we pushed through `fcResources` via a local\n interface reached by an `unknown` pivot — keeps the DS body free\n of `any` while accepting FC's runtime shape. */\n interface ResourceExtendedProps {\n shortTitle?: string;\n color?: string;\n shortTitleTextColor?: string;\n }\n\n const renderResourceLabel = useCallback(\n (arg: ResourceLabelContentArg): ReactElement => {\n const ext = arg.resource.extendedProps as unknown as ResourceExtendedProps;\n const title = arg.resource.title;\n const shortTitle = ext.shortTitle;\n const color = ext.color;\n const textColor = ext.shortTitleTextColor;\n\n /* Runtime caller-supplied hex values flow through inline CSS\n custom properties only; the consuming `background-color` /\n `color` references live in the className as Tailwind arbitrary\n values, matching the event/mode-banner pattern (see\n 23-constraints §Runtime-computed dimensions).\n\n Inline style — permitted per 23-constraints §Runtime-computed\n dimensions (CSS custom property setters for --resource-color /\n --resource-initials-text-color). */\n const swatchStyle: CSSProperties | undefined =\n color || textColor\n ? {\n ...(color\n ? ({ '--resource-color': color } as CSSProperties)\n : {}),\n ...(textColor\n ? ({\n '--resource-initials-text-color': textColor,\n } as CSSProperties)\n : {}),\n }\n : undefined;\n\n if (showResourceInitials && shortTitle && color) {\n /* DEV-only guardrail: the initials circle is the one resource\n branch that actually paints text over the caller-supplied\n colour. Warn when the pair falls below WCAG AA. */\n warnLowContrast(color, textColor, `resource ${arg.resource.id}`);\n const initialsClass = [\n 'resource-initials',\n '[background-color:var(--resource-color)]',\n textColor ? '[color:var(--resource-initials-text-color)]' : null,\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n className={initialsClass}\n style={swatchStyle}\n aria-hidden=\"true\"\n >\n {shortTitle}\n </span>\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n }\n\n if (color) {\n /* Dot branch has no text, but callers may still pass both halves\n of the pair in anticipation of flipping `showResourceInitials`.\n Only warn when both are defined — otherwise we'd noisily\n suggest a textColor that the dot renderer ignores. */\n if (color && textColor) {\n warnLowContrast(color, textColor, `resource ${arg.resource.id}`);\n }\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n className=\"resource-dot ds:[background-color:var(--resource-color)]\"\n style={swatchStyle}\n aria-hidden=\"true\"\n />\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n }\n\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n },\n [showResourceInitials],\n );\n\n /* ---- resources adapted for FC with extendedProps --------------- */\n const fcResources = useMemo(\n () =>\n resources?.map((resource) => ({\n id: resource.id,\n title: resource.title,\n sequenceNumber: resource.sequenceNumber,\n extendedProps: {\n shortTitle: resource.shortTitle,\n color: resource.color,\n shortTitleTextColor: resource.shortTitleTextColor,\n sequenceNumber: resource.sequenceNumber,\n },\n })),\n [resources],\n );\n\n /* ---- default-toolbar button handlers --------------------------- */\n const handleToolbarToday = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.today();\n }, []);\n const handleToolbarPrev = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.prev();\n }, []);\n const handleToolbarNext = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.next();\n }, []);\n\n const wrapperClassName = [\n 'fc-theme-alfadocs',\n 'bg-background text-foreground',\n 'rounded-[var(--radius-md)]',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n /* Mode banner style — runtime caller-supplied hex values flow through\n inline CSS-variable assignments only. The consuming\n `background-color` / `color` references live in the className as\n Tailwind arbitrary values, same justification as the event\n colour overrides above. */\n const modeBannerStyle: CSSProperties | undefined =\n modeBannerColor || modeBannerTextColor\n ? {\n ...(modeBannerColor\n ? ({ '--calendar-mode-bg': modeBannerColor } as CSSProperties)\n : {}),\n ...(modeBannerTextColor\n ? ({ '--calendar-mode-fg': modeBannerTextColor } as CSSProperties)\n : {}),\n }\n : undefined;\n\n /* DEV-only guardrail: warn when the caller-supplied mode-banner\n bg/fg hex pair falls below WCAG AA. No-op when either half is\n missing — the component falls back to --muted / --muted-foreground\n which are already calibrated to AA. */\n if (mode !== 'default' && (modeBannerColor || modeBannerTextColor)) {\n warnLowContrast(modeBannerColor, modeBannerTextColor, 'mode banner');\n }\n\n /* Static key map — keeps i18n-extraction tools (i18next-parser, etc.)\n happy, since they can't resolve template-literal keys. */\n const resolvedModeLabel =\n mode !== 'default' ? (modeLabel ?? t(MODE_BANNER_KEYS[mode])) : '';\n\n const modeBannerClassName = [\n 'sticky top-0 z-10',\n 'flex items-center gap-[var(--spacing-sm)]',\n 'ps-[var(--spacing-md)] pe-[var(--spacing-md)]',\n 'py-[var(--spacing-sm)]',\n /* Caller-supplied colours flow through CSS custom properties set\n in `modeBannerStyle`; fallback tokens apply when the caller\n doesn't supply a hex. */\n modeBannerColor\n ? '[background-color:var(--calendar-mode-bg)]'\n : 'bg-[var(--muted)]',\n modeBannerTextColor\n ? '[color:var(--calendar-mode-fg)]'\n : 'text-[var(--muted-foreground)]',\n ]\n .filter(Boolean)\n .join(' ');\n\n const modeCancelClassName = [\n 'inline-flex items-center justify-center',\n 'min-h-[var(--min-target-size)]',\n 'ps-[var(--spacing-md)] pe-[var(--spacing-md)]',\n 'rounded-[var(--radius-full)]',\n 'bg-[var(--background)] text-[var(--foreground)]',\n 'border border-[var(--border)]',\n 'font-[var(--font-weight-medium)] text-[length:var(--font-size-sm)]',\n 'transition-colors duration-[var(--animation-duration)] ease-[var(--ease-out)]',\n 'hover:bg-[var(--muted)]',\n 'focus-visible:outline-[length:var(--focus-ring-width)]',\n 'focus-visible:outline-[var(--ring)]',\n 'focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'motion-reduce:transition-none',\n ].join(' ');\n\n return (\n <div\n ref={rootRef}\n className={wrapperClassName}\n role=\"region\"\n aria-label={t('calendar.ariaLabel')}\n data-component=\"calendar\"\n data-component-id={id}\n data-mode={mode}\n >\n <div\n ref={liveRegionRef}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className=\"ds:sr-only\"\n />\n {alertBanner}\n {/* role=\"status\" already implies aria-live=\"polite\" +\n aria-atomic=\"true\"; setting the live attributes explicitly\n causes double announcements in some AT combinations. */}\n {mode !== 'default' ? (\n <div\n className={modeBannerClassName}\n style={modeBannerStyle}\n role=\"status\"\n >\n <span className=\"ds:flex-1 ds:text-start\">{resolvedModeLabel}</span>\n {onModeCancel ? (\n <button\n type=\"button\"\n onClick={onModeCancel}\n className={modeCancelClassName}\n >\n {t('calendar.modeBanner.cancel')}\n </button>\n ) : null}\n </div>\n ) : null}\n {toolbar !== false ? (\n <CalendarToolbar\n title={currentTitle}\n onToday={handleToolbarToday}\n onPrev={handleToolbarPrev}\n onNext={handleToolbarNext}\n end={toolbarEnd}\n />\n ) : null}\n <FullCalendar\n ref={fcRef}\n plugins={plugins}\n schedulerLicenseKey={schedulerLicenseKey}\n initialView={resolvedView}\n views={CALENDAR_CUSTOM_VIEWS}\n initialDate={initialDate}\n locale={locale}\n direction={direction}\n firstDay={firstDay}\n editable={editable}\n eventDurationEditable={eventDurationEditable ?? editable}\n selectable={selectable}\n droppable={editable}\n dayMaxEvents={dayMaxEvents}\n height={height}\n events={fcEvents}\n resources={fcResources}\n resourceOrder=\"sequenceNumber\"\n resourceLabelContent={renderResourceLabel}\n headerToolbar={false}\n allDayText={t('calendar.allDay')}\n noEventsText={t('calendar.noEvents')}\n titleFormat={titleFormat}\n dayHeaderFormat={dayHeaderFormat}\n eventTimeFormat={eventTimeFormat}\n slotLabelFormat={slotLabelFormat}\n slotMinTime={slotMinTime ?? '00:00:00'}\n slotMaxTime={slotMaxTime ?? '24:00:00'}\n slotDuration={slotDuration ?? '00:30:00'}\n // Explicit `slotLabelInterval` — FullCalendar 6.1.x crashes\n // inside `wholeDivideDurations` / `addDurations` when its\n // internal default computation produces an undefined Duration\n // (`Cannot read properties of undefined (reading 'years')`).\n // Passing all three slot props as explicit strings bypasses\n // the fragile default-resolution path. 1h matches FC's\n // documented default for day/week views.\n slotLabelInterval=\"01:00:00\"\n datesAboveResources={datesAboveResources}\n slotEventOverlap={slotEventOverlap}\n stickyHeaderDates={stickyHeaderDates}\n nowIndicator={nowIndicator}\n eventLongPressDelay={reducedMotion ? 0 : 1000}\n eventDragMinDistance={reducedMotion ? 0 : 5}\n eventContent={(arg) =>\n renderEventContent({\n arg,\n locale,\n resources: resources ?? [],\n statusLabels,\n privacyMode,\n showTime,\n })\n }\n eventClick={handleEventClick}\n eventDrop={handleEventDrop}\n eventResize={handleEventResize}\n eventResizeStart={onEventResizeStart}\n select={handleDateSelect}\n datesSet={handleDatesSet}\n />\n </div>\n );\n },\n);\nCalendarInner.displayName = 'Calendar';\n\n/* Compound attachment — exposes `<Calendar.Toolbar />` so consumers can\n render a standalone toolbar bound to their own handle-driven handlers\n when they hide the built-in toolbar via `toolbar={false}`. The\n `typeof CalendarInner & { Toolbar }` widening is the single acceptable\n cast called out in the implementation plan. */\ntype CalendarComponent = typeof CalendarInner & {\n Toolbar: typeof CalendarToolbar;\n};\nexport const Calendar = CalendarInner as CalendarComponent;\nCalendar.Toolbar = CalendarToolbar;\n"],"names":["__iconNode","Ban","createLucideIcon","Euro","HeartPulse","Stethoscope","ThumbsUp","Video","Zap","calendarAgent","handle","_a","args","RESOURCE_VIEW_MAP","STANDARD_VIEWS","resolveFullCalendarView","view","resourceLayout","stem","CALENDAR_CUSTOM_VIEWS","eventCardVariants","cva","STATUS_ICON","Clock","Check","MODE_BANNER_KEYS","resolveFirstDay","locale","intlLocale","info","useIsRtl","i18n","useTranslation","isRtl","setIsRtl","useState","docDir","i18nDir","useEffect","observer","renderEventContent","arg","resources","statusLabels","privacyMode","showTime","extended","status","backgroundColor","textColor","suffix","privacyModeTitle","isBookedOnline","hasUnassignedPatient","hasHighlightedAnamnesis","hasBillableAmount","isTelehealth","resourceId","StatusIcon","start","end","allDay","rangeText","fmt","resourceTitle","r","statusLabel","displayTitle","ariaLabel","colourOverrides","className","jsxs","Globe","AlertTriangle","toolbarButtonBaseClass","toolbarTextButtonClass","toolbarIconButtonClass","CalendarToolbar","forwardRef","title","onToday","onPrev","onNext","ref","t","PrevIcon","ChevronRight","ChevronLeft","NextIcon","rootClassName","jsx","CalendarInner","id","events","initialDate","localeProp","onEventDrop","onEventResize","onEventResizeStart","onEventClick","onDateSelect","editable","eventDurationEditable","selectable","height","mode","modeLabel","modeBannerColor","modeBannerTextColor","onModeCancel","alertBanner","slotMinTime","slotMaxTime","slotDuration","datesAboveResources","slotEventOverlap","stickyHeaderDates","nowIndicator","dayMaxEvents","schedulerLicenseKey","toolbar","toolbarEnd","showResourceInitials","fcRef","useRef","rootRef","liveRegionRef","focusTimerRef","focusedElRef","direction","setDirection","timer","api","root","patchMarkup","link","hidden","el","reducedMotion","usePrefersReducedMotion","currentTitle","setCurrentTitle","useMemo","getRawApi","date","nextView","eventId","selector","element","titleAttr","announcedTitle","useImperativeHandle","useAgentRegistration","privacyFirstRun","fcEvents","event","titleFormat","dayHeaderFormat","eventTimeFormat","slotLabelFormat","adaptEvent","fcEvent","ext","handleEventDrop","oldStart","handleEventResize","oldEnd","newEnd","newStart","duration","handleEventClick","handleDateSelect","handleDatesSet","useCallback","firstDay","plugins","dayGridPlugin","timeGridPlugin","listPlugin","interactionPlugin","resourcePlugin","resourceTimeGridPlugin","resourceTimelinePlugin","timelinePlugin","resolvedView","renderResourceLabel","shortTitle","color","swatchStyle","initialsClass","fcResources","resource","handleToolbarToday","_b","handleToolbarPrev","handleToolbarNext","wrapperClassName","modeBannerStyle","resolvedModeLabel","modeBannerClassName","modeCancelClassName","FullCalendar","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU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AAA,cAC/B,cAAcA,EAAE,mBAAmB;AAAA,cACnC,aAAAwE;AAAA,cACA,iBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,aAAahD,KAAe;AAAA,cAC5B,aAAaC,KAAe;AAAA,cAC5B,cAAcC,KAAgB;AAAA,cAQ9B,mBAAkB;AAAA,cAClB,qBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,mBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,qBAAqBqB,IAAgB,IAAI;AAAA,cACzC,sBAAsBA,IAAgB,IAAI;AAAA,cAC1C,cAAc,CAACjG,MACbD,GAAmB;AAAA,gBACjB,KAAAC;AAAA,gBACA,QAAAd;AAAA,gBACA,WAAWe,KAAa,CAAA;AAAA,gBACxB,cAAAC;AAAA,gBACA,aAAAC;AAAA,gBACA,UAAAC;AAAA,cAAA,CACD;AAAA,cAEH,YAAY6H;AAAA,cACZ,WAAWP;AAAA,cACX,aAAaE;AAAA,cACb,kBAAkBnE;AAAA,cAClB,QAAQyE;AAAA,cACR,UAAUC;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAjF,GAAc,cAAc;AAUrB,MAAM+G,KAAW/G;AACxB+G,GAAS,UAAU7H;","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-Ni6C_KJg.js","sources":["../../src/components/checkbox/checkbox-group-context.ts","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface CheckboxGroupContextShape {\n name?: string;\n value: Set<string>;\n toggle: (itemValue: string) => void;\n disabled: boolean;\n}\n\nexport const CheckboxGroupContext =\n createContext<CheckboxGroupContextShape | null>(null);\n\nexport function useCheckboxGroup(): CheckboxGroupContextShape | null {\n return useContext(CheckboxGroupContext);\n}\n","import { forwardRef, useId, type ComponentPropsWithoutRef } from 'react';\nimport * as RadixCheckbox from '@radix-ui/react-checkbox';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useCheckboxGroup } from './checkbox-group-context';\nimport { Tooltip } from '../tooltip';\n\nconst drawClasses = [\n '[stroke-dasharray:1] [stroke-dashoffset:1]',\n 'animate-[checkbox-indicator-draw_var(--animation-duration)_ease-out_forwards]',\n].join(' ');\n\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-check-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12l5 5L20 7\" className={drawClasses} />\n </svg>\n );\n}\n\nfunction IndeterminateIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-indeterminate-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12h14\" className={drawClasses} />\n </svg>\n );\n}\n\nconst checkboxVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n 'ds:border ds:border-border ds:rounded-[var(--radius-sm)] ds:bg-background',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:data-[state=checked]:bg-primary ds:data-[state=checked]:border-primary ds:data-[state=checked]:text-primary-foreground',\n 'ds:data-[state=indeterminate]:bg-primary ds:data-[state=indeterminate]:border-primary ds:data-[state=indeterminate]:text-primary-foreground',\n 'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\ntype RadixRootProps = ComponentPropsWithoutRef<typeof RadixCheckbox.Root>;\n\nexport interface CheckboxProps\n extends Omit<RadixRootProps, 'checked' | 'onCheckedChange' | 'children'>,\n VariantProps<typeof checkboxVariants> {\n label: string;\n checked?: boolean | 'indeterminate';\n onCheckedChange?: (checked: boolean | 'indeterminate') => void;\n size?: 'sm' | 'md' | 'lg';\n disabledReason?: string;\n value?: string;\n}\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (\n {\n label,\n checked,\n onCheckedChange,\n size = 'md',\n disabled,\n disabledReason,\n name,\n value,\n id,\n className,\n ...props\n },\n ref,\n ) => {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n const group = useCheckboxGroup();\n\n const inGroup = group !== null && value !== undefined;\n const effectiveChecked = inGroup ? group.value.has(value) : checked;\n const effectiveOnChange = inGroup\n ? () => group.toggle(value)\n : onCheckedChange;\n const effectiveName = group?.name ?? name;\n const effectiveDisabled = group?.disabled || disabled;\n\n const iconSizeClass =\n size === 'sm' ? 'size-3' : size === 'lg' ? 'size-4' : 'size-3.5';\n\n const labelClasses = [\n 'type-label text-foreground select-none',\n effectiveDisabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',\n ].join(' ');\n\n const content = (\n <div data-component=\"checkbox\" className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <RadixCheckbox.Root\n ref={ref}\n id={checkboxId}\n checked={effectiveChecked}\n onCheckedChange={effectiveOnChange}\n disabled={effectiveDisabled}\n aria-disabled={effectiveDisabled || undefined}\n name={effectiveName}\n value={value}\n className={checkboxVariants({ size, className })}\n {...props}\n >\n <RadixCheckbox.Indicator>\n {effectiveChecked === 'indeterminate' ? (\n <IndeterminateIcon className={iconSizeClass} />\n ) : (\n <CheckIcon className={iconSizeClass} />\n )}\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <label htmlFor={checkboxId} className={labelClasses}>\n {label}\n </label>\n </div>\n );\n\n if (effectiveDisabled && disabledReason) {\n return <Tooltip label={disabledReason}>{content}</Tooltip>;\n }\n\n return content;\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","drawClasses","CheckIcon","className","jsx","IndeterminateIcon","checkboxVariants","cva","Checkbox","forwardRef","label","checked","onCheckedChange","size","disabled","disabledReason","name","value","id","props","ref","generatedId","useId","checkboxId","group","inGroup","effectiveChecked","effectiveOnChange","effectiveName","effectiveDisabled","iconSizeClass","labelClasses","content","jsxs","RadixCheckbox","Tooltip"],"mappings":";;;;;AASO,MAAMA,IACXC,EAAgD,IAAI;AAE/C,SAASC,IAAqD;AACnE,SAAOC,EAAWH,CAAoB;AACxC;ACRA,MAAMI,IAAc;AAAA,EAClB;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAEV,SAASC,EAAU,EAAE,WAAAC,KAAqC;AACxD,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MACZ,aAAU;AAAA,MACV,WAAAD;AAAA,MAEA,4BAAC,QAAA,EAAK,YAAW,KAAI,GAAE,kBAAiB,WAAWF,EAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AAGtE;AAEA,SAASI,EAAkB,EAAE,WAAAF,KAAqC;AAChE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,eAAY;AAAA,MAC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