@12-apps/ui 6.81.0 → 6.83.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 +10 -3
- package/components-guidelines.md +38 -0
- package/dist/_internal/components/data-display/Alert/Alert.js +3 -3
- 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 +6 -6
- package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +4 -4
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +14 -14
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +10 -10
- package/dist/_internal/components/data-display/Carousel/Carousel.js +4 -4
- 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 +49 -49
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +68 -68
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +6 -6
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +12 -12
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +6 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +3 -3
- 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 +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +10 -10
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +43 -43
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +22 -22
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +3 -3
- 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 +7 -7
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +3 -3
- 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 +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +14 -14
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +2 -2
- package/dist/_internal/components/data-display/InteractiveTooltip/InteractiveTooltip.js +2 -2
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +6 -6
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +6 -6
- package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +5 -5
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- 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 +5 -5
- 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 +71 -71
- 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 +8 -8
- package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +3 -3
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +6 -6
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +14 -14
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js +8 -8
- package/dist/_internal/components/feedback/Sonner/Sonner.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +7 -7
- package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
- package/dist/_internal/components/feedback/Toast/Toast.js +2 -2
- package/dist/_internal/components/feedback/index.js +31 -31
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +6 -6
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +4 -4
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
- package/dist/_internal/components/form/Button/Button.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.dates.js +3 -1
- package/dist/_internal/components/form/Calendar/Calendar.helpers.js +1 -1
- package/dist/_internal/components/form/Calendar/Calendar.hooks.js +4 -4
- package/dist/_internal/components/form/Calendar/Calendar.js +15 -8
- package/dist/_internal/components/form/Calendar/Calendar.keyboard.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.picker.js +10 -0
- package/dist/_internal/components/form/Calendar/Calendar.picker.js.map +1 -0
- package/dist/_internal/components/form/Calendar/Calendar.selection.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.views.js +27 -0
- package/dist/_internal/components/form/Calendar/Calendar.views.js.map +1 -0
- 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/CalendarPickerGrid.js +11 -0
- package/dist/_internal/components/form/Calendar/CalendarPickerGrid.js.map +1 -0
- package/dist/_internal/components/form/Calendar/CalendarSelectorsCaption.js +9 -0
- package/dist/_internal/components/form/Calendar/CalendarSelectorsCaption.js.map +1 -0
- package/dist/_internal/components/form/Calendar/CalendarSelectorsMonth.js +17 -0
- package/dist/_internal/components/form/Calendar/CalendarSelectorsMonth.js.map +1 -0
- package/dist/_internal/components/form/CepField/CepField.js +1 -1
- 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.dates.js +2 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +5 -5
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +21 -15
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.quick.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +5 -5
- 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 +38 -33
- package/dist/_internal/components/form/total-form/Fields/CepField.js +2 -2
- package/dist/_internal/components/form/total-form/Fields/index.js +3 -3
- package/dist/_internal/components/form/total-form/FormErrorSnackbar.js +3 -3
- package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
- package/dist/_internal/components/index.js +160 -155
- 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/SettingCard/SettingCard.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +3 -3
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +6 -6
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +4 -4
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +8 -8
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +8 -8
- 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 +20 -20
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +9 -9
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +2 -2
- package/dist/_internal/components/navigation/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/index.js +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.labels.js +1 -1
- package/dist/_internal/pt-BR.labels.js +1 -1
- package/dist/_internal/social-login-button/social-login-button.js +4 -4
- package/dist/_internal/user-avatar/user-avatar.js +7 -7
- package/dist/charts.js +17 -17
- package/dist/{chunk-5JDY5W7O.js → chunk-2SBQ47RI.js} +3 -3
- package/dist/{chunk-Y3YZBB74.js → chunk-2ZMR3TZU.js} +2 -2
- package/dist/{chunk-RIDCGFGM.js → chunk-34FX3NRZ.js} +2 -2
- package/dist/{chunk-7H5BIZ33.js → chunk-37G7M2GJ.js} +4 -4
- package/dist/{chunk-VAGGIRLA.js → chunk-3RHU2Y2N.js} +3 -3
- package/dist/{chunk-QYX4567K.js → chunk-3S352ZSG.js} +2 -2
- package/dist/{chunk-L4FWEI2P.js → chunk-3V3Z4EML.js} +5 -5
- package/dist/{chunk-W3EVATBS.js → chunk-3YFDGFEK.js} +5 -5
- package/dist/{chunk-VJG43WKU.js → chunk-45AON4CS.js} +2 -2
- package/dist/{chunk-GX2LIB4T.js → chunk-4IG73U2X.js} +2 -2
- package/dist/{chunk-DD3VFDB2.js → chunk-4IVEBBF6.js} +3 -3
- package/dist/{chunk-DE2GWZ6X.js → chunk-4J62V5OE.js} +3 -3
- package/dist/{chunk-V65YK5DC.js → chunk-4QGMUHAU.js} +2 -2
- package/dist/{chunk-6IVR5HFI.js → chunk-4UCXJYOO.js} +6 -6
- package/dist/{chunk-UK3DSFMK.js → chunk-54F7QIV2.js} +2 -2
- package/dist/{chunk-ZDBG7QG2.js → chunk-54OJAOXC.js} +8 -8
- package/dist/{chunk-634Z7HGN.js → chunk-5CP6VW5H.js} +6 -6
- package/dist/{chunk-52UVUVYQ.js → chunk-5RPT32EL.js} +2 -2
- package/dist/chunk-66TCKXOB.js +102 -0
- package/dist/chunk-66TCKXOB.js.map +1 -0
- package/dist/{chunk-QADTI63U.js → chunk-6ATXOJVQ.js} +4 -4
- package/dist/{chunk-GMU5AA3R.js → chunk-6OYB3MRF.js} +5 -5
- package/dist/{chunk-OCLEKMBP.js → chunk-73BMQ3VC.js} +2 -2
- package/dist/{chunk-4NVEUJXK.js → chunk-76IHYINM.js} +5 -5
- package/dist/{chunk-OOCD2QR3.js → chunk-7QKFMMWK.js} +2 -2
- package/dist/{chunk-Z52W7FEU.js → chunk-7W5X3KQ2.js} +2 -2
- package/dist/{chunk-EOQ6EKTS.js → chunk-7XSCEHGA.js} +7 -7
- package/dist/{chunk-OTION43A.js → chunk-A5U7HEBI.js} +12 -12
- package/dist/{chunk-XF47LPCF.js → chunk-ABVIMFSD.js} +2 -2
- package/dist/{chunk-ABJOW7EK.js → chunk-ALOEOGQV.js} +4 -4
- package/dist/{chunk-HI7JPDD6.js → chunk-AMLHEKSV.js} +5 -5
- package/dist/{chunk-BLHSLB5D.js → chunk-APBIQH4G.js} +3 -3
- package/dist/{chunk-RMZQHJEP.js → chunk-ATJTGQYE.js} +2 -2
- package/dist/{chunk-URAX2JPM.js → chunk-B32XH7NK.js} +3 -3
- package/dist/{chunk-BX6CF2UG.js → chunk-BLNFOP2O.js} +4 -4
- package/dist/{chunk-NGXDOWUP.js → chunk-BNBWUXT3.js} +4 -4
- package/dist/{chunk-LHRAHDJF.js → chunk-BO6IMK5P.js} +3 -3
- package/dist/{chunk-7UDQJOZZ.js → chunk-C347NNZJ.js} +2 -2
- package/dist/{chunk-NWNHSASQ.js → chunk-CAOL4AIB.js} +2 -2
- package/dist/{chunk-TLZR6UPJ.js → chunk-COK65GX2.js} +2 -2
- package/dist/{chunk-BMVLTTTC.js → chunk-CY4XIZNW.js} +2 -2
- package/dist/{chunk-UF4JFRLE.js → chunk-D22FGMGU.js} +5 -5
- package/dist/{chunk-LDPN55AA.js → chunk-D3W5A4N6.js} +2 -2
- package/dist/{chunk-B67KUCWU.js → chunk-D5Y4PNC5.js} +2 -2
- package/dist/{chunk-775LIZXS.js → chunk-D72GD4XC.js} +5 -5
- package/dist/{chunk-TLVKJBPM.js → chunk-DAFFZED3.js} +6 -6
- package/dist/{chunk-BLZDSCIZ.js → chunk-DYHOBKPU.js} +6 -6
- package/dist/{chunk-FB4GLQQO.js → chunk-E3E4L7MH.js} +7 -7
- package/dist/{chunk-HWKBCLKD.js → chunk-E5OBAS3U.js} +2 -2
- package/dist/{chunk-WWIYYXY3.js → chunk-E72INDBL.js} +2 -2
- package/dist/{chunk-THD3N4BJ.js → chunk-EBEMNKTK.js} +19 -3
- package/dist/chunk-EBEMNKTK.js.map +1 -0
- package/dist/{chunk-UYNJ3FYE.js → chunk-EOIRU62W.js} +3 -3
- package/dist/{chunk-G3SWMBZS.js → chunk-EWFBDAB7.js} +2 -2
- package/dist/{chunk-NSS3X7FK.js → chunk-EYFDIUVR.js} +2 -2
- package/dist/{chunk-UCQRJTCI.js → chunk-GANJRIT3.js} +2 -2
- package/dist/{chunk-SMANO5OD.js → chunk-GJOU26UW.js} +2 -2
- package/dist/{chunk-H3NXDKFH.js → chunk-GM7BG3SD.js} +2 -2
- package/dist/chunk-GVSRBFP3.js +118 -0
- package/dist/chunk-GVSRBFP3.js.map +1 -0
- package/dist/{chunk-SM2O6D5F.js → chunk-GYFKIPR2.js} +2 -2
- package/dist/{chunk-4PREA2R5.js → chunk-HBH7V3IP.js} +2 -2
- package/dist/{chunk-LUNN5GTB.js → chunk-HF2WLLGH.js} +2 -2
- package/dist/{chunk-U67CX4FL.js → chunk-HKQQ2NED.js} +2 -2
- package/dist/{chunk-JVOEVTCZ.js → chunk-HQCZT6TO.js} +5 -5
- package/dist/{chunk-SUALMVL7.js → chunk-I4K5JMS4.js} +4 -2
- package/dist/chunk-I4K5JMS4.js.map +1 -0
- package/dist/{chunk-C7LHIDVB.js → chunk-ICKR3QTG.js} +3 -3
- package/dist/{chunk-3B7EJIG7.js → chunk-IMYKJTVX.js} +2 -2
- package/dist/{chunk-J7CIRTWQ.js → chunk-J34VGMA5.js} +3 -3
- package/dist/chunk-J6LIZXSF.js +124 -0
- package/dist/chunk-J6LIZXSF.js.map +1 -0
- package/dist/{chunk-DWLSYFQW.js → chunk-JK3QB7MO.js} +3 -3
- package/dist/{chunk-6B7VZFAO.js → chunk-JMDT3GQ3.js} +3 -3
- package/dist/{chunk-E2Y7G4MP.js → chunk-JV2JIUDT.js} +2 -2
- package/dist/{chunk-BTDY2NYV.js → chunk-JXK53XJW.js} +11 -11
- package/dist/{chunk-K3PMMW23.js → chunk-K6VEN5VN.js} +4 -4
- package/dist/{chunk-YOQAK2RN.js → chunk-KES3HNSU.js} +2 -2
- package/dist/{chunk-BFBCTF2Y.js → chunk-KF3Q3C3P.js} +2 -2
- package/dist/{chunk-MKRJUT5O.js → chunk-KSJBFT4G.js} +6 -6
- package/dist/{chunk-AISCD6W6.js → chunk-L5KPBMMF.js} +2 -2
- package/dist/{chunk-ZT73ACK3.js → chunk-LCGK22QQ.js} +7 -7
- package/dist/{chunk-B2RNNJRO.js → chunk-LNIK7FJO.js} +2 -2
- package/dist/{chunk-B25SHVWP.js → chunk-LODYTVOO.js} +4 -4
- package/dist/{chunk-763AHWKU.js → chunk-LOHQLARB.js} +2 -2
- package/dist/{chunk-7HYLXERK.js → chunk-LRIPJ2D5.js} +4 -4
- package/dist/{chunk-F5SUBK42.js → chunk-LXIPBHNJ.js} +6 -6
- package/dist/{chunk-CFDYQSN6.js → chunk-LZ5PGB7U.js} +7 -7
- package/dist/{chunk-FFQ4NOJT.js → chunk-LZOCNAUA.js} +2 -2
- package/dist/{chunk-BLVFHVDM.js → chunk-MLGAGZJ3.js} +19 -19
- package/dist/{chunk-QVEJGFRP.js → chunk-MNNIOQTQ.js} +3 -3
- package/dist/{chunk-AFSXC5FU.js → chunk-MSJP2AEN.js} +2 -2
- package/dist/{chunk-KSOIFQJ6.js → chunk-MT74NRLY.js} +7 -7
- package/dist/{chunk-PAKLYZ6G.js → chunk-N557OEZR.js} +4 -4
- package/dist/{chunk-DKRMOIX2.js → chunk-NASLJO2R.js} +2 -2
- package/dist/{chunk-QVDEGBME.js → chunk-NQCTANF3.js} +7 -7
- package/dist/{chunk-AOBQ3KYY.js → chunk-NZDIO5UG.js} +4 -4
- package/dist/{chunk-5USHYSCO.js → chunk-OKDAHCYE.js} +4 -4
- package/dist/{chunk-ZIHSCBMN.js → chunk-OUI5IPS6.js} +10 -10
- package/dist/{chunk-PGBIUO2A.js → chunk-PEMXXFXL.js} +3 -3
- package/dist/{chunk-FCCOUOP7.js → chunk-PEVBSNCD.js} +2 -2
- package/dist/{chunk-UHQZ5XPW.js → chunk-POUNFTG3.js} +24 -11
- package/dist/chunk-POUNFTG3.js.map +1 -0
- package/dist/{chunk-HTGK7QCX.js → chunk-Q7QQXNL7.js} +2 -2
- package/dist/{chunk-A7LBWRRW.js → chunk-QCYQL3ST.js} +2 -2
- package/dist/{chunk-XDDKRACZ.js → chunk-QHFAKEZZ.js} +3 -3
- package/dist/{chunk-6EERXU6R.js → chunk-QTLM2YY2.js} +2 -2
- package/dist/{chunk-TERT6TIS.js → chunk-QWOI5BZV.js} +9 -4
- package/dist/chunk-QWOI5BZV.js.map +1 -0
- package/dist/{chunk-QKLSHNOH.js → chunk-R26WP22N.js} +2 -2
- package/dist/{chunk-7S3NG2AO.js → chunk-RB3R6BJL.js} +7 -7
- package/dist/{chunk-SXNGH56D.js → chunk-RBW5QQXW.js} +12 -12
- package/dist/{chunk-PJNIJIE6.js → chunk-RCTHCXS6.js} +2 -2
- package/dist/{chunk-DT22MDC3.js → chunk-RDRXTH47.js} +7 -7
- package/dist/{chunk-JMUZ5JZA.js → chunk-RWCQ6TEM.js} +2 -2
- package/dist/{chunk-TIM4PXWN.js → chunk-SB2SEGR6.js} +3 -3
- package/dist/chunk-SUCVFEPT.js +138 -0
- package/dist/chunk-SUCVFEPT.js.map +1 -0
- package/dist/{chunk-FRAVVI4A.js → chunk-SUTOAW7I.js} +2 -2
- package/dist/{chunk-RQ3IS5NQ.js → chunk-SYERREN5.js} +6 -6
- package/dist/{chunk-TAR5LSGT.js → chunk-T77OVQEO.js} +2 -2
- package/dist/{chunk-VRKNVZZQ.js → chunk-TJUWSQYQ.js} +9 -1
- package/dist/{chunk-VRKNVZZQ.js.map → chunk-TJUWSQYQ.js.map} +1 -1
- package/dist/{chunk-V6DMNSW6.js → chunk-TPAMLIN7.js} +3 -3
- package/dist/{chunk-ISW5K72V.js → chunk-TPMT3J32.js} +16 -8
- package/dist/chunk-TPMT3J32.js.map +1 -0
- package/dist/{chunk-7DODMQRK.js → chunk-UBVKMM3V.js} +2 -2
- package/dist/{chunk-5463SZOH.js → chunk-UERGWYGY.js} +2 -2
- package/dist/{chunk-G6ET2DRL.js → chunk-UJACXYC2.js} +3 -3
- package/dist/{chunk-SYZVXWEQ.js → chunk-UQ5GJPVZ.js} +3 -3
- package/dist/{chunk-KW2KCPZF.js → chunk-UQ6SAIX7.js} +4 -4
- package/dist/{chunk-GHTVBYFA.js → chunk-UWVVKUCG.js} +4 -4
- package/dist/{chunk-EXKK73UN.js → chunk-UYKIUUWP.js} +2 -2
- package/dist/{chunk-HWUFOII2.js → chunk-VQ6V5TO7.js} +2 -2
- package/dist/{chunk-OT4HIG7S.js → chunk-VUBFCHXL.js} +4 -4
- package/dist/{chunk-A4B27HYU.js → chunk-WPFVQVQC.js} +4 -4
- package/dist/chunk-WQEGPSGD.js +61 -0
- package/dist/chunk-WQEGPSGD.js.map +1 -0
- package/dist/{chunk-DB7OJM6X.js → chunk-WWB43LWU.js} +2 -2
- package/dist/{chunk-HFZE2PGM.js → chunk-X4J576GR.js} +2 -2
- package/dist/{chunk-NF5TATKP.js → chunk-XATRYJ4Q.js} +5 -5
- package/dist/{chunk-6KCJNERH.js → chunk-XCUHGPPZ.js} +2 -2
- package/dist/{chunk-3LQLLL2J.js → chunk-XE7QBHXN.js} +2 -2
- package/dist/{chunk-YMKSPW4T.js → chunk-XKPV52CG.js} +3 -3
- package/dist/{chunk-QCNUMOTL.js → chunk-XNLJ2Z7T.js} +7 -3
- package/dist/chunk-XNLJ2Z7T.js.map +1 -0
- package/dist/{native/chunks/chunk-DUELD4HY.js → chunk-XOXXG7Q5.js} +9 -1
- package/dist/{chunk-O2RXSXSF.js.map → chunk-XOXXG7Q5.js.map} +1 -1
- package/dist/{chunk-I4NDZFTB.js → chunk-XXUTD74L.js} +3 -3
- package/dist/{chunk-PF2A2IM7.js → chunk-YGLAGY74.js} +2 -2
- package/dist/{chunk-4JV46KXS.js → chunk-YHKHHSZH.js} +4 -4
- package/dist/{chunk-6S7CFH6V.js → chunk-YJPBNIEM.js} +3 -3
- package/dist/{chunk-DWCH6GH5.js → chunk-YQIT3ET7.js} +2 -2
- package/dist/{chunk-G3JFESKD.js → chunk-Z5WUSI47.js} +6 -6
- package/dist/{chunk-SCQARHMU.js → chunk-ZANWHTXH.js} +2 -2
- package/dist/{chunk-A3Z7ZXLM.js → chunk-ZGAOA7LN.js} +8 -8
- package/dist/{chunk-72GJRV5J.js → chunk-ZNJGEDCE.js} +2 -2
- package/dist/{chunk-TGZ6GPYQ.js → chunk-ZYZPSBNQ.js} +3 -3
- package/dist/chunk-ZZGG6AUD.js +54 -0
- package/dist/chunk-ZZGG6AUD.js.map +1 -0
- package/dist/data-display/Alert.js +3 -3
- package/dist/data-display/AlertDialog.js +3 -3
- package/dist/data-display/AsyncStateContainer.js +6 -6
- package/dist/data-display/Avatar.js +4 -4
- package/dist/data-display/CardKit.js +21 -21
- package/dist/data-display/Carousel.js +4 -4
- package/dist/data-display/Chart.js +17 -17
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +86 -86
- package/dist/data-display/EmptyState.js +3 -3
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/FleetMap.js +14 -14
- package/dist/data-display/InteractiveTooltip.js +2 -2
- package/dist/data-display/LazyImage.js +2 -2
- package/dist/data-display/Lightbox.js +6 -6
- package/dist/data-display/LoadingState.js +2 -2
- package/dist/data-display/MapPreview.js +6 -6
- package/dist/data-display/Progress.js +2 -2
- package/dist/data-display/SectionOnboarding.js +5 -5
- package/dist/data-display/Sheet.js +6 -6
- package/dist/data-display/Stepper.js +2 -2
- package/dist/data-display/Table.js +5 -5
- package/dist/data-display/Timeline.js +2 -2
- package/dist/en-US.js +1 -1
- package/dist/feedback/ConfirmAction.js +11 -11
- package/dist/feedback/Dialog.js +3 -3
- package/dist/feedback/NotificationStatusNotice.js +6 -6
- package/dist/feedback/SequenceResolver.js +14 -14
- package/dist/feedback/Sonner.js +2 -2
- package/dist/feedback/StackedModal.js +7 -7
- package/dist/feedback/Toast.js +2 -2
- package/dist/form/AddressAutocomplete.js +6 -6
- package/dist/form/Autocomplete.js +2 -2
- package/dist/form/Button.js +2 -2
- package/dist/form/Calendar.js +15 -8
- package/dist/form/CepField.js +1 -1
- package/dist/form/Command.js +4 -4
- package/dist/form/DateRangePicker.js +21 -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/SettingCard.js +11 -11
- package/dist/layout/SettingsLayout.js +2 -2
- package/dist/layout/TableFilter.js +2 -2
- package/dist/locales.js +2 -2
- package/dist/native/chunks/{chunk-7AVFQB6A.js → chunk-FXA5DLKR.js} +3 -3
- package/dist/native/chunks/{chunk-67CYDCHZ.js → chunk-IN3XZ7EK.js} +2 -2
- package/dist/{chunk-O2RXSXSF.js → native/chunks/chunk-QHW7JEPZ.js} +9 -1
- package/dist/native/chunks/{chunk-DUELD4HY.js.map → chunk-QHW7JEPZ.js.map} +1 -1
- 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 +11 -11
- package/dist/navigation/Breadcrumbs.js +2 -2
- package/dist/navigation/NavigationMenu.js +3 -3
- package/dist/navigation/SectionNav.js +5 -5
- package/dist/pt-BR.js +1 -1
- package/dist/social-login-button.js +4 -4
- package/dist/types/components/form/Calendar/Calendar.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.dates.d.ts +11 -1
- package/dist/types/components/form/Calendar/Calendar.dates.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 +3 -0
- package/dist/types/components/form/Calendar/Calendar.hooks.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.picker.d.ts +29 -0
- package/dist/types/components/form/Calendar/Calendar.picker.d.ts.map +1 -0
- package/dist/types/components/form/Calendar/Calendar.types.d.ts +22 -1
- package/dist/types/components/form/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.views.d.ts +41 -0
- package/dist/types/components/form/Calendar/Calendar.views.d.ts.map +1 -0
- package/dist/types/components/form/Calendar/CalendarMonth.d.ts +17 -0
- package/dist/types/components/form/Calendar/CalendarMonth.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/CalendarPickerGrid.d.ts +28 -0
- package/dist/types/components/form/Calendar/CalendarPickerGrid.d.ts.map +1 -0
- package/dist/types/components/form/Calendar/CalendarSelectorsCaption.d.ts +29 -0
- package/dist/types/components/form/Calendar/CalendarSelectorsCaption.d.ts.map +1 -0
- package/dist/types/components/form/Calendar/CalendarSelectorsMonth.d.ts +23 -0
- package/dist/types/components/form/Calendar/CalendarSelectorsMonth.d.ts.map +1 -0
- 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/CepField/CepField.d.ts +2 -1
- package/dist/types/components/form/CepField/CepField.d.ts.map +1 -1
- package/dist/types/components/form/CepField/CepField.types.d.ts +16 -0
- package/dist/types/components/form/CepField/CepField.types.d.ts.map +1 -1
- package/dist/types/components/form/total-form/Fields/CepField.d.ts +6 -1
- package/dist/types/components/form/total-form/Fields/CepField.d.ts.map +1 -1
- package/dist/types/copy/labels.d.ts +18 -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 +18 -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 +7 -7
- 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/AlertDialog/AlertDialog.md +1 -0
- package/src/components/data-display/Badge/Badge.md +1 -0
- package/src/components/data-display/Carousel/Carousel.md +6 -0
- package/src/components/data-display/Chip/chip.md +1 -0
- package/src/components/data-display/LazyImage/LazyImage.md +2 -0
- package/src/components/data-display/Stepper/Stepper.md +5 -0
- package/src/components/data-display/Table/Table.md +1 -0
- package/src/components/data-display/Timeline/Timeline.md +1 -0
- package/src/components/feedback/Dialog/Dialog.md +2 -0
- package/src/components/feedback/StackedModal/StackedModal.md +1 -0
- package/src/components/feedback/Toast/Toast.md +2 -0
- package/src/components/form/Button/Button.md +1 -0
- package/src/components/form/Calendar/Calendar.dates.ts +16 -1
- package/src/components/form/Calendar/Calendar.helpers.ts +4 -0
- package/src/components/form/Calendar/Calendar.hooks.ts +13 -3
- package/src/components/form/Calendar/Calendar.md +121 -0
- package/src/components/form/Calendar/Calendar.picker.ts +89 -0
- package/src/components/form/Calendar/Calendar.tsx +78 -30
- package/src/components/form/Calendar/Calendar.types.ts +25 -1
- package/src/components/form/Calendar/Calendar.views.ts +101 -0
- package/src/components/form/Calendar/CalendarMonth.tsx +30 -13
- package/src/components/form/Calendar/CalendarPickerGrid.tsx +139 -0
- package/src/components/form/Calendar/CalendarSelectorsCaption.tsx +163 -0
- package/src/components/form/Calendar/CalendarSelectorsMonth.tsx +137 -0
- package/src/components/form/Calendar/index.ts +1 -0
- package/src/components/form/CepField/CepField.md +22 -0
- package/src/components/form/CepField/CepField.tsx +31 -5
- package/src/components/form/CepField/CepField.types.ts +16 -0
- package/src/components/form/Checkbox/Checkbox.md +1 -0
- package/src/components/form/Input/Input.md +1 -0
- package/src/components/form/RichTextEditor/RichTextEditor.md +3 -2
- package/src/components/form/Switch/Switch.md +1 -0
- package/src/components/form/total-form/Fields/CepField.tsx +9 -0
- package/src/components/layout/ContentToolbar/ContentToolbar.md +12 -0
- package/src/components/layout/Dashboard/Dashboard.md +3 -0
- package/src/components/navigation/NavigationMenu/NavigationMenu.md +2 -0
- package/src/components/typography/Code/Code.md +10 -0
- package/src/components/utility/InfiniteScroll/InfiniteScroll.md +1 -0
- package/src/components/utility/WorkflowStep/WorkflowStep.md +1 -0
- package/src/copy/labels.ts +19 -0
- package/src/en-US.labels.ts +8 -0
- package/src/pt-BR.labels.ts +8 -0
- package/dist/chunk-ISW5K72V.js.map +0 -1
- package/dist/chunk-QCNUMOTL.js.map +0 -1
- package/dist/chunk-SUALMVL7.js.map +0 -1
- package/dist/chunk-TERT6TIS.js.map +0 -1
- package/dist/chunk-TGMMUKOF.js +0 -90
- package/dist/chunk-TGMMUKOF.js.map +0 -1
- package/dist/chunk-THD3N4BJ.js.map +0 -1
- package/dist/chunk-UHQZ5XPW.js.map +0 -1
- /package/dist/{chunk-5JDY5W7O.js.map → chunk-2SBQ47RI.js.map} +0 -0
- /package/dist/{chunk-Y3YZBB74.js.map → chunk-2ZMR3TZU.js.map} +0 -0
- /package/dist/{chunk-RIDCGFGM.js.map → chunk-34FX3NRZ.js.map} +0 -0
- /package/dist/{chunk-7H5BIZ33.js.map → chunk-37G7M2GJ.js.map} +0 -0
- /package/dist/{chunk-VAGGIRLA.js.map → chunk-3RHU2Y2N.js.map} +0 -0
- /package/dist/{chunk-QYX4567K.js.map → chunk-3S352ZSG.js.map} +0 -0
- /package/dist/{chunk-L4FWEI2P.js.map → chunk-3V3Z4EML.js.map} +0 -0
- /package/dist/{chunk-W3EVATBS.js.map → chunk-3YFDGFEK.js.map} +0 -0
- /package/dist/{chunk-VJG43WKU.js.map → chunk-45AON4CS.js.map} +0 -0
- /package/dist/{chunk-GX2LIB4T.js.map → chunk-4IG73U2X.js.map} +0 -0
- /package/dist/{chunk-DD3VFDB2.js.map → chunk-4IVEBBF6.js.map} +0 -0
- /package/dist/{chunk-DE2GWZ6X.js.map → chunk-4J62V5OE.js.map} +0 -0
- /package/dist/{chunk-V65YK5DC.js.map → chunk-4QGMUHAU.js.map} +0 -0
- /package/dist/{chunk-6IVR5HFI.js.map → chunk-4UCXJYOO.js.map} +0 -0
- /package/dist/{chunk-UK3DSFMK.js.map → chunk-54F7QIV2.js.map} +0 -0
- /package/dist/{chunk-ZDBG7QG2.js.map → chunk-54OJAOXC.js.map} +0 -0
- /package/dist/{chunk-634Z7HGN.js.map → chunk-5CP6VW5H.js.map} +0 -0
- /package/dist/{chunk-52UVUVYQ.js.map → chunk-5RPT32EL.js.map} +0 -0
- /package/dist/{chunk-QADTI63U.js.map → chunk-6ATXOJVQ.js.map} +0 -0
- /package/dist/{chunk-GMU5AA3R.js.map → chunk-6OYB3MRF.js.map} +0 -0
- /package/dist/{chunk-OCLEKMBP.js.map → chunk-73BMQ3VC.js.map} +0 -0
- /package/dist/{chunk-4NVEUJXK.js.map → chunk-76IHYINM.js.map} +0 -0
- /package/dist/{chunk-OOCD2QR3.js.map → chunk-7QKFMMWK.js.map} +0 -0
- /package/dist/{chunk-Z52W7FEU.js.map → chunk-7W5X3KQ2.js.map} +0 -0
- /package/dist/{chunk-EOQ6EKTS.js.map → chunk-7XSCEHGA.js.map} +0 -0
- /package/dist/{chunk-OTION43A.js.map → chunk-A5U7HEBI.js.map} +0 -0
- /package/dist/{chunk-XF47LPCF.js.map → chunk-ABVIMFSD.js.map} +0 -0
- /package/dist/{chunk-ABJOW7EK.js.map → chunk-ALOEOGQV.js.map} +0 -0
- /package/dist/{chunk-HI7JPDD6.js.map → chunk-AMLHEKSV.js.map} +0 -0
- /package/dist/{chunk-BLHSLB5D.js.map → chunk-APBIQH4G.js.map} +0 -0
- /package/dist/{chunk-RMZQHJEP.js.map → chunk-ATJTGQYE.js.map} +0 -0
- /package/dist/{chunk-URAX2JPM.js.map → chunk-B32XH7NK.js.map} +0 -0
- /package/dist/{chunk-BX6CF2UG.js.map → chunk-BLNFOP2O.js.map} +0 -0
- /package/dist/{chunk-NGXDOWUP.js.map → chunk-BNBWUXT3.js.map} +0 -0
- /package/dist/{chunk-LHRAHDJF.js.map → chunk-BO6IMK5P.js.map} +0 -0
- /package/dist/{chunk-7UDQJOZZ.js.map → chunk-C347NNZJ.js.map} +0 -0
- /package/dist/{chunk-NWNHSASQ.js.map → chunk-CAOL4AIB.js.map} +0 -0
- /package/dist/{chunk-TLZR6UPJ.js.map → chunk-COK65GX2.js.map} +0 -0
- /package/dist/{chunk-BMVLTTTC.js.map → chunk-CY4XIZNW.js.map} +0 -0
- /package/dist/{chunk-UF4JFRLE.js.map → chunk-D22FGMGU.js.map} +0 -0
- /package/dist/{chunk-LDPN55AA.js.map → chunk-D3W5A4N6.js.map} +0 -0
- /package/dist/{chunk-B67KUCWU.js.map → chunk-D5Y4PNC5.js.map} +0 -0
- /package/dist/{chunk-775LIZXS.js.map → chunk-D72GD4XC.js.map} +0 -0
- /package/dist/{chunk-TLVKJBPM.js.map → chunk-DAFFZED3.js.map} +0 -0
- /package/dist/{chunk-BLZDSCIZ.js.map → chunk-DYHOBKPU.js.map} +0 -0
- /package/dist/{chunk-FB4GLQQO.js.map → chunk-E3E4L7MH.js.map} +0 -0
- /package/dist/{chunk-HWKBCLKD.js.map → chunk-E5OBAS3U.js.map} +0 -0
- /package/dist/{chunk-WWIYYXY3.js.map → chunk-E72INDBL.js.map} +0 -0
- /package/dist/{chunk-UYNJ3FYE.js.map → chunk-EOIRU62W.js.map} +0 -0
- /package/dist/{chunk-G3SWMBZS.js.map → chunk-EWFBDAB7.js.map} +0 -0
- /package/dist/{chunk-NSS3X7FK.js.map → chunk-EYFDIUVR.js.map} +0 -0
- /package/dist/{chunk-UCQRJTCI.js.map → chunk-GANJRIT3.js.map} +0 -0
- /package/dist/{chunk-SMANO5OD.js.map → chunk-GJOU26UW.js.map} +0 -0
- /package/dist/{chunk-H3NXDKFH.js.map → chunk-GM7BG3SD.js.map} +0 -0
- /package/dist/{chunk-SM2O6D5F.js.map → chunk-GYFKIPR2.js.map} +0 -0
- /package/dist/{chunk-4PREA2R5.js.map → chunk-HBH7V3IP.js.map} +0 -0
- /package/dist/{chunk-LUNN5GTB.js.map → chunk-HF2WLLGH.js.map} +0 -0
- /package/dist/{chunk-U67CX4FL.js.map → chunk-HKQQ2NED.js.map} +0 -0
- /package/dist/{chunk-JVOEVTCZ.js.map → chunk-HQCZT6TO.js.map} +0 -0
- /package/dist/{chunk-C7LHIDVB.js.map → chunk-ICKR3QTG.js.map} +0 -0
- /package/dist/{chunk-3B7EJIG7.js.map → chunk-IMYKJTVX.js.map} +0 -0
- /package/dist/{chunk-J7CIRTWQ.js.map → chunk-J34VGMA5.js.map} +0 -0
- /package/dist/{chunk-DWLSYFQW.js.map → chunk-JK3QB7MO.js.map} +0 -0
- /package/dist/{chunk-6B7VZFAO.js.map → chunk-JMDT3GQ3.js.map} +0 -0
- /package/dist/{chunk-E2Y7G4MP.js.map → chunk-JV2JIUDT.js.map} +0 -0
- /package/dist/{chunk-BTDY2NYV.js.map → chunk-JXK53XJW.js.map} +0 -0
- /package/dist/{chunk-K3PMMW23.js.map → chunk-K6VEN5VN.js.map} +0 -0
- /package/dist/{chunk-YOQAK2RN.js.map → chunk-KES3HNSU.js.map} +0 -0
- /package/dist/{chunk-BFBCTF2Y.js.map → chunk-KF3Q3C3P.js.map} +0 -0
- /package/dist/{chunk-MKRJUT5O.js.map → chunk-KSJBFT4G.js.map} +0 -0
- /package/dist/{chunk-AISCD6W6.js.map → chunk-L5KPBMMF.js.map} +0 -0
- /package/dist/{chunk-ZT73ACK3.js.map → chunk-LCGK22QQ.js.map} +0 -0
- /package/dist/{chunk-B2RNNJRO.js.map → chunk-LNIK7FJO.js.map} +0 -0
- /package/dist/{chunk-B25SHVWP.js.map → chunk-LODYTVOO.js.map} +0 -0
- /package/dist/{chunk-763AHWKU.js.map → chunk-LOHQLARB.js.map} +0 -0
- /package/dist/{chunk-7HYLXERK.js.map → chunk-LRIPJ2D5.js.map} +0 -0
- /package/dist/{chunk-F5SUBK42.js.map → chunk-LXIPBHNJ.js.map} +0 -0
- /package/dist/{chunk-CFDYQSN6.js.map → chunk-LZ5PGB7U.js.map} +0 -0
- /package/dist/{chunk-FFQ4NOJT.js.map → chunk-LZOCNAUA.js.map} +0 -0
- /package/dist/{chunk-BLVFHVDM.js.map → chunk-MLGAGZJ3.js.map} +0 -0
- /package/dist/{chunk-QVEJGFRP.js.map → chunk-MNNIOQTQ.js.map} +0 -0
- /package/dist/{chunk-AFSXC5FU.js.map → chunk-MSJP2AEN.js.map} +0 -0
- /package/dist/{chunk-KSOIFQJ6.js.map → chunk-MT74NRLY.js.map} +0 -0
- /package/dist/{chunk-PAKLYZ6G.js.map → chunk-N557OEZR.js.map} +0 -0
- /package/dist/{chunk-DKRMOIX2.js.map → chunk-NASLJO2R.js.map} +0 -0
- /package/dist/{chunk-QVDEGBME.js.map → chunk-NQCTANF3.js.map} +0 -0
- /package/dist/{chunk-AOBQ3KYY.js.map → chunk-NZDIO5UG.js.map} +0 -0
- /package/dist/{chunk-5USHYSCO.js.map → chunk-OKDAHCYE.js.map} +0 -0
- /package/dist/{chunk-ZIHSCBMN.js.map → chunk-OUI5IPS6.js.map} +0 -0
- /package/dist/{chunk-PGBIUO2A.js.map → chunk-PEMXXFXL.js.map} +0 -0
- /package/dist/{chunk-FCCOUOP7.js.map → chunk-PEVBSNCD.js.map} +0 -0
- /package/dist/{chunk-HTGK7QCX.js.map → chunk-Q7QQXNL7.js.map} +0 -0
- /package/dist/{chunk-A7LBWRRW.js.map → chunk-QCYQL3ST.js.map} +0 -0
- /package/dist/{chunk-XDDKRACZ.js.map → chunk-QHFAKEZZ.js.map} +0 -0
- /package/dist/{chunk-6EERXU6R.js.map → chunk-QTLM2YY2.js.map} +0 -0
- /package/dist/{chunk-QKLSHNOH.js.map → chunk-R26WP22N.js.map} +0 -0
- /package/dist/{chunk-7S3NG2AO.js.map → chunk-RB3R6BJL.js.map} +0 -0
- /package/dist/{chunk-SXNGH56D.js.map → chunk-RBW5QQXW.js.map} +0 -0
- /package/dist/{chunk-PJNIJIE6.js.map → chunk-RCTHCXS6.js.map} +0 -0
- /package/dist/{chunk-DT22MDC3.js.map → chunk-RDRXTH47.js.map} +0 -0
- /package/dist/{chunk-JMUZ5JZA.js.map → chunk-RWCQ6TEM.js.map} +0 -0
- /package/dist/{chunk-TIM4PXWN.js.map → chunk-SB2SEGR6.js.map} +0 -0
- /package/dist/{chunk-FRAVVI4A.js.map → chunk-SUTOAW7I.js.map} +0 -0
- /package/dist/{chunk-RQ3IS5NQ.js.map → chunk-SYERREN5.js.map} +0 -0
- /package/dist/{chunk-TAR5LSGT.js.map → chunk-T77OVQEO.js.map} +0 -0
- /package/dist/{chunk-V6DMNSW6.js.map → chunk-TPAMLIN7.js.map} +0 -0
- /package/dist/{chunk-7DODMQRK.js.map → chunk-UBVKMM3V.js.map} +0 -0
- /package/dist/{chunk-5463SZOH.js.map → chunk-UERGWYGY.js.map} +0 -0
- /package/dist/{chunk-G6ET2DRL.js.map → chunk-UJACXYC2.js.map} +0 -0
- /package/dist/{chunk-SYZVXWEQ.js.map → chunk-UQ5GJPVZ.js.map} +0 -0
- /package/dist/{chunk-KW2KCPZF.js.map → chunk-UQ6SAIX7.js.map} +0 -0
- /package/dist/{chunk-GHTVBYFA.js.map → chunk-UWVVKUCG.js.map} +0 -0
- /package/dist/{chunk-EXKK73UN.js.map → chunk-UYKIUUWP.js.map} +0 -0
- /package/dist/{chunk-HWUFOII2.js.map → chunk-VQ6V5TO7.js.map} +0 -0
- /package/dist/{chunk-OT4HIG7S.js.map → chunk-VUBFCHXL.js.map} +0 -0
- /package/dist/{chunk-A4B27HYU.js.map → chunk-WPFVQVQC.js.map} +0 -0
- /package/dist/{chunk-DB7OJM6X.js.map → chunk-WWB43LWU.js.map} +0 -0
- /package/dist/{chunk-HFZE2PGM.js.map → chunk-X4J576GR.js.map} +0 -0
- /package/dist/{chunk-NF5TATKP.js.map → chunk-XATRYJ4Q.js.map} +0 -0
- /package/dist/{chunk-6KCJNERH.js.map → chunk-XCUHGPPZ.js.map} +0 -0
- /package/dist/{chunk-3LQLLL2J.js.map → chunk-XE7QBHXN.js.map} +0 -0
- /package/dist/{chunk-YMKSPW4T.js.map → chunk-XKPV52CG.js.map} +0 -0
- /package/dist/{chunk-I4NDZFTB.js.map → chunk-XXUTD74L.js.map} +0 -0
- /package/dist/{chunk-PF2A2IM7.js.map → chunk-YGLAGY74.js.map} +0 -0
- /package/dist/{chunk-4JV46KXS.js.map → chunk-YHKHHSZH.js.map} +0 -0
- /package/dist/{chunk-6S7CFH6V.js.map → chunk-YJPBNIEM.js.map} +0 -0
- /package/dist/{chunk-DWCH6GH5.js.map → chunk-YQIT3ET7.js.map} +0 -0
- /package/dist/{chunk-G3JFESKD.js.map → chunk-Z5WUSI47.js.map} +0 -0
- /package/dist/{chunk-SCQARHMU.js.map → chunk-ZANWHTXH.js.map} +0 -0
- /package/dist/{chunk-A3Z7ZXLM.js.map → chunk-ZGAOA7LN.js.map} +0 -0
- /package/dist/{chunk-72GJRV5J.js.map → chunk-ZNJGEDCE.js.map} +0 -0
- /package/dist/{chunk-TGZ6GPYQ.js.map → chunk-ZYZPSBNQ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-7AVFQB6A.js.map → chunk-FXA5DLKR.js.map} +0 -0
- /package/dist/native/chunks/{chunk-67CYDCHZ.js.map → chunk-IN3XZ7EK.js.map} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { CalendarLabels } from '../../../copy/labels';
|
|
2
|
+
|
|
1
3
|
export type SelectionMode = 'single' | 'range';
|
|
2
4
|
|
|
3
5
|
export interface DateRange {
|
|
@@ -17,6 +19,14 @@ export interface DayRenderArgs {
|
|
|
17
19
|
hovered?: boolean;
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
/**
|
|
23
|
+
* What the caption above the days holds. `'arrows'` (the default) is the month
|
|
24
|
+
* title between previous/next arrows. `'selectors'` replaces the title with a
|
|
25
|
+
* month button and a year button that swap the day grid for a month grid or a
|
|
26
|
+
* year grid — for dates far from today, such as a birth date.
|
|
27
|
+
*/
|
|
28
|
+
export type CalendarCaptionLayout = 'arrows' | 'selectors';
|
|
29
|
+
|
|
20
30
|
export interface HeaderRenderContext {
|
|
21
31
|
month: number;
|
|
22
32
|
year: number;
|
|
@@ -46,6 +56,19 @@ export interface CalendarProps {
|
|
|
46
56
|
locale?: string; // e.g. 'en-US'
|
|
47
57
|
showOutsideDays?: boolean; // days from prev/next month
|
|
48
58
|
showWeekNumbers?: boolean;
|
|
59
|
+
/** default: 'arrows'. `'selectors'` always shows one month. */
|
|
60
|
+
captionLayout?: CalendarCaptionLayout;
|
|
61
|
+
/**
|
|
62
|
+
* The month the calendar opens on when nothing is chosen yet (no `value`, no
|
|
63
|
+
* `range.start`). Default: today's month. Read once, on mount.
|
|
64
|
+
*/
|
|
65
|
+
defaultMonth?: Date;
|
|
66
|
+
/**
|
|
67
|
+
* The selectors caption's accessible names (`captionLayout="selectors"`);
|
|
68
|
+
* the English pack answers for any key left out. A pt-BR host passes
|
|
69
|
+
* `UI_LABELS['pt-BR'].calendar`.
|
|
70
|
+
*/
|
|
71
|
+
labels?: Partial<CalendarLabels>;
|
|
49
72
|
|
|
50
73
|
// Constraints
|
|
51
74
|
minDate?: Date;
|
|
@@ -79,7 +102,8 @@ type CalendarDefaultedKeys =
|
|
|
79
102
|
| 'showOutsideDays'
|
|
80
103
|
| 'minRangeLength'
|
|
81
104
|
| 'allowSameDayRange'
|
|
82
|
-
| 'autoFocus'
|
|
105
|
+
| 'autoFocus'
|
|
106
|
+
| 'captionLayout';
|
|
83
107
|
|
|
84
108
|
// CalendarProps with the defaults already applied, plus the month count resolved
|
|
85
109
|
// from numberOfMonths and the selection mode.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The month and year views of `captionLayout="selectors"`: which years the
|
|
3
|
+
* list offers, which months are out of reach, and where the day grid lands
|
|
4
|
+
* after a pick. Pure, so the rules are tested without rendering anything.
|
|
5
|
+
*/
|
|
6
|
+
import { normalizeDate } from './Calendar.dates';
|
|
7
|
+
|
|
8
|
+
export type CalendarView = 'days' | 'months' | 'years';
|
|
9
|
+
|
|
10
|
+
const MONTHS_PER_YEAR = 12;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The year list's span when the host gives no bound: the common date-picker
|
|
14
|
+
* window, wide enough for a birth date and for an appointment years ahead.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_MIN_YEAR = 1900;
|
|
17
|
+
export const DEFAULT_MAX_YEAR = 2099;
|
|
18
|
+
|
|
19
|
+
export interface DateBounds {
|
|
20
|
+
minDate?: Date;
|
|
21
|
+
maxDate?: Date;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const startOfMonth = (year: number, month: number): Date => normalizeDate(new Date(year, month, 1));
|
|
25
|
+
const endOfMonth = (year: number, month: number): Date => normalizeDate(new Date(year, month + 1, 0));
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Every year the list offers, newest first. The shown year is always in it, so
|
|
29
|
+
* a calendar opened outside its own bounds still has a highlighted year to
|
|
30
|
+
* start from rather than a list that does not contain where you are.
|
|
31
|
+
*/
|
|
32
|
+
export const yearOptions = ({ minDate, maxDate }: DateBounds, shownYear: number): number[] => {
|
|
33
|
+
const first = Math.min(minDate?.getFullYear() ?? DEFAULT_MIN_YEAR, shownYear);
|
|
34
|
+
const last = Math.max(maxDate?.getFullYear() ?? DEFAULT_MAX_YEAR, shownYear);
|
|
35
|
+
return Array.from({ length: last - first + 1 }, (_, index) => last - index);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Whether the year lies wholly outside the bounds — only ever the shown year,
|
|
40
|
+
* listed so the list contains where the calendar is.
|
|
41
|
+
*/
|
|
42
|
+
export const isYearOutOfBounds = (year: number, { minDate, maxDate }: DateBounds): boolean =>
|
|
43
|
+
(minDate !== undefined && year < minDate.getFullYear()) ||
|
|
44
|
+
(maxDate !== undefined && year > maxDate.getFullYear());
|
|
45
|
+
|
|
46
|
+
/** Whether no day of the month can be picked because of `minDate`/`maxDate`. */
|
|
47
|
+
export const isMonthOutOfBounds = (
|
|
48
|
+
year: number,
|
|
49
|
+
month: number,
|
|
50
|
+
{ minDate, maxDate }: DateBounds,
|
|
51
|
+
): boolean =>
|
|
52
|
+
(minDate !== undefined && endOfMonth(year, month) < normalizeDate(minDate)) ||
|
|
53
|
+
(maxDate !== undefined && startOfMonth(year, month) > normalizeDate(maxDate));
|
|
54
|
+
|
|
55
|
+
/** The month to show in `year`: the one asked for, pulled inside the bounds. */
|
|
56
|
+
export const clampMonthToBounds = (year: number, month: number, { minDate, maxDate }: DateBounds): number => {
|
|
57
|
+
if (minDate && year === minDate.getFullYear() && month < minDate.getMonth()) return minDate.getMonth();
|
|
58
|
+
if (maxDate && year === maxDate.getFullYear() && month > maxDate.getMonth()) return maxDate.getMonth();
|
|
59
|
+
return month;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The day focus lands on in the picked month: the same day of the month as
|
|
64
|
+
* before (the 31st becomes the month's last day), held inside the bounds.
|
|
65
|
+
*/
|
|
66
|
+
export const landingDay = (year: number, month: number, dayOfMonth: number, bounds: DateBounds): Date => {
|
|
67
|
+
const lastDay = new Date(year, month + 1, 0).getDate();
|
|
68
|
+
const day = normalizeDate(new Date(year, month, Math.min(dayOfMonth, lastDay)));
|
|
69
|
+
if (bounds.minDate && day < normalizeDate(bounds.minDate)) return normalizeDate(bounds.minDate);
|
|
70
|
+
if (bounds.maxDate && day > normalizeDate(bounds.maxDate)) return normalizeDate(bounds.maxDate);
|
|
71
|
+
return day;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** Whether the arrow that moves `delta` months from `month` leads anywhere pickable. */
|
|
75
|
+
export const canShiftMonth = (month: Date, delta: number, bounds: DateBounds): boolean => {
|
|
76
|
+
const target = new Date(month.getFullYear(), month.getMonth() + delta, 1);
|
|
77
|
+
return !isMonthOutOfBounds(target.getFullYear(), target.getMonth(), bounds);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** The twelve month indexes, for the month grid. */
|
|
81
|
+
export const MONTH_INDEXES = Array.from({ length: MONTHS_PER_YEAR }, (_, index) => index);
|
|
82
|
+
|
|
83
|
+
// A lookup rather than a switch, like the day grid's: one entry per move.
|
|
84
|
+
const GRID_MOVES: Record<string, (index: number, columns: number, length: number) => number> = {
|
|
85
|
+
ArrowLeft: (index) => index - 1,
|
|
86
|
+
ArrowRight: (index) => index + 1,
|
|
87
|
+
ArrowUp: (index, columns) => index - columns,
|
|
88
|
+
ArrowDown: (index, columns) => index + columns,
|
|
89
|
+
Home: () => 0,
|
|
90
|
+
End: (_, __, length) => length - 1,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Where focus moves in a month or year grid for a key, held to the grid; null
|
|
95
|
+
* when the key is not a move.
|
|
96
|
+
*/
|
|
97
|
+
export const moveInGrid = (key: string, index: number, columns: number, length: number): number | null => {
|
|
98
|
+
const move = GRID_MOVES[key];
|
|
99
|
+
if (!move) return null;
|
|
100
|
+
return Math.min(Math.max(move(index, columns, length), 0), length - 1);
|
|
101
|
+
};
|
|
@@ -25,7 +25,7 @@ const GRID_SX = { display: 'grid', gridTemplateColumns: 'repeat(7, minmax(0, 1fr
|
|
|
25
25
|
* their gaps (7 × 40 + 6 × 4 design px). Months side by side keep a 280 basis,
|
|
26
26
|
* so a multi-month calendar still wraps rather than squeezing every month.
|
|
27
27
|
*/
|
|
28
|
-
const MONTH_SX = { flex: `1 1 ${sxRem(280)}`, minWidth: 0, maxWidth: sxRem(304) } as const;
|
|
28
|
+
export const MONTH_SX = { flex: `1 1 ${sxRem(280)}`, minWidth: 0, maxWidth: sxRem(304) } as const;
|
|
29
29
|
|
|
30
30
|
// Only the outermost months carry arrows; the ones between get a spacer so their
|
|
31
31
|
// titles stay centred.
|
|
@@ -89,6 +89,29 @@ const WeekdayHeader: FC<{ weekdayNames: string[] }> = ({ weekdayNames }) => (
|
|
|
89
89
|
</Box>
|
|
90
90
|
);
|
|
91
91
|
|
|
92
|
+
/** The weekday row and the day grid under a month's caption. */
|
|
93
|
+
export const MonthDays: FC<{
|
|
94
|
+
matrix: MonthMatrix;
|
|
95
|
+
monthIndex: number;
|
|
96
|
+
weekdayNames: string[];
|
|
97
|
+
dayContext: DayCellContext;
|
|
98
|
+
}> = ({ matrix, monthIndex, weekdayNames, dayContext }) => (
|
|
99
|
+
<>
|
|
100
|
+
<WeekdayHeader weekdayNames={weekdayNames} />
|
|
101
|
+
|
|
102
|
+
<Box
|
|
103
|
+
role="grid"
|
|
104
|
+
aria-labelledby={`month-${monthIndex}`}
|
|
105
|
+
data-testid="calendar-grid"
|
|
106
|
+
sx={GRID_SX}
|
|
107
|
+
>
|
|
108
|
+
{matrix.weeks.flat().map((day) => (
|
|
109
|
+
<CalendarDayCell key={day.key} day={day} {...dayContext} />
|
|
110
|
+
))}
|
|
111
|
+
</Box>
|
|
112
|
+
</>
|
|
113
|
+
);
|
|
114
|
+
|
|
92
115
|
export interface CalendarMonthProps {
|
|
93
116
|
matrix: MonthMatrix;
|
|
94
117
|
monthIndex: number;
|
|
@@ -130,18 +153,12 @@ export const CalendarMonth: FC<CalendarMonthProps> = ({
|
|
|
130
153
|
onNextMonth={onNextMonth}
|
|
131
154
|
/>
|
|
132
155
|
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
sx={GRID_SX}
|
|
140
|
-
>
|
|
141
|
-
{matrix.weeks.flat().map((day) => (
|
|
142
|
-
<CalendarDayCell key={day.key} day={day} {...dayContext} />
|
|
143
|
-
))}
|
|
144
|
-
</Box>
|
|
156
|
+
<MonthDays
|
|
157
|
+
matrix={matrix}
|
|
158
|
+
monthIndex={monthIndex}
|
|
159
|
+
weekdayNames={weekdayNames}
|
|
160
|
+
dayContext={dayContext}
|
|
161
|
+
/>
|
|
145
162
|
</Box>
|
|
146
163
|
);
|
|
147
164
|
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
import Box from '@mui/material/Box/index.js';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
import { rem, sxRem } from '../../../tokens/relative';
|
|
7
|
+
|
|
8
|
+
import { moveInGrid } from './Calendar.views';
|
|
9
|
+
|
|
10
|
+
/** A pick button's smallest edge: a touch target at any width (44 design px). */
|
|
11
|
+
const TARGET_SIZE = sxRem(44);
|
|
12
|
+
|
|
13
|
+
export interface PickerOption {
|
|
14
|
+
value: number;
|
|
15
|
+
label: string;
|
|
16
|
+
/** The accessible name, when the visible label is an abbreviation ("mar"). */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
/** The month or year the calendar is showing. */
|
|
20
|
+
current: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const inkFor = ({ current, disabled }: PickerOption): string => {
|
|
24
|
+
if (current) return 'primary.contrastText';
|
|
25
|
+
return disabled ? 'text.disabled' : 'text.primary';
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const optionSx = (option: PickerOption): SxProps<Theme> => ({
|
|
29
|
+
minHeight: TARGET_SIZE,
|
|
30
|
+
minWidth: 0,
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
padding: 0,
|
|
33
|
+
font: 'inherit',
|
|
34
|
+
typography: 'body1',
|
|
35
|
+
border: 1,
|
|
36
|
+
borderColor: option.current ? 'primary.main' : 'divider',
|
|
37
|
+
borderRadius: 1,
|
|
38
|
+
backgroundColor: option.current ? 'primary.main' : 'transparent',
|
|
39
|
+
color: inkFor(option),
|
|
40
|
+
cursor: option.disabled ? 'not-allowed' : 'pointer',
|
|
41
|
+
'&:hover': { backgroundColor: option.current || option.disabled ? undefined : 'action.hover' },
|
|
42
|
+
'&:focus-visible': {
|
|
43
|
+
outline: (theme: Theme) => `${rem(theme, 2)} solid`,
|
|
44
|
+
outlineColor: 'primary.main',
|
|
45
|
+
outlineOffset: sxRem(1),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// The grid fills the box the day grid leaves (see CalendarSelectorsMonth), so
|
|
50
|
+
// opening it never resizes the calendar: a short grid's rows stretch to fill
|
|
51
|
+
// it, a long one scrolls inside it.
|
|
52
|
+
const gridSx = (columns: number, scrollable: boolean): SxProps<Theme> => ({
|
|
53
|
+
display: 'grid',
|
|
54
|
+
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
55
|
+
gap: 1,
|
|
56
|
+
boxSizing: 'border-box',
|
|
57
|
+
height: '100%',
|
|
58
|
+
// Room for the focus ring of the edge buttons inside the box.
|
|
59
|
+
p: 0.5,
|
|
60
|
+
...(scrollable ? { alignContent: 'start', overflowY: 'auto' } : { gridAutoRows: '1fr' }),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export interface CalendarPickerGridProps {
|
|
64
|
+
id: string;
|
|
65
|
+
ariaLabel: string;
|
|
66
|
+
columns: number;
|
|
67
|
+
options: PickerOption[];
|
|
68
|
+
testId: string;
|
|
69
|
+
scrollable?: boolean;
|
|
70
|
+
onPick: (value: number) => void;
|
|
71
|
+
onDismiss: () => void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The month or year grid that stands in for the days. One tab stop (roving
|
|
76
|
+
* `tabIndex`); arrows, Home and End move it, Enter/Space pick, Escape goes back
|
|
77
|
+
* to the days unchanged. Out-of-bounds options stay focusable and say
|
|
78
|
+
* `aria-disabled`, so the arrows never skip a hole a reader cannot explain.
|
|
79
|
+
*/
|
|
80
|
+
export const CalendarPickerGrid: FC<CalendarPickerGridProps> = ({
|
|
81
|
+
id,
|
|
82
|
+
ariaLabel,
|
|
83
|
+
columns,
|
|
84
|
+
options,
|
|
85
|
+
testId,
|
|
86
|
+
scrollable = false,
|
|
87
|
+
onPick,
|
|
88
|
+
onDismiss,
|
|
89
|
+
}) => {
|
|
90
|
+
const [active, setActive] = useState(() => Math.max(options.findIndex((option) => option.current), 0));
|
|
91
|
+
const buttons = useRef<Array<HTMLButtonElement | null>>([]);
|
|
92
|
+
|
|
93
|
+
// Also runs on mount: opening the grid puts focus on the shown month/year,
|
|
94
|
+
// which scrolls a long year list to it.
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
buttons.current[active]?.focus();
|
|
97
|
+
}, [active]);
|
|
98
|
+
|
|
99
|
+
const handleKeyDown = (event: React.KeyboardEvent) => {
|
|
100
|
+
// The calendar's own day keys must not move a day nobody can see.
|
|
101
|
+
event.stopPropagation();
|
|
102
|
+
if (event.key === 'Escape') {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
onDismiss();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const next = moveInGrid(event.key, active, columns, options.length);
|
|
108
|
+
if (next === null) return;
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
setActive(next);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<Box id={id} role="group" aria-label={ariaLabel} data-testid={testId} onKeyDown={handleKeyDown} sx={gridSx(columns, scrollable)}>
|
|
115
|
+
{options.map((option, index) => (
|
|
116
|
+
<Box
|
|
117
|
+
key={option.value}
|
|
118
|
+
component="button"
|
|
119
|
+
type="button"
|
|
120
|
+
ref={(node: HTMLButtonElement | null) => {
|
|
121
|
+
buttons.current[index] = node;
|
|
122
|
+
}}
|
|
123
|
+
tabIndex={index === active ? 0 : -1}
|
|
124
|
+
aria-current={option.current ? 'true' : undefined}
|
|
125
|
+
aria-disabled={option.disabled || undefined}
|
|
126
|
+
aria-label={option.ariaLabel}
|
|
127
|
+
data-testid={`${testId}-${option.value}`}
|
|
128
|
+
onFocus={() => setActive(index)}
|
|
129
|
+
onClick={() => {
|
|
130
|
+
if (!option.disabled) onPick(option.value);
|
|
131
|
+
}}
|
|
132
|
+
sx={optionSx(option)}
|
|
133
|
+
>
|
|
134
|
+
{option.label}
|
|
135
|
+
</Box>
|
|
136
|
+
))}
|
|
137
|
+
</Box>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import ArrowDropDown from '@mui/icons-material/ArrowDropDown';
|
|
2
|
+
import ChevronLeft from '@mui/icons-material/ChevronLeft';
|
|
3
|
+
import ChevronRight from '@mui/icons-material/ChevronRight';
|
|
4
|
+
import Box from '@mui/material/Box/index.js';
|
|
5
|
+
import Button from '@mui/material/Button/index.js';
|
|
6
|
+
import IconButton from '@mui/material/IconButton/index.js';
|
|
7
|
+
import type { FC } from 'react';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import type { CalendarLabels } from '../../../copy/labels';
|
|
11
|
+
import { sxRem } from '../../../tokens/relative';
|
|
12
|
+
|
|
13
|
+
import type { CalendarView } from './Calendar.views';
|
|
14
|
+
|
|
15
|
+
/** Every control in the caption is a touch target at any width (44 design px). */
|
|
16
|
+
const TARGET_SIZE = sxRem(44);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The shown month over every month name, hidden: the button keeps the width of
|
|
20
|
+
* the longest, so stepping from Agosto to Setembro moves nothing.
|
|
21
|
+
*/
|
|
22
|
+
const MonthText: FC<{ text: string; names: string[] }> = ({ text, names }) => (
|
|
23
|
+
<Box component="span" sx={{ display: 'inline-grid', justifyItems: 'start' }}>
|
|
24
|
+
{names.map((name) => (
|
|
25
|
+
<Box key={name} component="span" aria-hidden sx={{ gridArea: '1 / 1', visibility: 'hidden' }}>
|
|
26
|
+
{name}
|
|
27
|
+
</Box>
|
|
28
|
+
))}
|
|
29
|
+
<Box component="span" data-testid="calendar-month-select-text" sx={{ gridArea: '1 / 1' }}>
|
|
30
|
+
{text}
|
|
31
|
+
</Box>
|
|
32
|
+
</Box>
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const SelectorButton: FC<{
|
|
36
|
+
testId: string;
|
|
37
|
+
text: React.ReactNode;
|
|
38
|
+
ariaLabel: string;
|
|
39
|
+
expanded: boolean;
|
|
40
|
+
controls: string;
|
|
41
|
+
onClick: () => void;
|
|
42
|
+
}> = ({ testId, text, ariaLabel, expanded, controls, onClick }) => (
|
|
43
|
+
<Button
|
|
44
|
+
type="button"
|
|
45
|
+
color="inherit"
|
|
46
|
+
data-testid={testId}
|
|
47
|
+
aria-label={ariaLabel}
|
|
48
|
+
aria-expanded={expanded}
|
|
49
|
+
aria-controls={expanded ? controls : undefined}
|
|
50
|
+
endIcon={<ArrowDropDown />}
|
|
51
|
+
onClick={onClick}
|
|
52
|
+
sx={{
|
|
53
|
+
minHeight: TARGET_SIZE,
|
|
54
|
+
px: 0.5,
|
|
55
|
+
whiteSpace: 'nowrap',
|
|
56
|
+
textTransform: 'none',
|
|
57
|
+
typography: 'subtitle1',
|
|
58
|
+
fontWeight: 'bold',
|
|
59
|
+
border: 1,
|
|
60
|
+
borderColor: 'divider',
|
|
61
|
+
backgroundColor: expanded ? 'action.selected' : 'transparent',
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
{text}
|
|
65
|
+
</Button>
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const ARROW_SX = { width: TARGET_SIZE, height: TARGET_SIZE } as const;
|
|
69
|
+
|
|
70
|
+
export interface CalendarSelectorsCaptionProps {
|
|
71
|
+
monthText: string;
|
|
72
|
+
/** Every month's name in the locale, which sizes the month button. */
|
|
73
|
+
monthNames: string[];
|
|
74
|
+
year: number;
|
|
75
|
+
view: CalendarView;
|
|
76
|
+
labels: CalendarLabels;
|
|
77
|
+
/** The id of the pick grid each button opens. */
|
|
78
|
+
monthsId: string;
|
|
79
|
+
yearsId: string;
|
|
80
|
+
canGoPrevious: boolean;
|
|
81
|
+
canGoNext: boolean;
|
|
82
|
+
onToggle: (view: Exclude<CalendarView, 'days'>) => void;
|
|
83
|
+
/** Escape on a caption control closes an open grid; with none open it is the host's. */
|
|
84
|
+
onEscape: () => void;
|
|
85
|
+
onPreviousMonth: () => void;
|
|
86
|
+
onNextMonth: () => void;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* `<Month> ▾` and `<Year> ▾`, then the month arrows. Its keys are its own: the
|
|
91
|
+
* container's day keys would otherwise turn Enter on a button into a day pick.
|
|
92
|
+
* Escape is the exception while no grid is open, so the sheet or popover that
|
|
93
|
+
* holds the calendar still closes on it.
|
|
94
|
+
*/
|
|
95
|
+
export const CalendarSelectorsCaption: FC<CalendarSelectorsCaptionProps> = ({
|
|
96
|
+
monthText,
|
|
97
|
+
monthNames,
|
|
98
|
+
year,
|
|
99
|
+
view,
|
|
100
|
+
labels,
|
|
101
|
+
monthsId,
|
|
102
|
+
yearsId,
|
|
103
|
+
canGoPrevious,
|
|
104
|
+
canGoNext,
|
|
105
|
+
onToggle,
|
|
106
|
+
onEscape,
|
|
107
|
+
onPreviousMonth,
|
|
108
|
+
onNextMonth,
|
|
109
|
+
}) => (
|
|
110
|
+
<Box
|
|
111
|
+
data-testid="calendar-header"
|
|
112
|
+
onKeyDown={(event) => {
|
|
113
|
+
if (event.key === 'Escape' && view === 'days') return;
|
|
114
|
+
event.stopPropagation();
|
|
115
|
+
if (event.key === 'Escape') onEscape();
|
|
116
|
+
}}
|
|
117
|
+
// Two groups that wrap rather than squeeze: in a 320 sheet the arrows take
|
|
118
|
+
// a second line, and no button shrinks below a touch target. The month
|
|
119
|
+
// button is as wide as the longest month name, so whether they wrap depends
|
|
120
|
+
// on the width only, never on the month shown.
|
|
121
|
+
sx={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: 1, mb: 2 }}
|
|
122
|
+
>
|
|
123
|
+
<Box sx={{ display: 'flex', gap: 0.5 }}>
|
|
124
|
+
<SelectorButton
|
|
125
|
+
testId="calendar-month-select"
|
|
126
|
+
text={<MonthText text={monthText} names={monthNames} />}
|
|
127
|
+
ariaLabel={labels.chooseMonth(monthText)}
|
|
128
|
+
expanded={view === 'months'}
|
|
129
|
+
controls={monthsId}
|
|
130
|
+
onClick={() => onToggle('months')}
|
|
131
|
+
/>
|
|
132
|
+
<SelectorButton
|
|
133
|
+
testId="calendar-year-select"
|
|
134
|
+
text={String(year)}
|
|
135
|
+
ariaLabel={labels.chooseYear(year)}
|
|
136
|
+
expanded={view === 'years'}
|
|
137
|
+
controls={yearsId}
|
|
138
|
+
onClick={() => onToggle('years')}
|
|
139
|
+
/>
|
|
140
|
+
</Box>
|
|
141
|
+
|
|
142
|
+
<Box sx={{ display: 'flex', ml: 'auto' }}>
|
|
143
|
+
<IconButton
|
|
144
|
+
aria-label={labels.previousMonth}
|
|
145
|
+
disabled={!canGoPrevious}
|
|
146
|
+
onClick={onPreviousMonth}
|
|
147
|
+
data-testid="calendar-prev-month"
|
|
148
|
+
sx={ARROW_SX}
|
|
149
|
+
>
|
|
150
|
+
<ChevronLeft />
|
|
151
|
+
</IconButton>
|
|
152
|
+
<IconButton
|
|
153
|
+
aria-label={labels.nextMonth}
|
|
154
|
+
disabled={!canGoNext}
|
|
155
|
+
onClick={onNextMonth}
|
|
156
|
+
data-testid="calendar-next-month"
|
|
157
|
+
sx={ARROW_SX}
|
|
158
|
+
>
|
|
159
|
+
<ChevronRight />
|
|
160
|
+
</IconButton>
|
|
161
|
+
</Box>
|
|
162
|
+
</Box>
|
|
163
|
+
);
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import Box from '@mui/material/Box/index.js';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import React, { useId } from 'react';
|
|
4
|
+
|
|
5
|
+
import type { CalendarLabels } from '../../../copy/labels';
|
|
6
|
+
|
|
7
|
+
import { getMonthLabel } from './Calendar.dates';
|
|
8
|
+
import type { CalendarPicker } from './Calendar.picker';
|
|
9
|
+
import type { MonthMatrix } from './Calendar.types';
|
|
10
|
+
import type { DateBounds } from './Calendar.views';
|
|
11
|
+
import { MONTH_INDEXES, canShiftMonth, isMonthOutOfBounds, isYearOutOfBounds, yearOptions } from './Calendar.views';
|
|
12
|
+
import type { DayCellContext } from './CalendarDayCell';
|
|
13
|
+
import { MONTH_SX, MonthDays } from './CalendarMonth';
|
|
14
|
+
import type { PickerOption } from './CalendarPickerGrid';
|
|
15
|
+
import { CalendarPickerGrid } from './CalendarPickerGrid';
|
|
16
|
+
import { CalendarSelectorsCaption } from './CalendarSelectorsCaption';
|
|
17
|
+
|
|
18
|
+
/** The days and the open grid share one cell, so opening a grid never resizes the calendar. */
|
|
19
|
+
const BODY_SX = { display: 'grid' } as const;
|
|
20
|
+
|
|
21
|
+
/** Adds no height of its own; a long year list scrolls inside the days' height. */
|
|
22
|
+
const PICKER_SLOT_SX = {
|
|
23
|
+
gridArea: '1 / 1',
|
|
24
|
+
height: 0,
|
|
25
|
+
minHeight: '100%',
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
const YEAR_COLUMNS = 4;
|
|
29
|
+
const MONTH_COLUMNS = 3;
|
|
30
|
+
|
|
31
|
+
export interface CalendarSelectorsMonthProps {
|
|
32
|
+
matrix: MonthMatrix;
|
|
33
|
+
locale: string;
|
|
34
|
+
weekdayNames: string[];
|
|
35
|
+
dayContext: DayCellContext;
|
|
36
|
+
bounds: DateBounds;
|
|
37
|
+
labels: CalendarLabels;
|
|
38
|
+
picker: CalendarPicker;
|
|
39
|
+
onPreviousMonth: () => void;
|
|
40
|
+
onNextMonth: () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const monthOptions = ({ year, month }: MonthMatrix, locale: string, bounds: DateBounds): PickerOption[] =>
|
|
44
|
+
MONTH_INDEXES.map((index) => ({
|
|
45
|
+
value: index,
|
|
46
|
+
label: getMonthLabel(index, locale, 'short'),
|
|
47
|
+
ariaLabel: getMonthLabel(index, locale, 'long'),
|
|
48
|
+
disabled: isMonthOutOfBounds(year, index, bounds),
|
|
49
|
+
current: index === month,
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
// The list is cut at the bounds' years, so only a shown year outside them is
|
|
53
|
+
// disabled.
|
|
54
|
+
const yearPickerOptions = ({ year }: MonthMatrix, bounds: DateBounds): PickerOption[] =>
|
|
55
|
+
yearOptions(bounds, year).map((option) => ({
|
|
56
|
+
value: option,
|
|
57
|
+
label: String(option),
|
|
58
|
+
disabled: isYearOutOfBounds(option, bounds),
|
|
59
|
+
current: option === year,
|
|
60
|
+
}));
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The one month of `captionLayout="selectors"`: the month/year caption over the
|
|
64
|
+
* days, or over the month or year grid that stands in for them.
|
|
65
|
+
*/
|
|
66
|
+
export const CalendarSelectorsMonth: FC<CalendarSelectorsMonthProps> = ({
|
|
67
|
+
matrix,
|
|
68
|
+
locale,
|
|
69
|
+
weekdayNames,
|
|
70
|
+
dayContext,
|
|
71
|
+
bounds,
|
|
72
|
+
labels,
|
|
73
|
+
picker,
|
|
74
|
+
onPreviousMonth,
|
|
75
|
+
onNextMonth,
|
|
76
|
+
}) => {
|
|
77
|
+
const idPrefix = useId();
|
|
78
|
+
const monthsId = `${idPrefix}-months`;
|
|
79
|
+
const yearsId = `${idPrefix}-years`;
|
|
80
|
+
const shown = new Date(matrix.year, matrix.month, 1);
|
|
81
|
+
|
|
82
|
+
const picking = picker.view !== 'days';
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<Box sx={MONTH_SX} data-testid="calendar-month-0">
|
|
86
|
+
<CalendarSelectorsCaption
|
|
87
|
+
monthText={getMonthLabel(matrix.month, locale, 'long')}
|
|
88
|
+
monthNames={MONTH_INDEXES.map((index) => getMonthLabel(index, locale, 'long'))}
|
|
89
|
+
year={matrix.year}
|
|
90
|
+
view={picker.view}
|
|
91
|
+
labels={labels}
|
|
92
|
+
monthsId={monthsId}
|
|
93
|
+
yearsId={yearsId}
|
|
94
|
+
canGoPrevious={canShiftMonth(shown, -1, bounds)}
|
|
95
|
+
canGoNext={canShiftMonth(shown, 1, bounds)}
|
|
96
|
+
onToggle={picker.toggle}
|
|
97
|
+
onEscape={picker.dismiss}
|
|
98
|
+
onPreviousMonth={onPreviousMonth}
|
|
99
|
+
onNextMonth={onNextMonth}
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<Box sx={BODY_SX}>
|
|
103
|
+
{/* The days keep their place while a grid is open, so the calendar keeps their size at every density. */}
|
|
104
|
+
<Box sx={{ gridArea: '1 / 1', visibility: picking ? 'hidden' : 'visible' }} data-testid="calendar-days">
|
|
105
|
+
<MonthDays matrix={matrix} monthIndex={0} weekdayNames={weekdayNames} dayContext={dayContext} />
|
|
106
|
+
</Box>
|
|
107
|
+
{picking && (
|
|
108
|
+
<Box sx={PICKER_SLOT_SX}>
|
|
109
|
+
{picker.view === 'months' && (
|
|
110
|
+
<CalendarPickerGrid
|
|
111
|
+
id={monthsId}
|
|
112
|
+
ariaLabel={labels.months}
|
|
113
|
+
columns={MONTH_COLUMNS}
|
|
114
|
+
options={monthOptions(matrix, locale, bounds)}
|
|
115
|
+
testId="calendar-months"
|
|
116
|
+
onPick={picker.pickMonth}
|
|
117
|
+
onDismiss={picker.dismiss}
|
|
118
|
+
/>
|
|
119
|
+
)}
|
|
120
|
+
{picker.view === 'years' && (
|
|
121
|
+
<CalendarPickerGrid
|
|
122
|
+
id={yearsId}
|
|
123
|
+
ariaLabel={labels.years}
|
|
124
|
+
columns={YEAR_COLUMNS}
|
|
125
|
+
options={yearPickerOptions(matrix, bounds)}
|
|
126
|
+
testId="calendar-years"
|
|
127
|
+
scrollable
|
|
128
|
+
onPick={picker.pickYear}
|
|
129
|
+
onDismiss={picker.dismiss}
|
|
130
|
+
/>
|
|
131
|
+
)}
|
|
132
|
+
</Box>
|
|
133
|
+
)}
|
|
134
|
+
</Box>
|
|
135
|
+
</Box>
|
|
136
|
+
);
|
|
137
|
+
};
|