@okta/odyssey-react-mui 1.12.4 → 1.12.5
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 +6 -0
- package/dist/Select.js +14 -8
- package/dist/Select.js.map +1 -1
- package/dist/TextField.js +1 -1
- package/dist/TextField.js.map +1 -1
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Select.tsx +17 -12
- package/src/TextField.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okta/odyssey-react-mui",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.5",
|
|
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.12.
|
|
54
|
+
"@okta/odyssey-design-tokens": "1.12.5",
|
|
55
55
|
"date-fns": "^2.30.0",
|
|
56
56
|
"i18next": "^23.5.1",
|
|
57
57
|
"material-react-table": "^2.0.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": ">=17 <19",
|
|
64
64
|
"react-dom": ">=17 <19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1479286658569d5d4b9842b0d8083cc3d1cb06bd"
|
|
67
67
|
}
|
package/src/Select.tsx
CHANGED
|
@@ -212,18 +212,23 @@ const Select = <
|
|
|
212
212
|
// data types that might be passed
|
|
213
213
|
const normalizedOptions = useMemo(
|
|
214
214
|
() =>
|
|
215
|
-
options.map((option) =>
|
|
216
|
-
typeof option === "object"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
215
|
+
options.map((option) => {
|
|
216
|
+
if (typeof option === "object") {
|
|
217
|
+
/**
|
|
218
|
+
* If the value of `option?.value is an empty string, we need to make sure that we
|
|
219
|
+
* set an empty string to `value` in the normalized option so that the select component
|
|
220
|
+
* can potentially set it as the selected one in the text input
|
|
221
|
+
*/
|
|
222
|
+
const value =
|
|
223
|
+
option?.value === "" ? option.value : option.value || option.text;
|
|
224
|
+
return {
|
|
225
|
+
text: option.text,
|
|
226
|
+
value,
|
|
227
|
+
type: option.type === "heading" ? "heading" : "option",
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return { text: option, value: option, type: "option" };
|
|
231
|
+
}),
|
|
227
232
|
[options]
|
|
228
233
|
);
|
|
229
234
|
|
package/src/TextField.tsx
CHANGED
|
@@ -191,7 +191,7 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
191
191
|
"aria-errormessage": errorMessageElementId,
|
|
192
192
|
"aria-labelledby": labelElementId,
|
|
193
193
|
"data-se": testId,
|
|
194
|
-
|
|
194
|
+
inputMode,
|
|
195
195
|
}}
|
|
196
196
|
inputRef={localInputRef}
|
|
197
197
|
multiline={isMultiline}
|