@12-apps/ui 6.97.1 → 6.98.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 +5 -5
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- 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.chrome.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.js +6 -6
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +7 -7
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +51 -51
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +66 -66
- 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 +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +32 -32
- 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 +48 -48
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +31 -31
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +29 -29
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +30 -30
- package/dist/_internal/components/data-display/DataViews/data-views-preset-chips.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-range-bounds.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-range-calendar.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +10 -10
- 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 +9 -9
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +2 -2
- package/dist/_internal/components/data-display/DayRuler/DayRuler.js +7 -7
- package/dist/_internal/components/data-display/DayRuler/DayRuler.parts.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.fixtures.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +12 -12
- 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 +3 -3
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapControlBar.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +6 -6
- package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapPreview.helpers.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +8 -8
- package/dist/_internal/components/data-display/RegionMap/RegionMap.js +5 -5
- package/dist/_internal/components/data-display/RegionMap/RegionMapDrawing.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.js +6 -6
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.labels.js +2 -2
- 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.hooks.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +6 -6
- 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 +4 -4
- 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 +86 -86
- 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/Modal/Modal.js +2 -2
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.frame.js +3 -3
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +4 -4
- package/dist/_internal/components/feedback/Sonner/Sonner.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +4 -4
- 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/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/UsableModal/UsableModal.js +1 -1
- package/dist/_internal/components/feedback/UsableModal/UsableModal.modal.js +4 -4
- package/dist/_internal/components/feedback/UsableModal/UsableModal.sheet.js +6 -6
- package/dist/_internal/components/feedback/index.js +21 -21
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.band.js +1 -1
- package/dist/_internal/components/form/Calendar/Calendar.helpers.js +1 -1
- package/dist/_internal/components/form/Calendar/Calendar.hooks.js +1 -1
- package/dist/_internal/components/form/Calendar/Calendar.js +10 -10
- package/dist/_internal/components/form/Calendar/CalendarDay.js +2 -2
- package/dist/_internal/components/form/Calendar/CalendarDayCell.js +3 -3
- package/dist/_internal/components/form/Calendar/CalendarMonth.js +10 -6
- package/dist/_internal/components/form/Calendar/CalendarSelectorsMonth.js +6 -6
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +4 -4
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- 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.frame.js +22 -0
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.frame.js.map +1 -0
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +20 -15
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.layout.js +13 -0
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.layout.js.map +1 -0
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +4 -4
- 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 +37 -34
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/index.js +6 -6
- package/dist/_internal/components/form/total-form/FormErrorSnackbar.js +3 -3
- package/dist/_internal/components/index.js +164 -162
- 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 +8 -8
- 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/Tabs/Tabs.js +1 -1
- package/dist/_internal/components/navigation/index.js +18 -18
- 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.data-display.js +2 -2
- package/dist/_internal/en-US.labels.js +1 -1
- package/dist/_internal/pt-BR.data-display.js +2 -2
- 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 +6 -6
- package/dist/charts.js +17 -17
- package/dist/{chunk-UBVKMM3V.js → chunk-2A5GHOL3.js} +2 -2
- package/dist/{chunk-YGLAGY74.js → chunk-332KWE5H.js} +2 -2
- package/dist/{chunk-HNEZWVDR.js → chunk-364NT46L.js} +3 -3
- package/dist/{chunk-RLTGD5WJ.js → chunk-3AKQHYTM.js} +4 -4
- package/dist/{chunk-5I75WRXT.js → chunk-3CXRHRGE.js} +7 -7
- package/dist/{chunk-G6NMSBSQ.js → chunk-3LD42RNV.js} +2 -2
- package/dist/{chunk-3BMG6VMB.js → chunk-3N2HWNKT.js} +2 -2
- package/dist/{chunk-MSJP2AEN.js → chunk-3N3W4TID.js} +2 -2
- package/dist/{chunk-H2UUMZQR.js → chunk-3PWDVJWD.js} +2 -1
- package/dist/chunk-3PWDVJWD.js.map +1 -0
- package/dist/{chunk-YNVTUQ5B.js → chunk-3V7OTBUZ.js} +2 -2
- package/dist/{chunk-LZNUBQ5I.js → chunk-4A454JZN.js} +2 -2
- package/dist/{chunk-TPMT3J32.js → chunk-4I2SDWSF.js} +2 -1
- package/dist/chunk-4I2SDWSF.js.map +1 -0
- package/dist/{chunk-SW7JCF4Z.js → chunk-4P63RSSY.js} +2 -2
- package/dist/{chunk-7QKFMMWK.js → chunk-4W4C4Q46.js} +2 -2
- package/dist/{chunk-B32XH7NK.js → chunk-4WVUX7IU.js} +3 -3
- package/dist/{chunk-Z6QFIRD7.js → chunk-4X2TOMK6.js} +7 -7
- package/dist/{chunk-MYTV353T.js → chunk-4Y3QLISA.js} +2 -2
- package/dist/{chunk-IMYKJTVX.js → chunk-5J6LN2O7.js} +2 -2
- package/dist/{chunk-QWI7IPYJ.js → chunk-5V7IZBRY.js} +4 -4
- package/dist/{chunk-ZBUMGMWP.js → chunk-64LNNC54.js} +4 -4
- package/dist/{chunk-T77OVQEO.js → chunk-6D7CASMK.js} +2 -2
- package/dist/{chunk-YVDNCV2D.js → chunk-6RYSSNOO.js} +3 -3
- package/dist/{chunk-CPQJFHNZ.js → chunk-74IH3ZGD.js} +2 -2
- package/dist/{chunk-UQ5GJPVZ.js → chunk-76GAXLNC.js} +3 -3
- package/dist/{chunk-X4J576GR.js → chunk-7LFST3PW.js} +2 -2
- package/dist/{chunk-XCUHGPPZ.js → chunk-7MLT66DE.js} +2 -2
- package/dist/{chunk-EOIRU62W.js → chunk-7P544IWT.js} +3 -3
- package/dist/{chunk-XTYBJAZG.js → chunk-7TENMQNQ.js} +7 -7
- package/dist/{chunk-EB25XITI.js → chunk-A27J4CIZ.js} +10 -10
- package/dist/{chunk-2KSFBZ2H.js → chunk-ABZJNKR6.js} +2 -2
- package/dist/{chunk-6LOWZCH7.js → chunk-AHXQN4VL.js} +2 -2
- package/dist/{chunk-Y7BOP7VZ.js → chunk-AP7GEUJS.js} +2 -2
- package/dist/{chunk-U2SAW6DH.js → chunk-B4OZU7J4.js} +7 -7
- package/dist/{chunk-DDGYTY4E.js → chunk-BIHZXB5P.js} +4 -4
- package/dist/{chunk-4QGMUHAU.js → chunk-BWNZVMBT.js} +2 -2
- package/dist/{chunk-CY4XIZNW.js → chunk-CAH5XNHT.js} +2 -2
- package/dist/{chunk-KILA7LCC.js → chunk-CFDWKQZT.js} +4 -4
- package/dist/{chunk-EWFBDAB7.js → chunk-CKGRSCRT.js} +2 -2
- package/dist/{chunk-YOLLISEY.js → chunk-CRD2WCU7.js} +9 -9
- package/dist/{chunk-L5KPBMMF.js → chunk-CXL3TT3K.js} +2 -2
- package/dist/{chunk-KOGJBAFI.js → chunk-D3KLIC5N.js} +2 -2
- package/dist/{chunk-2SBQ47RI.js → chunk-D4JL5725.js} +3 -3
- package/dist/{chunk-NI3MC742.js → chunk-DBJLYURK.js} +2 -2
- package/dist/{chunk-75GAQL2Q.js → chunk-DKPELKGL.js} +12 -12
- package/dist/{chunk-NGXL4R54.js → chunk-E4MJA52O.js} +4 -4
- package/dist/{chunk-QSOCOXVL.js → chunk-EASEJDBQ.js} +13 -8
- package/dist/chunk-EASEJDBQ.js.map +1 -0
- package/dist/{chunk-5HXVXW22.js → chunk-EGBQR5GH.js} +5 -5
- package/dist/{chunk-FTYOCFTV.js → chunk-EGYJUJMR.js} +2 -2
- package/dist/{chunk-7XSCEHGA.js → chunk-EOQ6EKTS.js} +7 -7
- package/dist/{chunk-6AKDAQSS.js → chunk-ERAMSYPR.js} +2 -2
- package/dist/{chunk-WYRH6OSN.js → chunk-F5EH5BJN.js} +2 -2
- package/dist/{chunk-HBRBIPNF.js → chunk-F7JRQ2EI.js} +6 -6
- package/dist/chunk-F7JRQ2EI.js.map +1 -0
- package/dist/{chunk-QCYQL3ST.js → chunk-FJLPVPRG.js} +2 -2
- package/dist/{chunk-MAHY7PK3.js → chunk-FQMLTCXT.js} +4 -4
- package/dist/{chunk-TMINUTQQ.js → chunk-FRQGZIYU.js} +2 -2
- package/dist/{chunk-LV6AD6XC.js → chunk-FT3LJZWZ.js} +2 -2
- package/dist/{chunk-IS3L67TF.js → chunk-FW5GTAUY.js} +6 -6
- package/dist/{chunk-VMTOLAZ5.js → chunk-FZZMNKVF.js} +5 -5
- package/dist/{chunk-FGZIEZEP.js → chunk-G6TKWNF2.js} +4 -4
- package/dist/{chunk-I6IFUFLW.js → chunk-G7MHDZTL.js} +2 -2
- package/dist/{chunk-KES3HNSU.js → chunk-GB2DQOZ7.js} +2 -2
- package/dist/{chunk-W3IFJA35.js → chunk-GFYDOH7D.js} +3 -3
- package/dist/{chunk-M2M4IDFU.js → chunk-GXYOBTOY.js} +2 -2
- package/dist/{chunk-OLHAUGVQ.js → chunk-GZQQSTKR.js} +2 -2
- package/dist/{chunk-N2J24TJ3.js → chunk-HAWOS4SF.js} +2 -2
- package/dist/{chunk-S2VZUBM7.js → chunk-HCTHY66U.js} +6 -6
- package/dist/{chunk-ABVIMFSD.js → chunk-HG52QQ2L.js} +2 -2
- package/dist/{chunk-AMLHEKSV.js → chunk-HI7JPDD6.js} +5 -5
- package/dist/{chunk-F5OERPU4.js → chunk-HOWAMSUY.js} +6 -6
- package/dist/{chunk-3TZUZXY5.js → chunk-HTXYBKLK.js} +2 -2
- package/dist/{chunk-WW3F7DCX.js → chunk-IFOHCY4O.js} +2 -2
- package/dist/{chunk-S46LGAQ2.js → chunk-IJVBLU25.js} +2 -2
- package/dist/{chunk-ARGVUTTL.js → chunk-IPVGWENM.js} +2 -2
- package/dist/{chunk-MPWA55CF.js → chunk-IXXB7CTR.js} +9 -5
- package/dist/chunk-IXXB7CTR.js.map +1 -0
- package/dist/{chunk-MWXZXCVX.js → chunk-J43PARXM.js} +6 -6
- package/dist/{chunk-UYKIUUWP.js → chunk-JJTJ7DCV.js} +2 -2
- package/dist/{chunk-HQCZT6TO.js → chunk-JVOEVTCZ.js} +5 -5
- package/dist/{chunk-RZ3P4X2I.js → chunk-K62L5JFC.js} +25 -4
- package/dist/chunk-K62L5JFC.js.map +1 -0
- package/dist/{chunk-2365CQJU.js → chunk-KAQDWEG6.js} +2 -2
- package/dist/{chunk-TB5CRHTF.js → chunk-KEPLO2AB.js} +2 -2
- package/dist/chunk-KNW63H63.js +263 -0
- package/dist/chunk-KNW63H63.js.map +1 -0
- package/dist/{chunk-PVIQDBUN.js → chunk-KUQ4XHVV.js} +2 -2
- package/dist/{chunk-DAFFZED3.js → chunk-KWBMM6MJ.js} +2 -2
- package/dist/{chunk-QPCHABOZ.js → chunk-L5YGVLPH.js} +8 -4
- package/dist/chunk-L5YGVLPH.js.map +1 -0
- package/dist/{chunk-JJYECKEL.js → chunk-LFECE4R7.js} +2 -2
- package/dist/{chunk-LXIPBHNJ.js → chunk-LKTJ26ST.js} +2 -2
- package/dist/{chunk-56JF5PZK.js → chunk-LYVTJLCF.js} +4 -4
- package/dist/{chunk-EYFDIUVR.js → chunk-M4G4LRQK.js} +2 -2
- package/dist/{chunk-TJUWSQYQ.js → chunk-MDU5Q2HW.js} +3 -2
- package/dist/{chunk-TJUWSQYQ.js.map → chunk-MDU5Q2HW.js.map} +1 -1
- package/dist/{chunk-KMMFN24G.js → chunk-MKHNLRVX.js} +4 -4
- package/dist/{chunk-4IG73U2X.js → chunk-MSPLIRBH.js} +2 -2
- package/dist/{chunk-55MYYWOV.js → chunk-O4UXH7BM.js} +7 -7
- package/dist/{chunk-DYHOBKPU.js → chunk-OA6T2ME3.js} +5 -5
- package/dist/{chunk-VNMD6BA4.js → chunk-OFRQMFWD.js} +3 -3
- package/dist/{chunk-LTJC7TGB.js → chunk-OHA2PAAA.js} +2 -2
- package/dist/{chunk-ZANWHTXH.js → chunk-OVJV2ZN7.js} +2 -2
- package/dist/{chunk-SKQPUAMK.js → chunk-PDWQJFMK.js} +6 -6
- package/dist/{chunk-6EZQLNPK.js → chunk-PGJIWCQR.js} +4 -4
- package/dist/{chunk-FRAFGRRD.js → chunk-PIELY4BJ.js} +1 -1
- package/dist/{chunk-3Z6JX7UN.js → chunk-PZJEF232.js} +2 -2
- package/dist/{chunk-6ATXOJVQ.js → chunk-QADTI63U.js} +4 -4
- package/dist/chunk-QAF76E6U.js +43 -0
- package/dist/chunk-QAF76E6U.js.map +1 -0
- package/dist/{chunk-4RF4BALN.js → chunk-R775ISK6.js} +4 -4
- package/dist/{chunk-YBAK2WN5.js → chunk-RFMQBIE6.js} +4 -4
- package/dist/{chunk-43EFQ3DU.js → chunk-RVBLOR32.js} +2 -2
- package/dist/{chunk-XNAI7QGU.js → chunk-SA3KLZDZ.js} +5 -5
- package/dist/{chunk-CAOL4AIB.js → chunk-SARK3GHS.js} +2 -2
- package/dist/chunk-SIY64A6O.js +60 -0
- package/dist/chunk-SIY64A6O.js.map +1 -0
- package/dist/{chunk-CQOJUYTT.js → chunk-SOXO2VN3.js} +3 -3
- package/dist/{chunk-6PU5P7QT.js → chunk-TDXEWGY2.js} +2 -2
- package/dist/{chunk-SB2SEGR6.js → chunk-TIM4PXWN.js} +3 -3
- package/dist/{chunk-OGSTMHT6.js → chunk-TTBLQZVT.js} +3 -3
- package/dist/{chunk-GTE4TW3W.js → chunk-U4PV2ZKK.js} +6 -6
- package/dist/{chunk-VHE7UEG5.js → chunk-UC7DLGMP.js} +2 -2
- package/dist/{chunk-TI4FGQYV.js → chunk-UHLGJHTD.js} +2 -2
- package/dist/{chunk-TAHO2LCU.js → chunk-UIZIEU4X.js} +3 -3
- package/dist/{chunk-F7LBTMCA.js → chunk-ULC4SCFC.js} +2 -2
- package/dist/{chunk-FORQEHRQ.js → chunk-UXVWGNPG.js} +2 -2
- package/dist/{chunk-3ZRK3BRN.js → chunk-UXYCBPCE.js} +12 -6
- package/dist/chunk-UXYCBPCE.js.map +1 -0
- package/dist/{chunk-L6YTVXGN.js → chunk-VCYYL23C.js} +4 -2
- package/dist/{chunk-L6YTVXGN.js.map → chunk-VCYYL23C.js.map} +1 -1
- package/dist/{chunk-KF3Q3C3P.js → chunk-VGIBWJ72.js} +2 -2
- package/dist/{chunk-I54YFYBS.js → chunk-VMACQT3T.js} +3 -3
- package/dist/{chunk-XOXXG7Q5.js → chunk-VWKMN3ZZ.js} +3 -2
- package/dist/{chunk-XOXXG7Q5.js.map → chunk-VWKMN3ZZ.js.map} +1 -1
- package/dist/{chunk-EXEBN5ZP.js → chunk-W56KN53D.js} +8 -8
- package/dist/{chunk-KURE5R7Z.js → chunk-WGK7VNCO.js} +2 -2
- package/dist/{chunk-UIS3E72B.js → chunk-WK577LQL.js} +3 -3
- package/dist/{chunk-G3WG77QY.js → chunk-WN6LR4HX.js} +21 -6
- package/dist/chunk-WN6LR4HX.js.map +1 -0
- package/dist/{chunk-LLPPIO3K.js → chunk-WNTXHLVJ.js} +2 -2
- package/dist/{chunk-PEVBSNCD.js → chunk-WPRQPKLV.js} +2 -2
- package/dist/{chunk-C347NNZJ.js → chunk-WVCHMTPG.js} +2 -2
- package/dist/{chunk-CSD6SWBZ.js → chunk-WYNGH2WL.js} +6 -6
- package/dist/{chunk-4L54KUZV.js → chunk-X5GCAXZS.js} +38 -16
- package/dist/chunk-X5GCAXZS.js.map +1 -0
- package/dist/{chunk-PJDAZG65.js → chunk-XA5ES25V.js} +3 -3
- package/dist/{chunk-FWTVIRZZ.js → chunk-YLZXIR6B.js} +4 -4
- package/dist/{chunk-STOZ6JB5.js → chunk-YQMJJ7AL.js} +33 -16
- package/dist/chunk-YQMJJ7AL.js.map +1 -0
- package/dist/{chunk-JOQGKXR5.js → chunk-Z2J4MRTF.js} +4 -4
- package/dist/{chunk-I4K5JMS4.js → chunk-ZDLC4BN4.js} +4 -2
- package/dist/chunk-ZDLC4BN4.js.map +1 -0
- package/dist/{chunk-USHVG4UQ.js → chunk-ZKVSFVIA.js} +3 -3
- package/dist/{chunk-TE6HAWDM.js → chunk-ZP2GPRNQ.js} +2 -2
- package/dist/{chunk-3PQL2EN5.js → chunk-ZW7Q3IRL.js} +6 -6
- package/dist/{chunk-M5Y42AZ4.js → chunk-ZX4ORMBC.js} +2 -2
- package/dist/data-display/AlertDialog.js +3 -3
- package/dist/data-display/AsyncStateContainer.js +5 -5
- package/dist/data-display/Avatar.js +5 -5
- package/dist/data-display/CardKit.js +12 -12
- package/dist/data-display/Carousel.js +6 -6
- package/dist/data-display/Chart.js +17 -17
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +72 -72
- package/dist/data-display/DayRuler.js +11 -11
- package/dist/data-display/EmptyState.js +2 -2
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/FleetMap.js +12 -12
- package/dist/data-display/HoverCard.js +3 -3
- package/dist/data-display/LazyImage.js +2 -2
- package/dist/data-display/Lightbox.js +3 -3
- 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 +10 -10
- package/dist/data-display/SectionOnboarding.js +4 -4
- package/dist/data-display/Sheet.js +6 -6
- package/dist/data-display/Stepper.js +2 -2
- package/dist/data-display/Table.js +4 -4
- package/dist/data-display/Timeline.js +2 -2
- package/dist/en-US.js +2 -2
- package/dist/feedback/ConfirmAction.js +9 -9
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/Modal.js +2 -2
- package/dist/feedback/SequenceResolver.js +4 -4
- package/dist/feedback/Sonner.js +2 -2
- package/dist/feedback/StackedModal.js +4 -4
- package/dist/feedback/Toast.js +2 -2
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/feedback/UsableModal.js +1 -1
- package/dist/form/AddressAutocomplete.js +7 -7
- package/dist/form/Autocomplete.js +2 -2
- package/dist/form/Calendar.js +10 -10
- package/dist/form/CategorySelect.js +4 -4
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/Command.js +4 -4
- package/dist/form/DateRangePicker.js +20 -15
- package/dist/form/RichTextEditor.js +5 -5
- package/dist/form/total-form.js +9 -9
- 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 +4 -4
- package/dist/native/chunks/{chunk-QHW7JEPZ.js → chunk-O76COY56.js} +3 -2
- package/dist/native/chunks/{chunk-QHW7JEPZ.js.map → chunk-O76COY56.js.map} +1 -1
- package/dist/native/chunks/{chunk-FXA5DLKR.js → chunk-UQ272RI2.js} +3 -3
- package/dist/native/chunks/{chunk-IN3XZ7EK.js → chunk-X65TVC3B.js} +2 -2
- 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 +10 -10
- package/dist/navigation/Breadcrumbs.js +2 -2
- package/dist/navigation/NavigationMenu.js +3 -3
- package/dist/navigation/SectionNav.js +5 -5
- package/dist/navigation/Tabs.js +1 -1
- package/dist/pt-BR.js +2 -2
- package/dist/social-login-button.js +2 -2
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts +3 -1
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.band.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.hooks.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.types.d.ts +24 -1
- package/dist/types/components/form/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/CalendarDay.d.ts +6 -0
- package/dist/types/components/form/Calendar/CalendarDay.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/CalendarDayCell.d.ts +11 -1
- package/dist/types/components/form/Calendar/CalendarDayCell.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/CalendarMonth.d.ts +22 -0
- package/dist/types/components/form/Calendar/CalendarMonth.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/index.d.ts +1 -1
- package/dist/types/components/form/Calendar/index.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.frame.d.ts +93 -0
- package/dist/types/components/form/DateRangePicker/DateRangePicker.frame.d.ts.map +1 -0
- package/dist/types/components/form/DateRangePicker/DateRangePicker.hooks.d.ts +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.hooks.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.layout.d.ts +27 -0
- package/dist/types/components/form/DateRangePicker/DateRangePicker.layout.d.ts.map +1 -0
- package/dist/types/components/form/DateRangePicker/DateRangePicker.range.d.ts +8 -2
- package/dist/types/components/form/DateRangePicker/DateRangePicker.range.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.types.d.ts +90 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.types.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePickerFields.d.ts +7 -1
- package/dist/types/components/form/DateRangePicker/DateRangePickerFields.d.ts.map +1 -1
- package/dist/types/components/navigation/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/components/navigation/Tabs/Tabs.types.d.ts +18 -3
- package/dist/types/components/navigation/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/types/copy/labels.d.ts +6 -0
- 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 +6 -0
- 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 +6 -6
- 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/DataViews/data-views-day-input.tsx +4 -0
- package/src/components/form/Calendar/Calendar.band.ts +3 -0
- package/src/components/form/Calendar/Calendar.helpers.ts +2 -0
- package/src/components/form/Calendar/Calendar.hooks.ts +4 -2
- package/src/components/form/Calendar/Calendar.md +12 -1
- package/src/components/form/Calendar/Calendar.tsx +30 -10
- package/src/components/form/Calendar/Calendar.types.ts +27 -1
- package/src/components/form/Calendar/CalendarDay.tsx +85 -13
- package/src/components/form/Calendar/CalendarDayCell.tsx +17 -1
- package/src/components/form/Calendar/CalendarMonth.tsx +40 -4
- package/src/components/form/Calendar/CalendarSelectorsMonth.tsx +2 -2
- package/src/components/form/Calendar/index.ts +1 -0
- package/src/components/form/DateRangePicker/DateRangePicker.frame.ts +92 -0
- package/src/components/form/DateRangePicker/DateRangePicker.hooks.ts +43 -1
- package/src/components/form/DateRangePicker/DateRangePicker.layout.ts +69 -0
- package/src/components/form/DateRangePicker/DateRangePicker.md +77 -2
- package/src/components/form/DateRangePicker/DateRangePicker.range.ts +10 -2
- package/src/components/form/DateRangePicker/DateRangePicker.tsx +177 -57
- package/src/components/form/DateRangePicker/DateRangePicker.types.ts +88 -1
- package/src/components/form/DateRangePicker/DateRangePickerFields.tsx +13 -2
- package/src/components/navigation/Tabs/Tabs.md +22 -1
- package/src/components/navigation/Tabs/Tabs.tsx +25 -9
- package/src/components/navigation/Tabs/Tabs.types.ts +18 -2
- package/src/copy/labels.ts +6 -0
- package/src/en-US.labels.ts +1 -0
- package/src/pt-BR.labels.ts +1 -0
- package/dist/chunk-3CSKB57B.js +0 -184
- package/dist/chunk-3CSKB57B.js.map +0 -1
- package/dist/chunk-3ZRK3BRN.js.map +0 -1
- package/dist/chunk-4L54KUZV.js.map +0 -1
- package/dist/chunk-G3WG77QY.js.map +0 -1
- package/dist/chunk-H2UUMZQR.js.map +0 -1
- package/dist/chunk-HBRBIPNF.js.map +0 -1
- package/dist/chunk-I4K5JMS4.js.map +0 -1
- package/dist/chunk-MPWA55CF.js.map +0 -1
- package/dist/chunk-QPCHABOZ.js.map +0 -1
- package/dist/chunk-QSOCOXVL.js.map +0 -1
- package/dist/chunk-RZ3P4X2I.js.map +0 -1
- package/dist/chunk-STOZ6JB5.js.map +0 -1
- package/dist/chunk-TPMT3J32.js.map +0 -1
- /package/dist/{chunk-UBVKMM3V.js.map → chunk-2A5GHOL3.js.map} +0 -0
- /package/dist/{chunk-YGLAGY74.js.map → chunk-332KWE5H.js.map} +0 -0
- /package/dist/{chunk-HNEZWVDR.js.map → chunk-364NT46L.js.map} +0 -0
- /package/dist/{chunk-RLTGD5WJ.js.map → chunk-3AKQHYTM.js.map} +0 -0
- /package/dist/{chunk-5I75WRXT.js.map → chunk-3CXRHRGE.js.map} +0 -0
- /package/dist/{chunk-G6NMSBSQ.js.map → chunk-3LD42RNV.js.map} +0 -0
- /package/dist/{chunk-3BMG6VMB.js.map → chunk-3N2HWNKT.js.map} +0 -0
- /package/dist/{chunk-MSJP2AEN.js.map → chunk-3N3W4TID.js.map} +0 -0
- /package/dist/{chunk-YNVTUQ5B.js.map → chunk-3V7OTBUZ.js.map} +0 -0
- /package/dist/{chunk-LZNUBQ5I.js.map → chunk-4A454JZN.js.map} +0 -0
- /package/dist/{chunk-SW7JCF4Z.js.map → chunk-4P63RSSY.js.map} +0 -0
- /package/dist/{chunk-7QKFMMWK.js.map → chunk-4W4C4Q46.js.map} +0 -0
- /package/dist/{chunk-B32XH7NK.js.map → chunk-4WVUX7IU.js.map} +0 -0
- /package/dist/{chunk-Z6QFIRD7.js.map → chunk-4X2TOMK6.js.map} +0 -0
- /package/dist/{chunk-MYTV353T.js.map → chunk-4Y3QLISA.js.map} +0 -0
- /package/dist/{chunk-IMYKJTVX.js.map → chunk-5J6LN2O7.js.map} +0 -0
- /package/dist/{chunk-QWI7IPYJ.js.map → chunk-5V7IZBRY.js.map} +0 -0
- /package/dist/{chunk-ZBUMGMWP.js.map → chunk-64LNNC54.js.map} +0 -0
- /package/dist/{chunk-T77OVQEO.js.map → chunk-6D7CASMK.js.map} +0 -0
- /package/dist/{chunk-YVDNCV2D.js.map → chunk-6RYSSNOO.js.map} +0 -0
- /package/dist/{chunk-CPQJFHNZ.js.map → chunk-74IH3ZGD.js.map} +0 -0
- /package/dist/{chunk-UQ5GJPVZ.js.map → chunk-76GAXLNC.js.map} +0 -0
- /package/dist/{chunk-X4J576GR.js.map → chunk-7LFST3PW.js.map} +0 -0
- /package/dist/{chunk-XCUHGPPZ.js.map → chunk-7MLT66DE.js.map} +0 -0
- /package/dist/{chunk-EOIRU62W.js.map → chunk-7P544IWT.js.map} +0 -0
- /package/dist/{chunk-XTYBJAZG.js.map → chunk-7TENMQNQ.js.map} +0 -0
- /package/dist/{chunk-EB25XITI.js.map → chunk-A27J4CIZ.js.map} +0 -0
- /package/dist/{chunk-2KSFBZ2H.js.map → chunk-ABZJNKR6.js.map} +0 -0
- /package/dist/{chunk-6LOWZCH7.js.map → chunk-AHXQN4VL.js.map} +0 -0
- /package/dist/{chunk-Y7BOP7VZ.js.map → chunk-AP7GEUJS.js.map} +0 -0
- /package/dist/{chunk-U2SAW6DH.js.map → chunk-B4OZU7J4.js.map} +0 -0
- /package/dist/{chunk-DDGYTY4E.js.map → chunk-BIHZXB5P.js.map} +0 -0
- /package/dist/{chunk-4QGMUHAU.js.map → chunk-BWNZVMBT.js.map} +0 -0
- /package/dist/{chunk-CY4XIZNW.js.map → chunk-CAH5XNHT.js.map} +0 -0
- /package/dist/{chunk-KILA7LCC.js.map → chunk-CFDWKQZT.js.map} +0 -0
- /package/dist/{chunk-EWFBDAB7.js.map → chunk-CKGRSCRT.js.map} +0 -0
- /package/dist/{chunk-YOLLISEY.js.map → chunk-CRD2WCU7.js.map} +0 -0
- /package/dist/{chunk-L5KPBMMF.js.map → chunk-CXL3TT3K.js.map} +0 -0
- /package/dist/{chunk-KOGJBAFI.js.map → chunk-D3KLIC5N.js.map} +0 -0
- /package/dist/{chunk-2SBQ47RI.js.map → chunk-D4JL5725.js.map} +0 -0
- /package/dist/{chunk-NI3MC742.js.map → chunk-DBJLYURK.js.map} +0 -0
- /package/dist/{chunk-75GAQL2Q.js.map → chunk-DKPELKGL.js.map} +0 -0
- /package/dist/{chunk-NGXL4R54.js.map → chunk-E4MJA52O.js.map} +0 -0
- /package/dist/{chunk-5HXVXW22.js.map → chunk-EGBQR5GH.js.map} +0 -0
- /package/dist/{chunk-FTYOCFTV.js.map → chunk-EGYJUJMR.js.map} +0 -0
- /package/dist/{chunk-7XSCEHGA.js.map → chunk-EOQ6EKTS.js.map} +0 -0
- /package/dist/{chunk-6AKDAQSS.js.map → chunk-ERAMSYPR.js.map} +0 -0
- /package/dist/{chunk-WYRH6OSN.js.map → chunk-F5EH5BJN.js.map} +0 -0
- /package/dist/{chunk-QCYQL3ST.js.map → chunk-FJLPVPRG.js.map} +0 -0
- /package/dist/{chunk-MAHY7PK3.js.map → chunk-FQMLTCXT.js.map} +0 -0
- /package/dist/{chunk-TMINUTQQ.js.map → chunk-FRQGZIYU.js.map} +0 -0
- /package/dist/{chunk-LV6AD6XC.js.map → chunk-FT3LJZWZ.js.map} +0 -0
- /package/dist/{chunk-IS3L67TF.js.map → chunk-FW5GTAUY.js.map} +0 -0
- /package/dist/{chunk-VMTOLAZ5.js.map → chunk-FZZMNKVF.js.map} +0 -0
- /package/dist/{chunk-FGZIEZEP.js.map → chunk-G6TKWNF2.js.map} +0 -0
- /package/dist/{chunk-I6IFUFLW.js.map → chunk-G7MHDZTL.js.map} +0 -0
- /package/dist/{chunk-KES3HNSU.js.map → chunk-GB2DQOZ7.js.map} +0 -0
- /package/dist/{chunk-W3IFJA35.js.map → chunk-GFYDOH7D.js.map} +0 -0
- /package/dist/{chunk-M2M4IDFU.js.map → chunk-GXYOBTOY.js.map} +0 -0
- /package/dist/{chunk-OLHAUGVQ.js.map → chunk-GZQQSTKR.js.map} +0 -0
- /package/dist/{chunk-N2J24TJ3.js.map → chunk-HAWOS4SF.js.map} +0 -0
- /package/dist/{chunk-S2VZUBM7.js.map → chunk-HCTHY66U.js.map} +0 -0
- /package/dist/{chunk-ABVIMFSD.js.map → chunk-HG52QQ2L.js.map} +0 -0
- /package/dist/{chunk-AMLHEKSV.js.map → chunk-HI7JPDD6.js.map} +0 -0
- /package/dist/{chunk-F5OERPU4.js.map → chunk-HOWAMSUY.js.map} +0 -0
- /package/dist/{chunk-3TZUZXY5.js.map → chunk-HTXYBKLK.js.map} +0 -0
- /package/dist/{chunk-WW3F7DCX.js.map → chunk-IFOHCY4O.js.map} +0 -0
- /package/dist/{chunk-S46LGAQ2.js.map → chunk-IJVBLU25.js.map} +0 -0
- /package/dist/{chunk-ARGVUTTL.js.map → chunk-IPVGWENM.js.map} +0 -0
- /package/dist/{chunk-MWXZXCVX.js.map → chunk-J43PARXM.js.map} +0 -0
- /package/dist/{chunk-UYKIUUWP.js.map → chunk-JJTJ7DCV.js.map} +0 -0
- /package/dist/{chunk-HQCZT6TO.js.map → chunk-JVOEVTCZ.js.map} +0 -0
- /package/dist/{chunk-2365CQJU.js.map → chunk-KAQDWEG6.js.map} +0 -0
- /package/dist/{chunk-TB5CRHTF.js.map → chunk-KEPLO2AB.js.map} +0 -0
- /package/dist/{chunk-PVIQDBUN.js.map → chunk-KUQ4XHVV.js.map} +0 -0
- /package/dist/{chunk-DAFFZED3.js.map → chunk-KWBMM6MJ.js.map} +0 -0
- /package/dist/{chunk-JJYECKEL.js.map → chunk-LFECE4R7.js.map} +0 -0
- /package/dist/{chunk-LXIPBHNJ.js.map → chunk-LKTJ26ST.js.map} +0 -0
- /package/dist/{chunk-56JF5PZK.js.map → chunk-LYVTJLCF.js.map} +0 -0
- /package/dist/{chunk-EYFDIUVR.js.map → chunk-M4G4LRQK.js.map} +0 -0
- /package/dist/{chunk-KMMFN24G.js.map → chunk-MKHNLRVX.js.map} +0 -0
- /package/dist/{chunk-4IG73U2X.js.map → chunk-MSPLIRBH.js.map} +0 -0
- /package/dist/{chunk-55MYYWOV.js.map → chunk-O4UXH7BM.js.map} +0 -0
- /package/dist/{chunk-DYHOBKPU.js.map → chunk-OA6T2ME3.js.map} +0 -0
- /package/dist/{chunk-VNMD6BA4.js.map → chunk-OFRQMFWD.js.map} +0 -0
- /package/dist/{chunk-LTJC7TGB.js.map → chunk-OHA2PAAA.js.map} +0 -0
- /package/dist/{chunk-ZANWHTXH.js.map → chunk-OVJV2ZN7.js.map} +0 -0
- /package/dist/{chunk-SKQPUAMK.js.map → chunk-PDWQJFMK.js.map} +0 -0
- /package/dist/{chunk-6EZQLNPK.js.map → chunk-PGJIWCQR.js.map} +0 -0
- /package/dist/{chunk-FRAFGRRD.js.map → chunk-PIELY4BJ.js.map} +0 -0
- /package/dist/{chunk-3Z6JX7UN.js.map → chunk-PZJEF232.js.map} +0 -0
- /package/dist/{chunk-6ATXOJVQ.js.map → chunk-QADTI63U.js.map} +0 -0
- /package/dist/{chunk-4RF4BALN.js.map → chunk-R775ISK6.js.map} +0 -0
- /package/dist/{chunk-YBAK2WN5.js.map → chunk-RFMQBIE6.js.map} +0 -0
- /package/dist/{chunk-43EFQ3DU.js.map → chunk-RVBLOR32.js.map} +0 -0
- /package/dist/{chunk-XNAI7QGU.js.map → chunk-SA3KLZDZ.js.map} +0 -0
- /package/dist/{chunk-CAOL4AIB.js.map → chunk-SARK3GHS.js.map} +0 -0
- /package/dist/{chunk-CQOJUYTT.js.map → chunk-SOXO2VN3.js.map} +0 -0
- /package/dist/{chunk-6PU5P7QT.js.map → chunk-TDXEWGY2.js.map} +0 -0
- /package/dist/{chunk-SB2SEGR6.js.map → chunk-TIM4PXWN.js.map} +0 -0
- /package/dist/{chunk-OGSTMHT6.js.map → chunk-TTBLQZVT.js.map} +0 -0
- /package/dist/{chunk-GTE4TW3W.js.map → chunk-U4PV2ZKK.js.map} +0 -0
- /package/dist/{chunk-VHE7UEG5.js.map → chunk-UC7DLGMP.js.map} +0 -0
- /package/dist/{chunk-TI4FGQYV.js.map → chunk-UHLGJHTD.js.map} +0 -0
- /package/dist/{chunk-TAHO2LCU.js.map → chunk-UIZIEU4X.js.map} +0 -0
- /package/dist/{chunk-F7LBTMCA.js.map → chunk-ULC4SCFC.js.map} +0 -0
- /package/dist/{chunk-FORQEHRQ.js.map → chunk-UXVWGNPG.js.map} +0 -0
- /package/dist/{chunk-KF3Q3C3P.js.map → chunk-VGIBWJ72.js.map} +0 -0
- /package/dist/{chunk-I54YFYBS.js.map → chunk-VMACQT3T.js.map} +0 -0
- /package/dist/{chunk-EXEBN5ZP.js.map → chunk-W56KN53D.js.map} +0 -0
- /package/dist/{chunk-KURE5R7Z.js.map → chunk-WGK7VNCO.js.map} +0 -0
- /package/dist/{chunk-UIS3E72B.js.map → chunk-WK577LQL.js.map} +0 -0
- /package/dist/{chunk-LLPPIO3K.js.map → chunk-WNTXHLVJ.js.map} +0 -0
- /package/dist/{chunk-PEVBSNCD.js.map → chunk-WPRQPKLV.js.map} +0 -0
- /package/dist/{chunk-C347NNZJ.js.map → chunk-WVCHMTPG.js.map} +0 -0
- /package/dist/{chunk-CSD6SWBZ.js.map → chunk-WYNGH2WL.js.map} +0 -0
- /package/dist/{chunk-PJDAZG65.js.map → chunk-XA5ES25V.js.map} +0 -0
- /package/dist/{chunk-FWTVIRZZ.js.map → chunk-YLZXIR6B.js.map} +0 -0
- /package/dist/{chunk-JOQGKXR5.js.map → chunk-Z2J4MRTF.js.map} +0 -0
- /package/dist/{chunk-USHVG4UQ.js.map → chunk-ZKVSFVIA.js.map} +0 -0
- /package/dist/{chunk-TE6HAWDM.js.map → chunk-ZP2GPRNQ.js.map} +0 -0
- /package/dist/{chunk-3PQL2EN5.js.map → chunk-ZW7Q3IRL.js.map} +0 -0
- /package/dist/{chunk-M5Y42AZ4.js.map → chunk-ZX4ORMBC.js.map} +0 -0
- /package/dist/native/chunks/{chunk-FXA5DLKR.js.map → chunk-UQ272RI2.js.map} +0 -0
- /package/dist/native/chunks/{chunk-IN3XZ7EK.js.map → chunk-X65TVC3B.js.map} +0 -0
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* "1 August" is the same day in every zone, and only the question "which day is
|
|
5
5
|
* TODAY" needs a zone to answer.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
7
|
+
import type React from 'react';
|
|
8
|
+
|
|
9
|
+
import type { CalendarLabels } from '../../../copy/labels';
|
|
10
|
+
import type { CalendarTodayIndicator, DateRange } from '../Calendar';
|
|
8
11
|
|
|
9
12
|
/** One inclusive calendar day as `AAAA-MM-DD`. Sorts lexicographically. */
|
|
10
13
|
export type DayString = string;
|
|
@@ -90,6 +93,12 @@ export interface DateRangePickerMessages {
|
|
|
90
93
|
quickRanges: string;
|
|
91
94
|
/** Shown while only one end is chosen. */
|
|
92
95
|
incomplete: string;
|
|
96
|
+
/**
|
|
97
|
+
* Shown, with `openEnd`, for a start with no end: a finished answer ("no end
|
|
98
|
+
* date"), worded WITHOUT the date, which the field beside it already shows.
|
|
99
|
+
* Optional so a full messages object written before it still type-checks.
|
|
100
|
+
*/
|
|
101
|
+
openEnded?: string;
|
|
93
102
|
/** Shown when the start is after the end. */
|
|
94
103
|
reversed: string;
|
|
95
104
|
/** Shown when the range — typed or quick-picked — exceeds the cap. */
|
|
@@ -164,6 +173,78 @@ export interface DateRangePickerProps {
|
|
|
164
173
|
numberOfMonths?: number;
|
|
165
174
|
/** Copy overrides, merged over the English defaults. */
|
|
166
175
|
messages?: Partial<DateRangePickerMessages>;
|
|
176
|
+
/**
|
|
177
|
+
* Where the typed half sits. `below` (default) is the layout this picker
|
|
178
|
+
* always had. `beside` is for a picker laid out in a page rather than a
|
|
179
|
+
* popover: the months sit in their own frame and the fields in a column
|
|
180
|
+
* beside them when the PICKER's own width has room for both, under them when
|
|
181
|
+
* it has not — and one month instead of two when two would not fit either.
|
|
182
|
+
* Decided by measuring the picker, not the viewport, because a form column
|
|
183
|
+
* beside a preview is narrow on the widest screen.
|
|
184
|
+
*/
|
|
185
|
+
fieldsPlacement?: 'below' | 'beside';
|
|
186
|
+
/**
|
|
187
|
+
* With `fieldsPlacement="beside"`: the months' frame meets the picker's own
|
|
188
|
+
* edges instead of hugging its months. Under the fields' row the frame spans
|
|
189
|
+
* the picker; beside them it takes what the fields' column leaves, and that
|
|
190
|
+
* column stops at 320 design px — a `dd/mm/aaaa` date and its message need
|
|
191
|
+
* no more. The calendar's seven columns spread across the frame and the day
|
|
192
|
+
* faces keep their size (`Calendar` `fullWidth`). For a picker laid into a
|
|
193
|
+
* form section whose edges the frame must line up with. Under the fields the
|
|
194
|
+
* frame trims its side padding before a column drops under 40 design px.
|
|
195
|
+
* Ignored without `fieldsPlacement="beside"`: the popover's frame is as wide
|
|
196
|
+
* as its months. Default: false — the frame as wide as its months, centred
|
|
197
|
+
* under the fields.
|
|
198
|
+
*/
|
|
199
|
+
fullWidth?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* The consumer's OWN typed fields, in place of the built-in pair and the
|
|
202
|
+
* summary line under it — for a form whose fields carry its own rules (a
|
|
203
|
+
* half-typed date kept until submit, its own messages), which a second line
|
|
204
|
+
* would only repeat. Told where it sits, so it can lay its fields out for it.
|
|
205
|
+
* The calendar follows the value when the consumer changes it, as it follows
|
|
206
|
+
* a typed date.
|
|
207
|
+
*/
|
|
208
|
+
renderFields?: (args: { placement: 'beside' | 'below'; disabled: boolean }) => React.ReactNode;
|
|
209
|
+
/**
|
|
210
|
+
* The period is shown but cannot be changed now — its consumer cannot place
|
|
211
|
+
* its days (FUT-4482). Every day of the grid is disabled and a tap writes
|
|
212
|
+
* nothing, the quick ranges are not offered, the built-in boxes are
|
|
213
|
+
* disabled, `renderFields` is told (`disabled`) so the consumer's own fields
|
|
214
|
+
* follow, and the root is a `group` named by `label` that carries
|
|
215
|
+
* `aria-disabled`. The month arrows are disabled too and today's ring takes
|
|
216
|
+
* the disabled ink (review round 6). Say WHY next to the picker; the control
|
|
217
|
+
* cannot — and describe the consumer's own fields with that sentence.
|
|
218
|
+
*
|
|
219
|
+
* In a popover, the picker is only what opens: the consumer disables its OWN
|
|
220
|
+
* trigger (the button or field that opens the popover); this prop cannot
|
|
221
|
+
* reach it. Default: false.
|
|
222
|
+
*/
|
|
223
|
+
disabled?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* The picker's accessible name while it is `disabled` and its root is a
|
|
226
|
+
* group. Default: `messages.calendarLabel`.
|
|
227
|
+
*/
|
|
228
|
+
label?: string;
|
|
229
|
+
/**
|
|
230
|
+
* A start with no end is a finished answer — "from this day on" — rather
|
|
231
|
+
* than half a range: the summary says `messages.openEnded` instead of asking
|
|
232
|
+
* for the end. `resolveDayRange` is unchanged; the caller decides what an
|
|
233
|
+
* open end means to it.
|
|
234
|
+
*/
|
|
235
|
+
openEnd?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* The calendar's display options, passed through (`Calendar`'s own):
|
|
238
|
+
* whether a month shows its neighbours' days (default true), how today is
|
|
239
|
+
* marked (default `'bold'`), and whether one day may be the whole range
|
|
240
|
+
* (default true). With `allowSameDayRange={false}` a second tap on the start
|
|
241
|
+
* day does nothing.
|
|
242
|
+
*/
|
|
243
|
+
showOutsideDays?: boolean;
|
|
244
|
+
todayIndicator?: CalendarTodayIndicator;
|
|
245
|
+
allowSameDayRange?: boolean;
|
|
246
|
+
/** Names for the calendar's own controls (the month arrows), in the host's language. */
|
|
247
|
+
calendarLabels?: Partial<CalendarLabels>;
|
|
167
248
|
/** Root test id; every part derives from it (`-from`, `-quick-today`, …). */
|
|
168
249
|
dataTestId?: string;
|
|
169
250
|
className?: string;
|
|
@@ -182,6 +263,12 @@ export interface UseDateRangePickerArgs {
|
|
|
182
263
|
weekStartsOn: WeekStart;
|
|
183
264
|
quickRanges: QuickRange[];
|
|
184
265
|
messages: Partial<DateRangePickerMessages> | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* Remount the calendar onto the range whenever the CONSUMER moves it, not
|
|
268
|
+
* only when a typed field or a quick pick does — true when the consumer owns
|
|
269
|
+
* the fields (`renderFields`), whose edits never pass through the picker.
|
|
270
|
+
*/
|
|
271
|
+
followValue?: boolean;
|
|
185
272
|
}
|
|
186
273
|
|
|
187
274
|
/** Everything the component renders from, and every way the range can move. */
|
|
@@ -38,6 +38,12 @@ export interface DateRangeFieldsProps {
|
|
|
38
38
|
/** Id of the status line, so both fields can point at it. */
|
|
39
39
|
statusId: string;
|
|
40
40
|
dataTestId: string;
|
|
41
|
+
/** A start with no end is an answer (`openEnd`), not a half-chosen range. */
|
|
42
|
+
openEnd?: boolean;
|
|
43
|
+
/** Beside the months the pair stacks; under them it sits side by side. */
|
|
44
|
+
stacked?: boolean;
|
|
45
|
+
/** The picker is `disabled`: both boxes are. */
|
|
46
|
+
disabled?: boolean;
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
export function DateRangeFields({
|
|
@@ -48,6 +54,9 @@ export function DateRangeFields({
|
|
|
48
54
|
onEdit,
|
|
49
55
|
statusId,
|
|
50
56
|
dataTestId,
|
|
57
|
+
openEnd = false,
|
|
58
|
+
stacked = false,
|
|
59
|
+
disabled = false,
|
|
51
60
|
}: DateRangeFieldsProps): React.JSX.Element {
|
|
52
61
|
// "Incomplete" is not an error — it is a range that is not finished yet, and
|
|
53
62
|
// painting it red would make the first click on a two-click control look like
|
|
@@ -56,7 +65,7 @@ export function DateRangeFields({
|
|
|
56
65
|
|
|
57
66
|
return (
|
|
58
67
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
|
|
59
|
-
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 2 }}>
|
|
68
|
+
<Box sx={{ display: 'flex', flexDirection: stacked ? 'column' : 'row', flexWrap: 'wrap', gap: 2 }}>
|
|
60
69
|
<DayBoundInput
|
|
61
70
|
mask={messages.dayMask}
|
|
62
71
|
label={messages.from}
|
|
@@ -65,6 +74,7 @@ export function DateRangeFields({
|
|
|
65
74
|
testId={`${dataTestId}-from`}
|
|
66
75
|
error={rejected}
|
|
67
76
|
describedBy={statusId}
|
|
77
|
+
disabled={disabled}
|
|
68
78
|
/>
|
|
69
79
|
<DayBoundInput
|
|
70
80
|
mask={messages.dayMask}
|
|
@@ -74,6 +84,7 @@ export function DateRangeFields({
|
|
|
74
84
|
testId={`${dataTestId}-to`}
|
|
75
85
|
error={rejected}
|
|
76
86
|
describedBy={statusId}
|
|
87
|
+
disabled={disabled}
|
|
77
88
|
/>
|
|
78
89
|
</Box>
|
|
79
90
|
<Typography
|
|
@@ -86,7 +97,7 @@ export function DateRangeFields({
|
|
|
86
97
|
color={rejected ? 'error.main' : 'text.secondary'}
|
|
87
98
|
data-testid={`${dataTestId}-status`}
|
|
88
99
|
>
|
|
89
|
-
{statusMessage(status, messages, maxRangeDays)}
|
|
100
|
+
{statusMessage(status, messages, maxRangeDays, { enabled: openEnd, draft: value })}
|
|
90
101
|
</Typography>
|
|
91
102
|
</Box>
|
|
92
103
|
);
|
|
@@ -78,7 +78,8 @@ The Tabs component provides an intuitive way to organize related content into se
|
|
|
78
78
|
| Prop | Type | Default | Description |
|
|
79
79
|
| ---------------- | --------------------------------------- | -------- | ------------------------------ |
|
|
80
80
|
| `scrollable` | `boolean` | `false` | Enable scrolling for many tabs |
|
|
81
|
-
| `scrollButtons` | `'auto' \| 'desktop' \| 'on' \| 'off'`
|
|
81
|
+
| `scrollButtons` | `boolean \| 'auto' \| 'desktop' \| 'on' \| 'off'` | `'auto'` | The ‹ › buttons of a `scrollable` strip: `'auto'` while it overflows, `true` always, `false` never (swipe/wheel/keyboard still scroll). `'desktop'`, `'on'`, `'off'` are deprecated and behave as `'auto'` |
|
|
82
|
+
| `allowScrollButtonsMobile` | `boolean` | `scrollable` | Show the scroll buttons on phone widths too; `false` keeps MUI's hide-below-`sm` rule |
|
|
82
83
|
| `sticky` | `boolean` | `false` | Pin the tab list while panels scroll beneath it |
|
|
83
84
|
| `stickyOffset` | `number` | `0` | Top offset (px) when `sticky` — e.g. a fixed header height |
|
|
84
85
|
|
|
@@ -270,6 +271,26 @@ function ScrollableTabsExample() {
|
|
|
270
271
|
}
|
|
271
272
|
```
|
|
272
273
|
|
|
274
|
+
### Scrollable Tabs Without Scroll Buttons
|
|
275
|
+
|
|
276
|
+
`scrollButtons={false}` keeps the strip scrollable (swipe, wheel, keyboard) but
|
|
277
|
+
renders no ‹ › buttons, so the tabs run edge to edge and nothing shifts when the
|
|
278
|
+
strip leaves its start. A host that wants arrows draws its own, for example
|
|
279
|
+
overlaid on a fade at the side with more tabs.
|
|
280
|
+
|
|
281
|
+
```tsx
|
|
282
|
+
<Tabs
|
|
283
|
+
items={items}
|
|
284
|
+
value={activeTab}
|
|
285
|
+
onChange={handleChange}
|
|
286
|
+
scrollable
|
|
287
|
+
scrollButtons={false}
|
|
288
|
+
/>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Note that `scrollButtons="off"` does **not** do this: the legacy strings
|
|
292
|
+
`'desktop'`, `'on'` and `'off'` all behave as `'auto'`, as they always have.
|
|
293
|
+
|
|
273
294
|
### Sticky, Scrollable Tabs
|
|
274
295
|
|
|
275
296
|
Pin the tab list under a fixed header while the panels scroll, and let the row
|
|
@@ -133,13 +133,28 @@ const definedProps = (props: TabsProps): Partial<TabsProps> =>
|
|
|
133
133
|
Object.entries(props).filter(([, value]) => value !== undefined),
|
|
134
134
|
) as Partial<TabsProps>;
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
/**
|
|
137
|
+
* The `scrollButtons` value handed to MUI (FUT-4408).
|
|
138
|
+
*
|
|
139
|
+
* A strip that does not scroll has no buttons. A scrollable one honours the
|
|
140
|
+
* host: `false` drops the buttons entirely (the host may draw its own, or let
|
|
141
|
+
* the strip be swiped), `true` keeps them on whether or not the row overflows,
|
|
142
|
+
* and `'auto'` — the default — shows them while it does.
|
|
143
|
+
*
|
|
144
|
+
* The legacy strings `'desktop'`, `'on'` and `'off'` keep resolving to
|
|
145
|
+
* `'auto'`, exactly as they always have: hosts already pass them (one passes
|
|
146
|
+
* `'off'` on a scrollable strip and gets buttons today), so giving them a new
|
|
147
|
+
* meaning in a patch release would move existing screens. They are deprecated
|
|
148
|
+
* in `TabsProps`; a host that wants none passes `false`.
|
|
149
|
+
*/
|
|
150
|
+
const resolveScrollButtons = (
|
|
151
|
+
scrollable: boolean | undefined,
|
|
152
|
+
scrollButtons: TabsProps['scrollButtons'],
|
|
153
|
+
): 'auto' | boolean => {
|
|
154
|
+
if (!scrollable) return false;
|
|
155
|
+
if (typeof scrollButtons === 'boolean') return scrollButtons;
|
|
156
|
+
return 'auto';
|
|
157
|
+
};
|
|
143
158
|
|
|
144
159
|
const buildTabsSx = ({
|
|
145
160
|
fullWidth,
|
|
@@ -233,8 +248,9 @@ const TabsBar: React.FC<
|
|
|
233
248
|
// `scrollable` flag onto it so overflowing tab rows actually scroll.
|
|
234
249
|
variant={p.scrollable ? 'scrollable' : 'standard'}
|
|
235
250
|
data-testid={dataTestId ? `${dataTestId}-list` : 'tabs-list'}
|
|
236
|
-
scrollButtons={resolveScrollButtons(p.scrollable)}
|
|
237
|
-
|
|
251
|
+
scrollButtons={resolveScrollButtons(p.scrollable, p.scrollButtons)}
|
|
252
|
+
// Phones get the buttons too unless the host says otherwise.
|
|
253
|
+
allowScrollButtonsMobile={p.allowScrollButtonsMobile ?? p.scrollable}
|
|
238
254
|
textColor={p.color}
|
|
239
255
|
indicatorColor={p.color}
|
|
240
256
|
sx={buildTabsSx({
|
|
@@ -122,9 +122,25 @@ export interface TabsProps extends Omit<MuiTabsProps, 'variant' | 'children' | '
|
|
|
122
122
|
scrollable?: boolean;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* The ‹ › scroll buttons of a `scrollable` strip (ignored when the strip does
|
|
126
|
+
* not scroll, which never has any):
|
|
127
|
+
*
|
|
128
|
+
* - `'auto'` (default): shown while the row overflows; the disabled one at
|
|
129
|
+
* either end collapses to no width.
|
|
130
|
+
* - `true`: always shown, even when every tab fits.
|
|
131
|
+
* - `false`: never rendered. The strip still scrolls by swipe, wheel and
|
|
132
|
+
* keyboard; a host that wants arrows draws its own (e.g. overlaid).
|
|
133
|
+
* - `'desktop'`, `'on'`, `'off'`: **deprecated**, each behaves exactly as
|
|
134
|
+
* `'auto'` (as they always have). Use `false` for none, `true` for always.
|
|
135
|
+
*/
|
|
136
|
+
scrollButtons?: boolean | 'auto' | 'desktop' | 'on' | 'off';
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Whether the scroll buttons are shown on narrow (phone) viewports too.
|
|
140
|
+
* Defaults to the value of `scrollable`, so a scrollable strip shows them on
|
|
141
|
+
* phones; pass `false` to keep MUI's own rule of hiding them below `sm`.
|
|
126
142
|
*/
|
|
127
|
-
|
|
143
|
+
allowScrollButtonsMobile?: boolean;
|
|
128
144
|
|
|
129
145
|
/**
|
|
130
146
|
* Pin the tab list in place (CSS `position: sticky`) while the tab panels
|
package/src/copy/labels.ts
CHANGED
|
@@ -212,6 +212,12 @@ export interface SocialLoginLabels {
|
|
|
212
212
|
/** `DateRangePicker`'s calendar popover name. */
|
|
213
213
|
export interface DateRangePickerLabels {
|
|
214
214
|
calendar: string;
|
|
215
|
+
/**
|
|
216
|
+
* The line under the fields, with `openEnd`, for a start with no end.
|
|
217
|
+
* Optional (review round 6): a host's own `UiLabels` pack predates it, and
|
|
218
|
+
* the picker says the English default where it is missing.
|
|
219
|
+
*/
|
|
220
|
+
openEnded?: string;
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
/**
|
package/src/en-US.labels.ts
CHANGED
package/src/pt-BR.labels.ts
CHANGED
package/dist/chunk-3CSKB57B.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEFAULT_QUICK_RANGES
|
|
3
|
-
} from "./chunk-R26WP22N.js";
|
|
4
|
-
import {
|
|
5
|
-
useDateRangePicker
|
|
6
|
-
} from "./chunk-RZ3P4X2I.js";
|
|
7
|
-
import {
|
|
8
|
-
DateRangeQuickList
|
|
9
|
-
} from "./chunk-6KKQHJE7.js";
|
|
10
|
-
import {
|
|
11
|
-
DateRangeFields
|
|
12
|
-
} from "./chunk-QSOCOXVL.js";
|
|
13
|
-
import {
|
|
14
|
-
toLocalDay
|
|
15
|
-
} from "./chunk-SUTOAW7I.js";
|
|
16
|
-
import {
|
|
17
|
-
Calendar
|
|
18
|
-
} from "./chunk-STOZ6JB5.js";
|
|
19
|
-
|
|
20
|
-
// src/components/form/DateRangePicker/DateRangePicker.tsx
|
|
21
|
-
import Box from "@mui/material/Box/index.js";
|
|
22
|
-
import Paper from "@mui/material/Paper/index.js";
|
|
23
|
-
import useMediaQuery from "@mui/material/useMediaQuery/index.js";
|
|
24
|
-
import { useTheme } from "@mui/material/styles/index.js";
|
|
25
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
-
var CALENDAR_CLASS = "date-range-picker__calendar";
|
|
27
|
-
var ROOT_SX = {
|
|
28
|
-
display: "inline-flex",
|
|
29
|
-
flexDirection: "column",
|
|
30
|
-
gap: 2,
|
|
31
|
-
p: 2,
|
|
32
|
-
maxWidth: "100%",
|
|
33
|
-
// `Calendar` renders its own `Paper` with 24px of padding. Nested in this one
|
|
34
|
-
// that reads as a box inside a box, so the inner frame is flattened here
|
|
35
|
-
// through the className hook the component exposes for exactly this.
|
|
36
|
-
[`& .${CALENDAR_CLASS}`]: {
|
|
37
|
-
p: 0,
|
|
38
|
-
boxShadow: "none",
|
|
39
|
-
backgroundColor: "transparent",
|
|
40
|
-
backgroundImage: "none"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var BODY_SX = {
|
|
44
|
-
display: "flex",
|
|
45
|
-
// The quick column sits BESIDE the calendar on a wide screen. Narrow, it
|
|
46
|
-
// moves ABOVE it — `column-reverse`, so the DOM order stays calendar-then-
|
|
47
|
-
// list (the calendar is the primary control and should be reached first by a
|
|
48
|
-
// screen reader and by Tab) while the eye meets the quick ranges first, which
|
|
49
|
-
// is the order the phone mock asks for and the order a thumb wants: nine
|
|
50
|
-
// one-tap answers before a grid of thirty.
|
|
51
|
-
//
|
|
52
|
-
// A side column at 390px would squeeze the day grid to roughly half its width
|
|
53
|
-
// and make the numbers unreadable. Checked at 390px.
|
|
54
|
-
flexDirection: { xs: "column-reverse", md: "row" },
|
|
55
|
-
alignItems: { xs: "stretch", md: "flex-start" },
|
|
56
|
-
gap: 2,
|
|
57
|
-
maxWidth: "100%"
|
|
58
|
-
};
|
|
59
|
-
var QUICK_DIVIDER_SX = {
|
|
60
|
-
borderColor: "divider",
|
|
61
|
-
borderStyle: "solid",
|
|
62
|
-
borderWidth: 0,
|
|
63
|
-
borderLeftWidth: { xs: 0, md: "1px" },
|
|
64
|
-
borderBottomWidth: { xs: "1px", md: 0 },
|
|
65
|
-
pl: { xs: 0, md: 2 },
|
|
66
|
-
pb: { xs: 2, md: 0 },
|
|
67
|
-
alignSelf: "stretch"
|
|
68
|
-
};
|
|
69
|
-
var FIELDS_DIVIDER_SX = {
|
|
70
|
-
borderTop: "1px solid",
|
|
71
|
-
borderColor: "divider",
|
|
72
|
-
pt: 2
|
|
73
|
-
};
|
|
74
|
-
function useMonthCount(requested) {
|
|
75
|
-
const theme = useTheme();
|
|
76
|
-
const narrow = useMediaQuery(theme.breakpoints.down("md"));
|
|
77
|
-
return narrow ? 1 : requested;
|
|
78
|
-
}
|
|
79
|
-
function RangeCalendar({
|
|
80
|
-
calendarLabel,
|
|
81
|
-
picker,
|
|
82
|
-
value,
|
|
83
|
-
locale,
|
|
84
|
-
weekStartsOn,
|
|
85
|
-
months,
|
|
86
|
-
maxRangeDays
|
|
87
|
-
}) {
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
Calendar,
|
|
90
|
-
{
|
|
91
|
-
ariaLabel: calendarLabel,
|
|
92
|
-
className: CALENDAR_CLASS,
|
|
93
|
-
selectionMode: "range",
|
|
94
|
-
locale,
|
|
95
|
-
firstDayOfWeek: weekStartsOn,
|
|
96
|
-
numberOfMonths: months,
|
|
97
|
-
range: { start: toLocalDay(value.from), end: toLocalDay(value.to) },
|
|
98
|
-
onIntermediateRangeChange: picker.pickOnCalendar,
|
|
99
|
-
onRangeChange: picker.pickOnCalendar,
|
|
100
|
-
maxRangeLength: maxRangeDays
|
|
101
|
-
},
|
|
102
|
-
picker.viewNonce
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
function QuickColumn({
|
|
106
|
-
picker,
|
|
107
|
-
maxRangeDays,
|
|
108
|
-
dataTestId
|
|
109
|
-
}) {
|
|
110
|
-
if (picker.options.length === 0) return null;
|
|
111
|
-
return /* @__PURE__ */ jsx(Box, { sx: QUICK_DIVIDER_SX, children: /* @__PURE__ */ jsx(
|
|
112
|
-
DateRangeQuickList,
|
|
113
|
-
{
|
|
114
|
-
options: picker.options,
|
|
115
|
-
activeId: picker.activeId,
|
|
116
|
-
onPick: picker.pickQuick,
|
|
117
|
-
reasonFor: (option) => picker.copy.overMax({ maxRangeDays: maxRangeDays ?? option.days, days: option.days }),
|
|
118
|
-
label: picker.copy.quickRanges,
|
|
119
|
-
dataTestId
|
|
120
|
-
}
|
|
121
|
-
) });
|
|
122
|
-
}
|
|
123
|
-
function DateRangePicker({
|
|
124
|
-
value,
|
|
125
|
-
onChange,
|
|
126
|
-
timeZone,
|
|
127
|
-
now,
|
|
128
|
-
maxRangeDays,
|
|
129
|
-
weekStartsOn = 0,
|
|
130
|
-
quickRanges = DEFAULT_QUICK_RANGES,
|
|
131
|
-
locale = "en-US",
|
|
132
|
-
numberOfMonths,
|
|
133
|
-
messages,
|
|
134
|
-
dataTestId = "date-range-picker",
|
|
135
|
-
className
|
|
136
|
-
}) {
|
|
137
|
-
const picker = useDateRangePicker({
|
|
138
|
-
value,
|
|
139
|
-
onChange,
|
|
140
|
-
timeZone,
|
|
141
|
-
now,
|
|
142
|
-
maxRangeDays,
|
|
143
|
-
weekStartsOn,
|
|
144
|
-
quickRanges,
|
|
145
|
-
messages
|
|
146
|
-
});
|
|
147
|
-
const months = useMonthCount(numberOfMonths);
|
|
148
|
-
return /* @__PURE__ */ jsxs(Paper, { className, "data-testid": dataTestId, sx: ROOT_SX, children: [
|
|
149
|
-
/* @__PURE__ */ jsxs(Box, { sx: BODY_SX, children: [
|
|
150
|
-
/* @__PURE__ */ jsx(
|
|
151
|
-
RangeCalendar,
|
|
152
|
-
{
|
|
153
|
-
calendarLabel: picker.copy.calendarLabel,
|
|
154
|
-
picker,
|
|
155
|
-
value,
|
|
156
|
-
locale,
|
|
157
|
-
weekStartsOn,
|
|
158
|
-
months,
|
|
159
|
-
maxRangeDays
|
|
160
|
-
}
|
|
161
|
-
),
|
|
162
|
-
/* @__PURE__ */ jsx(QuickColumn, { picker, maxRangeDays, dataTestId })
|
|
163
|
-
] }),
|
|
164
|
-
/* @__PURE__ */ jsx(Box, { sx: FIELDS_DIVIDER_SX, children: /* @__PURE__ */ jsx(
|
|
165
|
-
DateRangeFields,
|
|
166
|
-
{
|
|
167
|
-
value,
|
|
168
|
-
status: picker.status,
|
|
169
|
-
messages: picker.copy,
|
|
170
|
-
maxRangeDays,
|
|
171
|
-
onEdit: picker.editBound,
|
|
172
|
-
statusId: picker.statusId,
|
|
173
|
-
dataTestId
|
|
174
|
-
}
|
|
175
|
-
) })
|
|
176
|
-
] });
|
|
177
|
-
}
|
|
178
|
-
var DateRangePicker_default = DateRangePicker;
|
|
179
|
-
|
|
180
|
-
export {
|
|
181
|
-
DateRangePicker,
|
|
182
|
-
DateRangePicker_default
|
|
183
|
-
};
|
|
184
|
-
//# sourceMappingURL=chunk-3CSKB57B.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["'use client';\n\n/**\n * Three views of ONE range: a calendar, a quick-pick column, and two typed\n * dates. Change any and the other two follow.\n *\n * WHY IT EXISTS: a range calendar alone makes \"this quarter\" cost two clicks,\n * a month of paging, and a mental note of which day a quarter starts on; a list\n * of presets alone cannot express \"the 3rd to the 19th\"; and typed fields alone\n * make you spell out a window you can see. Each of the three is the fastest\n * route to a different range, so the control offers all three over one value\n * rather than picking a favourite.\n *\n * WHAT IT DOES NOT KNOW: anything about the data behind the range. No preset\n * list of a product's own, no ceiling of its own, no notion of whose clock\n * \"today\" runs on — `quickRanges`, `maxRangeDays` and `timeZone` are props, and\n * a consumer that needs its own periods passes them rather than teaching this\n * file about its domain. The calendar is `Calendar` in `selectionMode=\"range\"`,\n * not a second implementation of one.\n *\n * The value is a DRAFT (`{ from, to }`, either end possibly null) rather than a\n * finished window, so a half-picked or impossible range has somewhere to live\n * while it is being fixed. Every `onChange` carries the verdict with it.\n */\nimport Box from '@mui/material/Box/index.js';\nimport Paper from '@mui/material/Paper/index.js';\nimport useMediaQuery from '@mui/material/useMediaQuery/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { Calendar } from '../Calendar';\n\nimport { toLocalDay } from './DateRangePicker.dates';\nimport { useDateRangePicker } from './DateRangePicker.hooks';\nimport { DEFAULT_QUICK_RANGES } from './DateRangePicker.quick';\nimport type { DateRangeDraft, DateRangePickerProps, WeekStart } from './DateRangePicker.types';\nimport { DateRangeFields } from './DateRangePickerFields';\nimport { DateRangeQuickList } from './DateRangePickerQuickList';\n\nconst CALENDAR_CLASS = 'date-range-picker__calendar';\n\nconst ROOT_SX: SxProps<Theme> = {\n display: 'inline-flex',\n flexDirection: 'column',\n gap: 2,\n p: 2,\n maxWidth: '100%',\n // `Calendar` renders its own `Paper` with 24px of padding. Nested in this one\n // that reads as a box inside a box, so the inner frame is flattened here\n // through the className hook the component exposes for exactly this.\n [`& .${CALENDAR_CLASS}`]: {\n p: 0,\n boxShadow: 'none',\n backgroundColor: 'transparent',\n backgroundImage: 'none',\n },\n};\n\nconst BODY_SX: SxProps<Theme> = {\n display: 'flex',\n // The quick column sits BESIDE the calendar on a wide screen. Narrow, it\n // moves ABOVE it — `column-reverse`, so the DOM order stays calendar-then-\n // list (the calendar is the primary control and should be reached first by a\n // screen reader and by Tab) while the eye meets the quick ranges first, which\n // is the order the phone mock asks for and the order a thumb wants: nine\n // one-tap answers before a grid of thirty.\n //\n // A side column at 390px would squeeze the day grid to roughly half its width\n // and make the numbers unreadable. Checked at 390px.\n flexDirection: { xs: 'column-reverse', md: 'row' },\n alignItems: { xs: 'stretch', md: 'flex-start' },\n gap: 2,\n maxWidth: '100%',\n};\n\n/**\n * The rule between the calendar and the quick ranges.\n *\n * Two lists of dates side by side with only whitespace between them read as one\n * ragged thing; the rule says which numbers belong to which control. It turns\n * with the layout — a vertical rule when the list is a column beside the\n * calendar, a horizontal one when it has moved above it — because a divider\n * that keeps its axis while the flex direction flips ends up separating nothing.\n */\nconst QUICK_DIVIDER_SX: SxProps<Theme> = {\n borderColor: 'divider',\n borderStyle: 'solid',\n borderWidth: 0,\n borderLeftWidth: { xs: 0, md: '1px' },\n borderBottomWidth: { xs: '1px', md: 0 },\n pl: { xs: 0, md: 2 },\n pb: { xs: 2, md: 0 },\n alignSelf: 'stretch',\n};\n\n/** And the rule above the typed pair, which is a third way in, not a caption. */\nconst FIELDS_DIVIDER_SX: SxProps<Theme> = {\n borderTop: '1px solid',\n borderColor: 'divider',\n pt: 2,\n};\n\ntype Picker = ReturnType<typeof useDateRangePicker>;\n\n/**\n * How many months to draw.\n *\n * A month grid has a floor: seven columns that must stay legible, which is\n * about 280px. Two of them need 580, so on a phone the consumer's\n * `numberOfMonths` is not a preference that can be honoured — it is a request\n * for a layout that does not fit. Capped here rather than left to the consumer,\n * because the consumer chooses for its own reason (the reports dialog wants two\n * because a period often crosses a month boundary) and has no way to know the\n * picker is currently 390px wide.\n *\n * A media query rather than an `sx` breakpoint: this decides what to RENDER,\n * and CSS cannot un-render a second month.\n *\n * Below the theme's `md` the picker is a phone layout — the same breakpoint the\n * `sx` blocks here switch on. The query is a STRING built from `useTheme()`,\n * not `useMediaQuery`'s callback form: the callback reads the theme from\n * context and throws on a null one, so a consumer that mounts this outside a\n * `ThemeProvider` would crash — which the unit tests here do, and which is a\n * fair thing for a consumer to do. `useTheme()` falls back to MUI's default\n * theme there, whose `md` is the `(max-width:899.95px)` this used to spell out.\n */\nfunction useMonthCount(requested: number | undefined): number | undefined {\n const theme = useTheme();\n const narrow = useMediaQuery(theme.breakpoints.down('md'));\n return narrow ? 1 : requested;\n}\n\n/** The grid, in range mode — `Calendar`, never a second implementation of one. */\nfunction RangeCalendar({\n calendarLabel,\n picker,\n value,\n locale,\n weekStartsOn,\n months,\n maxRangeDays,\n}: {\n picker: Picker;\n value: DateRangeDraft;\n locale: string;\n weekStartsOn: WeekStart;\n months: number | undefined;\n maxRangeDays: number | undefined;\n calendarLabel: string;\n}): React.JSX.Element {\n return (\n <Calendar\n key={picker.viewNonce}\n ariaLabel={calendarLabel}\n className={CALENDAR_CLASS}\n selectionMode=\"range\"\n locale={locale}\n // One prop drives the grid's first column AND the day \"this week\" starts\n // on, so a highlighted week can never begin mid-row.\n firstDayOfWeek={weekStartsOn}\n numberOfMonths={months}\n range={{ start: toLocalDay(value.from), end: toLocalDay(value.to) }}\n // BOTH callbacks, and the intermediate one does the work: the other fires\n // only on the click that CLOSES a range, so a picker wired to it alone\n // would not repaint after the first click.\n onIntermediateRangeChange={picker.pickOnCalendar}\n onRangeChange={picker.pickOnCalendar}\n // The same ceiling the quick list is judged against, so the calendar\n // cannot hand back a window the control has just called too long.\n maxRangeLength={maxRangeDays}\n />\n );\n}\n\n/** The quick ranges, inside the rule that separates them from the grid. */\nfunction QuickColumn({\n picker,\n maxRangeDays,\n dataTestId,\n}: {\n picker: Picker;\n maxRangeDays: number | undefined;\n dataTestId: string;\n}): React.JSX.Element | null {\n if (picker.options.length === 0) return null;\n return (\n <Box sx={QUICK_DIVIDER_SX}>\n <DateRangeQuickList\n options={picker.options}\n activeId={picker.activeId}\n onPick={picker.pickQuick}\n reasonFor={(option) =>\n picker.copy.overMax({ maxRangeDays: maxRangeDays ?? option.days, days: option.days })\n }\n label={picker.copy.quickRanges}\n dataTestId={dataTestId}\n />\n </Box>\n );\n}\n\nexport function DateRangePicker({\n value,\n onChange,\n timeZone,\n now,\n maxRangeDays,\n weekStartsOn = 0,\n quickRanges = DEFAULT_QUICK_RANGES,\n locale = 'en-US',\n numberOfMonths,\n messages,\n dataTestId = 'date-range-picker',\n className,\n}: DateRangePickerProps): React.JSX.Element {\n const picker = useDateRangePicker({\n value,\n onChange,\n timeZone,\n now,\n maxRangeDays,\n weekStartsOn,\n quickRanges,\n messages,\n });\n const months = useMonthCount(numberOfMonths);\n\n return (\n <Paper className={className} data-testid={dataTestId} sx={ROOT_SX}>\n <Box sx={BODY_SX}>\n <RangeCalendar\n calendarLabel={picker.copy.calendarLabel}\n picker={picker}\n value={value}\n locale={locale}\n weekStartsOn={weekStartsOn}\n months={months}\n maxRangeDays={maxRangeDays}\n />\n <QuickColumn picker={picker} maxRangeDays={maxRangeDays} dataTestId={dataTestId} />\n </Box>\n <Box sx={FIELDS_DIVIDER_SX}>\n <DateRangeFields\n value={value}\n status={picker.status}\n messages={picker.copy}\n maxRangeDays={maxRangeDays}\n onEdit={picker.editBound}\n statusId={picker.statusId}\n dataTestId={dataTestId}\n />\n </Box>\n </Paper>\n );\n}\n\nexport default DateRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,mBAAmB;AAC1B,SAAS,gBAAgB;AA6HrB,cA8EE,YA9EF;AAhHJ,IAAM,iBAAiB;AAEvB,IAAM,UAA0B;AAAA,EAC9B,SAAS;AAAA,EACT,eAAe;AAAA,EACf,KAAK;AAAA,EACL,GAAG;AAAA,EACH,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,CAAC,MAAM,cAAc,EAAE,GAAG;AAAA,IACxB,GAAG;AAAA,IACH,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EACnB;AACF;AAEA,IAAM,UAA0B;AAAA,EAC9B,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUT,eAAe,EAAE,IAAI,kBAAkB,IAAI,MAAM;AAAA,EACjD,YAAY,EAAE,IAAI,WAAW,IAAI,aAAa;AAAA,EAC9C,KAAK;AAAA,EACL,UAAU;AACZ;AAWA,IAAM,mBAAmC;AAAA,EACvC,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,iBAAiB,EAAE,IAAI,GAAG,IAAI,MAAM;AAAA,EACpC,mBAAmB,EAAE,IAAI,OAAO,IAAI,EAAE;AAAA,EACtC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE;AAAA,EACnB,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE;AAAA,EACnB,WAAW;AACb;AAGA,IAAM,oBAAoC;AAAA,EACxC,WAAW;AAAA,EACX,aAAa;AAAA,EACb,IAAI;AACN;AA0BA,SAAS,cAAc,WAAmD;AACxE,QAAM,QAAQ,SAAS;AACvB,QAAM,SAAS,cAAc,MAAM,YAAY,KAAK,IAAI,CAAC;AACzD,SAAO,SAAS,IAAI;AACtB;AAGA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQsB;AACpB,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,WAAW;AAAA,MACX,WAAW;AAAA,MACX,eAAc;AAAA,MACd;AAAA,MAGA,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,OAAO,EAAE,OAAO,WAAW,MAAM,IAAI,GAAG,KAAK,WAAW,MAAM,EAAE,EAAE;AAAA,MAIlE,2BAA2B,OAAO;AAAA,MAClC,eAAe,OAAO;AAAA,MAGtB,gBAAgB;AAAA;AAAA,IAjBX,OAAO;AAAA,EAkBd;AAEJ;AAGA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAI6B;AAC3B,MAAI,OAAO,QAAQ,WAAW,EAAG,QAAO;AACxC,SACE,oBAAC,OAAI,IAAI,kBACP;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,OAAO;AAAA,MAChB,UAAU,OAAO;AAAA,MACjB,QAAQ,OAAO;AAAA,MACf,WAAW,CAAC,WACV,OAAO,KAAK,QAAQ,EAAE,cAAc,gBAAgB,OAAO,MAAM,MAAM,OAAO,KAAK,CAAC;AAAA,MAEtF,OAAO,OAAO,KAAK;AAAA,MACnB;AAAA;AAAA,EACF,GACF;AAEJ;AAEO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,cAAc;AAAA,EACd,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AACF,GAA4C;AAC1C,QAAM,SAAS,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,SAAS,cAAc,cAAc;AAE3C,SACE,qBAAC,SAAM,WAAsB,eAAa,YAAY,IAAI,SACxD;AAAA,yBAAC,OAAI,IAAI,SACP;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,eAAe,OAAO,KAAK;AAAA,UAC3B;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,eAAY,QAAgB,cAA4B,YAAwB;AAAA,OACnF;AAAA,IACA,oBAAC,OAAI,IAAI,mBACP;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,QAAQ,OAAO;AAAA,QACf,UAAU,OAAO;AAAA,QACjB;AAAA,QACA,QAAQ,OAAO;AAAA,QACf,UAAU,OAAO;AAAA,QACjB;AAAA;AAAA,IACF,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,0BAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/CalendarDayCell.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport React from 'react';\n\nimport { bandFor } from './Calendar.band';\nimport { isSameDay } from './Calendar.dates';\nimport { buildDayArgs } from './Calendar.selection';\nimport type { CalendarProps, DateRange, MonthMatrixDay, SelectionMode } from './Calendar.types';\nimport { CalendarDay } from './CalendarDay';\n\n// Everything a cell needs that is the same for every cell in the calendar.\nexport interface DayCellContext {\n selectionMode: SelectionMode;\n /** BCP-47 tag each day's spoken name is written in. */\n locale: string;\n value: Date | null;\n range: DateRange;\n hoveredDate: Date | null;\n focusedDate: Date;\n today: Date;\n showOutsideDays: boolean;\n isDisabled: (date: Date) => boolean;\n renderDay?: CalendarProps['renderDay'];\n dayClassName?: CalendarProps['dayClassName'];\n onSelect: (date: Date) => void;\n onHover: (date: Date) => void;\n onHoverEnd: () => void;\n}\n\nexport const CalendarDayCell: FC<DayCellContext & { day: MonthMatrixDay }> = ({\n day,\n focusedDate,\n showOutsideDays,\n renderDay,\n dayClassName,\n onSelect,\n onHover,\n onHoverEnd,\n locale,\n ...context\n}) => {\n const args = buildDayArgs({ day, ...context });\n\n if (renderDay) return <>{renderDay(args)}</>;\n\n return (\n <CalendarDay\n day={args}\n locale={locale}\n band={bandFor({ args, ...context })}\n focused={isSameDay(args.date, focusedDate)}\n showOutsideDays={showOutsideDays}\n dayClassName={dayClassName}\n onSelect={onSelect}\n onHover={onHover}\n onHoverEnd={onHoverEnd}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA0CwB;AAdjB,IAAM,kBAAgE,CAAC;AAAA,EAC5E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,OAAO,aAAa,EAAE,KAAK,GAAG,QAAQ,CAAC;AAE7C,MAAI,UAAW,QAAO,gCAAG,oBAAU,IAAI,GAAE;AAEzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,MAAM,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;AAAA,MAClC,SAAS,UAAU,KAAK,MAAM,WAAW;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/CalendarDay.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport { rem, sxRem } from '../../../tokens/relative';\n\nimport type { DayBand } from './Calendar.band';\nimport { bandColor, endpointFill, endpointHoverFill } from './Calendar.band';\nimport type { DayRenderArgs } from './Calendar.types';\n\n/**\n * A column's width: the 304 design px a month asked for when its seven 40px\n * cells sat 4px apart, shared by seven columns that now touch (FUT-4162). The\n * cell fills its column up to this size, so the month shrinks with its\n * container instead of holding a fixed 304px floor (FUT-3861).\n */\nconst COLUMN_SIZE = sxRem(304 / 7);\n\n/** 304/7 wide to 40 tall: the day's face is a 40 design px circle at full size. */\nconst CELL_RATIO = '38 / 35';\n\ninterface DayState extends DayRenderArgs {\n outside: boolean;\n focused: boolean;\n}\n\n// Order matters: these land on the element in the order listed.\nconst CLASS_FLAGS: Array<[keyof DayState, string]> = [\n ['selected', 'selected'],\n ['inRange', 'in-range'],\n ['rangeStart', 'range-start'],\n ['rangeEnd', 'range-end'],\n ['disabled', 'disabled'],\n ['today', 'today'],\n ['outside', 'outside'],\n ['hovered', 'hovered'],\n ['focused', 'focused'],\n];\n\nconst dayClassNames = (state: DayState, custom?: string): string =>\n [\n 'calendar-day',\n ...CLASS_FLAGS.filter(([flag]) => state[flag]).map(([, name]) => name),\n ...(custom ? [custom] : []),\n ].join(' ');\n\nconst isEndpoint = (day: DayRenderArgs): boolean =>\n day.selected || day.rangeStart || day.rangeEnd;\n\n// The band's share of the cell (see `Calendar.band.ts`): all of it, or the\n// half that faces the rest of the range.\nconst BAND_IMAGE: Record<Exclude<DayBand, 'none'>, (band: string) => string> = {\n full: (band) => `linear-gradient(${band}, ${band})`,\n after: (band) => `linear-gradient(to right, transparent 50%, ${band} 50%)`,\n before: (band) => `linear-gradient(to left, transparent 50%, ${band} 50%)`,\n};\n\n// A gradient's `to right` is physical; a right-to-left grid starts a range on\n// its right, so the two halves trade places there.\nconst inDirection = (band: Exclude<DayBand, 'none'>, theme: Theme): Exclude<DayBand, 'none'> => {\n if (theme.direction !== 'rtl' || band === 'full') return band;\n return band === 'after' ? 'before' : 'after';\n};\n\nconst faceBackgroundFor = (day: DayRenderArgs): ((theme: Theme) => string) | string =>\n isEndpoint(day) ? endpointFill : 'transparent';\n\nconst colorFor = (day: DayRenderArgs, visible: boolean): string => {\n if (isEndpoint(day)) return 'primary.contrastText';\n if (day.disabled) return 'text.disabled';\n // Outside days that are switched off still occupy the grid, they just have\n // nothing to show.\n if (!visible) return 'transparent';\n return 'text.primary';\n};\n\nconst hoverBackgroundFor = (day: DayRenderArgs): ((theme: Theme) => string) | string | undefined => {\n if (day.disabled) return undefined;\n return isEndpoint(day) ? endpointHoverFill : 'action.hover';\n};\n\n// The band reaches the cell's edges so neighbouring days join; where a week\n// row ends, it rounds off instead of stopping square: half the cell each way\n// is a half-round cap on a cell as tall as it is wide.\nconst BAND_RADIUS = '50%';\n\n/**\n * One cell: the band, painted on the button across its whole column, and the\n * day's round face, a `::before` circle behind the number. The face is a\n * pseudo-element so the button's own content stays the bare day number a host's\n * tests query (`getByText('27')` is the cell, as it always was).\n */\nconst dayCellSx = (day: DayRenderArgs, band: DayBand, visible: boolean): SxProps<Theme> => ({\n position: 'relative',\n isolation: 'isolate',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n // The column it ASKS for keeps the month's intrinsic width at 304 (FUT-3861),\n // now that the seven columns carry no gap between them; `maxWidth` and the\n // column's `minmax(0, 1fr)` let it give way below that, and the ratio keeps\n // it 40 tall at full size and shrinking with it.\n width: COLUMN_SIZE,\n maxWidth: '100%',\n aspectRatio: CELL_RATIO,\n justifySelf: 'stretch',\n boxSizing: 'border-box',\n padding: 0,\n border: 'none',\n background: 'none',\n backgroundImage: band === 'none' ? 'none' : (theme: Theme) => BAND_IMAGE[inDirection(band, theme)](bandColor(theme)),\n cursor: day.disabled ? 'not-allowed' : 'pointer',\n color: colorFor(day, visible),\n opacity: !day.inCurrentMonth && visible ? 0.5 : 1,\n fontWeight: day.today || isEndpoint(day) ? 'bold' : 'normal',\n // `nth-child`, counting every cell of the week: a hidden outside day is an\n // inert `span` placeholder (FUT-4144), and `nth-of-type` counted only the\n // buttons, so the caps landed mid-week in a month with hidden outside days.\n '&:nth-child(7n + 1)': { borderStartStartRadius: BAND_RADIUS, borderEndStartRadius: BAND_RADIUS },\n '&:nth-child(7n)': { borderStartEndRadius: BAND_RADIUS, borderEndEndRadius: BAND_RADIUS },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n margin: 'auto',\n zIndex: -1,\n // A circle as tall as the cell: 40 design px at full size (FUT-3861).\n height: '100%',\n aspectRatio: '1 / 1',\n maxWidth: '100%',\n borderRadius: '50%',\n backgroundColor: faceBackgroundFor(day),\n },\n '&:hover::before': {\n backgroundColor: hoverBackgroundFor(day),\n },\n '&:focus': { outline: 'none' },\n '&:focus::before': {\n outline: (theme: Theme) => `${rem(theme, 2)} solid`,\n outlineColor: 'primary.main',\n outlineOffset: sxRem(1),\n },\n});\n\n/**\n * A day's spoken name, whole: \"1 de outubro de 2026\". The cell's text is the\n * bare number, which a screen reader would read as \"1\" — in a two-month range\n * calendar that is two different days.\n */\nconst dayName = (date: Date, locale: string): string =>\n date.toLocaleDateString(locale, { day: 'numeric', month: 'long', year: 'numeric' });\n\nexport interface CalendarDayProps {\n day: DayRenderArgs;\n /** BCP-47 tag the day's accessible name is written in. Default: en-US. */\n locale?: string;\n band: DayBand;\n focused: boolean;\n showOutsideDays: boolean;\n dayClassName?: (args: DayRenderArgs) => string;\n onSelect: (date: Date) => void;\n onHover: (date: Date) => void;\n onHoverEnd: () => void;\n}\n\nexport const CalendarDay: FC<CalendarDayProps> = ({\n day,\n locale = 'en-US',\n band,\n focused,\n showOutsideDays,\n dayClassName,\n onSelect,\n onHover,\n onHoverEnd,\n}) => {\n const visible = day.inCurrentMonth || showOutsideDays;\n const state: DayState = { ...day, outside: !day.inCurrentMonth, focused };\n\n // A day hidden by `showOutsideDays={false}` keeps its place in the grid and\n // nothing else: no button to click in a blank, no name, no tab stop that\n // cannot be seen (FUT-4144).\n if (!visible) {\n return (\n <Box\n component=\"span\"\n aria-hidden=\"true\"\n data-testid=\"calendar-outside-placeholder\"\n sx={{ width: COLUMN_SIZE, maxWidth: '100%', aspectRatio: CELL_RATIO, justifySelf: 'stretch' }}\n />\n );\n }\n\n return (\n <Box\n component=\"button\"\n role=\"gridcell\"\n tabIndex={focused ? 0 : -1}\n aria-selected={day.selected}\n aria-disabled={day.disabled}\n aria-current={day.today ? 'date' : undefined}\n aria-label={dayName(day.date, locale)}\n data-in-month={day.inCurrentMonth}\n className={dayClassNames(state, dayClassName?.(day))}\n data-testid={`calendar-date-${day.date.getDate()}`}\n onClick={() => onSelect(day.date)}\n onMouseEnter={() => onHover(day.date)}\n onMouseLeave={onHoverEnd}\n sx={dayCellSx(day, band, visible)}\n >\n {day.selected && (\n <Box component=\"span\" data-testid=\"calendar-selected-date\" sx={{ display: 'none' }} />\n )}\n {day.today && (\n <Box component=\"span\" data-testid=\"calendar-today\" sx={{ display: 'none' }} />\n )}\n {day.date.getDate()}\n </Box>\n );\n};\n"],"mappings":"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","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/CalendarMonth.tsx"],"sourcesContent":["import ChevronLeft from '@mui/icons-material/ChevronLeft';\nimport ChevronRight from '@mui/icons-material/ChevronRight';\nimport Box from '@mui/material/Box/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport type { CalendarLabels } from '../../../copy/labels';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport { rem, sxRem } from '../../../tokens/relative';\n\nimport { getMonthName } from './Calendar.dates';\nimport type { CalendarProps, MonthMatrix } from './Calendar.types';\nimport type { DayCellContext } from './CalendarDayCell';\nimport { CalendarDayCell } from './CalendarDayCell';\n\n/** The nav spacer's width and the weekday row's height, 32 design px through the type scale. */\nconst SPACER_WIDTH = sxRem(32);\n\n// `minmax(0, 1fr)`, not `1fr`: a bare `1fr` keeps each column at least its\n// content's width, which is what held the grid at 304px (FUT-3861). No column\n// gap: a selected range is one band across the days, and a gap cut it into\n// tiles (FUT-4162). Rows keep theirs. Items centre in their column: the built-in\n// day stretches across it, a host's `renderDay` cell sits in its middle.\nconst GRID_SX = {\n display: 'grid',\n justifyItems: 'center',\n gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',\n columnGap: 0,\n rowGap: 0.5,\n} as const;\n\n/**\n * A month takes the room it is given, from nothing up to seven full columns\n * (304 design px: what 7 × 40 cells and 6 × 4 gaps came to before the gaps\n * went, FUT-4162). Months side by side keep a 280 basis,\n * so a multi-month calendar still wraps rather than squeezing every month.\n * The basis is a theme callback: `sxRem` interpolated into the string wrote a\n * function's source, and Emotion's whole `flex` was dropped (FUT-4486).\n */\nexport const MONTH_SX = {\n flex: (theme: Theme) => `1 1 ${rem(theme, 280)}`,\n minWidth: 0,\n maxWidth: sxRem(304),\n} as const;\n\n/** The two arrows' accessible names; an icon alone names nothing. */\nexport type MonthArrowLabels = Pick<CalendarLabels, 'previousMonth' | 'nextMonth'>;\n\n// Only the outermost months carry arrows; the ones between get a spacer so their\n// titles stay centred.\nconst MonthNavHeader: FC<{\n title: React.ReactNode;\n showPrevious: boolean;\n showNext: boolean;\n labels?: MonthArrowLabels;\n onPreviousMonth: () => void;\n onNextMonth: () => void;\n}> = ({ title, showPrevious, showNext, labels, onPreviousMonth, onNextMonth }) => (\n <Box\n sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}\n data-testid=\"calendar-header\"\n >\n {showPrevious && (\n <IconButton\n onClick={onPreviousMonth}\n size=\"small\"\n aria-label={labels?.previousMonth}\n data-testid=\"calendar-prev-month\"\n >\n <ChevronLeft />\n </IconButton>\n )}\n\n <Typography\n variant=\"h6\"\n component=\"h2\"\n sx={{ fontWeight: 'bold', flex: 1, textAlign: 'center' }}\n >\n {title}\n </Typography>\n\n {showNext && (\n <IconButton\n onClick={onNextMonth}\n size=\"small\"\n aria-label={labels?.nextMonth}\n data-testid=\"calendar-next-month\"\n >\n <ChevronRight />\n </IconButton>\n )}\n\n {!showPrevious && !showNext && <Box sx={{ width: SPACER_WIDTH }} />}\n </Box>\n);\n\nconst WeekdayHeader: FC<{ weekdayNames: string[] }> = ({ weekdayNames }) => (\n <Box sx={{ ...GRID_SX, mb: 1 }}>\n {weekdayNames.map((weekday, index) => (\n <Box\n // Narrow weekday names repeat within a week ('S', 'T'), so position is\n // the only stable key here.\n key={`weekday-${index}`}\n role=\"columnheader\"\n data-testid={`calendar-weekday-${index}`}\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: SPACER_WIDTH,\n fontSize: sxRem(14),\n fontWeight: 'bold',\n color: 'text.secondary',\n }}\n >\n {weekday}\n </Box>\n ))}\n </Box>\n);\n\n/** The weekday row and the day grid under a month's caption. */\nexport const MonthDays: FC<{\n matrix: MonthMatrix;\n monthIndex: number;\n weekdayNames: string[];\n dayContext: DayCellContext;\n}> = ({ matrix, weekdayNames, dayContext }) => (\n <>\n <WeekdayHeader weekdayNames={weekdayNames} />\n\n <Box\n role=\"grid\"\n // Named by its month in words. It pointed at an id nothing carried, so\n // the grid had no name at all and a two-month calendar read as two\n // anonymous grids.\n aria-label={getMonthName(matrix.month, matrix.year, dayContext.locale)}\n data-testid=\"calendar-grid\"\n sx={GRID_SX}\n >\n {matrix.weeks.flat().map((day) => (\n <CalendarDayCell key={day.key} day={day} {...dayContext} />\n ))}\n </Box>\n </>\n);\n\nexport interface CalendarMonthProps {\n matrix: MonthMatrix;\n monthIndex: number;\n monthsToShow: number;\n locale: string;\n weekdayNames: string[];\n renderHeader?: CalendarProps['renderHeader'];\n /** The arrows' accessible names. */\n labels?: MonthArrowLabels;\n onPreviousMonth: () => void;\n onNextMonth: () => void;\n dayContext: DayCellContext;\n}\n\nexport const CalendarMonth: FC<CalendarMonthProps> = ({\n matrix,\n monthIndex,\n monthsToShow,\n locale,\n weekdayNames,\n renderHeader,\n labels,\n onPreviousMonth,\n onNextMonth,\n dayContext,\n}) => {\n const monthName = getMonthName(matrix.month, matrix.year, locale);\n const title = renderHeader ? renderHeader({ month: matrix.month, year: matrix.year }) : monthName;\n\n return (\n /* The month is addressable by its position, because in a multi-month\n calendar every day number appears once PER MONTH — `calendar-date-5` is\n January's 5th and February's. Without a per-month hook a test can only\n reach a day positionally, which is exactly what the flakiness gate\n refuses. Additive: `calendar-grid` below is unchanged. */\n <Box sx={MONTH_SX} data-testid={`calendar-month-${monthIndex}`}>\n <MonthNavHeader\n title={title}\n showPrevious={monthIndex === 0}\n showNext={monthIndex === monthsToShow - 1}\n labels={labels}\n onPreviousMonth={onPreviousMonth}\n onNextMonth={onNextMonth}\n />\n\n <MonthDays\n matrix={matrix}\n monthIndex={monthIndex}\n weekdayNames={weekdayNames}\n dayContext={dayContext}\n />\n </Box>\n );\n};\n"],"mappings":"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","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/Calendar.band.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles/index.js';\n\nimport { alpha, blend, darken, decomposeColor, getContrastRatio, getLuminance, lighten } from '../../../tokens/color';\n\nimport { isSameDay } from './Calendar.dates';\nimport type { DateRange, DayRenderArgs, SelectionMode } from './Calendar.types';\n\n/**\n * WHERE A DAY SITS ON THE RANGE BAND (FUT-4162).\n *\n * A selected range is ONE band behind its days, not a tile per day: the grid\n * has no column gap and each day paints its share of the band. A day strictly\n * inside the range paints all of it (`full`); the first and last day paint the\n * half that faces the rest of the range (`after` / `before`), so the band runs\n * into the round endpoint and stops at its centre. A range of one day, or no\n * range, paints none.\n *\n * While only the start is chosen, the hovered day stands in for the end, the\n * same preview `isDateInRange` draws.\n */\nexport type DayBand = 'none' | 'full' | 'after' | 'before';\n\n// The other end of the range: its end, or while only the start is chosen, the\n// hovered day standing in for it.\nconst otherEnd = (range: DateRange, hoveredDate: Date | null, isDisabled: (date: Date) => boolean) =>\n range.end ?? (hoveredDate && !isDisabled(hoveredDate) ? hoveredDate : null);\n\n// The half an endpoint paints: towards the rest of the range.\nconst endpointBand = (date: Date, start: Date, other: Date): DayBand => {\n const [first, last] = start < other ? [start, other] : [other, start];\n if (isSameDay(date, first)) return 'after';\n if (isSameDay(date, last)) return 'before';\n return 'none';\n};\n\nexport const bandFor = ({\n args,\n selectionMode,\n range,\n hoveredDate,\n isDisabled,\n}: {\n args: DayRenderArgs;\n selectionMode: SelectionMode;\n range: DateRange;\n hoveredDate: Date | null;\n isDisabled: (date: Date) => boolean;\n}): DayBand => {\n if (selectionMode !== 'range') return 'none';\n if (args.inRange) return 'full';\n\n const other = otherEnd(range, hoveredDate, isDisabled);\n if (!range.start || !other || isSameDay(range.start, other)) return 'none';\n return endpointBand(args.date, range.start, other);\n};\n\n/**\n * The band: the brand at a quarter strength, so it reads as the brand's tint on\n * any ground (on white it is the brand three quarters of the way to white).\n */\nexport const BAND_OPACITY = 0.25;\n\nexport const bandColor = (theme: Theme): string => alpha(theme.palette.primary.main, BAND_OPACITY);\n\n/**\n * WCAG AA for body text, plus a margin: `getLuminance` rounds to three\n * places, which can move a ratio by about a hundredth either way.\n */\nconst ENDPOINT_MIN_CONTRAST = 4.55;\nconst STEP = 0.01;\n\n// The ink as it reads ON the fill: MUI's dark ink is 87% black, so it is laid\n// over the fill before it is measured, rather than taken as solid black.\nconst readsAt = (ink: string, fill: string): number => {\n const [, , , opacity = 1] = decomposeColor(ink).values;\n return getContrastRatio(opacity < 1 ? blend(fill, ink, opacity) : ink, fill);\n};\n\n// Light ink (white) wants a darker fill; dark ink a lighter one.\nconst awayFromInk = (ink: string): ((color: string, coefficient: number) => string) =>\n getLuminance(ink) > 0.5 ? darken : lighten;\n\n/**\n * An endpoint's fill: the brand, moved away from its own ink JUST far enough\n * for that ink to read at AA (FUT-4162).\n *\n * The ink is the palette's `primary.contrastText`, which MUI picks at 3:1, so\n * a brand can ship an ink that reads at 3 to 4.5:1 on it — the default indigo\n * is 4.47:1 under white. Rather than change the ink (every other component\n * shares it), the fill gives way: darker under white ink, lighter under dark\n * ink. A brand that already passes is returned unchanged; the default indigo\n * moves by one percent, which no one can see.\n */\nexport const endpointFill = (theme: Theme): string => {\n const { main, contrastText } = theme.palette.primary;\n try {\n if (readsAt(contrastText, main) >= ENDPOINT_MIN_CONTRAST) return main;\n const move = awayFromInk(contrastText);\n for (let coefficient = STEP; coefficient < 1; coefficient += STEP) {\n const fill = move(main, coefficient);\n if (readsAt(contrastText, fill) >= ENDPOINT_MIN_CONTRAST) return fill;\n }\n return move(main, 1);\n } catch {\n // A colour format the helpers cannot decompose: the brand as it is.\n return main;\n }\n};\n\n/** A hovered endpoint: one more step the same way, so it only gains contrast. */\nexport const endpointHoverFill = (theme: Theme): string => {\n const fill = endpointFill(theme);\n try {\n return awayFromInk(theme.palette.primary.contrastText)(fill, 0.15);\n } catch {\n return fill;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;AAwBA,IAAM,WAAW,CAAC,OAAkB,aAA0B,eAC5D,MAAM,QAAQ,eAAe,CAAC,WAAW,WAAW,IAAI,cAAc;AAGxE,IAAM,eAAe,CAAC,MAAY,OAAa,UAAyB;AACtE,QAAM,CAAC,OAAO,IAAI,IAAI,QAAQ,QAAQ,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,KAAK;AACpE,MAAI,UAAU,MAAM,KAAK,EAAG,QAAO;AACnC,MAAI,UAAU,MAAM,IAAI,EAAG,QAAO;AAClC,SAAO;AACT;AAEO,IAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAMe;AACb,MAAI,kBAAkB,QAAS,QAAO;AACtC,MAAI,KAAK,QAAS,QAAO;AAEzB,QAAM,QAAQ,SAAS,OAAO,aAAa,UAAU;AACrD,MAAI,CAAC,MAAM,SAAS,CAAC,SAAS,UAAU,MAAM,OAAO,KAAK,EAAG,QAAO;AACpE,SAAO,aAAa,KAAK,MAAM,MAAM,OAAO,KAAK;AACnD;AAMO,IAAM,eAAe;AAErB,IAAM,YAAY,CAAC,UAAyB,MAAM,MAAM,QAAQ,QAAQ,MAAM,YAAY;AAMjG,IAAM,wBAAwB;AAC9B,IAAM,OAAO;AAIb,IAAM,UAAU,CAAC,KAAa,SAAyB;AACrD,QAAM,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,IAAI,eAAe,GAAG,EAAE;AAChD,SAAO,iBAAiB,UAAU,IAAI,MAAM,MAAM,KAAK,OAAO,IAAI,KAAK,IAAI;AAC7E;AAGA,IAAM,cAAc,CAAC,QACnB,aAAa,GAAG,IAAI,MAAM,SAAS;AAa9B,IAAM,eAAe,CAAC,UAAyB;AACpD,QAAM,EAAE,MAAM,aAAa,IAAI,MAAM,QAAQ;AAC7C,MAAI;AACF,QAAI,QAAQ,cAAc,IAAI,KAAK,sBAAuB,QAAO;AACjE,UAAM,OAAO,YAAY,YAAY;AACrC,aAAS,cAAc,MAAM,cAAc,GAAG,eAAe,MAAM;AACjE,YAAM,OAAO,KAAK,MAAM,WAAW;AACnC,UAAI,QAAQ,cAAc,IAAI,KAAK,sBAAuB,QAAO;AAAA,IACnE;AACA,WAAO,KAAK,MAAM,CAAC;AAAA,EACrB,QAAQ;AAEN,WAAO;AAAA,EACT;AACF;AAGO,IAAM,oBAAoB,CAAC,UAAyB;AACzD,QAAM,OAAO,aAAa,KAAK;AAC/B,MAAI;AACF,WAAO,YAAY,MAAM,QAAQ,QAAQ,YAAY,EAAE,MAAM,IAAI;AAAA,EACnE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/CalendarSelectorsMonth.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport type { FC } from 'react';\nimport React, { useId } from 'react';\n\nimport type { CalendarLabels } from '../../../copy/labels';\n\nimport { getMonthLabel } from './Calendar.dates';\nimport type { CalendarPicker } from './Calendar.picker';\nimport type { MonthMatrix } from './Calendar.types';\nimport type { DateBounds } from './Calendar.views';\nimport { MONTH_INDEXES, canShiftMonth, isMonthOutOfBounds, isYearOutOfBounds, yearOptions } from './Calendar.views';\nimport type { DayCellContext } from './CalendarDayCell';\nimport { MONTH_SX, MonthDays } from './CalendarMonth';\nimport type { PickerOption } from './CalendarPickerGrid';\nimport { CalendarPickerGrid } from './CalendarPickerGrid';\nimport { CalendarSelectorsCaption } from './CalendarSelectorsCaption';\n\n/** The days and the open grid share one cell, so opening a grid never resizes the calendar. */\nconst BODY_SX = { display: 'grid' } as const;\n\n/** Adds no height of its own; a long year list scrolls inside the days' height. */\nconst PICKER_SLOT_SX = {\n gridArea: '1 / 1',\n height: 0,\n minHeight: '100%',\n} as const;\n\nconst YEAR_COLUMNS = 4;\nconst MONTH_COLUMNS = 3;\n\nexport interface CalendarSelectorsMonthProps {\n matrix: MonthMatrix;\n locale: string;\n weekdayNames: string[];\n dayContext: DayCellContext;\n bounds: DateBounds;\n labels: CalendarLabels;\n picker: CalendarPicker;\n onPreviousMonth: () => void;\n onNextMonth: () => void;\n}\n\nconst monthOptions = ({ year, month }: MonthMatrix, locale: string, bounds: DateBounds): PickerOption[] =>\n MONTH_INDEXES.map((index) => ({\n value: index,\n label: getMonthLabel(index, locale, 'short'),\n ariaLabel: getMonthLabel(index, locale, 'long'),\n disabled: isMonthOutOfBounds(year, index, bounds),\n current: index === month,\n }));\n\n// The list is cut at the bounds' years, so only a shown year outside them is\n// disabled.\nconst yearPickerOptions = ({ year }: MonthMatrix, bounds: DateBounds): PickerOption[] =>\n yearOptions(bounds, year).map((option) => ({\n value: option,\n label: String(option),\n disabled: isYearOutOfBounds(option, bounds),\n current: option === year,\n }));\n\n/**\n * The one month of `captionLayout=\"selectors\"`: the month/year caption over the\n * days, or over the month or year grid that stands in for them.\n */\nexport const CalendarSelectorsMonth: FC<CalendarSelectorsMonthProps> = ({\n matrix,\n locale,\n weekdayNames,\n dayContext,\n bounds,\n labels,\n picker,\n onPreviousMonth,\n onNextMonth,\n}) => {\n const idPrefix = useId();\n const monthsId = `${idPrefix}-months`;\n const yearsId = `${idPrefix}-years`;\n const shown = new Date(matrix.year, matrix.month, 1);\n\n const picking = picker.view !== 'days';\n\n return (\n <Box sx={MONTH_SX} data-testid=\"calendar-month-0\">\n <CalendarSelectorsCaption\n monthText={getMonthLabel(matrix.month, locale, 'long')}\n monthNames={MONTH_INDEXES.map((index) => getMonthLabel(index, locale, 'long'))}\n year={matrix.year}\n view={picker.view}\n labels={labels}\n monthsId={monthsId}\n yearsId={yearsId}\n canGoPrevious={canShiftMonth(shown, -1, bounds)}\n canGoNext={canShiftMonth(shown, 1, bounds)}\n onToggle={picker.toggle}\n onEscape={picker.dismiss}\n onPreviousMonth={onPreviousMonth}\n onNextMonth={onNextMonth}\n />\n\n <Box sx={BODY_SX}>\n {/* The days keep their place while a grid is open, so the calendar keeps their size at every density. */}\n <Box sx={{ gridArea: '1 / 1', visibility: picking ? 'hidden' : 'visible' }} data-testid=\"calendar-days\">\n <MonthDays matrix={matrix} monthIndex={0} weekdayNames={weekdayNames} dayContext={dayContext} />\n </Box>\n {picking && (\n <Box sx={PICKER_SLOT_SX}>\n {picker.view === 'months' && (\n <CalendarPickerGrid\n id={monthsId}\n ariaLabel={labels.months}\n columns={MONTH_COLUMNS}\n options={monthOptions(matrix, locale, bounds)}\n testId=\"calendar-months\"\n onPick={picker.pickMonth}\n onDismiss={picker.dismiss}\n />\n )}\n {picker.view === 'years' && (\n <CalendarPickerGrid\n id={yearsId}\n ariaLabel={labels.years}\n columns={YEAR_COLUMNS}\n options={yearPickerOptions(matrix, bounds)}\n testId=\"calendar-years\"\n scrollable\n onPick={picker.pickYear}\n onDismiss={picker.dismiss}\n />\n )}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAEhB,SAAgB,aAAa;AAmFvB,cAsBI,YAtBJ;AAnEN,IAAM,UAAU,EAAE,SAAS,OAAO;AAGlC,IAAM,iBAAiB;AAAA,EACrB,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AACb;AAEA,IAAM,eAAe;AACrB,IAAM,gBAAgB;AActB,IAAM,eAAe,CAAC,EAAE,MAAM,MAAM,GAAgB,QAAgB,WAClE,cAAc,IAAI,CAAC,WAAW;AAAA,EAC5B,OAAO;AAAA,EACP,OAAO,cAAc,OAAO,QAAQ,OAAO;AAAA,EAC3C,WAAW,cAAc,OAAO,QAAQ,MAAM;AAAA,EAC9C,UAAU,mBAAmB,MAAM,OAAO,MAAM;AAAA,EAChD,SAAS,UAAU;AACrB,EAAE;AAIJ,IAAM,oBAAoB,CAAC,EAAE,KAAK,GAAgB,WAChD,YAAY,QAAQ,IAAI,EAAE,IAAI,CAAC,YAAY;AAAA,EACzC,OAAO;AAAA,EACP,OAAO,OAAO,MAAM;AAAA,EACpB,UAAU,kBAAkB,QAAQ,MAAM;AAAA,EAC1C,SAAS,WAAW;AACtB,EAAE;AAMG,IAAM,yBAA0D,CAAC;AAAA,EACtE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,WAAW,MAAM;AACvB,QAAM,WAAW,GAAG,QAAQ;AAC5B,QAAM,UAAU,GAAG,QAAQ;AAC3B,QAAM,QAAQ,IAAI,KAAK,OAAO,MAAM,OAAO,OAAO,CAAC;AAEnD,QAAM,UAAU,OAAO,SAAS;AAEhC,SACE,qBAAC,OAAI,IAAI,UAAU,eAAY,oBAC7B;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,cAAc,OAAO,OAAO,QAAQ,MAAM;AAAA,QACrD,YAAY,cAAc,IAAI,CAAC,UAAU,cAAc,OAAO,QAAQ,MAAM,CAAC;AAAA,QAC7E,MAAM,OAAO;AAAA,QACb,MAAM,OAAO;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe,cAAc,OAAO,IAAI,MAAM;AAAA,QAC9C,WAAW,cAAc,OAAO,GAAG,MAAM;AAAA,QACzC,UAAU,OAAO;AAAA,QACjB,UAAU,OAAO;AAAA,QACjB;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAEA,qBAAC,OAAI,IAAI,SAEP;AAAA,0BAAC,OAAI,IAAI,EAAE,UAAU,SAAS,YAAY,UAAU,WAAW,UAAU,GAAG,eAAY,iBACtF,8BAAC,aAAU,QAAgB,YAAY,GAAG,cAA4B,YAAwB,GAChG;AAAA,MACC,WACC,qBAAC,OAAI,IAAI,gBACN;AAAA,eAAO,SAAS,YACf;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,WAAW,OAAO;AAAA,YAClB,SAAS;AAAA,YACT,SAAS,aAAa,QAAQ,QAAQ,MAAM;AAAA,YAC5C,QAAO;AAAA,YACP,QAAQ,OAAO;AAAA,YACf,WAAW,OAAO;AAAA;AAAA,QACpB;AAAA,QAED,OAAO,SAAS,WACf;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,WAAW,OAAO;AAAA,YAClB,SAAS;AAAA,YACT,SAAS,kBAAkB,QAAQ,MAAM;AAAA,YACzC,QAAO;AAAA,YACP,YAAU;AAAA,YACV,QAAQ,OAAO;AAAA,YACf,WAAW,OAAO;AAAA;AAAA,QACpB;AAAA,SAEJ;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/Calendar.helpers.ts"],"sourcesContent":["import type { CalendarProps, ResolvedCalendarProps } from './Calendar.types';\n\nconst CALENDAR_DEFAULTS = {\n selectionMode: 'single',\n value: null,\n range: { start: null, end: null },\n firstDayOfWeek: 0,\n locale: 'en-US',\n showOutsideDays: true,\n minRangeLength: 1,\n allowSameDayRange: true,\n autoFocus: false,\n captionLayout: 'arrows',\n} as const satisfies Partial<CalendarProps>;\n\n// Strips explicitly-undefined props before the merge, so `prop={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = (props: CalendarProps): Partial<CalendarProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<CalendarProps>;\n\n// Applied as a merge rather than destructuring defaults, which would otherwise\n// put nine branches into the component's own complexity budget.\nexport const resolveCalendarProps = (props: CalendarProps): ResolvedCalendarProps => {\n const merged = { ...CALENDAR_DEFAULTS, ...definedProps(props) } as ResolvedCalendarProps;\n\n // A range needs two months side by side to be picked comfortably; a single\n // date does not.\n const defaultMonths = merged.selectionMode === 'range' ? 2 : 1;\n\n // The selectors caption names ONE month and one year, so it shows one month.\n if (merged.captionLayout === 'selectors') return { ...merged, monthsToShow: 1 };\n\n return { ...merged, monthsToShow: merged.numberOfMonths ?? defaultMonths };\n};\n"],"mappings":";AAEA,IAAM,oBAAoB;AAAA,EACxB,eAAe;AAAA,EACf,OAAO;AAAA,EACP,OAAO,EAAE,OAAO,MAAM,KAAK,KAAK;AAAA,EAChC,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,eAAe;AACjB;AAIA,IAAM,eAAe,CAAC,UACpB,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAIK,IAAM,uBAAuB,CAAC,UAAgD;AACnF,QAAM,SAAS,EAAE,GAAG,mBAAmB,GAAG,aAAa,KAAK,EAAE;AAI9D,QAAM,gBAAgB,OAAO,kBAAkB,UAAU,IAAI;AAG7D,MAAI,OAAO,kBAAkB,YAAa,QAAO,EAAE,GAAG,QAAQ,cAAc,EAAE;AAE9E,SAAO,EAAE,GAAG,QAAQ,cAAc,OAAO,kBAAkB,cAAc;AAC3E;","names":[]}
|