@okta/odyssey-react-mui 1.20.0 → 1.21.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 +43 -0
- package/dist/DataTable/DataTable.js +101 -63
- package/dist/DataTable/DataTable.js.map +1 -1
- package/dist/Pagination/Pagination.js +29 -20
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Pagination/usePagination.js +13 -22
- package/dist/Pagination/usePagination.js.map +1 -1
- package/dist/assertEnv.js +1 -1
- package/dist/index.scss +1 -1
- package/dist/labs/DataComponents/DataStack.js +6 -0
- package/dist/labs/DataComponents/DataStack.js.map +1 -1
- package/dist/labs/DataComponents/DataTable.js +6 -0
- package/dist/labs/DataComponents/DataTable.js.map +1 -1
- package/dist/labs/DataComponents/DataView.js +15 -1
- package/dist/labs/DataComponents/DataView.js.map +1 -1
- package/dist/labs/DataComponents/TableContent.js +49 -3
- package/dist/labs/DataComponents/TableContent.js.map +1 -1
- package/dist/labs/DataComponents/TableSettings.js +28 -38
- package/dist/labs/DataComponents/TableSettings.js.map +1 -1
- package/dist/labs/DataComponents/componentTypes.js.map +1 -1
- package/dist/labs/DataComponents/constants.js.map +1 -1
- package/dist/labs/DataComponents/tableConstants.js +0 -19
- package/dist/labs/DataComponents/tableConstants.js.map +1 -1
- package/dist/labs/DataComponents/useFilterConversion.js +8 -15
- package/dist/labs/DataComponents/useFilterConversion.js.map +1 -1
- package/dist/labs/DateField.js +97 -10
- package/dist/labs/DateField.js.map +1 -1
- package/dist/labs/DatePicker.js +113 -51
- package/dist/labs/DatePicker.js.map +1 -1
- package/dist/labs/TimeZonePicker.js +37 -0
- package/dist/labs/TimeZonePicker.js.map +1 -0
- package/dist/labs/TopNav.js +280 -0
- package/dist/labs/TopNav.js.map +1 -0
- package/dist/labs/datePickerTheme.js +8 -5
- package/dist/labs/datePickerTheme.js.map +1 -1
- package/dist/labs/index.js +1 -0
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/{useDatePickerTranslations.js → useDateFieldsTranslations.js} +2 -2
- package/dist/labs/{useDatePickerTranslations.js.map → useDateFieldsTranslations.js.map} +1 -1
- package/dist/labs/useOdysseyDateFields.js +101 -0
- package/dist/labs/useOdysseyDateFields.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui.js +3 -0
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +2 -1
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Badge.d.ts +0 -1
- package/dist/src/Badge.d.ts.map +1 -1
- package/dist/src/Banner.d.ts +0 -1
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/ButtonContext.d.ts +0 -1
- package/dist/src/ButtonContext.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +0 -1
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CircularProgress.d.ts +0 -1
- package/dist/src/CircularProgress.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.d.ts +14 -1
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/useRowReordering.d.ts.map +1 -1
- package/dist/src/ErrorMessageList.d.ts +0 -1
- package/dist/src/ErrorMessageList.d.ts.map +1 -1
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FieldError.d.ts +0 -1
- package/dist/src/FieldError.d.ts.map +1 -1
- package/dist/src/FieldHint.d.ts +0 -1
- package/dist/src/FieldHint.d.ts.map +1 -1
- package/dist/src/FieldLabel.d.ts +0 -1
- package/dist/src/FieldLabel.d.ts.map +1 -1
- package/dist/src/FieldsetContext.d.ts +0 -1
- package/dist/src/FieldsetContext.d.ts.map +1 -1
- package/dist/src/HintLink.d.ts +0 -1
- package/dist/src/HintLink.d.ts.map +1 -1
- package/dist/src/MuiPropsContext.d.ts +0 -1
- package/dist/src/MuiPropsContext.d.ts.map +1 -1
- package/dist/src/NativeSelect.d.ts +4 -4
- package/dist/src/NativeSelect.d.ts.map +1 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts +0 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +2 -1
- package/dist/src/OdysseyProvider.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/Pagination/Pagination.d.ts +41 -26
- package/dist/src/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/Pagination/usePagination.d.ts +2 -1
- package/dist/src/Pagination/usePagination.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +10 -10
- package/dist/src/PasswordField.d.ts.map +1 -1
- package/dist/src/Radio.d.ts +0 -1
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +11 -11
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/Select.d.ts +0 -1
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Status.d.ts +0 -1
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/TagListContext.d.ts +0 -1
- package/dist/src/TagListContext.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +12 -12
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +0 -1
- package/dist/src/Toast.d.ts.map +1 -1
- package/dist/src/icons.generated/Add.d.ts +0 -1
- package/dist/src/icons.generated/Add.d.ts.map +1 -1
- package/dist/src/icons.generated/AddCircle.d.ts +0 -1
- package/dist/src/icons.generated/AddCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/Apps.d.ts +0 -1
- package/dist/src/icons.generated/Apps.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts +0 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowDown.d.ts +0 -1
- package/dist/src/icons.generated/ArrowDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLowerLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLowerLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLowerRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLowerRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowTop.d.ts +0 -1
- package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUnsorted.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUnsorted.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUp.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUp.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUpperLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUpperLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUpperRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUpperRight.d.ts.map +1 -1
- package/dist/src/icons.generated/Bug.d.ts +0 -1
- package/dist/src/icons.generated/Bug.d.ts.map +1 -1
- package/dist/src/icons.generated/Calendar.d.ts +0 -1
- package/dist/src/icons.generated/Calendar.d.ts.map +1 -1
- package/dist/src/icons.generated/Call.d.ts +0 -1
- package/dist/src/icons.generated/Call.d.ts.map +1 -1
- package/dist/src/icons.generated/Chat.d.ts +0 -1
- package/dist/src/icons.generated/Chat.d.ts.map +1 -1
- package/dist/src/icons.generated/Check.d.ts +0 -1
- package/dist/src/icons.generated/Check.d.ts.map +1 -1
- package/dist/src/icons.generated/CheckCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/CheckCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronDown.d.ts +0 -1
- package/dist/src/icons.generated/ChevronDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronLeft.d.ts +0 -1
- package/dist/src/icons.generated/ChevronLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronRight.d.ts +0 -1
- package/dist/src/icons.generated/ChevronRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronUp.d.ts +0 -1
- package/dist/src/icons.generated/ChevronUp.d.ts.map +1 -1
- package/dist/src/icons.generated/Clock.d.ts +0 -1
- package/dist/src/icons.generated/Clock.d.ts.map +1 -1
- package/dist/src/icons.generated/Close.d.ts +0 -1
- package/dist/src/icons.generated/Close.d.ts.map +1 -1
- package/dist/src/icons.generated/CloseCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/CloseCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/CollapseLeft.d.ts +0 -1
- package/dist/src/icons.generated/CollapseLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/CollapseRight.d.ts +0 -1
- package/dist/src/icons.generated/CollapseRight.d.ts.map +1 -1
- package/dist/src/icons.generated/Copy.d.ts +0 -1
- package/dist/src/icons.generated/Copy.d.ts.map +1 -1
- package/dist/src/icons.generated/Custom.d.ts +0 -1
- package/dist/src/icons.generated/Custom.d.ts.map +1 -1
- package/dist/src/icons.generated/DangerDiamond.d.ts +0 -1
- package/dist/src/icons.generated/DangerDiamond.d.ts.map +1 -1
- package/dist/src/icons.generated/DangerDiamondFilled.d.ts +0 -1
- package/dist/src/icons.generated/DangerDiamondFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Delete.d.ts +0 -1
- package/dist/src/icons.generated/Delete.d.ts.map +1 -1
- package/dist/src/icons.generated/Deny.d.ts +0 -1
- package/dist/src/icons.generated/Deny.d.ts.map +1 -1
- package/dist/src/icons.generated/Devices.d.ts +0 -1
- package/dist/src/icons.generated/Devices.d.ts.map +1 -1
- package/dist/src/icons.generated/Directory.d.ts +0 -1
- package/dist/src/icons.generated/Directory.d.ts.map +1 -1
- package/dist/src/icons.generated/Documentation.d.ts +0 -1
- package/dist/src/icons.generated/Documentation.d.ts.map +1 -1
- package/dist/src/icons.generated/Download.d.ts +0 -1
- package/dist/src/icons.generated/Download.d.ts.map +1 -1
- package/dist/src/icons.generated/DragIndicator.d.ts +0 -1
- package/dist/src/icons.generated/DragIndicator.d.ts.map +1 -1
- package/dist/src/icons.generated/Duo.d.ts +0 -1
- package/dist/src/icons.generated/Duo.d.ts.map +1 -1
- package/dist/src/icons.generated/Edit.d.ts +0 -1
- package/dist/src/icons.generated/Edit.d.ts.map +1 -1
- package/dist/src/icons.generated/Email.d.ts +0 -1
- package/dist/src/icons.generated/Email.d.ts.map +1 -1
- package/dist/src/icons.generated/ExpandLeft.d.ts +0 -1
- package/dist/src/icons.generated/ExpandLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ExpandRight.d.ts +0 -1
- package/dist/src/icons.generated/ExpandRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ExternalLink.d.ts +0 -1
- package/dist/src/icons.generated/ExternalLink.d.ts.map +1 -1
- package/dist/src/icons.generated/Fido2.d.ts +0 -1
- package/dist/src/icons.generated/Fido2.d.ts.map +1 -1
- package/dist/src/icons.generated/Filter.d.ts +0 -1
- package/dist/src/icons.generated/Filter.d.ts.map +1 -1
- package/dist/src/icons.generated/Folder.d.ts +0 -1
- package/dist/src/icons.generated/Folder.d.ts.map +1 -1
- package/dist/src/icons.generated/Globe.d.ts +0 -1
- package/dist/src/icons.generated/Globe.d.ts.map +1 -1
- package/dist/src/icons.generated/GoogleAuth.d.ts +0 -1
- package/dist/src/icons.generated/GoogleAuth.d.ts.map +1 -1
- package/dist/src/icons.generated/Grid.d.ts +0 -1
- package/dist/src/icons.generated/Grid.d.ts.map +1 -1
- package/dist/src/icons.generated/Group.d.ts +0 -1
- package/dist/src/icons.generated/Group.d.ts.map +1 -1
- package/dist/src/icons.generated/Hide.d.ts +0 -1
- package/dist/src/icons.generated/Hide.d.ts.map +1 -1
- package/dist/src/icons.generated/Home.d.ts +0 -1
- package/dist/src/icons.generated/Home.d.ts.map +1 -1
- package/dist/src/icons.generated/Idp.d.ts +0 -1
- package/dist/src/icons.generated/Idp.d.ts.map +1 -1
- package/dist/src/icons.generated/InformationCircle.d.ts +0 -1
- package/dist/src/icons.generated/InformationCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/InformationCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/InformationCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Link.d.ts +0 -1
- package/dist/src/icons.generated/Link.d.ts.map +1 -1
- package/dist/src/icons.generated/List.d.ts +0 -1
- package/dist/src/icons.generated/List.d.ts.map +1 -1
- package/dist/src/icons.generated/Lock.d.ts +0 -1
- package/dist/src/icons.generated/Lock.d.ts.map +1 -1
- package/dist/src/icons.generated/More.d.ts +0 -1
- package/dist/src/icons.generated/More.d.ts.map +1 -1
- package/dist/src/icons.generated/Notification.d.ts +0 -1
- package/dist/src/icons.generated/Notification.d.ts.map +1 -1
- package/dist/src/icons.generated/OktaVerify.d.ts +0 -1
- package/dist/src/icons.generated/OktaVerify.d.ts.map +1 -1
- package/dist/src/icons.generated/OnPremMfa.d.ts +0 -1
- package/dist/src/icons.generated/OnPremMfa.d.ts.map +1 -1
- package/dist/src/icons.generated/OneTimePassword.d.ts +0 -1
- package/dist/src/icons.generated/OneTimePassword.d.ts.map +1 -1
- package/dist/src/icons.generated/Password.d.ts +0 -1
- package/dist/src/icons.generated/Password.d.ts.map +1 -1
- package/dist/src/icons.generated/Pause.d.ts +0 -1
- package/dist/src/icons.generated/Pause.d.ts.map +1 -1
- package/dist/src/icons.generated/QuestionCircle.d.ts +0 -1
- package/dist/src/icons.generated/QuestionCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/QuestionCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/QuestionCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Refresh.d.ts +0 -1
- package/dist/src/icons.generated/Refresh.d.ts.map +1 -1
- package/dist/src/icons.generated/Reset.d.ts +0 -1
- package/dist/src/icons.generated/Reset.d.ts.map +1 -1
- package/dist/src/icons.generated/Resume.d.ts +0 -1
- package/dist/src/icons.generated/Resume.d.ts.map +1 -1
- package/dist/src/icons.generated/Search.d.ts +0 -1
- package/dist/src/icons.generated/Search.d.ts.map +1 -1
- package/dist/src/icons.generated/SecurityQuestion.d.ts +0 -1
- package/dist/src/icons.generated/SecurityQuestion.d.ts.map +1 -1
- package/dist/src/icons.generated/Server.d.ts +0 -1
- package/dist/src/icons.generated/Server.d.ts.map +1 -1
- package/dist/src/icons.generated/Settings.d.ts +0 -1
- package/dist/src/icons.generated/Settings.d.ts.map +1 -1
- package/dist/src/icons.generated/Show.d.ts +0 -1
- package/dist/src/icons.generated/Show.d.ts.map +1 -1
- package/dist/src/icons.generated/SmartCard.d.ts +0 -1
- package/dist/src/icons.generated/SmartCard.d.ts.map +1 -1
- package/dist/src/icons.generated/Sms.d.ts +0 -1
- package/dist/src/icons.generated/Sms.d.ts.map +1 -1
- package/dist/src/icons.generated/Subtract.d.ts +0 -1
- package/dist/src/icons.generated/Subtract.d.ts.map +1 -1
- package/dist/src/icons.generated/SymantecVip.d.ts +0 -1
- package/dist/src/icons.generated/SymantecVip.d.ts.map +1 -1
- package/dist/src/icons.generated/Sync.d.ts +0 -1
- package/dist/src/icons.generated/Sync.d.ts.map +1 -1
- package/dist/src/icons.generated/ThumbsDown.d.ts +0 -1
- package/dist/src/icons.generated/ThumbsDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ThumbsUp.d.ts +0 -1
- package/dist/src/icons.generated/ThumbsUp.d.ts.map +1 -1
- package/dist/src/icons.generated/Unlock.d.ts +0 -1
- package/dist/src/icons.generated/Unlock.d.ts.map +1 -1
- package/dist/src/icons.generated/Upload.d.ts +0 -1
- package/dist/src/icons.generated/Upload.d.ts.map +1 -1
- package/dist/src/icons.generated/User.d.ts +0 -1
- package/dist/src/icons.generated/User.d.ts.map +1 -1
- package/dist/src/icons.generated/Video.d.ts +0 -1
- package/dist/src/icons.generated/Video.d.ts.map +1 -1
- package/dist/src/icons.generated/VoiceCall.d.ts +0 -1
- package/dist/src/icons.generated/VoiceCall.d.ts.map +1 -1
- package/dist/src/icons.generated/Warning.d.ts +0 -1
- package/dist/src/icons.generated/Warning.d.ts.map +1 -1
- package/dist/src/icons.generated/WarningFilled.d.ts +0 -1
- package/dist/src/icons.generated/WarningFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Yubikey.d.ts +0 -1
- package/dist/src/icons.generated/Yubikey.d.ts.map +1 -1
- package/dist/src/inputUtils.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataStack.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataStack.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataTable.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataTable.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataView.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataView.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts +0 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/TableContent.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/TableSettings.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/componentTypes.d.ts +5 -2
- package/dist/src/labs/DataComponents/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/constants.d.ts +6 -4
- package/dist/src/labs/DataComponents/constants.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/tableConstants.d.ts +6 -25
- package/dist/src/labs/DataComponents/tableConstants.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +1 -1
- package/dist/src/labs/DataTablePagination.d.ts +0 -1
- package/dist/src/labs/DataTablePagination.d.ts.map +1 -1
- package/dist/src/labs/DateField.d.ts +3 -6
- package/dist/src/labs/DateField.d.ts.map +1 -1
- package/dist/src/labs/DatePicker.d.ts +20 -19
- package/dist/src/labs/DatePicker.d.ts.map +1 -1
- package/dist/src/labs/FileUpload.d.ts +0 -1
- package/dist/src/labs/FileUpload.d.ts.map +1 -1
- package/dist/src/labs/FileUploadIllustration.d.ts +0 -1
- package/dist/src/labs/FileUploadIllustration.d.ts.map +1 -1
- package/dist/src/labs/FileUploadPreview.d.ts +0 -1
- package/dist/src/labs/FileUploadPreview.d.ts.map +1 -1
- package/dist/src/labs/GroupPicker.d.ts +2 -1
- package/dist/src/labs/GroupPicker.d.ts.map +1 -1
- package/dist/src/labs/PaginatedTable.d.ts +2 -1
- package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
- package/dist/src/labs/StaticTable.d.ts +2 -1
- package/dist/src/labs/StaticTable.d.ts.map +1 -1
- package/dist/src/labs/Switch.d.ts +0 -1
- package/dist/src/labs/Switch.d.ts.map +1 -1
- package/dist/src/labs/TimeZonePicker.d.ts +22 -0
- package/dist/src/labs/TimeZonePicker.d.ts.map +1 -0
- package/dist/src/labs/TopNav.d.ts +77 -0
- package/dist/src/labs/TopNav.d.ts.map +1 -0
- package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +1 -0
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/labs/{useDatePickerTranslations.d.ts → useDateFieldsTranslations.d.ts} +3 -2
- package/dist/src/labs/useDateFieldsTranslations.d.ts.map +1 -0
- package/dist/src/labs/useOdysseyDateFields.d.ts +82 -0
- package/dist/src/labs/useOdysseyDateFields.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +3 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/test-selectors/querySelector.d.ts +2 -2
- package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +44 -9
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/DataTable/DataTable.tsx +118 -64
- package/src/Pagination/Pagination.tsx +82 -46
- package/src/Pagination/usePagination.ts +14 -18
- package/src/labs/DataComponents/DataStack.tsx +6 -0
- package/src/labs/DataComponents/DataTable.tsx +6 -0
- package/src/labs/DataComponents/DataView.tsx +16 -0
- package/src/labs/DataComponents/TableContent.tsx +66 -9
- package/src/labs/DataComponents/TableSettings.tsx +60 -60
- package/src/labs/DataComponents/componentTypes.ts +5 -6
- package/src/labs/DataComponents/constants.tsx +12 -4
- package/src/labs/DataComponents/tableConstants.tsx +0 -19
- package/src/labs/DataComponents/useFilterConversion.ts +14 -18
- package/src/labs/DateField.tsx +175 -26
- package/src/labs/DatePicker.tsx +155 -93
- package/src/labs/TimeZonePicker.tsx +55 -0
- package/src/labs/TopNav.tsx +394 -0
- package/src/labs/datePickerTheme.tsx +6 -4
- package/src/labs/index.ts +1 -0
- package/src/labs/{useDatePickerTranslations.ts → useDateFieldsTranslations.ts} +3 -1
- package/src/labs/useOdysseyDateFields.ts +201 -0
- package/src/properties/odyssey-react-mui.properties +3 -0
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/theme/components.tsx +50 -7
- package/dist/src/labs/useDatePickerTranslations.d.ts.map +0 -1
package/src/labs/DatePicker.tsx
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
ChangeEventHandler,
|
|
14
|
+
FocusEventHandler,
|
|
16
15
|
memo,
|
|
17
16
|
useCallback,
|
|
18
17
|
useEffect,
|
|
@@ -31,7 +30,6 @@ import {
|
|
|
31
30
|
} from "@mui/x-date-pickers";
|
|
32
31
|
import { DateTime } from "luxon";
|
|
33
32
|
import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
|
|
34
|
-
import { InputAdornment } from "@mui/material";
|
|
35
33
|
import styled from "@emotion/styled";
|
|
36
34
|
|
|
37
35
|
import { Button } from "../Button";
|
|
@@ -49,21 +47,34 @@ import {
|
|
|
49
47
|
DesignTokens,
|
|
50
48
|
} from "../OdysseyDesignTokensContext";
|
|
51
49
|
import { OdysseyThemeProvider } from "../OdysseyThemeProvider";
|
|
52
|
-
import {
|
|
50
|
+
import { TimeZonePicker, TimeZonePickerProps } from "./TimeZonePicker";
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
import {
|
|
53
|
+
useOdysseyDateFields,
|
|
54
|
+
OdysseyDateFieldProps,
|
|
55
|
+
TimeZoneOption,
|
|
56
|
+
} from "./useOdysseyDateFields";
|
|
56
57
|
|
|
58
|
+
const DatePickerContainer = styled.div({
|
|
57
59
|
".MuiFormControl-root": {
|
|
58
60
|
marginBlockEnd: 0,
|
|
59
61
|
},
|
|
60
62
|
});
|
|
61
63
|
|
|
62
|
-
const DatePickerWidthContainer = styled.div
|
|
64
|
+
const DatePickerWidthContainer = styled.div<{
|
|
65
|
+
odysseyDesignTokens: DesignTokens;
|
|
66
|
+
}>(({ odysseyDesignTokens }) => ({
|
|
63
67
|
".MuiInput-root": {
|
|
64
|
-
width:
|
|
68
|
+
width: "100%",
|
|
69
|
+
maxWidth: odysseyDesignTokens.TypographyLineLengthMax,
|
|
65
70
|
},
|
|
66
|
-
});
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
const TimeZonePickerContainer = styled("div", {
|
|
74
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
75
|
+
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
76
|
+
marginBlockStart: odysseyDesignTokens.Spacing3,
|
|
77
|
+
}));
|
|
67
78
|
|
|
68
79
|
const ActionContainer = styled.div<{ odysseyDesignTokens: DesignTokens }>(
|
|
69
80
|
({ odysseyDesignTokens }) => ({
|
|
@@ -102,8 +113,6 @@ const ActionBar = ({ actions, onAccept, onCancel }: PickersActionBarProps) => {
|
|
|
102
113
|
const MemoizedActionBar = memo(ActionBar);
|
|
103
114
|
MemoizedActionBar.displayName = "ActionBar";
|
|
104
115
|
|
|
105
|
-
const formatDateToDateTime = (date: Date) => DateTime.fromJSDate(date);
|
|
106
|
-
|
|
107
116
|
const formatDayOfWeek = (date: DateTime) => date.toFormat("EEE");
|
|
108
117
|
|
|
109
118
|
type RenderDateFieldProps = {
|
|
@@ -113,34 +122,40 @@ type RenderDateFieldProps = {
|
|
|
113
122
|
|
|
114
123
|
export type DatePickerProps = {
|
|
115
124
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
125
|
+
* The label for the `input` element.
|
|
119
126
|
*/
|
|
120
|
-
|
|
127
|
+
label: string;
|
|
121
128
|
/**
|
|
122
|
-
*
|
|
129
|
+
* Callback fired when the a date field loses focus
|
|
123
130
|
*/
|
|
124
|
-
|
|
131
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
125
132
|
/**
|
|
126
|
-
*
|
|
133
|
+
* Callback fired when the a date is selected with the calendar.
|
|
127
134
|
*/
|
|
128
|
-
|
|
135
|
+
onCalendarDateChange?: ({
|
|
136
|
+
value,
|
|
137
|
+
timeZone,
|
|
138
|
+
}: {
|
|
139
|
+
value: string | undefined;
|
|
140
|
+
timeZone: string;
|
|
141
|
+
}) => void;
|
|
129
142
|
/**
|
|
130
|
-
*
|
|
143
|
+
* Callback fired when the date/text input changes.
|
|
131
144
|
*/
|
|
132
|
-
|
|
145
|
+
onInputChange?: (value: string) => void;
|
|
133
146
|
/**
|
|
134
|
-
*
|
|
147
|
+
* If provided, a `TimeZonePicker` will be rendered below the DatePicker. These options will populate as the Autocomplete options
|
|
135
148
|
*/
|
|
136
|
-
|
|
149
|
+
timeZoneOptions?: TimeZoneOption[];
|
|
137
150
|
/**
|
|
138
|
-
*
|
|
151
|
+
* label for `TimeZonePicker`
|
|
139
152
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
timeZonePickerLabel?: TimeZonePickerProps["label"];
|
|
154
|
+
} & OdysseyDateFieldProps &
|
|
155
|
+
Pick<
|
|
156
|
+
FieldComponentProps,
|
|
157
|
+
"errorMessage" | "hint" | "isDisabled" | "isReadOnly"
|
|
158
|
+
>;
|
|
144
159
|
|
|
145
160
|
const DatePicker = ({
|
|
146
161
|
defaultValue: defaultValueProp,
|
|
@@ -148,109 +163,138 @@ const DatePicker = ({
|
|
|
148
163
|
hint,
|
|
149
164
|
isDateEnabled = () => true,
|
|
150
165
|
isDisabled,
|
|
166
|
+
isReadOnly,
|
|
151
167
|
isMonthEnabled = () => true,
|
|
152
168
|
isYearEnabled = () => true,
|
|
153
169
|
label,
|
|
154
|
-
minDate,
|
|
155
|
-
maxDate,
|
|
170
|
+
minDate: minDateProp,
|
|
171
|
+
maxDate: maxDateProp,
|
|
172
|
+
onBlur,
|
|
156
173
|
onCalendarDateChange,
|
|
157
174
|
onInputChange: onInputChangeProp,
|
|
175
|
+
timeZone,
|
|
176
|
+
timeZonePickerLabel,
|
|
177
|
+
timeZoneOptions,
|
|
158
178
|
value: valueProp,
|
|
159
179
|
}: DatePickerProps) => {
|
|
180
|
+
const { i18n, t } = useTranslation();
|
|
181
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
182
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
183
|
+
|
|
184
|
+
const {
|
|
185
|
+
defaultedLanguageCode,
|
|
186
|
+
formatDateTimeToUtcIsoDateString,
|
|
187
|
+
inputValues,
|
|
188
|
+
internalTimeZone,
|
|
189
|
+
isValidTimeZone,
|
|
190
|
+
localeText,
|
|
191
|
+
minDate,
|
|
192
|
+
maxDate,
|
|
193
|
+
setInternalTimeZone,
|
|
194
|
+
shouldDisableDate,
|
|
195
|
+
shouldDisableMonth,
|
|
196
|
+
shouldDisableYear,
|
|
197
|
+
} = useOdysseyDateFields({
|
|
198
|
+
defaultValue: defaultValueProp,
|
|
199
|
+
errorMessage,
|
|
200
|
+
isDateEnabled,
|
|
201
|
+
isMonthEnabled,
|
|
202
|
+
isYearEnabled,
|
|
203
|
+
minDate: minDateProp,
|
|
204
|
+
maxDate: maxDateProp,
|
|
205
|
+
timeZone,
|
|
206
|
+
value: valueProp,
|
|
207
|
+
});
|
|
160
208
|
const [isOpen, setIsOpen] = useState(false);
|
|
161
209
|
const [popperElement, setPopperElement] = useState<HTMLInputElement | null>();
|
|
162
210
|
|
|
163
|
-
const { i18n, t } = useTranslation();
|
|
164
211
|
const { language } = i18n;
|
|
165
|
-
|
|
166
|
-
const invalidLocales = ["ok_PL", "ok_SK"];
|
|
167
|
-
// In the Applitools env the language code is `en-us@posix`. Need to check for that
|
|
168
|
-
const isInvalidLocale =
|
|
169
|
-
invalidLocales.includes(language) || language.includes("@");
|
|
170
|
-
|
|
171
212
|
const containerRef = useRef<HTMLInputElement>(null);
|
|
172
213
|
|
|
173
|
-
const localeText = useDatePickerTranslations();
|
|
174
|
-
|
|
175
214
|
useEffect(() => {
|
|
176
215
|
setPopperElement(containerRef.current);
|
|
177
216
|
}, []);
|
|
178
217
|
|
|
179
|
-
const
|
|
218
|
+
const formatDateTimeToJsDateStringOnCalendarSelection = useCallback<
|
|
180
219
|
NonNullable<MuiDatePickerProps<DateTime>["onChange"]>
|
|
181
220
|
>(
|
|
182
221
|
(value) => {
|
|
183
222
|
if (value) {
|
|
184
|
-
const
|
|
185
|
-
|
|
223
|
+
const dateStringFromDateTime = formatDateTimeToUtcIsoDateString(value);
|
|
224
|
+
|
|
225
|
+
if (dateStringFromDateTime) {
|
|
226
|
+
onCalendarDateChange?.({
|
|
227
|
+
value: dateStringFromDateTime,
|
|
228
|
+
timeZone: internalTimeZone,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
186
231
|
}
|
|
187
232
|
},
|
|
188
|
-
[onCalendarDateChange],
|
|
233
|
+
[formatDateTimeToUtcIsoDateString, internalTimeZone, onCalendarDateChange],
|
|
189
234
|
);
|
|
190
235
|
|
|
191
|
-
const onInputChange = useCallback<
|
|
192
|
-
(
|
|
193
|
-
|
|
236
|
+
const onInputChange = useCallback<(value: string) => void>(
|
|
237
|
+
(value) => {
|
|
238
|
+
onInputChangeProp?.(value);
|
|
239
|
+
},
|
|
240
|
+
[onInputChangeProp],
|
|
241
|
+
);
|
|
194
242
|
|
|
195
243
|
const toggleCalendarVisibility = useCallback(
|
|
196
244
|
() => setIsOpen(!isOpen),
|
|
197
245
|
[isOpen],
|
|
198
246
|
);
|
|
199
247
|
|
|
200
|
-
const
|
|
201
|
-
(
|
|
202
|
-
|
|
203
|
-
);
|
|
204
|
-
|
|
205
|
-
const shouldDisableMonth = useCallback(
|
|
206
|
-
(date: DateTime) => !isMonthEnabled(new Date(date?.toJSDate())) || false,
|
|
207
|
-
[isMonthEnabled],
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
const shouldDisableYear = useCallback(
|
|
211
|
-
(date: DateTime) => !isYearEnabled(new Date(date?.toJSDate())) || false,
|
|
212
|
-
[isYearEnabled],
|
|
213
|
-
);
|
|
248
|
+
const resetIsOpen = useCallback(() => {
|
|
249
|
+
setIsOpen(false);
|
|
250
|
+
}, []);
|
|
214
251
|
|
|
215
252
|
const renderDateField = useCallback(
|
|
216
|
-
({ defaultValue, value }: RenderDateFieldProps) =>
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
253
|
+
({ defaultValue, inputRef, value }: RenderDateFieldProps) => {
|
|
254
|
+
return (
|
|
255
|
+
<DateField
|
|
256
|
+
defaultValue={defaultValue}
|
|
257
|
+
endAdornment={
|
|
221
258
|
<Button
|
|
222
259
|
ariaLabel={t("picker.labels.date.choose")}
|
|
223
260
|
label=""
|
|
261
|
+
onClick={toggleCalendarVisibility}
|
|
224
262
|
size="small"
|
|
225
263
|
startIcon={<CalendarIcon />}
|
|
226
264
|
variant="floating"
|
|
227
|
-
onClick={toggleCalendarVisibility}
|
|
228
265
|
/>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
266
|
+
}
|
|
267
|
+
errorMessage={errorMessage}
|
|
268
|
+
hint={hint}
|
|
269
|
+
inputRef={inputRef}
|
|
270
|
+
isDisabled={isDisabled}
|
|
271
|
+
isReadOnly={isReadOnly}
|
|
272
|
+
label={label}
|
|
273
|
+
onBlur={onBlur}
|
|
274
|
+
minDate={minDate}
|
|
275
|
+
maxDate={maxDate}
|
|
276
|
+
onChange={onInputChange}
|
|
277
|
+
timezone={internalTimeZone}
|
|
278
|
+
value={value}
|
|
279
|
+
/>
|
|
280
|
+
);
|
|
281
|
+
},
|
|
239
282
|
[
|
|
240
283
|
errorMessage,
|
|
241
284
|
hint,
|
|
285
|
+
internalTimeZone,
|
|
242
286
|
isDisabled,
|
|
287
|
+
isReadOnly,
|
|
243
288
|
label,
|
|
289
|
+
onBlur,
|
|
244
290
|
onInputChange,
|
|
291
|
+
minDate,
|
|
292
|
+
maxDate,
|
|
245
293
|
t,
|
|
246
294
|
toggleCalendarVisibility,
|
|
247
295
|
],
|
|
248
296
|
);
|
|
249
297
|
|
|
250
|
-
const resetIsOpen = useCallback(() => {
|
|
251
|
-
setIsOpen(false);
|
|
252
|
-
}, []);
|
|
253
|
-
|
|
254
298
|
const slots = useMemo<DatePickerSlots<DateTime>>(
|
|
255
299
|
() => ({
|
|
256
300
|
actionBar: MemoizedActionBar,
|
|
@@ -282,9 +326,14 @@ const DatePicker = ({
|
|
|
282
326
|
[popperElement],
|
|
283
327
|
);
|
|
284
328
|
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
|
|
329
|
+
const onTimeZoneChange = useCallback(
|
|
330
|
+
(timeZone: string | undefined) => {
|
|
331
|
+
if (timeZone && isValidTimeZone(timeZone)) {
|
|
332
|
+
setInternalTimeZone(timeZone);
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
[isValidTimeZone, setInternalTimeZone],
|
|
336
|
+
);
|
|
288
337
|
|
|
289
338
|
return (
|
|
290
339
|
<OdysseyThemeProvider themeOverride={datePickerTheme}>
|
|
@@ -294,32 +343,45 @@ const DatePicker = ({
|
|
|
294
343
|
localeText={localeText}
|
|
295
344
|
>
|
|
296
345
|
<DatePickerContainer>
|
|
297
|
-
<DatePickerWidthContainer
|
|
346
|
+
<DatePickerWidthContainer
|
|
347
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
348
|
+
ref={containerRef}
|
|
349
|
+
>
|
|
298
350
|
<MuiDatePicker
|
|
299
351
|
dayOfWeekFormatter={formatDayOfWeek}
|
|
300
|
-
defaultValue={
|
|
301
|
-
defaultValueProp
|
|
302
|
-
? formatDateToDateTime(defaultValueProp)
|
|
303
|
-
: undefined
|
|
304
|
-
}
|
|
352
|
+
defaultValue={inputValues?.defaultValue}
|
|
305
353
|
disabled={isDisabled}
|
|
306
354
|
fixedWeekNumber={6}
|
|
355
|
+
inputRef={inputRef}
|
|
307
356
|
key={language}
|
|
308
357
|
label={label}
|
|
309
|
-
minDate={minDate
|
|
310
|
-
maxDate={maxDate
|
|
311
|
-
onChange={
|
|
358
|
+
minDate={minDate}
|
|
359
|
+
maxDate={maxDate}
|
|
360
|
+
onChange={formatDateTimeToJsDateStringOnCalendarSelection}
|
|
312
361
|
onClose={resetIsOpen}
|
|
313
362
|
open={isOpen}
|
|
363
|
+
readOnly={isReadOnly}
|
|
314
364
|
shouldDisableDate={shouldDisableDate}
|
|
315
365
|
shouldDisableMonth={shouldDisableMonth}
|
|
316
366
|
shouldDisableYear={shouldDisableYear}
|
|
317
367
|
slots={slots}
|
|
318
368
|
slotProps={slotProps}
|
|
319
|
-
|
|
369
|
+
timezone={internalTimeZone}
|
|
370
|
+
value={inputValues?.value}
|
|
320
371
|
/>
|
|
321
372
|
</DatePickerWidthContainer>
|
|
322
373
|
</DatePickerContainer>
|
|
374
|
+
{timeZoneOptions && timeZonePickerLabel && (
|
|
375
|
+
<TimeZonePickerContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
376
|
+
<TimeZonePicker
|
|
377
|
+
label={timeZonePickerLabel}
|
|
378
|
+
onTimeZoneChange={onTimeZoneChange}
|
|
379
|
+
isReadOnly={isReadOnly}
|
|
380
|
+
timeZoneOptions={timeZoneOptions}
|
|
381
|
+
value={internalTimeZone}
|
|
382
|
+
/>
|
|
383
|
+
</TimeZonePickerContainer>
|
|
384
|
+
)}
|
|
323
385
|
</LocalizationProvider>
|
|
324
386
|
</OdysseyThemeProvider>
|
|
325
387
|
);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo, useCallback } from "react";
|
|
14
|
+
|
|
15
|
+
import { Autocomplete, AutocompleteProps } from "../Autocomplete";
|
|
16
|
+
import { TimeZoneOption } from "./useOdysseyDateFields";
|
|
17
|
+
|
|
18
|
+
export type TimeZonePickerProps = {
|
|
19
|
+
label: string;
|
|
20
|
+
onTimeZoneChange?: (timeZone: string | undefined) => void;
|
|
21
|
+
timeZoneOptions: TimeZoneOption[];
|
|
22
|
+
value?: string;
|
|
23
|
+
} & Pick<AutocompleteProps<TimeZoneOption, false, false>, "isReadOnly">;
|
|
24
|
+
|
|
25
|
+
const TimeZonePicker = ({
|
|
26
|
+
label,
|
|
27
|
+
isReadOnly,
|
|
28
|
+
onTimeZoneChange,
|
|
29
|
+
timeZoneOptions,
|
|
30
|
+
value,
|
|
31
|
+
}: TimeZonePickerProps) => {
|
|
32
|
+
const onChange = useCallback<
|
|
33
|
+
NonNullable<AutocompleteProps<TimeZoneOption, false, false>["onChange"]>
|
|
34
|
+
>(
|
|
35
|
+
(_, option) => {
|
|
36
|
+
onTimeZoneChange?.(option?.value);
|
|
37
|
+
},
|
|
38
|
+
[onTimeZoneChange],
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Autocomplete<TimeZoneOption, false, false>
|
|
43
|
+
isReadOnly={isReadOnly}
|
|
44
|
+
label={label}
|
|
45
|
+
onChange={onChange}
|
|
46
|
+
options={timeZoneOptions}
|
|
47
|
+
value={timeZoneOptions.find((option) => option.value === value)}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const MemoizedTimeZonePicker = memo(TimeZonePicker);
|
|
53
|
+
MemoizedTimeZonePicker.displayName = "TimeZonePicker";
|
|
54
|
+
|
|
55
|
+
export { MemoizedTimeZonePicker as TimeZonePicker };
|