@12-apps/ui 6.80.0 → 6.82.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 +3 -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/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 +37 -32
- 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 +159 -154
- 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-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-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/{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/Command.js +4 -4
- package/dist/form/DateRangePicker.js +21 -15
- package/dist/form/RichTextEditor.js +5 -5
- package/dist/form/total-form.js +6 -6
- 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/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/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/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-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-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-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
|
@@ -8,10 +8,12 @@ import type { MonthMatrix, ResolvedCalendarProps } from './Calendar.types';
|
|
|
8
8
|
|
|
9
9
|
const startOfMonth = (date: Date): Date => new Date(date.getFullYear(), date.getMonth(), 1);
|
|
10
10
|
|
|
11
|
-
// Which day the calendar opens on: whatever is already chosen, else
|
|
11
|
+
// Which day the calendar opens on: whatever is already chosen, else the first
|
|
12
|
+
// of `defaultMonth`, else today.
|
|
12
13
|
const initialFocus = (props: ResolvedCalendarProps, today: Date): Date => {
|
|
13
14
|
if (props.selectionMode === 'single' && props.value) return normalizeDate(props.value);
|
|
14
15
|
if (props.selectionMode === 'range' && props.range.start) return normalizeDate(props.range.start);
|
|
16
|
+
if (props.defaultMonth) return normalizeDate(startOfMonth(props.defaultMonth));
|
|
15
17
|
return today;
|
|
16
18
|
};
|
|
17
19
|
|
|
@@ -44,22 +46,24 @@ const useVisibleMonths = ({
|
|
|
44
46
|
currentMonth,
|
|
45
47
|
monthsToShow,
|
|
46
48
|
firstDayOfWeek,
|
|
49
|
+
fixedWeeks,
|
|
47
50
|
}: {
|
|
48
51
|
currentMonth: Date;
|
|
49
52
|
monthsToShow: number;
|
|
50
53
|
firstDayOfWeek: number;
|
|
54
|
+
fixedWeeks: boolean;
|
|
51
55
|
}): MonthMatrix[] =>
|
|
52
56
|
useMemo(() => {
|
|
53
57
|
const matrices: MonthMatrix[] = [];
|
|
54
58
|
let cursor = currentMonth;
|
|
55
59
|
|
|
56
60
|
for (let i = 0; i < monthsToShow; i++) {
|
|
57
|
-
matrices.push(generateMonthMatrix(cursor.getMonth(), cursor.getFullYear(), firstDayOfWeek));
|
|
61
|
+
matrices.push(generateMonthMatrix(cursor.getMonth(), cursor.getFullYear(), firstDayOfWeek, fixedWeeks));
|
|
58
62
|
cursor = addMonths(cursor, 1);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
return matrices;
|
|
62
|
-
}, [currentMonth, monthsToShow, firstDayOfWeek]);
|
|
66
|
+
}, [currentMonth, monthsToShow, firstDayOfWeek, fixedWeeks]);
|
|
63
67
|
|
|
64
68
|
// A click either sets a single date or advances the range by one step; the range
|
|
65
69
|
// rules themselves live in nextRangeStep.
|
|
@@ -215,6 +219,9 @@ export const useCalendar = (props: ResolvedCalendarProps) => {
|
|
|
215
219
|
currentMonth: state.currentMonth,
|
|
216
220
|
monthsToShow,
|
|
217
221
|
firstDayOfWeek,
|
|
222
|
+
// The selectors caption steps month by month under the thumb; six weeks
|
|
223
|
+
// every time keep it, and a sheet anchored below, where they are.
|
|
224
|
+
fixedWeeks: props.captionLayout === 'selectors',
|
|
218
225
|
});
|
|
219
226
|
|
|
220
227
|
const weekdayNames = useMemo(
|
|
@@ -264,6 +271,9 @@ export const useCalendar = (props: ResolvedCalendarProps) => {
|
|
|
264
271
|
gridRef,
|
|
265
272
|
today,
|
|
266
273
|
focusedDate: state.focusedDate,
|
|
274
|
+
setFocusedDate: state.setFocusedDate,
|
|
275
|
+
currentMonth: state.currentMonth,
|
|
276
|
+
setCurrentMonth: state.setCurrentMonth,
|
|
267
277
|
hoveredDate: state.hoveredDate,
|
|
268
278
|
monthMatrices,
|
|
269
279
|
weekdayNames,
|
|
@@ -50,6 +50,9 @@ export interface CalendarProps {
|
|
|
50
50
|
locale?: string; // e.g. 'en-US'
|
|
51
51
|
showOutsideDays?: boolean; // days from prev/next month
|
|
52
52
|
showWeekNumbers?: boolean;
|
|
53
|
+
captionLayout?: 'arrows' | 'selectors'; // default: 'arrows'; 'selectors' shows one month
|
|
54
|
+
defaultMonth?: Date; // month shown while nothing is chosen; default: today's month
|
|
55
|
+
labels?: Partial<CalendarLabels>; // selectors caption's names; English pack fills the rest
|
|
53
56
|
|
|
54
57
|
// Constraints
|
|
55
58
|
minDate?: Date;
|
|
@@ -128,6 +131,74 @@ export interface CalendarProps {
|
|
|
128
131
|
- Header buttons move month (or year with modifier keys if desired).
|
|
129
132
|
- Month pagination respects `minDate`/`maxDate`.
|
|
130
133
|
|
|
134
|
+
### Opening month: `defaultMonth`
|
|
135
|
+
|
|
136
|
+
The calendar opens on the chosen `value` (single) or `range.start` (range);
|
|
137
|
+
with neither, on `defaultMonth` when given, else on today's month. It is read
|
|
138
|
+
once, on mount, like the value it stands in for. A birth-date picker passes a
|
|
139
|
+
month decades back (the storefront's Perfil field passes January 2001) rather
|
|
140
|
+
than opening on today. It is not clamped: a `defaultMonth` outside
|
|
141
|
+
`minDate`/`maxDate` opens on that month with every day disabled, so pass one
|
|
142
|
+
inside the bounds.
|
|
143
|
+
|
|
144
|
+
### Month and year selectors: `captionLayout="selectors"` (FUT-4121)
|
|
145
|
+
|
|
146
|
+
Opt-in; the default `'arrows'` caption is unchanged. For a date far from today
|
|
147
|
+
— a birth date — where ~360 arrow taps would separate today from 30 years ago.
|
|
148
|
+
|
|
149
|
+
- The caption holds a `<Month> ▾` button, a `<Year> ▾` button and the
|
|
150
|
+
previous/next month arrows. Always one month (`numberOfMonths` is ignored);
|
|
151
|
+
`renderHeader` applies to the `'arrows'` caption only.
|
|
152
|
+
- **Year button** swaps the day grid for a year grid: 4 columns, newest year
|
|
153
|
+
first, from `maxDate`'s year down to `minDate`'s (1900–2099 without bounds;
|
|
154
|
+
the shown year is always listed, `aria-disabled` when outside the bounds). The shown year is highlighted
|
|
155
|
+
(`aria-current="true"`) and takes focus, which scrolls the list to it.
|
|
156
|
+
Picking a year returns to that year's days, in the same month, pulled inside
|
|
157
|
+
the bounds (December in a year capped at October shows October).
|
|
158
|
+
- **Month button** swaps in a 3 × 4 month grid. Months with no day inside
|
|
159
|
+
`minDate`/`maxDate` are `aria-disabled` and ignore a tap. Picking returns to
|
|
160
|
+
the days.
|
|
161
|
+
- Pressing the open grid's button again, or a month arrow, goes back to the
|
|
162
|
+
days. The arrows are disabled at the first and last month the bounds allow.
|
|
163
|
+
- Days outside `minDate`/`maxDate` stay disabled as in any layout.
|
|
164
|
+
- Nothing moves as the month changes: the month always shows six weeks (the
|
|
165
|
+
next month's days fill the rest), the month button keeps the width of the
|
|
166
|
+
longest month name, and an open month or year grid takes the days' place at
|
|
167
|
+
their size. Whether the arrows share the caption's row depends on the width
|
|
168
|
+
only (at 296 px they take a row of their own).
|
|
169
|
+
- Example — 14/03/1990 from January 2001: `2001 ▾` → 1990 → `Janeiro ▾` →
|
|
170
|
+
mar → 14, five taps.
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
import { Calendar } from '@12-apps/ui';
|
|
174
|
+
import { UI_LABELS } from '@12-apps/ui/locales';
|
|
175
|
+
|
|
176
|
+
<Calendar
|
|
177
|
+
ariaLabel="Data de nascimento"
|
|
178
|
+
locale="pt-BR"
|
|
179
|
+
captionLayout="selectors"
|
|
180
|
+
defaultMonth={new Date(2001, 0, 1)}
|
|
181
|
+
minDate={new Date(1900, 0, 1)}
|
|
182
|
+
maxDate={thirteenYearsAgo}
|
|
183
|
+
labels={UI_LABELS['pt-BR'].calendar}
|
|
184
|
+
value={birthDate}
|
|
185
|
+
onChange={setBirthDate}
|
|
186
|
+
/>;
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Copy.** Month names and years come from `Intl` in `locale` (the long name,
|
|
190
|
+
capitalised, on the button; the short one, without its dot, in the grid with
|
|
191
|
+
the long one as its accessible name). The accessible names come from
|
|
192
|
+
`labels` (`CalendarLabels` in `copy/labels.ts`): `chooseMonth(month)`,
|
|
193
|
+
`chooseYear(year)`, `previousMonth`, `nextMonth`, and the two grids' names
|
|
194
|
+
`months`/`years`. The English pack answers for any key left out; a pt-BR host
|
|
195
|
+
passes `UI_LABELS['pt-BR'].calendar` ("Março, escolher mês", "Mês anterior",
|
|
196
|
+
"Anos"…).
|
|
197
|
+
|
|
198
|
+
**Size.** Every caption control and every month/year button is at least 44
|
|
199
|
+
design px tall at any width. In a 320 sheet the two arrows wrap under the
|
|
200
|
+
month/year buttons rather than squeezing them (`SelectorsFitA320Sheet`).
|
|
201
|
+
|
|
131
202
|
### States & Styles (suggested class hooks)
|
|
132
203
|
|
|
133
204
|
- `.cal-root`, `.cal-header`, `.cal-nav`, `.cal-grid`, `.cal-weekdays`, `.cal-row`, `.cal-cell`
|
|
@@ -151,6 +222,24 @@ export interface CalendarProps {
|
|
|
151
222
|
|
|
152
223
|
- Focus should remain inside the grid; header nav is reachable via Tab.
|
|
153
224
|
|
|
225
|
+
**Selectors caption (`captionLayout="selectors"`).**
|
|
226
|
+
|
|
227
|
+
- The month and year buttons are real buttons named by `labels`
|
|
228
|
+
(`chooseMonth`/`chooseYear`, which start with the visible text), with
|
|
229
|
+
`aria-expanded` and, while their grid is open, `aria-controls` pointing at
|
|
230
|
+
it. The arrows are named `previousMonth`/`nextMonth`.
|
|
231
|
+
- Each grid is a `role="group"` named `months`/`years`, with ONE tab stop
|
|
232
|
+
(roving `tabIndex`). Opening it focuses the shown month/year. Arrows move by
|
|
233
|
+
one (left/right) or one row (up/down), Home/End to the ends, Enter/Space
|
|
234
|
+
pick, Escape returns to the days unchanged with focus on the button that
|
|
235
|
+
opened the grid (Escape on a caption button closes it too). Out-of-bounds months stay focusable and say
|
|
236
|
+
`aria-disabled`.
|
|
237
|
+
- A pick shows that month's days and moves focus to the day grid's tab stop.
|
|
238
|
+
- The caption and the grids keep their keys to themselves: Enter on a caption
|
|
239
|
+
button activates it rather than picking the focused day. The day keys
|
|
240
|
+
(arrows, Home/End, PageUp/PageDown, Shift+PageUp/PageDown) work in the day
|
|
241
|
+
view exactly as in the `'arrows'` layout.
|
|
242
|
+
|
|
154
243
|
---
|
|
155
244
|
|
|
156
245
|
## Keyboard Selection Logic (range)
|
|
@@ -197,6 +286,8 @@ export interface CalendarProps {
|
|
|
197
286
|
- `Date/Calendar/WithFooterApplyClear`
|
|
198
287
|
- `Date/Calendar/WeekNumbers`
|
|
199
288
|
- `Date/Calendar/RTL`
|
|
289
|
+
- `Form/Calendar/MonthYearSelectors` — `captionLayout="selectors"` with `defaultMonth` and bounds (FUT-4121)
|
|
290
|
+
- `Form/Calendar/Tests/SelectorsPickABirthDate`, `SelectorsKeyboard`, `SelectorsFitA320Sheet` — the five-tap journey, the grids' keys and focus, and the 320 fit with 44px targets
|
|
200
291
|
|
|
201
292
|
---
|
|
202
293
|
|
|
@@ -282,6 +373,23 @@ const nextButton = await canvas.findByTestId('calendar-next-month');
|
|
|
282
373
|
await userEvent.click(nextButton);
|
|
283
374
|
```
|
|
284
375
|
|
|
376
|
+
#### `calendar-month-select` / `calendar-year-select`
|
|
377
|
+
|
|
378
|
+
- **Element:** the selectors caption's month and year buttons
|
|
379
|
+
- **Only with:** `captionLayout="selectors"` (absent otherwise)
|
|
380
|
+
- **Attributes:** `aria-expanded`, `aria-controls` while open
|
|
381
|
+
- **Test Tip:** `expect(canvas.getByTestId('calendar-year-select')).toHaveTextContent('2001')`
|
|
382
|
+
|
|
383
|
+
#### `calendar-months` / `calendar-months-${index}`
|
|
384
|
+
|
|
385
|
+
- **Element:** the month grid (`role="group"`) and each month button, by 0-based month
|
|
386
|
+
- **Only with:** `captionLayout="selectors"`, while the month grid is open
|
|
387
|
+
|
|
388
|
+
#### `calendar-years` / `calendar-years-${year}`
|
|
389
|
+
|
|
390
|
+
- **Element:** the year grid (`role="group"`) and each year button, by full year
|
|
391
|
+
- **Only with:** `captionLayout="selectors"`, while the year grid is open
|
|
392
|
+
|
|
285
393
|
### Calendar Grid Elements
|
|
286
394
|
|
|
287
395
|
#### `calendar-grid`
|
|
@@ -516,6 +624,14 @@ expect(style.cursor).toBe('not-allowed');
|
|
|
516
624
|
- **Impact:** Custom disabled dates have `aria-disabled="true"`
|
|
517
625
|
- **Test Tip:** Verify callback determines which dates are disabled
|
|
518
626
|
|
|
627
|
+
#### `captionLayout`
|
|
628
|
+
- **Values:** `'arrows'` (default) | `'selectors'`
|
|
629
|
+
- **Impact:** `'selectors'` adds `calendar-month-select`/`calendar-year-select`, names the arrows, shows one month, and hides `calendar-grid` while a month or year grid is open
|
|
630
|
+
|
|
631
|
+
#### `defaultMonth`
|
|
632
|
+
- **Values:** `Date`
|
|
633
|
+
- **Impact:** the month on screen at mount when there is no `value`/`range.start` — pin it in a test instead of depending on today
|
|
634
|
+
|
|
519
635
|
#### `autoFocus`
|
|
520
636
|
- **Values:** `boolean`
|
|
521
637
|
- **Impact:** Calendar grid receives focus on mount
|
|
@@ -812,3 +928,8 @@ try {
|
|
|
812
928
|
- Added `calendar-date-${date}`
|
|
813
929
|
- Added `calendar-selected-date`
|
|
814
930
|
- Added `calendar-today`
|
|
931
|
+
|
|
932
|
+
- **2026-10-27 (FUT-4121):** month/year selectors and the opening month
|
|
933
|
+
- Added `captionLayout`, `defaultMonth`, `labels` (`CalendarLabels`)
|
|
934
|
+
- Added `calendar-month-select`, `calendar-year-select`
|
|
935
|
+
- Added `calendar-months`, `calendar-months-${index}`, `calendar-years`, `calendar-years-${year}`
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import type { CalendarView, DateBounds } from './Calendar.views';
|
|
5
|
+
import { clampMonthToBounds, landingDay } from './Calendar.views';
|
|
6
|
+
|
|
7
|
+
/** The day a keyboard user lands on after a pick: the grid's one tab stop. */
|
|
8
|
+
const FOCUSED_DAY = '[role="gridcell"][tabindex="0"]';
|
|
9
|
+
|
|
10
|
+
/** The selector a dismissed grid hands focus back to. */
|
|
11
|
+
const TOGGLE_OF: Record<Exclude<CalendarView, 'days'>, string> = {
|
|
12
|
+
months: '[data-testid="calendar-month-select"]',
|
|
13
|
+
years: '[data-testid="calendar-year-select"]',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
interface CalendarPickerArgs {
|
|
17
|
+
rootRef: React.RefObject<HTMLElement | null>;
|
|
18
|
+
bounds: DateBounds;
|
|
19
|
+
currentMonth: Date;
|
|
20
|
+
focusedDate: Date;
|
|
21
|
+
setCurrentMonth: (month: Date) => void;
|
|
22
|
+
setFocusedDate: (date: Date) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CalendarPicker {
|
|
26
|
+
view: CalendarView;
|
|
27
|
+
/** Opens a pick grid, or goes back to the days when it is already open. */
|
|
28
|
+
toggle: (view: Exclude<CalendarView, 'days'>) => void;
|
|
29
|
+
pickYear: (year: number) => void;
|
|
30
|
+
pickMonth: (month: number) => void;
|
|
31
|
+
/** Back to the days with nothing changed (Escape), focus on the grid's own button. */
|
|
32
|
+
dismiss: () => void;
|
|
33
|
+
/** Back to the days, focus left where it is (a month arrow was used). */
|
|
34
|
+
showDays: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The month/year views of `captionLayout="selectors"`. A pick shows that month
|
|
39
|
+
* and puts focus on its day grid, so the keyboard carries on where the eye
|
|
40
|
+
* already is; a dismiss returns focus to the button that opened the grid.
|
|
41
|
+
*/
|
|
42
|
+
export const useCalendarPicker = ({
|
|
43
|
+
rootRef,
|
|
44
|
+
bounds,
|
|
45
|
+
currentMonth,
|
|
46
|
+
focusedDate,
|
|
47
|
+
setCurrentMonth,
|
|
48
|
+
setFocusedDate,
|
|
49
|
+
}: CalendarPickerArgs): CalendarPicker => {
|
|
50
|
+
const [view, setView] = useState<CalendarView>('days');
|
|
51
|
+
// Focus can only move once the next view is on screen, so a change of view
|
|
52
|
+
// leaves a note for the effect below.
|
|
53
|
+
const pendingFocus = useRef<string | null>(null);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const selector = pendingFocus.current;
|
|
57
|
+
if (!selector) return;
|
|
58
|
+
pendingFocus.current = null;
|
|
59
|
+
const root = rootRef.current;
|
|
60
|
+
// A custom `renderDay` has no gridcell button: the container takes focus,
|
|
61
|
+
// and the arrow keys still move the day from there.
|
|
62
|
+
(root?.querySelector<HTMLElement>(selector) ?? root)?.focus();
|
|
63
|
+
}, [view, rootRef]);
|
|
64
|
+
|
|
65
|
+
const toggle = useCallback(
|
|
66
|
+
(target: Exclude<CalendarView, 'days'>) => setView((current) => (current === target ? 'days' : target)),
|
|
67
|
+
[],
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const land = (year: number, month: number) => {
|
|
71
|
+
setCurrentMonth(new Date(year, month, 1));
|
|
72
|
+
setFocusedDate(landingDay(year, month, focusedDate.getDate(), bounds));
|
|
73
|
+
pendingFocus.current = FOCUSED_DAY;
|
|
74
|
+
setView('days');
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const pickYear = (year: number) => land(year, clampMonthToBounds(year, currentMonth.getMonth(), bounds));
|
|
78
|
+
const pickMonth = (month: number) => land(currentMonth.getFullYear(), month);
|
|
79
|
+
|
|
80
|
+
const dismiss = () => {
|
|
81
|
+
if (view === 'days') return;
|
|
82
|
+
pendingFocus.current = TOGGLE_OF[view];
|
|
83
|
+
setView('days');
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const showDays = useCallback(() => setView('days'), []);
|
|
87
|
+
|
|
88
|
+
return { view, toggle, pickYear, pickMonth, dismiss, showDays };
|
|
89
|
+
};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
2
2
|
import Box from '@mui/material/Box/index.js';
|
|
3
3
|
import Paper from '@mui/material/Paper/index.js';
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useCallback, useRef } from 'react';
|
|
5
5
|
|
|
6
|
+
import { EN_US_UI_LABELS } from '../../../en-US.labels';
|
|
6
7
|
import { rem, sxRem } from '../../../tokens/relative';
|
|
8
|
+
import { resolveLabels } from '../../../utils/resolve-labels';
|
|
7
9
|
|
|
8
10
|
import { resolveCalendarProps } from './Calendar.helpers';
|
|
9
11
|
import { useCalendar } from './Calendar.hooks';
|
|
10
|
-
import
|
|
12
|
+
import { useCalendarPicker } from './Calendar.picker';
|
|
13
|
+
import type { CalendarProps, ResolvedCalendarProps } from './Calendar.types';
|
|
11
14
|
import type { DayCellContext } from './CalendarDayCell';
|
|
12
15
|
import { CalendarMonth } from './CalendarMonth';
|
|
16
|
+
import { CalendarSelectorsMonth } from './CalendarSelectorsMonth';
|
|
13
17
|
|
|
14
18
|
const containerSx = (monthsToShow: number): SxProps<Theme> => ({
|
|
15
19
|
p: 3,
|
|
@@ -24,54 +28,98 @@ const containerSx = (monthsToShow: number): SxProps<Theme> => ({
|
|
|
24
28
|
},
|
|
25
29
|
});
|
|
26
30
|
|
|
31
|
+
type CalendarState = ReturnType<typeof useCalendar>;
|
|
32
|
+
|
|
33
|
+
const buildDayContext = (props: ResolvedCalendarProps, calendar: CalendarState): DayCellContext => ({
|
|
34
|
+
selectionMode: props.selectionMode,
|
|
35
|
+
value: props.value,
|
|
36
|
+
range: props.range,
|
|
37
|
+
showOutsideDays: props.showOutsideDays,
|
|
38
|
+
renderDay: props.renderDay,
|
|
39
|
+
dayClassName: props.dayClassName,
|
|
40
|
+
hoveredDate: calendar.hoveredDate,
|
|
41
|
+
focusedDate: calendar.focusedDate,
|
|
42
|
+
today: calendar.today,
|
|
43
|
+
isDisabled: calendar.isDisabled,
|
|
44
|
+
onSelect: calendar.handleDateClick,
|
|
45
|
+
onHover: calendar.handleDateMouseEnter,
|
|
46
|
+
onHoverEnd: calendar.handleDateMouseLeave,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// The container is the forwarded ref's AND the picker's: focus falls back to it.
|
|
50
|
+
const useRootRef = (forwarded: React.ForwardedRef<HTMLDivElement>) => {
|
|
51
|
+
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
52
|
+
const setRoot = useCallback(
|
|
53
|
+
(node: HTMLDivElement | null) => {
|
|
54
|
+
rootRef.current = node;
|
|
55
|
+
if (typeof forwarded === 'function') forwarded(node);
|
|
56
|
+
else if (forwarded) forwarded.current = node;
|
|
57
|
+
},
|
|
58
|
+
[forwarded],
|
|
59
|
+
);
|
|
60
|
+
return { rootRef, setRoot };
|
|
61
|
+
};
|
|
62
|
+
|
|
27
63
|
export const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>((componentProps, ref) => {
|
|
28
64
|
const props = resolveCalendarProps(componentProps);
|
|
29
65
|
const { monthsToShow, locale, renderHeader, renderFooter, className, ariaLabel } = props;
|
|
30
66
|
|
|
31
67
|
const calendar = useCalendar(props);
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
renderDay: props.renderDay,
|
|
39
|
-
dayClassName: props.dayClassName,
|
|
40
|
-
hoveredDate: calendar.hoveredDate,
|
|
41
|
-
focusedDate: calendar.focusedDate,
|
|
42
|
-
today: calendar.today,
|
|
43
|
-
isDisabled: calendar.isDisabled,
|
|
44
|
-
onSelect: calendar.handleDateClick,
|
|
45
|
-
onHover: calendar.handleDateMouseEnter,
|
|
46
|
-
onHoverEnd: calendar.handleDateMouseLeave,
|
|
47
|
-
};
|
|
68
|
+
const { rootRef, setRoot } = useRootRef(ref);
|
|
69
|
+
const bounds = { minDate: props.minDate, maxDate: props.maxDate };
|
|
70
|
+
const picker = useCalendarPicker({ rootRef, bounds, ...calendar });
|
|
71
|
+
const dayContext = buildDayContext(props, calendar);
|
|
72
|
+
// The selectors caption always resolves to one month (see the helpers).
|
|
73
|
+
const firstMonth = calendar.monthMatrices[0];
|
|
48
74
|
|
|
49
75
|
return (
|
|
50
76
|
<Paper
|
|
51
|
-
ref={
|
|
77
|
+
ref={setRoot}
|
|
52
78
|
className={className}
|
|
53
79
|
role="application"
|
|
54
80
|
aria-label={ariaLabel}
|
|
55
81
|
tabIndex={0}
|
|
56
|
-
|
|
82
|
+
// The day keys belong to the days: with a month or year grid open there
|
|
83
|
+
// is no focused day on screen to move.
|
|
84
|
+
onKeyDown={picker.view === 'days' ? calendar.handleKeyDown : undefined}
|
|
57
85
|
data-testid="calendar-container"
|
|
58
86
|
sx={containerSx(monthsToShow)}
|
|
59
87
|
>
|
|
60
88
|
<Box ref={calendar.gridRef} sx={{ display: 'flex', gap: 3, flexWrap: 'wrap' }}>
|
|
61
|
-
{
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
matrix={matrix}
|
|
65
|
-
monthIndex={index}
|
|
66
|
-
monthsToShow={monthsToShow}
|
|
89
|
+
{props.captionLayout === 'selectors' && firstMonth ? (
|
|
90
|
+
<CalendarSelectorsMonth
|
|
91
|
+
matrix={firstMonth}
|
|
67
92
|
locale={locale}
|
|
68
93
|
weekdayNames={calendar.weekdayNames}
|
|
69
|
-
renderHeader={renderHeader}
|
|
70
|
-
onPreviousMonth={calendar.goToPreviousMonth}
|
|
71
|
-
onNextMonth={calendar.goToNextMonth}
|
|
72
94
|
dayContext={dayContext}
|
|
95
|
+
bounds={bounds}
|
|
96
|
+
labels={resolveLabels(EN_US_UI_LABELS.calendar, props.labels)}
|
|
97
|
+
picker={picker}
|
|
98
|
+
onPreviousMonth={() => {
|
|
99
|
+
picker.showDays();
|
|
100
|
+
calendar.goToPreviousMonth();
|
|
101
|
+
}}
|
|
102
|
+
onNextMonth={() => {
|
|
103
|
+
picker.showDays();
|
|
104
|
+
calendar.goToNextMonth();
|
|
105
|
+
}}
|
|
73
106
|
/>
|
|
74
|
-
)
|
|
107
|
+
) : (
|
|
108
|
+
calendar.monthMatrices.map((matrix, index) => (
|
|
109
|
+
<CalendarMonth
|
|
110
|
+
key={`month-${matrix.year}-${matrix.month}`}
|
|
111
|
+
matrix={matrix}
|
|
112
|
+
monthIndex={index}
|
|
113
|
+
monthsToShow={monthsToShow}
|
|
114
|
+
locale={locale}
|
|
115
|
+
weekdayNames={calendar.weekdayNames}
|
|
116
|
+
renderHeader={renderHeader}
|
|
117
|
+
onPreviousMonth={calendar.goToPreviousMonth}
|
|
118
|
+
onNextMonth={calendar.goToNextMonth}
|
|
119
|
+
dayContext={dayContext}
|
|
120
|
+
/>
|
|
121
|
+
))
|
|
122
|
+
)}
|
|
75
123
|
</Box>
|
|
76
124
|
|
|
77
125
|
{renderFooter && (
|
|
@@ -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
|
};
|