@12-apps/ui 6.87.0 → 6.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components-catalog.md +1 -1
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.js +3 -3
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.parts.js +2 -2
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +5 -5
- package/dist/_internal/components/data-display/Avatar/Avatar.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +8 -8
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +8 -8
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +34 -34
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +47 -47
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +9 -9
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +6 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +7 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +5 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +31 -31
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +10 -10
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +4 -4
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +2 -2
- package/dist/_internal/components/data-display/DayRuler/DayRuler.en-US.js +8 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.js +11 -11
- package/dist/_internal/components/data-display/DayRuler/DayRuler.keyboard.js +2 -2
- package/dist/_internal/components/data-display/DayRuler/DayRuler.labels.js +10 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.parts.js +6 -6
- package/dist/_internal/components/data-display/DayRuler/DayRuler.pt-BR.js +8 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.pt-BR.js.map +1 -0
- package/dist/_internal/components/data-display/DayRuler/useRulerDrag.js +2 -2
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +2 -2
- package/dist/_internal/components/data-display/ErrorState/ErrorState.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +10 -10
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +9 -9
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +14 -14
- package/dist/_internal/components/data-display/HoverCard/HoverCard.js +3 -3
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +7 -7
- package/dist/_internal/components/data-display/Lightbox/LightboxControls.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/LightboxOverlay.js +3 -3
- package/dist/_internal/components/data-display/Lightbox/LightboxThumbnails.js +2 -2
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +8 -8
- package/dist/_internal/components/data-display/RegionMap/RegionMap.js +4 -4
- package/dist/_internal/components/data-display/RegionMap/RegionMapDrawing.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.en-US.js +8 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.en-US.js.map +1 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.js +11 -10
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.keyboard.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.labels.js +10 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.labels.js.map +1 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.parts.js +6 -6
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.pt-BR.js +8 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.pt-BR.js.map +1 -0
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.styles.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleNameCell.js +3 -3
- package/dist/_internal/components/data-display/ScheduleGrid/schedule-grid-model.js +1 -1
- package/dist/_internal/components/data-display/ScheduleGrid/schedule-name.styles.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/useGridDrag.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/useScrollToDay.js +8 -0
- package/dist/_internal/components/data-display/ScheduleGrid/useScrollToDay.js.map +1 -0
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.parts.js +2 -2
- package/dist/_internal/components/data-display/Stepper/Stepper.js +2 -2
- package/dist/_internal/components/data-display/Table/Table.js +3 -3
- package/dist/_internal/components/data-display/Table/TableParts.hooks.js +2 -2
- package/dist/_internal/components/data-display/Table/TableParts.js +2 -2
- package/dist/_internal/components/data-display/Timeline/Timeline.js +2 -2
- package/dist/_internal/components/data-display/index.js +89 -76
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +5 -5
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +4 -4
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +6 -6
- package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +3 -3
- package/dist/_internal/components/feedback/Sonner/Sonner.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +3 -3
- package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
- package/dist/_internal/components/feedback/Toast/Toast.js +2 -2
- package/dist/_internal/components/feedback/index.js +13 -13
- package/dist/_internal/components/form/Calendar/Calendar.js +2 -2
- package/dist/_internal/components/form/Command/Command.hooks.js +2 -2
- package/dist/_internal/components/form/Command/Command.js +4 -4
- package/dist/_internal/components/form/Command/Command.parts.js +2 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +6 -6
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +2 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +3 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.dom.js +2 -2
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.format.js +3 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.hooks.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +5 -5
- package/dist/_internal/components/form/index.js +13 -13
- package/dist/_internal/components/form/total-form/FormErrorSnackbar.js +3 -3
- package/dist/_internal/components/index.js +135 -122
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +2 -2
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +2 -2
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +2 -2
- package/dist/_internal/components/layout/Dashboard/Dashboard.js +2 -2
- package/dist/_internal/components/layout/Drawer/Drawer.js +2 -2
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +2 -2
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +2 -2
- package/dist/_internal/components/layout/index.js +9 -9
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +2 -2
- package/dist/_internal/components/navigation/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/index.js +15 -15
- package/dist/_internal/components/typography/Code/Code.js +2 -2
- package/dist/_internal/components/typography/index.js +2 -2
- package/dist/_internal/components/utility/AnimatedIcon/AnimatedIcon.js +2 -2
- package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.js +3 -3
- package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.parts.js +2 -2
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +2 -2
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +5 -5
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +4 -4
- package/dist/_internal/components/utility/index.js +8 -8
- package/dist/_internal/en-US.labels.js +1 -1
- package/dist/_internal/pt-BR.labels.js +1 -1
- package/dist/_internal/social-login-button/social-login-button.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +4 -4
- package/dist/charts.js +11 -11
- package/dist/{chunk-C3MXURP3.js → chunk-2M3W6ACW.js} +2 -2
- package/dist/{chunk-7IBFGOLF.js → chunk-3YFDGFEK.js} +2 -2
- package/dist/{chunk-O2MR6U7Q.js → chunk-3Z6JX7UN.js} +2 -2
- package/dist/{chunk-ZIA774ZW.js → chunk-4IG73U2X.js} +2 -2
- package/dist/{chunk-VQ7YNAK2.js → chunk-4QGMUHAU.js} +2 -2
- package/dist/{chunk-TYGVNTUP.js → chunk-5CP5Z3YU.js} +2 -2
- package/dist/chunk-5EP37B4F.js +57 -0
- package/dist/chunk-5EP37B4F.js.map +1 -0
- package/dist/{chunk-WLC56R2I.js → chunk-5KK3I42O.js} +6 -6
- package/dist/{chunk-B7GGLFJB.js → chunk-5RSK5M6M.js} +2 -2
- package/dist/{chunk-WUBMJSBR.js → chunk-5S5K73I6.js} +2 -2
- package/dist/{chunk-EE6DJPB7.js → chunk-6HXNFNOB.js} +4 -4
- package/dist/{chunk-XALFZ25A.js → chunk-7F6D73NL.js} +4 -4
- package/dist/{chunk-2Q2DUGH7.js → chunk-7QKFMMWK.js} +2 -2
- package/dist/{chunk-UBMH5MED.js → chunk-7QKIL5YF.js} +4 -4
- package/dist/{chunk-6BQ3YKLD.js → chunk-7W5X3KQ2.js} +2 -2
- package/dist/{chunk-6HZYRKOB.js → chunk-A5OERY43.js} +4 -4
- package/dist/{chunk-AWUB3T7C.js → chunk-ABVIMFSD.js} +2 -2
- package/dist/{chunk-I6CP3ZTP.js → chunk-AJ6KFHEE.js} +2 -2
- package/dist/{chunk-EVIQUBC6.js → chunk-AKE6KVQG.js} +4 -4
- package/dist/{chunk-AXGQB24R.js → chunk-ALOEOGQV.js} +2 -2
- package/dist/{chunk-WHOD6LVN.js → chunk-B32XH7NK.js} +3 -3
- package/dist/{chunk-3B4NXP4N.js → chunk-B5STMM3R.js} +3 -3
- package/dist/{chunk-B5SBDLRS.js → chunk-BAQ3ITZV.js} +2 -2
- package/dist/{chunk-HWJ3FLZY.js → chunk-BEHT4IHH.js} +5 -5
- package/dist/{chunk-BBBHPK2Q.js → chunk-BMTIBQQC.js} +6 -6
- package/dist/{chunk-XEKJ7L7I.js → chunk-BNBWUXT3.js} +2 -2
- package/dist/{chunk-LSGZLFKX.js → chunk-BO6MT2S2.js} +5 -5
- package/dist/{chunk-64UNVW6D.js → chunk-BP3ZKIPE.js} +4 -4
- package/dist/{chunk-B7ZAEZJW.js → chunk-C347NNZJ.js} +2 -2
- package/dist/{chunk-AEAVVKGY.js → chunk-CAOL4AIB.js} +2 -2
- package/dist/{chunk-OZYUE2BI.js → chunk-CJUK32UH.js} +4 -4
- package/dist/{chunk-N2KHISGH.js → chunk-COK65GX2.js} +2 -2
- package/dist/{chunk-YLZXIR6B.js → chunk-COKPPU42.js} +11 -11
- package/dist/{chunk-D3B4V44W.js → chunk-CY4XIZNW.js} +2 -2
- package/dist/chunk-D3OXTS7Y.js +14 -0
- package/dist/chunk-D3OXTS7Y.js.map +1 -0
- package/dist/{chunk-5YVMFK7Y.js → chunk-DAFFZED3.js} +2 -2
- package/dist/{chunk-UMOHHWXY.js → chunk-DAHSKQBV.js} +2 -2
- package/dist/chunk-DDGYTY4E.js +17 -0
- package/dist/chunk-DDGYTY4E.js.map +1 -0
- package/dist/{chunk-HED2CZDZ.js → chunk-E2UOEI7N.js} +2 -2
- package/dist/{chunk-ZLIES3XR.js → chunk-E5OBAS3U.js} +2 -2
- package/dist/{chunk-MQVYJVKV.js → chunk-E6UMTR2G.js} +2 -2
- package/dist/chunk-E6UMTR2G.js.map +1 -0
- package/dist/{chunk-MAYAJXO6.js → chunk-EKSJES5E.js} +4 -4
- package/dist/{chunk-AD6GRJFV.js → chunk-EOIRU62W.js} +3 -3
- package/dist/chunk-ESOM4KVQ.js +1 -0
- package/dist/chunk-ESOM4KVQ.js.map +1 -0
- package/dist/{chunk-CSJ7WNXU.js → chunk-EUR2ORTN.js} +2 -2
- package/dist/{chunk-TOLCZ4XT.js → chunk-EWFBDAB7.js} +2 -2
- package/dist/{chunk-IQ5MBELJ.js → chunk-EXVCVXFX.js} +7 -7
- package/dist/{chunk-RZTUMBRD.js → chunk-EYFDIUVR.js} +2 -2
- package/dist/{chunk-NTCWIMIU.js → chunk-F7LBTMCA.js} +2 -2
- package/dist/{chunk-D6JKCCRQ.js → chunk-FKF34YJV.js} +11 -11
- package/dist/chunk-FKF34YJV.js.map +1 -0
- package/dist/{chunk-L5GZZUTY.js → chunk-FORQEHRQ.js} +2 -2
- package/dist/{chunk-TOOEEQ46.js → chunk-HBH7V3IP.js} +2 -2
- package/dist/{chunk-P5C4DTO4.js → chunk-HNEZWVDR.js} +3 -3
- package/dist/chunk-HNW7IZPV.js +17 -0
- package/dist/chunk-HNW7IZPV.js.map +1 -0
- package/dist/{chunk-MJDSXQV7.js → chunk-HUXAIQC5.js} +2 -2
- package/dist/{chunk-YAQE7QVC.js → chunk-I4DG3PP4.js} +2 -2
- package/dist/{chunk-KLLHCPA2.js → chunk-IMYKJTVX.js} +2 -2
- package/dist/{chunk-CTN4BRAH.js → chunk-JIEVKHOH.js} +7 -7
- package/dist/chunk-K3IB7S7Q.js +14 -0
- package/dist/chunk-K3IB7S7Q.js.map +1 -0
- package/dist/{chunk-I62SKY4E.js → chunk-K6FCSB6T.js} +4 -4
- package/dist/{chunk-2KBATUOZ.js → chunk-K7IDOTSU.js} +3 -3
- package/dist/{chunk-T7NEXLW6.js → chunk-KES3HNSU.js} +2 -2
- package/dist/{chunk-JJFLCEJJ.js → chunk-KF3Q3C3P.js} +2 -2
- package/dist/{chunk-2ENMRK3U.js → chunk-L5KPBMMF.js} +2 -2
- package/dist/{chunk-Y4ZWPOUV.js → chunk-LLPPIO3K.js} +2 -2
- package/dist/{chunk-ZCNR4DN5.js → chunk-LOLYBFYY.js} +5 -5
- package/dist/{chunk-D3SIZ2CX.js → chunk-LV6AD6XC.js} +3 -3
- package/dist/chunk-LVZYKETN.js +15 -0
- package/dist/chunk-LVZYKETN.js.map +1 -0
- package/dist/{chunk-I5SIHPOG.js → chunk-LXIPBHNJ.js} +2 -2
- package/dist/chunk-M6K6PCOS.js +1 -0
- package/dist/chunk-M6K6PCOS.js.map +1 -0
- package/dist/{chunk-3EKY63LD.js → chunk-MSJP2AEN.js} +2 -2
- package/dist/{chunk-GCR6VE5S.js → chunk-MW7P2C2C.js} +2 -2
- package/dist/{chunk-I7CVC2DW.js → chunk-MX2RF34M.js} +35 -15
- package/dist/chunk-MX2RF34M.js.map +1 -0
- package/dist/{chunk-L62HC3UB.js → chunk-N557OEZR.js} +2 -2
- package/dist/{chunk-DRJGHTQU.js → chunk-NASLJO2R.js} +2 -2
- package/dist/chunk-NMXYHPOG.js +15 -0
- package/dist/chunk-NMXYHPOG.js.map +1 -0
- package/dist/{chunk-UNCDOLF5.js → chunk-NQDOKJLI.js} +2 -2
- package/dist/{chunk-2CRNOJGL.js → chunk-NXQ6PXLJ.js} +3 -3
- package/dist/{chunk-WCETCAZO.js → chunk-O3OU3ED7.js} +18 -11
- package/dist/chunk-O3OU3ED7.js.map +1 -0
- package/dist/{chunk-FKS2PNJF.js → chunk-O63ZROSY.js} +9 -9
- package/dist/{chunk-Y6IIWGZB.js → chunk-OBA75Y5O.js} +2 -2
- package/dist/{chunk-ICHM2LQA.js → chunk-OKRITX4S.js} +8 -8
- package/dist/{chunk-Z7CBLQQR.js → chunk-OLHAUGVQ.js} +2 -2
- package/dist/{chunk-5QUH53HV.js → chunk-OWRQOYUE.js} +6 -6
- package/dist/{chunk-W676GY42.js → chunk-P772HCHI.js} +4 -4
- package/dist/{chunk-MLAIXRVL.js → chunk-PEVBSNCD.js} +2 -2
- package/dist/{chunk-2UNZG4JK.js → chunk-PNZH6CDD.js} +2 -2
- package/dist/{chunk-YFG6XXBB.js → chunk-PVIQDBUN.js} +2 -2
- package/dist/{chunk-GS3QDXDP.js → chunk-Q2ERGAQO.js} +2 -2
- package/dist/{chunk-7XUQJJPK.js → chunk-QCYQL3ST.js} +2 -2
- package/dist/{chunk-E6K2UZGR.js → chunk-QKOJ4637.js} +3 -3
- package/dist/{chunk-XRVXQJNB.js → chunk-QRRWLLXW.js} +3 -3
- package/dist/{chunk-YSUJCKEE.js → chunk-RYJ6XGFA.js} +15 -7
- package/dist/chunk-RYJ6XGFA.js.map +1 -0
- package/dist/{chunk-IP424VZD.js → chunk-S4ITA3FA.js} +8 -8
- package/dist/{chunk-UIHPFELH.js → chunk-S6D7NOV7.js} +2 -2
- package/dist/{chunk-WLLUARTC.js → chunk-T2G4LDU5.js} +2 -2
- package/dist/{chunk-YKONJEI4.js → chunk-T5RFH2T5.js} +2 -2
- package/dist/{chunk-LZKS3NER.js → chunk-T77OVQEO.js} +2 -2
- package/dist/{chunk-4PZZJ2AE.js → chunk-TAHO2LCU.js} +3 -3
- package/dist/{chunk-62PTREG5.js → chunk-TI4FGQYV.js} +2 -2
- package/dist/{chunk-PSIUFPXA.js → chunk-TJUWSQYQ.js} +1 -18
- package/dist/{chunk-PSIUFPXA.js.map → chunk-TJUWSQYQ.js.map} +1 -1
- package/dist/{chunk-3KMP2F4R.js → chunk-TYXFFNPM.js} +10 -10
- package/dist/{chunk-AC7K7IJE.js → chunk-TZ44F6W7.js} +2 -2
- package/dist/{chunk-YGQ2DLIM.js → chunk-UBVKMM3V.js} +2 -2
- package/dist/{chunk-N3C4J6Z2.js → chunk-UQ5GJPVZ.js} +3 -3
- package/dist/{chunk-V2QTL6VI.js → chunk-UYKIUUWP.js} +2 -2
- package/dist/{chunk-3STNOYYO.js → chunk-VM4UYCD4.js} +2 -2
- package/dist/{chunk-EXKEPOL7.js → chunk-WAO7UQRS.js} +4 -4
- package/dist/{chunk-B3SL5FP2.js → chunk-WBMLMLXP.js} +2 -2
- package/dist/{chunk-IMMPY4Q7.js → chunk-WJMSND5Q.js} +3 -3
- package/dist/{chunk-H5R2EZYI.js → chunk-WNNA6YYE.js} +4 -4
- package/dist/{chunk-SFNVAM7I.js → chunk-WQO5WONV.js} +3 -3
- package/dist/{chunk-NQUYBJKJ.js → chunk-WW3F7DCX.js} +2 -2
- package/dist/{chunk-XNIHDUOP.js → chunk-WYRH6OSN.js} +2 -2
- package/dist/{chunk-WTACWJSF.js → chunk-X4J576GR.js} +2 -2
- package/dist/{chunk-55PFFAAY.js → chunk-XCUHGPPZ.js} +2 -2
- package/dist/{chunk-ZF2LZVDO.js → chunk-XE33EZVS.js} +3 -3
- package/dist/{chunk-LR56OANO.js → chunk-XLU5WFSY.js} +6 -6
- package/dist/{native/chunks/chunk-E5UA5XVN.js → chunk-XOXXG7Q5.js} +1 -18
- package/dist/chunk-XOXXG7Q5.js.map +1 -0
- package/dist/{chunk-BK3YLYL6.js → chunk-Y3F2F36I.js} +4 -4
- package/dist/chunk-Y3F2F36I.js.map +1 -0
- package/dist/{chunk-RFMQBIE6.js → chunk-YBAK2WN5.js} +4 -4
- package/dist/{chunk-DM57YWZH.js → chunk-YGLAGY74.js} +2 -2
- package/dist/{chunk-YWBPASB2.js → chunk-YNVTUQ5B.js} +2 -2
- package/dist/{chunk-AN37BIIO.js → chunk-YOLLISEY.js} +2 -2
- package/dist/{chunk-CVB26LLB.js → chunk-ZANWHTXH.js} +2 -2
- package/dist/{chunk-QQFFE3CQ.js → chunk-ZHKCE5LR.js} +2 -2
- package/dist/chunk-ZHKCE5LR.js.map +1 -0
- package/dist/{chunk-G3G5W4OF.js → chunk-ZYZPSBNQ.js} +3 -3
- package/dist/data-display/AlertDialog.js +3 -3
- package/dist/data-display/AsyncStateContainer.js +5 -5
- package/dist/data-display/Avatar.js +3 -3
- package/dist/data-display/CardKit.js +9 -9
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +11 -11
- package/dist/data-display/DataViews.js +54 -54
- package/dist/data-display/DayRuler.js +17 -12
- package/dist/data-display/EmptyState.js +2 -2
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/FleetMap.js +14 -14
- package/dist/data-display/HoverCard.js +3 -3
- package/dist/data-display/LazyImage.js +2 -2
- package/dist/data-display/Lightbox.js +7 -7
- package/dist/data-display/LoadingState.js +2 -2
- package/dist/data-display/MapPreview.js +8 -8
- package/dist/data-display/RegionMap.js +5 -5
- package/dist/data-display/ScheduleGrid.js +17 -11
- package/dist/data-display/SectionOnboarding.js +4 -4
- package/dist/data-display/Sheet.js +4 -4
- package/dist/data-display/Stepper.js +2 -2
- package/dist/data-display/Table.js +3 -3
- package/dist/data-display/Timeline.js +2 -2
- package/dist/en-US.js +1 -1
- package/dist/feedback/ConfirmAction.js +7 -7
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/SequenceResolver.js +3 -3
- package/dist/feedback/Sonner.js +2 -2
- package/dist/feedback/StackedModal.js +3 -3
- package/dist/feedback/Toast.js +2 -2
- package/dist/form/Calendar.js +2 -2
- package/dist/form/Command.js +4 -4
- package/dist/form/DateRangePicker.js +6 -6
- package/dist/form/RichTextEditor.js +5 -5
- package/dist/form/total-form.js +3 -3
- package/dist/layout/ContentToolbar.js +6 -6
- package/dist/layout/Dashboard.js +2 -2
- package/dist/layout/Drawer.js +2 -2
- package/dist/layout/SettingsLayout.js +2 -2
- package/dist/layout/TableFilter.js +2 -2
- package/dist/locales.js +2 -2
- package/dist/native/chunks/{chunk-4G634E3Q.js → chunk-FXA5DLKR.js} +3 -3
- package/dist/native/chunks/{chunk-WLG3KT2V.js → chunk-IN3XZ7EK.js} +2 -2
- package/dist/{chunk-57FIUJJJ.js → native/chunks/chunk-QHW7JEPZ.js} +1 -18
- package/dist/native/chunks/chunk-QHW7JEPZ.js.map +1 -0
- package/dist/native/data-display/Avatar.js +1 -1
- package/dist/native/data-display/Badge.js +1 -1
- package/dist/native/data-display/Chip.js +1 -1
- package/dist/native/data-display/EmptyState.js +3 -3
- package/dist/native/data-display/ErrorState.js +2 -2
- package/dist/native/data-display/FleetMap.js +3 -3
- package/dist/native/data-display/LoadingState.js +1 -1
- package/dist/native/feedback/Dialog.js +1 -1
- package/dist/native/form/Button.js +2 -2
- package/dist/native/form/Checkbox.js +1 -1
- package/dist/native/form/Input.js +1 -1
- package/dist/native/form/Switch.js +1 -1
- package/dist/navigation/AppHeader.js +8 -8
- package/dist/navigation/Breadcrumbs.js +2 -2
- package/dist/navigation/NavigationMenu.js +3 -3
- package/dist/navigation/SectionNav.js +5 -5
- package/dist/pt-BR.js +1 -1
- package/dist/social-login-button.js +2 -2
- package/dist/types/components/data-display/DayRuler/DayRuler.en-US.d.ts +4 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.en-US.d.ts.map +1 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.keyboard.d.ts +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.keyboard.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.labels.d.ts +24 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.labels.d.ts.map +1 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.pt-BR.d.ts +4 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.pt-BR.d.ts.map +1 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/index.d.ts +2 -1
- package/dist/types/components/data-display/DayRuler/index.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.en-US.d.ts +4 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.en-US.d.ts.map +1 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.keyboard.d.ts +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.keyboard.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.labels.d.ts +26 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.labels.d.ts.map +1 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.parts.d.ts +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.pt-BR.d.ts +4 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.pt-BR.d.ts.map +1 -0
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.styles.d.ts +8 -2
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.types.d.ts +35 -4
- package/dist/types/components/data-display/ScheduleGrid/ScheduleGrid.types.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/index.d.ts +2 -1
- package/dist/types/components/data-display/ScheduleGrid/index.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/schedule-grid-model.d.ts +1 -1
- package/dist/types/components/data-display/ScheduleGrid/schedule-grid-model.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/useScrollToDay.d.ts +26 -0
- package/dist/types/components/data-display/ScheduleGrid/useScrollToDay.d.ts.map +1 -0
- package/dist/types/copy/labels.d.ts +0 -34
- package/dist/types/copy/labels.d.ts.map +1 -1
- package/dist/types/en-US.labels.d.ts.map +1 -1
- package/dist/types/pt-BR.labels.d.ts.map +1 -1
- package/dist/types-native/copy/labels.d.ts +0 -34
- package/dist/types-native/copy/labels.d.ts.map +1 -1
- package/dist/types-native/en-US.labels.d.ts.map +1 -1
- package/dist/typography/Code.js +2 -2
- package/dist/user-avatar.js +4 -4
- package/dist/utility/AnimatedIcon.js +2 -2
- package/dist/utility/InfiniteScroll.js +3 -3
- package/dist/utility/WorkflowStep.js +5 -5
- package/package.json +1 -1
- package/src/components/data-display/DayRuler/DayRuler.en-US.ts +11 -0
- package/src/components/data-display/DayRuler/DayRuler.keyboard.ts +1 -1
- package/src/components/data-display/DayRuler/DayRuler.labels.ts +37 -0
- package/src/components/data-display/DayRuler/DayRuler.md +1 -1
- package/src/components/data-display/DayRuler/DayRuler.pt-BR.ts +11 -0
- package/src/components/data-display/DayRuler/DayRuler.tsx +2 -2
- package/src/components/data-display/DayRuler/DayRuler.types.ts +1 -1
- package/src/components/data-display/DayRuler/index.ts +2 -1
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.en-US.ts +12 -0
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.keyboard.ts +1 -1
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.labels.ts +39 -0
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.md +40 -6
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.parts.tsx +34 -9
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.pt-BR.ts +12 -0
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.styles.ts +18 -4
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.tsx +9 -2
- package/src/components/data-display/ScheduleGrid/ScheduleGrid.types.ts +35 -4
- package/src/components/data-display/ScheduleGrid/index.ts +2 -1
- package/src/components/data-display/ScheduleGrid/schedule-grid-model.ts +2 -2
- package/src/components/data-display/ScheduleGrid/useScrollToDay.ts +99 -0
- package/src/copy/labels.ts +0 -36
- package/src/en-US.labels.ts +0 -17
- package/src/pt-BR.labels.ts +0 -17
- package/dist/chunk-57FIUJJJ.js.map +0 -1
- package/dist/chunk-7RXL4ONS.js +0 -1
- package/dist/chunk-BK3YLYL6.js.map +0 -1
- package/dist/chunk-D6JKCCRQ.js.map +0 -1
- package/dist/chunk-I7CVC2DW.js.map +0 -1
- package/dist/chunk-MQVYJVKV.js.map +0 -1
- package/dist/chunk-QQFFE3CQ.js.map +0 -1
- package/dist/chunk-TTRWOI6Z.js +0 -1
- package/dist/chunk-WCETCAZO.js.map +0 -1
- package/dist/chunk-YSUJCKEE.js.map +0 -1
- package/dist/native/chunks/chunk-E5UA5XVN.js.map +0 -1
- /package/dist/{chunk-7RXL4ONS.js.map → _internal/components/data-display/DayRuler/DayRuler.en-US.js.map} +0 -0
- /package/dist/{chunk-TTRWOI6Z.js.map → _internal/components/data-display/DayRuler/DayRuler.labels.js.map} +0 -0
- /package/dist/{chunk-C3MXURP3.js.map → chunk-2M3W6ACW.js.map} +0 -0
- /package/dist/{chunk-7IBFGOLF.js.map → chunk-3YFDGFEK.js.map} +0 -0
- /package/dist/{chunk-O2MR6U7Q.js.map → chunk-3Z6JX7UN.js.map} +0 -0
- /package/dist/{chunk-ZIA774ZW.js.map → chunk-4IG73U2X.js.map} +0 -0
- /package/dist/{chunk-VQ7YNAK2.js.map → chunk-4QGMUHAU.js.map} +0 -0
- /package/dist/{chunk-TYGVNTUP.js.map → chunk-5CP5Z3YU.js.map} +0 -0
- /package/dist/{chunk-WLC56R2I.js.map → chunk-5KK3I42O.js.map} +0 -0
- /package/dist/{chunk-B7GGLFJB.js.map → chunk-5RSK5M6M.js.map} +0 -0
- /package/dist/{chunk-WUBMJSBR.js.map → chunk-5S5K73I6.js.map} +0 -0
- /package/dist/{chunk-EE6DJPB7.js.map → chunk-6HXNFNOB.js.map} +0 -0
- /package/dist/{chunk-XALFZ25A.js.map → chunk-7F6D73NL.js.map} +0 -0
- /package/dist/{chunk-2Q2DUGH7.js.map → chunk-7QKFMMWK.js.map} +0 -0
- /package/dist/{chunk-UBMH5MED.js.map → chunk-7QKIL5YF.js.map} +0 -0
- /package/dist/{chunk-6BQ3YKLD.js.map → chunk-7W5X3KQ2.js.map} +0 -0
- /package/dist/{chunk-6HZYRKOB.js.map → chunk-A5OERY43.js.map} +0 -0
- /package/dist/{chunk-AWUB3T7C.js.map → chunk-ABVIMFSD.js.map} +0 -0
- /package/dist/{chunk-I6CP3ZTP.js.map → chunk-AJ6KFHEE.js.map} +0 -0
- /package/dist/{chunk-EVIQUBC6.js.map → chunk-AKE6KVQG.js.map} +0 -0
- /package/dist/{chunk-AXGQB24R.js.map → chunk-ALOEOGQV.js.map} +0 -0
- /package/dist/{chunk-WHOD6LVN.js.map → chunk-B32XH7NK.js.map} +0 -0
- /package/dist/{chunk-3B4NXP4N.js.map → chunk-B5STMM3R.js.map} +0 -0
- /package/dist/{chunk-B5SBDLRS.js.map → chunk-BAQ3ITZV.js.map} +0 -0
- /package/dist/{chunk-HWJ3FLZY.js.map → chunk-BEHT4IHH.js.map} +0 -0
- /package/dist/{chunk-BBBHPK2Q.js.map → chunk-BMTIBQQC.js.map} +0 -0
- /package/dist/{chunk-XEKJ7L7I.js.map → chunk-BNBWUXT3.js.map} +0 -0
- /package/dist/{chunk-LSGZLFKX.js.map → chunk-BO6MT2S2.js.map} +0 -0
- /package/dist/{chunk-64UNVW6D.js.map → chunk-BP3ZKIPE.js.map} +0 -0
- /package/dist/{chunk-B7ZAEZJW.js.map → chunk-C347NNZJ.js.map} +0 -0
- /package/dist/{chunk-AEAVVKGY.js.map → chunk-CAOL4AIB.js.map} +0 -0
- /package/dist/{chunk-OZYUE2BI.js.map → chunk-CJUK32UH.js.map} +0 -0
- /package/dist/{chunk-N2KHISGH.js.map → chunk-COK65GX2.js.map} +0 -0
- /package/dist/{chunk-YLZXIR6B.js.map → chunk-COKPPU42.js.map} +0 -0
- /package/dist/{chunk-D3B4V44W.js.map → chunk-CY4XIZNW.js.map} +0 -0
- /package/dist/{chunk-5YVMFK7Y.js.map → chunk-DAFFZED3.js.map} +0 -0
- /package/dist/{chunk-UMOHHWXY.js.map → chunk-DAHSKQBV.js.map} +0 -0
- /package/dist/{chunk-HED2CZDZ.js.map → chunk-E2UOEI7N.js.map} +0 -0
- /package/dist/{chunk-ZLIES3XR.js.map → chunk-E5OBAS3U.js.map} +0 -0
- /package/dist/{chunk-MAYAJXO6.js.map → chunk-EKSJES5E.js.map} +0 -0
- /package/dist/{chunk-AD6GRJFV.js.map → chunk-EOIRU62W.js.map} +0 -0
- /package/dist/{chunk-CSJ7WNXU.js.map → chunk-EUR2ORTN.js.map} +0 -0
- /package/dist/{chunk-TOLCZ4XT.js.map → chunk-EWFBDAB7.js.map} +0 -0
- /package/dist/{chunk-IQ5MBELJ.js.map → chunk-EXVCVXFX.js.map} +0 -0
- /package/dist/{chunk-RZTUMBRD.js.map → chunk-EYFDIUVR.js.map} +0 -0
- /package/dist/{chunk-NTCWIMIU.js.map → chunk-F7LBTMCA.js.map} +0 -0
- /package/dist/{chunk-L5GZZUTY.js.map → chunk-FORQEHRQ.js.map} +0 -0
- /package/dist/{chunk-TOOEEQ46.js.map → chunk-HBH7V3IP.js.map} +0 -0
- /package/dist/{chunk-P5C4DTO4.js.map → chunk-HNEZWVDR.js.map} +0 -0
- /package/dist/{chunk-MJDSXQV7.js.map → chunk-HUXAIQC5.js.map} +0 -0
- /package/dist/{chunk-YAQE7QVC.js.map → chunk-I4DG3PP4.js.map} +0 -0
- /package/dist/{chunk-KLLHCPA2.js.map → chunk-IMYKJTVX.js.map} +0 -0
- /package/dist/{chunk-CTN4BRAH.js.map → chunk-JIEVKHOH.js.map} +0 -0
- /package/dist/{chunk-I62SKY4E.js.map → chunk-K6FCSB6T.js.map} +0 -0
- /package/dist/{chunk-2KBATUOZ.js.map → chunk-K7IDOTSU.js.map} +0 -0
- /package/dist/{chunk-T7NEXLW6.js.map → chunk-KES3HNSU.js.map} +0 -0
- /package/dist/{chunk-JJFLCEJJ.js.map → chunk-KF3Q3C3P.js.map} +0 -0
- /package/dist/{chunk-2ENMRK3U.js.map → chunk-L5KPBMMF.js.map} +0 -0
- /package/dist/{chunk-Y4ZWPOUV.js.map → chunk-LLPPIO3K.js.map} +0 -0
- /package/dist/{chunk-ZCNR4DN5.js.map → chunk-LOLYBFYY.js.map} +0 -0
- /package/dist/{chunk-D3SIZ2CX.js.map → chunk-LV6AD6XC.js.map} +0 -0
- /package/dist/{chunk-I5SIHPOG.js.map → chunk-LXIPBHNJ.js.map} +0 -0
- /package/dist/{chunk-3EKY63LD.js.map → chunk-MSJP2AEN.js.map} +0 -0
- /package/dist/{chunk-GCR6VE5S.js.map → chunk-MW7P2C2C.js.map} +0 -0
- /package/dist/{chunk-L62HC3UB.js.map → chunk-N557OEZR.js.map} +0 -0
- /package/dist/{chunk-DRJGHTQU.js.map → chunk-NASLJO2R.js.map} +0 -0
- /package/dist/{chunk-UNCDOLF5.js.map → chunk-NQDOKJLI.js.map} +0 -0
- /package/dist/{chunk-2CRNOJGL.js.map → chunk-NXQ6PXLJ.js.map} +0 -0
- /package/dist/{chunk-FKS2PNJF.js.map → chunk-O63ZROSY.js.map} +0 -0
- /package/dist/{chunk-Y6IIWGZB.js.map → chunk-OBA75Y5O.js.map} +0 -0
- /package/dist/{chunk-ICHM2LQA.js.map → chunk-OKRITX4S.js.map} +0 -0
- /package/dist/{chunk-Z7CBLQQR.js.map → chunk-OLHAUGVQ.js.map} +0 -0
- /package/dist/{chunk-5QUH53HV.js.map → chunk-OWRQOYUE.js.map} +0 -0
- /package/dist/{chunk-W676GY42.js.map → chunk-P772HCHI.js.map} +0 -0
- /package/dist/{chunk-MLAIXRVL.js.map → chunk-PEVBSNCD.js.map} +0 -0
- /package/dist/{chunk-2UNZG4JK.js.map → chunk-PNZH6CDD.js.map} +0 -0
- /package/dist/{chunk-YFG6XXBB.js.map → chunk-PVIQDBUN.js.map} +0 -0
- /package/dist/{chunk-GS3QDXDP.js.map → chunk-Q2ERGAQO.js.map} +0 -0
- /package/dist/{chunk-7XUQJJPK.js.map → chunk-QCYQL3ST.js.map} +0 -0
- /package/dist/{chunk-E6K2UZGR.js.map → chunk-QKOJ4637.js.map} +0 -0
- /package/dist/{chunk-XRVXQJNB.js.map → chunk-QRRWLLXW.js.map} +0 -0
- /package/dist/{chunk-IP424VZD.js.map → chunk-S4ITA3FA.js.map} +0 -0
- /package/dist/{chunk-UIHPFELH.js.map → chunk-S6D7NOV7.js.map} +0 -0
- /package/dist/{chunk-WLLUARTC.js.map → chunk-T2G4LDU5.js.map} +0 -0
- /package/dist/{chunk-YKONJEI4.js.map → chunk-T5RFH2T5.js.map} +0 -0
- /package/dist/{chunk-LZKS3NER.js.map → chunk-T77OVQEO.js.map} +0 -0
- /package/dist/{chunk-4PZZJ2AE.js.map → chunk-TAHO2LCU.js.map} +0 -0
- /package/dist/{chunk-62PTREG5.js.map → chunk-TI4FGQYV.js.map} +0 -0
- /package/dist/{chunk-3KMP2F4R.js.map → chunk-TYXFFNPM.js.map} +0 -0
- /package/dist/{chunk-AC7K7IJE.js.map → chunk-TZ44F6W7.js.map} +0 -0
- /package/dist/{chunk-YGQ2DLIM.js.map → chunk-UBVKMM3V.js.map} +0 -0
- /package/dist/{chunk-N3C4J6Z2.js.map → chunk-UQ5GJPVZ.js.map} +0 -0
- /package/dist/{chunk-V2QTL6VI.js.map → chunk-UYKIUUWP.js.map} +0 -0
- /package/dist/{chunk-3STNOYYO.js.map → chunk-VM4UYCD4.js.map} +0 -0
- /package/dist/{chunk-EXKEPOL7.js.map → chunk-WAO7UQRS.js.map} +0 -0
- /package/dist/{chunk-B3SL5FP2.js.map → chunk-WBMLMLXP.js.map} +0 -0
- /package/dist/{chunk-IMMPY4Q7.js.map → chunk-WJMSND5Q.js.map} +0 -0
- /package/dist/{chunk-H5R2EZYI.js.map → chunk-WNNA6YYE.js.map} +0 -0
- /package/dist/{chunk-SFNVAM7I.js.map → chunk-WQO5WONV.js.map} +0 -0
- /package/dist/{chunk-NQUYBJKJ.js.map → chunk-WW3F7DCX.js.map} +0 -0
- /package/dist/{chunk-XNIHDUOP.js.map → chunk-WYRH6OSN.js.map} +0 -0
- /package/dist/{chunk-WTACWJSF.js.map → chunk-X4J576GR.js.map} +0 -0
- /package/dist/{chunk-55PFFAAY.js.map → chunk-XCUHGPPZ.js.map} +0 -0
- /package/dist/{chunk-ZF2LZVDO.js.map → chunk-XE33EZVS.js.map} +0 -0
- /package/dist/{chunk-LR56OANO.js.map → chunk-XLU5WFSY.js.map} +0 -0
- /package/dist/{chunk-RFMQBIE6.js.map → chunk-YBAK2WN5.js.map} +0 -0
- /package/dist/{chunk-DM57YWZH.js.map → chunk-YGLAGY74.js.map} +0 -0
- /package/dist/{chunk-YWBPASB2.js.map → chunk-YNVTUQ5B.js.map} +0 -0
- /package/dist/{chunk-AN37BIIO.js.map → chunk-YOLLISEY.js.map} +0 -0
- /package/dist/{chunk-CVB26LLB.js.map → chunk-ZANWHTXH.js.map} +0 -0
- /package/dist/{chunk-G3G5W4OF.js.map → chunk-ZYZPSBNQ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-4G634E3Q.js.map → chunk-FXA5DLKR.js.map} +0 -0
- /package/dist/native/chunks/{chunk-WLG3KT2V.js.map → chunk-IN3XZ7EK.js.map} +0 -0
|
@@ -88,6 +88,10 @@ export function frameSx(dayCount: number, hasTotal: boolean): SxProps<Theme> {
|
|
|
88
88
|
// Covers the gap after it too, so nothing scrolling shows between the name and the days.
|
|
89
89
|
boxShadow: `${rem(theme, M.gap)} 0 0 ${theme.palette.background.default}`,
|
|
90
90
|
},
|
|
91
|
+
// A group's title is pinned with the names. A sticky box stays inside its containing block,
|
|
92
|
+
// and a group as wide as the visible days ran out of room long before the days did: past
|
|
93
|
+
// that it slid off under the names ("COZINHA" read "IA"). The group is as wide as its rows.
|
|
94
|
+
'& [role="rowgroup"]': { minWidth: 'var(--sg-min)' },
|
|
91
95
|
'& [data-sg-group-title]': { position: 'sticky', left: 0, width: 'fit-content' },
|
|
92
96
|
},
|
|
93
97
|
[below(theme, M.narrowBelow)]: {
|
|
@@ -106,8 +110,11 @@ export function frameSx(dayCount: number, hasTotal: boolean): SxProps<Theme> {
|
|
|
106
110
|
};
|
|
107
111
|
}
|
|
108
112
|
|
|
109
|
-
/**
|
|
110
|
-
|
|
113
|
+
/**
|
|
114
|
+
* The body: scrolls sideways (under the compact bound) when the days' minimums do not fit.
|
|
115
|
+
* `scrollToDay` jumps there at once: never a smooth scroll, whatever the host's page sets.
|
|
116
|
+
*/
|
|
117
|
+
export const scrollSx: SxProps<Theme> = { minWidth: 0, scrollBehavior: 'auto' };
|
|
111
118
|
|
|
112
119
|
/** One line of the grid — the header or a person — as the shared columns. */
|
|
113
120
|
/** A style that may sit in an `sx` array next to another. */
|
|
@@ -143,11 +150,15 @@ export const headerRowSx: SxPart = (theme: Theme) => ({
|
|
|
143
150
|
paddingBottom: theme.spacing(0.75),
|
|
144
151
|
});
|
|
145
152
|
|
|
146
|
-
|
|
153
|
+
/** A day's header: today's label in the primary colour, a gone day's in the secondary ink (today wins). */
|
|
154
|
+
export function headerCellSx(today: boolean, past = false): SxProps<Theme> {
|
|
155
|
+
let color = 'text.primary';
|
|
156
|
+
if (past) color = 'text.secondary';
|
|
157
|
+
if (today) color = 'primary.main';
|
|
147
158
|
return {
|
|
148
159
|
fontSize: sxRem(M.headerLabel),
|
|
149
160
|
fontWeight: 500,
|
|
150
|
-
color
|
|
161
|
+
color,
|
|
151
162
|
p: 0.5,
|
|
152
163
|
minWidth: 0,
|
|
153
164
|
// A long label ("Hoje · Seg 19/10") wraps to a second line, as the prototype's: never cut.
|
|
@@ -204,6 +215,8 @@ export const totalCellSx: SxProps<Theme> = {
|
|
|
204
215
|
export interface CellLook {
|
|
205
216
|
today: boolean;
|
|
206
217
|
blocked: boolean;
|
|
218
|
+
/** The day has gone (`closed`): no fill, the divider border; never a drop target. */
|
|
219
|
+
closed: boolean;
|
|
207
220
|
/** A create or copy will land here: dashed, with the hours as ghost text. */
|
|
208
221
|
target: boolean;
|
|
209
222
|
/** The pointer is over it while a block moves. */
|
|
@@ -239,6 +252,7 @@ export function cellSx(look: CellLook): SxProps<Theme> {
|
|
|
239
252
|
if (look.blocked) {
|
|
240
253
|
return { ...base, background: hatch(theme), borderColor: theme.palette.divider, cursor: 'not-allowed' };
|
|
241
254
|
}
|
|
255
|
+
if (look.closed) return { ...base, backgroundColor: 'transparent', borderColor: theme.palette.divider };
|
|
242
256
|
if (look.target) {
|
|
243
257
|
return {
|
|
244
258
|
...base,
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
import Box from '@mui/material/Box/index.js';
|
|
4
4
|
import React, { useEffect, useRef } from 'react';
|
|
5
5
|
|
|
6
|
-
import { EN_US_UI_LABELS } from '../../../en-US.labels';
|
|
7
6
|
import { resolveLabels } from '../../../utils/resolve-labels';
|
|
7
|
+
import { EN_US_SCHEDULE_GRID_LABELS } from './ScheduleGrid.en-US';
|
|
8
8
|
import { focusables, handleGridKey } from './ScheduleGrid.keyboard';
|
|
9
9
|
import { GridBody, GridHeader, type CellAbilities } from './ScheduleGrid.parts';
|
|
10
10
|
import { frameSx, headerSx, rootSx, rowGridSx, scrollSx, SR_ONLY_SX } from './ScheduleGrid.styles';
|
|
11
11
|
import type { ScheduleGridProps } from './ScheduleGrid.types';
|
|
12
12
|
import { useAnnouncer } from './useAnnouncer';
|
|
13
13
|
import { useGridDrag } from './useGridDrag';
|
|
14
|
+
import { useScrollToDay } from './useScrollToDay';
|
|
14
15
|
import { useSidewaysScroll } from './useSidewaysScroll';
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -69,6 +70,11 @@ function useFollowFocus(rootRef: React.RefObject<HTMLElement | null>) {
|
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
/** The body shows the days' rows: not the skeleton, the host's error or its empty state. */
|
|
74
|
+
function daysDrawn(props: ScheduleGridProps, rowCount: number): boolean {
|
|
75
|
+
return !props.loading && !props.error && rowCount > 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
72
78
|
function abilitiesOf(props: ScheduleGridProps): CellAbilities {
|
|
73
79
|
const open = !props.readOnly && !props.loading;
|
|
74
80
|
return { create: open && Boolean(props.onCreate), copy: open && Boolean(props.onCopy), move: open && Boolean(props.onMove) };
|
|
@@ -88,7 +94,7 @@ function abilitiesOf(props: ScheduleGridProps): CellAbilities {
|
|
|
88
94
|
export function ScheduleGrid(props: ScheduleGridProps): React.JSX.Element {
|
|
89
95
|
const { columns, groups, cell, onCreate, onCopy, onMove } = props;
|
|
90
96
|
const testId = props.dataTestId ?? 'schedule-grid';
|
|
91
|
-
const labels = resolveLabels(
|
|
97
|
+
const labels = resolveLabels(EN_US_SCHEDULE_GRID_LABELS, props.labels);
|
|
92
98
|
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
93
99
|
const { text: announcement, say } = useAnnouncer();
|
|
94
100
|
const focus = useFollowFocus(rootRef);
|
|
@@ -101,6 +107,7 @@ export function ScheduleGrid(props: ScheduleGridProps): React.JSX.Element {
|
|
|
101
107
|
const headRef = useRef<HTMLDivElement | null>(null);
|
|
102
108
|
const bodyRef = useRef<HTMLDivElement | null>(null);
|
|
103
109
|
const sideways = useSidewaysScroll(headRef, bodyRef);
|
|
110
|
+
useScrollToDay(headRef, bodyRef, { day: props.scrollToDay, dayCount: columns.length, drawn: daysDrawn(props, rows.length) }, sideways.follow);
|
|
104
111
|
|
|
105
112
|
const onKeyDown = (event: React.KeyboardEvent): void => {
|
|
106
113
|
sideways.release();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import type { ScheduleGridLabels } from '
|
|
3
|
+
import type { ScheduleGridLabels } from './ScheduleGrid.labels';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* How a block reads. Each tone is drawn differently AND carries its `note`
|
|
@@ -21,6 +21,12 @@ export interface ScheduleGridColumn {
|
|
|
21
21
|
sublabel?: string;
|
|
22
22
|
/** Today's column: its label in the primary colour and its cells framed. */
|
|
23
23
|
today?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The day has gone: its label in the secondary ink (`today` wins). The
|
|
26
|
+
* header only — the cells that can take no new turno say so themselves
|
|
27
|
+
* (`ScheduleGridCell.closed`).
|
|
28
|
+
*/
|
|
29
|
+
past?: boolean;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
/** A row: one person (or resource) across the days. */
|
|
@@ -95,6 +101,20 @@ export interface ScheduleGridCell {
|
|
|
95
101
|
blocked?: boolean;
|
|
96
102
|
/** Written in a blocked cell with no blocks ("Afastamento"). */
|
|
97
103
|
blockedLabel?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The day can take no new turno (it has gone). No "+", the empty cell is no
|
|
106
|
+
* focus stop, a create or copy drag skips it and a move or keyboard
|
|
107
|
+
* copy/move onto it is refused — as on a `blocked` day — but with no hatch
|
|
108
|
+
* and no label: the cell just looks empty. Blocks already there still show
|
|
109
|
+
* and still open. Drawn with no fill, only the divider border.
|
|
110
|
+
*/
|
|
111
|
+
closed?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* A closed cell's words for a screen reader ("Já passou"), visually hidden;
|
|
114
|
+
* nothing on screen. Without it the cell stays unnamed. Ignored on a
|
|
115
|
+
* `blocked` cell, which has its own name.
|
|
116
|
+
*/
|
|
117
|
+
closedLabel?: string;
|
|
98
118
|
}
|
|
99
119
|
|
|
100
120
|
export interface ScheduleGridProps {
|
|
@@ -112,12 +132,12 @@ export interface ScheduleGridProps {
|
|
|
112
132
|
readOnly?: boolean;
|
|
113
133
|
/**
|
|
114
134
|
* A click on an empty cell (one day), or a drag across empty cells of one
|
|
115
|
-
* row (every crossed day that is empty and not
|
|
135
|
+
* row (every crossed day that is empty, not blocked and not closed).
|
|
116
136
|
*/
|
|
117
137
|
onCreate?: (rowId: string, days: number[]) => void;
|
|
118
|
-
/** A block's edge grip dragged along its row: the crossed days that are empty and not
|
|
138
|
+
/** A block's edge grip dragged along its row: the crossed days that are empty, not blocked and not closed. */
|
|
119
139
|
onCopy?: (blockId: string, days: number[]) => void;
|
|
120
|
-
/** A block's middle dropped on an empty, open cell of any row. */
|
|
140
|
+
/** A block's middle dropped on an empty, open cell of any row (never a blocked or closed one). */
|
|
121
141
|
onMove?: (blockId: string, toRowId: string, toDay: number) => void;
|
|
122
142
|
/** A block clicked, tapped or Entered. */
|
|
123
143
|
onBlockClick?: (blockId: string) => void;
|
|
@@ -129,6 +149,17 @@ export interface ScheduleGridProps {
|
|
|
129
149
|
error?: React.ReactNode;
|
|
130
150
|
/** Shown when there are no rows at all. */
|
|
131
151
|
empty?: React.ReactNode;
|
|
152
|
+
/**
|
|
153
|
+
* A day (its index in `columns`) to open the days on, once per value: as
|
|
154
|
+
* soon as the days are drawn (after `loading`, and once the grid has a
|
|
155
|
+
* width), they scroll sideways so that day is the first column after the
|
|
156
|
+
* pinned names (or as far as they reach) — today, on a week opened
|
|
157
|
+
* mid-week. At once, never smoothly; focus and the page's own scroll are
|
|
158
|
+
* left alone, and the header row follows. The same value on a later render
|
|
159
|
+
* keeps the person's own scroll, and a resize does not re-anchor. Nothing
|
|
160
|
+
* happens while the days fit. Assumes LTR.
|
|
161
|
+
*/
|
|
162
|
+
scrollToDay?: number;
|
|
132
163
|
/** The header row sticks this far from the top of the scroll container (a sticky page bar above). Default 0. */
|
|
133
164
|
stickyTop?: number;
|
|
134
165
|
/** The grid's accessible name ("Escala da semana"). */
|
|
@@ -9,4 +9,5 @@ export type {
|
|
|
9
9
|
ScheduleGridProps,
|
|
10
10
|
ScheduleGridRow,
|
|
11
11
|
} from './ScheduleGrid.types';
|
|
12
|
-
export
|
|
12
|
+
export { SCHEDULE_GRID_LABELS } from './ScheduleGrid.labels';
|
|
13
|
+
export type { ScheduleGridLabels } from './ScheduleGrid.labels';
|
|
@@ -5,9 +5,9 @@ import type { ScheduleGridCell } from './ScheduleGrid.types';
|
|
|
5
5
|
* on. The host decides everything else — hours, limits, refusals.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/** A cell that can take a new turno: nothing in it
|
|
8
|
+
/** A cell that can take a new turno: nothing in it, not closed to the row (`blocked`) and not gone (`closed`). */
|
|
9
9
|
export function isOpen(cell: ScheduleGridCell): boolean {
|
|
10
|
-
return !cell.blocked && cell.blocks.length === 0;
|
|
10
|
+
return !cell.blocked && !cell.closed && cell.blocks.length === 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/** Every day from `a` to `b` inclusive, in order, whichever is larger. */
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How far the days must scroll sideways for `day` to be the first column after
|
|
6
|
+
* the pinned names, measured on the header row — or `null` when the header is
|
|
7
|
+
* not laid out (no box: `display: none`, or a container that has no width yet).
|
|
8
|
+
*/
|
|
9
|
+
function offsetOf(head: HTMLElement, day: number): number | null {
|
|
10
|
+
const row = head.querySelector<HTMLElement>('[role="row"]');
|
|
11
|
+
const corner = row?.querySelector<HTMLElement>('[data-sg-corner]');
|
|
12
|
+
const column = row?.querySelectorAll<HTMLElement>('[role="columnheader"]')[day];
|
|
13
|
+
if (!row || !corner || !column) return null;
|
|
14
|
+
const cornerBox = corner.getBoundingClientRect();
|
|
15
|
+
const columnBox = column.getBoundingClientRect();
|
|
16
|
+
if (cornerBox.width === 0 || columnBox.width === 0) return null;
|
|
17
|
+
const gap = Number.parseFloat(getComputedStyle(row).columnGap) || 0;
|
|
18
|
+
return columnBox.left - (cornerBox.right + gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Scroll the days so `day` opens first. The offset is the header's, so it is
|
|
23
|
+
* added to the HEADER's scroll (the two can differ until the body's scroll
|
|
24
|
+
* event has synced them); the body then jumps there, and the header follows.
|
|
25
|
+
* Returns whether it could measure.
|
|
26
|
+
*/
|
|
27
|
+
function anchor(head: HTMLElement, body: HTMLElement, day: number, follow: () => void): boolean {
|
|
28
|
+
const offset = offsetOf(head, day);
|
|
29
|
+
if (offset === null) return false;
|
|
30
|
+
// The browser clamps a target outside the reach, on either side.
|
|
31
|
+
const target = head.scrollLeft + offset;
|
|
32
|
+
if (typeof body.scrollTo === 'function') body.scrollTo({ left: target, behavior: 'instant' });
|
|
33
|
+
else body.scrollLeft = target;
|
|
34
|
+
follow();
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Whether `day` names one of the `dayCount` columns. */
|
|
39
|
+
function isColumn(day: number | undefined, dayCount: number): day is number {
|
|
40
|
+
return day !== undefined && Number.isInteger(day) && day >= 0 && day < dayCount;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Whether this value was already anchored (a re-render, a refetch): the person's scroll stays. */
|
|
44
|
+
function sameAnchor(done: { day: number; dayCount: number } | null, day: number, dayCount: number): boolean {
|
|
45
|
+
return done !== null && done.day === day && done.dayCount === dayCount;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface Anchoring {
|
|
49
|
+
day: number | undefined;
|
|
50
|
+
dayCount: number;
|
|
51
|
+
/** The days are drawn: not loading, no error, at least one row. */
|
|
52
|
+
drawn: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* `scrollToDay`: once per value (and per day count), as soon as the days are
|
|
57
|
+
* drawn, they scroll sideways so that day opens first after the pinned names.
|
|
58
|
+
* At once (`behavior: 'instant'`, and `scrollSx` pins the scroller's own
|
|
59
|
+
* `scroll-behavior` to `auto` too), so there is no motion to reduce; only
|
|
60
|
+
* sideways — no `scrollIntoView`, which would also move the page — and no
|
|
61
|
+
* focus. LTR: it reads the names as the left column.
|
|
62
|
+
*
|
|
63
|
+
* - The same value on a later render — a re-render, a refetch's
|
|
64
|
+
* `loading` → loaded — leaves the person's own scroll alone.
|
|
65
|
+
* - While loading (or empty, or failed) it waits for the rows, then anchors.
|
|
66
|
+
* - When the header has no box yet (`display: none`, a container sized after
|
|
67
|
+
* mount) it waits for the first width — a one-shot `ResizeObserver` on the
|
|
68
|
+
* header — then anchors and stops observing.
|
|
69
|
+
* - A later resize does not re-anchor.
|
|
70
|
+
*/
|
|
71
|
+
export function useScrollToDay(
|
|
72
|
+
headRef: React.RefObject<HTMLElement | null>,
|
|
73
|
+
bodyRef: React.RefObject<HTMLElement | null>,
|
|
74
|
+
{ day, dayCount, drawn }: Anchoring,
|
|
75
|
+
follow: () => void,
|
|
76
|
+
): void {
|
|
77
|
+
const done = useRef<{ day: number; dayCount: number } | null>(null);
|
|
78
|
+
const followRef = useRef(follow);
|
|
79
|
+
useLayoutEffect(() => {
|
|
80
|
+
followRef.current = follow;
|
|
81
|
+
});
|
|
82
|
+
useLayoutEffect(() => {
|
|
83
|
+
const head = headRef.current;
|
|
84
|
+
const body = bodyRef.current;
|
|
85
|
+
if (!isColumn(day, dayCount) || sameAnchor(done.current, day, dayCount)) return undefined;
|
|
86
|
+
if (!drawn || !head || !body) return undefined;
|
|
87
|
+
const settle = (): boolean => {
|
|
88
|
+
if (!anchor(head, body, day, () => followRef.current())) return false;
|
|
89
|
+
done.current = { day, dayCount };
|
|
90
|
+
return true;
|
|
91
|
+
};
|
|
92
|
+
if (settle() || typeof ResizeObserver === 'undefined') return undefined;
|
|
93
|
+
const observer = new ResizeObserver(() => {
|
|
94
|
+
if (settle()) observer.disconnect();
|
|
95
|
+
});
|
|
96
|
+
observer.observe(head);
|
|
97
|
+
return () => observer.disconnect();
|
|
98
|
+
}, [day, dayCount, drawn, headRef, bodyRef]);
|
|
99
|
+
}
|
package/src/copy/labels.ts
CHANGED
|
@@ -214,40 +214,6 @@ export interface DateRangePickerLabels {
|
|
|
214
214
|
calendar: string;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
/** `ScheduleGrid`'s cell names and the sentences its live region reads after a keyboard copy or move. */
|
|
218
|
-
export interface ScheduleGridLabels {
|
|
219
|
-
/** An empty cell's button: schedule this row on this day. */
|
|
220
|
-
createCell(row: string, column: string): string;
|
|
221
|
-
/** A blocked cell with no label of its own. */
|
|
222
|
-
blockedCell(row: string, column: string): string;
|
|
223
|
-
/** After Shift+←/→ copied a block to the next or previous day. */
|
|
224
|
-
copied(block: string, column: string): string;
|
|
225
|
-
/** After Alt+←/→ moved a block to the next or previous day. */
|
|
226
|
-
moved(block: string, row: string, column: string): string;
|
|
227
|
-
/** A keyboard copy or move whose day is taken, closed or outside the grid. */
|
|
228
|
-
refused: string;
|
|
229
|
-
/** Shift/Alt+←/→ on a block that is not `copyable` / `movable`: the block is fixed, not the day. */
|
|
230
|
-
notMovable: string;
|
|
231
|
-
/** The grid's busy state. */
|
|
232
|
-
loading: string;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/** `DayRuler`'s track names and the sentences its live region reads after a keyboard move or resize. */
|
|
236
|
-
export interface DayRulerLabels {
|
|
237
|
-
/** A row's empty track: Enter schedules this row. */
|
|
238
|
-
createTrack(row: string): string;
|
|
239
|
-
/** After Alt+←/→ moved a block; `range` is "20:45–00:45". */
|
|
240
|
-
moved(block: string, range: string): string;
|
|
241
|
-
/** After Shift(+Alt)+←/→ changed a block's end or start. */
|
|
242
|
-
resized(block: string, range: string): string;
|
|
243
|
-
/** A keyboard move or resize past the ruler's ends or under the shortest length. */
|
|
244
|
-
refused: string;
|
|
245
|
-
/** Shift/Alt+←/→ on a block that is not `movable` / `resizable`: the block is fixed. */
|
|
246
|
-
notMovable: string;
|
|
247
|
-
/** The ruler's busy state. */
|
|
248
|
-
loading: string;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
217
|
/**
|
|
252
218
|
* `Calendar`'s month/year caption (`captionLayout="selectors"`): the two
|
|
253
219
|
* selector buttons, the month arrows and the two pick grids. The month and
|
|
@@ -298,7 +264,5 @@ export interface UiLabels {
|
|
|
298
264
|
infiniteScroll: InfiniteScrollLabels;
|
|
299
265
|
socialLogin: SocialLoginLabels;
|
|
300
266
|
dateRangePicker: DateRangePickerLabels;
|
|
301
|
-
scheduleGrid: ScheduleGridLabels;
|
|
302
|
-
dayRuler: DayRulerLabels;
|
|
303
267
|
calendar: CalendarLabels;
|
|
304
268
|
}
|
package/src/en-US.labels.ts
CHANGED
|
@@ -144,23 +144,6 @@ export const EN_US_UI_LABELS: UiLabels = {
|
|
|
144
144
|
dateRangePicker: {
|
|
145
145
|
calendar: "Calendar",
|
|
146
146
|
},
|
|
147
|
-
scheduleGrid: {
|
|
148
|
-
createCell: (row, column) => `Schedule ${row}, ${column}`,
|
|
149
|
-
blockedCell: (row, column) => `${row}, ${column}: closed`,
|
|
150
|
-
copied: (block, column) => `${block} copied to ${column}`,
|
|
151
|
-
moved: (block, row, column) => `${block} moved to ${row}, ${column}`,
|
|
152
|
-
refused: "Not there: that day is taken or closed",
|
|
153
|
-
notMovable: "This shift cannot be changed here",
|
|
154
|
-
loading: "Loading the schedule",
|
|
155
|
-
},
|
|
156
|
-
dayRuler: {
|
|
157
|
-
createTrack: (row) => `Schedule ${row}`,
|
|
158
|
-
moved: (block, range) => `${block} now ${range}`,
|
|
159
|
-
resized: (block, range) => `${block} now ${range}`,
|
|
160
|
-
refused: "It cannot go further",
|
|
161
|
-
notMovable: "This shift cannot be changed here",
|
|
162
|
-
loading: "Loading the day",
|
|
163
|
-
},
|
|
164
147
|
calendar: {
|
|
165
148
|
chooseMonth: (month) => `${month}, choose month`,
|
|
166
149
|
chooseYear: (year) => `${year}, choose year`,
|
package/src/pt-BR.labels.ts
CHANGED
|
@@ -143,23 +143,6 @@ export const PT_BR_UI_LABELS: UiLabels = {
|
|
|
143
143
|
dateRangePicker: {
|
|
144
144
|
calendar: "Calendário",
|
|
145
145
|
},
|
|
146
|
-
scheduleGrid: {
|
|
147
|
-
createCell: (row, column) => `Agendar ${row}, ${column}`,
|
|
148
|
-
blockedCell: (row, column) => `${row}, ${column}: fechado`,
|
|
149
|
-
copied: (block, column) => `${block} copiado para ${column}`,
|
|
150
|
-
moved: (block, row, column) => `${block} movido para ${row}, ${column}`,
|
|
151
|
-
refused: "Não dá para pôr aí: o dia está ocupado ou fechado",
|
|
152
|
-
notMovable: "Este turno não muda por aqui",
|
|
153
|
-
loading: "Carregando a escala",
|
|
154
|
-
},
|
|
155
|
-
dayRuler: {
|
|
156
|
-
createTrack: (row) => `Agendar ${row}`,
|
|
157
|
-
moved: (block, range) => `${block} agora ${range}`,
|
|
158
|
-
resized: (block, range) => `${block} agora ${range}`,
|
|
159
|
-
refused: "Não dá para ir além",
|
|
160
|
-
notMovable: "Este turno não muda por aqui",
|
|
161
|
-
loading: "Carregando o dia",
|
|
162
|
-
},
|
|
163
146
|
calendar: {
|
|
164
147
|
chooseMonth: (month) => `${month}, escolher mês`,
|
|
165
148
|
chooseYear: (year) => `${year}, escolher ano`,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/en-US.labels.ts"],"sourcesContent":["/**\n * The en-US labels pack — and, unlike the other en-US packs, the components'\n * own fallback: each `labels` prop is optional, and this is what a host that\n * passes nothing has always rendered, kept word for word (including the\n * lower-case `close`/`loading` names tests already query by).\n */\nimport type { UiLabels } from './copy/labels';\n\nexport const EN_US_UI_LABELS: UiLabels = {\n common: {\n loading: \"loading\",\n close: \"close\",\n delete: \"delete\",\n },\n stepper: {\n step: (position, label) => `Step ${position}: ${label}`,\n optional: \"optional\",\n completed: \"completed\",\n current: \"current\",\n },\n timeline: {\n expandDetails: \"Expand item details\",\n collapseDetails: \"Collapse item details\",\n item: (title) => `Timeline item: ${title}`,\n },\n lazyImage: {\n loadingAlt: (alt) => `${alt} (loading)`,\n fallbackAlt: (alt) => `${alt} (fallback)`,\n },\n sonner: {\n hiddenCount: (count) => `+${count} more`,\n },\n richTextEditor: {\n placeholder: \"Start typing...\",\n ariaLabel: \"Rich text editor\",\n listItem: \"List item\",\n bold: \"Bold\",\n italic: \"Italic\",\n underline: \"Underline\",\n strikethrough: \"Strikethrough\",\n numberedList: \"Numbered List\",\n bulletedList: \"Bulleted List\",\n insertLink: \"Insert Link\",\n insertImage: \"Insert Image\",\n codeBlock: \"Code Block\",\n quote: \"Quote\",\n linkPrompt: \"Enter URL:\",\n imagePrompt: \"Enter image URL:\",\n },\n table: {\n sortBy: (header) => `Sort by ${header}`,\n selectRow: (rowNumber) => `select row ${rowNumber}`,\n selectAllRows: \"select all\",\n },\n code: {\n copy: \"Copy code\",\n copied: \"Copied!\",\n },\n contentToolbar: {\n gridView: \"Grid View\",\n listView: \"List View\",\n openFilters: \"Open filters\",\n closeFilters: \"Close filters\",\n filters: \"Filters\",\n all: \"All\",\n search: \"Search…\",\n noResults: \"No results\",\n },\n dashboard: {\n breadcrumb: \"breadcrumb\",\n moreFilters: \"More filters\",\n },\n navigationMenu: {\n collapse: \"Collapse\",\n expand: \"Expand\",\n },\n workflowStep: {\n step: (position, title) => `Step ${position}: ${title}`,\n progress: (position, total) => `Step ${position} of ${total}`,\n },\n alertDialog: {\n cancel: \"Cancel\",\n confirm: \"Confirm\",\n },\n avatar: {\n name: \"Avatar\",\n },\n emptyState: {\n refresh: \"Refresh\",\n create: \"Create New\",\n },\n errorState: {\n retry: \"Retry\",\n },\n loadingState: {\n skeleton: \"Loading content\",\n spinner: \"Loading\",\n },\n stackedModal: {\n loading: \"Loading...\",\n },\n command: {\n placeholder: \"Type a command or search...\",\n empty: \"No results found\",\n loading: \"Loading...\",\n },\n formErrorSnackbar: {\n message: \"Please fix the highlighted fields and try again.\",\n },\n columnsMenu: {\n title: \"Columns\",\n toggle: \"Toggle columns\",\n },\n drawer: {\n close: \"Close drawer\",\n },\n settingsLayout: {\n navigation: \"Settings\",\n searchPlaceholder: \"Search settings\",\n emptySearch: \"No settings match your search.\",\n back: \"Back\",\n },\n tableFilter: {\n filters: \"Filters\",\n keywordPlaceholder: \"Press Enter to filter\",\n keywordLabel: \"Filter by keyword\",\n },\n appHeader: {\n disclose: (title) => `${title} details`,\n },\n breadcrumbs: {\n navigation: \"breadcrumb navigation\",\n },\n animatedIcon: {\n name: (variant) => `Animated ${variant} icon`,\n },\n infiniteScroll: {\n loadFailed: \"An error occurred while loading more items\",\n },\n socialLogin: {\n title: \"Sign in to continue\",\n divider: \"or\",\n },\n dateRangePicker: {\n calendar: \"Calendar\",\n },\n scheduleGrid: {\n createCell: (row, column) => `Schedule ${row}, ${column}`,\n blockedCell: (row, column) => `${row}, ${column}: closed`,\n copied: (block, column) => `${block} copied to ${column}`,\n moved: (block, row, column) => `${block} moved to ${row}, ${column}`,\n refused: \"Not there: that day is taken or closed\",\n notMovable: \"This shift cannot be changed here\",\n loading: \"Loading the schedule\",\n },\n dayRuler: {\n createTrack: (row) => `Schedule ${row}`,\n moved: (block, range) => `${block} now ${range}`,\n resized: (block, range) => `${block} now ${range}`,\n refused: \"It cannot go further\",\n notMovable: \"This shift cannot be changed here\",\n loading: \"Loading the day\",\n },\n calendar: {\n chooseMonth: (month) => `${month}, choose month`,\n chooseYear: (year) => `${year}, choose year`,\n previousMonth: \"Previous month\",\n nextMonth: \"Next month\",\n months: \"Months\",\n years: \"Years\",\n },\n};\n"],"mappings":";AAQO,IAAM,kBAA4B;AAAA,EACvC,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,SAAS;AAAA,IACP,MAAM,CAAC,UAAU,UAAU,QAAQ,QAAQ,KAAK,KAAK;AAAA,IACrD,UAAU;AAAA,IACV,WAAW;AAAA,IACX,SAAS;AAAA,EACX;AAAA,EACA,UAAU;AAAA,IACR,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,MAAM,CAAC,UAAU,kBAAkB,KAAK;AAAA,EAC1C;AAAA,EACA,WAAW;AAAA,IACT,YAAY,CAAC,QAAQ,GAAG,GAAG;AAAA,IAC3B,aAAa,CAAC,QAAQ,GAAG,GAAG;AAAA,EAC9B;AAAA,EACA,QAAQ;AAAA,IACN,aAAa,CAAC,UAAU,IAAI,KAAK;AAAA,EACnC;AAAA,EACA,gBAAgB;AAAA,IACd,aAAa;AAAA,IACb,WAAW;AAAA,IACX,UAAU;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,eAAe;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,WAAW;AAAA,IACX,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,QAAQ,CAAC,WAAW,WAAW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package/dist/chunk-7RXL4ONS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-7RXL4ONS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DayRuler/DayRuler.keyboard.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport type { DayRulerLabels } from '../../../copy/labels';\nimport { DAY_RULER_METRICS as M } from './DayRuler.metrics';\nimport { clamp, formatRange, moved, resized, snapTo } from './day-ruler-model';\nimport type { DayRulerBlock, RulerHour } from './DayRuler.types';\n\n/** The ruler's span and step, resolved once per render. */\nexport interface RulerScale {\n from: RulerHour;\n to: RulerHour;\n /** The snap, in hours (0.25 for 15 minutes). */\n snap: number;\n createHours: number;\n tickHours: number;\n}\n\n/** What the ruler lets a row do, resolved once per render. */\nexport interface RulerAbilities {\n create: boolean;\n move: boolean;\n resize: boolean;\n}\n\n/** Which gesture a modified arrow asks of a block, if the ruler allows it. */\ntype Gesture = 'move' | 'start' | 'end';\n\nfunction gestureOf(event: React.KeyboardEvent, block: DayRulerBlock, can: RulerAbilities): Gesture | null {\n if (event.altKey && !event.shiftKey) return can.move && block.movable ? 'move' : null;\n if (!event.shiftKey) return null;\n if (!can.resize || !block.resizable) return null;\n return event.altKey ? 'start' : 'end';\n}\n\n/** The block's hours after one snap of `gesture` in `direction`. */\nfunction stepped(block: DayRulerBlock, gesture: Gesture, direction: -1 | 1, scale: RulerScale): [RulerHour, RulerHour] {\n const step = direction * scale.snap;\n if (gesture === 'move') return moved(block.start, block.end, step, scale.from, scale.to);\n const edge = (gesture === 'start' ? block.start : block.end) + step;\n return resized(block.start, block.end, gesture, edge, M.minHours, scale.from, scale.to);\n}\n\ninterface BlockKeyContext {\n scale: RulerScale;\n can: RulerAbilities;\n onMove?: (blockId: string, start: RulerHour, end: RulerHour) => void;\n onResize?: (blockId: string, start: RulerHour, end: RulerHour) => void;\n labels: DayRulerLabels;\n say: (text: string) => void;\n}\n\n/**\n * A focused block's keys (FUT-3825): Alt+←/→ moves it one snap, Shift+←/→\n * moves its end, Shift+Alt+←/→ its start. Each is read by the live region; one\n * that cannot go further, or that the block does not allow, is refused aloud\n * and changes nothing.\n */\n/** Shift and/or Alt with ← or →, and no Ctrl or Meta: a key the ruler answers for a block. */\nfunction isBlockKey(event: React.KeyboardEvent): boolean {\n const arrow = event.key === 'ArrowLeft' || event.key === 'ArrowRight';\n return arrow && (event.altKey || event.shiftKey) && !event.ctrlKey && !event.metaKey;\n}\n\nexport function handleBlockKey(event: React.KeyboardEvent, block: DayRulerBlock, ctx: BlockKeyContext): void {\n if (!isBlockKey(event)) return;\n // The key is the ruler's either way: Alt+← would otherwise be the browser's Back.\n event.preventDefault();\n const gesture = gestureOf(event, block, ctx.can);\n if (!gesture) {\n ctx.say(ctx.labels.notMovable);\n return;\n }\n const [start, end] = stepped(block, gesture, event.key === 'ArrowLeft' ? -1 : 1, ctx.scale);\n if (start === block.start && end === block.end) {\n ctx.say(ctx.labels.refused);\n return;\n }\n const range = formatRange(start, end);\n if (gesture === 'move') {\n ctx.onMove?.(block.id, start, end);\n ctx.say(ctx.labels.moved(block.label, range));\n return;\n }\n ctx.onResize?.(block.id, start, end);\n ctx.say(ctx.labels.resized(block.label, range));\n}\n\n/** Where Enter on a track creates: the host's `createStart`, else `now` snapped up, else `from` — kept on the ruler. */\nexport function keyCreateSpan(scale: RulerScale, now: RulerHour | undefined, hostStart: RulerHour | undefined): [RulerHour, RulerHour] {\n const onRuler = now !== undefined && now >= scale.from && now < scale.to;\n const fallback = onRuler ? Math.ceil(now / scale.snap) * scale.snap : scale.from;\n const start = clamp(snapTo(hostStart ?? fallback, scale.snap), scale.from, scale.to - M.minHours);\n return [start, Math.min(scale.to, start + scale.createHours)];\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAS,UAAU,OAA4B,OAAsB,KAAqC;AACxG,MAAI,MAAM,UAAU,CAAC,MAAM,SAAU,QAAO,IAAI,QAAQ,MAAM,UA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ACA,MAAI,WAAW,MAAM,IAAI,OAAO,GAAG;AACnC,MAAI,IAAI,IAAI,OAAO,QAAQ,MAAM,OAAO,KAAK,CAAC;AAChD;AAGO,SAAS,cAAc,OAAmB,KAA4B,WAA0D;AACrI,QAAM,UAAU,QAAQ,UAAa,OAAO,MAAM,QAAQ,MAAM,MAAM;AACtE,QAAM,WAAW,UAAU,KAAK,KAAK,MAAM,MAAM,IAAI,IAAI,MAAM,OAAO,MAAM;AAC5E,QAAM,QAAQ,MAAM,OAAO,aAAa,UAAU,MAAM,IAAI,GAAG,MAAM,MAAM,MAAM,KAAK,kBAAE,QAAQ;AAChG,SAAO,CAAC,OAAO,KAAK,IAAI,MAAM,IAAI,QAAQ,MAAM,WAAW,CAAC;AAC9D;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DayRuler/DayRuler.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/index.js';\nimport type React from 'react';\n\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { resolveLabels } from '../../../utils/resolve-labels';\nimport { SR_ONLY_SX } from '../ScheduleGrid/ScheduleGrid.styles';\nimport { useAnnouncer } from '../ScheduleGrid/useAnnouncer';\nimport { handleBlockKey, keyCreateSpan, type RulerAbilities, type RulerScale } from './DayRuler.keyboard';\nimport { DAY_RULER_METRICS as M } from './DayRuler.metrics';\nimport { Axis, Coverage, RulerRow, type RowContext } from './DayRuler.parts';\nimport { groupTitleSx, rootSx, rowSx, skeletonNameSx, skeletonTrackSx } from './DayRuler.styles';\nimport type { DayRulerProps, DayRulerRow } from './DayRuler.types';\nimport { useRulerDrag } from './useRulerDrag';\n\n/** The rows, grouped under a heading each time `row.group` changes. */\nfunction grouped(rows: readonly DayRulerRow[]): { title?: string; rows: DayRulerRow[] }[] {\n const out: { title?: string; rows: DayRulerRow[] }[] = [];\n for (const row of rows) {\n const last = out[out.length - 1];\n if (last && last.title === row.group) last.rows.push(row);\n else out.push({ title: row.group, rows: [row] });\n }\n return out;\n}\n\nfunction scaleOf(props: DayRulerProps): RulerScale {\n return {\n from: props.from ?? 6,\n to: props.to ?? 26,\n snap: (props.snapMinutes ?? 15) / 60,\n createHours: props.createHours ?? 4,\n tickHours: props.tickHours ?? 4,\n };\n}\n\nfunction abilitiesOf(props: DayRulerProps): RulerAbilities {\n const open = !props.readOnly && !props.loading;\n return { create: open && Boolean(props.onCreate), move: open && Boolean(props.onMove), resize: open && Boolean(props.onResize) };\n}\n\n/** The groups and their rows — or the skeleton, the host's error, or the host's empty state. */\nfunction RulerBody({ props, ctx }: { props: DayRulerProps; ctx: RowContext }): React.JSX.Element {\n if (props.error) return <>{props.error}</>;\n if (props.loading) {\n return (\n <>\n {Array.from({ length: M.skeletonRows }, (_, index) => (\n <Box key={index} sx={rowSx} aria-hidden data-testid={`${ctx.testId}-loading`}>\n <Box sx={skeletonNameSx} />\n <Box sx={skeletonTrackSx} />\n </Box>\n ))}\n </>\n );\n }\n if (props.rows.length === 0) return <>{props.empty ?? null}</>;\n return (\n <>\n {grouped(props.rows).map((group, index) => (\n <Box key={`${index}-${group.title ?? ''}`} role=\"list\" aria-label={group.title}>\n {group.title ? (\n <Box component=\"p\" sx={groupTitleSx} aria-hidden>\n {group.title}\n </Box>\n ) : null}\n {group.rows.map((row) => (\n <RulerRow key={row.id} row={row} ctx={ctx} />\n ))}\n </Box>\n ))}\n </>\n );\n}\n\n/**\n * One day as an hour ruler per row — who is on the escala when, and who is\n * really on shift (FUT-3825). Drag on an empty stretch to create (a click\n * alone is `createHours`), drag a block to move it, drag its ends to change\n * them; every hour snaps to `snapMinutes`. On a narrow ruler (a phone) each row\n * stacks and the blocks are tap-only: touch scrolls and never drags.\n *\n * The ruler reports gestures; hours, limits and refusals are the host's.\n */\nexport function DayRuler(props: DayRulerProps): React.JSX.Element {\n const { now, onCreate, onMove, onResize } = props;\n const testId = props.dataTestId ?? 'day-ruler';\n const labels = resolveLabels(EN_US_UI_LABELS.dayRuler, props.labels);\n const scale = scaleOf(props);\n const can = abilitiesOf(props);\n const dragApi = useRulerDrag(scale, { onCreate, onMove, onResize });\n const { text: announcement, say } = useAnnouncer();\n\n const ctx: RowContext = {\n scale,\n now,\n can,\n drag: dragApi.drag,\n dragApi,\n onBlockClick: props.onBlockClick,\n onKeyCreate: (row) => {\n const [start, end] = keyCreateSpan(scale, now, props.createStart?.(row.id));\n onCreate?.(row.id, start, end);\n },\n onBlockKey: (event, block) => handleBlockKey(event, block, { scale, can, onMove, onResize, labels, say }),\n createLabel: labels.createTrack,\n testId,\n };\n\n return (\n <Box\n sx={rootSx(props.rows.some((row) => row.actions !== undefined && row.actions !== null))}\n data-testid={testId}\n role=\"region\"\n aria-label={props['aria-label']}\n aria-busy={props.loading || undefined}\n aria-description={props.loading ? labels.loading : undefined}\n >\n {props.coverage && props.coverage.length > 0 ? (\n <Coverage coverage={props.coverage} label={props.coverageLabel} scale={scale} testId={testId} />\n ) : null}\n <Axis scale={scale} testId={testId} />\n <RulerBody props={props} ctx={ctx} />\n <Box sx={SR_ONLY_SX} aria-live=\"polite\" role=\"status\" data-testid={`${testId}-live`}>\n {announcement}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,SAAS;AA0CU,wBAKhB,YALgB;AA3B1B,SAAS,QAAQ,MAAyE;AACxF,QAAM,MAAiD,CAAC;AACxD,aAAW,OAAO,MAAM;AACtB,UAAM,OAAO,IAAI,IAAI,SAAS,CAAC;AAC/B,QAAI,QAAQ,KAAK,UAAU,IAAI,MAAO,MAAK,KAAK,KAAK,GAAG;AAAA,QACnD,KAAI,KAAK,EAAE,OAAO,IAAI,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC;AAAA,EACjD;AACA,SAAO;AACT;AAEA,SAAS,QAAQ,OAAkC;AACjD,SAAO;AAAA,IACL,MAAM,MAAM,QAAQ;AAAA,IACpB,IAAI,MAAM,MAAM;AA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A;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/ScheduleGrid/ScheduleGrid.parts.tsx"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add';\nimport Box from '@mui/material/Box/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport type * as React from 'react';\n\nimport type { ScheduleGridLabels } from '../../../copy/labels';\nimport { daysBetween, isOpen } from './schedule-grid-model';\nimport { SCHEDULE_GRID_METRICS } from './ScheduleGrid.metrics';\nimport {\n blockedLabelSx,\n blockSx,\n breakSx,\n cellSx,\n ghostSx,\n gripSx,\n groupTitleSx,\n headerCellSx,\n headerSublabelSx,\n headerRowSx,\n nameCellSx,\n personRowSx,\n plusButtonSx,\n skeletonCellSx,\n totalCellSx,\n totalHeaderSx,\n} from './ScheduleGrid.styles';\nimport type {\n ScheduleGridBlock,\n ScheduleGridCell,\n ScheduleGridColumn,\n ScheduleGridProps,\n ScheduleGridRow,\n} from './ScheduleGrid.types';\nimport { ScheduleNameCell } from './ScheduleNameCell';\nimport type { GridDrag, GridDragApi } from './useGridDrag';\n\n/** What the grid lets a cell do, resolved once per render. */\nexport interface CellAbilities {\n create: boolean;\n copy: boolean;\n move: boolean;\n}\n\n/** A row's shared columns, as an `sx` part. */\ntype RowSx = (theme: Theme) => CSSObject;\n\ninterface CellProps {\n row: ScheduleGridRow;\n day: number;\n column: ScheduleGridColumn;\n cell: ScheduleGridCell;\n drag: GridDrag | null;\n dragApi: GridDragApi;\n can: CellAbilities;\n createPreview?: (rowId: string) => string;\n onCreate?: (rowId: string, days: number[]) => void;\n onBlockClick?: (blockId: string) => void;\n labels: ScheduleGridLabels;\n testId: string;\n}\n\n/** The ghost text this cell shows during a create or copy, or `null` when the gesture does not land here. */\nfunction ghostFor(props: CellProps): string | null {\n const { drag, row, day, cell, createPreview } = props;\n if (!drag || drag.mode === 'move' || drag.rowId !== row.id || !isOpen(cell)) return null;\n if (!daysBetween(drag.anchor, drag.day).includes(day)) return null;\n if (drag.mode === 'copy') return day === drag.anchor ? null : drag.preview;\n return createPreview?.(row.id) ?? '';\n}\n\n/** The keys a block answers to, for `aria-keyshortcuts`. */\nfunction shortcutsOf(movable: boolean, copyable: boolean): string | undefined {\n const keys = [movable ? 'Alt+ArrowLeft Alt+ArrowRight' : '', copyable ? 'Shift+ArrowLeft Shift+ArrowRight' : ''];\n return keys.filter(Boolean).join(' ') || undefined;\n}\n\nconst titleOf = (block: ScheduleGridBlock): string => block.title ?? [block.label, block.note].filter(Boolean).join(' · ');\n\ninterface BlockProps {\n block: ScheduleGridBlock;\n row: ScheduleGridRow;\n day: number;\n can: CellAbilities;\n dragApi: GridDragApi;\n onBlockClick?: (blockId: string) => void;\n testId: string;\n}\n\nfunction Grip({ side, onPointerDown, testId }: { side: 'l' | 'r'; onPointerDown: (event: React.PointerEvent) => void; testId: string }) {\n return <Box component=\"span\" aria-hidden sx={gripSx(side)} onPointerDown={onPointerDown} data-sg-grip=\"\" data-testid={testId} />;\n}\n\n/** The block's break, kept inside it whatever the host sent. */\nfunction BreakBand({ span, testId }: { span: { start: number; end: number }; testId: string }): React.JSX.Element | null {\n const start = Math.min(1, Math.max(0, span.start));\n const end = Math.min(1, Math.max(0, span.end));\n if (!(end > start)) return null;\n return <Box component=\"span\" aria-hidden sx={breakSx({ start, end })} data-sg-break=\"\" data-testid={testId} />;\n}\n\nfunction BlockButton({ block, row, day, can, dragApi, onBlockClick, testId }: BlockProps): React.JSX.Element {\n const movable = can.move && Boolean(block.movable);\n const copyable = can.copy && Boolean(block.copyable);\n const startCopy = (event: React.PointerEvent): void => dragApi.startCopy(event, block.id, row.id, day, block.label);\n const startMove = (event: React.PointerEvent): void => dragApi.startMove(event, block.id, row.id, day);\n return (\n <Box\n component=\"button\"\n type=\"button\"\n sx={blockSx(block.tone, { selected: Boolean(block.selected), movable })}\n title={titleOf(block)}\n aria-keyshortcuts={shortcutsOf(movable, copyable)}\n aria-current={block.selected ? 'true' : undefined}\n data-sg-focus=\"\"\n data-sg-row={row.id}\n data-sg-day={day}\n data-sg-block={block.id}\n data-tone={block.tone}\n data-testid={`${testId}-block-${block.id}`}\n onPointerDown={movable ? startMove : undefined}\n onClick={() => {\n if (!dragApi.takeClick()) onBlockClick?.(block.id);\n }}\n >\n {block.breakSpan ? <BreakBand span={block.breakSpan} testId={`${testId}-break-${block.id}`} /> : null}\n {copyable ? <Grip side=\"l\" onPointerDown={startCopy} testId={`${testId}-grip-l-${block.id}`} /> : null}\n <span data-sg-line=\"label\">{block.label}</span>\n {block.note ? <span data-sg-line=\"note\">{block.note}</span> : null}\n {copyable ? <Grip side=\"r\" onPointerDown={startCopy} testId={`${testId}-grip-r-${block.id}`} /> : null}\n </Box>\n );\n}\n\n/**\n * The empty cell's \"+\". It stays mounted while a drag shows the ghost in it, so\n * a press and release in place is still its click.\n */\nfunction PlusButton({ props, ghost }: { props: CellProps; ghost: string | null }): React.JSX.Element {\n const { row, day, column, dragApi, onCreate, labels } = props;\n return (\n <Box\n component=\"button\"\n type=\"button\"\n sx={plusButtonSx}\n aria-label={labels.createCell(row.label, column.label)}\n data-ghost={ghost === null ? undefined : ''}\n data-sg-focus=\"\"\n data-sg-row={row.id}\n data-sg-day={day}\n onPointerDown={(event: React.PointerEvent) => dragApi.startCreate(event, row.id, day)}\n onClick={() => {\n if (!dragApi.takeClick()) onCreate?.(row.id, [day]);\n }}\n >\n {ghost === null ? <AddIcon aria-hidden /> : <Ghost text={ghost} />}\n </Box>\n );\n}\n\nfunction Ghost({ text }: { text: string }): React.JSX.Element {\n return (\n <Box component=\"span\" sx={ghostSx} aria-hidden>\n {text}\n </Box>\n );\n}\n\n/** What fills a cell after its blocks: the \"+\" (or the ghost in it), a lone ghost, or a closed day's label. */\nfunction CellFill({ props, ghost }: { props: CellProps; ghost: string | null }): React.JSX.Element | null {\n const { cell, can } = props;\n if (can.create && isOpen(cell)) return <PlusButton props={props} ghost={ghost} />;\n if (ghost !== null) return <Ghost text={ghost} />;\n if (!cell.blocked || cell.blocks.length > 0 || !cell.blockedLabel) return null;\n return (\n <Box component=\"span\" sx={blockedLabelSx} aria-hidden title={cell.blockedLabel}>\n {cell.blockedLabel}\n </Box>\n );\n}\n\n/** One day of one row: its blocks, a \"+\" when it is empty, the hatch when it is closed. */\nexport function GridCell(props: CellProps): React.JSX.Element {\n const { row, day, column, cell, drag, can, labels, testId } = props;\n const ghost = ghostFor(props);\n const blocked = Boolean(cell.blocked);\n const look = {\n today: Boolean(column.today),\n blocked,\n target: ghost !== null,\n over: drag?.mode === 'move' && drag.moved && drag.rowId === row.id && drag.day === day,\n interactive: can.create && isOpen(cell),\n };\n const closedName = blocked && cell.blocks.length === 0 ? (cell.blockedLabel ?? labels.blockedCell(row.label, column.label)) : undefined;\n return (\n <Box\n role=\"cell\"\n sx={cellSx(look)}\n data-sg-cell=\"\"\n data-sg-row={row.id}\n data-sg-day={day}\n data-testid={`${testId}-cell-${row.id}-${day}`}\n aria-label={closedName}\n >\n {cell.blocks.map((block) => (\n <BlockButton\n key={block.id}\n block={block}\n row={row}\n day={day}\n can={can}\n dragApi={props.dragApi}\n onBlockClick={props.onBlockClick}\n testId={testId}\n />\n ))}\n <CellFill props={props} ghost={ghost} />\n </Box>\n );\n}\n\n/** The first column: the person, as both views draw it. */\nfunction NameCell({ row }: { row: ScheduleGridRow }): React.JSX.Element {\n const sizes = { name: SCHEDULE_GRID_METRICS.rowName, meta: SCHEDULE_GRID_METRICS.rowMeta, chipsTop: 0.5 };\n return <ScheduleNameCell row={row} role=\"rowheader\" sx={nameCellSx} sizes={sizes} />;\n}\n\ninterface HeaderProps {\n columns: readonly ScheduleGridColumn[];\n /** Present when the grid has a last column. */\n totalLabel?: string;\n rowSx: RowSx;\n testId: string;\n}\n\n/** The days, their counts and the total column's header — pinned while the grid scrolls. */\n\n/** A label wraps between words, never inside \"Seg 19/10\": the space before a number holds. */\nfunction keepDatesWhole(label: string): string {\n return label.replace(/ (?=\\d)/g, '\\u00a0');\n}\n\nexport function GridHeader({ columns, totalLabel, rowSx, testId }: HeaderProps): React.JSX.Element {\n return (\n <Box role=\"row\" sx={[rowSx, headerRowSx]} data-testid={`${testId}-header`}>\n {/* Above the names: a cell of the header row, with nothing to head. */}\n <span role=\"cell\" data-sg-corner=\"\" />\n {columns.map((column, day) => (\n <Box role=\"columnheader\" key={`${day}-${column.label}`} sx={headerCellSx(Boolean(column.today))}>\n <span data-sg-col=\"full\" title={column.label}>\n {keepDatesWhole(column.label)}\n </span>\n {column.sublabel ? (\n <Box component=\"span\" sx={headerSublabelSx} data-sg-col=\"sub\">\n {column.sublabel}\n </Box>\n ) : null}\n </Box>\n ))}\n {totalLabel !== undefined ? (\n <Box role=\"columnheader\" sx={totalHeaderSx}>\n {totalLabel}\n </Box>\n ) : null}\n </Box>\n );\n}\n\ninterface BodyProps {\n grid: ScheduleGridProps;\n rows: readonly ScheduleGridRow[];\n rowSx: RowSx;\n hasTotal: boolean;\n can: CellAbilities;\n dragApi: GridDragApi;\n labels: ScheduleGridLabels;\n testId: string;\n}\n\nfunction SkeletonRows({ grid, rowSx, testId }: Pick<BodyProps, 'grid' | 'rowSx' | 'testId'>): React.JSX.Element {\n return (\n <>\n {Array.from({ length: SCHEDULE_GRID_METRICS.skeletonRows }, (_, index) => (\n <Box key={index} sx={[rowSx, personRowSx]} aria-hidden data-testid={`${testId}-loading`}>\n <Box sx={skeletonCellSx} />\n {grid.columns.map((column, day) => (\n <Box key={`${day}-${column.label}`} sx={skeletonCellSx} />\n ))}\n </Box>\n ))}\n </>\n );\n}\n\nfunction PersonRow({ row, body }: { row: ScheduleGridRow; body: BodyProps }): React.JSX.Element {\n const { grid, rowSx, hasTotal, can, dragApi, labels, testId } = body;\n return (\n <Box role=\"row\" sx={[rowSx, personRowSx]} data-testid={`${testId}-row-${row.id}`}>\n <NameCell row={row} />\n {grid.columns.map((column, day) => (\n <GridCell\n key={`${day}-${column.label}`}\n row={row}\n day={day}\n column={column}\n cell={grid.cell(row.id, day)}\n drag={dragApi.drag}\n dragApi={dragApi}\n can={can}\n createPreview={grid.createPreview}\n onCreate={grid.onCreate}\n onBlockClick={grid.onBlockClick}\n labels={labels}\n testId={testId}\n />\n ))}\n {hasTotal ? (\n <Box role=\"cell\" sx={totalCellSx}>\n {row.total}\n </Box>\n ) : null}\n </Box>\n );\n}\n\n/** The host's error or empty node, as the table's one full-width row (a table holds rows only). */\nfunction MessageRow({ children, testId }: { children: React.ReactNode; testId: string }): React.JSX.Element | null {\n if (children === null || children === undefined || children === false) return null;\n return (\n <Box role=\"row\" data-testid={`${testId}-message`}>\n <Box role=\"cell\">{children}</Box>\n </Box>\n );\n}\n\n/** The groups and their rows — or the skeleton, the host's error, or the host's empty state. */\nexport function GridBody(body: BodyProps): React.JSX.Element | null {\n const { grid, rows } = body;\n if (grid.error) return <MessageRow testId={body.testId}>{grid.error}</MessageRow>;\n if (grid.loading) return <SkeletonRows grid={grid} rowSx={body.rowSx} testId={body.testId} />;\n if (rows.length === 0) return <MessageRow testId={body.testId}>{grid.empty}</MessageRow>;\n return (\n <>\n {grid.groups.map((group, index) => (\n <Box role=\"rowgroup\" key={`${index}-${group.title ?? ''}`} aria-label={group.title}>\n {group.title ? (\n <Box component=\"p\" sx={groupTitleSx} aria-hidden data-sg-group-title=\"\">\n {group.title}\n </Box>\n ) : null}\n {group.rows.map((row) => (\n <PersonRow key={row.id} row={row} body={body} />\n ))}\n </Box>\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,aAAa;AACpB,OAAO,SAAS;AAwFP,SA+LL,UA/LK,KAiBL,YAjBK;AA3BT,SAAS,SAAS,OAAiC;AACjD,QAAM,EAAE,MAAM,KAAK,KAAK,MAAM,cAAc,IAAI;AAChD,MAAI,CAAC,QAAQ,KAAK,SAAS,UAAU,KAAK,UAAU,IAAI,MAAM,CAAC,OAAO,IAAI,EAAG,QAAO;AACpF,MAAI,CAAC,YA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{ ScheduleGridCell } from './ScheduleGrid.types';\n\n/**\n * THE GRID'S RULES, as pure functions (FUT-3825): which days a gesture lands\n * on. The host decides everything else — hours, limits, refusals.\n */\n\n/** A cell that can take a new turno: nothing in it and not closed to the row. */\nexport function isOpen(cell: ScheduleGridCell): boolean {\n return !cell.blocked && cell.blocks.length === 0;\n}\n\n/** Every day from `a` to `b` inclusive, in order, whichever is larger. */\nexport function daysBetween(a: number, b: number): number[] {\n const from = Math.min(a, b);\n const to = Math.max(a, b);\n return Array.from({ length: to - from + 1 }, (_, index) => from + index);\n}\n\n/** A create across `anchor…current` of one row: the crossed days that are open (G-R1). */\nexport function createTargets(cellOf: (day: number) => ScheduleGridCell, anchor: number, current: number): number[] {\n return daysBetween(anchor, current).filter((day) => isOpen(cellOf(day)));\n}\n\n/** A copy of the block on `source` across `source…current`: never its own day, never a taken or closed one (G-R2). */\nexport function copyTargets(cellOf: (day: number) => ScheduleGridCell, source: number, current: number): number[] {\n return daysBetween(source, current).filter((day) => day !== source && isOpen(cellOf(day)));\n}\n\n/** A move may land on an open cell that is not its own (G-R3). */\nexport function canDrop(target: ScheduleGridCell, sameCell: boolean): boolean {\n return !sameCell && isOpen(target);\n}\n\n/** The day one step left (-1) or right (+1) of `day`, or `undefined` past either end. */\nexport function stepDay(day: number, direction: -1 | 1, dayCount: number): number | undefined {\n const next = day + direction;\n return next >= 0 && next < dayCount ? next : undefined;\n}\n"],"mappings":";AAQO,SAAS,OAAO,MAAiC;AACtD,SAAO,CAAC,KAAK,WAAW,KAAK,OAAO,WAAW;AACjD;AAGO,SAAS,YAAY,GAAW,GAAqB;AAC1D,QAAM,OAAO,KAAK,IAAI,GAAG,CAAC;AAC1B,QAAM,KAAK,KAAK,IAAI,GAAG,CAAC;AACxB,SAAO,MAAM,KAAK,EAAE,QAAQ,KAAK,OAAO,EAAE,GAAG,CAAC,GAAG,UAAU,OAAO,KAAK;AACzE;AAGO,SAAS,cAAc,QAA2C,QAAgB,SAA2B;AAClH,SAAO,YAAY,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,CAAC,CAAC;AACzE;AAGO,SAAS,YAAY,QAA2C,QAAgB,SAA2B;AAChH,SAAO,YAAY,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,QAAQ,UAAU,OAAO,OAAO,GAAG,CAAC,CAAC;AAC3F;AAGO,SAAS,QAAQ,QAA0B,UAA4B;AAC5E,SAAO,CAAC,YAAY,OAAO,MAAM;AACnC;AAGO,SAAS,QAAQ,KAAa,WAAmB,UAAsC;AAC5F,QAAM,OAAO,MAAM;AACnB,SAAO,QAAQ,KAAK,OAAO,WAAW,OAAO;AAC/C;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/ScheduleGrid/ScheduleGrid.keyboard.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport type { ScheduleGridLabels } from '../../../copy/labels';\nimport { isOpen, stepDay } from './schedule-grid-model';\nimport type { CellAbilities } from './ScheduleGrid.parts';\nimport type { ScheduleGridBlock, ScheduleGridCell, ScheduleGridColumn, ScheduleGridRow } from './ScheduleGrid.types';\n\n/**\n * THE GRID'S KEYBOARD (FUT-3825). Every empty cell's \"+\" and every block is a\n * button in the tab order; on top of that:\n * - arrows move focus to the nearest focusable cell that way;\n * - Shift+←/→ on a copyable block copies it one day;\n * - Alt+←/→ on a movable block moves it one day (focus follows it);\n * either on a block that cannot do it says so (`notMovable`), a taken or\n * closed day is refused; each is read by the live region. With Ctrl or Meta\n * the key is not the grid's.\n */\nexport interface GridKeyContext {\n root: HTMLElement;\n rows: readonly ScheduleGridRow[];\n columns: readonly ScheduleGridColumn[];\n cell: (rowId: string, day: number) => ScheduleGridCell;\n can: CellAbilities;\n onCopy?: (blockId: string, days: number[]) => void;\n onMove?: (blockId: string, toRowId: string, toDay: number) => void;\n labels: ScheduleGridLabels;\n say: (text: string) => void;\n /** Wait for the block at its new day and focus it there. */\n follow: (blockId: string, day: number) => void;\n}\n\n/** Every focusable part of the grid (empty cells' buttons and blocks). */\nexport function focusables(root: HTMLElement): HTMLElement[] {\n return Array.from(root.querySelectorAll<HTMLElement>('[data-sg-focus]'));\n}\n\n/** Focus the first focusable of the cell at (`rowId`, `day`); false when it has none. */\nfunction focusCell(root: HTMLElement, rowId: string, day: number): boolean {\n const target = focusables(root).find((el) => el.dataset.sgRow === rowId && Number(el.dataset.sgDay) === day);\n target?.focus();\n return Boolean(target);\n}\n\ninterface Arrow {\n horizontal: boolean;\n step: -1 | 1;\n}\n\nfunction arrowOf(key: string): Arrow | null {\n if (key === 'ArrowLeft') return { horizontal: true, step: -1 };\n if (key === 'ArrowRight') return { horizontal: true, step: 1 };\n if (key === 'ArrowUp') return { horizontal: false, step: -1 };\n if (key === 'ArrowDown') return { horizontal: false, step: 1 };\n return null;\n}\n\n/** Move focus `arrow`-wards to the nearest cell that has something to focus; a closed or read-only one is passed over. */\nfunction moveFocus(ctx: GridKeyContext, from: HTMLElement, arrow: Arrow): boolean {\n const rowIndex = ctx.rows.findIndex((row) => row.id === from.dataset.sgRow);\n const day = Number(from.dataset.sgDay);\n if (rowIndex < 0) return false;\n for (let distance = 1; ; distance += 1) {\n const offset = arrow.step * distance;\n const nextDay = arrow.horizontal ? day + offset : day;\n const row = ctx.rows[arrow.horizontal ? rowIndex : rowIndex + offset];\n if (!row || nextDay < 0 || nextDay >= ctx.columns.length) return false;\n if (focusCell(ctx.root, row.id, nextDay)) return true;\n }\n}\n\n/** Which gesture a modified arrow asks of this block, if the grid allows it. */\nfunction gestureOf(event: React.KeyboardEvent, block: ScheduleGridBlock, can: CellAbilities): 'copy' | 'move' | null {\n if (event.shiftKey && !event.altKey) return can.copy && block.copyable ? 'copy' : null;\n if (event.altKey && !event.shiftKey) return can.move && block.movable ? 'move' : null;\n return null;\n}\n\n/** The block a key landed on, with its row — or nothing. */\nfunction blockUnder(ctx: GridKeyContext, el: HTMLElement): { block: ScheduleGridBlock; row: ScheduleGridRow; day: number } | null {\n const rowId = el.dataset.sgRow ?? '';\n const day = Number(el.dataset.sgDay);\n const block = ctx.cell(rowId, day).blocks.find((entry) => entry.id === el.dataset.sgBlock);\n const row = ctx.rows.find((entry) => entry.id === rowId);\n return block && row ? { block, row, day } : null;\n}\n\n/** The open day one step away, with its column — or nothing past either end or on a taken / closed day. */\nfunction openNeighbour(ctx: GridKeyContext, rowId: string, day: number, step: -1 | 1) {\n const target = stepDay(day, step, ctx.columns.length);\n if (target === undefined) return null;\n const column = ctx.columns[target];\n return column && isOpen(ctx.cell(rowId, target)) ? { day: target, column } : null;\n}\n\n/**\n * Shift/Alt+←/→ on a block. Returns whether the key was the grid's: a block\n * that cannot be copied or moved that way refuses it aloud, and the key goes\n * no further (Alt+← would otherwise be the browser's Back).\n */\nfunction blockKey(ctx: GridKeyContext, el: HTMLElement, event: React.KeyboardEvent, step: -1 | 1): boolean {\n const under = blockUnder(ctx, el);\n if (!under) return false;\n const gesture = gestureOf(event, under.block, ctx.can);\n const { block, row, day } = under;\n const target = gesture ? openNeighbour(ctx, row.id, day, step) : null;\n if (!gesture) {\n ctx.say(ctx.labels.notMovable);\n } else if (!target) {\n ctx.say(ctx.labels.refused);\n } else if (gesture === 'copy') {\n ctx.onCopy?.(block.id, [target.day]);\n ctx.say(ctx.labels.copied(block.label, target.column.label));\n } else {\n ctx.follow(block.id, target.day);\n ctx.onMove?.(block.id, row.id, target.day);\n ctx.say(ctx.labels.moved(block.label, row.label, target.column.label));\n }\n return true;\n}\n\n/** Shift OR Alt (not both) and no Ctrl or Meta: a key the grid answers for a block, as the ruler does. */\nconst isBlockGesture = (event: React.KeyboardEvent): boolean =>\n event.shiftKey !== event.altKey && !event.ctrlKey && !event.metaKey;\n\nconst hasModifier = (event: React.KeyboardEvent): boolean => event.shiftKey || event.altKey || event.ctrlKey || event.metaKey;\n\n/** The grid's `onKeyDown`. */\nexport function handleGridKey(event: React.KeyboardEvent, ctx: GridKeyContext): void {\n const el = (event.target as HTMLElement).closest<HTMLElement>('[data-sg-focus]');\n const arrow = arrowOf(event.key);\n if (!el || !arrow) return;\n const onBlock = el.dataset.sgBlock !== undefined;\n if (onBlock && arrow.horizontal && isBlockGesture(event)) {\n if (blockKey(ctx, el, event, arrow.step)) event.preventDefault();\n return;\n }\n if (!hasModifier(event) && moveFocus(ctx, el, arrow)) event.preventDefault();\n}\n"],"mappings":";;;;;;AAgCO,SAAS,WAAW,MAAkC;AAC3D,SAAO,MAAM,KAAK,KAAK,iBAA8B,iBAAiB,CAAC;AACzE;AAGA,SAAS,UAAU,MAAmB,OAAe,KAAsB;AACzE,QAAM,SAAS,WAAW,IAAI,EAAE,KAAK,CAAC,OAAO,GAAG,QAAQ,UAAU,SAAS,OAAO,GAAG,QAAQ,KAAK,MAAM,GAAG;AAC3G,UAAQ,MAAM;AACd,SAAO,QAAQ,MAAM;AACvB;AAOA,SAAS,QAAQ,KAA2B;AAC1C,MAAI,QAAQ,YAAa,QAAO,EAAE,YAAY,MAAM,MAAM,GAAG;AAC7D,MAAI,QAAQ,aAAc,QAAO,EAAE,YAAY,MAAM,MAAM,EAAE;AAC7D,MAAI,QAAQ,UAAW,QAAO,EAAE,YAAY,OAAO,MAAM,GAAG;AAC5D,MAAI,QAAQ,YAAa,QAAO,EAAE,YAAY,OAAO,MAAM,EAAE;AAC7D,SAAO;AACT;AAGA,SAAS,UAAU,KAAqB,MAAmB,OAAuB;AAChF,QAAM,WAAW,IAAI,KAAK,UAAU,CAAC,QAAQ,IAAI,OAAO,KAAK,QAAQ,KAAK;AAC1E,QAAM,MAAM,OAAO,KAAK,QAAQ,KAAK;AACrC,MAAI,WAAW,EAAG,QAAO;AACzB,WAAS,WAAW,KAAK,YAAY,GAAG;AACtC,UAAM,SAAS,MAAM,OAAO;AAC5B,UAAM,UAAU,MAAM,aAAa,MAAM,SAAS;AAClD,UAAM,MAAM,IAAI,KAAK,MAAM,aAAa,WAAW,WAAW,MAAM;AACpE,QAAI,CAAC,OAAO,UAAU,KAAK,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["../src/components/data-display/ScheduleGrid/ScheduleGrid.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/index.js';\nimport React, { useEffect, useRef } from 'react';\n\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { resolveLabels } from '../../../utils/resolve-labels';\nimport { focusables, handleGridKey } from './ScheduleGrid.keyboard';\nimport { GridBody, GridHeader, type CellAbilities } from './ScheduleGrid.parts';\nimport { frameSx, headerSx, rootSx, rowGridSx, scrollSx, SR_ONLY_SX } from './ScheduleGrid.styles';\nimport type { ScheduleGridProps } from './ScheduleGrid.types';\nimport { useAnnouncer } from './useAnnouncer';\nimport { useGridDrag } from './useGridDrag';\nimport { useSidewaysScroll } from './useSidewaysScroll';\n\n/**\n * After a keyboard move the host re-renders the block in its new cell (a new\n * element): focus follows it there. After a create on an empty day's \"+\" (Enter,\n * Space or a click) the \"+\" gives way to the host's new block: focus moves to\n * it, so the arrows go on from there — after a click without scrolling. A host\n * that refused keeps focus where it was; the next key or pointer press forgets\n * the wait.\n */\ntype FollowTarget = { kind: 'move'; id: string; day: number } | { kind: 'create'; row: string; day: number; pointer: boolean };\n\n/** The empty day's \"+\" an event landed on, if any. */\nfunction plusOf(target: EventTarget): HTMLElement | null {\n if (!(target instanceof HTMLElement)) return null;\n const plus = target.closest<HTMLElement>('button[data-sg-focus]');\n return plus && plus.dataset.sgBlock === undefined && plus.dataset.sgRow !== undefined ? plus : null;\n}\n\nfunction useFollowFocus(rootRef: React.RefObject<HTMLElement | null>) {\n const pending = useRef<FollowTarget | null>(null);\n useEffect(() => {\n const follow = pending.current;\n if (!follow || !rootRef.current) return;\n const block = focusables(rootRef.current).find((el) =>\n Number(el.dataset.sgDay) !== follow.day || el.dataset.sgBlock === undefined\n ? false\n : follow.kind === 'move'\n ? el.dataset.sgBlock === follow.id\n : el.dataset.sgRow === follow.row,\n );\n if (!block) return;\n // After a click the cell stays where the pointer left it: no scroll at all (FUT-3825 R1).\n block.focus(follow.kind === 'create' && follow.pointer ? { preventScroll: true } : undefined);\n pending.current = null;\n });\n return {\n follow: (id: string, day: number): void => {\n pending.current = { kind: 'move', id, day };\n },\n /** A key that presses an empty day's \"+\" (its click creates there). */\n followCreate: (event: React.KeyboardEvent): void => {\n const plus = plusOf(event.target);\n if ((event.key !== 'Enter' && event.key !== ' ') || !plus?.dataset.sgRow) return;\n pending.current = { kind: 'create', row: plus.dataset.sgRow, day: Number(plus.dataset.sgDay), pointer: false };\n },\n /** A pointer click on an empty day's \"+\" (a key's click, `detail` 0, is the key's). */\n followClickCreate: (event: React.MouseEvent): void => {\n const plus = plusOf(event.target);\n if (event.detail === 0 || !plus?.dataset.sgRow) return;\n pending.current = { kind: 'create', row: plus.dataset.sgRow, day: Number(plus.dataset.sgDay), pointer: true };\n },\n forget: (): void => {\n pending.current = null;\n },\n };\n}\n\nfunction abilitiesOf(props: ScheduleGridProps): CellAbilities {\n const open = !props.readOnly && !props.loading;\n return { create: open && Boolean(props.onCreate), copy: open && Boolean(props.onCopy), move: open && Boolean(props.onMove) };\n}\n\n/**\n * People (or resources) as rows, days as columns, and blocks with a start and\n * an end in the cells — the week grid of a staff schedule (FUT-3825).\n *\n * Click an empty cell to create on that day; drag across empty cells of a row\n * to create on each; drag a block's edge grip along its row to copy it; drag\n * its middle to move it to another day or row; click it to open it. Touch\n * scrolls and never drags. Every gesture has a keyboard twin.\n *\n * The grid reports gestures; the hours, limits and refusals are the host's.\n */\nexport function ScheduleGrid(props: ScheduleGridProps): React.JSX.Element {\n const { columns, groups, cell, onCreate, onCopy, onMove } = props;\n const testId = props.dataTestId ?? 'schedule-grid';\n const labels = resolveLabels(EN_US_UI_LABELS.scheduleGrid, props.labels);\n const rootRef = useRef<HTMLDivElement | null>(null);\n const { text: announcement, say } = useAnnouncer();\n const focus = useFollowFocus(rootRef);\n const dragApi = useGridDrag(rootRef, { cell, onCreate, onCopy, onMove });\n const can = abilitiesOf(props);\n const rows = groups.flatMap((group) => group.rows);\n const hasTotal = props.totalLabel !== undefined || rows.some((row) => row.total !== undefined);\n const rowSx = rowGridSx(columns.length, hasTotal);\n\n const headRef = useRef<HTMLDivElement | null>(null);\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const sideways = useSidewaysScroll(headRef, bodyRef);\n\n const onKeyDown = (event: React.KeyboardEvent): void => {\n sideways.release();\n focus.forget();\n if (!rootRef.current) return;\n if (can.create) focus.followCreate(event);\n handleGridKey(event, { root: rootRef.current, rows, columns, cell, can, onCopy, onMove, labels, say, follow: focus.follow });\n };\n\n return (\n <Box sx={rootSx} data-testid={testId}>\n <Box\n ref={rootRef}\n role=\"table\"\n aria-label={props['aria-label']}\n aria-busy={props.loading || undefined}\n aria-description={props.loading ? labels.loading : undefined}\n sx={frameSx(columns.length, hasTotal)}\n onKeyDown={onKeyDown}\n onPointerDownCapture={focus.forget}\n onClickCapture={can.create ? focus.followClickCreate : undefined}\n >\n {/* The header row sits outside the sideways scroller, so it sticks to the page; it follows the days sideways. */}\n <Box ref={headRef} role=\"none\" sx={headerSx(props.stickyTop ?? 0)} data-sg-head=\"\" data-testid={`${testId}-head`} onWheel={sideways.forwardWheel}>\n <GridHeader columns={columns} totalLabel={hasTotal ? (props.totalLabel ?? '') : undefined} rowSx={rowSx} testId={testId} />\n </Box>\n <Box ref={bodyRef} role=\"none\" sx={scrollSx} data-sg-scroll=\"\" data-testid={`${testId}-scroll`} onScroll={sideways.follow}\n onFocus={sideways.bringOut}\n onPointerDownCapture={sideways.press}\n >\n <GridBody grid={props} rows={rows} rowSx={rowSx} hasTotal={hasTotal} can={can} dragApi={dragApi} labels={labels} testId={testId} />\n </Box>\n </Box>\n <Box sx={SR_ONLY_SX} aria-live=\"polite\" role=\"status\" data-testid={`${testId}-live`}>\n {announcement}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,SAAS;AAChB,SAAgB,WAAW,cAAc;AA+GnC,SAaI,KAbJ;AAxFN,SAAS,OAA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