@okta/odyssey-react-mui 1.4.0 → 1.6.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 +20 -0
- package/dist/Accordion.js +52 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/Autocomplete.js +8 -1
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Breadcrumbs.js +2 -2
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Callout.js +3 -3
- package/dist/Callout.js.map +1 -1
- package/dist/CheckboxGroup.js +5 -1
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/Dialog.js +3 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/Field.js +8 -6
- package/dist/Field.js.map +1 -1
- package/dist/NativeSelect.js +26 -14
- package/dist/NativeSelect.js.map +1 -1
- package/dist/PasswordField.js +6 -2
- package/dist/PasswordField.js.map +1 -1
- package/dist/RadioGroup.js +5 -1
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +31 -26
- package/dist/Select.js.map +1 -1
- package/dist/TextField.js +7 -1
- package/dist/TextField.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +4 -0
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Accordion.d.ts +53 -0
- package/dist/src/Accordion.d.ts.map +1 -0
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Breadcrumbs.d.ts +1 -1
- package/dist/src/Breadcrumbs.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/Dialog.d.ts.map +1 -1
- package/dist/src/Field.d.ts +3 -1
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/NativeSelect.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +3 -3
- package/dist/src/PasswordField.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +3 -2
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +3 -3
- package/dist/src/Select.d.ts +14 -8
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +4 -4
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/i18n.d.ts +104 -0
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/icons.generated/Add.d.ts +1 -1
- package/dist/src/icons.generated/AddCircle.d.ts +1 -1
- package/dist/src/icons.generated/Apps.d.ts +1 -1
- package/dist/src/icons.generated/ArrowDown.d.ts +1 -1
- package/dist/src/icons.generated/ArrowLeft.d.ts +1 -1
- package/dist/src/icons.generated/ArrowLowerLeft.d.ts +1 -1
- package/dist/src/icons.generated/ArrowLowerRight.d.ts +1 -1
- package/dist/src/icons.generated/ArrowRight.d.ts +1 -1
- package/dist/src/icons.generated/ArrowUnsorted.d.ts +1 -1
- package/dist/src/icons.generated/ArrowUp.d.ts +1 -1
- package/dist/src/icons.generated/ArrowUpperLeft.d.ts +1 -1
- package/dist/src/icons.generated/ArrowUpperRight.d.ts +1 -1
- package/dist/src/icons.generated/Bug.d.ts +1 -1
- package/dist/src/icons.generated/Calendar.d.ts +1 -1
- package/dist/src/icons.generated/Call.d.ts +1 -1
- package/dist/src/icons.generated/Chat.d.ts +1 -1
- package/dist/src/icons.generated/Check.d.ts +1 -1
- package/dist/src/icons.generated/CheckCircleFilled.d.ts +1 -1
- package/dist/src/icons.generated/ChevronDown.d.ts +1 -1
- package/dist/src/icons.generated/ChevronLeft.d.ts +1 -1
- package/dist/src/icons.generated/ChevronRight.d.ts +1 -1
- package/dist/src/icons.generated/ChevronUp.d.ts +1 -1
- package/dist/src/icons.generated/Clock.d.ts +1 -1
- package/dist/src/icons.generated/Close.d.ts +1 -1
- package/dist/src/icons.generated/CloseCircleFilled.d.ts +1 -1
- package/dist/src/icons.generated/CollapseLeft.d.ts +1 -1
- package/dist/src/icons.generated/CollapseRight.d.ts +1 -1
- package/dist/src/icons.generated/Copy.d.ts +1 -1
- package/dist/src/icons.generated/DangerDiamond.d.ts +1 -1
- package/dist/src/icons.generated/DangerDiamondFilled.d.ts +1 -1
- package/dist/src/icons.generated/Delete.d.ts +1 -1
- package/dist/src/icons.generated/Deny.d.ts +1 -1
- package/dist/src/icons.generated/Devices.d.ts +1 -1
- package/dist/src/icons.generated/Directory.d.ts +1 -1
- package/dist/src/icons.generated/Documentation.d.ts +1 -1
- package/dist/src/icons.generated/Download.d.ts +1 -1
- package/dist/src/icons.generated/DragIndicator.d.ts +1 -1
- package/dist/src/icons.generated/Edit.d.ts +1 -1
- package/dist/src/icons.generated/ExpandLeft.d.ts +1 -1
- package/dist/src/icons.generated/ExpandRight.d.ts +1 -1
- package/dist/src/icons.generated/ExternalLink.d.ts +1 -1
- package/dist/src/icons.generated/Filter.d.ts +1 -1
- package/dist/src/icons.generated/Folder.d.ts +1 -1
- package/dist/src/icons.generated/Globe.d.ts +1 -1
- package/dist/src/icons.generated/Grid.d.ts +1 -1
- package/dist/src/icons.generated/Group.d.ts +1 -1
- package/dist/src/icons.generated/Hide.d.ts +1 -1
- package/dist/src/icons.generated/Home.d.ts +1 -1
- package/dist/src/icons.generated/InformationCircle.d.ts +1 -1
- package/dist/src/icons.generated/InformationCircleFilled.d.ts +1 -1
- package/dist/src/icons.generated/Link.d.ts +1 -1
- package/dist/src/icons.generated/List.d.ts +1 -1
- package/dist/src/icons.generated/Lock.d.ts +1 -1
- package/dist/src/icons.generated/More.d.ts +1 -1
- package/dist/src/icons.generated/Notification.d.ts +1 -1
- package/dist/src/icons.generated/Pause.d.ts +1 -1
- package/dist/src/icons.generated/QuestionCircle.d.ts +1 -1
- package/dist/src/icons.generated/QuestionCircleFilled.d.ts +1 -1
- package/dist/src/icons.generated/Refresh.d.ts +1 -1
- package/dist/src/icons.generated/Reset.d.ts +1 -1
- package/dist/src/icons.generated/Resume.d.ts +1 -1
- package/dist/src/icons.generated/Search.d.ts +1 -1
- package/dist/src/icons.generated/Server.d.ts +1 -1
- package/dist/src/icons.generated/Settings.d.ts +1 -1
- package/dist/src/icons.generated/Show.d.ts +1 -1
- package/dist/src/icons.generated/Subtract.d.ts +1 -1
- package/dist/src/icons.generated/Sync.d.ts +1 -1
- package/dist/src/icons.generated/Unlock.d.ts +1 -1
- package/dist/src/icons.generated/Upload.d.ts +1 -1
- package/dist/src/icons.generated/User.d.ts +1 -1
- package/dist/src/icons.generated/Video.d.ts +1 -1
- package/dist/src/icons.generated/Warning.d.ts +1 -1
- package/dist/src/icons.generated/WarningFilled.d.ts +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +4 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +136 -13
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Accordion.tsx +94 -0
- package/src/Autocomplete.tsx +11 -1
- package/src/Breadcrumbs.tsx +3 -3
- package/src/Callout.tsx +1 -1
- package/src/CheckboxGroup.tsx +7 -2
- package/src/Dialog.tsx +7 -1
- package/src/Field.tsx +14 -6
- package/src/NativeSelect.tsx +7 -2
- package/src/PasswordField.tsx +8 -3
- package/src/RadioGroup.tsx +9 -4
- package/src/Select.tsx +71 -45
- package/src/TextField.tsx +5 -1
- package/src/index.ts +2 -0
- package/src/properties/translations/odyssey-react-mui_cs.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_da.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_de.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_el.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_es.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_fi.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_fr.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_hu.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_id.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_it.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_ja.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_ko.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_ms.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_nb.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_pl.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_ro.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_ru.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_sv.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_th.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_tr.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_uk.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_vi.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +4 -0
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +4 -0
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
- package/src/theme/components.tsx +153 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okta/odyssey-react-mui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "React MUI components for Odyssey, Okta's design system",
|
|
5
5
|
"author": "Okta, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@mui/system": "^5.14.9",
|
|
52
52
|
"@mui/utils": "^5.11.2",
|
|
53
53
|
"@mui/x-date-pickers": "^5.0.15",
|
|
54
|
-
"@okta/odyssey-design-tokens": "1.
|
|
54
|
+
"@okta/odyssey-design-tokens": "1.6.0",
|
|
55
55
|
"date-fns": "^2.30.0",
|
|
56
56
|
"i18next": "^23.5.1",
|
|
57
57
|
"material-react-table": "^1.14.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": ">=17 <19",
|
|
64
64
|
"react-dom": ">=17 <19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "03b8e69263df83250402101d7637a5ede3578099"
|
|
67
67
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 { ReactNode, memo } from "react";
|
|
14
|
+
import type { SeleniumProps } from "./SeleniumProps";
|
|
15
|
+
import {
|
|
16
|
+
Accordion as MuiAccordion,
|
|
17
|
+
AccordionDetails as MuiAccordionDetails,
|
|
18
|
+
AccordionSummary as MuiAccordionSummary,
|
|
19
|
+
AccordionProps as MuiAccordionProps,
|
|
20
|
+
} from "@mui/material";
|
|
21
|
+
import { ChevronDownIcon } from "./icons.generated";
|
|
22
|
+
import { Support } from "./Typography";
|
|
23
|
+
|
|
24
|
+
export type AccordionProps = {
|
|
25
|
+
/**
|
|
26
|
+
* The content of the Accordion itself
|
|
27
|
+
*/
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* The label text for the AccordionSummary
|
|
31
|
+
*/
|
|
32
|
+
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* If true, the Accordion item will have a shadow.
|
|
35
|
+
*/
|
|
36
|
+
hasShadow?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the item is expanded by default
|
|
39
|
+
*/
|
|
40
|
+
isDefaultExpanded?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the item is disabled
|
|
43
|
+
*/
|
|
44
|
+
isDisabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the item is expanded
|
|
47
|
+
*/
|
|
48
|
+
isExpanded?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Event fired when the expansion state of the accordion is changed
|
|
51
|
+
*/
|
|
52
|
+
onChange?: MuiAccordionProps["onChange"];
|
|
53
|
+
} & (
|
|
54
|
+
| {
|
|
55
|
+
isExpanded: boolean;
|
|
56
|
+
isDefaultExpanded?: never;
|
|
57
|
+
}
|
|
58
|
+
| {
|
|
59
|
+
isDefaultExpanded?: boolean;
|
|
60
|
+
isExpanded?: never;
|
|
61
|
+
}
|
|
62
|
+
) &
|
|
63
|
+
SeleniumProps;
|
|
64
|
+
|
|
65
|
+
const Accordion = ({
|
|
66
|
+
children,
|
|
67
|
+
label,
|
|
68
|
+
hasShadow = true,
|
|
69
|
+
isDefaultExpanded,
|
|
70
|
+
isDisabled,
|
|
71
|
+
isExpanded,
|
|
72
|
+
onChange,
|
|
73
|
+
}: AccordionProps) => {
|
|
74
|
+
return (
|
|
75
|
+
<MuiAccordion
|
|
76
|
+
defaultExpanded={isDefaultExpanded}
|
|
77
|
+
disabled={isDisabled}
|
|
78
|
+
disableGutters
|
|
79
|
+
expanded={isExpanded}
|
|
80
|
+
onChange={onChange}
|
|
81
|
+
className={hasShadow ? `hasShadow` : undefined}
|
|
82
|
+
>
|
|
83
|
+
<MuiAccordionSummary expandIcon={<ChevronDownIcon />}>
|
|
84
|
+
<Support component="div">{label}</Support>
|
|
85
|
+
</MuiAccordionSummary>
|
|
86
|
+
<MuiAccordionDetails>{children}</MuiAccordionDetails>
|
|
87
|
+
</MuiAccordion>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const MemoizedAccordion = memo(Accordion);
|
|
92
|
+
MemoizedAccordion.displayName = "Accordion";
|
|
93
|
+
|
|
94
|
+
export { MemoizedAccordion as Accordion };
|
package/src/Autocomplete.tsx
CHANGED
|
@@ -184,10 +184,20 @@ const Autocomplete = <
|
|
|
184
184
|
hint={hint}
|
|
185
185
|
label={label}
|
|
186
186
|
isOptional={isOptional}
|
|
187
|
-
renderFieldComponent={({
|
|
187
|
+
renderFieldComponent={({
|
|
188
|
+
ariaDescribedBy,
|
|
189
|
+
id,
|
|
190
|
+
errorMessageElementId,
|
|
191
|
+
labelElementId,
|
|
192
|
+
}) => (
|
|
188
193
|
<InputBase
|
|
189
194
|
{...params}
|
|
190
195
|
{...InputProps}
|
|
196
|
+
inputProps={{
|
|
197
|
+
...params.inputProps,
|
|
198
|
+
"aria-errormessage": errorMessageElementId,
|
|
199
|
+
"aria-labelledby": labelElementId,
|
|
200
|
+
}}
|
|
191
201
|
aria-describedby={ariaDescribedBy}
|
|
192
202
|
id={id}
|
|
193
203
|
name={nameOverride ?? id}
|
package/src/Breadcrumbs.tsx
CHANGED
|
@@ -95,13 +95,13 @@ const breadcrumbProviderValue: Record<
|
|
|
95
95
|
},
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
+
const defaultTruncationValue = 5;
|
|
99
|
+
|
|
98
100
|
const BreadcrumbList = ({
|
|
99
101
|
children,
|
|
100
102
|
homeHref,
|
|
101
|
-
maxVisibleItems
|
|
103
|
+
maxVisibleItems = defaultTruncationValue,
|
|
102
104
|
}: BreadcrumbsProps) => {
|
|
103
|
-
const maxVisibleItems = maxVisibleItemsOverride ?? children.length;
|
|
104
|
-
|
|
105
105
|
const { t } = useTranslation();
|
|
106
106
|
|
|
107
107
|
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
|
package/src/Callout.tsx
CHANGED
|
@@ -51,7 +51,7 @@ const Callout = ({ children, role, severity, testId, title }: CalloutProps) => {
|
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
53
|
<Alert data-se={testId} role={role} severity={severity} variant="callout">
|
|
54
|
-
<ScreenReaderText>{t(`severity.${severity}`)}
|
|
54
|
+
<ScreenReaderText>{t(`severity.${severity}`)}</ScreenReaderText>
|
|
55
55
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
56
56
|
<Box component="div">{children}</Box>
|
|
57
57
|
</Alert>
|
package/src/CheckboxGroup.tsx
CHANGED
|
@@ -56,8 +56,13 @@ const CheckboxGroup = ({
|
|
|
56
56
|
testId,
|
|
57
57
|
}: CheckboxGroupProps) => {
|
|
58
58
|
const renderFieldComponent = useCallback(
|
|
59
|
-
({ ariaDescribedBy }) => (
|
|
60
|
-
<MuiFormGroup
|
|
59
|
+
({ ariaDescribedBy, errorMessageElementId, labelElementId }) => (
|
|
60
|
+
<MuiFormGroup
|
|
61
|
+
aria-describedby={ariaDescribedBy}
|
|
62
|
+
aria-errormessage={errorMessageElementId}
|
|
63
|
+
aria-labelledby={labelElementId}
|
|
64
|
+
data-se={testId}
|
|
65
|
+
>
|
|
61
66
|
{children}
|
|
62
67
|
</MuiFormGroup>
|
|
63
68
|
),
|
package/src/Dialog.tsx
CHANGED
|
@@ -118,7 +118,13 @@ const Dialog = ({
|
|
|
118
118
|
variant="floating"
|
|
119
119
|
/>
|
|
120
120
|
</DialogTitle>
|
|
121
|
-
<DialogContent
|
|
121
|
+
<DialogContent
|
|
122
|
+
dividers={isContentScrollable}
|
|
123
|
+
ref={dialogContentRef}
|
|
124
|
+
{...(isContentScrollable && {
|
|
125
|
+
tabIndex: 0,
|
|
126
|
+
})}
|
|
127
|
+
>
|
|
122
128
|
{content}
|
|
123
129
|
</DialogContent>
|
|
124
130
|
|
package/src/Field.tsx
CHANGED
|
@@ -77,11 +77,15 @@ export type FieldProps = {
|
|
|
77
77
|
renderFieldComponent: ({
|
|
78
78
|
ariaDescribedBy,
|
|
79
79
|
dataSe,
|
|
80
|
+
errorMessageElementId,
|
|
80
81
|
id,
|
|
82
|
+
labelElementId,
|
|
81
83
|
}: {
|
|
82
84
|
ariaDescribedBy?: string;
|
|
83
85
|
dataSe?: string;
|
|
86
|
+
errorMessageElementId?: string;
|
|
84
87
|
id: string;
|
|
88
|
+
labelElementId: string;
|
|
85
89
|
}) => ReactElement;
|
|
86
90
|
};
|
|
87
91
|
|
|
@@ -101,12 +105,12 @@ const Field = ({
|
|
|
101
105
|
|
|
102
106
|
const id = useUniqueId(idOverride);
|
|
103
107
|
const hintId = hint ? `${id}-hint` : undefined;
|
|
104
|
-
const
|
|
105
|
-
const
|
|
108
|
+
const errorMessageElementId = errorMessage ? `${id}-error` : undefined;
|
|
109
|
+
const labelElementId = `${id}-label`;
|
|
106
110
|
|
|
107
111
|
const ariaDescribedBy = useMemo(
|
|
108
|
-
() => [hintId,
|
|
109
|
-
[
|
|
112
|
+
() => [hintId, errorMessageElementId].join(" ").trim() || undefined,
|
|
113
|
+
[errorMessageElementId, hintId]
|
|
110
114
|
);
|
|
111
115
|
|
|
112
116
|
const { isDisabled: isFieldsetDisabled } = useFieldset();
|
|
@@ -135,7 +139,7 @@ const Field = ({
|
|
|
135
139
|
) : (
|
|
136
140
|
<FieldLabel
|
|
137
141
|
hasVisibleLabel={hasVisibleLabel}
|
|
138
|
-
id={
|
|
142
|
+
id={labelElementId}
|
|
139
143
|
inputId={id}
|
|
140
144
|
isOptional={isOptional}
|
|
141
145
|
text={label}
|
|
@@ -146,10 +150,14 @@ const Field = ({
|
|
|
146
150
|
|
|
147
151
|
{renderFieldComponent({
|
|
148
152
|
ariaDescribedBy,
|
|
153
|
+
errorMessageElementId,
|
|
149
154
|
id,
|
|
155
|
+
labelElementId,
|
|
150
156
|
})}
|
|
151
157
|
|
|
152
|
-
{errorMessage &&
|
|
158
|
+
{errorMessage && (
|
|
159
|
+
<FieldError id={errorMessageElementId} text={errorMessage} />
|
|
160
|
+
)}
|
|
153
161
|
</MuiFormControl>
|
|
154
162
|
);
|
|
155
163
|
};
|
package/src/NativeSelect.tsx
CHANGED
|
@@ -99,11 +99,17 @@ const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(
|
|
|
99
99
|
ref
|
|
100
100
|
) => {
|
|
101
101
|
const renderFieldComponent = useCallback(
|
|
102
|
-
() => (
|
|
102
|
+
({ ariaDescribedBy, errorMessageElementId, labelElementId }) => (
|
|
103
103
|
<MuiSelect
|
|
104
|
+
aria-describedby={ariaDescribedBy}
|
|
105
|
+
children={children}
|
|
104
106
|
data-se={testId}
|
|
105
107
|
defaultValue={defaultValue}
|
|
106
108
|
id={idOverride}
|
|
109
|
+
inputProps={{
|
|
110
|
+
"aria-errormessage": errorMessageElementId,
|
|
111
|
+
"aria-labelledby": labelElementId,
|
|
112
|
+
}}
|
|
107
113
|
name={idOverride}
|
|
108
114
|
multiple={isMultiSelect}
|
|
109
115
|
native={true}
|
|
@@ -112,7 +118,6 @@ const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(
|
|
|
112
118
|
onFocus={onFocus}
|
|
113
119
|
ref={ref}
|
|
114
120
|
value={value}
|
|
115
|
-
children={children}
|
|
116
121
|
/>
|
|
117
122
|
),
|
|
118
123
|
[
|
package/src/PasswordField.tsx
CHANGED
|
@@ -127,10 +127,10 @@ const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
|
|
|
127
127
|
}, []);
|
|
128
128
|
|
|
129
129
|
const renderFieldComponent = useCallback(
|
|
130
|
-
({ ariaDescribedBy, id }) => (
|
|
130
|
+
({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (
|
|
131
131
|
<InputBase
|
|
132
132
|
aria-describedby={ariaDescribedBy}
|
|
133
|
-
autoComplete={autoCompleteType}
|
|
133
|
+
autoComplete={inputType === "password" ? autoCompleteType : "off"}
|
|
134
134
|
/* eslint-disable-next-line jsx-a11y/no-autofocus */
|
|
135
135
|
autoFocus={hasInitialFocus}
|
|
136
136
|
data-se={testId}
|
|
@@ -151,7 +151,12 @@ const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
|
|
|
151
151
|
)
|
|
152
152
|
}
|
|
153
153
|
id={id}
|
|
154
|
-
inputProps={{
|
|
154
|
+
inputProps={{
|
|
155
|
+
"aria-errormessage": errorMessageElementId,
|
|
156
|
+
"aria-labelledby": labelElementId,
|
|
157
|
+
// role: "textbox" Added because password inputs don't have an implicit role assigned. This causes problems with element selection.
|
|
158
|
+
role: "textbox",
|
|
159
|
+
}}
|
|
155
160
|
name={nameOverride ?? id}
|
|
156
161
|
onChange={onChange}
|
|
157
162
|
onFocus={onFocus}
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import {
|
|
14
|
+
RadioGroup as MuiRadioGroup,
|
|
15
|
+
type RadioGroupProps as MuiRadioGroupProps,
|
|
16
|
+
} from "@mui/material";
|
|
17
|
+
import { memo, ReactElement, useCallback } from "react";
|
|
15
18
|
|
|
16
19
|
import { Radio, RadioProps } from "./Radio";
|
|
17
20
|
import { Field } from "./Field";
|
|
@@ -53,7 +56,7 @@ export type RadioGroupProps = {
|
|
|
53
56
|
/**
|
|
54
57
|
* Listen for changes in the browser that change `value`
|
|
55
58
|
*/
|
|
56
|
-
onChange?:
|
|
59
|
+
onChange?: MuiRadioGroupProps["onChange"];
|
|
57
60
|
/**
|
|
58
61
|
* The `value` on the selected Radio
|
|
59
62
|
*/
|
|
@@ -74,9 +77,11 @@ const RadioGroup = ({
|
|
|
74
77
|
value,
|
|
75
78
|
}: RadioGroupProps) => {
|
|
76
79
|
const renderFieldComponent = useCallback(
|
|
77
|
-
({ ariaDescribedBy, id }) => (
|
|
80
|
+
({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (
|
|
78
81
|
<MuiRadioGroup
|
|
79
82
|
aria-describedby={ariaDescribedBy}
|
|
83
|
+
aria-errormessage={errorMessageElementId}
|
|
84
|
+
aria-labelledby={labelElementId}
|
|
80
85
|
data-se={testId}
|
|
81
86
|
defaultValue={defaultValue}
|
|
82
87
|
id={id}
|
package/src/Select.tsx
CHANGED
|
@@ -10,19 +10,20 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { memo, useCallback, useMemo, useState } from "react";
|
|
14
14
|
import {
|
|
15
15
|
Box,
|
|
16
|
-
Chip,
|
|
17
16
|
Checkbox as MuiCheckbox,
|
|
17
|
+
Chip,
|
|
18
|
+
ListItemSecondaryAction,
|
|
18
19
|
ListSubheader,
|
|
19
20
|
MenuItem,
|
|
20
21
|
Select as MuiSelect,
|
|
21
|
-
SelectChangeEvent,
|
|
22
22
|
} from "@mui/material";
|
|
23
23
|
import { SelectProps as MuiSelectProps } from "@mui/material";
|
|
24
24
|
import { Field } from "./Field";
|
|
25
25
|
import type { SeleniumProps } from "./SeleniumProps";
|
|
26
|
+
import { CheckIcon } from "./icons.generated";
|
|
26
27
|
|
|
27
28
|
export type SelectOption = {
|
|
28
29
|
text: string;
|
|
@@ -30,11 +31,21 @@ export type SelectOption = {
|
|
|
30
31
|
value?: string;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
export type
|
|
34
|
+
export type SelectValueType<HasMultipleChoices> =
|
|
35
|
+
HasMultipleChoices extends true ? string[] : string;
|
|
36
|
+
|
|
37
|
+
export type SelectProps<
|
|
38
|
+
Value extends SelectValueType<HasMultipleChoices>,
|
|
39
|
+
HasMultipleChoices extends boolean
|
|
40
|
+
> = {
|
|
34
41
|
/**
|
|
35
42
|
* The error message for the Select
|
|
36
43
|
*/
|
|
37
44
|
errorMessage?: string;
|
|
45
|
+
/**
|
|
46
|
+
* If `true`, the Select allows multiple selections
|
|
47
|
+
*/
|
|
48
|
+
hasMultipleChoices?: HasMultipleChoices;
|
|
38
49
|
/**
|
|
39
50
|
* The hint text for the Select
|
|
40
51
|
*/
|
|
@@ -48,9 +59,10 @@ export type SelectProps = {
|
|
|
48
59
|
*/
|
|
49
60
|
isDisabled?: boolean;
|
|
50
61
|
/**
|
|
51
|
-
*
|
|
62
|
+
* @deprecated Use `hasMultipleChoices` instead.
|
|
52
63
|
*/
|
|
53
|
-
|
|
64
|
+
/** **Deprecated:** use `hasMultipleChoices` */
|
|
65
|
+
isMultiSelect?: HasMultipleChoices;
|
|
54
66
|
/**
|
|
55
67
|
* If `true`, the Select is optional
|
|
56
68
|
*/
|
|
@@ -66,15 +78,15 @@ export type SelectProps = {
|
|
|
66
78
|
/**
|
|
67
79
|
* Callback fired when the Select loses focus
|
|
68
80
|
*/
|
|
69
|
-
onBlur?: MuiSelectProps["onBlur"];
|
|
81
|
+
onBlur?: MuiSelectProps<Value>["onBlur"];
|
|
70
82
|
/**
|
|
71
83
|
* Callback fired when the value of the Select changes
|
|
72
84
|
*/
|
|
73
|
-
onChange?: MuiSelectProps["onChange"];
|
|
85
|
+
onChange?: MuiSelectProps<Value>["onChange"];
|
|
74
86
|
/**
|
|
75
87
|
* Callback fired when the Select gains focus
|
|
76
88
|
*/
|
|
77
|
-
onFocus?: MuiSelectProps["onFocus"];
|
|
89
|
+
onFocus?: MuiSelectProps<Value>["onFocus"];
|
|
78
90
|
/**
|
|
79
91
|
* The options for the Select
|
|
80
92
|
*/
|
|
@@ -82,7 +94,7 @@ export type SelectProps = {
|
|
|
82
94
|
/**
|
|
83
95
|
* The value or values selected in the Select
|
|
84
96
|
*/
|
|
85
|
-
value?:
|
|
97
|
+
value?: Value;
|
|
86
98
|
} & SeleniumProps;
|
|
87
99
|
|
|
88
100
|
/**
|
|
@@ -100,50 +112,59 @@ export type SelectProps = {
|
|
|
100
112
|
* - { text: string, type: "heading" } — Used to display a group heading with the text
|
|
101
113
|
*/
|
|
102
114
|
|
|
103
|
-
const Select =
|
|
115
|
+
const Select = <
|
|
116
|
+
Value extends SelectValueType<HasMultipleChoices>,
|
|
117
|
+
HasMultipleChoices extends boolean
|
|
118
|
+
>({
|
|
104
119
|
errorMessage,
|
|
120
|
+
hasMultipleChoices: hasMultipleChoicesProp,
|
|
105
121
|
hint,
|
|
106
122
|
id: idOverride,
|
|
107
123
|
isDisabled = false,
|
|
108
|
-
isMultiSelect
|
|
124
|
+
isMultiSelect,
|
|
109
125
|
isOptional = false,
|
|
110
126
|
label,
|
|
111
127
|
name: nameOverride,
|
|
112
128
|
onBlur,
|
|
113
129
|
onChange: onChangeProp,
|
|
114
130
|
onFocus,
|
|
115
|
-
value,
|
|
116
|
-
testId,
|
|
117
131
|
options,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
132
|
+
testId,
|
|
133
|
+
value,
|
|
134
|
+
}: SelectProps<Value, HasMultipleChoices>) => {
|
|
135
|
+
const hasMultipleChoices = useMemo(
|
|
136
|
+
() =>
|
|
137
|
+
hasMultipleChoicesProp === undefined
|
|
138
|
+
? isMultiSelect
|
|
139
|
+
: hasMultipleChoicesProp,
|
|
140
|
+
[hasMultipleChoicesProp, isMultiSelect]
|
|
141
|
+
);
|
|
124
142
|
|
|
125
|
-
const
|
|
143
|
+
const formattedValueForMultiSelect = isMultiSelect
|
|
144
|
+
? ([] as string[] as Value)
|
|
145
|
+
: ("" as string as Value);
|
|
126
146
|
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
target: { value },
|
|
131
|
-
} = event;
|
|
147
|
+
const [selectedValue, setSelectedValue] = useState(
|
|
148
|
+
value === undefined ? formattedValueForMultiSelect : value
|
|
149
|
+
);
|
|
132
150
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
const onChange = useCallback<NonNullable<MuiSelectProps<Value>["onChange"]>>(
|
|
152
|
+
(event, child) => {
|
|
153
|
+
const valueFromEvent = event.target.value;
|
|
154
|
+
|
|
155
|
+
if (typeof valueFromEvent === "string") {
|
|
156
|
+
if (hasMultipleChoices) {
|
|
157
|
+
setSelectedValue(valueFromEvent.split(",") as Value);
|
|
158
|
+
} else {
|
|
159
|
+
setSelectedValue(valueFromEvent as Value);
|
|
160
|
+
}
|
|
137
161
|
} else {
|
|
138
|
-
setSelectedValue(
|
|
162
|
+
setSelectedValue(valueFromEvent);
|
|
139
163
|
}
|
|
140
164
|
|
|
141
|
-
|
|
142
|
-
if (onChangeProp) {
|
|
143
|
-
onChangeProp(event, child);
|
|
144
|
-
}
|
|
165
|
+
onChangeProp?.(event, child);
|
|
145
166
|
},
|
|
146
|
-
[
|
|
167
|
+
[hasMultipleChoices, onChangeProp, setSelectedValue]
|
|
147
168
|
);
|
|
148
169
|
|
|
149
170
|
// Normalize the options array to accommodate the various
|
|
@@ -163,7 +184,7 @@ const Select = ({
|
|
|
163
184
|
);
|
|
164
185
|
|
|
165
186
|
const renderValue = useCallback(
|
|
166
|
-
(selected:
|
|
187
|
+
(selected: Value) => {
|
|
167
188
|
// If the selected value isn't an array, then we don't need to display
|
|
168
189
|
// chips and should fall back to the default render behavior
|
|
169
190
|
if (typeof selected === "string") {
|
|
@@ -207,37 +228,42 @@ const Select = ({
|
|
|
207
228
|
|
|
208
229
|
return (
|
|
209
230
|
<MenuItem key={option.value} value={option.value}>
|
|
210
|
-
{
|
|
231
|
+
{hasMultipleChoices && (
|
|
211
232
|
<MuiCheckbox checked={selectedValue.includes(option.value)} />
|
|
212
233
|
)}
|
|
213
234
|
{option.text}
|
|
235
|
+
{selectedValue == option.value && (
|
|
236
|
+
<ListItemSecondaryAction>
|
|
237
|
+
<CheckIcon />
|
|
238
|
+
</ListItemSecondaryAction>
|
|
239
|
+
)}
|
|
214
240
|
</MenuItem>
|
|
215
241
|
);
|
|
216
242
|
}),
|
|
217
|
-
[
|
|
243
|
+
[hasMultipleChoices, normalizedOptions, selectedValue]
|
|
218
244
|
);
|
|
219
245
|
|
|
220
246
|
const renderFieldComponent = useCallback(
|
|
221
|
-
({ ariaDescribedBy, id }) => (
|
|
247
|
+
({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (
|
|
222
248
|
<MuiSelect
|
|
223
249
|
aria-describedby={ariaDescribedBy}
|
|
250
|
+
aria-errormessage={errorMessageElementId}
|
|
224
251
|
children={children}
|
|
225
252
|
data-se={testId}
|
|
226
253
|
id={id}
|
|
227
|
-
labelId={
|
|
228
|
-
multiple={
|
|
254
|
+
labelId={labelElementId}
|
|
255
|
+
multiple={hasMultipleChoices}
|
|
229
256
|
name={nameOverride ?? id}
|
|
230
257
|
onBlur={onBlur}
|
|
231
258
|
onChange={onChange}
|
|
232
259
|
onFocus={onFocus}
|
|
233
|
-
renderValue={
|
|
260
|
+
renderValue={hasMultipleChoices ? renderValue : undefined}
|
|
234
261
|
value={selectedValue}
|
|
235
262
|
/>
|
|
236
263
|
),
|
|
237
264
|
[
|
|
238
265
|
children,
|
|
239
|
-
|
|
240
|
-
label,
|
|
266
|
+
hasMultipleChoices,
|
|
241
267
|
nameOverride,
|
|
242
268
|
onBlur,
|
|
243
269
|
onChange,
|
package/src/TextField.tsx
CHANGED
|
@@ -140,8 +140,12 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
140
140
|
ref
|
|
141
141
|
) => {
|
|
142
142
|
const renderFieldComponent = useCallback(
|
|
143
|
-
({ ariaDescribedBy, id }) => (
|
|
143
|
+
({ ariaDescribedBy, errorMessageElementId, id, labelElementId }) => (
|
|
144
144
|
<InputBase
|
|
145
|
+
inputProps={{
|
|
146
|
+
"aria-errormessage": errorMessageElementId,
|
|
147
|
+
"aria-labelledby": labelElementId,
|
|
148
|
+
}}
|
|
145
149
|
aria-describedby={ariaDescribedBy}
|
|
146
150
|
autoComplete={autoCompleteType}
|
|
147
151
|
/* eslint-disable-next-line jsx-a11y/no-autofocus */
|
package/src/index.ts
CHANGED
|
@@ -56,6 +56,7 @@ export type {
|
|
|
56
56
|
|
|
57
57
|
export { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext";
|
|
58
58
|
|
|
59
|
+
export * from "./Accordion";
|
|
59
60
|
export * from "./Autocomplete";
|
|
60
61
|
export * from "./Banner";
|
|
61
62
|
export * from "./Box";
|
|
@@ -65,6 +66,7 @@ export * from "./Callout";
|
|
|
65
66
|
export * from "./Checkbox";
|
|
66
67
|
export * from "./CheckboxGroup";
|
|
67
68
|
export * from "./CircularProgress";
|
|
69
|
+
export * from "./createShadowDom";
|
|
68
70
|
export * from "./createUniqueId";
|
|
69
71
|
export * from "./Dialog";
|
|
70
72
|
export * from "./Fieldset";
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
breadcrumbs.home.text = Domovsk\u00E1 str\u00E1nka
|
|
2
|
+
breadcrumbs.label.text = Drobe\u010Dkov\u00E1 navigace
|
|
1
3
|
fielderror.screenreader.text = Chyba
|
|
2
4
|
fieldlabel.optional.text = Voliteln\u00E9
|
|
3
5
|
fieldlabel.required.text = Povinn\u00E9
|
|
6
|
+
passwordfield.icon.label.show = Zobrazit heslo
|
|
7
|
+
passwordfield.icon.label.hide = Skr\u00FDt heslo
|
|
4
8
|
severity.error = chyba
|
|
5
9
|
severity.info = informace
|
|
6
10
|
severity.success = \u00FAsp\u011Bch
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
breadcrumbs.home.text = Start
|
|
2
|
+
breadcrumbs.label.text = Rasp
|
|
1
3
|
fielderror.screenreader.text = Fejl
|
|
2
4
|
fieldlabel.optional.text = Valgfrit
|
|
3
5
|
fieldlabel.required.text = P\u00E5kr\u00E6vet
|
|
6
|
+
passwordfield.icon.label.show = Vis adgangskode
|
|
7
|
+
passwordfield.icon.label.hide = Skjul adgangskode
|
|
4
8
|
severity.error = fejl
|
|
5
9
|
severity.info = oplysninger
|
|
6
10
|
severity.success = fuldf\u00F8rt
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
breadcrumbs.home.text = Home
|
|
2
|
+
breadcrumbs.label.text = Breadcrumbs
|
|
1
3
|
fielderror.screenreader.text = Fehler
|
|
2
4
|
fieldlabel.optional.text = Optional
|
|
3
5
|
fieldlabel.required.text = Erforderlich
|
|
6
|
+
passwordfield.icon.label.show = Passwort anzeigen
|
|
7
|
+
passwordfield.icon.label.hide = Passwort\u00A0verbergen
|
|
4
8
|
severity.error = Fehler
|
|
5
9
|
severity.info = Infos
|
|
6
10
|
severity.success = Erfolg
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
breadcrumbs.home.text = \u0391\u03C1\u03C7\u03B9\u03BA\u03AE \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1
|
|
2
|
+
breadcrumbs.label.text = \u03A4\u03BC\u03AE\u03BC\u03B1\u03C4\u03B1 \u03B4\u03C5\u03BD\u03B1\u03BC\u03B9\u03BA\u03AE\u03C2 \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE\u03C2
|
|
1
3
|
fielderror.screenreader.text = \u03A3\u03C6\u03AC\u03BB\u03BC\u03B1
|
|
2
4
|
fieldlabel.optional.text = \u03A0\u03C1\u03BF\u03B1\u03B9\u03C1\u03B5\u03C4\u03B9\u03BA\u03CC
|
|
3
5
|
fieldlabel.required.text = \u0391\u03C0\u03B1\u03B9\u03C4\u03B5\u03AF\u03C4\u03B1\u03B9
|
|
6
|
+
passwordfield.icon.label.show = \u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2
|
|
7
|
+
passwordfield.icon.label.hide = \u0391\u03C0\u03CC\u03BA\u03C1\u03C5\u03C8\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2
|
|
4
8
|
severity.error = \u03C3\u03C6\u03AC\u03BB\u03BC\u03B1
|
|
5
9
|
severity.info = \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03AF\u03B5\u03C2
|
|
6
10
|
severity.success = \u03B5\u03C0\u03B9\u03C4\u03C5\u03C7\u03AF\u03B1
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
breadcrumbs.home.text = Inicio
|
|
2
|
+
breadcrumbs.label.text = Rutas de navegaci\u00F3n
|
|
1
3
|
fielderror.screenreader.text = Error
|
|
2
4
|
fieldlabel.optional.text = Opcional
|
|
3
5
|
fieldlabel.required.text = Obligatorio
|
|
6
|
+
passwordfield.icon.label.show = Mostrar contrase\u00F1a
|
|
7
|
+
passwordfield.icon.label.hide = Ocultar contrase\u00F1a
|
|
4
8
|
severity.error = error
|
|
5
9
|
severity.info = informaci\u00F3n
|
|
6
10
|
severity.success = correcto
|