@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
|
@@ -76,6 +76,7 @@ const VIEWS: Record<string, FC<TimingViewProps>> = {
|
|
|
76
76
|
|
|
77
77
|
// Main component
|
|
78
78
|
export const TimingDiagram: FC<TimingDiagramProps> = ({
|
|
79
|
+
copy,
|
|
79
80
|
data,
|
|
80
81
|
showLabels = true,
|
|
81
82
|
height = 40,
|
|
@@ -88,9 +89,9 @@ export const TimingDiagram: FC<TimingDiagramProps> = ({
|
|
|
88
89
|
const View = VIEWS[variant];
|
|
89
90
|
|
|
90
91
|
return (
|
|
91
|
-
<DiagramContainer elevation={2} role="region" aria-label=
|
|
92
|
+
<DiagramContainer elevation={2} role="region" aria-label={copy.regionLabel} tabIndex={0}>
|
|
92
93
|
<Typography variant="h6" fontWeight="bold" gutterBottom>
|
|
93
|
-
|
|
94
|
+
{copy.heading}
|
|
94
95
|
</Typography>
|
|
95
96
|
|
|
96
97
|
{View && (
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TimingDiagramCopy } from '../../../copy';
|
|
1
2
|
// Types
|
|
2
3
|
export interface TimingData {
|
|
3
4
|
dns?: number;
|
|
@@ -9,6 +10,8 @@ export interface TimingData {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export interface TimingDiagramProps {
|
|
13
|
+
/** The region's accessible name and its visible heading. REQUIRED. */
|
|
14
|
+
copy: TimingDiagramCopy;
|
|
12
15
|
data: TimingData;
|
|
13
16
|
showLabels?: boolean;
|
|
14
17
|
color?: string;
|
|
@@ -71,7 +71,16 @@ const trackPromiseWithToasts = async <T,>(
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
export const SonnerProvider: React.FC<{
|
|
74
|
+
export const SonnerProvider: React.FC<{
|
|
75
|
+
children: React.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* The dismiss button's accessible name, for every toast this provider
|
|
78
|
+
* raises. REQUIRED and mounted ONCE — the shortcut helpers
|
|
79
|
+
* (`sonner.success(…)`) take a message and nothing else by design, so the
|
|
80
|
+
* word cannot be a per-call argument without changing what they are for.
|
|
81
|
+
*/
|
|
82
|
+
dismissLabel: string;
|
|
83
|
+
}> = ({ children, dismissLabel }) => {
|
|
75
84
|
const [toasts, setToasts] = useState<SonnerItem[]>([]);
|
|
76
85
|
const toastCounter = useRef(0);
|
|
77
86
|
|
|
@@ -106,7 +115,7 @@ export const SonnerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
|
|
|
106
115
|
const makeShortcut = useCallback(
|
|
107
116
|
(type: SonnerProps['type'], extra?: Partial<SonnerProps>) =>
|
|
108
117
|
(message: React.ReactNode, options?: Partial<SonnerProps>) =>
|
|
109
|
-
addToast({ ...options, ...extra, title: message }, type),
|
|
118
|
+
addToast({ dismissLabel, ...options, ...extra, title: message }, type),
|
|
110
119
|
[addToast],
|
|
111
120
|
);
|
|
112
121
|
|
|
@@ -306,4 +315,7 @@ export const Toaster: React.FC<{
|
|
|
306
315
|
expand?: boolean;
|
|
307
316
|
richColors?: boolean;
|
|
308
317
|
closeButton?: boolean;
|
|
309
|
-
|
|
318
|
+
dismissLabel: string;
|
|
319
|
+
}> = ({ children, dismissLabel }) => (
|
|
320
|
+
<SonnerProvider dismissLabel={dismissLabel}>{children}</SonnerProvider>
|
|
321
|
+
);
|
|
@@ -4,6 +4,8 @@ export type SonnerVariant = 'default' | 'glass' | 'minimal';
|
|
|
4
4
|
export type SonnerType = 'default' | 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
5
5
|
|
|
6
6
|
export interface SonnerProps {
|
|
7
|
+
/** The dismiss button's accessible name — it carries a glyph only. REQUIRED. */
|
|
8
|
+
dismissLabel: string;
|
|
7
9
|
id?: string;
|
|
8
10
|
title?: ReactNode;
|
|
9
11
|
description?: ReactNode;
|
|
@@ -153,6 +153,7 @@ export const SonnerToast: React.FC<SonnerItem & { onDismiss: (id: string) => voi
|
|
|
153
153
|
type = 'default',
|
|
154
154
|
variant = 'default',
|
|
155
155
|
closable = true,
|
|
156
|
+
dismissLabel,
|
|
156
157
|
action,
|
|
157
158
|
cancel,
|
|
158
159
|
icon,
|
|
@@ -198,7 +199,7 @@ export const SonnerToast: React.FC<SonnerItem & { onDismiss: (id: string) => voi
|
|
|
198
199
|
<IconButton
|
|
199
200
|
size="small"
|
|
200
201
|
onClick={handleDismiss}
|
|
201
|
-
aria-label=
|
|
202
|
+
aria-label={dismissLabel}
|
|
202
203
|
sx={{
|
|
203
204
|
ml: 'auto',
|
|
204
205
|
color: 'text.secondary',
|
|
@@ -121,6 +121,8 @@ interface ModalHeaderProps {
|
|
|
121
121
|
/** Deeper than the first panel, so the leading button goes back instead of closing. */
|
|
122
122
|
canGoBack: boolean;
|
|
123
123
|
onBack: () => void;
|
|
124
|
+
/** The back arrow's accessible name — it carries a glyph only. REQUIRED. */
|
|
125
|
+
backLabel: string;
|
|
124
126
|
onClose: () => void;
|
|
125
127
|
/** Renders the bar without its ✕ — the panel's content owns the dismiss. */
|
|
126
128
|
hideClose?: boolean;
|
|
@@ -135,15 +137,18 @@ interface ModalHeaderProps {
|
|
|
135
137
|
* all when the panel's content carries its own ✕ (`hideClose`).
|
|
136
138
|
*/
|
|
137
139
|
const HeaderLeadingButton: FC<
|
|
138
|
-
Pick<
|
|
139
|
-
|
|
140
|
+
Pick<
|
|
141
|
+
ModalHeaderProps,
|
|
142
|
+
'canGoBack' | 'onBack' | 'backLabel' | 'onClose' | 'hideClose' | 'rtl' | 'dataTestId'
|
|
143
|
+
>
|
|
144
|
+
> = ({ canGoBack, onBack, backLabel, onClose, hideClose, rtl, dataTestId }) => {
|
|
140
145
|
if (canGoBack) {
|
|
141
146
|
return (
|
|
142
147
|
<IconButton
|
|
143
148
|
edge="start"
|
|
144
149
|
color="inherit"
|
|
145
150
|
onClick={onBack}
|
|
146
|
-
aria-label=
|
|
151
|
+
aria-label={backLabel}
|
|
147
152
|
size="small"
|
|
148
153
|
sx={{ transform: rtl ? 'rotate(180deg)' : 'none' }}
|
|
149
154
|
data-testid={testId(dataTestId, 'back-button')}
|
|
@@ -174,6 +179,7 @@ export const ModalHeader: FC<ModalHeaderProps> = ({
|
|
|
174
179
|
onBack,
|
|
175
180
|
onClose,
|
|
176
181
|
hideClose,
|
|
182
|
+
backLabel,
|
|
177
183
|
headerActions,
|
|
178
184
|
rtl,
|
|
179
185
|
dataTestId,
|
|
@@ -183,6 +189,7 @@ export const ModalHeader: FC<ModalHeaderProps> = ({
|
|
|
183
189
|
<HeaderLeadingButton
|
|
184
190
|
canGoBack={canGoBack}
|
|
185
191
|
onBack={onBack}
|
|
192
|
+
backLabel={backLabel}
|
|
186
193
|
onClose={onClose}
|
|
187
194
|
hideClose={hideClose}
|
|
188
195
|
rtl={rtl}
|
|
@@ -59,7 +59,7 @@ type ResolvedProps = StackedModalProps & { modalId: string };
|
|
|
59
59
|
|
|
60
60
|
const StackedModalPanel: FC<ResolvedProps> = (props) => {
|
|
61
61
|
const {
|
|
62
|
-
open, onClose, glass, navigationTitle, hideClose, children, actions, modalId,
|
|
62
|
+
open, onClose, glass, navigationTitle, backLabel, hideClose, children, actions, modalId,
|
|
63
63
|
closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, disableBackdrop,
|
|
64
64
|
disableFocusTrap, keepMounted, rtl, dataTestId,
|
|
65
65
|
'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps
|
|
@@ -105,6 +105,7 @@ const StackedModalPanel: FC<ResolvedProps> = (props) => {
|
|
|
105
105
|
{...otherProps}
|
|
106
106
|
>
|
|
107
107
|
<ModalPanelContents
|
|
108
|
+
backLabel={backLabel}
|
|
108
109
|
showSkeleton={showSkeleton}
|
|
109
110
|
loadingText={loadingText}
|
|
110
111
|
titleId={titleId}
|
|
@@ -7,6 +7,8 @@ export type ModalPanelRole = 'primary' | 'secondary' | 'background';
|
|
|
7
7
|
export type PanelMaxWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
8
8
|
|
|
9
9
|
export interface StackedModalProps {
|
|
10
|
+
/** The back arrow's accessible name — it carries a glyph only. REQUIRED. */
|
|
11
|
+
backLabel: string;
|
|
10
12
|
/** Controls the visibility of the modal */
|
|
11
13
|
open: boolean;
|
|
12
14
|
/** Callback fired when the component requests to be closed */
|
|
@@ -202,7 +202,16 @@ const TutorialTooltip: React.FC<{
|
|
|
202
202
|
showProgress: boolean;
|
|
203
203
|
animated: boolean;
|
|
204
204
|
requiresActionBeforeNext: boolean;
|
|
205
|
-
|
|
205
|
+
copy: TutorialOverlayProps['copy'];
|
|
206
|
+
}> = ({
|
|
207
|
+
tutorial,
|
|
208
|
+
steps,
|
|
209
|
+
allowSkip,
|
|
210
|
+
showProgress,
|
|
211
|
+
animated,
|
|
212
|
+
requiresActionBeforeNext,
|
|
213
|
+
copy,
|
|
214
|
+
}) => (
|
|
206
215
|
<Fade in={tutorial.isVisible} timeout={300}>
|
|
207
216
|
<TooltipContainer
|
|
208
217
|
ref={tutorial.tooltipRef}
|
|
@@ -218,6 +227,7 @@ const TutorialTooltip: React.FC<{
|
|
|
218
227
|
data-testid={`tutorial-step-${tutorial.currentStep}`}
|
|
219
228
|
>
|
|
220
229
|
<TutorialStepBody
|
|
230
|
+
copy={copy}
|
|
221
231
|
step={tutorial.currentStepData}
|
|
222
232
|
currentStep={tutorial.currentStep}
|
|
223
233
|
stepCount={steps.length}
|
|
@@ -237,6 +247,7 @@ const TutorialTooltip: React.FC<{
|
|
|
237
247
|
|
|
238
248
|
export const TutorialOverlay: FC<TutorialOverlayProps> = (componentProps) => {
|
|
239
249
|
const {
|
|
250
|
+
copy,
|
|
240
251
|
steps,
|
|
241
252
|
onComplete,
|
|
242
253
|
onSkip,
|
|
@@ -280,6 +291,7 @@ export const TutorialOverlay: FC<TutorialOverlayProps> = (componentProps) => {
|
|
|
280
291
|
/>
|
|
281
292
|
|
|
282
293
|
<TutorialTooltip
|
|
294
|
+
copy={copy}
|
|
283
295
|
tutorial={{ ...tutorial, currentStepData }}
|
|
284
296
|
steps={steps}
|
|
285
297
|
allowSkip={allowSkip}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TutorialCopy } from '../../../copy';
|
|
1
2
|
// Component types
|
|
2
3
|
export interface TutorialStep {
|
|
3
4
|
id: string;
|
|
@@ -15,6 +16,8 @@ export interface TutorialStep {
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export interface TutorialOverlayProps {
|
|
19
|
+
/** The tour's four controls. REQUIRED — all four were English literals. */
|
|
20
|
+
copy: TutorialCopy;
|
|
18
21
|
steps: TutorialStep[];
|
|
19
22
|
onComplete?: () => void;
|
|
20
23
|
onSkip?: () => void;
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import React, { } from 'react';
|
|
15
15
|
|
|
16
16
|
import type { TutorialOverlayProps } from './TutorialOverlay.types';
|
|
17
|
+
import type { TutorialCopy } from '../../../copy';
|
|
17
18
|
|
|
18
19
|
// Animation keyframes
|
|
19
20
|
|
|
@@ -42,6 +43,7 @@ const StepDot = styled(Box, {
|
|
|
42
43
|
|
|
43
44
|
// The step's controls: skip/restart on the left, previous/next on the right.
|
|
44
45
|
const TutorialStepNav: React.FC<{
|
|
46
|
+
copy: TutorialCopy;
|
|
45
47
|
currentStep: number;
|
|
46
48
|
stepCount: number;
|
|
47
49
|
isLastStep: boolean;
|
|
@@ -52,6 +54,7 @@ const TutorialStepNav: React.FC<{
|
|
|
52
54
|
onSkip: () => void;
|
|
53
55
|
onRestart: () => void;
|
|
54
56
|
}> = ({
|
|
57
|
+
copy,
|
|
55
58
|
currentStep,
|
|
56
59
|
stepCount,
|
|
57
60
|
isLastStep,
|
|
@@ -70,7 +73,7 @@ const TutorialStepNav: React.FC<{
|
|
|
70
73
|
<Stack direction="row" spacing={1}>
|
|
71
74
|
{allowSkip && (
|
|
72
75
|
<Button size="small" onClick={onSkip} variant="text">
|
|
73
|
-
|
|
76
|
+
{copy.skip}
|
|
74
77
|
</Button>
|
|
75
78
|
)}
|
|
76
79
|
{stepCount > 1 && (
|
|
@@ -78,7 +81,7 @@ const TutorialStepNav: React.FC<{
|
|
|
78
81
|
size="small"
|
|
79
82
|
onClick={onRestart}
|
|
80
83
|
disabled={currentStep === 0}
|
|
81
|
-
title=
|
|
84
|
+
title={copy.restart}
|
|
82
85
|
>
|
|
83
86
|
<RestartIcon fontSize="small" />
|
|
84
87
|
</IconButton>
|
|
@@ -94,7 +97,7 @@ const TutorialStepNav: React.FC<{
|
|
|
94
97
|
disabled={currentStep === 0}
|
|
95
98
|
data-testid="tutorial-prev-button"
|
|
96
99
|
>
|
|
97
|
-
|
|
100
|
+
{copy.previous}
|
|
98
101
|
</Button>
|
|
99
102
|
)}
|
|
100
103
|
|
|
@@ -108,7 +111,7 @@ const TutorialStepNav: React.FC<{
|
|
|
108
111
|
title={requiresActionBeforeNext ? 'Complete the required action first' : ''}
|
|
109
112
|
data-testid="tutorial-next-button"
|
|
110
113
|
>
|
|
111
|
-
|
|
114
|
+
{copy.next}
|
|
112
115
|
</Button>
|
|
113
116
|
) : (
|
|
114
117
|
<Button
|
|
@@ -175,6 +178,7 @@ const TutorialStepHeader: React.FC<{
|
|
|
175
178
|
);
|
|
176
179
|
|
|
177
180
|
export const TutorialStepBody: React.FC<{
|
|
181
|
+
copy: TutorialCopy;
|
|
178
182
|
step: TutorialOverlayProps['steps'][number];
|
|
179
183
|
currentStep: number;
|
|
180
184
|
stepCount: number;
|
|
@@ -188,6 +192,7 @@ export const TutorialStepBody: React.FC<{
|
|
|
188
192
|
onSkip: () => void;
|
|
189
193
|
onRestart: () => void;
|
|
190
194
|
}> = ({
|
|
195
|
+
copy,
|
|
191
196
|
step,
|
|
192
197
|
currentStep,
|
|
193
198
|
stepCount,
|
|
@@ -239,6 +244,7 @@ export const TutorialStepBody: React.FC<{
|
|
|
239
244
|
<StepDots currentStep={currentStep} stepCount={stepCount} />
|
|
240
245
|
|
|
241
246
|
<TutorialStepNav
|
|
247
|
+
copy={copy}
|
|
242
248
|
currentStep={currentStep}
|
|
243
249
|
stepCount={stepCount}
|
|
244
250
|
isLastStep={isLastStep}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
import type { AddressAutocompleteCopy } from '../../../copy';
|
|
3
4
|
import type { MockPrediction } from './mockPlaces';
|
|
4
5
|
|
|
5
6
|
/// <reference types="@types/google.maps" />
|
|
@@ -27,6 +28,12 @@ export interface AddressDetails {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface AddressAutocompleteProps {
|
|
31
|
+
/**
|
|
32
|
+
* The field's own three sentences. REQUIRED: this package ships no default
|
|
33
|
+
* copy, and two of the three are read while the field is unusable because
|
|
34
|
+
* Google Maps never arrived — the worst moment to speak the wrong language.
|
|
35
|
+
*/
|
|
36
|
+
copy: AddressAutocompleteCopy;
|
|
30
37
|
variant?: 'glass' | 'outlined' | 'filled';
|
|
31
38
|
label?: string;
|
|
32
39
|
placeholder?: string;
|
|
@@ -17,6 +17,7 @@ export type AddressAutocompleteFieldProps = ResolvedAddressProps & AddressAutoco
|
|
|
17
17
|
|
|
18
18
|
// The live field, rendered once Google Maps (or the mock stand-in) is ready.
|
|
19
19
|
export const AddressAutocompleteField: FC<AddressAutocompleteFieldProps> = ({
|
|
20
|
+
copy,
|
|
20
21
|
variant,
|
|
21
22
|
label,
|
|
22
23
|
placeholder,
|
|
@@ -62,6 +63,7 @@ export const AddressAutocompleteField: FC<AddressAutocompleteFieldProps> = ({
|
|
|
62
63
|
)}
|
|
63
64
|
renderInput={(params) => (
|
|
64
65
|
<AddressInputField
|
|
66
|
+
copy={copy}
|
|
65
67
|
params={params}
|
|
66
68
|
addressVariant={variant}
|
|
67
69
|
label={floating ? undefined : label}
|
|
@@ -6,6 +6,7 @@ import type { AddressAutocompleteProps } from './AddressAutocomplete.types';
|
|
|
6
6
|
import { AddressTextField } from './AddressTextField';
|
|
7
7
|
|
|
8
8
|
export interface AddressFallbackFieldProps {
|
|
9
|
+
copy: AddressAutocompleteProps['copy'];
|
|
9
10
|
variant: AddressAutocompleteProps['variant'];
|
|
10
11
|
label?: string;
|
|
11
12
|
placeholder?: string;
|
|
@@ -18,6 +19,7 @@ export interface AddressFallbackFieldProps {
|
|
|
18
19
|
// Stands in for the Autocomplete before Google Maps is usable: a disabled field
|
|
19
20
|
// that either spins or explains why it never loaded.
|
|
20
21
|
export const AddressFallbackField: FC<AddressFallbackFieldProps> = ({
|
|
22
|
+
copy,
|
|
21
23
|
variant,
|
|
22
24
|
label,
|
|
23
25
|
placeholder,
|
|
@@ -33,7 +35,7 @@ export const AddressFallbackField: FC<AddressFallbackFieldProps> = ({
|
|
|
33
35
|
<AddressTextField
|
|
34
36
|
addressVariant={variant}
|
|
35
37
|
label={floating ? undefined : label}
|
|
36
|
-
placeholder=
|
|
38
|
+
placeholder={copy.loadingMaps}
|
|
37
39
|
disabled
|
|
38
40
|
fullWidth={fullWidth}
|
|
39
41
|
InputProps={{
|
|
@@ -57,7 +59,7 @@ export const AddressFallbackField: FC<AddressFallbackFieldProps> = ({
|
|
|
57
59
|
InputProps={{ startAdornment }}
|
|
58
60
|
/>
|
|
59
61
|
<Alert severity="error" sx={{ mt: 1 }}>
|
|
60
|
-
|
|
62
|
+
{copy.mapsLoadFailed}
|
|
61
63
|
</Alert>
|
|
62
64
|
</Box>
|
|
63
65
|
);
|
|
@@ -7,16 +7,17 @@ import React from 'react';
|
|
|
7
7
|
import type { AddressAutocompleteProps } from './AddressAutocomplete.types';
|
|
8
8
|
import { AddressTextField } from './AddressTextField';
|
|
9
9
|
|
|
10
|
-
const CurrentLocationButton: FC<{
|
|
11
|
-
disabled
|
|
12
|
-
onClick
|
|
13
|
-
|
|
10
|
+
const CurrentLocationButton: FC<{
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
currentLocationLabel: string;
|
|
14
|
+
}> = ({ disabled, onClick, currentLocationLabel }) => (
|
|
14
15
|
<InputAdornment position="end">
|
|
15
16
|
<IconButton
|
|
16
17
|
edge="end"
|
|
17
18
|
onClick={onClick}
|
|
18
19
|
size="small"
|
|
19
|
-
title=
|
|
20
|
+
title={currentLocationLabel}
|
|
20
21
|
disabled={disabled}
|
|
21
22
|
data-testid="address-current-location-button"
|
|
22
23
|
>
|
|
@@ -26,6 +27,7 @@ const CurrentLocationButton: FC<{ disabled: boolean; onClick: () => void }> = ({
|
|
|
26
27
|
);
|
|
27
28
|
|
|
28
29
|
export interface AddressInputFieldProps {
|
|
30
|
+
copy: AddressAutocompleteProps['copy'];
|
|
29
31
|
params: AutocompleteRenderInputParams;
|
|
30
32
|
addressVariant: AddressAutocompleteProps['variant'];
|
|
31
33
|
label?: string;
|
|
@@ -41,6 +43,7 @@ export interface AddressInputFieldProps {
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export const AddressInputField: FC<AddressInputFieldProps> = ({
|
|
46
|
+
copy,
|
|
44
47
|
params,
|
|
45
48
|
addressVariant,
|
|
46
49
|
label,
|
|
@@ -69,7 +72,11 @@ export const AddressInputField: FC<AddressInputFieldProps> = ({
|
|
|
69
72
|
<>
|
|
70
73
|
{loading && <CircularProgress color="inherit" size={20} data-testid="address-loading" />}
|
|
71
74
|
{showCurrentLocation && (
|
|
72
|
-
<CurrentLocationButton
|
|
75
|
+
<CurrentLocationButton
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
onClick={onGetCurrentLocation}
|
|
78
|
+
currentLocationLabel={copy.useCurrentLocation}
|
|
79
|
+
/>
|
|
73
80
|
)}
|
|
74
81
|
{params.InputProps.endAdornment}
|
|
75
82
|
</>
|
|
@@ -17,6 +17,7 @@ import React from 'react';
|
|
|
17
17
|
|
|
18
18
|
import { highlightLabel, type MatchMode } from './Autocomplete.helpers';
|
|
19
19
|
import type { SuggestionItemState, SuggestionType } from './Autocomplete.types';
|
|
20
|
+
import type { AutocompleteCopy } from '../../../copy';
|
|
20
21
|
|
|
21
22
|
const StyledPopper = styled(Popper)(({ theme }) => ({
|
|
22
23
|
zIndex: theme.zIndex.tooltip,
|
|
@@ -213,13 +214,13 @@ export function DefaultSuggestion<T>({
|
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
/** A "Loading…" row shown while async suggestions resolve. */
|
|
216
|
-
export function LoadingRow(): React.JSX.Element {
|
|
217
|
+
export function LoadingRow({ label }: { label: string }): React.JSX.Element {
|
|
217
218
|
return (
|
|
218
219
|
<ListItem>
|
|
219
220
|
<Box display="flex" alignItems="center" gap={1}>
|
|
220
221
|
<CircularProgress size={16} />
|
|
221
222
|
<Typography variant="body2" color="text.secondary">
|
|
222
|
-
|
|
223
|
+
{label}
|
|
223
224
|
</Typography>
|
|
224
225
|
</Box>
|
|
225
226
|
</ListItem>
|
|
@@ -227,11 +228,11 @@ export function LoadingRow(): React.JSX.Element {
|
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
/** The empty "No results found" row. */
|
|
230
|
-
export function NoResultsRow(): React.JSX.Element {
|
|
231
|
+
export function NoResultsRow({ label }: { label: string }): React.JSX.Element {
|
|
231
232
|
return (
|
|
232
233
|
<ListItem>
|
|
233
234
|
<Typography variant="body2" color="text.secondary">
|
|
234
|
-
|
|
235
|
+
{label}
|
|
235
236
|
</Typography>
|
|
236
237
|
</ListItem>
|
|
237
238
|
);
|
|
@@ -251,6 +252,7 @@ const SAME_WIDTH_MODIFIER = {
|
|
|
251
252
|
};
|
|
252
253
|
|
|
253
254
|
export interface SuggestionListBoxProps<T> {
|
|
255
|
+
copy: AutocompleteCopy;
|
|
254
256
|
open: boolean;
|
|
255
257
|
anchorEl: HTMLElement | null;
|
|
256
258
|
portal: boolean | { container?: HTMLElement };
|
|
@@ -272,6 +274,7 @@ export interface SuggestionListBoxProps<T> {
|
|
|
272
274
|
|
|
273
275
|
/** The suggestions dropdown: a same-width Popper with the option list + loading/empty rows. */
|
|
274
276
|
export function SuggestionListBox<T>({
|
|
277
|
+
copy,
|
|
275
278
|
open,
|
|
276
279
|
anchorEl,
|
|
277
280
|
portal,
|
|
@@ -328,8 +331,8 @@ export function SuggestionListBox<T>({
|
|
|
328
331
|
{renderItem(item, index === activeIndex)}
|
|
329
332
|
</ListItem>
|
|
330
333
|
))}
|
|
331
|
-
{isLoading && <LoadingRow />}
|
|
332
|
-
{showNoResults && <NoResultsRow />}
|
|
334
|
+
{isLoading && <LoadingRow label={copy.loading} />}
|
|
335
|
+
{showNoResults && <NoResultsRow label={copy.noResults} />}
|
|
333
336
|
</List>
|
|
334
337
|
</Paper>
|
|
335
338
|
</StyledPopper>
|
|
@@ -54,7 +54,7 @@ function resolveRenderConfig<T>(p: AutocompleteProps<T>): RenderConfig<T> {
|
|
|
54
54
|
selectedItems: p.selectedItems ?? [],
|
|
55
55
|
isLoading: Boolean(p.isLoading),
|
|
56
56
|
showGhostText: p.showGhostText ?? true,
|
|
57
|
-
placeholder: p.placeholder ??
|
|
57
|
+
placeholder: p.placeholder ?? p.copy.placeholder,
|
|
58
58
|
autoFocus: Boolean(p.autoFocus),
|
|
59
59
|
disabled: Boolean(p.disabled),
|
|
60
60
|
portal: p.portal ?? false,
|
|
@@ -137,6 +137,7 @@ export const Autocomplete = <T = AutocompleteOption>(props: AutocompleteProps<T>
|
|
|
137
137
|
|
|
138
138
|
{s.open && (
|
|
139
139
|
<SuggestionListBox
|
|
140
|
+
copy={props.copy}
|
|
140
141
|
open={s.open}
|
|
141
142
|
anchorEl={s.inputRef.current}
|
|
142
143
|
portal={cfg.portal}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { AutocompleteCopy } from '../../../copy';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* A suggestion's behavior on select:
|
|
@@ -24,6 +25,12 @@ export interface AutocompleteOption<T = unknown> {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export interface AutocompleteProps<T = AutocompleteOption> {
|
|
28
|
+
/**
|
|
29
|
+
* The two rows the dropdown shows in place of options — while an async
|
|
30
|
+
* fetch is in flight, and when it came back empty. REQUIRED: this package
|
|
31
|
+
* ships no default copy.
|
|
32
|
+
*/
|
|
33
|
+
copy: AutocompleteCopy;
|
|
27
34
|
/** Controlled input value */
|
|
28
35
|
value: string;
|
|
29
36
|
/** Input value change */
|
|
@@ -23,7 +23,7 @@ const containerSx = (monthsToShow: number): SxProps<Theme> => ({
|
|
|
23
23
|
|
|
24
24
|
export const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>((componentProps, ref) => {
|
|
25
25
|
const props = resolveCalendarProps(componentProps);
|
|
26
|
-
const { monthsToShow, locale, renderHeader, renderFooter, className } = props;
|
|
26
|
+
const { monthsToShow, locale, renderHeader, renderFooter, className, ariaLabel } = props;
|
|
27
27
|
|
|
28
28
|
const calendar = useCalendar(props);
|
|
29
29
|
|
|
@@ -48,7 +48,7 @@ export const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>((compone
|
|
|
48
48
|
ref={ref}
|
|
49
49
|
className={className}
|
|
50
50
|
role="application"
|
|
51
|
-
aria-label=
|
|
51
|
+
aria-label={ariaLabel}
|
|
52
52
|
tabIndex={0}
|
|
53
53
|
onKeyDown={calendar.handleKeyDown}
|
|
54
54
|
data-testid="calendar-container"
|
|
@@ -23,6 +23,13 @@ export interface HeaderRenderContext {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export interface CalendarProps {
|
|
26
|
+
/**
|
|
27
|
+
* The grid's accessible name. REQUIRED: the container is a
|
|
28
|
+
* `role="application"`, so a screen reader announces this and nothing else —
|
|
29
|
+
* and the package cannot know whether it picks a delivery day or a birthday.
|
|
30
|
+
*/
|
|
31
|
+
ariaLabel: string;
|
|
32
|
+
|
|
26
33
|
// Mode
|
|
27
34
|
selectionMode?: SelectionMode; // default: 'single'
|
|
28
35
|
|
|
@@ -50,7 +50,7 @@ const PlaceholderOverlay = styled(Box)(({ theme }) => ({
|
|
|
50
50
|
userSelect: 'none' }));
|
|
51
51
|
|
|
52
52
|
// Monaco editor themes
|
|
53
|
-
const EditorLoading: FC = () => (
|
|
53
|
+
const EditorLoading: FC<{ label: string }> = ({ label }) => (
|
|
54
54
|
<Box
|
|
55
55
|
sx={{
|
|
56
56
|
display: 'flex',
|
|
@@ -59,7 +59,7 @@ const EditorLoading: FC = () => (
|
|
|
59
59
|
height: '100%',
|
|
60
60
|
color: 'text.secondary' }}
|
|
61
61
|
>
|
|
62
|
-
<Typography variant="body2">
|
|
62
|
+
<Typography variant="body2">{label}</Typography>
|
|
63
63
|
</Box>
|
|
64
64
|
);
|
|
65
65
|
|
|
@@ -116,7 +116,8 @@ export const CodeEditor: FC<CodeEditorProps> = (componentProps) => {
|
|
|
116
116
|
autoFormat,
|
|
117
117
|
placeholder,
|
|
118
118
|
onSave,
|
|
119
|
-
dataTestId
|
|
119
|
+
dataTestId,
|
|
120
|
+
copy } = resolveCodeEditorProps(componentProps);
|
|
120
121
|
|
|
121
122
|
const testId = makeTestId(dataTestId);
|
|
122
123
|
const editor = useCodeEditor({ themeProp, wordWrap, autoFormat, readOnly, onSave });
|
|
@@ -132,6 +133,7 @@ export const CodeEditor: FC<CodeEditorProps> = (componentProps) => {
|
|
|
132
133
|
<EditorContainer elevation={2} data-testid={dataTestId || 'code-editor'}>
|
|
133
134
|
{showToolbar && (
|
|
134
135
|
<EditorToolbar
|
|
136
|
+
copy={copy}
|
|
135
137
|
language={language}
|
|
136
138
|
readOnly={readOnly}
|
|
137
139
|
isWrapped={editor.isWrapped}
|
|
@@ -158,7 +160,7 @@ export const CodeEditor: FC<CodeEditorProps> = (componentProps) => {
|
|
|
158
160
|
theme={editor.editorTheme}
|
|
159
161
|
options={editorOptions}
|
|
160
162
|
onMount={editor.handleEditorDidMount}
|
|
161
|
-
loading={<EditorLoading />}
|
|
163
|
+
loading={<EditorLoading label={copy.loading} />}
|
|
162
164
|
/>
|
|
163
165
|
</EditorWrapper>
|
|
164
166
|
</EditorContainer>
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
// Types for CodeEditor component
|
|
2
|
+
import type { CodeEditorCopy } from '../../../copy';
|
|
2
3
|
|
|
3
4
|
export type EditorLanguage = 'json' | 'javascript' | 'typescript' | 'css' | 'html' | 'yaml' | 'markdown' | 'sql' | 'python';
|
|
4
5
|
|
|
5
6
|
export type EditorTheme = 'light' | 'dark' | 'auto';
|
|
6
7
|
|
|
7
8
|
export interface CodeEditorProps {
|
|
9
|
+
/**
|
|
10
|
+
* The editor's chrome — the loading line, the read-only badge and the four
|
|
11
|
+
* toolbar tooltips, which are also those buttons' accessible names.
|
|
12
|
+
* REQUIRED: this package ships no default copy.
|
|
13
|
+
*/
|
|
14
|
+
copy: CodeEditorCopy;
|
|
8
15
|
/** Programming language for syntax highlighting */
|
|
9
16
|
language: EditorLanguage;
|
|
10
17
|
/** Editor height (default: '400px') */
|