@okta/odyssey-react-mui 0.21.4 → 0.23.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 +41 -0
- package/dist/Autocomplete.js +62 -0
- package/dist/Autocomplete.js.map +1 -0
- package/dist/Banner.js +3 -3
- package/dist/Banner.js.map +1 -1
- package/dist/Button.js +46 -0
- package/dist/Button.js.map +1 -0
- package/dist/CheckboxGroup.js +23 -35
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/Dialog.js +68 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Field.js +72 -0
- package/dist/Field.js.map +1 -0
- package/dist/FieldError.js +34 -0
- package/dist/FieldError.js.map +1 -0
- package/dist/FieldHint.js +29 -0
- package/dist/FieldHint.js.map +1 -0
- package/dist/FieldLabel.js +32 -0
- package/dist/FieldLabel.js.map +1 -0
- package/dist/Icon.js +7 -6
- package/dist/Icon.js.map +1 -1
- package/dist/Infobox.js +1 -1
- package/dist/Infobox.js.map +1 -1
- package/dist/Link.js +5 -2
- package/dist/Link.js.map +1 -1
- package/dist/MenuButton.js +5 -4
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuItem.js +0 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/MuiPropsChild.js +30 -0
- package/dist/MuiPropsChild.js.map +1 -0
- package/dist/MuiPropsContext.js +14 -0
- package/dist/MuiPropsContext.js.map +1 -0
- package/dist/PasswordField.js +73 -0
- package/dist/PasswordField.js.map +1 -0
- package/dist/RadioGroup.js +25 -26
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchField.js +56 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/Status.js.map +1 -1
- package/dist/Tag.js +28 -0
- package/dist/Tag.js.map +1 -0
- package/dist/TagList.js +26 -0
- package/dist/TagList.js.map +1 -0
- package/dist/TagListContext.js +16 -0
- package/dist/TagListContext.js.map +1 -0
- package/dist/TextField.js +36 -62
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +72 -0
- package/dist/Toast.js.map +1 -0
- package/dist/ToastStack.js +33 -0
- package/dist/ToastStack.js.map +1 -0
- package/dist/Tooltip.js +20 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/iconDictionary/Add.js +4 -4
- package/dist/iconDictionary/Add.js.map +1 -1
- package/dist/iconDictionary/AddCircle.js +4 -4
- package/dist/iconDictionary/AddCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircle.js +4 -4
- package/dist/iconDictionary/AlertCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircleFilled.js +4 -4
- package/dist/iconDictionary/AlertCircleFilled.js.map +1 -1
- package/dist/iconDictionary/AlertTriangleFilled.js +4 -4
- package/dist/iconDictionary/AlertTriangleFilled.js.map +1 -1
- package/dist/iconDictionary/Anchor.js +5 -5
- package/dist/iconDictionary/Anchor.js.map +1 -1
- package/dist/iconDictionary/ArrowDown.js +4 -4
- package/dist/iconDictionary/ArrowDown.js.map +1 -1
- package/dist/iconDictionary/ArrowLeft.js +4 -4
- package/dist/iconDictionary/ArrowLeft.js.map +1 -1
- package/dist/iconDictionary/ArrowRight.js +4 -4
- package/dist/iconDictionary/ArrowRight.js.map +1 -1
- package/dist/iconDictionary/ArrowUp.js +4 -4
- package/dist/iconDictionary/ArrowUp.js.map +1 -1
- package/dist/iconDictionary/ArrowUpDown.js +4 -4
- package/dist/iconDictionary/ArrowUpDown.js.map +1 -1
- package/dist/iconDictionary/Calendar.js +4 -4
- package/dist/iconDictionary/Calendar.js.map +1 -1
- package/dist/iconDictionary/Check.js +4 -4
- package/dist/iconDictionary/Check.js.map +1 -1
- package/dist/iconDictionary/CheckCircleFilled.js +4 -4
- package/dist/iconDictionary/CheckCircleFilled.js.map +1 -1
- package/dist/iconDictionary/ChevronDown.js +4 -4
- package/dist/iconDictionary/ChevronDown.js.map +1 -1
- package/dist/iconDictionary/ChevronUp.js +4 -4
- package/dist/iconDictionary/ChevronUp.js.map +1 -1
- package/dist/iconDictionary/Close.js +4 -4
- package/dist/iconDictionary/Close.js.map +1 -1
- package/dist/iconDictionary/CloseCircleFilled.js +4 -4
- package/dist/iconDictionary/CloseCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Copy.js +4 -4
- package/dist/iconDictionary/Copy.js.map +1 -1
- package/dist/iconDictionary/Delete.js +4 -4
- package/dist/iconDictionary/Delete.js.map +1 -1
- package/dist/iconDictionary/Download.js +4 -4
- package/dist/iconDictionary/Download.js.map +1 -1
- package/dist/iconDictionary/DragHandle.js +4 -4
- package/dist/iconDictionary/DragHandle.js.map +1 -1
- package/dist/iconDictionary/Edit.js +4 -4
- package/dist/iconDictionary/Edit.js.map +1 -1
- package/dist/iconDictionary/ExternalLink.js +4 -4
- package/dist/iconDictionary/ExternalLink.js.map +1 -1
- package/dist/iconDictionary/Eye.js +4 -4
- package/dist/iconDictionary/Eye.js.map +1 -1
- package/dist/iconDictionary/EyeOff.js +4 -4
- package/dist/iconDictionary/EyeOff.js.map +1 -1
- package/dist/iconDictionary/Filter.js +4 -4
- package/dist/iconDictionary/Filter.js.map +1 -1
- package/dist/iconDictionary/Globe.js +4 -4
- package/dist/iconDictionary/Globe.js.map +1 -1
- package/dist/iconDictionary/Home.js +4 -4
- package/dist/iconDictionary/Home.js.map +1 -1
- package/dist/iconDictionary/InformationCircle.js +4 -4
- package/dist/iconDictionary/InformationCircle.js.map +1 -1
- package/dist/iconDictionary/InformationCircleFilled.js +4 -4
- package/dist/iconDictionary/InformationCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Notification.js +4 -4
- package/dist/iconDictionary/Notification.js.map +1 -1
- package/dist/iconDictionary/OverflowVertical.js +4 -4
- package/dist/iconDictionary/OverflowVertical.js.map +1 -1
- package/dist/iconDictionary/QuestionCircle.js +4 -4
- package/dist/iconDictionary/QuestionCircle.js.map +1 -1
- package/dist/iconDictionary/QuestionCircleFilled.js +4 -4
- package/dist/iconDictionary/QuestionCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Search.js +4 -4
- package/dist/iconDictionary/Search.js.map +1 -1
- package/dist/iconDictionary/Settings.js +3 -3
- package/dist/iconDictionary/Settings.js.map +1 -1
- package/dist/iconDictionary/Subtract.js +4 -4
- package/dist/iconDictionary/Subtract.js.map +1 -1
- package/dist/iconDictionary/User.js +4 -4
- package/dist/iconDictionary/User.js.map +1 -1
- package/dist/iconDictionary/UserGroup.js +4 -4
- package/dist/iconDictionary/UserGroup.js.map +1 -1
- package/dist/iconDictionary/index.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +28 -0
- package/dist/src/Autocomplete.d.ts.map +1 -0
- package/dist/src/Banner.d.ts +19 -19
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/Button.d.ts +32 -0
- package/dist/src/Button.d.ts.map +1 -0
- package/dist/src/CheckboxGroup.d.ts +7 -4
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/Dialog.d.ts +25 -0
- package/dist/src/Dialog.d.ts.map +1 -0
- package/dist/src/Field.d.ts +65 -0
- package/dist/src/Field.d.ts.map +1 -0
- package/dist/src/FieldError.d.ts +19 -0
- package/dist/src/FieldError.d.ts.map +1 -0
- package/dist/src/FieldHint.d.ts +19 -0
- package/dist/src/FieldHint.d.ts.map +1 -0
- package/dist/src/FieldLabel.d.ts +23 -0
- package/dist/src/FieldLabel.d.ts.map +1 -0
- package/dist/src/Icon.d.ts +6 -7
- package/dist/src/Icon.d.ts.map +1 -1
- package/dist/src/Infobox.d.ts +7 -7
- package/dist/src/Infobox.d.ts.map +1 -1
- package/dist/src/Link.d.ts +9 -4
- package/dist/src/Link.d.ts.map +1 -1
- package/dist/src/MenuButton.d.ts +7 -3
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/MuiPropsChild.d.ts +18 -0
- package/dist/src/MuiPropsChild.d.ts.map +1 -0
- package/dist/src/MuiPropsContext.d.ts +15 -0
- package/dist/src/MuiPropsContext.d.ts.map +1 -0
- package/dist/src/PasswordField.d.ts +75 -0
- package/dist/src/PasswordField.d.ts.map +1 -0
- package/dist/src/RadioGroup.d.ts +8 -8
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +59 -0
- package/dist/src/SearchField.d.ts.map +1 -0
- package/dist/src/Status.d.ts +2 -2
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +22 -0
- package/dist/src/Tag.d.ts.map +1 -0
- package/dist/src/TagList.d.ts +19 -0
- package/dist/src/TagList.d.ts.map +1 -0
- package/dist/src/TagListContext.d.ts +18 -0
- package/dist/src/TagListContext.d.ts.map +1 -0
- package/dist/src/TextField.d.ts +16 -20
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +60 -0
- package/dist/src/Toast.d.ts.map +1 -0
- package/dist/src/ToastStack.d.ts +19 -0
- package/dist/src/ToastStack.d.ts.map +1 -0
- package/dist/src/Tooltip.d.ts +21 -0
- package/dist/src/Tooltip.d.ts.map +1 -0
- package/dist/src/iconDictionary/Add.d.ts +2 -2
- package/dist/src/iconDictionary/AddCircle.d.ts +2 -2
- package/dist/src/iconDictionary/AlertCircle.d.ts +2 -2
- package/dist/src/iconDictionary/AlertCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Anchor.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowDown.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowLeft.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowRight.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowUp.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowUpDown.d.ts +2 -2
- package/dist/src/iconDictionary/Calendar.d.ts +2 -2
- package/dist/src/iconDictionary/Check.d.ts +2 -2
- package/dist/src/iconDictionary/CheckCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/ChevronDown.d.ts +2 -2
- package/dist/src/iconDictionary/ChevronUp.d.ts +2 -2
- package/dist/src/iconDictionary/Close.d.ts +2 -2
- package/dist/src/iconDictionary/CloseCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Copy.d.ts +2 -2
- package/dist/src/iconDictionary/Delete.d.ts +2 -2
- package/dist/src/iconDictionary/Download.d.ts +2 -2
- package/dist/src/iconDictionary/DragHandle.d.ts +2 -2
- package/dist/src/iconDictionary/Edit.d.ts +2 -2
- package/dist/src/iconDictionary/ExternalLink.d.ts +2 -2
- package/dist/src/iconDictionary/Eye.d.ts +2 -2
- package/dist/src/iconDictionary/EyeOff.d.ts +2 -2
- package/dist/src/iconDictionary/Filter.d.ts +2 -2
- package/dist/src/iconDictionary/Globe.d.ts +2 -2
- package/dist/src/iconDictionary/Home.d.ts +2 -2
- package/dist/src/iconDictionary/InformationCircle.d.ts +2 -2
- package/dist/src/iconDictionary/InformationCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Notification.d.ts +2 -2
- package/dist/src/iconDictionary/OverflowVertical.d.ts +2 -2
- package/dist/src/iconDictionary/QuestionCircle.d.ts +2 -2
- package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Search.d.ts +2 -2
- package/dist/src/iconDictionary/Settings.d.ts +2 -2
- package/dist/src/iconDictionary/Subtract.d.ts +2 -2
- package/dist/src/iconDictionary/User.d.ts +2 -2
- package/dist/src/iconDictionary/UserGroup.d.ts +2 -2
- package/dist/src/iconDictionary/index.d.ts +40 -40
- package/dist/src/index.d.ts +14 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/components.types.d.ts +0 -8
- package/dist/src/theme/components.types.d.ts.map +1 -1
- package/dist/theme/components.js +249 -136
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/components.types.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Autocomplete.tsx +141 -0
- package/src/Banner.tsx +21 -21
- package/src/Button.tsx +95 -0
- package/src/CheckboxGroup.tsx +27 -34
- package/src/Dialog.tsx +110 -0
- package/src/Field.tsx +135 -0
- package/src/FieldError.tsx +34 -0
- package/src/FieldHint.tsx +28 -0
- package/src/FieldLabel.tsx +57 -0
- package/src/Icon.test.tsx +1 -1
- package/src/Icon.tsx +24 -7
- package/src/Infobox.tsx +7 -7
- package/src/Link.tsx +14 -6
- package/src/MenuButton.tsx +10 -6
- package/src/MenuItem.tsx +0 -1
- package/src/MuiPropsChild.tsx +41 -0
- package/src/MuiPropsContext.ts +17 -0
- package/src/OdysseyCacheProvider.test.tsx +1 -1
- package/src/PasswordField.tsx +180 -0
- package/src/RadioGroup.tsx +31 -46
- package/src/SearchField.tsx +138 -0
- package/src/Status.tsx +2 -2
- package/src/Tag.tsx +41 -0
- package/src/TagList.tsx +43 -0
- package/src/TagListContext.tsx +23 -0
- package/src/TextField.tsx +64 -111
- package/src/Toast.tsx +138 -0
- package/src/ToastStack.tsx +33 -0
- package/src/Tooltip.tsx +39 -0
- package/src/iconDictionary/Add.tsx +3 -3
- package/src/iconDictionary/AddCircle.tsx +3 -3
- package/src/iconDictionary/AlertCircle.tsx +3 -3
- package/src/iconDictionary/AlertCircleFilled.tsx +3 -3
- package/src/iconDictionary/AlertTriangleFilled.tsx +3 -3
- package/src/iconDictionary/Anchor.tsx +3 -3
- package/src/iconDictionary/ArrowDown.tsx +3 -3
- package/src/iconDictionary/ArrowLeft.tsx +3 -3
- package/src/iconDictionary/ArrowRight.tsx +3 -3
- package/src/iconDictionary/ArrowUp.tsx +3 -3
- package/src/iconDictionary/ArrowUpDown.tsx +3 -3
- package/src/iconDictionary/Calendar.tsx +3 -3
- package/src/iconDictionary/Check.tsx +3 -3
- package/src/iconDictionary/CheckCircleFilled.tsx +3 -3
- package/src/iconDictionary/ChevronDown.tsx +3 -3
- package/src/iconDictionary/ChevronUp.tsx +3 -3
- package/src/iconDictionary/Close.tsx +3 -3
- package/src/iconDictionary/CloseCircleFilled.tsx +3 -3
- package/src/iconDictionary/Copy.tsx +3 -3
- package/src/iconDictionary/Delete.tsx +3 -3
- package/src/iconDictionary/Download.tsx +3 -3
- package/src/iconDictionary/DragHandle.tsx +3 -3
- package/src/iconDictionary/Edit.tsx +3 -3
- package/src/iconDictionary/ExternalLink.tsx +3 -3
- package/src/iconDictionary/Eye.tsx +3 -3
- package/src/iconDictionary/EyeOff.tsx +3 -3
- package/src/iconDictionary/Filter.tsx +3 -3
- package/src/iconDictionary/Globe.tsx +3 -3
- package/src/iconDictionary/Home.tsx +3 -3
- package/src/iconDictionary/InformationCircle.tsx +3 -3
- package/src/iconDictionary/InformationCircleFilled.tsx +3 -3
- package/src/iconDictionary/Notification.tsx +3 -3
- package/src/iconDictionary/OverflowVertical.tsx +3 -3
- package/src/iconDictionary/QuestionCircle.tsx +3 -3
- package/src/iconDictionary/QuestionCircleFilled.tsx +3 -3
- package/src/iconDictionary/Search.tsx +3 -3
- package/src/iconDictionary/Settings.tsx +2 -2
- package/src/iconDictionary/Subtract.tsx +3 -3
- package/src/iconDictionary/User.tsx +3 -3
- package/src/iconDictionary/UserGroup.tsx +3 -3
- package/src/iconDictionary/index.ts +1 -1
- package/src/index.ts +10 -14
- package/src/theme/components.tsx +119 -27
- package/src/theme/components.types.ts +0 -8
- package/dist/PasswordInput.js +0 -87
- package/dist/PasswordInput.js.map +0 -1
- package/dist/src/PasswordInput.d.ts +0 -21
- package/dist/src/PasswordInput.d.ts.map +0 -1
- package/src/PasswordInput.test.tsx +0 -51
- package/src/PasswordInput.tsx +0 -111
|
@@ -0,0 +1,28 @@
|
|
|
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 } from "react";
|
|
14
|
+
|
|
15
|
+
import { FormHelperText } from "./";
|
|
16
|
+
|
|
17
|
+
export type FieldHintProps = {
|
|
18
|
+
id?: string;
|
|
19
|
+
text: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const FieldHint = ({ id, text }: FieldHintProps) => {
|
|
23
|
+
return <FormHelperText id={id}>{text}</FormHelperText>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const MemoizedFieldHint = memo(FieldHint);
|
|
27
|
+
|
|
28
|
+
export { MemoizedFieldHint as FieldHint };
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { InputLabel as MuiInputLabel } from "@mui/material";
|
|
14
|
+
import { memo, useMemo } from "react";
|
|
15
|
+
|
|
16
|
+
import { ScreenReaderText } from "./ScreenReaderText";
|
|
17
|
+
import { Typography } from ".";
|
|
18
|
+
|
|
19
|
+
export type FieldLabelProps = {
|
|
20
|
+
hasVisibleLabel: boolean;
|
|
21
|
+
id: string;
|
|
22
|
+
inputId: string;
|
|
23
|
+
isOptional: boolean;
|
|
24
|
+
optionalText?: string;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const FieldLabel = ({
|
|
29
|
+
hasVisibleLabel,
|
|
30
|
+
id,
|
|
31
|
+
inputId,
|
|
32
|
+
isOptional,
|
|
33
|
+
optionalText,
|
|
34
|
+
text,
|
|
35
|
+
}: FieldLabelProps) => {
|
|
36
|
+
const inputLabel = useMemo(
|
|
37
|
+
() => (
|
|
38
|
+
<MuiInputLabel htmlFor={inputId} id={id}>
|
|
39
|
+
{text}
|
|
40
|
+
{isOptional && (
|
|
41
|
+
<Typography variant="subtitle1">{optionalText}</Typography>
|
|
42
|
+
)}
|
|
43
|
+
</MuiInputLabel>
|
|
44
|
+
),
|
|
45
|
+
[id, inputId, isOptional, optionalText, text]
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
return hasVisibleLabel ? (
|
|
49
|
+
inputLabel
|
|
50
|
+
) : (
|
|
51
|
+
<ScreenReaderText>{inputLabel}</ScreenReaderText>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const MemoizedFieldLabel = memo(FieldLabel);
|
|
56
|
+
|
|
57
|
+
export { MemoizedFieldLabel as FieldLabel };
|
package/src/Icon.test.tsx
CHANGED
|
@@ -18,7 +18,7 @@ const name = "check";
|
|
|
18
18
|
|
|
19
19
|
describe("Icon", () => {
|
|
20
20
|
it("renders an icon based on name prop", () => {
|
|
21
|
-
render(<Icon name={name}
|
|
21
|
+
render(<Icon name={name} label={title} size="medium" />);
|
|
22
22
|
|
|
23
23
|
const svgElement = screen.getByRole("img");
|
|
24
24
|
expect(svgElement).toBeVisible();
|
package/src/Icon.tsx
CHANGED
|
@@ -11,15 +11,26 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
|
-
import type { SvgIconNoChildrenProps } from "./iconDictionary/types";
|
|
15
14
|
import { iconDictionary } from "./iconDictionary";
|
|
16
15
|
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export type IconProps = {
|
|
17
|
+
/*
|
|
18
|
+
** The element whose text describes the icon, if it exists
|
|
19
|
+
*/
|
|
20
|
+
ariaLabelledby?: string;
|
|
21
|
+
/*
|
|
22
|
+
** Text that describes the icon
|
|
23
|
+
*/
|
|
24
|
+
label: string;
|
|
25
|
+
/*
|
|
26
|
+
** Name of the icon to render
|
|
20
27
|
*/
|
|
21
28
|
name: keyof typeof iconDictionary;
|
|
22
|
-
|
|
29
|
+
/*
|
|
30
|
+
** The size of the icon
|
|
31
|
+
*/
|
|
32
|
+
size: "small" | "medium" | "large";
|
|
33
|
+
};
|
|
23
34
|
|
|
24
35
|
/**
|
|
25
36
|
* A system of icons which establishes a visual language
|
|
@@ -28,12 +39,18 @@ export interface IconProps extends SvgIconNoChildrenProps {
|
|
|
28
39
|
* icon component imports where possible to keep your bundle size smaller.
|
|
29
40
|
*/
|
|
30
41
|
export const Icon = forwardRef<SVGSVGElement, IconProps>(
|
|
31
|
-
({
|
|
42
|
+
({ ariaLabelledby, label, name, size }) => {
|
|
32
43
|
if (!(name in iconDictionary)) return null;
|
|
33
44
|
|
|
34
45
|
const NamedIcon = iconDictionary[name];
|
|
35
46
|
|
|
36
|
-
return
|
|
47
|
+
return (
|
|
48
|
+
<NamedIcon
|
|
49
|
+
aria-labelledby={ariaLabelledby}
|
|
50
|
+
fontSize={size}
|
|
51
|
+
titleAccess={label}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
37
54
|
}
|
|
38
55
|
);
|
|
39
56
|
|
package/src/Infobox.tsx
CHANGED
|
@@ -14,28 +14,28 @@ import { AlertColor } from "@mui/material";
|
|
|
14
14
|
import { memo, ReactNode } from "react";
|
|
15
15
|
import { Alert, AlertTitle, ScreenReaderText } from ".";
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export type InfoboxProps = {
|
|
18
18
|
/**
|
|
19
19
|
* The contents of the alert
|
|
20
20
|
*/
|
|
21
21
|
children: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Determine the color and icon of the alert
|
|
24
|
-
*/
|
|
25
|
-
severity: AlertColor;
|
|
26
22
|
/**
|
|
27
23
|
* Sets the ARIA role of the alert
|
|
28
24
|
* ("status" for something that dynamically updates, "alert" for errors, null for something
|
|
29
25
|
* unchanging)
|
|
30
26
|
*/
|
|
31
27
|
role?: "status" | "alert";
|
|
28
|
+
/**
|
|
29
|
+
* Determine the color and icon of the alert
|
|
30
|
+
*/
|
|
31
|
+
severity: AlertColor;
|
|
32
32
|
/**
|
|
33
33
|
* The title of the alert
|
|
34
34
|
*/
|
|
35
35
|
title?: string;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
|
|
38
|
-
const Infobox = ({ children,
|
|
38
|
+
const Infobox = ({ children, role, severity, title }: InfoboxProps) => (
|
|
39
39
|
<Alert role={role} severity={severity} variant="infobox">
|
|
40
40
|
<ScreenReaderText>{severity}: </ScreenReaderText>
|
|
41
41
|
{title && <AlertTitle>{title}</AlertTitle>}
|
package/src/Link.tsx
CHANGED
|
@@ -12,17 +12,25 @@
|
|
|
12
12
|
|
|
13
13
|
import { forwardRef, ReactElement } from "react";
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import {
|
|
16
|
+
Link as MuiLink,
|
|
17
|
+
LinkProps as MuiLinkProps,
|
|
18
|
+
SvgIcon,
|
|
19
|
+
} from "@mui/material";
|
|
17
20
|
|
|
18
|
-
export
|
|
21
|
+
export type LinkProps = {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
href: string;
|
|
19
24
|
icon?: ReactElement;
|
|
20
|
-
|
|
25
|
+
rel?: string;
|
|
26
|
+
target?: "_self" | "_blank" | "_parent" | "_top" | string;
|
|
27
|
+
variant?: MuiLinkProps["variant"];
|
|
28
|
+
};
|
|
21
29
|
|
|
22
30
|
export const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {
|
|
23
|
-
const { icon, children, target } = props;
|
|
31
|
+
const { icon, children, target, variant } = props;
|
|
24
32
|
return (
|
|
25
|
-
<MuiLink {
|
|
33
|
+
<MuiLink ref={ref} variant={variant} target={target}>
|
|
26
34
|
{icon && <span className="Link-icon">{icon}</span>}
|
|
27
35
|
{children}
|
|
28
36
|
{target === "_blank" && (
|
package/src/MenuButton.tsx
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./";
|
|
23
23
|
import { memo, MouseEvent, ReactElement, useMemo, useState } from "react";
|
|
24
24
|
|
|
25
|
-
export
|
|
25
|
+
export type MenuButtonProps = {
|
|
26
26
|
/**
|
|
27
27
|
* The <MenuItem> components within the Menu.
|
|
28
28
|
*/
|
|
@@ -41,13 +41,18 @@ export interface MenuButtonProps {
|
|
|
41
41
|
* The variant of the triggering Button
|
|
42
42
|
*/
|
|
43
43
|
buttonVariant?: ButtonProps["variant"];
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The id of the `input` element.
|
|
46
|
+
*/
|
|
47
|
+
id?: string;
|
|
48
|
+
};
|
|
45
49
|
|
|
46
50
|
const MenuButton = ({
|
|
47
51
|
buttonLabel = "",
|
|
48
52
|
children,
|
|
49
53
|
buttonEndIcon = <ChevronDownIcon />,
|
|
50
54
|
buttonVariant = "secondary",
|
|
55
|
+
id: idOverride,
|
|
51
56
|
}: MenuButtonProps) => {
|
|
52
57
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
53
58
|
|
|
@@ -61,7 +66,7 @@ const MenuButton = ({
|
|
|
61
66
|
setAnchorEl(null);
|
|
62
67
|
};
|
|
63
68
|
|
|
64
|
-
const uniqueId = useUniqueId();
|
|
69
|
+
const uniqueId = useUniqueId(idOverride);
|
|
65
70
|
|
|
66
71
|
const menuListProps = useMemo(
|
|
67
72
|
() => ({ "aria-labelledby": `${uniqueId}-button` }),
|
|
@@ -77,10 +82,9 @@ const MenuButton = ({
|
|
|
77
82
|
aria-haspopup="true"
|
|
78
83
|
aria-expanded={open ? "true" : undefined}
|
|
79
84
|
onClick={handleClick}
|
|
85
|
+
text={buttonLabel}
|
|
80
86
|
variant={buttonVariant}
|
|
81
|
-
|
|
82
|
-
{buttonLabel}
|
|
83
|
-
</Button>
|
|
87
|
+
/>
|
|
84
88
|
<Menu
|
|
85
89
|
id={`${uniqueId}-menu`}
|
|
86
90
|
anchorEl={anchorEl}
|
package/src/MenuItem.tsx
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
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 { forwardRef, memo, ReactNode, useMemo } from "react";
|
|
14
|
+
|
|
15
|
+
import { MuiPropsContext, MuiPropsContextType } from "./MuiPropsContext";
|
|
16
|
+
|
|
17
|
+
export type MuiPropsChildProps = {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(
|
|
22
|
+
({ children, ...muiProps }, ref) => {
|
|
23
|
+
const providerValue = useMemo<MuiPropsContextType>(
|
|
24
|
+
() => ({
|
|
25
|
+
...muiProps,
|
|
26
|
+
ref,
|
|
27
|
+
}),
|
|
28
|
+
[muiProps, ref]
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<MuiPropsContext.Provider value={providerValue}>
|
|
33
|
+
{children}
|
|
34
|
+
</MuiPropsContext.Provider>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const MemoizedMuiPropsChild = memo(MuiPropsChild);
|
|
40
|
+
|
|
41
|
+
export { MemoizedMuiPropsChild as MuiPropsChild };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { createContext } from "react";
|
|
14
|
+
|
|
15
|
+
export type MuiPropsContextType = Record<string, unknown>;
|
|
16
|
+
|
|
17
|
+
export const MuiPropsContext = createContext<MuiPropsContextType>({});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-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 { InputAdornment, InputBase } from "@mui/material";
|
|
14
|
+
import {
|
|
15
|
+
ChangeEventHandler,
|
|
16
|
+
FocusEventHandler,
|
|
17
|
+
forwardRef,
|
|
18
|
+
memo,
|
|
19
|
+
useCallback,
|
|
20
|
+
useState,
|
|
21
|
+
} from "react";
|
|
22
|
+
|
|
23
|
+
import { EyeIcon, EyeOffIcon, IconButton } from "./";
|
|
24
|
+
import { Field } from "./Field";
|
|
25
|
+
|
|
26
|
+
export type PasswordFieldProps = {
|
|
27
|
+
/**
|
|
28
|
+
* This prop helps users to fill forms faster, especially on mobile devices.
|
|
29
|
+
* The name can be confusing, as it's more like an autofill.
|
|
30
|
+
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
|
31
|
+
*/
|
|
32
|
+
autoCompleteType?: "current-password" | "new-password";
|
|
33
|
+
/**
|
|
34
|
+
* If `error` is not undefined, the `input` will indicate an error.
|
|
35
|
+
*/
|
|
36
|
+
errorMessage?: string;
|
|
37
|
+
/**
|
|
38
|
+
* If `true`, the component will receive focus automatically.
|
|
39
|
+
*/
|
|
40
|
+
hasInitialFocus?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The helper text content.
|
|
43
|
+
*/
|
|
44
|
+
hint?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The id of the `input` element.
|
|
47
|
+
*/
|
|
48
|
+
id?: string;
|
|
49
|
+
/**
|
|
50
|
+
* If `true`, the component is disabled.
|
|
51
|
+
*/
|
|
52
|
+
isDisabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If `true`, the `input` element is not required.
|
|
55
|
+
*/
|
|
56
|
+
isOptional?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* It prevents the user from changing the value of the field
|
|
59
|
+
*/
|
|
60
|
+
isReadOnly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The label for the `input` element.
|
|
63
|
+
*/
|
|
64
|
+
label: string;
|
|
65
|
+
/**
|
|
66
|
+
* Callback fired when the `input` element loses focus.
|
|
67
|
+
*/
|
|
68
|
+
onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
69
|
+
/**
|
|
70
|
+
* Callback fired when the value is changed.
|
|
71
|
+
*/
|
|
72
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
|
|
73
|
+
/**
|
|
74
|
+
* Callback fired when the `input` element get focus.
|
|
75
|
+
*/
|
|
76
|
+
onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
77
|
+
/**
|
|
78
|
+
* The short hint displayed in the `input` before the user enters a value.
|
|
79
|
+
*/
|
|
80
|
+
placeholder?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The value of the `input` element, required for a controlled component.
|
|
83
|
+
*/
|
|
84
|
+
value?: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
|
|
88
|
+
(
|
|
89
|
+
{
|
|
90
|
+
autoCompleteType,
|
|
91
|
+
errorMessage,
|
|
92
|
+
hasInitialFocus,
|
|
93
|
+
hint,
|
|
94
|
+
id: idOverride,
|
|
95
|
+
isDisabled = false,
|
|
96
|
+
isOptional = false,
|
|
97
|
+
isReadOnly,
|
|
98
|
+
label,
|
|
99
|
+
onChange,
|
|
100
|
+
onFocus,
|
|
101
|
+
onBlur,
|
|
102
|
+
placeholder,
|
|
103
|
+
value,
|
|
104
|
+
},
|
|
105
|
+
ref
|
|
106
|
+
) => {
|
|
107
|
+
const [inputType, setInputType] = useState("password");
|
|
108
|
+
|
|
109
|
+
const togglePasswordVisibility = useCallback(() => {
|
|
110
|
+
setInputType((inputType) =>
|
|
111
|
+
inputType === "password" ? "text" : "password"
|
|
112
|
+
);
|
|
113
|
+
}, []);
|
|
114
|
+
|
|
115
|
+
const renderFieldComponent = useCallback(
|
|
116
|
+
({ ariaDescribedBy, id }) => (
|
|
117
|
+
<InputBase
|
|
118
|
+
aria-describedby={ariaDescribedBy}
|
|
119
|
+
autoComplete={autoCompleteType}
|
|
120
|
+
/* eslint-disable-next-line jsx-a11y/no-autofocus */
|
|
121
|
+
autoFocus={hasInitialFocus}
|
|
122
|
+
endAdornment={
|
|
123
|
+
<InputAdornment position="end">
|
|
124
|
+
<IconButton
|
|
125
|
+
aria-label="toggle password visibility"
|
|
126
|
+
edge="end"
|
|
127
|
+
onClick={togglePasswordVisibility}
|
|
128
|
+
>
|
|
129
|
+
{inputType === "password" ? <EyeIcon /> : <EyeOffIcon />}
|
|
130
|
+
</IconButton>
|
|
131
|
+
</InputAdornment>
|
|
132
|
+
}
|
|
133
|
+
id={id}
|
|
134
|
+
name={id}
|
|
135
|
+
onChange={onChange}
|
|
136
|
+
onFocus={onFocus}
|
|
137
|
+
onBlur={onBlur}
|
|
138
|
+
placeholder={placeholder}
|
|
139
|
+
readOnly={isReadOnly}
|
|
140
|
+
ref={ref}
|
|
141
|
+
required={!isOptional}
|
|
142
|
+
type={inputType}
|
|
143
|
+
value={value}
|
|
144
|
+
/>
|
|
145
|
+
),
|
|
146
|
+
[
|
|
147
|
+
autoCompleteType,
|
|
148
|
+
hasInitialFocus,
|
|
149
|
+
togglePasswordVisibility,
|
|
150
|
+
inputType,
|
|
151
|
+
onChange,
|
|
152
|
+
onFocus,
|
|
153
|
+
onBlur,
|
|
154
|
+
placeholder,
|
|
155
|
+
isOptional,
|
|
156
|
+
isReadOnly,
|
|
157
|
+
ref,
|
|
158
|
+
value,
|
|
159
|
+
]
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<Field
|
|
164
|
+
errorMessage={errorMessage}
|
|
165
|
+
fieldType="single"
|
|
166
|
+
hasVisibleLabel
|
|
167
|
+
hint={hint}
|
|
168
|
+
id={idOverride}
|
|
169
|
+
isDisabled={isDisabled}
|
|
170
|
+
isOptional={isOptional}
|
|
171
|
+
label={label}
|
|
172
|
+
renderFieldComponent={renderFieldComponent}
|
|
173
|
+
/>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
const MemoizedPasswordField = memo(PasswordField);
|
|
179
|
+
|
|
180
|
+
export { MemoizedPasswordField as PasswordField };
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -11,19 +11,12 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { RadioGroup as MuiRadioGroup } from "@mui/material";
|
|
14
|
-
import { ChangeEventHandler, memo, ReactElement,
|
|
14
|
+
import { ChangeEventHandler, memo, ReactElement, useCallback } from "react";
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
FormLabel,
|
|
19
|
-
FormHelperText,
|
|
20
|
-
Radio,
|
|
21
|
-
ScreenReaderText,
|
|
22
|
-
useUniqueId,
|
|
23
|
-
RadioProps,
|
|
24
|
-
} from ".";
|
|
16
|
+
import { Radio, RadioProps } from "./Radio";
|
|
17
|
+
import { Field } from "./Field";
|
|
25
18
|
|
|
26
|
-
export
|
|
19
|
+
export type RadioGroupProps = {
|
|
27
20
|
/**
|
|
28
21
|
* The <Radio> components within the group. Must include two or more.
|
|
29
22
|
*/
|
|
@@ -40,6 +33,10 @@ export interface RadioGroupProps {
|
|
|
40
33
|
* Optional hint text
|
|
41
34
|
*/
|
|
42
35
|
hint?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The id of the `input` element. This will also be the input's `name` field.
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
43
40
|
/**
|
|
44
41
|
* Disables the whole radio group
|
|
45
42
|
*/
|
|
@@ -48,10 +45,6 @@ export interface RadioGroupProps {
|
|
|
48
45
|
* The text label for the radio group
|
|
49
46
|
*/
|
|
50
47
|
label: string;
|
|
51
|
-
/**
|
|
52
|
-
* The name of the radio group, which only needs to be changed if there are multiple radio groups on the same screen
|
|
53
|
-
*/
|
|
54
|
-
name?: string;
|
|
55
48
|
/**
|
|
56
49
|
* Listen for changes in the browser that change `value`.
|
|
57
50
|
*/
|
|
@@ -60,54 +53,46 @@ export interface RadioGroupProps {
|
|
|
60
53
|
* The `value` on the selected radio button.
|
|
61
54
|
*/
|
|
62
55
|
value?: RadioProps["value"];
|
|
63
|
-
}
|
|
56
|
+
};
|
|
64
57
|
|
|
65
58
|
const RadioGroup = ({
|
|
66
59
|
children,
|
|
67
60
|
defaultValue,
|
|
68
61
|
errorMessage,
|
|
69
62
|
hint,
|
|
63
|
+
id: idOverride,
|
|
70
64
|
isDisabled,
|
|
71
65
|
label,
|
|
72
|
-
name,
|
|
73
66
|
onChange,
|
|
67
|
+
value,
|
|
74
68
|
}: RadioGroupProps) => {
|
|
75
|
-
const
|
|
76
|
-
() =>
|
|
77
|
-
errorMessage || hint
|
|
78
|
-
? [hint && `${name}-hint`, errorMessage && `${name}-error`]
|
|
79
|
-
.filter(Boolean)
|
|
80
|
-
.join(" ")
|
|
81
|
-
: undefined,
|
|
82
|
-
[errorMessage, hint, name]
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
const uniqueName = useUniqueId(name);
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<FormControl
|
|
89
|
-
component="fieldset"
|
|
90
|
-
disabled={isDisabled}
|
|
91
|
-
error={Boolean(errorMessage)}
|
|
92
|
-
>
|
|
93
|
-
<FormLabel component="legend">{label}</FormLabel>
|
|
94
|
-
{hint && (
|
|
95
|
-
<FormHelperText id={`${uniqueName}-hint`}>{hint}</FormHelperText>
|
|
96
|
-
)}
|
|
69
|
+
const renderFieldComponent = useCallback(
|
|
70
|
+
({ ariaDescribedBy, id }) => (
|
|
97
71
|
<MuiRadioGroup
|
|
98
72
|
aria-describedby={ariaDescribedBy}
|
|
99
73
|
defaultValue={defaultValue}
|
|
100
|
-
|
|
74
|
+
id={id}
|
|
75
|
+
name={id}
|
|
101
76
|
onChange={onChange}
|
|
77
|
+
value={value}
|
|
102
78
|
>
|
|
103
79
|
{children}
|
|
104
80
|
</MuiRadioGroup>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
81
|
+
),
|
|
82
|
+
[children, defaultValue, onChange, value]
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<Field
|
|
87
|
+
errorMessage={errorMessage}
|
|
88
|
+
fieldType="group"
|
|
89
|
+
hasVisibleLabel={false}
|
|
90
|
+
hint={hint}
|
|
91
|
+
id={idOverride}
|
|
92
|
+
isDisabled={isDisabled}
|
|
93
|
+
label={label}
|
|
94
|
+
renderFieldComponent={renderFieldComponent}
|
|
95
|
+
/>
|
|
111
96
|
);
|
|
112
97
|
};
|
|
113
98
|
|