@12-apps/ui 6.7.0 → 6.9.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-3X3JVF6E.js +438 -0
- package/dist/chunk-3X3JVF6E.js.map +1 -0
- package/dist/chunk-AL3W7TXN.js +465 -0
- package/dist/chunk-AL3W7TXN.js.map +1 -0
- 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-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/DataGrid.js +1 -1
- package/dist/data-display/DataViews.js +88 -65
- 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/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/en-US.js +56 -0
- package/dist/en-US.js.map +1 -0
- 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/locales.js +171 -0
- package/dist/locales.js.map +1 -0
- 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 +42 -274
- package/dist/pt-BR.js.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 +27 -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-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/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 +12 -165
- package/dist/types/copy.d.ts.map +1 -1
- package/dist/types/en-US.d.ts +24 -0
- package/dist/types/en-US.d.ts.map +1 -0
- package/dist/types/en-US.data-display.d.ts +13 -0
- package/dist/types/en-US.data-display.d.ts.map +1 -0
- package/dist/types/en-US.feedback.d.ts +8 -0
- package/dist/types/en-US.feedback.d.ts.map +1 -0
- package/dist/types/en-US.form.d.ts +13 -0
- package/dist/types/en-US.form.d.ts.map +1 -0
- package/dist/types/en-US.layout.d.ts +7 -0
- package/dist/types/en-US.layout.d.ts.map +1 -0
- package/dist/types/en-US.navigation.d.ts +8 -0
- package/dist/types/en-US.navigation.d.ts.map +1 -0
- package/dist/types/en-US.shared.d.ts +26 -0
- package/dist/types/en-US.shared.d.ts.map +1 -0
- package/dist/types/en-US.utility.d.ts +8 -0
- package/dist/types/en-US.utility.d.ts.map +1 -0
- package/dist/types/locales.d.ts +53 -0
- package/dist/types/locales.d.ts.map +1 -0
- package/dist/types/pt-BR.d.ts +15 -22
- 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 +10 -1
- 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 +27 -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-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/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 +12 -173
- package/src/en-US.data-display.ts +244 -0
- package/src/en-US.feedback.ts +25 -0
- package/src/en-US.form.ts +103 -0
- package/src/en-US.layout.ts +15 -0
- package/src/en-US.navigation.ts +23 -0
- package/src/en-US.shared.ts +105 -0
- package/src/en-US.ts +24 -0
- package/src/en-US.utility.ts +24 -0
- package/src/locales.ts +151 -0
- 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 -307
- package/src/pt-BR.utility.ts +21 -0
- package/src/user-avatar/user-avatar.tsx +8 -2
- 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
|
@@ -7,6 +7,8 @@ import { Box, IconButton, Stack, Tooltip, Typography } from '@mui/material';
|
|
|
7
7
|
import { alpha, styled } from '@mui/material';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
+
import type { CodeEditorCopy } from '../../../copy';
|
|
11
|
+
|
|
10
12
|
// Each button repeated the same conditional test id; this is that ternary once.
|
|
11
13
|
const makeTestId =
|
|
12
14
|
(dataTestId?: string) =>
|
|
@@ -37,6 +39,7 @@ const LanguageBadge = styled(Box)(({ theme }) => ({
|
|
|
37
39
|
}));
|
|
38
40
|
|
|
39
41
|
const EditorActions: React.FC<{
|
|
42
|
+
copy: CodeEditorCopy;
|
|
40
43
|
readOnly: boolean;
|
|
41
44
|
isWrapped: boolean;
|
|
42
45
|
isCopied: boolean;
|
|
@@ -47,6 +50,7 @@ const EditorActions: React.FC<{
|
|
|
47
50
|
onWrapToggle: () => void;
|
|
48
51
|
onFullscreenToggle: () => void;
|
|
49
52
|
}> = ({
|
|
53
|
+
copy,
|
|
50
54
|
readOnly,
|
|
51
55
|
isWrapped,
|
|
52
56
|
isCopied,
|
|
@@ -62,7 +66,7 @@ const EditorActions: React.FC<{
|
|
|
62
66
|
return (
|
|
63
67
|
<Stack direction="row" spacing={1}>
|
|
64
68
|
{!readOnly && (
|
|
65
|
-
<Tooltip title=
|
|
69
|
+
<Tooltip title={copy.formatCode}>
|
|
66
70
|
<IconButton
|
|
67
71
|
size="small"
|
|
68
72
|
onClick={onFormat}
|
|
@@ -73,7 +77,7 @@ const EditorActions: React.FC<{
|
|
|
73
77
|
</Tooltip>
|
|
74
78
|
)}
|
|
75
79
|
|
|
76
|
-
<Tooltip title={isWrapped ?
|
|
80
|
+
<Tooltip title={isWrapped ? copy.disableWrap : copy.enableWrap}>
|
|
77
81
|
<IconButton
|
|
78
82
|
size="small"
|
|
79
83
|
onClick={onWrapToggle}
|
|
@@ -84,7 +88,7 @@ const EditorActions: React.FC<{
|
|
|
84
88
|
</IconButton>
|
|
85
89
|
</Tooltip>
|
|
86
90
|
|
|
87
|
-
<Tooltip title={isCopied ?
|
|
91
|
+
<Tooltip title={isCopied ? copy.copied : copy.copyToClipboard}>
|
|
88
92
|
<IconButton
|
|
89
93
|
size="small"
|
|
90
94
|
onClick={onCopy}
|
|
@@ -95,7 +99,7 @@ const EditorActions: React.FC<{
|
|
|
95
99
|
</IconButton>
|
|
96
100
|
</Tooltip>
|
|
97
101
|
|
|
98
|
-
<Tooltip title={isFullscreen ?
|
|
102
|
+
<Tooltip title={isFullscreen ? copy.exitFullscreen : copy.enterFullscreen}>
|
|
99
103
|
<IconButton
|
|
100
104
|
size="small"
|
|
101
105
|
onClick={onFullscreenToggle}
|
|
@@ -114,6 +118,7 @@ const EditorActions: React.FC<{
|
|
|
114
118
|
|
|
115
119
|
// Language badge, read-only marker and the four action buttons.
|
|
116
120
|
export const EditorToolbar: React.FC<{
|
|
121
|
+
copy: CodeEditorCopy;
|
|
117
122
|
language: string;
|
|
118
123
|
readOnly: boolean;
|
|
119
124
|
isWrapped: boolean;
|
|
@@ -125,6 +130,7 @@ export const EditorToolbar: React.FC<{
|
|
|
125
130
|
onWrapToggle: () => void;
|
|
126
131
|
onFullscreenToggle: () => void;
|
|
127
132
|
}> = ({
|
|
133
|
+
copy,
|
|
128
134
|
language,
|
|
129
135
|
readOnly,
|
|
130
136
|
isWrapped,
|
|
@@ -147,12 +153,13 @@ export const EditorToolbar: React.FC<{
|
|
|
147
153
|
</LanguageBadge>
|
|
148
154
|
{readOnly && (
|
|
149
155
|
<Typography variant="caption" color="text.secondary">
|
|
150
|
-
|
|
156
|
+
{copy.readOnly}
|
|
151
157
|
</Typography>
|
|
152
158
|
)}
|
|
153
159
|
</Stack>
|
|
154
160
|
|
|
155
161
|
<EditorActions
|
|
162
|
+
copy={copy}
|
|
156
163
|
readOnly={readOnly}
|
|
157
164
|
isWrapped={isWrapped}
|
|
158
165
|
isCopied={isCopied}
|
|
@@ -61,6 +61,8 @@ export function defaultMessages(): DateRangePickerMessages {
|
|
|
61
61
|
reversed: 'The end date must be on or after the start date.',
|
|
62
62
|
overMax: ({ maxRangeDays }) => `Choose a range of at most ${maxRangeDays} days.`,
|
|
63
63
|
summary: ({ from, to }) => `${isoToBr(from)} – ${isoToBr(to)}`,
|
|
64
|
+
calendarLabel: 'Calendar',
|
|
65
|
+
dayMask: 'dd/mm/yyyy',
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -129,6 +129,7 @@ function useMonthCount(requested: number | undefined): number | undefined {
|
|
|
129
129
|
|
|
130
130
|
/** The grid, in range mode — `Calendar`, never a second implementation of one. */
|
|
131
131
|
function RangeCalendar({
|
|
132
|
+
calendarLabel,
|
|
132
133
|
picker,
|
|
133
134
|
value,
|
|
134
135
|
locale,
|
|
@@ -142,10 +143,12 @@ function RangeCalendar({
|
|
|
142
143
|
weekStartsOn: WeekStart;
|
|
143
144
|
months: number | undefined;
|
|
144
145
|
maxRangeDays: number | undefined;
|
|
146
|
+
calendarLabel: string;
|
|
145
147
|
}): React.JSX.Element {
|
|
146
148
|
return (
|
|
147
149
|
<Calendar
|
|
148
150
|
key={picker.viewNonce}
|
|
151
|
+
ariaLabel={calendarLabel}
|
|
149
152
|
className={CALENDAR_CLASS}
|
|
150
153
|
selectionMode="range"
|
|
151
154
|
locale={locale}
|
|
@@ -223,6 +226,7 @@ export function DateRangePicker({
|
|
|
223
226
|
<Paper className={className} data-testid={dataTestId} sx={ROOT_SX}>
|
|
224
227
|
<Box sx={BODY_SX}>
|
|
225
228
|
<RangeCalendar
|
|
229
|
+
calendarLabel={picker.copy.calendarLabel}
|
|
226
230
|
picker={picker}
|
|
227
231
|
value={value}
|
|
228
232
|
locale={locale}
|
|
@@ -96,6 +96,17 @@ export interface DateRangePickerMessages {
|
|
|
96
96
|
overMax: (info: { maxRangeDays: number; days: number }) => string;
|
|
97
97
|
/** The chosen window, in words. */
|
|
98
98
|
summary: (window: DayWindow) => string;
|
|
99
|
+
/**
|
|
100
|
+
* The month grid's accessible name. The grid is a `role="application"`, so
|
|
101
|
+
* this is the only thing a screen reader announces for it.
|
|
102
|
+
*/
|
|
103
|
+
calendarLabel: string;
|
|
104
|
+
/**
|
|
105
|
+
* The two fields' mask, which IS their placeholder — the expected ORDER is
|
|
106
|
+
* on screen before the first keystroke rather than discovered by getting it
|
|
107
|
+
* wrong. `dd/mm/aaaa` is one locale's order and one locale's letters.
|
|
108
|
+
*/
|
|
109
|
+
dayMask: string;
|
|
99
110
|
}
|
|
100
111
|
|
|
101
112
|
/** Which of the three views moved the range, and what it moved it to. */
|
|
@@ -57,6 +57,7 @@ export function DateRangeFields({
|
|
|
57
57
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
|
|
58
58
|
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 2 }}>
|
|
59
59
|
<DayBoundInput
|
|
60
|
+
mask={messages.dayMask}
|
|
60
61
|
label={messages.from}
|
|
61
62
|
value={value.from ?? undefined}
|
|
62
63
|
onChange={(bound) => onEdit('from', bound ?? null)}
|
|
@@ -65,6 +66,7 @@ export function DateRangeFields({
|
|
|
65
66
|
describedBy={statusId}
|
|
66
67
|
/>
|
|
67
68
|
<DayBoundInput
|
|
69
|
+
mask={messages.dayMask}
|
|
68
70
|
label={messages.to}
|
|
69
71
|
value={value.to ?? undefined}
|
|
70
72
|
onChange={(bound) => onEdit('to', bound ?? null)}
|
|
@@ -7,6 +7,7 @@ import { MenubarSeparator } from './Menubar.separator';
|
|
|
7
7
|
import type { MenubarItem, MenubarProps } from './Menubar.types';
|
|
8
8
|
|
|
9
9
|
export interface MenubarToolbarProps {
|
|
10
|
+
ariaLabel: string;
|
|
10
11
|
barSx: CSSObject;
|
|
11
12
|
items: MenubarItem[];
|
|
12
13
|
size: NonNullable<MenubarProps['size']>;
|
|
@@ -31,6 +32,7 @@ export interface MenubarToolbarProps {
|
|
|
31
32
|
* wrapping it differs.
|
|
32
33
|
*/
|
|
33
34
|
export const MenubarToolbar: React.FC<MenubarToolbarProps> = ({
|
|
35
|
+
ariaLabel,
|
|
34
36
|
barSx,
|
|
35
37
|
items,
|
|
36
38
|
size,
|
|
@@ -53,7 +55,7 @@ export const MenubarToolbar: React.FC<MenubarToolbarProps> = ({
|
|
|
53
55
|
return (
|
|
54
56
|
<Toolbar
|
|
55
57
|
role="toolbar"
|
|
56
|
-
aria-label=
|
|
58
|
+
aria-label={ariaLabel}
|
|
57
59
|
sx={{
|
|
58
60
|
...barSx,
|
|
59
61
|
width: fullWidth ? '100%' : 'auto',
|
|
@@ -47,7 +47,7 @@ type ResolvedProps = MenubarProps & Required<Pick<MenubarProps, keyof typeof DEF
|
|
|
47
47
|
|
|
48
48
|
export const Menubar: React.FC<MenubarProps> = (props) => {
|
|
49
49
|
const {
|
|
50
|
-
items, variant, size, color, orientation, glow, pulse, glass, gradient,
|
|
50
|
+
ariaLabel, items, variant, size, color, orientation, glow, pulse, glass, gradient,
|
|
51
51
|
loading, disabled, className, style, logo, endContent, sticky, transparent,
|
|
52
52
|
blur, elevation, fullWidth, onClick, onFocus, onBlur,
|
|
53
53
|
'data-testid': dataTestId,
|
|
@@ -65,6 +65,7 @@ export const Menubar: React.FC<MenubarProps> = (props) => {
|
|
|
65
65
|
|
|
66
66
|
const content = (
|
|
67
67
|
<MenubarToolbar
|
|
68
|
+
ariaLabel={ariaLabel}
|
|
68
69
|
barSx={barSx}
|
|
69
70
|
items={items}
|
|
70
71
|
size={size}
|
|
@@ -13,6 +13,11 @@ export interface MenubarItem {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface MenubarProps {
|
|
16
|
+
/**
|
|
17
|
+
* The bar's accessible name. REQUIRED: it is a `role="toolbar"` whose items
|
|
18
|
+
* are the host's own, so only the host can say what this bar navigates.
|
|
19
|
+
*/
|
|
20
|
+
ariaLabel: string;
|
|
16
21
|
items: MenubarItem[];
|
|
17
22
|
variant?: 'default' | 'glass' | 'gradient' | 'elevated' | 'minimal' | 'bordered';
|
|
18
23
|
size?: SizeValue;
|
|
@@ -4,6 +4,7 @@ import WarningIcon from '@mui/icons-material/Warning';
|
|
|
4
4
|
import { Box, Typography } from '@mui/material';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
+
import type { PasswordRequirementCopy, PasswordStrengthCopy } from '../../../copy';
|
|
7
8
|
import type { PasswordRequirements } from './PasswordStrength.types';
|
|
8
9
|
|
|
9
10
|
export const defaultRequirements: PasswordRequirements = {
|
|
@@ -72,15 +73,19 @@ export const calculatePasswordStrength = (
|
|
|
72
73
|
return Math.min(earned + lengthBonus(password.length), 100);
|
|
73
74
|
};
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
[
|
|
79
|
-
[
|
|
76
|
+
// The four ceilings, and which band each one names. The band NAMES come from
|
|
77
|
+
// the host's table — only the thresholds are ours.
|
|
78
|
+
const STRENGTH_BANDS: ReadonlyArray<[number, keyof PasswordStrengthCopy['bands']]> = [
|
|
79
|
+
[20, 'veryWeak'],
|
|
80
|
+
[40, 'weak'],
|
|
81
|
+
[60, 'fair'],
|
|
82
|
+
[80, 'good'],
|
|
80
83
|
];
|
|
81
84
|
|
|
82
|
-
export const getStrengthLabel = (
|
|
83
|
-
|
|
85
|
+
export const getStrengthLabel = (
|
|
86
|
+
strength: number,
|
|
87
|
+
bands: PasswordStrengthCopy['bands'],
|
|
88
|
+
): string => bands[STRENGTH_BANDS.find(([ceiling]) => strength <= ceiling)?.[1] ?? 'strong'];
|
|
84
89
|
|
|
85
90
|
export const getStrengthIcon = (strength: number) => {
|
|
86
91
|
if (strength <= 40) return <WarningIcon />;
|
|
@@ -88,23 +93,34 @@ export const getStrengthIcon = (strength: number) => {
|
|
|
88
93
|
return <SuccessIcon />;
|
|
89
94
|
};
|
|
90
95
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
['
|
|
95
|
-
['
|
|
96
|
-
['
|
|
96
|
+
// One tip per unmet requirement, in checklist order. The `length` tip carries
|
|
97
|
+
// the configured minimum, so the number in the sentence is the one enforced.
|
|
98
|
+
const SUGGESTION_KEYS: ReadonlyArray<[keyof RequirementChecks, keyof PasswordRequirementCopy]> = [
|
|
99
|
+
['length', 'minLength'],
|
|
100
|
+
['uppercase', 'uppercase'],
|
|
101
|
+
['lowercase', 'lowercase'],
|
|
102
|
+
['numbers', 'numbers'],
|
|
103
|
+
['special', 'special'],
|
|
97
104
|
];
|
|
98
105
|
|
|
99
|
-
export const buildSuggestions = (
|
|
100
|
-
|
|
106
|
+
export const buildSuggestions = (
|
|
107
|
+
checks: RequirementChecks,
|
|
108
|
+
copy: PasswordRequirementCopy,
|
|
109
|
+
minLength: number,
|
|
110
|
+
): string[] =>
|
|
111
|
+
SUGGESTION_KEYS.filter(([check]) => !checks[check]).map(([, key]) =>
|
|
112
|
+
key === 'minLength' ? copy.minLength(minLength) : copy[key],
|
|
113
|
+
);
|
|
101
114
|
|
|
102
115
|
// Rendered by PasswordStrength; depends on nothing styled, so it lives beside
|
|
103
116
|
// the pure helpers rather than in the component file.
|
|
104
|
-
export const SuggestionsList: React.FC<{ suggestions: string[] }> = ({
|
|
117
|
+
export const SuggestionsList: React.FC<{ suggestions: string[]; heading: string }> = ({
|
|
118
|
+
suggestions,
|
|
119
|
+
heading,
|
|
120
|
+
}) => (
|
|
105
121
|
<Box>
|
|
106
122
|
<Typography variant="caption" color="text.secondary" fontWeight="medium">
|
|
107
|
-
|
|
123
|
+
{heading}
|
|
108
124
|
</Typography>
|
|
109
125
|
<Box sx={{ mt: 1 }}>
|
|
110
126
|
{suggestions.map((tip) => (
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
getStrengthLabel,
|
|
26
26
|
SuggestionsList } from './PasswordStrength.helpers';
|
|
27
27
|
import type { PasswordRequirements, PasswordStrengthProps } from './PasswordStrength.types';
|
|
28
|
+
import type { PasswordStrengthCopy } from '../../../copy';
|
|
28
29
|
|
|
29
30
|
interface RequirementIconProps {
|
|
30
31
|
met: boolean;
|
|
@@ -217,18 +218,19 @@ const StrengthIndicator: React.FC<{
|
|
|
217
218
|
};
|
|
218
219
|
|
|
219
220
|
const StrengthHeading: React.FC<{
|
|
221
|
+
copy: PasswordStrengthCopy;
|
|
220
222
|
strength: number;
|
|
221
223
|
hasValue: boolean;
|
|
222
224
|
animated: boolean;
|
|
223
|
-
}> = ({ strength, hasValue, animated }) => (
|
|
225
|
+
}> = ({ copy, strength, hasValue, animated }) => (
|
|
224
226
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
225
227
|
<Typography variant="body2" color="text.secondary">
|
|
226
|
-
|
|
228
|
+
{copy.strengthHeading}
|
|
227
229
|
</Typography>
|
|
228
230
|
{hasValue && (
|
|
229
231
|
<Fade in={true}>
|
|
230
232
|
<StrengthLabel
|
|
231
|
-
label={getStrengthLabel(strength)}
|
|
233
|
+
label={getStrengthLabel(strength, copy.bands)}
|
|
232
234
|
icon={getStrengthIcon(strength)}
|
|
233
235
|
size="small"
|
|
234
236
|
strength={strength}
|
|
@@ -242,22 +244,23 @@ const StrengthHeading: React.FC<{
|
|
|
242
244
|
// One row per enabled requirement. Previously five near-identical JSX blocks,
|
|
243
245
|
// each with its own `requirements.x &&` guard.
|
|
244
246
|
const RequirementsList: React.FC<{
|
|
247
|
+
copy: PasswordStrengthCopy;
|
|
245
248
|
requirements: PasswordRequirements;
|
|
246
249
|
checks: RequirementChecks;
|
|
247
250
|
animated: boolean;
|
|
248
|
-
}> = ({ requirements, checks, animated }) => {
|
|
251
|
+
}> = ({ copy, requirements, checks, animated }) => {
|
|
249
252
|
const rows: ReadonlyArray<[unknown, keyof RequirementChecks, React.ReactNode]> = [
|
|
250
|
-
[requirements.minLength, 'length',
|
|
251
|
-
[requirements.uppercase, 'uppercase',
|
|
252
|
-
[requirements.lowercase, 'lowercase',
|
|
253
|
-
[requirements.numbers, 'numbers',
|
|
254
|
-
[requirements.special, 'special',
|
|
253
|
+
[requirements.minLength, 'length', copy.requirements.minLength(requirements.minLength ?? 0)],
|
|
254
|
+
[requirements.uppercase, 'uppercase', copy.requirements.uppercase],
|
|
255
|
+
[requirements.lowercase, 'lowercase', copy.requirements.lowercase],
|
|
256
|
+
[requirements.numbers, 'numbers', copy.requirements.numbers],
|
|
257
|
+
[requirements.special, 'special', copy.requirements.special],
|
|
255
258
|
];
|
|
256
259
|
|
|
257
260
|
return (
|
|
258
261
|
<Stack spacing={1}>
|
|
259
262
|
<Typography variant="caption" color="text.secondary" fontWeight="medium">
|
|
260
|
-
|
|
263
|
+
{copy.requirementsHeading}
|
|
261
264
|
</Typography>
|
|
262
265
|
{rows
|
|
263
266
|
.filter(([enabled]) => Boolean(enabled))
|
|
@@ -277,6 +280,7 @@ const RequirementsList: React.FC<{
|
|
|
277
280
|
const PasswordStrengthBody: React.FC<{
|
|
278
281
|
value: string;
|
|
279
282
|
strength: number;
|
|
283
|
+
copy: PasswordStrengthCopy;
|
|
280
284
|
requirements: PasswordRequirements;
|
|
281
285
|
requirementChecks: RequirementChecks;
|
|
282
286
|
suggestions: string[];
|
|
@@ -286,6 +290,7 @@ const PasswordStrengthBody: React.FC<{
|
|
|
286
290
|
variant: PasswordStrengthProps['variant'];
|
|
287
291
|
animated: boolean;
|
|
288
292
|
}> = ({
|
|
293
|
+
copy,
|
|
289
294
|
value,
|
|
290
295
|
strength,
|
|
291
296
|
requirements,
|
|
@@ -298,7 +303,12 @@ const PasswordStrengthBody: React.FC<{
|
|
|
298
303
|
animated }) => (
|
|
299
304
|
<Stack spacing={2}>
|
|
300
305
|
{showStrengthLabel && (
|
|
301
|
-
<StrengthHeading
|
|
306
|
+
<StrengthHeading
|
|
307
|
+
copy={copy}
|
|
308
|
+
strength={strength}
|
|
309
|
+
hasValue={value.length > 0}
|
|
310
|
+
animated={animated}
|
|
311
|
+
/>
|
|
302
312
|
)}
|
|
303
313
|
|
|
304
314
|
<StrengthIndicator variant={variant} strength={strength} animated={animated} />
|
|
@@ -306,6 +316,7 @@ const PasswordStrengthBody: React.FC<{
|
|
|
306
316
|
{showRequirements && (
|
|
307
317
|
<Fade in={value.length > 0}>
|
|
308
318
|
<RequirementsList
|
|
319
|
+
copy={copy}
|
|
309
320
|
requirements={requirements}
|
|
310
321
|
checks={requirementChecks}
|
|
311
322
|
animated={animated}
|
|
@@ -315,7 +326,7 @@ const PasswordStrengthBody: React.FC<{
|
|
|
315
326
|
|
|
316
327
|
{showSuggestions && suggestions.length > 0 && value.length > 0 && (
|
|
317
328
|
<Fade in={true}>
|
|
318
|
-
<SuggestionsList suggestions={suggestions} />
|
|
329
|
+
<SuggestionsList suggestions={suggestions} heading={copy.suggestionsHeading} />
|
|
319
330
|
</Fade>
|
|
320
331
|
)}
|
|
321
332
|
</Stack>
|
|
@@ -323,6 +334,7 @@ const PasswordStrengthBody: React.FC<{
|
|
|
323
334
|
|
|
324
335
|
// Main component
|
|
325
336
|
export const PasswordStrength: FC<PasswordStrengthProps> = ({
|
|
337
|
+
copy,
|
|
326
338
|
value = '',
|
|
327
339
|
showRequirements = true,
|
|
328
340
|
requirements = defaultRequirements,
|
|
@@ -342,11 +354,15 @@ export const PasswordStrength: FC<PasswordStrengthProps> = ({
|
|
|
342
354
|
[value, requirements],
|
|
343
355
|
);
|
|
344
356
|
|
|
345
|
-
const suggestions = useMemo(
|
|
357
|
+
const suggestions = useMemo(
|
|
358
|
+
() => buildSuggestions(requirementChecks, copy.suggestions, requirements.minLength ?? 0),
|
|
359
|
+
[requirementChecks, copy.suggestions, requirements.minLength],
|
|
360
|
+
);
|
|
346
361
|
|
|
347
362
|
return (
|
|
348
363
|
<StrengthContainer animated={animated} data-testid={dataTestId}>
|
|
349
364
|
<PasswordStrengthBody
|
|
365
|
+
copy={copy}
|
|
350
366
|
value={value}
|
|
351
367
|
strength={strength}
|
|
352
368
|
requirements={requirements}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PasswordStrengthCopy } from '../../../copy';
|
|
2
|
+
|
|
1
3
|
export interface PasswordRequirements {
|
|
2
4
|
minLength?: number;
|
|
3
5
|
uppercase?: boolean;
|
|
@@ -7,6 +9,13 @@ export interface PasswordRequirements {
|
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export interface PasswordStrengthProps {
|
|
12
|
+
/**
|
|
13
|
+
* Every word the meter renders: the three headings, the five strength bands,
|
|
14
|
+
* the checklist and the tips. REQUIRED: this package ships no default copy,
|
|
15
|
+
* and eighteen sentences is exactly the size that used to make an English
|
|
16
|
+
* default look like a component and not like a leak.
|
|
17
|
+
*/
|
|
18
|
+
copy: PasswordStrengthCopy;
|
|
10
19
|
value: string;
|
|
11
20
|
showRequirements?: boolean;
|
|
12
21
|
requirements?: PasswordRequirements;
|
|
@@ -18,6 +18,7 @@ import React, { } from 'react';
|
|
|
18
18
|
import { countries } from './countries';
|
|
19
19
|
import { usePhoneInput } from './PhoneInput.hooks';
|
|
20
20
|
import type { CountryData,PhoneInputProps } from './PhoneInput.types';
|
|
21
|
+
import type { PhoneInputCopy } from '../../../copy';
|
|
21
22
|
|
|
22
23
|
// Country data with expanded support
|
|
23
24
|
|
|
@@ -81,8 +82,10 @@ const PhoneField: React.FC<{
|
|
|
81
82
|
onBlur: () => void;
|
|
82
83
|
onCountryOpen: (event: React.MouseEvent<HTMLElement>) => void;
|
|
83
84
|
onCountryOpenViaKeyboard: (element: HTMLElement) => void;
|
|
85
|
+
copy: PhoneInputCopy;
|
|
84
86
|
}> = ({
|
|
85
87
|
TextFieldComponent,
|
|
88
|
+
copy,
|
|
86
89
|
variant,
|
|
87
90
|
label,
|
|
88
91
|
placeholder,
|
|
@@ -118,6 +121,7 @@ const PhoneField: React.FC<{
|
|
|
118
121
|
InputProps={{
|
|
119
122
|
startAdornment: (
|
|
120
123
|
<CountryAdornment
|
|
124
|
+
selectCountryLabel={copy.selectCountry}
|
|
121
125
|
country={selectedCountry}
|
|
122
126
|
menuOpen={Boolean(anchorEl)}
|
|
123
127
|
onOpen={onCountryOpen}
|
|
@@ -157,12 +161,13 @@ const CountryAdornment: React.FC<{
|
|
|
157
161
|
menuOpen: boolean;
|
|
158
162
|
onOpen: (event: React.MouseEvent<HTMLElement>) => void;
|
|
159
163
|
onOpenViaKeyboard: (element: HTMLElement) => void;
|
|
160
|
-
|
|
164
|
+
selectCountryLabel: string;
|
|
165
|
+
}> = ({ country, menuOpen, onOpen, onOpenViaKeyboard, selectCountryLabel }) => (
|
|
161
166
|
<InputAdornment position="start" data-testid="phone-input-start-adornment">
|
|
162
167
|
<CountrySelector
|
|
163
168
|
onClick={onOpen}
|
|
164
169
|
role="button"
|
|
165
|
-
aria-label=
|
|
170
|
+
aria-label={selectCountryLabel}
|
|
166
171
|
aria-expanded={menuOpen}
|
|
167
172
|
tabIndex={0}
|
|
168
173
|
data-testid="country-selector"
|
|
@@ -267,7 +272,8 @@ const resolveValidation = ({
|
|
|
267
272
|
value,
|
|
268
273
|
isFocused,
|
|
269
274
|
helper,
|
|
270
|
-
countryName
|
|
275
|
+
countryName,
|
|
276
|
+
copy }: {
|
|
271
277
|
error: boolean;
|
|
272
278
|
errorMessage?: string;
|
|
273
279
|
isValid: boolean;
|
|
@@ -275,6 +281,7 @@ const resolveValidation = ({
|
|
|
275
281
|
isFocused: boolean;
|
|
276
282
|
helper?: React.ReactNode;
|
|
277
283
|
countryName?: string;
|
|
284
|
+
copy: PhoneInputCopy;
|
|
278
285
|
}) => {
|
|
279
286
|
const looksInvalid = !isValid && value !== '' && !isFocused;
|
|
280
287
|
|
|
@@ -282,10 +289,11 @@ const resolveValidation = ({
|
|
|
282
289
|
hasError: error || looksInvalid,
|
|
283
290
|
helperText:
|
|
284
291
|
errorMessage ||
|
|
285
|
-
(looksInvalid ?
|
|
292
|
+
(looksInvalid ? copy.invalidNumber(countryName || copy.unknownCountry) : helper) };
|
|
286
293
|
};
|
|
287
294
|
|
|
288
295
|
export const PhoneInput: FC<PhoneInputProps> = (props) => {
|
|
296
|
+
const { copy } = props;
|
|
289
297
|
const {
|
|
290
298
|
variant,
|
|
291
299
|
label,
|
|
@@ -322,13 +330,15 @@ export const PhoneInput: FC<PhoneInputProps> = (props) => {
|
|
|
322
330
|
value,
|
|
323
331
|
isFocused,
|
|
324
332
|
helper,
|
|
325
|
-
countryName: selectedCountry?.name
|
|
333
|
+
countryName: selectedCountry?.name,
|
|
334
|
+
copy });
|
|
326
335
|
|
|
327
336
|
const TextFieldComponent = variant === 'glass' ? GlassTextField : TextField;
|
|
328
337
|
|
|
329
338
|
return (
|
|
330
339
|
<Box data-testid="phone-input-container">
|
|
331
340
|
<PhoneField
|
|
341
|
+
copy={copy}
|
|
332
342
|
TextFieldComponent={TextFieldComponent}
|
|
333
343
|
variant={variant}
|
|
334
344
|
label={floating ? undefined : label}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
import type { PhoneInputCopy } from '../../../copy';
|
|
2
3
|
|
|
3
4
|
export interface PhoneInputProps {
|
|
5
|
+
/**
|
|
6
|
+
* Every word this field renders on its own account — the picker's accessible
|
|
7
|
+
* name and the invalid-number sentence. REQUIRED: this package ships no
|
|
8
|
+
* default copy, and the shopper reads both at the checkout.
|
|
9
|
+
*/
|
|
10
|
+
copy: PhoneInputCopy;
|
|
4
11
|
variant?: 'glass' | 'outlined' | 'filled';
|
|
5
12
|
label?: string;
|
|
6
13
|
placeholder?: string;
|
|
@@ -208,6 +208,7 @@ export function ResultRow(props: {
|
|
|
208
208
|
/** The "see all results — Press ENTER" footer row. */
|
|
209
209
|
export function SubmitAllFooter(props: {
|
|
210
210
|
label: string;
|
|
211
|
+
keyLabel: string;
|
|
211
212
|
selected: boolean;
|
|
212
213
|
onSelect: () => void;
|
|
213
214
|
onHover: () => void;
|
|
@@ -226,7 +227,7 @@ export function SubmitAllFooter(props: {
|
|
|
226
227
|
{props.label}
|
|
227
228
|
</Typography>
|
|
228
229
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, color: 'text.secondary' }}>
|
|
229
|
-
<Typography variant="caption">
|
|
230
|
+
<Typography variant="caption">{props.keyLabel}</Typography>
|
|
230
231
|
<KeyboardReturnIcon sx={{ fontSize: 14 }} />
|
|
231
232
|
</Box>
|
|
232
233
|
</ListItemButton>
|
|
@@ -245,6 +246,7 @@ export interface BodyView<T> {
|
|
|
245
246
|
activeIndex: number;
|
|
246
247
|
trimmed: string;
|
|
247
248
|
submitAllLabel: (q: string) => string;
|
|
249
|
+
submitKeyLabel: string;
|
|
248
250
|
getKey: (item: T) => string;
|
|
249
251
|
getPrimary: (item: T) => string;
|
|
250
252
|
getSecondary?: (item: T) => string | undefined;
|
|
@@ -293,6 +295,7 @@ export function PaletteBody<T>(view: BodyView<T>): React.JSX.Element | null {
|
|
|
293
295
|
{view.showFooter && (
|
|
294
296
|
<SubmitAllFooter
|
|
295
297
|
label={view.submitAllLabel(view.trimmed)}
|
|
298
|
+
keyLabel={view.submitKeyLabel}
|
|
296
299
|
selected={view.activeIndex === view.footerIndex}
|
|
297
300
|
onSelect={() => view.onSubmitAll?.(view.trimmed)}
|
|
298
301
|
onHover={() => view.setActiveIndex(view.footerIndex)}
|
|
@@ -50,12 +50,14 @@ function resolveOpts<T>(props: SearchPaletteProps<T>): {
|
|
|
50
50
|
/** String / label defaults. */
|
|
51
51
|
function resolveText<T>(props: SearchPaletteProps<T>): {
|
|
52
52
|
submitAllLabel: (q: string) => string;
|
|
53
|
+
submitKeyLabel: string;
|
|
53
54
|
noResultsLabel: string;
|
|
54
55
|
placeholder: string;
|
|
55
56
|
dataTestId: string;
|
|
56
57
|
} {
|
|
57
58
|
return {
|
|
58
59
|
submitAllLabel: props.submitAllLabel,
|
|
60
|
+
submitKeyLabel: props.submitKeyLabel,
|
|
59
61
|
noResultsLabel: props.noResultsLabel,
|
|
60
62
|
placeholder: props.placeholder,
|
|
61
63
|
dataTestId: props.dataTestId ?? 'search-palette',
|
|
@@ -130,7 +132,8 @@ export function SearchPalette<T>(props: SearchPaletteProps<T>): React.JSX.Elemen
|
|
|
130
132
|
hasQuery={hasQuery} emptyQueryContent={props.emptyQueryContent} visible={visible}
|
|
131
133
|
isLoading={opts.isLoading} noResultsLabel={text.noResultsLabel} showFooter={showFooter}
|
|
132
134
|
footerIndex={footerIndex} activeIndex={activeIndex} trimmed={trimmed}
|
|
133
|
-
submitAllLabel={text.submitAllLabel}
|
|
135
|
+
submitAllLabel={text.submitAllLabel} submitKeyLabel={text.submitKeyLabel}
|
|
136
|
+
getKey={props.getKey} getPrimary={props.getPrimary}
|
|
134
137
|
getSecondary={props.getSecondary} getLead={props.getLead} getTrailing={props.getTrailing}
|
|
135
138
|
onSelect={props.onSelect} onSubmitAll={props.onSubmitAll} setActiveIndex={setActiveIndex}
|
|
136
139
|
/>
|
|
@@ -56,6 +56,12 @@ export interface SearchPaletteProps<T> {
|
|
|
56
56
|
onSubmitAll?: (query: string) => void;
|
|
57
57
|
/** Footer label builder; defaults to `Todos os resultados para "{q}"`. */
|
|
58
58
|
submitAllLabel: (query: string) => string;
|
|
59
|
+
/**
|
|
60
|
+
* The key legend beside the footer's return glyph. A key's printed name is
|
|
61
|
+
* not universal — an `ABNT2` keyboard says `Enter`, an `ISO` one may not —
|
|
62
|
+
* so the host names the key its own users are looking at.
|
|
63
|
+
*/
|
|
64
|
+
submitKeyLabel: string;
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
67
|
* Content shown when the query is empty (e.g. a "Populares" block). Keeps the
|
|
@@ -200,6 +200,10 @@ export const Textarea: React.FC<TextareaProps> = (textareaProps) => {
|
|
|
200
200
|
...props
|
|
201
201
|
} = { ...TEXTAREA_DEFAULTS, ...definedProps(textareaProps) };
|
|
202
202
|
|
|
203
|
+
// Read off the props rather than the merged object: the spread widens every
|
|
204
|
+
// key to optional, which would lose what the variant union already proved.
|
|
205
|
+
const { richEditorCopy } = textareaProps;
|
|
206
|
+
|
|
203
207
|
const [richTextValue, setRichTextValue] = useState('');
|
|
204
208
|
const hasIcon = Boolean(icon);
|
|
205
209
|
const testId = dataTestId || dataTestIdCamelCase;
|
|
@@ -213,10 +217,11 @@ export const Textarea: React.FC<TextareaProps> = (textareaProps) => {
|
|
|
213
217
|
[iconPosition === 'start' ? 'paddingLeft' : 'paddingRight']: ICON_GUTTER }) };
|
|
214
218
|
|
|
215
219
|
// If rich text variant, use the rich text editor
|
|
216
|
-
if (variant === 'rich') {
|
|
220
|
+
if (variant === 'rich' && richEditorCopy) {
|
|
217
221
|
return (
|
|
218
222
|
<TextareaShell testId={testId} label={label} glassLabel={glassLabel} error={error} helperText={helperText}>
|
|
219
223
|
<TextareaRichEditor
|
|
224
|
+
copy={richEditorCopy}
|
|
220
225
|
value={richTextValue}
|
|
221
226
|
onChange={setRichTextValue}
|
|
222
227
|
placeholder={props.placeholder}
|