@12-apps/ui 6.6.0 → 6.8.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/dist/{chunk-QLBYAYUG.js → chunk-KR2BP7NK.js} +4 -4
- package/dist/chunk-KR2BP7NK.js.map +1 -0
- package/dist/{chunk-DFVRZ3UK.js → chunk-KXARS46L.js} +3 -3
- package/dist/chunk-KXARS46L.js.map +1 -0
- package/dist/{chunk-JP55QWVR.js → chunk-L7L6SX64.js} +5 -2
- package/dist/chunk-L7L6SX64.js.map +1 -0
- package/dist/{chunk-QZZVHY6U.js → chunk-PVLDKXKR.js} +7 -3
- package/dist/chunk-PVLDKXKR.js.map +1 -0
- package/dist/{chunk-3KWD5Y5O.js → chunk-RXE5CUUE.js} +8 -4
- package/dist/chunk-RXE5CUUE.js.map +1 -0
- package/dist/{chunk-H7UAGTVW.js → chunk-TSG5C7MP.js} +4 -3
- package/dist/chunk-TSG5C7MP.js.map +1 -0
- package/dist/{chunk-NUCLEOHF.js → chunk-UNM7KFDX.js} +44 -14
- package/dist/chunk-UNM7KFDX.js.map +1 -0
- package/dist/{chunk-CEKPLUQV.js → chunk-UY7UF7IN.js} +19 -13
- package/dist/chunk-UY7UF7IN.js.map +1 -0
- package/dist/data-display/Alert.js +1 -1
- package/dist/data-display/AsyncStateContainer.js +2 -1
- package/dist/data-display/AsyncStateContainer.js.map +1 -1
- package/dist/data-display/Banner.js +4 -2
- package/dist/data-display/Banner.js.map +1 -1
- package/dist/data-display/CardKit.js +3 -1
- package/dist/data-display/CardKit.js.map +1 -1
- package/dist/data-display/Carousel.js +5 -2
- package/dist/data-display/Carousel.js.map +1 -1
- package/dist/data-display/DataGrid.js +1 -1
- package/dist/data-display/DataViews.js +90 -66
- package/dist/data-display/DataViews.js.map +1 -1
- package/dist/data-display/HoverCard.js +4 -1
- package/dist/data-display/HoverCard.js.map +1 -1
- package/dist/data-display/Lightbox.js +147 -117
- package/dist/data-display/Lightbox.js.map +1 -1
- package/dist/data-display/MapPreview.js +14 -10
- package/dist/data-display/MapPreview.js.map +1 -1
- package/dist/data-display/Table.js +4 -2
- package/dist/data-display/Table.js.map +1 -1
- package/dist/data-display/TimingDiagram.js +3 -2
- package/dist/data-display/TimingDiagram.js.map +1 -1
- package/dist/feedback/Sonner.js +5 -4
- package/dist/feedback/Sonner.js.map +1 -1
- package/dist/feedback/StackedModal.js +1 -1
- package/dist/feedback/TutorialOverlay.js +19 -5
- package/dist/feedback/TutorialOverlay.js.map +1 -1
- package/dist/form/AddressAutocomplete.js +16 -8
- package/dist/form/AddressAutocomplete.js.map +1 -1
- package/dist/form/Autocomplete.js +9 -7
- package/dist/form/Autocomplete.js.map +1 -1
- package/dist/form/Calendar.js +1 -1
- package/dist/form/CodeEditor.js +14 -9
- package/dist/form/CodeEditor.js.map +1 -1
- package/dist/form/DateRangePicker.js +10 -3
- package/dist/form/DateRangePicker.js.map +1 -1
- package/dist/form/Menubar.js +4 -1
- package/dist/form/Menubar.js.map +1 -1
- package/dist/form/PasswordStrength.js +48 -28
- package/dist/form/PasswordStrength.js.map +1 -1
- package/dist/form/PhoneInput.js +11 -5
- package/dist/form/PhoneInput.js.map +1 -1
- package/dist/form/SearchPalette.js +4 -1
- package/dist/form/SearchPalette.js.map +1 -1
- package/dist/form/Textarea.js +21 -19
- package/dist/form/Textarea.js.map +1 -1
- package/dist/form/UploadButton.js +16 -11
- package/dist/form/UploadButton.js.map +1 -1
- package/dist/layout/ContentToolbar.js +1 -1
- package/dist/layout/Dashboard.js +2 -1
- package/dist/layout/Dashboard.js.map +1 -1
- package/dist/layout/ScrollArea.js +9 -3
- package/dist/layout/ScrollArea.js.map +1 -1
- package/dist/layout/TableFilter.js +1 -1
- package/dist/navigation/Breadcrumbs.js +9 -3
- package/dist/navigation/Breadcrumbs.js.map +1 -1
- package/dist/navigation/CommandPalette.js +20 -7
- package/dist/navigation/CommandPalette.js.map +1 -1
- package/dist/navigation/Pagination.js +1 -1
- package/dist/navigation/Tabs.js +7 -3
- package/dist/navigation/Tabs.js.map +1 -1
- package/dist/pt-BR.js +192 -5
- package/dist/pt-BR.js.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.d.ts +9 -2
- package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.types.d.ts +25 -9
- package/dist/types/components/data-display/Alert/Alert.types.d.ts.map +1 -1
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.d.ts.map +1 -1
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.types.d.ts +6 -0
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.types.d.ts +2 -0
- package/dist/types/components/data-display/Banner/Banner.types.d.ts.map +1 -1
- package/dist/types/components/data-display/CardKit/card-actions-context.d.ts +3 -1
- package/dist/types/components/data-display/CardKit/card-actions-context.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.chrome.d.ts +3 -0
- package/dist/types/components/data-display/Carousel/Carousel.chrome.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.types.d.ts +7 -0
- package/dist/types/components/data-display/Carousel/Carousel.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataGrid/DataGrid.states.d.ts +1 -0
- package/dist/types/components/data-display/DataGrid/DataGrid.states.d.ts.map +1 -1
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +5 -0
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +29 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts +12 -1
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-filter-panel.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-pagination.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-range-pill.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-table-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts.map +1 -1
- package/dist/types/components/data-display/HoverCard/HoverCard.content.d.ts +1 -1
- package/dist/types/components/data-display/HoverCard/HoverCard.content.d.ts.map +1 -1
- package/dist/types/components/data-display/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/types/components/data-display/HoverCard/HoverCard.types.d.ts +2 -0
- package/dist/types/components/data-display/HoverCard/HoverCard.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/Lightbox.types.d.ts +9 -0
- package/dist/types/components/data-display/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/LightboxControls.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/lightbox-copy-context.d.ts +17 -0
- package/dist/types/components/data-display/Lightbox/lightbox-copy-context.d.ts.map +1 -0
- package/dist/types/components/data-display/MapPreview/MapControlBar.d.ts +7 -0
- package/dist/types/components/data-display/MapPreview/MapControlBar.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapLayers.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapPreview.types.d.ts +9 -0
- package/dist/types/components/data-display/MapPreview/MapPreview.types.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapSearchBar.d.ts +2 -0
- package/dist/types/components/data-display/MapPreview/MapSearchBar.d.ts.map +1 -1
- package/dist/types/components/data-display/Table/Table.d.ts.map +1 -1
- package/dist/types/components/data-display/Table/Table.types.d.ts +5 -0
- package/dist/types/components/data-display/Table/Table.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Table/TableStates.d.ts +3 -1
- package/dist/types/components/data-display/Table/TableStates.d.ts.map +1 -1
- package/dist/types/components/data-display/TimingDiagram/TimingDiagram.d.ts.map +1 -1
- package/dist/types/components/data-display/TimingDiagram/TimingDiagram.types.d.ts +3 -0
- package/dist/types/components/data-display/TimingDiagram/TimingDiagram.types.d.ts.map +1 -1
- package/dist/types/components/feedback/Sonner/Sonner.d.ts +8 -0
- package/dist/types/components/feedback/Sonner/Sonner.d.ts.map +1 -1
- package/dist/types/components/feedback/Sonner/Sonner.types.d.ts +2 -0
- package/dist/types/components/feedback/Sonner/Sonner.types.d.ts.map +1 -1
- package/dist/types/components/feedback/Sonner/SonnerToast.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.parts.d.ts +2 -0
- package/dist/types/components/feedback/StackedModal/StackedModal.parts.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts +2 -0
- package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts.map +1 -1
- package/dist/types/components/feedback/TutorialOverlay/TutorialOverlay.d.ts.map +1 -1
- package/dist/types/components/feedback/TutorialOverlay/TutorialOverlay.types.d.ts +3 -0
- package/dist/types/components/feedback/TutorialOverlay/TutorialOverlay.types.d.ts.map +1 -1
- package/dist/types/components/feedback/TutorialOverlay/TutorialStepBody.d.ts +2 -0
- package/dist/types/components/feedback/TutorialOverlay/TutorialStepBody.d.ts.map +1 -1
- package/dist/types/components/form/AddressAutocomplete/AddressAutocomplete.types.d.ts +7 -0
- package/dist/types/components/form/AddressAutocomplete/AddressAutocomplete.types.d.ts.map +1 -1
- package/dist/types/components/form/AddressAutocomplete/AddressAutocompleteField.d.ts.map +1 -1
- package/dist/types/components/form/AddressAutocomplete/AddressFallbackField.d.ts +1 -0
- package/dist/types/components/form/AddressAutocomplete/AddressFallbackField.d.ts.map +1 -1
- package/dist/types/components/form/AddressAutocomplete/AddressInputField.d.ts +1 -0
- package/dist/types/components/form/AddressAutocomplete/AddressInputField.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/Autocomplete.parts.d.ts +9 -3
- package/dist/types/components/form/Autocomplete/Autocomplete.parts.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/Autocomplete.types.d.ts +7 -0
- package/dist/types/components/form/Autocomplete/Autocomplete.types.d.ts.map +1 -1
- package/dist/types/components/form/Calendar/Calendar.types.d.ts +6 -0
- package/dist/types/components/form/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/types/components/form/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/types/components/form/CodeEditor/CodeEditor.types.d.ts +7 -0
- package/dist/types/components/form/CodeEditor/CodeEditor.types.d.ts.map +1 -1
- package/dist/types/components/form/CodeEditor/CodeEditorToolbar.d.ts +2 -0
- package/dist/types/components/form/CodeEditor/CodeEditorToolbar.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.range.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.types.d.ts +11 -0
- package/dist/types/components/form/DateRangePicker/DateRangePicker.types.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePickerFields.d.ts.map +1 -1
- package/dist/types/components/form/Menubar/Menubar.d.ts.map +1 -1
- package/dist/types/components/form/Menubar/Menubar.toolbar.d.ts +1 -0
- package/dist/types/components/form/Menubar/Menubar.toolbar.d.ts.map +1 -1
- package/dist/types/components/form/Menubar/Menubar.types.d.ts +5 -0
- package/dist/types/components/form/Menubar/Menubar.types.d.ts.map +1 -1
- package/dist/types/components/form/PasswordStrength/PasswordStrength.d.ts.map +1 -1
- package/dist/types/components/form/PasswordStrength/PasswordStrength.helpers.d.ts +4 -2
- package/dist/types/components/form/PasswordStrength/PasswordStrength.helpers.d.ts.map +1 -1
- package/dist/types/components/form/PasswordStrength/PasswordStrength.types.d.ts +8 -0
- package/dist/types/components/form/PasswordStrength/PasswordStrength.types.d.ts.map +1 -1
- package/dist/types/components/form/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/types/components/form/PhoneInput/PhoneInput.types.d.ts +7 -0
- package/dist/types/components/form/PhoneInput/PhoneInput.types.d.ts.map +1 -1
- package/dist/types/components/form/SearchPalette/SearchPalette.d.ts.map +1 -1
- package/dist/types/components/form/SearchPalette/SearchPalette.parts.d.ts +2 -0
- package/dist/types/components/form/SearchPalette/SearchPalette.parts.d.ts.map +1 -1
- package/dist/types/components/form/SearchPalette/SearchPalette.types.d.ts +6 -0
- package/dist/types/components/form/SearchPalette/SearchPalette.types.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/Textarea.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/Textarea.types.d.ts +16 -1
- package/dist/types/components/form/Textarea/Textarea.types.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/TextareaRichEditor.d.ts +7 -0
- package/dist/types/components/form/Textarea/TextareaRichEditor.d.ts.map +1 -1
- package/dist/types/components/form/UploadButton/UploadButton.d.ts.map +1 -1
- package/dist/types/components/form/UploadButton/UploadButton.parts.d.ts +6 -3
- package/dist/types/components/form/UploadButton/UploadButton.parts.d.ts.map +1 -1
- package/dist/types/components/form/UploadButton/UploadButton.types.d.ts +7 -0
- package/dist/types/components/form/UploadButton/UploadButton.types.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.d.ts +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.types.d.ts +12 -0
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.types.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/MultiSelectDropdown.d.ts +1 -1
- package/dist/types/components/layout/ContentToolbar/MultiSelectDropdown.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/SortByDropdown.d.ts +1 -1
- package/dist/types/components/layout/ContentToolbar/SortByDropdown.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ViewSelector.d.ts +1 -1
- package/dist/types/components/layout/ContentToolbar/ViewSelector.d.ts.map +1 -1
- package/dist/types/components/layout/Dashboard/Dashboard.d.ts +1 -1
- package/dist/types/components/layout/Dashboard/Dashboard.types.d.ts +4 -0
- package/dist/types/components/layout/Dashboard/Dashboard.types.d.ts.map +1 -1
- package/dist/types/components/layout/Dashboard/DashboardParts.d.ts +1 -1
- package/dist/types/components/layout/Dashboard/DashboardParts.d.ts.map +1 -1
- package/dist/types/components/layout/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/components/layout/ScrollArea/ScrollArea.types.d.ts +21 -3
- package/dist/types/components/layout/ScrollArea/ScrollArea.types.d.ts.map +1 -1
- package/dist/types/components/layout/ScrollArea/ScrollViewport.d.ts +2 -0
- package/dist/types/components/layout/ScrollArea/ScrollViewport.d.ts.map +1 -1
- package/dist/types/components/layout/TableFilter/TableFilter.d.ts +1 -1
- package/dist/types/components/layout/TableFilter/TableFilter.d.ts.map +1 -1
- package/dist/types/components/layout/TableFilter/TableFilter.types.d.ts +7 -0
- package/dist/types/components/layout/TableFilter/TableFilter.types.d.ts.map +1 -1
- package/dist/types/components/layout/TableFilter/TableFilterContext.d.ts +9 -0
- package/dist/types/components/layout/TableFilter/TableFilterContext.d.ts.map +1 -1
- package/dist/types/components/navigation/Breadcrumbs/BreadcrumbEntry.d.ts +2 -0
- package/dist/types/components/navigation/Breadcrumbs/BreadcrumbEntry.d.ts.map +1 -1
- package/dist/types/components/navigation/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/components/navigation/Breadcrumbs/Breadcrumbs.types.d.ts +3 -0
- package/dist/types/components/navigation/Breadcrumbs/Breadcrumbs.types.d.ts.map +1 -1
- package/dist/types/components/navigation/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/types/components/navigation/CommandPalette/CommandPalette.types.d.ts +3 -0
- package/dist/types/components/navigation/CommandPalette/CommandPalette.types.d.ts.map +1 -1
- package/dist/types/components/navigation/CommandPalette/CommandPaletteResults.d.ts +2 -0
- package/dist/types/components/navigation/CommandPalette/CommandPaletteResults.d.ts.map +1 -1
- package/dist/types/components/navigation/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/navigation/Pagination/Pagination.types.d.ts +2 -0
- package/dist/types/components/navigation/Pagination/Pagination.types.d.ts.map +1 -1
- package/dist/types/components/navigation/Pagination/PaginationParts.d.ts +2 -0
- package/dist/types/components/navigation/Pagination/PaginationParts.d.ts.map +1 -1
- package/dist/types/components/navigation/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/components/navigation/Tabs/Tabs.types.d.ts +2 -0
- package/dist/types/components/navigation/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts +6 -2
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts +6 -0
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts.map +1 -1
- package/dist/types/components/utility/InstallPrompt/InstallPrompt.d.ts +4 -2
- package/dist/types/components/utility/InstallPrompt/InstallPrompt.d.ts.map +1 -1
- package/dist/types/components/utility/InstallPrompt/InstallPrompt.types.d.ts +8 -7
- package/dist/types/components/utility/InstallPrompt/InstallPrompt.types.d.ts.map +1 -1
- package/dist/types/copy/data-display.d.ts +56 -0
- package/dist/types/copy/data-display.d.ts.map +1 -0
- package/dist/types/copy/feedback.d.ts +38 -0
- package/dist/types/copy/feedback.d.ts.map +1 -0
- package/dist/types/copy/form.d.ts +146 -0
- package/dist/types/copy/form.d.ts.map +1 -0
- package/dist/types/copy/layout.d.ts +18 -0
- package/dist/types/copy/layout.d.ts.map +1 -0
- package/dist/types/copy/navigation.d.ts +24 -0
- package/dist/types/copy/navigation.d.ts.map +1 -0
- package/dist/types/copy/shared.d.ts +119 -0
- package/dist/types/copy/shared.d.ts.map +1 -0
- package/dist/types/copy/utility.d.ts +35 -0
- package/dist/types/copy/utility.d.ts.map +1 -0
- package/dist/types/copy.d.ts +13 -113
- package/dist/types/copy.d.ts.map +1 -1
- package/dist/types/pt-BR.d.ts +15 -18
- package/dist/types/pt-BR.d.ts.map +1 -1
- package/dist/types/pt-BR.data-display.d.ts +13 -0
- package/dist/types/pt-BR.data-display.d.ts.map +1 -0
- package/dist/types/pt-BR.feedback.d.ts +8 -0
- package/dist/types/pt-BR.feedback.d.ts.map +1 -0
- package/dist/types/pt-BR.form.d.ts +13 -0
- package/dist/types/pt-BR.form.d.ts.map +1 -0
- package/dist/types/pt-BR.layout.d.ts +7 -0
- package/dist/types/pt-BR.layout.d.ts.map +1 -0
- package/dist/types/pt-BR.navigation.d.ts +8 -0
- package/dist/types/pt-BR.navigation.d.ts.map +1 -0
- package/dist/types/pt-BR.shared.d.ts +21 -0
- package/dist/types/pt-BR.shared.d.ts.map +1 -0
- package/dist/types/pt-BR.utility.d.ts +8 -0
- package/dist/types/pt-BR.utility.d.ts.map +1 -0
- package/dist/types/user-avatar/user-avatar.d.ts +7 -1
- package/dist/types/user-avatar/user-avatar.d.ts.map +1 -1
- package/dist/user-avatar.js +2 -2
- package/dist/user-avatar.js.map +1 -1
- package/dist/utility/InfiniteScroll.js +7 -5
- package/dist/utility/InfiniteScroll.js.map +1 -1
- package/dist/utility/InstallPrompt.js +14 -13
- package/dist/utility/InstallPrompt.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/Alert/Alert.tsx +22 -5
- package/src/components/data-display/Alert/Alert.types.ts +20 -10
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.tsx +2 -1
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.types.ts +6 -0
- package/src/components/data-display/Banner/Banner.tsx +5 -2
- package/src/components/data-display/Banner/Banner.types.ts +2 -0
- package/src/components/data-display/CardKit/card-actions-context.tsx +4 -0
- package/src/components/data-display/Carousel/Carousel.chrome.tsx +5 -0
- package/src/components/data-display/Carousel/Carousel.parts.tsx +4 -3
- package/src/components/data-display/Carousel/Carousel.types.ts +7 -0
- package/src/components/data-display/DataGrid/DataGrid.states.tsx +3 -3
- package/src/components/data-display/DataGrid/DataGrid.tsx +1 -1
- package/src/components/data-display/DataGrid/DataGrid.types.ts +5 -0
- package/src/components/data-display/DataViews/data-views-category-pill.tsx +2 -0
- package/src/components/data-display/DataViews/data-views-copy.ts +29 -1
- package/src/components/data-display/DataViews/data-views-day-input.tsx +14 -3
- package/src/components/data-display/DataViews/data-views-filter-panel.tsx +2 -1
- package/src/components/data-display/DataViews/data-views-grid-bodies.tsx +3 -0
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +9 -10
- package/src/components/data-display/DataViews/data-views-more-fields.tsx +3 -1
- package/src/components/data-display/DataViews/data-views-pagination.tsx +3 -0
- package/src/components/data-display/DataViews/data-views-range-pill.tsx +3 -1
- package/src/components/data-display/DataViews/data-views-table-parts.tsx +1 -0
- package/src/components/data-display/DataViews/data-views-toolbar.tsx +2 -0
- package/src/components/data-display/HoverCard/HoverCard.content.tsx +10 -2
- package/src/components/data-display/HoverCard/HoverCard.tsx +2 -3
- package/src/components/data-display/HoverCard/HoverCard.types.ts +2 -0
- package/src/components/data-display/Lightbox/Lightbox.tsx +3 -0
- package/src/components/data-display/Lightbox/Lightbox.types.ts +9 -0
- package/src/components/data-display/Lightbox/LightboxControls.tsx +28 -15
- package/src/components/data-display/Lightbox/lightbox-copy-context.tsx +42 -0
- package/src/components/data-display/MapPreview/MapControlBar.tsx +17 -9
- package/src/components/data-display/MapPreview/MapLayers.tsx +2 -0
- package/src/components/data-display/MapPreview/MapPreview.types.ts +10 -0
- package/src/components/data-display/MapPreview/MapSearchBar.tsx +4 -1
- package/src/components/data-display/Table/Table.tsx +7 -2
- package/src/components/data-display/Table/Table.types.ts +5 -0
- package/src/components/data-display/Table/TableStates.tsx +2 -2
- package/src/components/data-display/TimingDiagram/TimingDiagram.tsx +3 -2
- package/src/components/data-display/TimingDiagram/TimingDiagram.types.ts +3 -0
- package/src/components/feedback/Sonner/Sonner.tsx +15 -3
- package/src/components/feedback/Sonner/Sonner.types.ts +2 -0
- package/src/components/feedback/Sonner/SonnerToast.tsx +2 -1
- package/src/components/feedback/StackedModal/StackedModal.parts.tsx +10 -3
- package/src/components/feedback/StackedModal/StackedModal.tsx +2 -1
- package/src/components/feedback/StackedModal/StackedModal.types.ts +2 -0
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.tsx +13 -1
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.types.ts +3 -0
- package/src/components/feedback/TutorialOverlay/TutorialStepBody.tsx +10 -4
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.types.ts +7 -0
- package/src/components/form/AddressAutocomplete/AddressAutocompleteField.tsx +2 -0
- package/src/components/form/AddressAutocomplete/AddressFallbackField.tsx +4 -2
- package/src/components/form/AddressAutocomplete/AddressInputField.tsx +13 -6
- package/src/components/form/Autocomplete/Autocomplete.parts.tsx +9 -6
- package/src/components/form/Autocomplete/Autocomplete.tsx +2 -1
- package/src/components/form/Autocomplete/Autocomplete.types.ts +7 -0
- package/src/components/form/Calendar/Calendar.tsx +2 -2
- package/src/components/form/Calendar/Calendar.types.ts +7 -0
- package/src/components/form/CodeEditor/CodeEditor.tsx +6 -4
- package/src/components/form/CodeEditor/CodeEditor.types.ts +7 -0
- package/src/components/form/CodeEditor/CodeEditorToolbar.tsx +12 -5
- package/src/components/form/DateRangePicker/DateRangePicker.range.ts +2 -0
- package/src/components/form/DateRangePicker/DateRangePicker.tsx +4 -0
- package/src/components/form/DateRangePicker/DateRangePicker.types.ts +11 -0
- package/src/components/form/DateRangePicker/DateRangePickerFields.tsx +2 -0
- package/src/components/form/Menubar/Menubar.toolbar.tsx +3 -1
- package/src/components/form/Menubar/Menubar.tsx +2 -1
- package/src/components/form/Menubar/Menubar.types.ts +5 -0
- package/src/components/form/PasswordStrength/PasswordStrength.helpers.tsx +33 -17
- package/src/components/form/PasswordStrength/PasswordStrength.tsx +29 -13
- package/src/components/form/PasswordStrength/PasswordStrength.types.ts +9 -0
- package/src/components/form/PhoneInput/PhoneInput.tsx +15 -5
- package/src/components/form/PhoneInput/PhoneInput.types.ts +7 -0
- package/src/components/form/SearchPalette/SearchPalette.parts.tsx +4 -1
- package/src/components/form/SearchPalette/SearchPalette.tsx +4 -1
- package/src/components/form/SearchPalette/SearchPalette.types.ts +6 -0
- package/src/components/form/Textarea/Textarea.tsx +6 -1
- package/src/components/form/Textarea/Textarea.types.ts +14 -1
- package/src/components/form/Textarea/TextareaRichEditor.tsx +28 -18
- package/src/components/form/UploadButton/UploadButton.parts.tsx +16 -7
- package/src/components/form/UploadButton/UploadButton.tsx +4 -1
- package/src/components/form/UploadButton/UploadButton.types.ts +8 -0
- package/src/components/layout/ContentToolbar/ContentToolbar.tsx +10 -2
- package/src/components/layout/ContentToolbar/ContentToolbar.types.ts +12 -0
- package/src/components/layout/ContentToolbar/MultiSelectDropdown.tsx +15 -4
- package/src/components/layout/ContentToolbar/SortByDropdown.tsx +12 -3
- package/src/components/layout/ContentToolbar/ViewSelector.tsx +2 -1
- package/src/components/layout/Dashboard/Dashboard.types.ts +4 -0
- package/src/components/layout/Dashboard/DashboardParts.tsx +2 -1
- package/src/components/layout/ScrollArea/ScrollArea.tsx +16 -3
- package/src/components/layout/ScrollArea/ScrollArea.types.ts +19 -4
- package/src/components/layout/ScrollArea/ScrollViewport.tsx +4 -1
- package/src/components/layout/TableFilter/TableFilter.tsx +19 -11
- package/src/components/layout/TableFilter/TableFilter.types.ts +8 -0
- package/src/components/layout/TableFilter/TableFilterContext.tsx +10 -0
- package/src/components/navigation/Breadcrumbs/BreadcrumbEntry.tsx +11 -4
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +2 -0
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.types.ts +3 -0
- package/src/components/navigation/CommandPalette/CommandPalette.tsx +15 -5
- package/src/components/navigation/CommandPalette/CommandPalette.types.ts +3 -0
- package/src/components/navigation/CommandPalette/CommandPaletteResults.tsx +5 -2
- package/src/components/navigation/Pagination/Pagination.tsx +2 -0
- package/src/components/navigation/Pagination/Pagination.types.ts +2 -0
- package/src/components/navigation/Pagination/PaginationParts.tsx +4 -1
- package/src/components/navigation/Tabs/Tabs.tsx +8 -3
- package/src/components/navigation/Tabs/Tabs.types.ts +2 -0
- package/src/components/utility/InfiniteScroll/InfiniteScroll.parts.tsx +4 -4
- package/src/components/utility/InfiniteScroll/InfiniteScroll.tsx +4 -2
- package/src/components/utility/InfiniteScroll/InfiniteScroll.types.ts +6 -0
- package/src/components/utility/InstallPrompt/InstallPrompt.tsx +18 -13
- package/src/components/utility/InstallPrompt/InstallPrompt.types.ts +9 -7
- package/src/copy/data-display.ts +60 -0
- package/src/copy/feedback.ts +39 -0
- package/src/copy/form.ts +154 -0
- package/src/copy/layout.ts +18 -0
- package/src/copy/navigation.ts +25 -0
- package/src/copy/shared.ts +122 -0
- package/src/copy/utility.ts +36 -0
- package/src/copy.ts +13 -117
- package/src/pt-BR.data-display.ts +236 -0
- package/src/pt-BR.feedback.ts +25 -0
- package/src/pt-BR.form.ts +96 -0
- package/src/pt-BR.layout.ts +15 -0
- package/src/pt-BR.navigation.ts +21 -0
- package/src/pt-BR.shared.ts +94 -0
- package/src/pt-BR.ts +15 -267
- package/src/pt-BR.utility.ts +21 -0
- package/src/user-avatar/user-avatar.tsx +8 -2
- package/dist/chunk-3KWD5Y5O.js.map +0 -1
- package/dist/chunk-CEKPLUQV.js.map +0 -1
- package/dist/chunk-DFVRZ3UK.js.map +0 -1
- package/dist/chunk-H7UAGTVW.js.map +0 -1
- package/dist/chunk-JP55QWVR.js.map +0 -1
- package/dist/chunk-NUCLEOHF.js.map +0 -1
- package/dist/chunk-QLBYAYUG.js.map +0 -1
- package/dist/chunk-QZZVHY6U.js.map +0 -1
package/src/pt-BR.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import type { DataViewsCopy } from "./components/data-display/DataViews/data-views-copy";
|
|
2
|
-
import type { SavedViewsLabels } from "./components/layout/ContentToolbar/ContentToolbar.types";
|
|
3
|
-
import type {
|
|
4
|
-
CategorySelectCopy,
|
|
5
|
-
CepFieldCopy,
|
|
6
|
-
ConfirmActionCopy,
|
|
7
|
-
SectionOnboardingCopy,
|
|
8
|
-
TableFilterCopy,
|
|
9
|
-
} from "./copy";
|
|
10
|
-
|
|
11
1
|
/**
|
|
12
2
|
* The pt-BR packs — NAMED constants a host passes by hand, never defaults.
|
|
13
3
|
*
|
|
@@ -15,263 +5,21 @@ import type {
|
|
|
15
5
|
* Portuguese may ship, it may not be silent. Every sentence is VERBATIM what
|
|
16
6
|
* the components used to render, so a host adopting these sees no change on
|
|
17
7
|
* screen — what changes is that the words are chosen in a diff.
|
|
18
|
-
*/
|
|
19
|
-
export const PT_BR_SECTION_ONBOARDING_COPY: SectionOnboardingCopy = {
|
|
20
|
-
edit: "Editar",
|
|
21
|
-
collapse: "Ocultar",
|
|
22
|
-
start: "Começar",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const PT_BR_CONFIRM_ACTION_COPY: ConfirmActionCopy = {
|
|
26
|
-
cancel: "Cancelar",
|
|
27
|
-
defaultError: "Não foi possível concluir a ação. Tente novamente.",
|
|
28
|
-
irreversible: "Esta ação não pode ser desfeita.",
|
|
29
|
-
typeToConfirm: (expected) => `Digite "${expected}" para confirmar.`,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const PT_BR_CATEGORY_SELECT_COPY: CategorySelectCopy = {
|
|
33
|
-
purpose: "Categorias organizam o cardápio e os filtros da loja.",
|
|
34
|
-
clearSelection: "Limpar seleção",
|
|
35
|
-
selectAll: "Marcar tudo",
|
|
36
|
-
deselectAll: "Desmarcar tudo",
|
|
37
|
-
expandAll: "Expandir tudo",
|
|
38
|
-
collapseAll: "Recolher tudo",
|
|
39
|
-
expandCategory: (name) => `Expandir ${name}`,
|
|
40
|
-
collapseCategory: (name) => `Recolher ${name}`,
|
|
41
|
-
placeholderSingle: "Mover para…",
|
|
42
|
-
placeholderMulti: "Categoria",
|
|
43
|
-
emptyTitle: "Nenhuma categoria ainda",
|
|
44
|
-
createCategory: "Criar categoria",
|
|
45
|
-
noResults: {
|
|
46
|
-
title: (query) => `Nada encontrado para “${query}”`,
|
|
47
|
-
hint: "Tente outro termo ou verifique a grafia.",
|
|
48
|
-
clearSearch: "Limpar busca",
|
|
49
|
-
create: (query) => `Criar “${query}”`,
|
|
50
|
-
},
|
|
51
|
-
search: {
|
|
52
|
-
placeholderSingle: "Buscar categoria…",
|
|
53
|
-
placeholderMulti: "Buscar categoria ou subcategoria",
|
|
54
|
-
clear: "Limpar busca",
|
|
55
|
-
removeChip: (label) => `Remover ${label}`,
|
|
56
|
-
pinnedLabel: (count) => `Selecionadas · ${count}`,
|
|
57
|
-
},
|
|
58
|
-
footer: {
|
|
59
|
-
selectedCount: (count) => `${count} selecionada${count === 1 ? "" : "s"}`,
|
|
60
|
-
clear: "Limpar",
|
|
61
|
-
apply: "Aplicar",
|
|
62
|
-
close: "Fechar",
|
|
63
|
-
singleHint: "Escolha uma categoria",
|
|
64
|
-
cancel: "Cancelar",
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const PT_BR_CEP_FIELD_COPY: CepFieldCopy = {
|
|
69
|
-
loading: "Buscando endereço…",
|
|
70
|
-
found: "Endereço preenchido pelo CEP.",
|
|
71
|
-
notfound: "CEP não encontrado — preencha o endereço manualmente.",
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The saved-views dropdown's labels.
|
|
76
8
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
9
|
+
* A BARREL over `./pt-BR.<family>.ts`, one module per component family. It was
|
|
10
|
+
* one file until the port made it 471 lines against this package's own
|
|
11
|
+
* 400-line budget — and the single list of every pack is exactly the file that
|
|
12
|
+
* grows on every port. Each part keeps `pt-BR` in its own FILENAME rather than
|
|
13
|
+
* sitting in a `pt-BR/` folder, because the gate's exemption is a filename
|
|
14
|
+
* rule (`NAMED_PACK` in `scripts/lib/shipped-source.mjs`): a folder would have
|
|
15
|
+
* put seven files full of Portuguese back in scope. Consumers are unaffected —
|
|
16
|
+
* `@12-apps/ui/pt-BR` still resolves here.
|
|
82
17
|
*/
|
|
83
|
-
export const PT_BR_SAVED_VIEWS_LABELS: SavedViewsLabels = {
|
|
84
|
-
trigger: "Visões",
|
|
85
|
-
mainView: "Visão principal",
|
|
86
|
-
pinned: "Fixadas",
|
|
87
|
-
recent: "Recentes",
|
|
88
|
-
empty: "Nenhuma visão salva ainda.",
|
|
89
|
-
saveCurrent: "+ Salvar visão atual",
|
|
90
|
-
manageAll: "Gerenciar visões",
|
|
91
|
-
apply: "Aplicar",
|
|
92
|
-
setDefault: "Definir como padrão",
|
|
93
|
-
pin: "Fixar na barra lateral",
|
|
94
|
-
unpin: "Desafixar",
|
|
95
|
-
share: "Compartilhar com a equipe",
|
|
96
|
-
unshare: "Tornar privada",
|
|
97
|
-
edit: "Editar",
|
|
98
|
-
remove: "Excluir",
|
|
99
|
-
defaultTag: "Padrão",
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const PT_BR_TABLE_FILTER_COPY: TableFilterCopy = {
|
|
103
|
-
invalidRange: "O máximo deve ser maior ou igual ao mínimo.",
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export const PT_BR_DATA_VIEWS_COPY: DataViewsCopy = {
|
|
107
|
-
savedViewsMenu: PT_BR_SAVED_VIEWS_LABELS,
|
|
108
|
-
confirmAction: PT_BR_CONFIRM_ACTION_COPY,
|
|
109
|
-
categorySelect: PT_BR_CATEGORY_SELECT_COPY,
|
|
110
|
-
board: {
|
|
111
|
-
countOnPage: (label, count) => `${label}: ${count} nesta página`,
|
|
112
|
-
onThisPage: (count) => `${count} nesta página`,
|
|
113
|
-
pageSum: (sum) => `Soma desta página: ${sum}`,
|
|
114
|
-
emptyColumn: "Nada nesta etapa",
|
|
115
|
-
pageScopeNote:
|
|
116
|
-
"As contagens e somas abaixo referem-se apenas aos itens desta página.",
|
|
117
|
-
},
|
|
118
|
-
deleteView: {
|
|
119
|
-
title: "Excluir visão",
|
|
120
|
-
target: (viewName) => `Excluir "${viewName}"?`,
|
|
121
|
-
sharedWarning: "Esta visão está compartilhada — a equipe perderá o acesso a ela.",
|
|
122
|
-
rowsUnaffected: (entityLabel) =>
|
|
123
|
-
`${entityLabel} não são afetados; apenas o recorte salvo é removido.`,
|
|
124
|
-
confirm: "Excluir visão",
|
|
125
|
-
cancel: "Cancelar",
|
|
126
|
-
},
|
|
127
|
-
manageViews: {
|
|
128
|
-
title: "Gerenciar visões",
|
|
129
|
-
empty: "Nenhuma visão salva.",
|
|
130
|
-
edit: "Editar",
|
|
131
|
-
defaultTag: "Padrão",
|
|
132
|
-
otherUserTag: "De outro usuário",
|
|
133
|
-
deleteTitle: "Excluir a visão salva?",
|
|
134
|
-
deleteBody: "Os filtros e colunas guardados nela são perdidos. Não é possível restaurar.",
|
|
135
|
-
deleteConfirm: "Excluir",
|
|
136
|
-
},
|
|
137
|
-
saveView: {
|
|
138
|
-
sharedDescription: "Qualquer pessoa da loja poderá abrir e usar esta visão.",
|
|
139
|
-
setDefaultTitle: "Definir como padrão",
|
|
140
|
-
setDefaultDescription: "Esta tela abre nesta visão em vez da Visão principal.",
|
|
141
|
-
previewHeading: "O que esta visão guarda",
|
|
142
|
-
previewUnchanged: "Nada foi alterado — esta visão ficará igual à Visão principal.",
|
|
143
|
-
sortRowLabel: "Ordenação",
|
|
144
|
-
saveFailed: "Não foi possível salvar a visão.",
|
|
145
|
-
titleEditing: "Editar visão",
|
|
146
|
-
titleCreating: "Salvar visão",
|
|
147
|
-
descriptionLabel: "Descrição — opcional",
|
|
148
|
-
descriptionPlaceholder: "Para que serve esta visão",
|
|
149
|
-
submitEditing: "Salvar alterações",
|
|
150
|
-
submitCreating: "Salvar visão",
|
|
151
|
-
nameLabel: "Nome",
|
|
152
|
-
cancel: "Cancelar",
|
|
153
|
-
pinnedTitle: "Fixar na barra lateral",
|
|
154
|
-
pinnedDescription: "Aparece como atalho no menu, abaixo desta tela.",
|
|
155
|
-
sharedTitle: "Compartilhar com a equipe",
|
|
156
|
-
namePlaceholder: "Ex.: Recusados no PIX desta semana",
|
|
157
|
-
previewFilters: "Filtros",
|
|
158
|
-
previewHiddenColumns: "Colunas ocultas",
|
|
159
|
-
},
|
|
160
|
-
columns: {
|
|
161
|
-
visibleCount: (visible, total) => `${visible} de ${total} visíveis`,
|
|
162
|
-
reset: "Padrão",
|
|
163
|
-
showAll: "Mostrar todas",
|
|
164
|
-
dragHint: "Arraste para reordenar as colunas.",
|
|
165
|
-
moveUp: (columnLabel) => `Mover ${columnLabel} para cima`,
|
|
166
|
-
moveDown: (columnLabel) => `Mover ${columnLabel} para baixo`,
|
|
167
|
-
},
|
|
168
|
-
display: {
|
|
169
|
-
sortTab: "Ordenar",
|
|
170
|
-
columnsTab: "Colunas",
|
|
171
|
-
panelTab: "Exibição",
|
|
172
|
-
direction: "Direção",
|
|
173
|
-
layoutHints: {
|
|
174
|
-
table: "Colunas comparáveis, boa para varrer números.",
|
|
175
|
-
list: "Uma linha por item, com os dados principais.",
|
|
176
|
-
cards: "Blocos maiores, bom para poucos itens.",
|
|
177
|
-
board: "Colunas por etapa, para acompanhar o que está onde.",
|
|
178
|
-
},
|
|
179
|
-
densityHeadings: {
|
|
180
|
-
table: "Altura das linhas",
|
|
181
|
-
list: "Altura das linhas",
|
|
182
|
-
cards: "Cards por linha",
|
|
183
|
-
board: "Largura das colunas",
|
|
184
|
-
},
|
|
185
|
-
densityLabels: {
|
|
186
|
-
table: { compact: "Baixa", cozy: "Média", comfortable: "Alta" },
|
|
187
|
-
list: { compact: "Baixa", cozy: "Média", comfortable: "Alta" },
|
|
188
|
-
cards: { compact: "Muitos", cozy: "Médio", comfortable: "Poucos" },
|
|
189
|
-
board: { compact: "Estreita", cozy: "Média", comfortable: "Larga" },
|
|
190
|
-
},
|
|
191
|
-
boardUnavailable: "Esta tela não declara etapas, então não oferece quadro.",
|
|
192
|
-
densityUnavailableNarrow:
|
|
193
|
-
"Um card por linha nesta largura — a densidade volta em telas maiores.",
|
|
194
|
-
trigger: "Exibir",
|
|
195
|
-
fieldHeading: "Campo",
|
|
196
|
-
formatHeading: "Formato",
|
|
197
|
-
cardZoom: "Tamanho dos cards",
|
|
198
|
-
},
|
|
199
|
-
export: {
|
|
200
|
-
formats: {
|
|
201
|
-
json: { label: "JSON (.json)", hint: "Para integrações" },
|
|
202
|
-
},
|
|
203
|
-
visibleColumns: (columnCount) => `${columnCount} colunas visíveis, na ordem atual`,
|
|
204
|
-
trigger: "Exportar",
|
|
205
|
-
triggerLabel: "Exportar",
|
|
206
|
-
},
|
|
207
|
-
grid: {
|
|
208
|
-
rowActions: "Ações",
|
|
209
|
-
bulkActions: (selectedCount) => `Ações (${selectedCount}) ▾`,
|
|
210
|
-
emptyFilteredTitle: "Nenhum resultado para esses filtros",
|
|
211
|
-
emptyFilteredHint: "Ajuste ou remova os filtros.",
|
|
212
|
-
emptyFilteredAction: "Limpar filtros",
|
|
213
|
-
},
|
|
214
|
-
filters: {
|
|
215
|
-
moreFilters: (count) => `Mais filtros: ${count} sem espaço na barra`,
|
|
216
|
-
moreFiltersApplied: (count, appliedCount) =>
|
|
217
|
-
`Mais filtros: ${count} sem espaço na barra, ${appliedCount} aplicado(s)`,
|
|
218
|
-
moreTriggerLabel: "Mais",
|
|
219
|
-
moreHeading: "Mais filtros",
|
|
220
|
-
overflowNote: "sem espaço na barra",
|
|
221
|
-
rangeEnd: "Até",
|
|
222
|
-
rangeInvalid: "O início precisa ser menor que o fim.",
|
|
223
|
-
rangeInclusiveNote: "Ambas as datas entram no resultado.",
|
|
224
|
-
rangePresets: {
|
|
225
|
-
hoje: "Hoje",
|
|
226
|
-
ontem: "Ontem",
|
|
227
|
-
semana: "Esta semana",
|
|
228
|
-
mes: "Este mês",
|
|
229
|
-
ano: "Este ano",
|
|
230
|
-
},
|
|
231
|
-
scopesLabel: "Situação",
|
|
232
|
-
panelTitle: "Filtros",
|
|
233
|
-
clear: "Limpar",
|
|
234
|
-
clearAll: "Limpar filtros",
|
|
235
|
-
clearRange: (label) => `Limpar ${label}`,
|
|
236
|
-
allOption: "Todas",
|
|
237
|
-
optionSearchPlaceholder: "Buscar…",
|
|
238
|
-
optionsEmpty: "Nenhum resultado",
|
|
239
|
-
},
|
|
240
|
-
selection: {
|
|
241
|
-
selectAllOnPage: "Selecionar todos nesta página",
|
|
242
|
-
clearSelection: "Limpar seleção",
|
|
243
|
-
selectAll: "Selecionar tudo",
|
|
244
|
-
onThisPage: (count) => `${count} nesta página`,
|
|
245
|
-
selectRow: "Selecionar",
|
|
246
|
-
expandRow: "Expandir detalhes",
|
|
247
|
-
collapseRow: "Recolher detalhes",
|
|
248
|
-
},
|
|
249
|
-
nav: {
|
|
250
|
-
mainView: "Visão principal",
|
|
251
|
-
defaultTag: "Padrão",
|
|
252
|
-
viewOptions: (viewName) => `Opções de ${viewName}`,
|
|
253
|
-
emptyHint: "Nenhuma visão salva. Ajuste filtros, colunas ou ordenação e salve abaixo.",
|
|
254
|
-
setDefault: "Definir como padrão",
|
|
255
|
-
deleteView: "Excluir visão",
|
|
256
|
-
unsavedChanges: "Alterações não salvas",
|
|
257
|
-
label: "Visão",
|
|
258
|
-
update: "Atualizar visão",
|
|
259
|
-
save: "Salvar visão",
|
|
260
|
-
saveAs: "Salvar como nova",
|
|
261
|
-
reset: "Redefinir",
|
|
262
|
-
updateFailed: "Não foi possível atualizar a visão",
|
|
263
|
-
saveFailed: "Não foi possível salvar a alteração da visão.",
|
|
264
|
-
editView: "Renomear e editar",
|
|
265
|
-
pinToSidebar: "Fixar na barra lateral",
|
|
266
|
-
shareWithTeam: "Compartilhar com a equipe",
|
|
267
|
-
},
|
|
268
|
-
search: {
|
|
269
|
-
placeholder: "Buscar…",
|
|
270
|
-
allColumnsLabel: "Buscar em todas as colunas",
|
|
271
|
-
keywordPlaceholder: "Pressione Enter para filtrar",
|
|
272
|
-
open: "Buscar",
|
|
273
|
-
close: "Fechar busca",
|
|
274
|
-
clear: "Limpar busca",
|
|
275
|
-
},
|
|
276
|
-
};
|
|
277
18
|
|
|
19
|
+
export * from './pt-BR.data-display';
|
|
20
|
+
export * from './pt-BR.feedback';
|
|
21
|
+
export * from './pt-BR.form';
|
|
22
|
+
export * from './pt-BR.layout';
|
|
23
|
+
export * from './pt-BR.navigation';
|
|
24
|
+
export * from './pt-BR.shared';
|
|
25
|
+
export * from './pt-BR.utility';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pt-BR pack for the utility family. Split out of `pt-BR.ts`, which is a
|
|
3
|
+
* barrel over this folder — see that file for why.
|
|
4
|
+
*/
|
|
5
|
+
import type {
|
|
6
|
+
InstallPromptCopy,
|
|
7
|
+
UserAvatarCopy,
|
|
8
|
+
} from './copy';
|
|
9
|
+
|
|
10
|
+
export const PT_BR_INSTALL_PROMPT_COPY: InstallPromptCopy = {
|
|
11
|
+
title: "Instalar este aplicativo",
|
|
12
|
+
installLabel: "Instalar",
|
|
13
|
+
dismissLabel: "Dispensar o convite de instalação",
|
|
14
|
+
iosTapBefore: "Toque em",
|
|
15
|
+
iosTapAfter: 'e depois em "Adicionar à Tela de Início"',
|
|
16
|
+
shareLabel: "Compartilhar",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const PT_BR_USER_AVATAR_COPY: UserAvatarCopy = {
|
|
20
|
+
signOut: "Sair",
|
|
21
|
+
};
|
|
@@ -6,6 +6,7 @@ import { Avatar } from '../components/data-display/Avatar';
|
|
|
6
6
|
import { Button } from '../components/form/Button';
|
|
7
7
|
import { Text } from '../components/typography/Text';
|
|
8
8
|
import { Card } from '../components/layout/Card';
|
|
9
|
+
import type { UserAvatarCopy } from '../copy';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Generate initials from a name
|
|
@@ -60,12 +61,17 @@ export interface UserMenuProps {
|
|
|
60
61
|
image?: string | null;
|
|
61
62
|
};
|
|
62
63
|
onSignOut: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* The card's one action. REQUIRED: this package ships no default copy, and
|
|
66
|
+
* the button is the only thing on this card a host does not already supply.
|
|
67
|
+
*/
|
|
68
|
+
copy: UserAvatarCopy;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
/**
|
|
66
72
|
* User menu with avatar, info, and sign out button
|
|
67
73
|
*/
|
|
68
|
-
export function UserMenu({ user, onSignOut }: UserMenuProps): React.ReactElement {
|
|
74
|
+
export function UserMenu({ user, onSignOut, copy }: UserMenuProps): React.ReactElement {
|
|
69
75
|
return (
|
|
70
76
|
<Card variant="elevated" borderRadius="md">
|
|
71
77
|
<Box sx={{ p: 2 }}>
|
|
@@ -93,7 +99,7 @@ export function UserMenu({ user, onSignOut }: UserMenuProps): React.ReactElement
|
|
|
93
99
|
size="sm"
|
|
94
100
|
onClick={onSignOut}
|
|
95
101
|
>
|
|
96
|
-
|
|
102
|
+
{copy.signOut}
|
|
97
103
|
</Button>
|
|
98
104
|
</Stack>
|
|
99
105
|
</Box>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/Alert/Alert.tsx","../src/components/data-display/Alert/Alert.styles.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport {\n Alert as MuiAlert,\n AlertTitle,\n alpha,\n Box,\n Collapse,\n IconButton } from '@mui/material';\nimport { styled } from '@mui/material';\nimport React from 'react';\n\nimport {\n alertEmphasisStyles,\n alertLayoutStyles,\n alertVariantStyles,\n fadeInScale,\n getColorFromTheme,\n getVariantIcon } from './Alert.styles';\nimport type { AlertColor } from '@mui/material';\nimport type { AlertProps } from './Alert.types';\n\n// Define animations\nconst StyledAlert = styled(MuiAlert, {\n shouldForwardProp: (prop) =>\n !['customVariant', 'customColor', 'glow', 'pulse', 'animate'].includes(prop as string) })<{\n customVariant?: string;\n customColor?: string;\n glow?: boolean;\n pulse?: boolean;\n animate?: boolean;\n}>(({ theme, customVariant, customColor, glow, pulse, animate }) => {\n const colorPalette = getColorFromTheme(theme, customColor || customVariant || 'info');\n\n return {\n borderRadius: theme.spacing(1.5),\n transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n position: 'relative',\n overflow: 'hidden',\n animation: animate ? `${fadeInScale} 0.3s ease-out` : 'none',\n willChange: 'transform, opacity',\n\n ...alertLayoutStyles(theme, colorPalette, animate),\n\n // Hover effects\n '&:hover': {\n transform: 'translateY(-3px) scale(1.01)',\n boxShadow: `0 8px 20px ${alpha(colorPalette.main, 0.2)}`,\n transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n\n '.MuiAlert-icon': {\n transform: 'scale(1.15) rotate(10deg)' },\n\n '&::before': {\n opacity: 1 } },\n\n // Active state\n '&:active': {\n transform: 'translateY(-1px) scale(0.99)',\n transition: 'transform 0.1s ease' },\n\n // Focus styles for accessibility\n '&:focus-within': {\n outline: `3px solid ${alpha(colorPalette.main, 0.5)}`,\n outlineOffset: '3px',\n boxShadow: `0 0 0 6px ${alpha(colorPalette.main, 0.1)}`,\n transition: 'all 0.2s ease' },\n\n ...alertVariantStyles(theme, customVariant, colorPalette),\n ...alertEmphasisStyles(colorPalette, Boolean(glow), Boolean(pulse)) };\n});\n\nconst ALERT_DEFAULTS = {\n variant: 'info',\n glow: false,\n pulse: false,\n showIcon: true,\n closable: false,\n animate: true,\n role: 'alert',\n 'aria-atomic': 'true',\n 'data-testid': 'alert' } satisfies Partial<AlertProps>;\n\n// Strips explicitly-undefined props before the merge so `prop={undefined}` still\n// falls back to the default, the way a destructuring default would.\nconst definedProps = (props: AlertProps): Partial<AlertProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<AlertProps>;\n\nconst testIdFor = (base: string | undefined, suffix: string) =>\n base ? `${base}-${suffix}` : `alert-${suffix}`;\n\n// glass and gradient are our own looks with no MUI severity of their own; both\n// borrow info's. danger is MUI's error.\nconst MUI_SEVERITY: Record<string, AlertColor> = {\n danger: 'error',\n glass: 'info',\n gradient: 'info' };\n\nconst toMuiSeverity = (variant: string): AlertColor =>\n MUI_SEVERITY[variant] ?? (variant as AlertColor);\n\nconst AlertContent: React.FC<{\n title?: AlertProps['title'];\n description?: AlertProps['description'];\n dataTestId?: string;\n children?: React.ReactNode;\n}> = ({ title, description, dataTestId, children }) => (\n <>\n {title && (\n <AlertTitle\n data-testid={testIdFor(dataTestId, 'title')}\n sx={{\n fontWeight: 600,\n fontSize: '1.05rem',\n marginBottom: description ? 0.5 : 0,\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word' }}\n >\n {title}\n </AlertTitle>\n )}\n {description && (\n <Box\n component=\"div\"\n data-testid={testIdFor(dataTestId, 'message')}\n sx={{\n opacity: 0.9,\n fontSize: '0.925rem',\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word' }}\n >\n {description}\n </Box>\n )}\n {children}\n </>\n);\n\nconst AlertCloseButton: React.FC<{ dataTestId?: string; onClose: () => void }> = ({\n dataTestId,\n onClose }) => (\n <IconButton\n data-testid={testIdFor(dataTestId, 'close')}\n aria-label=\"close alert\"\n color=\"inherit\"\n size=\"small\"\n onClick={onClose}\n sx={(theme) => ({\n transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n opacity: 0.7,\n '&:hover': {\n transform: 'rotate(90deg) scale(1.1)',\n opacity: 1,\n backgroundColor: alpha(theme.palette.action.hover, 0.1) },\n '&:focus': {\n opacity: 1,\n outline: 'none',\n backgroundColor: alpha(theme.palette.action.focus, 0.1) } })}\n >\n <Close fontSize=\"inherit\" />\n </IconButton>\n);\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n (\n alertProps,\n ref,\n ) => {\n const {\n variant,\n color,\n glow,\n pulse,\n icon,\n showIcon,\n closable,\n onClose,\n title,\n description,\n children,\n animate,\n role,\n 'aria-atomic': ariaAtomic,\n 'data-testid': dataTestId,\n ...props\n } = { ...ALERT_DEFAULTS, ...definedProps(alertProps) };\n\n // Depends on `variant`, so it cannot live in the static defaults above.\n const ariaLive = alertProps['aria-live'] ?? (variant === 'danger' ? 'assertive' : 'polite');\n\n const [open, setOpen] = React.useState(true);\n const [isClosing, setIsClosing] = React.useState(false);\n\n const handleClose = () => {\n setIsClosing(true);\n window.setTimeout(() => {\n setOpen(false);\n onClose?.();\n }, 200);\n };\n\n const severity = toMuiSeverity(variant);\n\n const displayIcon = showIcon ? (\n <Box component=\"span\" data-testid={testIdFor(dataTestId, 'icon')}>\n {icon || getVariantIcon(variant)}\n </Box>\n ) : false;\n\n const content = (\n <AlertContent title={title} description={description} dataTestId={dataTestId}>\n {children}\n </AlertContent>\n );\n\n return (\n <Collapse in={open && !isClosing} timeout={300}>\n <StyledAlert\n ref={ref}\n data-testid={dataTestId || 'alert'}\n severity={severity}\n customVariant={variant}\n customColor={color}\n glow={glow}\n pulse={pulse}\n animate={animate}\n icon={displayIcon}\n role={role}\n aria-live={ariaLive}\n aria-atomic={ariaAtomic}\n tabIndex={0}\n action={closable && <AlertCloseButton dataTestId={dataTestId} onClose={handleClose} />}\n {...props}\n >\n {content}\n </StyledAlert>\n </Collapse>\n );\n },\n);\n\nAlert.displayName = 'Alert';\n","import Error from '@mui/icons-material/Error';\nimport Info from '@mui/icons-material/Info';\nimport CheckCircle from '@mui/icons-material/CheckCircle';\nimport Warning from '@mui/icons-material/Warning';\nimport { alpha, darken, keyframes, lighten } from '@mui/material';\nimport type { CSSObject, Theme } from '@mui/material';\nimport React from 'react';\n\nexport const pulseAnimation = keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 10px currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\n// Additional animations can be enabled as needed\n// const slideInAnimation = keyframes`\n// from {\n// transform: translateX(-100%);\n// opacity: 0;\n// }\n// to {\n// transform: translateX(0);\n// opacity: 1;\n// }\n// `;\n\n// const bounceIn = keyframes`\n// 0% {\n// transform: scale(0.3);\n// opacity: 0;\n// }\n// 50% {\n// transform: scale(1.05);\n// }\n// 70% {\n// transform: scale(0.9);\n// }\n// 100% {\n// transform: scale(1);\n// opacity: 1;\n// }\n// `;\n\n// Removed unused slideInAnimation - can be re-added if needed for future features\n\nexport const shimmerAnimation = keyframes`\n 0% {\n background-position: -1000px 0;\n }\n 100% {\n background-position: 1000px 0;\n }\n`;\n\nexport const fadeInScale = keyframes`\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n`;\n\nexport const iconRotate = keyframes`\n 0% {\n transform: rotate(0deg) scale(0.8);\n }\n 50% {\n transform: rotate(180deg) scale(1.1);\n }\n 100% {\n transform: rotate(360deg) scale(1);\n }\n`;\n\nexport const getColorFromTheme = (theme: Theme, variant: string) => {\n const colorMap: Record<string, { main: string; light?: string; dark?: string }> = {\n info: theme.palette.info,\n success: theme.palette.success,\n warning: theme.palette.warning,\n danger: theme.palette.error,\n primary: theme.palette.primary,\n secondary: theme.palette.secondary,\n neutral: {\n main: theme.palette.grey[500] || '#9E9E9E',\n light: theme.palette.grey[300] || '#E0E0E0',\n dark: theme.palette.grey[700] || '#616161',\n },\n };\n\n return colorMap[variant] || theme.palette.info;\n};\n\nexport const getVariantIcon = (variant: string) => {\n const iconMap: Record<string, React.ReactNode> = {\n info: <Info />,\n success: <CheckCircle />,\n warning: <Warning />,\n danger: <Error />,\n };\n\n return iconMap[variant];\n};\n\n// The palette shape getColorFromTheme returns — a main plus optional light/dark,\n// which is narrower than MUI's PaletteColor.\nexport type AlertPalette = { main: string; light?: string; dark?: string };\n\n/** The four semantic variants, which differ only in which palette they read. */\nconst SEMANTIC_VARIANTS = new Set(['info', 'success', 'warning', 'danger']);\n\n/**\n * The room the message is given — padding, the stack's rhythm, and where the\n * icon and the close button sit relative to it.\n *\n * Extracted for the same reason {@link alertVariantStyles} and\n * {@link alertEmphasisStyles} were: `styled()`'s callback is one function, and\n * every block written inline is counted against its length by the complexity\n * gate. Keeping the layout here means the callback assembles four named pieces\n * instead of carrying all of them.\n */\nexport const alertLayoutStyles = (\n theme: Theme,\n colorPalette: AlertPalette,\n animate: boolean | undefined,\n): CSSObject => ({\n // ROOM TO READ.\n //\n // MUI's `6px 16px` is sized for one line of text and nothing else. This Alert\n // routinely carries three things stacked — a sentence, a smaller explanation,\n // then a control — and at 6px they touched top and bottom and ran together\n // vertically, so the whole card read as one dense block instead of as a\n // message with parts. The generosity is what makes the structure legible; it\n // is not decoration.\n //\n // Padding stays overridable by an `sx` (a full-bleed strip legitimately wants\n // it tight), because this is a default rather than a rule.\n padding: theme.spacing(1.75, 2),\n\n '.MuiAlert-message': {\n display: 'flex',\n flexDirection: 'column',\n // 0.5 put a title, its explanation and a button 4px apart, which reads as a\n // spacing bug rather than as a group. 1 separates the lines; the extra\n // margin below goes to whatever CONTROL sits at the end, because the gap\n // between prose and a thing you press has to be bigger than the gap between\n // two lines of prose or the button looks like part of the text.\n gap: theme.spacing(1),\n fontSize: '0.95rem',\n lineHeight: 1.5,\n // No padding of its own — the root's is now doing that job, and MUI's\n // default `8px 0` on top of it would double the vertical space.\n padding: 0,\n // A CONTROL ON A TINTED PANEL NEEDS AN EDGE.\n //\n // `ghost` and `text` paint no background and no border — bare labels, which\n // works on white where the surrounding page is obviously not clickable.\n // Inside a coloured Alert it stops working: the label is one more coloured\n // phrase among several, and a \"Cancelar\" beside two lines of prose reads as\n // part of the prose.\n //\n // Only the BORDER is set, never the background or the colour, and that is\n // what makes it safe to apply to every button rather than just the bare\n // ones: a `solid` keeps its fill and its light label and gains a hairline\n // in the same hue, while a `ghost` gains the whole affordance.\n '.MuiButton-root': {\n marginTop: theme.spacing(0.5),\n border: `1px solid ${alpha(colorPalette.main, 0.45)}` },\n },\n\n '.MuiAlert-icon': {\n transition: 'transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n alignItems: 'center',\n // Clear of the words rather than nearly touching them, and aligned to the\n // FIRST line instead of centred on the whole block — an icon floating\n // halfway down a three-line message points at nothing.\n alignSelf: 'flex-start',\n marginRight: theme.spacing(1.75),\n paddingTop: theme.spacing(0.25),\n animation: animate ? `${iconRotate} 0.6s ease-out` : 'none' },\n\n // The close button, kept off the text it sits beside.\n '.MuiAlert-action': {\n alignItems: 'flex-start',\n paddingLeft: theme.spacing(2) },\n});\n\n/**\n * A semantic Alert's surface and ink.\n *\n * ## Why this is not `alpha(main, 0.1)`\n *\n * It used to be, four times over, with `color: main` for the text. Both halves\n * were wrong, and independently so.\n *\n * The fill was TRANSLUCENT. A 10% wash only reads as a banner when something\n * opaque is behind it, so the component silently depended on where a consumer\n * put it. Placed over content — a floating notice, an invite anchored above a\n * catalogue — the page came straight through and the sentence interleaved with\n * whatever it was over. That is not a faint banner; it is an unreadable one,\n * and nothing in the component said so.\n *\n * The ink was the SEVERITY HUE at body size. `#0288d1`, this library's info\n * blue, is 3.03:1 on white — under the 4.5:1 WCAG AA floor before any wash is\n * involved. So the text failed on a plain white page too, where the fill was\n * behaving exactly as intended.\n *\n * ## Why `lighten`/`darken` rather than a hand-picked pair\n *\n * These are the same transforms MUI's own `standard` Alert uses, at the same\n * ratios — the recipe this component overrode. Reusing it means an OPAQUE tint\n * with a dark ink of the same hue, contrast that holds on any surface because\n * it no longer depends on one, and a pairing already proven across MUI's\n * palette rather than eyeballed here. Both modes are handled: on a dark theme\n * the tint darkens and the ink lightens, which an alpha wash could never do\n * because it carries the seed's own lightness through unchanged.\n *\n * The border keeps an alpha — it is a hairline over the tint it belongs to, so\n * translucency there costs nothing and lets the edge follow the fill.\n */\nconst semanticSurface = (theme: Theme, colorPalette: AlertPalette): CSSObject => {\n const dark = theme.palette.mode === 'dark';\n return {\n backgroundColor: dark ? darken(colorPalette.main, 0.8) : lighten(colorPalette.main, 0.9),\n color: dark ? lighten(colorPalette.main, 0.6) : darken(colorPalette.main, 0.6),\n border: `1px solid ${alpha(colorPalette.main, 0.35)}`,\n '.MuiAlert-icon': {\n color: colorPalette.main,\n },\n };\n};\n\n// The six visual variants. Each block is spread in only when it matches, which\n// is how the original inline version read; keeping that shape here means the\n// styled() callback carries one branch instead of six. The four semantics were\n// four IDENTICAL copies of the same block — they now share one, so the next\n// change to a banner's surface cannot land on three of them.\nexport const alertVariantStyles = (\n theme: Theme,\n customVariant: string | undefined,\n colorPalette: AlertPalette,\n): CSSObject => ({\n...(customVariant !== undefined &&\n SEMANTIC_VARIANTS.has(customVariant) &&\n semanticSurface(theme, colorPalette)),\n\n...(customVariant === 'glass' && {\n // 85%, not 10%. This is the variant that is MEANT to be see-through, and it\n // was the same mistake in a costume: at 0.1 the blur had almost nothing to\n // sit on, so `glass` was not frosted, it was a window. A frosted pane has to\n // be mostly pane — the backdrop should be legible AS texture behind the\n // text, never as competition with it.\n backgroundColor: alpha(theme.palette.background.paper, 0.85),\n backdropFilter: 'blur(20px) saturate(180%)',\n WebkitBackdropFilter: 'blur(20px) saturate(180%)',\n border: `1px solid ${alpha(theme.palette.divider, 0.4)}`,\n color: theme.palette.text.primary,\n '.MuiAlert-icon': {\n color: theme.palette.primary.main,\n },\n // Safari before 18 and Firefox with the filter disabled paint the declared\n // alpha with nothing blurred behind it — the see-through banner this is\n // fixing. There is no degraded frost to fall back to, so it falls back to an\n // opaque pane: less pretty, still readable.\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: theme.palette.background.paper,\n },\n}),\n\n...(customVariant === 'gradient' && {\n background: `linear-gradient(135deg, ${alpha(colorPalette.light || colorPalette.main, 0.9)}, ${alpha(colorPalette.dark || colorPalette.main, 0.9)})`,\n color: theme.palette.getContrastText(colorPalette.main),\n border: 'none',\n position: 'relative',\n overflow: 'hidden',\n '.MuiAlert-icon': {\n color: theme.palette.getContrastText(colorPalette.main),\n },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: '-1000px',\n width: '100%',\n height: '100%',\n background: `linear-gradient(90deg, transparent, ${alpha(theme.palette.common.white, 0.2)}, transparent)`,\n animation: `${shimmerAnimation} 3s infinite`,\n },\n '&:hover': {\n filter: 'brightness(1.1)',\n transform: 'translateY(-2px) scale(1.01)',\n },\n}),\n});\n\n// glow and pulse combine into three distinct looks, so the combinations are\n// spelled out rather than layered — layering them would let the glow-only shadow\n// leak into the glow+pulse case.\nexport const alertEmphasisStyles = (\n colorPalette: AlertPalette,\n glow: boolean,\n pulse: boolean,\n): CSSObject => ({\n...(glow &&\n !pulse && {\n boxShadow: `0 0 20px 5px ${alpha(colorPalette.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n }),\n\n// Pulse animation\n...(pulse &&\n !glow && {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: colorPalette.main,\n opacity: 0.2,\n animation: `${pulseAnimation} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n\n// Both glow and pulse\n...(glow &&\n pulse && {\n position: 'relative',\n boxShadow: `0 0 20px 5px ${alpha(colorPalette.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: colorPalette.main,\n opacity: 0.2,\n animation: `${pulseAnimation} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n});\n"],"mappings":";AAAA,OAAO,WAAW;AAClB;AAAA,EACE,SAAS;AAAA,EACT;AAAA,EACA,SAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAAkB;AACpB,SAAS,cAAc;AACvB,OAAO,WAAW;;;ACTlB,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,iBAAiB;AACxB,OAAO,aAAa;AACpB,SAAS,OAAO,QAAQ,WAAW,eAAe;AAsGxC;AAlGH,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CvB,IAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzB,IAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpB,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYnB,IAAM,oBAAoB,CAAC,OAAc,YAAoB;AAClE,QAAM,WAA4E;AAAA,IAChF,MAAM,MAAM,QAAQ;AAAA,IACpB,SAAS,MAAM,QAAQ;AAAA,IACvB,SAAS,MAAM,QAAQ;AAAA,IACvB,QAAQ,MAAM,QAAQ;AAAA,IACtB,SAAS,MAAM,QAAQ;AAAA,IACvB,WAAW,MAAM,QAAQ;AAAA,IACzB,SAAS;AAAA,MACP,MAAM,MAAM,QAAQ,KAAK,GAAG,KAAK;AAAA,MACjC,OAAO,MAAM,QAAQ,KAAK,GAAG,KAAK;AAAA,MAClC,MAAM,MAAM,QAAQ,KAAK,GAAG,KAAK;AAAA,IACnC;AAAA,EACF;AAE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,WAAW,SAAS,KACzC,0BAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAa,cAAc;AAAA,QAC3B;AAAA,QACA,eAAe;AAAA,QACf,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN;AAAA,QACA,aAAW;AAAA,QACX,eAAa;AAAA,QACb,UAAU;AAAA,QACV,QAAQ,YAAY,gBAAAA,KAAC,oBAAiB,YAAwB,SAAS,aAAa;AAAA,QACnF,GAAG;AAAA,QAEH;AAAA;AAAA,IACH,GACF;AAAA,EAEJ;AACF;AAEA,MAAM,cAAc;","names":["alpha","jsx","alpha"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/TableFilter/TableFilter.tsx","../src/components/layout/TableFilter/TableFilterContext.tsx"],"sourcesContent":["'use client';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport SearchIcon from '@mui/icons-material/Search';\nimport {\n Box,\n Checkbox,\n Divider,\n FormControlLabel,\n IconButton,\n InputAdornment,\n Link,\n TextField,\n Typography,\n} from '@mui/material';\nimport React, { useRef, useState } from 'react';\n\nimport { TableFilterContext, useTableFilterContext } from './TableFilterContext';\nimport type {\n TableFilterCheckboxFieldProps,\n TableFilterKeywordProps,\n TableFilterLayoutProps,\n TableFilterMainProps,\n TableFilterPanelProps,\n TableFilterProps,\n TableFilterRangeFieldProps,\n TableFilterSectionProps,\n} from './TableFilter.types';\n\nconst PANEL_WIDTH = 280;\n\n/**\n * Compound filter-panel system, MUI port of the reference `TableFilter`. Provides\n * open/close state; `Panel` slides in from the right beside `Main` (no overlap).\n *\n * @example\n * ```tsx\n * <TableFilter open={open} onOpenChange={setOpen} hasActiveFilters={n > 0}>\n * <TableFilter.Layout>\n * <TableFilter.Main>{table}</TableFilter.Main>\n * <TableFilter.Panel onClearAll={clearAll}>\n * <TableFilter.Keyword value={q} onChange={setQ} />\n * <TableFilter.Section title=\"Attributes\">\n * <TableFilter.CheckboxField label=\"Category\" options={cats} selected={sel} onToggle={toggle} />\n * <TableFilter.RangeField label=\"Price\" unit=\"R$\" value={price} onChange={setPrice} />\n * </TableFilter.Section>\n * </TableFilter.Panel>\n * </TableFilter.Layout>\n * </TableFilter>\n * ```\n */\nexport function TableFilter({\n children,\n open,\n onOpenChange,\n hasActiveFilters = false,\n}: TableFilterProps): React.JSX.Element {\n return (\n <TableFilterContext.Provider value={{ open, onOpenChange, hasActiveFilters }}>\n {children}\n </TableFilterContext.Provider>\n );\n}\nTableFilter.displayName = 'TableFilter';\n\nconst TableFilterLayout = ({ children, className }: TableFilterLayoutProps): React.JSX.Element => {\n const { open } = useTableFilterContext();\n return (\n <Box\n className={className}\n sx={{\n display: 'flex',\n minHeight: 0,\n minWidth: 0,\n flex: 1,\n alignItems: 'stretch',\n overflow: 'hidden',\n gap: open ? 2 : 0,\n }}\n >\n {children}\n </Box>\n );\n};\nTableFilterLayout.displayName = 'TableFilter.Layout';\n\nconst TableFilterMain = ({ children, className }: TableFilterMainProps): React.JSX.Element => (\n <Box className={className} sx={{ minWidth: 0, flex: 1, overflowY: 'auto', overflowX: 'hidden' }}>\n {children}\n </Box>\n);\nTableFilterMain.displayName = 'TableFilter.Main';\n\nconst TableFilterPanel = ({\n children,\n onClearAll,\n ariaLabel = 'Filters',\n clearTestId,\n}: TableFilterPanelProps): React.JSX.Element => {\n const { open } = useTableFilterContext();\n return (\n <Box\n component=\"aside\"\n aria-label={ariaLabel}\n aria-hidden={!open}\n sx={{\n display: 'flex',\n minHeight: 0,\n flexShrink: 0,\n flexDirection: 'column',\n alignSelf: 'stretch',\n overflow: 'hidden',\n bgcolor: 'background.paper',\n width: open ? PANEL_WIDTH : 0,\n borderLeft: open ? 1 : 0,\n borderColor: 'divider',\n transition: 'width 300ms ease-in-out',\n '@media (prefers-reduced-motion: reduce)': { transition: 'none' },\n }}\n >\n <Box\n sx={{\n display: 'flex',\n minHeight: 0,\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n overflowX: 'hidden',\n visibility: open ? 'visible' : 'hidden',\n opacity: open ? 1 : 0,\n pointerEvents: open ? 'auto' : 'none',\n transition: 'opacity 200ms ease-out',\n }}\n >\n <Box sx={{ boxSizing: 'border-box', display: 'flex', width: '100%', minWidth: 0, flexDirection: 'column', gap: 2.5, p: 2 }}>\n <Box sx={{ display: 'flex', justifyContent: 'flex-end' }}>\n <Link\n component=\"button\"\n type=\"button\"\n underline=\"hover\"\n data-testid={clearTestId}\n onClick={onClearAll}\n sx={{ fontSize: '0.75rem', color: 'text.secondary' }}\n >\n Clear All Filters\n </Link>\n </Box>\n {children}\n </Box>\n </Box>\n </Box>\n );\n};\nTableFilterPanel.displayName = 'TableFilter.Panel';\n\nconst TableFilterKeyword = ({\n value,\n onChange,\n placeholder = 'Press Enter to filter',\n label = 'Filter by keyword',\n testId,\n}: TableFilterKeywordProps): React.JSX.Element => {\n const [draft, setDraft] = useState(value);\n const prevValue = useRef(value);\n if (prevValue.current !== value) {\n prevValue.current = value;\n if (draft !== value) setDraft(value);\n }\n\n const commit = (): void => {\n if (draft !== value) onChange(draft);\n };\n const clearKeyword = (): void => {\n setDraft('');\n if (value !== '') onChange('');\n };\n\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>\n <Typography component=\"label\" sx={{ fontSize: '0.75rem', fontWeight: 500, color: 'text.secondary' }}>\n {label}\n </Typography>\n <TextField\n size=\"small\"\n name=\"keyword\"\n placeholder={placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={commit}\n onKeyDown={(event) => {\n if (event.key !== 'Enter') return;\n event.preventDefault();\n commit();\n }}\n inputProps={{ 'aria-label': label, 'data-testid': testId }}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon sx={{ fontSize: 16, color: 'text.secondary' }} />\n </InputAdornment>\n ),\n endAdornment:\n draft !== '' ? (\n <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n aria-label=\"Clear keyword filter\"\n data-testid={testId ? `${testId}-clear` : undefined}\n onMouseDown={(event) => event.preventDefault()}\n onClick={clearKeyword}\n >\n <CloseIcon sx={{ fontSize: 16 }} />\n </IconButton>\n </InputAdornment>\n ) : null,\n }}\n />\n </Box>\n );\n};\nTableFilterKeyword.displayName = 'TableFilter.Keyword';\n\nconst TableFilterSection = ({ title, children }: TableFilterSectionProps): React.JSX.Element => (\n <Box>\n <Divider sx={{ mb: 2.5 }} />\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5 }}>\n <Typography component=\"h2\" sx={{ fontSize: '0.875rem', fontWeight: 600, color: 'text.primary' }}>\n {title}\n </Typography>\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>{children}</Box>\n </Box>\n </Box>\n);\nTableFilterSection.displayName = 'TableFilter.Section';\n\nfunction TableFilterCheckboxField<TValue extends string = string>({\n label,\n options,\n selected,\n onToggle,\n testId,\n}: TableFilterCheckboxFieldProps<TValue>): React.JSX.Element {\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }} data-testid={testId}>\n <Typography sx={{ fontSize: '0.75rem', fontWeight: 500, color: 'text.secondary' }}>{label}</Typography>\n <Box sx={{ display: 'flex', flexDirection: 'column' }}>\n {options.map((option) => {\n const checked = selected.has(option.value);\n return (\n <FormControlLabel\n key={option.value}\n control={\n <Checkbox\n size=\"small\"\n checked={checked}\n onChange={(event) => onToggle(option.value, event.target.checked)}\n data-testid={testId ? `${testId}-${option.value}` : undefined}\n sx={{ py: 0.25 }}\n />\n }\n label={\n <Box component=\"span\" sx={{ fontSize: '0.875rem' }}>\n {option.label}\n {option.count != null && (\n <Box component=\"span\" sx={{ color: 'text.secondary' }}>\n {' '}\n ({option.count})\n </Box>\n )}\n </Box>\n }\n sx={{ ml: -0.5, mr: 0 }}\n />\n );\n })}\n </Box>\n </Box>\n );\n}\nTableFilterCheckboxField.displayName = 'TableFilter.CheckboxField';\n\nfunction parseBound(text: string): number | undefined {\n if (text.trim() === '') return undefined;\n const parsed = Number(text);\n return Number.isNaN(parsed) ? undefined : parsed;\n}\n\n/** One numeric bound input (min or max) for {@link TableFilterRangeField}. */\nfunction RangeBound({\n bound,\n error,\n placeholder,\n step,\n ariaLabel,\n testId,\n onChange,\n}: {\n bound: number | undefined;\n error: boolean;\n placeholder: string;\n step?: number;\n ariaLabel: string;\n testId?: string;\n onChange: (next: number | undefined) => void;\n}): React.JSX.Element {\n return (\n <TextField\n size=\"small\"\n type=\"number\"\n error={error}\n placeholder={placeholder}\n value={bound != null ? String(bound) : ''}\n onChange={(event) => onChange(parseBound(event.target.value))}\n inputProps={{ step, 'aria-label': ariaLabel, 'data-testid': testId }}\n />\n );\n}\n\n/** Inverted range: both ends set and max < min (surfaced to the user as an error). */\nconst isRangeInverted = (value: { min?: number; max?: number }): boolean =>\n value.min != null && value.max != null && value.max < value.min;\n\nconst TableFilterRangeField = ({\n label,\n value,\n onChange,\n unit,\n step,\n minPlaceholder = 'min',\n maxPlaceholder = 'max',\n invalidLabel,\n testId,\n}: TableFilterRangeFieldProps): React.JSX.Element => {\n const invalid = isRangeInverted(value);\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }} data-testid={testId}>\n <Typography sx={{ fontSize: '0.75rem', fontWeight: 500, color: 'text.secondary' }}>\n {label}\n {unit ? ` (${unit})` : ''}\n </Typography>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <RangeBound\n bound={value.min}\n error={invalid}\n placeholder={minPlaceholder}\n step={step}\n ariaLabel={`${label} ${minPlaceholder}`}\n testId={testId ? `${testId}-min` : undefined}\n onChange={(min) => onChange({ ...value, min })}\n />\n <Typography component=\"span\" sx={{ color: 'text.secondary' }}>\n –\n </Typography>\n <RangeBound\n bound={value.max}\n error={invalid}\n placeholder={maxPlaceholder}\n step={step}\n ariaLabel={`${label} ${maxPlaceholder}`}\n testId={testId ? `${testId}-max` : undefined}\n onChange={(max) => onChange({ ...value, max })}\n />\n </Box>\n {invalid && (\n <Typography\n role=\"alert\"\n data-testid={testId ? `${testId}-error` : undefined}\n sx={{ fontSize: '0.7rem', color: 'error.main' }}\n >\n {invalidLabel}\n </Typography>\n )}\n </Box>\n );\n};\nTableFilterRangeField.displayName = 'TableFilter.RangeField';\n\nTableFilter.Layout = TableFilterLayout;\nTableFilter.Main = TableFilterMain;\nTableFilter.Panel = TableFilterPanel;\nTableFilter.Keyword = TableFilterKeyword;\nTableFilter.Section = TableFilterSection;\nTableFilter.CheckboxField = TableFilterCheckboxField;\nTableFilter.RangeField = TableFilterRangeField;\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\n/** Open/close + active state shared by every `TableFilter` compound part. */\nexport interface TableFilterContextValue {\n /** Whether the filter panel is expanded. */\n open: boolean;\n /** Toggle the panel open/closed. */\n onOpenChange: (open: boolean) => void;\n /** When true, the trigger shows a filled indicator dot. */\n hasActiveFilters: boolean;\n}\n\n/** Backing context. `null` outside a `<TableFilter>` root. */\nexport const TableFilterContext = createContext<TableFilterContextValue | null>(null);\n\n/**\n * Reads the nearest {@link TableFilterContext}.\n *\n * @throws If used outside `<TableFilter>`.\n */\nexport function useTableFilterContext(): TableFilterContextValue {\n const context = useContext(TableFilterContext);\n if (!context) {\n throw new Error('TableFilter compound components must be rendered inside <TableFilter>');\n }\n return context;\n}\n"],"mappings":";AAEA,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,QAAQ,gBAAgB;;;ACbxC,SAAS,eAAe,kBAAkB;AAanC,IAAM,qBAAqB,cAA8C,IAAI;AAO7E,SAAS,wBAAiD;AAC/D,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uEAAuE;AAAA,EACzF;AACA,SAAO;AACT;;;AD8BI,cA4E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AAS,GAAG,MAAM,SAAS;AAAA,UACnC,UAAU,CAAC,QAAQ,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA;AAAA,MAC/C;AAAA,MACA,oBAAC,cAAW,WAAU,QAAO,IAAI,EAAE,OAAO,iBAAiB,GAAG,oBAE9D;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM;AAAA,UACb,OAAO;AAAA,UACP,aAAa;AAAA,UACb;AAAA,UACA,WAAW,GAAG,KAAK,IAAI,cAAc;AAAA,UACrC,QAAQ,SAAS,GAAG,MAAM,SAAS;AAAA,UACnC,UAAU,CAAC,QAAQ,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,IACC,WACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAa,SAAS,GAAG,MAAM,WAAW;AAAA,QAC1C,IAAI,EAAE,UAAU,UAAU,OAAO,aAAa;AAAA,QAE7C;AAAA;AAAA,IACH;AAAA,KAEJ;AAEJ;AACA,sBAAsB,cAAc;AAEpC,YAAY,SAAS;AACrB,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,gBAAgB;AAC5B,YAAY,aAAa;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/Calendar/Calendar.tsx","../src/components/form/Calendar/Calendar.helpers.ts","../src/components/form/Calendar/Calendar.hooks.ts","../src/components/form/Calendar/Calendar.dates.ts","../src/components/form/Calendar/Calendar.keyboard.ts","../src/components/form/Calendar/Calendar.selection.ts","../src/components/form/Calendar/CalendarMonth.tsx","../src/components/form/Calendar/CalendarDay.tsx","../src/components/form/Calendar/CalendarDayCell.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material';\nimport { Box, Paper } from '@mui/material';\nimport React from 'react';\n\nimport { resolveCalendarProps } from './Calendar.helpers';\nimport { useCalendar } from './Calendar.hooks';\nimport type { CalendarProps } from './Calendar.types';\nimport type { DayCellContext } from './CalendarDayCell';\nimport { CalendarMonth } from './CalendarMonth';\n\nconst containerSx = (monthsToShow: number): SxProps<Theme> => ({\n p: 3,\n display: 'flex',\n flexDirection: monthsToShow > 1 ? 'row' : 'column',\n gap: 3,\n outline: 'none',\n '&:focus-within': {\n outline: '2px solid',\n outlineColor: 'primary.main',\n outlineOffset: 2,\n },\n});\n\nexport const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>((componentProps, ref) => {\n const props = resolveCalendarProps(componentProps);\n const { monthsToShow, locale, renderHeader, renderFooter, className } = props;\n\n const calendar = useCalendar(props);\n\n const dayContext: DayCellContext = {\n selectionMode: props.selectionMode,\n value: props.value,\n range: props.range,\n showOutsideDays: props.showOutsideDays,\n renderDay: props.renderDay,\n dayClassName: props.dayClassName,\n hoveredDate: calendar.hoveredDate,\n focusedDate: calendar.focusedDate,\n today: calendar.today,\n isDisabled: calendar.isDisabled,\n onSelect: calendar.handleDateClick,\n onHover: calendar.handleDateMouseEnter,\n onHoverEnd: calendar.handleDateMouseLeave,\n };\n\n return (\n <Paper\n ref={ref}\n className={className}\n role=\"application\"\n aria-label=\"Calendar\"\n tabIndex={0}\n onKeyDown={calendar.handleKeyDown}\n data-testid=\"calendar-container\"\n sx={containerSx(monthsToShow)}\n >\n <Box ref={calendar.gridRef} sx={{ display: 'flex', gap: 3, flexWrap: 'wrap' }}>\n {calendar.monthMatrices.map((matrix, index) => (\n <CalendarMonth\n key={`month-${matrix.year}-${matrix.month}`}\n matrix={matrix}\n monthIndex={index}\n monthsToShow={monthsToShow}\n locale={locale}\n weekdayNames={calendar.weekdayNames}\n renderHeader={renderHeader}\n onPreviousMonth={calendar.goToPreviousMonth}\n onNextMonth={calendar.goToNextMonth}\n dayContext={dayContext}\n />\n ))}\n </Box>\n\n {renderFooter && (\n <Box sx={{ mt: 2, pt: 2, borderTop: 1, borderColor: 'divider' }}>{renderFooter}</Box>\n )}\n </Paper>\n );\n});\n\nCalendar.displayName = 'Calendar';\n\nexport default Calendar;\n","import type { CalendarProps, ResolvedCalendarProps } from './Calendar.types';\n\nconst CALENDAR_DEFAULTS = {\n selectionMode: 'single',\n value: null,\n range: { start: null, end: null },\n firstDayOfWeek: 0,\n locale: 'en-US',\n showOutsideDays: true,\n minRangeLength: 1,\n allowSameDayRange: true,\n autoFocus: false,\n} as const satisfies Partial<CalendarProps>;\n\n// Strips explicitly-undefined props before the merge, so `prop={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = (props: CalendarProps): Partial<CalendarProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<CalendarProps>;\n\n// Applied as a merge rather than destructuring defaults, which would otherwise\n// put nine branches into the component's own complexity budget.\nexport const resolveCalendarProps = (props: CalendarProps): ResolvedCalendarProps => {\n const merged = { ...CALENDAR_DEFAULTS, ...definedProps(props) } as ResolvedCalendarProps;\n\n // A range needs two months side by side to be picked comfortably; a single\n // date does not.\n const defaultMonths = merged.selectionMode === 'range' ? 2 : 1;\n\n return { ...merged, monthsToShow: merged.numberOfMonths ?? defaultMonths };\n};\n","import type React from 'react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { addMonths, generateMonthMatrix, getWeekdayNames, normalizeDate } from './Calendar.dates';\nimport { ACTIVATION_KEYS, navigateFocus } from './Calendar.keyboard';\nimport { isDateDisabledBy, nextRangeStep } from './Calendar.selection';\nimport type { MonthMatrix, ResolvedCalendarProps } from './Calendar.types';\n\nconst startOfMonth = (date: Date): Date => new Date(date.getFullYear(), date.getMonth(), 1);\n\n// Which day the calendar opens on: whatever is already chosen, else today.\nconst initialFocus = (props: ResolvedCalendarProps, today: Date): Date => {\n if (props.selectionMode === 'single' && props.value) return normalizeDate(props.value);\n if (props.selectionMode === 'range' && props.range.start) return normalizeDate(props.range.start);\n return today;\n};\n\nconst useCalendarState = (props: ResolvedCalendarProps, today: Date) => {\n const [focusedDate, setFocusedDate] = useState<Date>(() => initialFocus(props, today));\n const [hoveredDate, setHoveredDate] = useState<Date | null>(null);\n const [currentMonth, setCurrentMonth] = useState<Date>(() => startOfMonth(focusedDate));\n\n return {\n focusedDate,\n setFocusedDate,\n hoveredDate,\n setHoveredDate,\n currentMonth,\n setCurrentMonth,\n };\n};\n\nconst useAutoFocusGrid = (autoFocus: boolean) => {\n const gridRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (autoFocus && gridRef.current) gridRef.current.focus();\n }, [autoFocus]);\n\n return gridRef;\n};\n\nconst useVisibleMonths = ({\n currentMonth,\n monthsToShow,\n firstDayOfWeek,\n}: {\n currentMonth: Date;\n monthsToShow: number;\n firstDayOfWeek: number;\n}): MonthMatrix[] =>\n useMemo(() => {\n const matrices: MonthMatrix[] = [];\n let cursor = currentMonth;\n\n for (let i = 0; i < monthsToShow; i++) {\n matrices.push(generateMonthMatrix(cursor.getMonth(), cursor.getFullYear(), firstDayOfWeek));\n cursor = addMonths(cursor, 1);\n }\n\n return matrices;\n }, [currentMonth, monthsToShow, firstDayOfWeek]);\n\n// A click either sets a single date or advances the range by one step; the range\n// rules themselves live in nextRangeStep.\nconst useDateClick = ({\n props,\n isDisabled,\n setFocusedDate,\n}: {\n props: ResolvedCalendarProps;\n isDisabled: (date: Date) => boolean;\n setFocusedDate: (date: Date) => void;\n}) => {\n const {\n selectionMode,\n range,\n onChange,\n onRangeChange,\n onIntermediateRangeChange,\n allowSameDayRange,\n minRangeLength,\n maxRangeLength,\n } = props;\n\n return useCallback(\n (date: Date) => {\n if (isDisabled(date)) return;\n\n const candidate = normalizeDate(date);\n setFocusedDate(candidate);\n\n if (selectionMode === 'single') {\n onChange?.(candidate);\n return;\n }\n\n const step = nextRangeStep({\n start: range.start,\n end: range.end,\n candidate,\n allowSameDayRange,\n minRangeLength,\n maxRangeLength,\n });\n\n if (step.kind === 'rejected') return;\n\n if (step.kind === 'complete') onRangeChange?.(step.range);\n onIntermediateRangeChange?.(step.range);\n },\n [\n selectionMode,\n range,\n onChange,\n onRangeChange,\n onIntermediateRangeChange,\n isDisabled,\n allowSameDayRange,\n minRangeLength,\n maxRangeLength,\n setFocusedDate,\n ],\n );\n};\n\n// Hovering only means something while a range is half-chosen.\nconst useHoverHandlers = ({\n selectionMode,\n range,\n isDisabled,\n setHoveredDate,\n}: {\n selectionMode: ResolvedCalendarProps['selectionMode'];\n range: ResolvedCalendarProps['range'];\n isDisabled: (date: Date) => boolean;\n setHoveredDate: (date: Date | null) => void;\n}) => {\n const handleDateMouseEnter = useCallback(\n (date: Date) => {\n if (selectionMode === 'range' && range.start && !range.end && !isDisabled(date)) {\n setHoveredDate(normalizeDate(date));\n }\n },\n [selectionMode, range, isDisabled, setHoveredDate],\n );\n\n const handleDateMouseLeave = useCallback(() => setHoveredDate(null), [setHoveredDate]);\n\n return { handleDateMouseEnter, handleDateMouseLeave };\n};\n\nconst useKeyboardHandler = ({\n focusedDate,\n firstDayOfWeek,\n currentMonth,\n handleDateClick,\n setFocusedDate,\n setCurrentMonth,\n setHoveredDate,\n}: {\n focusedDate: Date;\n firstDayOfWeek: number;\n currentMonth: Date;\n handleDateClick: (date: Date) => void;\n setFocusedDate: (date: Date) => void;\n setCurrentMonth: (date: Date) => void;\n setHoveredDate: (date: Date | null) => void;\n}) =>\n useCallback(\n (event: React.KeyboardEvent) => {\n const { key } = event;\n const moved = navigateFocus(key, focusedDate, { firstDayOfWeek, shiftKey: event.shiftKey });\n\n if (moved) {\n event.preventDefault();\n setFocusedDate(normalizeDate(moved));\n\n // Follow focus into a month that is not on screen.\n const month = startOfMonth(moved);\n if (month.getTime() !== currentMonth.getTime()) setCurrentMonth(month);\n return;\n }\n\n if (ACTIVATION_KEYS.includes(key)) {\n event.preventDefault();\n handleDateClick(focusedDate);\n return;\n }\n\n if (key === 'Escape') {\n event.preventDefault();\n setHoveredDate(null);\n }\n },\n [\n focusedDate,\n firstDayOfWeek,\n currentMonth,\n handleDateClick,\n setFocusedDate,\n setCurrentMonth,\n setHoveredDate,\n ],\n );\n\nexport const useCalendar = (props: ResolvedCalendarProps) => {\n const { monthsToShow, firstDayOfWeek, locale, minDate, maxDate, isDateDisabled } = props;\n\n const today = useMemo(() => normalizeDate(new Date()), []);\n const state = useCalendarState(props, today);\n const gridRef = useAutoFocusGrid(props.autoFocus);\n\n const monthMatrices = useVisibleMonths({\n currentMonth: state.currentMonth,\n monthsToShow,\n firstDayOfWeek,\n });\n\n const weekdayNames = useMemo(\n () => getWeekdayNames(locale, firstDayOfWeek),\n [locale, firstDayOfWeek],\n );\n\n const isDisabled = useCallback(\n (date: Date) => isDateDisabledBy({ date, minDate, maxDate, isDateDisabled }),\n [minDate, maxDate, isDateDisabled],\n );\n\n const { setCurrentMonth } = state;\n const goToPreviousMonth = useCallback(\n () => setCurrentMonth((prev) => addMonths(prev, -1)),\n [setCurrentMonth],\n );\n const goToNextMonth = useCallback(\n () => setCurrentMonth((prev) => addMonths(prev, 1)),\n [setCurrentMonth],\n );\n\n const handleDateClick = useDateClick({\n props,\n isDisabled,\n setFocusedDate: state.setFocusedDate,\n });\n\n const { handleDateMouseEnter, handleDateMouseLeave } = useHoverHandlers({\n selectionMode: props.selectionMode,\n range: props.range,\n isDisabled,\n setHoveredDate: state.setHoveredDate,\n });\n\n const handleKeyDown = useKeyboardHandler({\n focusedDate: state.focusedDate,\n firstDayOfWeek,\n currentMonth: state.currentMonth,\n handleDateClick,\n setFocusedDate: state.setFocusedDate,\n setCurrentMonth: state.setCurrentMonth,\n setHoveredDate: state.setHoveredDate,\n });\n\n return {\n gridRef,\n today,\n focusedDate: state.focusedDate,\n hoveredDate: state.hoveredDate,\n monthMatrices,\n weekdayNames,\n isDisabled,\n goToPreviousMonth,\n goToNextMonth,\n handleDateClick,\n handleDateMouseEnter,\n handleDateMouseLeave,\n handleKeyDown,\n };\n};\n","import type { MonthMatrix, MonthMatrixDay } from './Calendar.types';\n\nconst DAYS_PER_WEEK = 7;\n// Six rows always cover a month, whichever weekday it starts on.\nconst MAX_CELLS = 42;\nconst NOON = 12;\n\n// Every comparison happens at noon so daylight-saving shifts can never move a\n// date across a day boundary.\nexport const normalizeDate = (date: Date): Date => {\n const normalized = new Date(date);\n normalized.setHours(NOON, 0, 0, 0);\n return normalized;\n};\n\nexport const isSameDay = (date1: Date, date2: Date): boolean =>\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate();\n\nexport const isBetween = (date: Date, start: Date, end: Date): boolean => {\n const normalized = normalizeDate(date);\n return normalized >= normalizeDate(start) && normalized <= normalizeDate(end);\n};\n\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n};\n\nexport const addMonths = (date: Date, months: number): Date => {\n const result = new Date(date);\n result.setMonth(result.getMonth() + months);\n return result;\n};\n\nexport const startOfWeek = (date: Date, firstDayOfWeek = 0): Date => {\n const result = new Date(date);\n const day = result.getDay();\n const diff = (day < firstDayOfWeek ? DAYS_PER_WEEK : 0) + day - firstDayOfWeek;\n result.setDate(result.getDate() - diff);\n return result;\n};\n\n// Day 0 of the next month is the last day of this one.\nconst endOfMonth = (date: Date): Date =>\n new Date(date.getFullYear(), date.getMonth() + 1, 0);\n\nconst dayKey = (date: Date): string =>\n `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;\n\nexport const generateMonthMatrix = (\n month: number,\n year: number,\n firstDayOfWeek = 0,\n): MonthMatrix => {\n const firstDay = new Date(year, month, 1);\n const lastDay = endOfMonth(firstDay);\n const currentDate = startOfWeek(firstDay, firstDayOfWeek);\n\n const weeks: MonthMatrixDay[][] = [];\n let currentWeek: MonthMatrixDay[] = [];\n\n for (let i = 0; i < MAX_CELLS; i++) {\n currentWeek.push({\n date: new Date(currentDate),\n inCurrentMonth: currentDate.getMonth() === month,\n key: dayKey(currentDate),\n });\n\n if (currentWeek.length === DAYS_PER_WEEK) {\n weeks.push(currentWeek);\n currentWeek = [];\n }\n\n currentDate.setDate(currentDate.getDate() + 1);\n\n // Stop on a week boundary once the month is behind us, so a month that fits\n // in five rows does not get a trailing sixth.\n if (currentWeek.length === 0 && currentDate > lastDay) break;\n }\n\n return { weeks, month, year };\n};\n\nexport const getWeekdayNames = (locale = 'en-US', firstDayOfWeek = 0): string[] => {\n const baseDate = new Date(2025, 0, 5); // A Sunday\n const weekdays: string[] = [];\n\n for (let i = 0; i < DAYS_PER_WEEK; i++) {\n const date = addDays(baseDate, (i + firstDayOfWeek) % DAYS_PER_WEEK);\n weekdays.push(date.toLocaleDateString(locale, { weekday: 'narrow' }));\n }\n\n return weekdays;\n};\n\nexport const getMonthName = (month: number, year: number, locale = 'en-US'): string =>\n new Date(year, month, 1).toLocaleDateString(locale, { month: 'long', year: 'numeric' });\n","import { addDays, addMonths, startOfWeek } from './Calendar.dates';\n\nconst DAYS_PER_WEEK = 7;\nconst MONTHS_PER_YEAR = 12;\n\ninterface NavigationContext {\n firstDayOfWeek: number;\n shiftKey: boolean;\n}\n\n// A lookup rather than a switch: each entry is one move, and adding a key does\n// not add a branch to the handler.\nconst NAVIGATION: Record<string, (date: Date, context: NavigationContext) => Date> = {\n ArrowLeft: (date) => addDays(date, -1),\n ArrowRight: (date) => addDays(date, 1),\n ArrowUp: (date) => addDays(date, -DAYS_PER_WEEK),\n ArrowDown: (date) => addDays(date, DAYS_PER_WEEK),\n Home: (date, { firstDayOfWeek }) => startOfWeek(date, firstDayOfWeek),\n End: (date, { firstDayOfWeek }) => addDays(startOfWeek(date, firstDayOfWeek), DAYS_PER_WEEK - 1),\n // Shift jumps a year rather than a month.\n PageUp: (date, { shiftKey }) => addMonths(date, shiftKey ? -MONTHS_PER_YEAR : -1),\n PageDown: (date, { shiftKey }) => addMonths(date, shiftKey ? MONTHS_PER_YEAR : 1),\n};\n\nexport const ACTIVATION_KEYS = ['Enter', ' '];\n\n// Returns where focus moves for a navigation key, or null if the key is not one.\nexport const navigateFocus = (\n key: string,\n date: Date,\n context: NavigationContext,\n): Date | null => NAVIGATION[key]?.(date, context) ?? null;\n","import { isBetween, isSameDay, normalizeDate } from './Calendar.dates';\nimport type {\n CalendarProps,\n DateRange,\n DayRenderArgs,\n MonthMatrixDay,\n SelectionMode,\n} from './Calendar.types';\n\nconst MS_PER_DAY = 1000 * 60 * 60 * 24;\n\ntype RangeUpdate =\n | { kind: 'start'; range: DateRange }\n | { kind: 'complete'; range: Required<DateRange> }\n | { kind: 'rejected' };\n\n// The endpoints carry their own styling, so \"in range\" means the interior only.\nconst strictlyBetween = (date: Date, start: Date, end: Date): boolean =>\n isBetween(date, start, end) && !isSameDay(date, start) && !isSameDay(date, end);\n\nconst violatesLength = (\n nights: number,\n minRangeLength?: number,\n maxRangeLength?: number,\n): boolean => {\n if (minRangeLength && nights < minRangeLength - 1) return true;\n if (maxRangeLength && nights > maxRangeLength - 1) return true;\n return false;\n};\n\n// Decides what a click on `candidate` does to the current range: opens a new one,\n// closes the open one, or is refused because the result would break a constraint.\nexport const nextRangeStep = ({\n start,\n end,\n candidate,\n allowSameDayRange,\n minRangeLength,\n maxRangeLength,\n}: {\n start?: Date | null;\n end?: Date | null;\n candidate: Date;\n allowSameDayRange: boolean;\n minRangeLength?: number;\n maxRangeLength?: number;\n}): RangeUpdate => {\n // Nothing started, or a finished range: this click opens a new one.\n if (!start || end) return { kind: 'start', range: { start: candidate, end: null } };\n\n // Clicking before the start picks the range backwards.\n const [rangeStart, rangeEnd] = candidate < start ? [candidate, start] : [start, candidate];\n\n if (!allowSameDayRange && isSameDay(rangeStart, rangeEnd)) return { kind: 'rejected' };\n\n const nights = Math.ceil((rangeEnd.getTime() - rangeStart.getTime()) / MS_PER_DAY);\n if (violatesLength(nights, minRangeLength, maxRangeLength)) return { kind: 'rejected' };\n\n return { kind: 'complete', range: { start: rangeStart, end: rangeEnd } };\n};\n\nconst isDateSelected = ({\n selectionMode,\n value,\n range,\n date,\n}: {\n selectionMode: SelectionMode;\n value: Date | null;\n range: DateRange;\n date: Date;\n}): boolean => {\n if (selectionMode === 'single') return value ? isSameDay(date, value) : false;\n\n const { start, end } = range;\n return Boolean((start && isSameDay(date, start)) || (end && isSameDay(date, end)));\n};\n\nconst isDateInRange = ({\n selectionMode,\n range,\n hoveredDate,\n date,\n isDisabled,\n}: {\n selectionMode: SelectionMode;\n range: DateRange;\n hoveredDate: Date | null;\n date: Date;\n isDisabled: (date: Date) => boolean;\n}): boolean => {\n if (selectionMode !== 'range') return false;\n\n const { start, end } = range;\n if (start && end) return strictlyBetween(date, start, end);\n\n // With only one end chosen, hovering previews the range the next click makes.\n if (!start || !hoveredDate || isDisabled(hoveredDate)) return false;\n\n const [previewStart, previewEnd] =\n start < hoveredDate ? [start, hoveredDate] : [hoveredDate, start];\n return strictlyBetween(date, previewStart, previewEnd);\n};\n\nexport const isDateDisabledBy = ({\n date,\n minDate,\n maxDate,\n isDateDisabled,\n}: {\n date: Date;\n minDate?: Date;\n maxDate?: Date;\n isDateDisabled?: CalendarProps['isDateDisabled'];\n}): boolean => {\n // Bounds are normalized to noon so a min/max given at midnight does not\n // exclude its own day.\n if (minDate && date < normalizeDate(minDate)) return true;\n if (maxDate && date > normalizeDate(maxDate)) return true;\n return Boolean(isDateDisabled?.(date));\n};\n\n// Everything a day cell needs to know about itself, derived in one place so the\n// custom renderDay hook and the built-in cell see exactly the same facts.\nexport const buildDayArgs = ({\n day,\n selectionMode,\n value,\n range,\n hoveredDate,\n today,\n isDisabled,\n}: {\n day: MonthMatrixDay;\n selectionMode: SelectionMode;\n value: Date | null;\n range: DateRange;\n hoveredDate: Date | null;\n today: Date;\n isDisabled: (date: Date) => boolean;\n}): DayRenderArgs => {\n const { date, inCurrentMonth } = day;\n const inRangeMode = selectionMode === 'range';\n\n return {\n date,\n inCurrentMonth,\n selected: isDateSelected({ selectionMode, value, range, date }),\n inRange: isDateInRange({ selectionMode, range, hoveredDate, date, isDisabled }),\n rangeStart: Boolean(inRangeMode && range.start && isSameDay(date, range.start)),\n rangeEnd: Boolean(inRangeMode && range.end && isSameDay(date, range.end)),\n disabled: isDisabled(date),\n today: isSameDay(date, today),\n hovered: hoveredDate ? isSameDay(date, hoveredDate) : false,\n };\n};\n","import ChevronLeft from '@mui/icons-material/ChevronLeft';\nimport ChevronRight from '@mui/icons-material/ChevronRight';\nimport { Box, IconButton, Typography } from '@mui/material';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport { getMonthName } from './Calendar.dates';\nimport type { CalendarProps, MonthMatrix } from './Calendar.types';\nimport type { DayCellContext } from './CalendarDayCell';\nimport { CalendarDayCell } from './CalendarDayCell';\n\nconst SPACER_WIDTH = 32;\n\nconst GRID_SX = { display: 'grid', gridTemplateColumns: 'repeat(7, 1fr)', gap: 0.5 } as const;\n\n// Only the outermost months carry arrows; the ones between get a spacer so their\n// titles stay centred.\nconst MonthNavHeader: FC<{\n title: React.ReactNode;\n showPrevious: boolean;\n showNext: boolean;\n onPreviousMonth: () => void;\n onNextMonth: () => void;\n}> = ({ title, showPrevious, showNext, onPreviousMonth, onNextMonth }) => (\n <Box\n sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}\n data-testid=\"calendar-header\"\n >\n {showPrevious && (\n <IconButton onClick={onPreviousMonth} size=\"small\" data-testid=\"calendar-prev-month\">\n <ChevronLeft />\n </IconButton>\n )}\n\n <Typography\n variant=\"h6\"\n component=\"h2\"\n sx={{ fontWeight: 'bold', flex: 1, textAlign: 'center' }}\n >\n {title}\n </Typography>\n\n {showNext && (\n <IconButton onClick={onNextMonth} size=\"small\" data-testid=\"calendar-next-month\">\n <ChevronRight />\n </IconButton>\n )}\n\n {!showPrevious && !showNext && <Box sx={{ width: SPACER_WIDTH }} />}\n </Box>\n);\n\nconst WeekdayHeader: FC<{ weekdayNames: string[] }> = ({ weekdayNames }) => (\n <Box sx={{ ...GRID_SX, mb: 1 }}>\n {weekdayNames.map((weekday, index) => (\n <Box\n // Narrow weekday names repeat within a week ('S', 'T'), so position is\n // the only stable key here.\n key={`weekday-${index}`}\n role=\"columnheader\"\n data-testid={`calendar-weekday-${index}`}\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: SPACER_WIDTH,\n fontSize: '0.875rem',\n fontWeight: 'bold',\n color: 'text.secondary',\n }}\n >\n {weekday}\n </Box>\n ))}\n </Box>\n);\n\nexport interface CalendarMonthProps {\n matrix: MonthMatrix;\n monthIndex: number;\n monthsToShow: number;\n locale: string;\n weekdayNames: string[];\n renderHeader?: CalendarProps['renderHeader'];\n onPreviousMonth: () => void;\n onNextMonth: () => void;\n dayContext: DayCellContext;\n}\n\nexport const CalendarMonth: FC<CalendarMonthProps> = ({\n matrix,\n monthIndex,\n monthsToShow,\n locale,\n weekdayNames,\n renderHeader,\n onPreviousMonth,\n onNextMonth,\n dayContext,\n}) => {\n const monthName = getMonthName(matrix.month, matrix.year, locale);\n const title = renderHeader ? renderHeader({ month: matrix.month, year: matrix.year }) : monthName;\n\n return (\n /* The month is addressable by its position, because in a multi-month\n calendar every day number appears once PER MONTH — `calendar-date-5` is\n January's 5th and February's. Without a per-month hook a test can only\n reach a day positionally, which is exactly what the flakiness gate\n refuses. Additive: `calendar-grid` below is unchanged. */\n <Box sx={{ minWidth: 280 }} data-testid={`calendar-month-${monthIndex}`}>\n <MonthNavHeader\n title={title}\n showPrevious={monthIndex === 0}\n showNext={monthIndex === monthsToShow - 1}\n onPreviousMonth={onPreviousMonth}\n onNextMonth={onNextMonth}\n />\n\n <WeekdayHeader weekdayNames={weekdayNames} />\n\n <Box\n role=\"grid\"\n aria-labelledby={`month-${monthIndex}`}\n data-testid=\"calendar-grid\"\n sx={GRID_SX}\n >\n {matrix.weeks.flat().map((day) => (\n <CalendarDayCell key={day.key} day={day} {...dayContext} />\n ))}\n </Box>\n </Box>\n );\n};\n","import type { SxProps, Theme } from '@mui/material';\nimport { Box } from '@mui/material';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport type { DayRenderArgs } from './Calendar.types';\n\nconst CELL_SIZE = 40;\n\ninterface DayState extends DayRenderArgs {\n outside: boolean;\n focused: boolean;\n}\n\n// Order matters: these land on the element in the order listed.\nconst CLASS_FLAGS: Array<[keyof DayState, string]> = [\n ['selected', 'selected'],\n ['inRange', 'in-range'],\n ['rangeStart', 'range-start'],\n ['rangeEnd', 'range-end'],\n ['disabled', 'disabled'],\n ['today', 'today'],\n ['outside', 'outside'],\n ['hovered', 'hovered'],\n ['focused', 'focused'],\n];\n\nconst dayClassNames = (state: DayState, custom?: string): string =>\n [\n 'calendar-day',\n ...CLASS_FLAGS.filter(([flag]) => state[flag]).map(([, name]) => name),\n ...(custom ? [custom] : []),\n ].join(' ');\n\nconst isEndpoint = (day: DayRenderArgs): boolean =>\n day.selected || day.rangeStart || day.rangeEnd;\n\nconst backgroundFor = (day: DayRenderArgs): string => {\n if (isEndpoint(day)) return 'primary.main';\n if (day.inRange || day.hovered) return 'primary.light';\n return 'transparent';\n};\n\nconst colorFor = (day: DayRenderArgs, visible: boolean): string => {\n if (isEndpoint(day)) return 'primary.contrastText';\n if (day.disabled) return 'text.disabled';\n // Outside days that are switched off still occupy the grid, they just have\n // nothing to show.\n if (!visible) return 'transparent';\n return 'text.primary';\n};\n\nconst hoverBackgroundFor = (day: DayRenderArgs): string | undefined => {\n if (day.disabled) return undefined;\n return day.selected ? 'primary.dark' : 'action.hover';\n};\n\nconst dayCellSx = (day: DayRenderArgs, visible: boolean): SxProps<Theme> => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: CELL_SIZE,\n height: CELL_SIZE,\n border: 'none',\n borderRadius: 1,\n cursor: day.disabled ? 'not-allowed' : 'pointer',\n backgroundColor: backgroundFor(day),\n color: colorFor(day, visible),\n opacity: !day.inCurrentMonth && visible ? 0.5 : 1,\n fontWeight: day.today ? 'bold' : 'normal',\n '&:hover': {\n backgroundColor: hoverBackgroundFor(day),\n },\n '&:focus': {\n outline: '2px solid',\n outlineColor: 'primary.main',\n outlineOffset: 1,\n },\n});\n\nexport interface CalendarDayProps {\n day: DayRenderArgs;\n focused: boolean;\n showOutsideDays: boolean;\n dayClassName?: (args: DayRenderArgs) => string;\n onSelect: (date: Date) => void;\n onHover: (date: Date) => void;\n onHoverEnd: () => void;\n}\n\nexport const CalendarDay: FC<CalendarDayProps> = ({\n day,\n focused,\n showOutsideDays,\n dayClassName,\n onSelect,\n onHover,\n onHoverEnd,\n}) => {\n const visible = day.inCurrentMonth || showOutsideDays;\n const state: DayState = { ...day, outside: !day.inCurrentMonth, focused };\n\n return (\n <Box\n component=\"button\"\n role=\"gridcell\"\n tabIndex={focused ? 0 : -1}\n aria-selected={day.selected}\n aria-disabled={day.disabled}\n aria-current={day.today ? 'date' : undefined}\n className={dayClassNames(state, dayClassName?.(day))}\n data-testid={`calendar-date-${day.date.getDate()}`}\n onClick={() => onSelect(day.date)}\n onMouseEnter={() => onHover(day.date)}\n onMouseLeave={onHoverEnd}\n sx={dayCellSx(day, visible)}\n >\n {day.selected && (\n <Box component=\"span\" data-testid=\"calendar-selected-date\" sx={{ display: 'none' }} />\n )}\n {day.today && (\n <Box component=\"span\" data-testid=\"calendar-today\" sx={{ display: 'none' }} />\n )}\n {visible ? day.date.getDate() : ''}\n </Box>\n );\n};\n","import type { FC } from 'react';\nimport React from 'react';\n\nimport { isSameDay } from './Calendar.dates';\nimport { buildDayArgs } from './Calendar.selection';\nimport type { CalendarProps, DateRange, MonthMatrixDay, SelectionMode } from './Calendar.types';\nimport { CalendarDay } from './CalendarDay';\n\n// Everything a cell needs that is the same for every cell in the calendar.\nexport interface DayCellContext {\n selectionMode: SelectionMode;\n value: Date | null;\n range: DateRange;\n hoveredDate: Date | null;\n focusedDate: Date;\n today: Date;\n showOutsideDays: boolean;\n isDisabled: (date: Date) => boolean;\n renderDay?: CalendarProps['renderDay'];\n dayClassName?: CalendarProps['dayClassName'];\n onSelect: (date: Date) => void;\n onHover: (date: Date) => void;\n onHoverEnd: () => void;\n}\n\nexport const CalendarDayCell: FC<DayCellContext & { day: MonthMatrixDay }> = ({\n day,\n focusedDate,\n showOutsideDays,\n renderDay,\n dayClassName,\n onSelect,\n onHover,\n onHoverEnd,\n ...context\n}) => {\n const args = buildDayArgs({ day, ...context });\n\n if (renderDay) return <>{renderDay(args)}</>;\n\n return (\n <CalendarDay\n day={args}\n focused={isSameDay(args.date, focusedDate)}\n showOutsideDays={showOutsideDays}\n dayClassName={dayClassName}\n onSelect={onSelect}\n onHover={onHover}\n onHoverEnd={onHoverEnd}\n />\n );\n};\n"],"mappings":";AACA,SAAS,OAAAA,MAAK,aAAa;AAC3B,OAAO,WAAW;;;ACAlB,IAAM,oBAAoB;AAAA,EACxB,eAAe;AAAA,EACf,OAAO;AAAA,EACP,OAAO,EAAE,OAAO,MAAM,KAAK,KAAK;AAAA,EAChC,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,WAAW;AACb;AAIA,IAAM,eAAe,CAAC,UACpB,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAIK,IAAM,uBAAuB,CAAC,UAAgD;AACnF,QAAM,SAAS,EAAE,GAAG,mBAAmB,GAAG,aAAa,KAAK,EAAE;AAI9D,QAAM,gBAAgB,OAAO,kBAAkB,UAAU,IAAI;AAE7D,SAAO,EAAE,GAAG,QAAQ,cAAc,OAAO,kBAAkB,cAAc;AAC3E;;;AC9BA,SAAS,aAAa,WAAW,SAAS,QAAQ,gBAAgB;;;ACClE,IAAM,gBAAgB;AAEtB,IAAM,YAAY;AAClB,IAAM,OAAO;AAIN,IAAM,gBAAgB,CAAC,SAAqB;AACjD,QAAM,aAAa,IAAI,KAAK,IAAI;AAChC,aAAW,SAAS,MAAM,GAAG,GAAG,CAAC;AACjC,SAAO;AACT;AAEO,IAAM,YAAY,CAAC,OAAa,UACrC,MAAM,YAAY,MAAM,MAAM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;AAAA,YAEC;AAAA,YACA,YAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA,cAAc,SAAS;AAAA,YACvB;AAAA,YACA,iBAAiB,SAAS;AAAA,YAC1B,aAAa,SAAS;AAAA,YACtB;AAAA;AAAA,UATK,SAAS,OAAO,IAAI,IAAI,OAAO,KAAK;AAAA,QAU3C,CACD,GACH;AAAA,QAEC,gBACC,gBAAAA,KAACE,MAAA,EAAI,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,aAAa,UAAU,GAAI,wBAAa;AAAA;AAAA;AAAA,EAEnF;AAEJ,CAAC;AAED,SAAS,cAAc;","names":["Box","DAYS_PER_WEEK","Box","jsx","jsx","jsxs","Box","jsx","jsxs","Box"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-day-input.tsx"],"sourcesContent":["'use client';\n\n/**\n * A day bound as a MASKED `dd/mm/aaaa` text field, replacing `<input type=\"date\">`.\n *\n * The native control is three separate segments wearing one box. Typing a date\n * means filling a segment, being jumped to the next, and starting over — and\n * which segment comes first is the BROWSER's locale, not ours, so the same\n * field reads `dd/mm/aaaa` for one merchant and `mm/dd/yyyy` for the next with\n * nothing in our code saying which. There is no way to type a date as one\n * continuous run of digits, which is how people actually type dates.\n *\n * A mask gives that back: eight digits straight through, separators inserted as\n * you go, backspace walking back through them.\n *\n * Measured, driving both controls in Chromium with the same eight keystrokes\n * (`01072026`, one `keydown` at a time):\n *\n * native → field ends EMPTY, no filter applied, 0 requests\n * masked → field reads `01/07/2026`, filter applied, 1 request\n *\n * The native result is the whole complaint: you type a date and nothing lands.\n *\n * The second half of the fix is WHEN the bound is written. A partially-typed\n * year is itself a valid date — `2026` passes through `0002`, `0020`, `0202` on\n * the way — so committing on every keystroke would send the grid off to fetch\n * years nobody meant. A bound is written only once the text is a WHOLE, real\n * date, which is what keeps the run above at one request rather than four.\n */\nimport { TextField } from '@mui/material';\nimport React, { useEffect, useState } from 'react';\n\n/** `AAAA-MM-DD` (the wire) → `dd/mm/aaaa` (what the merchant reads). */\nexport function isoToBr(iso: string): string {\n const parts = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso);\n return parts ? `${parts[3]}/${parts[2]}/${parts[1]}` : '';\n}\n\n/**\n * `dd/mm/aaaa` → `AAAA-MM-DD`, but ONLY for a day that exists. `31/02/2026`\n * parses fine as three numbers and is not a date, and `Date` would silently\n * roll it into March rather than reject it — so the round trip through UTC is\n * the check: if the month or day comes back changed, the input was not a day.\n */\nexport function brToIso(text: string): string {\n const parts = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/.exec(text);\n if (!parts) return '';\n const [, dd, mm, yyyy] = parts;\n const day = Number(dd);\n const month = Number(mm);\n const year = Number(yyyy);\n if (year < 1000) return '';\n const probe = new Date(Date.UTC(year, month - 1, day));\n if (probe.getUTCMonth() !== month - 1 || probe.getUTCDate() !== day) return '';\n return `${yyyy}-${mm}-${dd}`;\n}\n\n/**\n * Digits only, capped at eight, with the separators put back as you type.\n *\n * Deriving the whole string from the digits — rather than editing the text in\n * place — is what makes backspace behave. Four digits render as `06/08`, not\n * `06/08/`, so deleting the first digit of the year removes the trailing\n * separator with it instead of leaving a dead keystroke that changes nothing.\n */\nexport function maskBrDate(raw: string): string {\n const digits = raw.replace(/\\D/g, '').slice(0, 8);\n if (digits.length <= 2) return digits;\n if (digits.length <= 4) return `${digits.slice(0, 2)}/${digits.slice(2)}`;\n return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4)}`;\n}\n\n/**\n * What has to land on the `<input>` itself rather than on the `TextField`.\n *\n * Anything `TextField` does not recognise is spread onto its root `FormControl`\n * div. `inputMode` went up there once: the attribute sat on a non-editable\n * wrapper, meant nothing, and the phone went on offering the letter keyboard\n * for a field that only takes digits (the `dd/mm/aaaa` hint under a QWERTY\n * layout). Only the `<input>` this reaches decides which keypad opens — and the\n * same is true of `aria-describedby`, which on the wrapper points at a\n * description no screen reader will read out for the field.\n *\n * `numeric` and not `tel`: both raise a keypad, but the phone one is a dialler\n * with `+ * #` on it — keys that cannot occur in a date. A paste carrying\n * separators still lands, because the MASK is what filters the text; the keypad\n * only narrows what a thumb can reach for.\n *\n * Autofill off for the same reason: the browser's saved-value strip covers the\n * keypad to suggest names and addresses, none of which are a date, and none of\n * which the mask would keep.\n */\nfunction dayInputProps(testId: string, describedBy: string | undefined) {\n return {\n 'data-testid': testId,\n maxLength: 10,\n inputMode: 'numeric' as const,\n autoComplete: 'off',\n ...(describedBy ? { 'aria-describedby': describedBy } : {}),\n };\n}\n\n/**\n * One end of a day window. The BOUND stays `AAAA-MM-DD` — the form the backend's\n * inclusive day comparison already speaks, and the form the chip label reads —\n * so only the typing surface changes.\n */\nexport function DayBoundInput({\n label,\n value,\n onChange,\n testId,\n error = false,\n describedBy,\n}: {\n label: string;\n /** The applied bound, `AAAA-MM-DD`, or undefined when this end is open. */\n value: string | undefined;\n onChange: (bound: string | undefined) => void;\n testId: string;\n /**\n * Paint the field as rejected. It only ever writes a real day by itself, so\n * this is for a caller judging the PAIR: a window whose end precedes its\n * start is two valid days and one impossible period, and the field it was\n * typed into is the only place to say which half is being complained about.\n */\n error?: boolean;\n /** Id of the element carrying that complaint, so it is read WITH the field. */\n describedBy?: string;\n}): React.JSX.Element {\n const applied = value ?? '';\n const [text, setText] = useState(() => isoToBr(applied));\n\n // The bound is the APPLIED filter; `text` is what is being typed. Re-sync only\n // when the applied value moved somewhere the text does not already mean — a\n // \"Limpar\", a saved view, the other pill resetting the pair. Without that\n // guard the field's own write bounces straight back mid-edit and resets the\n // caret, which is the native control's worst habit reproduced by hand.\n useEffect(() => {\n setText((current) => (brToIso(current) === applied ? current : isoToBr(applied)));\n }, [applied]);\n\n return (\n <TextField\n size=\"small\"\n type=\"text\"\n label={label}\n error={error}\n // The mask IS the placeholder, so the expected order is on screen before\n // the first keystroke rather than discovered by getting it wrong.\n placeholder=\"dd/mm/aaaa\"\n value={text}\n onChange={(event) => {\n const next = maskBrDate(event.target.value);\n setText(next);\n // Emptying clears the bound. A COMPLETE day applies it. A partial one\n // does NEITHER — it leaves whatever is applied alone, so typing is never\n // fought and a half-typed year never reaches the backend.\n if (next === '') return onChange(undefined);\n const iso = brToIso(next);\n if (iso) onChange(iso);\n }}\n // Leaving a half-typed (or impossible) date on screen would show a filter\n // the list is not actually using. On blur the field snaps back to what IS\n // applied; a complete date already equals it, so this only ever tidies.\n onBlur={() => setText(isoToBr(applied))}\n // The placeholder occupies the space an un-shrunk label would render into.\n InputLabelProps={{ shrink: true }}\n inputProps={dayInputProps(testId, describedBy)}\n sx={{ width: 165 }}\n />\n );\n}\n"],"mappings":";AA6BA,SAAS,iBAAiB;AAC1B,SAAgB,WAAW,gBAAgB;AAiHvC;AA9GG,SAAS,QAAQ,KAAqB;AAC3C,QAAM,QAAQ,4BAA4B,KAAK,GAAG;AAClD,SAAO,QAAQ,GAAG,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,KAAK;AACzD;AAQO,SAAS,QAAQ,MAAsB;AAC5C,QAAM,QAAQ,8BAA8B,KAAK,IAAI;AACrD,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,CAAC,EAAE,IAAI,IAAI,IAAI,IAAI;AACzB,QAAM,MAAM,OAAO,EAAE;AACrB,QAAM,QAAQ,OAAO,EAAE;AACvB,QAAM,OAAO,OAAO,IAAI;AACxB,MAAI,OAAO,IAAM,QAAO;AACxB,QAAM,QAAQ,IAAI,KAAK,KAAK,IAAI,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrD,MAAI,MAAM,YAAY,MAAM,QAAQ,KAAK,MAAM,WAAW,MAAM,IAAK,QAAO;AAC5E,SAAO,GAAG,IAAI,IAAI,EAAE,IAAI,EAAE;AAC5B;AAUO,SAAS,WAAW,KAAqB;AAC9C,QAAM,SAAS,IAAI,QAAQ,OAAO,EAAE,EAAE,MAAM,GAAG,CAAC;AAChD,MAA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