@okta/odyssey-react-mui 1.28.1 → 1.29.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/CHANGELOG.md +8 -0
- package/dist/Breadcrumbs.js +1 -0
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Buttons/MenuItem.js +1 -0
- package/dist/Buttons/MenuItem.js.map +1 -1
- package/dist/Checkbox.js +62 -35
- package/dist/Checkbox.js.map +1 -1
- package/dist/DataTable/reorderDataRowsLocally.js.map +1 -1
- package/dist/DataTable/useRowReordering.js.map +1 -1
- package/dist/HtmlProps.js.map +1 -1
- package/dist/Pagination/Pagination.js +2 -1
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Radio.js +65 -38
- package/dist/Radio.js.map +1 -1
- package/dist/Typography.js +20 -0
- package/dist/Typography.js.map +1 -1
- package/dist/index.scss +1 -1
- package/dist/labs/DataFilters.js +9 -5
- package/dist/labs/DataFilters.js.map +1 -1
- package/dist/labs/DataTable.js +7 -7
- package/dist/labs/DataTable.js.map +1 -1
- package/dist/labs/DataView/BulkActionsMenu.js.map +1 -1
- package/dist/labs/DataView/CardLayoutContent.js +6 -5
- package/dist/labs/DataView/CardLayoutContent.js.map +1 -1
- package/dist/labs/DataView/DataCard.js +1 -0
- package/dist/labs/DataView/DataCard.js.map +1 -1
- package/dist/labs/DataView/DataTable.js.map +1 -1
- package/dist/labs/DataView/DataView.js +2 -2
- package/dist/labs/DataView/DataView.js.map +1 -1
- package/dist/labs/DataView/DetailPanel.js.map +1 -1
- package/dist/labs/DataView/RowActions.js.map +1 -1
- package/dist/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/labs/DataView/TableSettings.js.map +1 -1
- package/dist/labs/DataView/componentTypes.js.map +1 -1
- package/dist/labs/DataView/dataTypes.js.map +1 -1
- package/dist/labs/DataView/fetchData.js.map +1 -1
- package/dist/labs/DataView/testSupportData.js +201 -0
- package/dist/labs/DataView/testSupportData.js.map +1 -0
- package/dist/labs/DataView/useFilterConversion.js.map +1 -1
- package/dist/labs/{DateField.js → DatePickers/DateField.js} +1 -1
- package/dist/labs/DatePickers/DateField.js.map +1 -0
- package/dist/labs/DatePickers/DateFieldActionBar.js +56 -0
- package/dist/labs/DatePickers/DateFieldActionBar.js.map +1 -0
- package/dist/labs/DatePickers/DateFieldLocalizationProvider.js +32 -0
- package/dist/labs/DatePickers/DateFieldLocalizationProvider.js.map +1 -0
- package/dist/labs/{DatePicker.js → DatePickers/DatePicker.js} +30 -73
- package/dist/labs/DatePickers/DatePicker.js.map +1 -0
- package/dist/labs/DatePickers/DatePicker.types.d.js.map +1 -0
- package/dist/labs/DatePickers/DateTimeField.js +166 -0
- package/dist/labs/DatePickers/DateTimeField.js.map +1 -0
- package/dist/labs/DatePickers/DateTimePicker.js +233 -0
- package/dist/labs/DatePickers/DateTimePicker.js.map +1 -0
- package/dist/labs/{datePickerTheme.js → DatePickers/datePickerTheme.js} +2 -2
- package/dist/labs/DatePickers/datePickerTheme.js.map +1 -0
- package/dist/labs/DatePickers/dateTimePickerTheme.js +230 -0
- package/dist/labs/DatePickers/dateTimePickerTheme.js.map +1 -0
- package/dist/labs/DatePickers/index.js +15 -0
- package/dist/labs/DatePickers/index.js.map +1 -0
- package/dist/labs/DatePickers/useDateFieldsTranslations.js.map +1 -0
- package/dist/labs/{useOdysseyDateFields.js → DatePickers/useOdysseyDateFields.js} +36 -3
- package/dist/labs/DatePickers/useOdysseyDateFields.js.map +1 -0
- package/dist/labs/PageTemplate.js +1 -1
- package/dist/labs/PageTemplate.js.map +1 -1
- package/dist/labs/SideNav/SideNav.js +40 -34
- package/dist/labs/SideNav/SideNav.js.map +1 -1
- package/dist/labs/SideNav/SideNavHeader.js +6 -4
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
- package/dist/labs/SideNav/SideNavItemContent.js +11 -11
- package/dist/labs/SideNav/SideNavItemContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavToggleButton.js +1 -1
- package/dist/labs/SideNav/SideNavToggleButton.js.map +1 -1
- package/dist/labs/SideNav/types.js.map +1 -1
- package/dist/labs/TimeZonePicker.js.map +1 -1
- package/dist/labs/index.js +1 -3
- package/dist/labs/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +2 -0
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/src/Breadcrumbs.d.ts.map +1 -1
- package/dist/src/Buttons/MenuItem.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/DataTable/reorderDataRowsLocally.d.ts +3 -3
- package/dist/src/DataTable/reorderDataRowsLocally.d.ts.map +1 -1
- package/dist/src/DataTable/useRowReordering.d.ts +10 -10
- package/dist/src/DataTable/useRowReordering.d.ts.map +1 -1
- package/dist/src/HtmlProps.d.ts +27 -0
- package/dist/src/HtmlProps.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/src/Radio.d.ts +1 -1
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/Typography.d.ts +11 -11
- package/dist/src/Typography.d.ts.map +1 -1
- package/dist/src/labs/DataFilters.d.ts.map +1 -1
- package/dist/src/labs/DataTable.d.ts +11 -11
- package/dist/src/labs/DataTable.d.ts.map +1 -1
- package/dist/src/labs/DataView/BulkActionsMenu.d.ts +3 -3
- package/dist/src/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
- package/dist/src/labs/DataView/CardLayoutContent.d.ts +18 -15
- package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataCard.d.ts +7 -4
- package/dist/src/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataTable.d.ts +6 -2
- package/dist/src/labs/DataView/DataTable.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataView.d.ts +6 -2
- package/dist/src/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/src/labs/DataView/DetailPanel.d.ts +5 -5
- package/dist/src/labs/DataView/DetailPanel.d.ts.map +1 -1
- package/dist/src/labs/DataView/RowActions.d.ts +3 -3
- package/dist/src/labs/DataView/RowActions.d.ts.map +1 -1
- package/dist/src/labs/DataView/TableLayoutContent.d.ts +18 -15
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/TableSettings.d.ts +7 -3
- package/dist/src/labs/DataView/TableSettings.d.ts.map +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts +17 -17
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DataView/dataTypes.d.ts +6 -6
- package/dist/src/labs/DataView/dataTypes.d.ts.map +1 -1
- package/dist/src/labs/DataView/fetchData.d.ts +6 -6
- package/dist/src/labs/DataView/fetchData.d.ts.map +1 -1
- package/dist/src/labs/DataView/testSupportData.d.ts +33 -0
- package/dist/src/labs/DataView/testSupportData.d.ts.map +1 -0
- package/dist/src/labs/DataView/useFilterConversion.d.ts +5 -4
- package/dist/src/labs/DataView/useFilterConversion.d.ts.map +1 -1
- package/dist/src/labs/{DateField.d.ts → DatePickers/DateField.d.ts} +1 -1
- package/dist/src/labs/DatePickers/DateField.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/DateFieldActionBar.d.ts +15 -0
- package/dist/src/labs/DatePickers/DateFieldActionBar.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/DateFieldLocalizationProvider.d.ts +20 -0
- package/dist/src/labs/DatePickers/DateFieldLocalizationProvider.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/DatePicker.d.ts +17 -0
- package/dist/src/labs/DatePickers/DatePicker.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/DateTimeField.d.ts +20 -0
- package/dist/src/labs/DatePickers/DateTimeField.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/DateTimePicker.d.ts +17 -0
- package/dist/src/labs/DatePickers/DateTimePicker.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/datePickerTheme.d.ts +22 -0
- package/dist/src/labs/DatePickers/datePickerTheme.d.ts.map +1 -0
- package/dist/src/labs/{datePickerTheme.d.ts → DatePickers/dateTimePickerTheme.d.ts} +2 -2
- package/dist/src/labs/DatePickers/dateTimePickerTheme.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/index.d.ts +15 -0
- package/dist/src/labs/DatePickers/index.d.ts.map +1 -0
- package/dist/src/labs/DatePickers/useDateFieldsTranslations.d.ts.map +1 -0
- package/dist/src/labs/{useOdysseyDateFields.d.ts → DatePickers/useOdysseyDateFields.d.ts} +49 -6
- package/dist/src/labs/DatePickers/useOdysseyDateFields.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/types.d.ts +2 -2
- package/dist/src/labs/SideNav/types.d.ts.map +1 -1
- package/dist/src/labs/TimeZonePicker.d.ts +4 -1
- package/dist/src/labs/TimeZonePicker.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +1 -3
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/mixins.d.ts.map +1 -1
- package/dist/src/theme/mixins.types.d.ts +2 -0
- package/dist/src/theme/mixins.types.d.ts.map +1 -1
- package/dist/src/{labs → ui-shell}/UiShell/UiShell.d.ts +2 -2
- package/dist/src/ui-shell/UiShell/UiShell.d.ts.map +1 -0
- package/dist/src/{labs → ui-shell}/UiShell/UiShellContent.d.ts +12 -8
- package/dist/src/ui-shell/UiShell/UiShellContent.d.ts.map +1 -0
- package/dist/src/ui-shell/UiShell/bufferLatest.d.ts.map +1 -0
- package/dist/src/ui-shell/UiShell/createMessageBus.d.ts.map +1 -0
- package/dist/src/ui-shell/UiShell/createStore.d.ts.map +1 -0
- package/dist/src/ui-shell/UiShell/index.d.ts.map +1 -0
- package/dist/src/{labs → ui-shell}/UiShell/renderUiShell.d.ts +3 -4
- package/dist/src/ui-shell/UiShell/renderUiShell.d.ts.map +1 -0
- package/dist/src/{labs → ui-shell}/UiShell/useHasUiShell.d.ts +1 -0
- package/dist/src/ui-shell/UiShell/useHasUiShell.d.ts.map +1 -0
- package/dist/src/ui-shell/UiShell/useScrollState.d.ts.map +1 -0
- package/dist/src/ui-shell/index.d.ts +14 -0
- package/dist/src/ui-shell/index.d.ts.map +1 -0
- package/dist/src/{web-component → ui-shell}/renderReactInWebComponent.d.ts +3 -23
- package/dist/src/ui-shell/renderReactInWebComponent.d.ts.map +1 -0
- package/dist/src/web-component/index.d.ts +0 -1
- package/dist/src/web-component/index.d.ts.map +1 -1
- package/dist/src/web-component/shadow-dom.d.ts +23 -2
- package/dist/src/web-component/shadow-dom.d.ts.map +1 -1
- package/dist/theme/components.js +38 -4
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/mixins.js +2 -1
- package/dist/theme/mixins.js.map +1 -1
- package/dist/theme/mixins.types.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/{labs → ui-shell}/UiShell/UiShell.js +2 -0
- package/dist/ui-shell/UiShell/UiShell.js.map +1 -0
- package/dist/{labs → ui-shell}/UiShell/UiShellContent.js +19 -11
- package/dist/ui-shell/UiShell/UiShellContent.js.map +1 -0
- package/dist/ui-shell/UiShell/bufferLatest.js.map +1 -0
- package/dist/ui-shell/UiShell/createMessageBus.js.map +1 -0
- package/dist/ui-shell/UiShell/createStore.js.map +1 -0
- package/dist/ui-shell/UiShell/index.js.map +1 -0
- package/dist/{labs → ui-shell}/UiShell/renderUiShell.js +4 -2
- package/dist/ui-shell/UiShell/renderUiShell.js.map +1 -0
- package/dist/{labs → ui-shell}/UiShell/useHasUiShell.js +1 -1
- package/dist/ui-shell/UiShell/useHasUiShell.js.map +1 -0
- package/dist/ui-shell/UiShell/useScrollState.js.map +1 -0
- package/dist/ui-shell/index.js +14 -0
- package/dist/ui-shell/index.js.map +1 -0
- package/dist/{web-component → ui-shell}/renderReactInWebComponent.js +7 -17
- package/dist/ui-shell/renderReactInWebComponent.js.map +1 -0
- package/dist/web-component/index.js +0 -1
- package/dist/web-component/index.js.map +1 -1
- package/dist/web-component/shadow-dom.js +12 -2
- package/dist/web-component/shadow-dom.js.map +1 -1
- package/package.json +10 -3
- package/src/Breadcrumbs.tsx +5 -1
- package/src/Buttons/MenuItem.tsx +1 -0
- package/src/Checkbox.tsx +86 -44
- package/src/DataTable/reorderDataRowsLocally.tsx +3 -3
- package/src/DataTable/useRowReordering.tsx +16 -23
- package/src/HtmlProps.ts +27 -0
- package/src/Pagination/Pagination.tsx +2 -2
- package/src/Radio.tsx +78 -39
- package/src/Typography.tsx +26 -1
- package/src/labs/DataFilters.tsx +7 -3
- package/src/labs/DataTable.tsx +41 -33
- package/src/labs/DataView/BulkActionsMenu.tsx +4 -4
- package/src/labs/DataView/CardLayoutContent.tsx +34 -28
- package/src/labs/DataView/DataCard.tsx +13 -6
- package/src/labs/DataView/DataTable.tsx +11 -4
- package/src/labs/DataView/DataView.test.tsx +1012 -87
- package/src/labs/DataView/DataView.tsx +18 -11
- package/src/labs/DataView/DetailPanel.tsx +4 -4
- package/src/labs/DataView/RowActions.tsx +4 -4
- package/src/labs/DataView/TableLayoutContent.tsx +30 -24
- package/src/labs/DataView/TableSettings.tsx +12 -6
- package/src/labs/DataView/componentTypes.ts +17 -17
- package/src/labs/DataView/dataTypes.ts +14 -8
- package/src/labs/DataView/fetchData.ts +9 -7
- package/src/labs/DataView/testSupportData.tsx +301 -0
- package/src/labs/DataView/useFilterConversion.ts +8 -8
- package/src/labs/{DateField.tsx → DatePickers/DateField.tsx} +2 -2
- package/src/labs/DatePickers/DateFieldActionBar.tsx +65 -0
- package/src/labs/DatePickers/DateFieldLocalizationProvider.tsx +46 -0
- package/src/labs/{DatePicker.tsx → DatePickers/DatePicker.tsx} +31 -136
- package/src/labs/DatePickers/DateTimeField.tsx +271 -0
- package/src/labs/DatePickers/DateTimePicker.test.tsx +66 -0
- package/src/labs/DatePickers/DateTimePicker.tsx +303 -0
- package/src/labs/{datePickerTheme.tsx → DatePickers/datePickerTheme.tsx} +2 -2
- package/src/labs/DatePickers/dateTimePickerTheme.ts +213 -0
- package/src/labs/DatePickers/index.ts +15 -0
- package/src/labs/{useOdysseyDateFields.ts → DatePickers/useOdysseyDateFields.ts} +112 -10
- package/src/labs/PageTemplate.tsx +1 -1
- package/src/labs/SideNav/SideNav.tsx +38 -39
- package/src/labs/SideNav/SideNavHeader.tsx +6 -4
- package/src/labs/SideNav/SideNavItemContent.tsx +21 -18
- package/src/labs/SideNav/SideNavToggleButton.tsx +1 -1
- package/src/labs/SideNav/types.ts +2 -2
- package/src/labs/TimeZonePicker.tsx +5 -1
- package/src/labs/index.ts +2 -3
- package/src/properties/odyssey-react-mui.properties +2 -0
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/theme/components.tsx +45 -4
- package/src/theme/mixins.ts +1 -0
- package/src/theme/mixins.types.ts +2 -0
- package/src/{labs → ui-shell}/UiShell/UiShell.tsx +3 -0
- package/src/{labs → ui-shell}/UiShell/UiShellContent.tsx +60 -31
- package/src/{labs → ui-shell}/UiShell/renderUiShell.test.tsx +16 -22
- package/src/{labs → ui-shell}/UiShell/renderUiShell.tsx +7 -4
- package/src/{labs → ui-shell}/UiShell/useHasUiShell.ts +1 -1
- package/src/ui-shell/index.ts +14 -0
- package/src/{web-component → ui-shell}/renderReactInWebComponent.test.tsx +1 -1
- package/src/{web-component → ui-shell}/renderReactInWebComponent.ts +9 -45
- package/src/web-component/index.ts +0 -1
- package/src/web-component/shadow-dom.ts +36 -3
- package/dist/labs/DateField.js.map +0 -1
- package/dist/labs/DatePicker.js.map +0 -1
- package/dist/labs/DatePicker.types.d.js.map +0 -1
- package/dist/labs/UiShell/UiShell.js.map +0 -1
- package/dist/labs/UiShell/UiShellContent.js.map +0 -1
- package/dist/labs/UiShell/bufferLatest.js.map +0 -1
- package/dist/labs/UiShell/createMessageBus.js.map +0 -1
- package/dist/labs/UiShell/createStore.js.map +0 -1
- package/dist/labs/UiShell/index.js.map +0 -1
- package/dist/labs/UiShell/renderUiShell.js.map +0 -1
- package/dist/labs/UiShell/useHasUiShell.js.map +0 -1
- package/dist/labs/UiShell/useScrollState.js.map +0 -1
- package/dist/labs/datePickerTheme.js.map +0 -1
- package/dist/labs/useDateFieldsTranslations.js.map +0 -1
- package/dist/labs/useOdysseyDateFields.js.map +0 -1
- package/dist/src/labs/DateField.d.ts.map +0 -1
- package/dist/src/labs/DatePicker.d.ts +0 -47
- package/dist/src/labs/DatePicker.d.ts.map +0 -1
- package/dist/src/labs/UiShell/UiShell.d.ts.map +0 -1
- package/dist/src/labs/UiShell/UiShellContent.d.ts.map +0 -1
- package/dist/src/labs/UiShell/bufferLatest.d.ts.map +0 -1
- package/dist/src/labs/UiShell/createMessageBus.d.ts.map +0 -1
- package/dist/src/labs/UiShell/createStore.d.ts.map +0 -1
- package/dist/src/labs/UiShell/index.d.ts.map +0 -1
- package/dist/src/labs/UiShell/renderUiShell.d.ts.map +0 -1
- package/dist/src/labs/UiShell/useHasUiShell.d.ts.map +0 -1
- package/dist/src/labs/UiShell/useScrollState.d.ts.map +0 -1
- package/dist/src/labs/datePickerTheme.d.ts.map +0 -1
- package/dist/src/labs/useDateFieldsTranslations.d.ts.map +0 -1
- package/dist/src/labs/useOdysseyDateFields.d.ts.map +0 -1
- package/dist/src/web-component/renderReactInWebComponent.d.ts.map +0 -1
- package/dist/web-component/renderReactInWebComponent.js.map +0 -1
- /package/dist/labs/{DatePicker.types.d.js → DatePickers/DatePicker.types.d.js} +0 -0
- /package/dist/labs/{useDateFieldsTranslations.js → DatePickers/useDateFieldsTranslations.js} +0 -0
- /package/dist/src/labs/{useDateFieldsTranslations.d.ts → DatePickers/useDateFieldsTranslations.d.ts} +0 -0
- /package/dist/src/{labs → ui-shell}/UiShell/bufferLatest.d.ts +0 -0
- /package/dist/src/{labs → ui-shell}/UiShell/createMessageBus.d.ts +0 -0
- /package/dist/src/{labs → ui-shell}/UiShell/createStore.d.ts +0 -0
- /package/dist/src/{labs → ui-shell}/UiShell/index.d.ts +0 -0
- /package/dist/src/{labs → ui-shell}/UiShell/useScrollState.d.ts +0 -0
- /package/dist/{labs → ui-shell}/UiShell/bufferLatest.js +0 -0
- /package/dist/{labs → ui-shell}/UiShell/createMessageBus.js +0 -0
- /package/dist/{labs → ui-shell}/UiShell/createStore.js +0 -0
- /package/dist/{labs → ui-shell}/UiShell/index.js +0 -0
- /package/dist/{labs → ui-shell}/UiShell/useScrollState.js +0 -0
- /package/src/labs/{DatePicker.types.d.ts → DatePickers/DatePicker.types.d.ts} +0 -0
- /package/src/labs/{useDateFieldsTranslations.ts → DatePickers/useDateFieldsTranslations.ts} +0 -0
- /package/src/{labs → ui-shell}/UiShell/UiShell.test.tsx +0 -0
- /package/src/{labs → ui-shell}/UiShell/bufferLatest.test.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/bufferLatest.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/createMessageBus.test.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/createMessageBus.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/createStore.test.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/createStore.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/index.ts +0 -0
- /package/src/{labs → ui-shell}/UiShell/useScrollState.ts +0 -0
package/src/Checkbox.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
FormControlLabelProps as MuiFormControlLabelProps,
|
|
20
20
|
FormHelperText,
|
|
21
21
|
} from "@mui/material";
|
|
22
|
+
import styled from "@emotion/styled";
|
|
22
23
|
|
|
23
24
|
import { CheckedFieldProps } from "./FormCheckedProps";
|
|
24
25
|
import type { HtmlProps } from "./HtmlProps";
|
|
@@ -28,10 +29,28 @@ import {
|
|
|
28
29
|
getControlState,
|
|
29
30
|
} from "./inputUtils";
|
|
30
31
|
import { FieldComponentProps } from "./FieldComponentProps";
|
|
32
|
+
import {
|
|
33
|
+
useOdysseyDesignTokens,
|
|
34
|
+
DesignTokens,
|
|
35
|
+
} from "./OdysseyDesignTokensContext";
|
|
31
36
|
import { Typography } from "./Typography";
|
|
37
|
+
import { useUniqueId } from "./useUniqueId";
|
|
32
38
|
|
|
33
39
|
export const checkboxValidityValues = ["valid", "invalid", "inherit"] as const;
|
|
34
40
|
|
|
41
|
+
const HintContainerWithInlineStartSpacing = styled.div<{
|
|
42
|
+
odysseyDesignTokens: DesignTokens;
|
|
43
|
+
}>(({ odysseyDesignTokens }) => ({
|
|
44
|
+
paddingInlineStart: `calc(${odysseyDesignTokens.TypographyLineHeightUi}em + ${odysseyDesignTokens.Spacing2})`,
|
|
45
|
+
marginBlockEnd: odysseyDesignTokens.Spacing2,
|
|
46
|
+
|
|
47
|
+
// MUI applies the '.Mui-error' class to this hint text when the checkbox is invalid which turns the copy red
|
|
48
|
+
// We want to keep the hint text gray in the error state
|
|
49
|
+
".Mui-error": {
|
|
50
|
+
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
|
|
35
54
|
export type CheckboxProps = {
|
|
36
55
|
/**
|
|
37
56
|
* The ref forwarded to the Checkbox
|
|
@@ -90,6 +109,10 @@ const Checkbox = ({
|
|
|
90
109
|
value,
|
|
91
110
|
}: CheckboxProps) => {
|
|
92
111
|
const { t } = useTranslation();
|
|
112
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
113
|
+
const id = useUniqueId(idOverride);
|
|
114
|
+
const hintId = hint ? `${id}-hint` : undefined;
|
|
115
|
+
|
|
93
116
|
const controlledStateRef = useRef(
|
|
94
117
|
getControlState({
|
|
95
118
|
controlledValue: isChecked,
|
|
@@ -126,10 +149,9 @@ const Checkbox = ({
|
|
|
126
149
|
</Typography>
|
|
127
150
|
</>
|
|
128
151
|
)}
|
|
129
|
-
{hint && <FormHelperText translate={translate}>{hint}</FormHelperText>}
|
|
130
152
|
</>
|
|
131
153
|
);
|
|
132
|
-
}, [isRequired, labelProp,
|
|
154
|
+
}, [isRequired, labelProp, t, translate]);
|
|
133
155
|
|
|
134
156
|
const onChange = useCallback<NonNullable<MuiCheckboxProps["onChange"]>>(
|
|
135
157
|
(event, checked) => {
|
|
@@ -158,58 +180,78 @@ const Checkbox = ({
|
|
|
158
180
|
const checkboxStyles = useMemo(
|
|
159
181
|
() => ({
|
|
160
182
|
alignItems: "flex-start",
|
|
183
|
+
|
|
161
184
|
...(isReadOnly && {
|
|
162
185
|
cursor: "default",
|
|
163
186
|
"& .MuiTypography-root": {
|
|
164
187
|
cursor: "default",
|
|
165
188
|
},
|
|
166
189
|
}),
|
|
190
|
+
|
|
191
|
+
...(hint && {
|
|
192
|
+
// needed to override specific :not(:last-child) selector
|
|
193
|
+
":not(:last-child)": {
|
|
194
|
+
marginBlockEnd: 0,
|
|
195
|
+
},
|
|
196
|
+
}),
|
|
167
197
|
}),
|
|
168
|
-
[isReadOnly],
|
|
198
|
+
[hint, isReadOnly],
|
|
169
199
|
);
|
|
170
200
|
|
|
171
201
|
return (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
onClick
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
202
|
+
<>
|
|
203
|
+
<FormControlLabel
|
|
204
|
+
sx={checkboxStyles}
|
|
205
|
+
aria-label={ariaLabel}
|
|
206
|
+
aria-labelledby={ariaLabelledBy}
|
|
207
|
+
className={
|
|
208
|
+
validity === "invalid"
|
|
209
|
+
? "Mui-error"
|
|
210
|
+
: validity === "valid"
|
|
211
|
+
? "Mui-valid"
|
|
212
|
+
: ""
|
|
213
|
+
}
|
|
214
|
+
control={
|
|
215
|
+
<MuiCheckbox
|
|
216
|
+
{...inputValues}
|
|
217
|
+
indeterminate={isIndeterminate}
|
|
218
|
+
onChange={onChange}
|
|
219
|
+
onClick={
|
|
220
|
+
onClick as unknown as React.MouseEventHandler<HTMLButtonElement>
|
|
221
|
+
}
|
|
222
|
+
required={isRequired}
|
|
223
|
+
inputProps={{
|
|
224
|
+
"aria-describedby": hintId,
|
|
225
|
+
"aria-readonly": isReadOnly,
|
|
226
|
+
"data-se": testId,
|
|
227
|
+
readOnly: isReadOnly,
|
|
228
|
+
}}
|
|
229
|
+
disabled={isDisabled}
|
|
230
|
+
inputRef={localInputRef}
|
|
231
|
+
sx={{
|
|
232
|
+
marginBlockStart: "2px",
|
|
233
|
+
}}
|
|
234
|
+
/>
|
|
235
|
+
}
|
|
236
|
+
disabled={isDisabled}
|
|
237
|
+
id={idOverride}
|
|
238
|
+
label={label}
|
|
239
|
+
name={nameOverride ?? idOverride}
|
|
240
|
+
value={value}
|
|
241
|
+
required={isRequired}
|
|
242
|
+
onBlur={onBlur}
|
|
243
|
+
translate={translate}
|
|
244
|
+
/>
|
|
245
|
+
{hint && (
|
|
246
|
+
<HintContainerWithInlineStartSpacing
|
|
247
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
248
|
+
>
|
|
249
|
+
<FormHelperText id={hintId} translate={translate}>
|
|
250
|
+
{hint}
|
|
251
|
+
</FormHelperText>
|
|
252
|
+
</HintContainerWithInlineStartSpacing>
|
|
253
|
+
)}
|
|
254
|
+
</>
|
|
213
255
|
);
|
|
214
256
|
};
|
|
215
257
|
|
|
@@ -20,15 +20,15 @@ import { MRT_RowData } from "material-react-table";
|
|
|
20
20
|
* @param newIndex - The new index to move the row to.
|
|
21
21
|
* @returns A new array of data with the row moved to the specified index.
|
|
22
22
|
*/
|
|
23
|
-
export const reorderDataRowsLocally = ({
|
|
23
|
+
export const reorderDataRowsLocally = <TData extends MRT_RowData>({
|
|
24
24
|
currentData,
|
|
25
25
|
rowId,
|
|
26
26
|
newRowIndex,
|
|
27
27
|
}: {
|
|
28
|
-
currentData:
|
|
28
|
+
currentData: TData[];
|
|
29
29
|
rowId: string;
|
|
30
30
|
newRowIndex: number;
|
|
31
|
-
}):
|
|
31
|
+
}): TData[] => {
|
|
32
32
|
const updatedData = [...currentData];
|
|
33
33
|
const rowIndex = updatedData.findIndex((row) => row.id === rowId);
|
|
34
34
|
|
|
@@ -16,7 +16,7 @@ import { reorderDataRowsLocally } from "./reorderDataRowsLocally";
|
|
|
16
16
|
import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext";
|
|
17
17
|
import { MRT_Row, MRT_RowData, MRT_TableInstance } from "material-react-table";
|
|
18
18
|
|
|
19
|
-
export const useRowReordering = ({
|
|
19
|
+
export const useRowReordering = <TData extends MRT_RowData>({
|
|
20
20
|
totalRows,
|
|
21
21
|
onReorderRows,
|
|
22
22
|
data,
|
|
@@ -28,12 +28,10 @@ export const useRowReordering = ({
|
|
|
28
28
|
}: {
|
|
29
29
|
totalRows: DataTableProps["totalRows"];
|
|
30
30
|
onReorderRows: DataTableProps["onReorderRows"];
|
|
31
|
-
data:
|
|
32
|
-
setData: Dispatch<SetStateAction<
|
|
33
|
-
draggingRow?: MRT_Row<
|
|
34
|
-
setDraggingRow: Dispatch<
|
|
35
|
-
SetStateAction<MRT_Row<MRT_RowData> | null | undefined>
|
|
36
|
-
>;
|
|
31
|
+
data: TData[];
|
|
32
|
+
setData: Dispatch<SetStateAction<TData[]>>;
|
|
33
|
+
draggingRow?: MRT_Row<TData> | null;
|
|
34
|
+
setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | undefined>>;
|
|
37
35
|
resultsPerPage: number;
|
|
38
36
|
page: number;
|
|
39
37
|
}) => {
|
|
@@ -68,7 +66,6 @@ export const useRowReordering = ({
|
|
|
68
66
|
const dragHandleStyles = {
|
|
69
67
|
padding: odysseyDesignTokens.Spacing1,
|
|
70
68
|
borderRadius: odysseyDesignTokens.BorderRadiusMain,
|
|
71
|
-
|
|
72
69
|
"&:focus-visible": {
|
|
73
70
|
boxShadow: `0 0 0 2px ${odysseyDesignTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyDesignTokens.PalettePrimaryMain}`,
|
|
74
71
|
outline: "2px solid transparent",
|
|
@@ -106,12 +103,12 @@ export const useRowReordering = ({
|
|
|
106
103
|
return undefined;
|
|
107
104
|
};
|
|
108
105
|
|
|
109
|
-
const setHoveredRow = (
|
|
110
|
-
table: MRT_TableInstance<MRT_RowData>,
|
|
111
|
-
id: MRT_RowData["id"],
|
|
112
|
-
) => {
|
|
106
|
+
const setHoveredRow = (table: MRT_TableInstance<TData>, id: TData["id"]) => {
|
|
113
107
|
if (id) {
|
|
114
|
-
|
|
108
|
+
// The `as MRT_Row<TData>` is necessary here to overcome some type/generic
|
|
109
|
+
// issues with the type of `setHoveredRow` defined by MRT. It's not ideal code,
|
|
110
|
+
// but it's the only way that works without a much larger rewrite.
|
|
111
|
+
const nextRow = table.getRow(id) as MRT_Row<TData>;
|
|
115
112
|
|
|
116
113
|
if (nextRow) {
|
|
117
114
|
table.setHoveredRow(nextRow);
|
|
@@ -120,8 +117,8 @@ export const useRowReordering = ({
|
|
|
120
117
|
};
|
|
121
118
|
|
|
122
119
|
type HandleDragHandleKeyDownArgs = {
|
|
123
|
-
table: MRT_TableInstance<
|
|
124
|
-
row: MRT_Row<
|
|
120
|
+
table: MRT_TableInstance<TData>;
|
|
121
|
+
row: MRT_Row<TData>;
|
|
125
122
|
event: KeyboardEvent<HTMLButtonElement>;
|
|
126
123
|
};
|
|
127
124
|
|
|
@@ -192,7 +189,7 @@ export const useRowReordering = ({
|
|
|
192
189
|
}
|
|
193
190
|
};
|
|
194
191
|
|
|
195
|
-
const handleDragHandleOnDragEnd = (table: MRT_TableInstance<
|
|
192
|
+
const handleDragHandleOnDragEnd = (table: MRT_TableInstance<TData>) => {
|
|
196
193
|
const cols = table.getAllColumns();
|
|
197
194
|
cols[0].toggleVisibility();
|
|
198
195
|
|
|
@@ -200,24 +197,20 @@ export const useRowReordering = ({
|
|
|
200
197
|
if (draggingRow) {
|
|
201
198
|
updateRowOrder({
|
|
202
199
|
rowId: draggingRow.id,
|
|
203
|
-
newRowIndex: (hoveredRow as
|
|
200
|
+
newRowIndex: (hoveredRow as TData).index,
|
|
204
201
|
});
|
|
205
202
|
}
|
|
206
203
|
|
|
207
204
|
setDraggingRow(null);
|
|
208
205
|
};
|
|
209
206
|
|
|
210
|
-
const handleDragHandleOnDragCapture = (
|
|
211
|
-
table: MRT_TableInstance<MRT_RowData>,
|
|
212
|
-
) => {
|
|
207
|
+
const handleDragHandleOnDragCapture = (table: MRT_TableInstance<TData>) => {
|
|
213
208
|
if (!draggingRow && table.getState().draggingRow?.id) {
|
|
214
209
|
setDraggingRow(table.getState().draggingRow);
|
|
215
210
|
}
|
|
216
211
|
};
|
|
217
212
|
|
|
218
|
-
const resetDraggingAndHoveredRow = (
|
|
219
|
-
table: MRT_TableInstance<MRT_RowData>,
|
|
220
|
-
) => {
|
|
213
|
+
const resetDraggingAndHoveredRow = (table: MRT_TableInstance<TData>) => {
|
|
221
214
|
setDraggingRow(null);
|
|
222
215
|
table.setHoveredRow(null);
|
|
223
216
|
};
|
package/src/HtmlProps.ts
CHANGED
|
@@ -29,6 +29,33 @@ export type HtmlProps = {
|
|
|
29
29
|
* Value: A space-separated list of one or more ID values referencing the elements being controlled by the current element
|
|
30
30
|
*/
|
|
31
31
|
ariaControls?: HTMLAttributes<HTMLElement>["aria-controls"];
|
|
32
|
+
/**
|
|
33
|
+
* A non-null aria-current state on an element indicates that this element represents the current item within a container or set of related elements.
|
|
34
|
+
*
|
|
35
|
+
* Value:
|
|
36
|
+
*
|
|
37
|
+
* `page`
|
|
38
|
+
Represents the current page within a set of pages such as the link to the current document in a breadcrumb.
|
|
39
|
+
|
|
40
|
+
`step`
|
|
41
|
+
Represents the current step within a process such as the current step in an enumerated multi step checkout flow.
|
|
42
|
+
|
|
43
|
+
`location`
|
|
44
|
+
Represents the current location within an environment or context such as the image that is visually highlighted as the current component of a flow chart.
|
|
45
|
+
|
|
46
|
+
`date`
|
|
47
|
+
Represents the current date within a collection of dates such as the current date within a calendar.
|
|
48
|
+
|
|
49
|
+
`time`
|
|
50
|
+
Represents the current time within a set of times such as the current time within a timetable.
|
|
51
|
+
|
|
52
|
+
`true`
|
|
53
|
+
Represents the current item within a set.
|
|
54
|
+
|
|
55
|
+
`false` (default)
|
|
56
|
+
Does not represent the current item within a set.
|
|
57
|
+
*/
|
|
58
|
+
ariaCurrent?: HTMLAttributes<HTMLElement>["aria-current"];
|
|
32
59
|
/**
|
|
33
60
|
* The global `aria-describedby` attribute identifies the element (or elements) that describes the element on which the attribute is set.
|
|
34
61
|
*
|
|
@@ -25,7 +25,7 @@ import { paginationTypeValues } from "./constants";
|
|
|
25
25
|
import { usePagination } from "./usePagination";
|
|
26
26
|
import { useTranslation } from "react-i18next";
|
|
27
27
|
|
|
28
|
-
const PaginationContainer = styled("
|
|
28
|
+
const PaginationContainer = styled("nav")({
|
|
29
29
|
display: "flex",
|
|
30
30
|
alignItems: "center",
|
|
31
31
|
justifyContent: "space-between",
|
|
@@ -330,7 +330,7 @@ const Pagination = ({
|
|
|
330
330
|
);
|
|
331
331
|
|
|
332
332
|
return variant === "paged" ? (
|
|
333
|
-
<PaginationContainer>
|
|
333
|
+
<PaginationContainer aria-label={t("pagination.label")}>
|
|
334
334
|
<PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>
|
|
335
335
|
{hasRowCountInput && (
|
|
336
336
|
<Box>
|
package/src/Radio.tsx
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { memo, useCallback, useMemo, useRef, useImperativeHandle } from "react";
|
|
13
14
|
import {
|
|
14
15
|
FormControlLabel,
|
|
15
16
|
FormControlLabelProps as MuiFormControlLabelProps,
|
|
@@ -17,11 +18,30 @@ import {
|
|
|
17
18
|
Radio as MuiRadio,
|
|
18
19
|
RadioProps as MuiRadioProps,
|
|
19
20
|
} from "@mui/material";
|
|
20
|
-
import
|
|
21
|
+
import styled from "@emotion/styled";
|
|
22
|
+
|
|
21
23
|
import { FieldComponentProps } from "./FieldComponentProps";
|
|
22
24
|
import type { HtmlProps } from "./HtmlProps";
|
|
23
25
|
import { FocusHandle } from "./inputUtils";
|
|
26
|
+
import {
|
|
27
|
+
useOdysseyDesignTokens,
|
|
28
|
+
DesignTokens,
|
|
29
|
+
} from "./OdysseyDesignTokensContext";
|
|
24
30
|
import { Typography } from "./Typography";
|
|
31
|
+
import { useUniqueId } from "./useUniqueId";
|
|
32
|
+
|
|
33
|
+
const HintContainerWithInlineStartSpacing = styled.div<{
|
|
34
|
+
odysseyDesignTokens: DesignTokens;
|
|
35
|
+
}>(({ odysseyDesignTokens }) => ({
|
|
36
|
+
paddingInlineStart: `calc(${odysseyDesignTokens.TypographyLineHeightUi}em + ${odysseyDesignTokens.Spacing2})`,
|
|
37
|
+
marginBlockEnd: odysseyDesignTokens.Spacing2,
|
|
38
|
+
|
|
39
|
+
// MUI applies the '.Mui-error' class to this hint text when the checkbox is invalid which turns the copy red
|
|
40
|
+
// We want to keep the hint text gray in the error state
|
|
41
|
+
".Mui-error": {
|
|
42
|
+
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
43
|
+
},
|
|
44
|
+
}));
|
|
25
45
|
|
|
26
46
|
export type RadioProps = {
|
|
27
47
|
/**
|
|
@@ -58,6 +78,7 @@ export type RadioProps = {
|
|
|
58
78
|
|
|
59
79
|
const Radio = ({
|
|
60
80
|
hint,
|
|
81
|
+
id: idOverride,
|
|
61
82
|
inputRef,
|
|
62
83
|
isChecked,
|
|
63
84
|
isDisabled,
|
|
@@ -73,6 +94,10 @@ const Radio = ({
|
|
|
73
94
|
onClick,
|
|
74
95
|
}: RadioProps) => {
|
|
75
96
|
const localInputRef = useRef<HTMLInputElement>(null);
|
|
97
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
98
|
+
const id = useUniqueId(idOverride);
|
|
99
|
+
const hintId = hint ? `${id}-hint` : undefined;
|
|
100
|
+
|
|
76
101
|
useImperativeHandle(
|
|
77
102
|
inputRef,
|
|
78
103
|
() => {
|
|
@@ -86,13 +111,8 @@ const Radio = ({
|
|
|
86
111
|
);
|
|
87
112
|
|
|
88
113
|
const label = useMemo(
|
|
89
|
-
() =>
|
|
90
|
-
|
|
91
|
-
<Typography component="span">{labelProp}</Typography>
|
|
92
|
-
{hint && <FormHelperText translate={translate}>{hint}</FormHelperText>}
|
|
93
|
-
</>
|
|
94
|
-
),
|
|
95
|
-
[labelProp, hint, translate],
|
|
114
|
+
() => <Typography component="span">{labelProp}</Typography>,
|
|
115
|
+
[labelProp, translate],
|
|
96
116
|
);
|
|
97
117
|
|
|
98
118
|
const onChange = useCallback<NonNullable<MuiRadioProps["onChange"]>>(
|
|
@@ -123,38 +143,57 @@ const Radio = ({
|
|
|
123
143
|
);
|
|
124
144
|
|
|
125
145
|
return (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
<>
|
|
147
|
+
<FormControlLabel
|
|
148
|
+
checked={isChecked}
|
|
149
|
+
className={isInvalid ? "Mui-error" : ""}
|
|
150
|
+
control={
|
|
151
|
+
<MuiRadio
|
|
152
|
+
inputProps={{
|
|
153
|
+
"aria-describedby": hintId,
|
|
154
|
+
"aria-disabled": isDisabled || isReadOnly,
|
|
155
|
+
"data-se": testId,
|
|
156
|
+
readOnly: isReadOnly,
|
|
157
|
+
tabIndex: isReadOnly ? 0 : undefined,
|
|
158
|
+
}}
|
|
159
|
+
inputRef={localInputRef}
|
|
160
|
+
onChange={onChange}
|
|
161
|
+
onClick={onClick || handleClick}
|
|
162
|
+
disabled={isDisabled}
|
|
163
|
+
/>
|
|
164
|
+
}
|
|
165
|
+
label={label}
|
|
166
|
+
name={name}
|
|
167
|
+
translate={translate}
|
|
168
|
+
value={value}
|
|
169
|
+
onBlur={onBlur}
|
|
170
|
+
disabled={isDisabled}
|
|
171
|
+
sx={{
|
|
172
|
+
...(isReadOnly && {
|
|
153
173
|
cursor: "default",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
174
|
+
"& .MuiTypography-root": {
|
|
175
|
+
cursor: "default",
|
|
176
|
+
},
|
|
177
|
+
}),
|
|
178
|
+
|
|
179
|
+
...(hint && {
|
|
180
|
+
// needed to override specific :not(:last-child) selector
|
|
181
|
+
":not(:last-child)": {
|
|
182
|
+
marginBlockEnd: 0,
|
|
183
|
+
},
|
|
184
|
+
}),
|
|
185
|
+
}}
|
|
186
|
+
/>
|
|
187
|
+
{hint && (
|
|
188
|
+
<HintContainerWithInlineStartSpacing
|
|
189
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
190
|
+
>
|
|
191
|
+
<FormHelperText id={hintId} translate={translate}>
|
|
192
|
+
{hint}
|
|
193
|
+
</FormHelperText>
|
|
194
|
+
</HintContainerWithInlineStartSpacing>
|
|
195
|
+
)}
|
|
196
|
+
</>
|
|
158
197
|
);
|
|
159
198
|
};
|
|
160
199
|
|
package/src/Typography.tsx
CHANGED
|
@@ -87,10 +87,16 @@ export type TypographyProps = {
|
|
|
87
87
|
variant?: keyof typeof typographyVariantMapping;
|
|
88
88
|
} & Pick<
|
|
89
89
|
HtmlProps,
|
|
90
|
-
|
|
90
|
+
| "ariaCurrent"
|
|
91
|
+
| "ariaDescribedBy"
|
|
92
|
+
| "ariaLabel"
|
|
93
|
+
| "ariaLabelledBy"
|
|
94
|
+
| "testId"
|
|
95
|
+
| "translate"
|
|
91
96
|
>;
|
|
92
97
|
|
|
93
98
|
const Typography = ({
|
|
99
|
+
ariaCurrent,
|
|
94
100
|
ariaDescribedBy,
|
|
95
101
|
ariaLabel,
|
|
96
102
|
ariaLabelledBy,
|
|
@@ -133,6 +139,7 @@ const Typography = ({
|
|
|
133
139
|
|
|
134
140
|
return (
|
|
135
141
|
<MuiTypography
|
|
142
|
+
aria-current={ariaCurrent}
|
|
136
143
|
aria-describedby={ariaDescribedBy}
|
|
137
144
|
aria-label={ariaLabel}
|
|
138
145
|
aria-labelledby={ariaLabelledBy}
|
|
@@ -152,6 +159,7 @@ const MemoizedTypography = memo(Typography);
|
|
|
152
159
|
MemoizedTypography.displayName = "Typography";
|
|
153
160
|
|
|
154
161
|
const Heading1 = ({
|
|
162
|
+
ariaCurrent,
|
|
155
163
|
ariaDescribedBy,
|
|
156
164
|
ariaLabel,
|
|
157
165
|
ariaLabelledBy,
|
|
@@ -162,6 +170,7 @@ const Heading1 = ({
|
|
|
162
170
|
translate,
|
|
163
171
|
}: TypographyProps) => (
|
|
164
172
|
<Typography
|
|
173
|
+
ariaCurrent={ariaCurrent}
|
|
165
174
|
ariaDescribedBy={ariaDescribedBy}
|
|
166
175
|
ariaLabel={ariaLabel}
|
|
167
176
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -178,6 +187,7 @@ const MemoizedHeading1 = memo(Heading1);
|
|
|
178
187
|
MemoizedHeading1.displayName = "Heading1";
|
|
179
188
|
|
|
180
189
|
const Heading2 = ({
|
|
190
|
+
ariaCurrent,
|
|
181
191
|
ariaDescribedBy,
|
|
182
192
|
ariaLabel,
|
|
183
193
|
ariaLabelledBy,
|
|
@@ -188,6 +198,7 @@ const Heading2 = ({
|
|
|
188
198
|
translate,
|
|
189
199
|
}: TypographyProps) => (
|
|
190
200
|
<Typography
|
|
201
|
+
ariaCurrent={ariaCurrent}
|
|
191
202
|
ariaDescribedBy={ariaDescribedBy}
|
|
192
203
|
ariaLabel={ariaLabel}
|
|
193
204
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -204,6 +215,7 @@ const MemoizedHeading2 = memo(Heading2);
|
|
|
204
215
|
MemoizedHeading2.displayName = "Heading2";
|
|
205
216
|
|
|
206
217
|
const Heading3 = ({
|
|
218
|
+
ariaCurrent,
|
|
207
219
|
ariaDescribedBy,
|
|
208
220
|
ariaLabel,
|
|
209
221
|
ariaLabelledBy,
|
|
@@ -214,6 +226,7 @@ const Heading3 = ({
|
|
|
214
226
|
translate,
|
|
215
227
|
}: TypographyProps) => (
|
|
216
228
|
<Typography
|
|
229
|
+
ariaCurrent={ariaCurrent}
|
|
217
230
|
ariaDescribedBy={ariaDescribedBy}
|
|
218
231
|
ariaLabel={ariaLabel}
|
|
219
232
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -230,6 +243,7 @@ const MemoizedHeading3 = memo(Heading3);
|
|
|
230
243
|
MemoizedHeading3.displayName = "Heading3";
|
|
231
244
|
|
|
232
245
|
const Heading4 = ({
|
|
246
|
+
ariaCurrent,
|
|
233
247
|
ariaDescribedBy,
|
|
234
248
|
ariaLabel,
|
|
235
249
|
ariaLabelledBy,
|
|
@@ -240,6 +254,7 @@ const Heading4 = ({
|
|
|
240
254
|
translate,
|
|
241
255
|
}: TypographyProps) => (
|
|
242
256
|
<Typography
|
|
257
|
+
ariaCurrent={ariaCurrent}
|
|
243
258
|
ariaDescribedBy={ariaDescribedBy}
|
|
244
259
|
ariaLabel={ariaLabel}
|
|
245
260
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -256,6 +271,7 @@ const MemoizedHeading4 = memo(Heading4);
|
|
|
256
271
|
MemoizedHeading4.displayName = "Heading4";
|
|
257
272
|
|
|
258
273
|
const Heading5 = ({
|
|
274
|
+
ariaCurrent,
|
|
259
275
|
ariaDescribedBy,
|
|
260
276
|
ariaLabel,
|
|
261
277
|
ariaLabelledBy,
|
|
@@ -266,6 +282,7 @@ const Heading5 = ({
|
|
|
266
282
|
translate,
|
|
267
283
|
}: TypographyProps) => (
|
|
268
284
|
<Typography
|
|
285
|
+
ariaCurrent={ariaCurrent}
|
|
269
286
|
ariaDescribedBy={ariaDescribedBy}
|
|
270
287
|
ariaLabel={ariaLabel}
|
|
271
288
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -282,6 +299,7 @@ const MemoizedHeading5 = memo(Heading5);
|
|
|
282
299
|
MemoizedHeading5.displayName = "Heading5";
|
|
283
300
|
|
|
284
301
|
const Heading6 = ({
|
|
302
|
+
ariaCurrent,
|
|
285
303
|
ariaDescribedBy,
|
|
286
304
|
ariaLabel,
|
|
287
305
|
ariaLabelledBy,
|
|
@@ -292,6 +310,7 @@ const Heading6 = ({
|
|
|
292
310
|
translate,
|
|
293
311
|
}: TypographyProps) => (
|
|
294
312
|
<Typography
|
|
313
|
+
ariaCurrent={ariaCurrent}
|
|
295
314
|
ariaDescribedBy={ariaDescribedBy}
|
|
296
315
|
ariaLabel={ariaLabel}
|
|
297
316
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -308,6 +327,7 @@ const MemoizedHeading6 = memo(Heading6);
|
|
|
308
327
|
MemoizedHeading6.displayName = "Heading6";
|
|
309
328
|
|
|
310
329
|
const Paragraph = ({
|
|
330
|
+
ariaCurrent,
|
|
311
331
|
ariaDescribedBy,
|
|
312
332
|
ariaLabel,
|
|
313
333
|
ariaLabelledBy,
|
|
@@ -318,6 +338,7 @@ const Paragraph = ({
|
|
|
318
338
|
translate,
|
|
319
339
|
}: TypographyProps) => (
|
|
320
340
|
<Typography
|
|
341
|
+
ariaCurrent={ariaCurrent}
|
|
321
342
|
ariaDescribedBy={ariaDescribedBy}
|
|
322
343
|
ariaLabel={ariaLabel}
|
|
323
344
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -334,6 +355,7 @@ const MemoizedParagraph = memo(Paragraph);
|
|
|
334
355
|
MemoizedParagraph.displayName = "Paragraph";
|
|
335
356
|
|
|
336
357
|
const Subordinate = ({
|
|
358
|
+
ariaCurrent,
|
|
337
359
|
ariaDescribedBy,
|
|
338
360
|
ariaLabel,
|
|
339
361
|
ariaLabelledBy,
|
|
@@ -344,6 +366,7 @@ const Subordinate = ({
|
|
|
344
366
|
translate,
|
|
345
367
|
}: TypographyProps) => (
|
|
346
368
|
<Typography
|
|
369
|
+
ariaCurrent={ariaCurrent}
|
|
347
370
|
ariaDescribedBy={ariaDescribedBy}
|
|
348
371
|
ariaLabel={ariaLabel}
|
|
349
372
|
ariaLabelledBy={ariaLabelledBy}
|
|
@@ -360,6 +383,7 @@ const MemoizedSubordinate = memo(Subordinate);
|
|
|
360
383
|
MemoizedSubordinate.displayName = "Subordinate";
|
|
361
384
|
|
|
362
385
|
const Support = ({
|
|
386
|
+
ariaCurrent,
|
|
363
387
|
ariaDescribedBy,
|
|
364
388
|
ariaLabel,
|
|
365
389
|
ariaLabelledBy,
|
|
@@ -370,6 +394,7 @@ const Support = ({
|
|
|
370
394
|
translate,
|
|
371
395
|
}: TypographyProps) => (
|
|
372
396
|
<Typography
|
|
397
|
+
ariaCurrent={ariaCurrent}
|
|
373
398
|
ariaDescribedBy={ariaDescribedBy}
|
|
374
399
|
ariaLabel={ariaLabel}
|
|
375
400
|
ariaLabelledBy={ariaLabelledBy}
|