@okta/odyssey-react-mui 1.12.9 → 1.12.11

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.
Files changed (164) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Accordion.js.map +1 -1
  3. package/dist/Autocomplete.js.map +1 -1
  4. package/dist/Badge.js.map +1 -1
  5. package/dist/Banner.js.map +1 -1
  6. package/dist/Box.js.map +1 -1
  7. package/dist/Breadcrumbs.js.map +1 -1
  8. package/dist/Button.js +27 -25
  9. package/dist/Button.js.map +1 -1
  10. package/dist/Callout.js.map +1 -1
  11. package/dist/Checkbox.js.map +1 -1
  12. package/dist/CheckboxGroup.js.map +1 -1
  13. package/dist/CircularProgress.js.map +1 -1
  14. package/dist/Dialog.js.map +1 -1
  15. package/dist/FieldError.js.map +1 -1
  16. package/dist/FieldHint.js.map +1 -1
  17. package/dist/FieldLabel.js.map +1 -1
  18. package/dist/Fieldset.js.map +1 -1
  19. package/dist/Form.js.map +1 -1
  20. package/dist/HtmlProps.js +2 -0
  21. package/dist/HtmlProps.js.map +1 -0
  22. package/dist/Link.js.map +1 -1
  23. package/dist/MenuButton.js.map +1 -1
  24. package/dist/MenuItem.js.map +1 -1
  25. package/dist/MuiPropsContext.js.map +1 -1
  26. package/dist/NativeSelect.js.map +1 -1
  27. package/dist/PasswordField.js.map +1 -1
  28. package/dist/Radio.js.map +1 -1
  29. package/dist/RadioGroup.js.map +1 -1
  30. package/dist/ScreenReaderText.js.map +1 -1
  31. package/dist/SearchField.js.map +1 -1
  32. package/dist/Select.js +1 -1
  33. package/dist/Select.js.map +1 -1
  34. package/dist/Status.js.map +1 -1
  35. package/dist/Tabs.js.map +1 -1
  36. package/dist/Tag.js.map +1 -1
  37. package/dist/TagList.js.map +1 -1
  38. package/dist/TextField.js.map +1 -1
  39. package/dist/Toast.js.map +1 -1
  40. package/dist/Tooltip.js.map +1 -1
  41. package/dist/Typography.js.map +1 -1
  42. package/dist/labs/Switch.js.map +1 -1
  43. package/dist/labs/VirtualizedAutocomplete.js.map +1 -1
  44. package/dist/src/Accordion.d.ts +2 -2
  45. package/dist/src/Accordion.d.ts.map +1 -1
  46. package/dist/src/Autocomplete.d.ts +2 -2
  47. package/dist/src/Autocomplete.d.ts.map +1 -1
  48. package/dist/src/Badge.d.ts +2 -2
  49. package/dist/src/Badge.d.ts.map +1 -1
  50. package/dist/src/Banner.d.ts +2 -2
  51. package/dist/src/Banner.d.ts.map +1 -1
  52. package/dist/src/Box.d.ts +3 -3
  53. package/dist/src/Box.d.ts.map +1 -1
  54. package/dist/src/Breadcrumbs.d.ts +2 -2
  55. package/dist/src/Breadcrumbs.d.ts.map +1 -1
  56. package/dist/src/Button.d.ts +2 -2
  57. package/dist/src/Button.d.ts.map +1 -1
  58. package/dist/src/Callout.d.ts +2 -2
  59. package/dist/src/Callout.d.ts.map +1 -1
  60. package/dist/src/Checkbox.d.ts +2 -2
  61. package/dist/src/Checkbox.d.ts.map +1 -1
  62. package/dist/src/CheckboxGroup.d.ts +2 -2
  63. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  64. package/dist/src/CircularProgress.d.ts +2 -2
  65. package/dist/src/CircularProgress.d.ts.map +1 -1
  66. package/dist/src/Dialog.d.ts +2 -2
  67. package/dist/src/Dialog.d.ts.map +1 -1
  68. package/dist/src/FieldError.d.ts +2 -2
  69. package/dist/src/FieldError.d.ts.map +1 -1
  70. package/dist/src/FieldHint.d.ts +2 -2
  71. package/dist/src/FieldHint.d.ts.map +1 -1
  72. package/dist/src/FieldLabel.d.ts +2 -2
  73. package/dist/src/FieldLabel.d.ts.map +1 -1
  74. package/dist/src/Fieldset.d.ts +2 -2
  75. package/dist/src/Fieldset.d.ts.map +1 -1
  76. package/dist/src/Form.d.ts +2 -2
  77. package/dist/src/Form.d.ts.map +1 -1
  78. package/dist/src/{AllowedProps.d.ts → HtmlProps.d.ts} +2 -2
  79. package/dist/src/HtmlProps.d.ts.map +1 -0
  80. package/dist/src/Link.d.ts +2 -2
  81. package/dist/src/Link.d.ts.map +1 -1
  82. package/dist/src/MenuButton.d.ts +2 -2
  83. package/dist/src/MenuButton.d.ts.map +1 -1
  84. package/dist/src/MenuItem.d.ts +2 -2
  85. package/dist/src/MenuItem.d.ts.map +1 -1
  86. package/dist/src/MuiPropsContext.d.ts.map +1 -1
  87. package/dist/src/NativeSelect.d.ts +2 -2
  88. package/dist/src/NativeSelect.d.ts.map +1 -1
  89. package/dist/src/PasswordField.d.ts +3 -3
  90. package/dist/src/PasswordField.d.ts.map +1 -1
  91. package/dist/src/Radio.d.ts +2 -2
  92. package/dist/src/Radio.d.ts.map +1 -1
  93. package/dist/src/RadioGroup.d.ts +2 -2
  94. package/dist/src/RadioGroup.d.ts.map +1 -1
  95. package/dist/src/ScreenReaderText.d.ts +2 -2
  96. package/dist/src/ScreenReaderText.d.ts.map +1 -1
  97. package/dist/src/SearchField.d.ts +3 -3
  98. package/dist/src/SearchField.d.ts.map +1 -1
  99. package/dist/src/Select.d.ts +2 -2
  100. package/dist/src/Select.d.ts.map +1 -1
  101. package/dist/src/Status.d.ts +2 -2
  102. package/dist/src/Status.d.ts.map +1 -1
  103. package/dist/src/Tabs.d.ts +2 -2
  104. package/dist/src/Tabs.d.ts.map +1 -1
  105. package/dist/src/Tag.d.ts +2 -2
  106. package/dist/src/Tag.d.ts.map +1 -1
  107. package/dist/src/TagList.d.ts +2 -2
  108. package/dist/src/TagList.d.ts.map +1 -1
  109. package/dist/src/TextField.d.ts +3 -3
  110. package/dist/src/TextField.d.ts.map +1 -1
  111. package/dist/src/Toast.d.ts +2 -2
  112. package/dist/src/Toast.d.ts.map +1 -1
  113. package/dist/src/Tooltip.d.ts +2 -2
  114. package/dist/src/Tooltip.d.ts.map +1 -1
  115. package/dist/src/Typography.d.ts +2 -2
  116. package/dist/src/Typography.d.ts.map +1 -1
  117. package/dist/src/labs/Switch.d.ts +2 -2
  118. package/dist/src/labs/Switch.d.ts.map +1 -1
  119. package/dist/src/labs/VirtualizedAutocomplete.d.ts +2 -2
  120. package/dist/src/labs/VirtualizedAutocomplete.d.ts.map +1 -1
  121. package/dist/tsconfig.production.tsbuildinfo +1 -1
  122. package/package.json +3 -3
  123. package/src/Accordion.tsx +2 -2
  124. package/src/Autocomplete.tsx +2 -2
  125. package/src/Badge.tsx +2 -2
  126. package/src/Banner.tsx +2 -2
  127. package/src/Box.tsx +2 -2
  128. package/src/Breadcrumbs.tsx +2 -2
  129. package/src/Button.tsx +37 -35
  130. package/src/Callout.tsx +2 -2
  131. package/src/Checkbox.tsx +2 -2
  132. package/src/CheckboxGroup.tsx +2 -2
  133. package/src/CircularProgress.tsx +2 -2
  134. package/src/Dialog.tsx +2 -2
  135. package/src/FieldError.tsx +2 -2
  136. package/src/FieldHint.tsx +2 -2
  137. package/src/FieldLabel.tsx +2 -2
  138. package/src/Fieldset.tsx +2 -2
  139. package/src/Form.tsx +2 -2
  140. package/src/{AllowedProps.ts → HtmlProps.ts} +1 -1
  141. package/src/Link.tsx +2 -2
  142. package/src/MenuButton.tsx +2 -2
  143. package/src/MenuItem.tsx +2 -2
  144. package/src/MuiPropsContext.ts +0 -1
  145. package/src/NativeSelect.tsx +2 -2
  146. package/src/PasswordField.tsx +2 -2
  147. package/src/Radio.tsx +2 -2
  148. package/src/RadioGroup.tsx +2 -2
  149. package/src/ScreenReaderText.tsx +2 -2
  150. package/src/SearchField.tsx +2 -2
  151. package/src/Select.tsx +9 -7
  152. package/src/Status.tsx +2 -2
  153. package/src/Tabs.tsx +2 -2
  154. package/src/Tag.tsx +2 -2
  155. package/src/TagList.tsx +2 -2
  156. package/src/TextField.tsx +2 -2
  157. package/src/Toast.tsx +2 -2
  158. package/src/Tooltip.tsx +2 -2
  159. package/src/Typography.tsx +2 -2
  160. package/src/labs/Switch.tsx +2 -2
  161. package/src/labs/VirtualizedAutocomplete.tsx +2 -2
  162. package/dist/AllowedProps.js +0 -2
  163. package/dist/AllowedProps.js.map +0 -1
  164. package/dist/src/AllowedProps.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "1.12.9",
3
+ "version": "1.12.11",
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.9",
54
+ "@okta/odyssey-design-tokens": "1.12.11",
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": "13304462f9cf9ef8d67b9a3450eb9fe49175ca49"
66
+ "gitHead": "ebf671d9cd017cca109a7d341f500f54c3e47e41"
67
67
  }
package/src/Accordion.tsx CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { ReactNode, memo } from "react";
14
- import type { AllowedProps } from "./AllowedProps";
14
+ import type { HtmlProps } from "./HtmlProps";
15
15
  import {
16
16
  Accordion as MuiAccordion,
17
17
  AccordionDetails as MuiAccordionDetails,
@@ -65,7 +65,7 @@ export type AccordionProps = {
65
65
  isExpanded?: never;
66
66
  }
67
67
  ) &
68
- AllowedProps;
68
+ HtmlProps;
69
69
 
70
70
  const Accordion = ({
71
71
  children,
@@ -21,7 +21,7 @@ import { memo, useCallback, useMemo, useRef } from "react";
21
21
 
22
22
  import { Field } from "./Field";
23
23
  import { FieldComponentProps } from "./FieldComponentProps";
24
- import type { AllowedProps } from "./AllowedProps";
24
+ import type { HtmlProps } from "./HtmlProps";
25
25
  import {
26
26
  ComponentControlledState,
27
27
  useInputValues,
@@ -171,7 +171,7 @@ export type AutocompleteProps<
171
171
  | "isOptional"
172
172
  | "name"
173
173
  > &
174
- AllowedProps;
174
+ HtmlProps;
175
175
 
176
176
  const Autocomplete = <
177
177
  OptionType,
package/src/Badge.tsx CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  DesignTokens,
18
18
  } from "./OdysseyDesignTokensContext";
19
19
  import { Box } from "./Box";
20
- import type { AllowedProps } from "./AllowedProps";
20
+ import type { HtmlProps } from "./HtmlProps";
21
21
 
22
22
  export type BadgeContentMax = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100;
23
23
 
@@ -27,7 +27,7 @@ export type BadgeProps = {
27
27
  badgeContent: number;
28
28
  badgeContentMax?: BadgeContentMax;
29
29
  type?: (typeof badgeTypeValues)[number];
30
- } & AllowedProps;
30
+ } & HtmlProps;
31
31
 
32
32
  const badgeTypeColors = (odysseyTokens: DesignTokens) => ({
33
33
  default: {
package/src/Banner.tsx CHANGED
@@ -16,7 +16,7 @@ import { ScreenReaderText } from "./ScreenReaderText";
16
16
  import { memo } from "react";
17
17
  import { useTranslation } from "react-i18next";
18
18
 
19
- import type { AllowedProps } from "./AllowedProps";
19
+ import type { HtmlProps } from "./HtmlProps";
20
20
 
21
21
  export const bannerRoleValues = ["status", "alert"] as const;
22
22
  export const bannerSeverityValues: AlertColor[] = [
@@ -56,7 +56,7 @@ export type BannerProps = {
56
56
  * The text content of the alert
57
57
  */
58
58
  text: string;
59
- } & AllowedProps;
59
+ } & HtmlProps;
60
60
 
61
61
  const Banner = ({
62
62
  linkUrl,
package/src/Box.tsx CHANGED
@@ -13,14 +13,14 @@
13
13
  import { Box as MuiBox, BoxProps as MuiBoxProps } from "@mui/material";
14
14
  import { ReactNode, forwardRef, memo } from "react";
15
15
 
16
- import type { AllowedProps } from "./AllowedProps";
16
+ import type { HtmlProps } from "./HtmlProps";
17
17
 
18
18
  export type BoxProps = {
19
19
  children?: ReactNode;
20
20
  component?: MuiBoxProps["component"];
21
21
  id?: MuiBoxProps["id"];
22
22
  sx?: MuiBoxProps["sx"];
23
- } & AllowedProps;
23
+ } & HtmlProps;
24
24
 
25
25
  const Box = forwardRef<HTMLElement, BoxProps>(
26
26
  ({ children, component, id, sx, testId, translate }, ref) => (
@@ -29,7 +29,7 @@ import {
29
29
  import { GroupIcon, HomeIcon, UserIcon } from "./icons.generated";
30
30
  import { Subordinate } from "./Typography";
31
31
  import { useTranslation } from "react-i18next";
32
- import { AllowedProps } from "./AllowedProps";
32
+ import { HtmlProps } from "./HtmlProps";
33
33
 
34
34
  export type BreadcrumbType = "listItem" | "menuItem" | "currentPage";
35
35
 
@@ -43,7 +43,7 @@ export type BreadcrumbsProps = {
43
43
  children: ReactElement<typeof Breadcrumb>[];
44
44
  homeHref?: string;
45
45
  maxVisibleItems?: number;
46
- } & AllowedProps;
46
+ } & HtmlProps;
47
47
 
48
48
  export type BreadcrumbContextType = {
49
49
  breadcrumbType: BreadcrumbType;
package/src/Button.tsx CHANGED
@@ -22,7 +22,7 @@ import {
22
22
 
23
23
  import { MuiPropsContext, useMuiProps } from "./MuiPropsContext";
24
24
  import { Tooltip } from "./Tooltip";
25
- import type { AllowedProps } from "./AllowedProps";
25
+ import type { HtmlProps } from "./HtmlProps";
26
26
  import { FocusHandle } from "./inputUtils";
27
27
 
28
28
  export const buttonSizeValues = ["small", "medium", "large"] as const;
@@ -113,7 +113,7 @@ export type ButtonProps = {
113
113
  startIcon?: ReactElement;
114
114
  }
115
115
  ) &
116
- AllowedProps;
116
+ HtmlProps;
117
117
 
118
118
  const Button = ({
119
119
  ariaDescribedBy,
@@ -135,8 +135,8 @@ const Button = ({
135
135
  variant,
136
136
  }: ButtonProps) => {
137
137
  const muiProps = useMuiProps();
138
-
139
138
  const localButtonRef = useRef<HTMLButtonElement>(null);
139
+
140
140
  useImperativeHandle(
141
141
  buttonRef,
142
142
  () => {
@@ -150,28 +150,32 @@ const Button = ({
150
150
  );
151
151
 
152
152
  const renderButton = useCallback(
153
- (muiProps) => (
154
- <MuiButton
155
- {...muiProps}
156
- aria-label={ariaLabel}
157
- aria-labelledby={ariaLabelledBy}
158
- aria-describedby={ariaDescribedBy}
159
- data-se={testId}
160
- disabled={isDisabled}
161
- endIcon={endIcon}
162
- fullWidth={isFullWidth}
163
- id={id}
164
- onClick={onClick}
165
- ref={localButtonRef}
166
- size={size}
167
- startIcon={startIcon}
168
- translate={translate}
169
- type={type}
170
- variant={variant}
171
- >
172
- {label}
173
- </MuiButton>
174
- ),
153
+ (muiProps) => {
154
+ muiProps?.ref?.(localButtonRef.current);
155
+
156
+ return (
157
+ <MuiButton
158
+ {...muiProps}
159
+ aria-label={ariaLabel}
160
+ aria-labelledby={ariaLabelledBy}
161
+ aria-describedby={ariaDescribedBy}
162
+ data-se={testId}
163
+ disabled={isDisabled}
164
+ endIcon={endIcon}
165
+ fullWidth={isFullWidth}
166
+ id={id}
167
+ onClick={onClick}
168
+ ref={localButtonRef}
169
+ size={size}
170
+ startIcon={startIcon}
171
+ translate={translate}
172
+ type={type}
173
+ variant={variant}
174
+ >
175
+ {label}
176
+ </MuiButton>
177
+ );
178
+ },
175
179
  [
176
180
  ariaDescribedBy,
177
181
  ariaLabel,
@@ -191,17 +195,15 @@ const Button = ({
191
195
  ]
192
196
  );
193
197
 
194
- return (
195
- <>
196
- {tooltipText && !isDisabled && (
197
- <Tooltip ariaType="description" placement="top" text={tooltipText}>
198
- <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>
199
- </Tooltip>
200
- )}
198
+ if (tooltipText) {
199
+ return (
200
+ <Tooltip ariaType="description" placement="top" text={tooltipText}>
201
+ <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>
202
+ </Tooltip>
203
+ );
204
+ }
201
205
 
202
- {(isDisabled || !tooltipText) && renderButton(muiProps)}
203
- </>
204
- );
206
+ return renderButton(muiProps);
205
207
  };
206
208
 
207
209
  const MemoizedButton = memo(Button);
package/src/Callout.tsx CHANGED
@@ -15,7 +15,7 @@ import { Alert, AlertTitle, Box } from "@mui/material";
15
15
  import { ScreenReaderText } from "./ScreenReaderText";
16
16
  import { useTranslation } from "react-i18next";
17
17
 
18
- import type { AllowedProps } from "./AllowedProps";
18
+ import type { HtmlProps } from "./HtmlProps";
19
19
  import { Link } from "./Link";
20
20
  import { Paragraph } from "./Typography";
21
21
 
@@ -78,7 +78,7 @@ export type CalloutProps = {
78
78
  linkText?: never;
79
79
  }
80
80
  ) &
81
- AllowedProps;
81
+ HtmlProps;
82
82
 
83
83
  const Callout = ({
84
84
  children,
package/src/Checkbox.tsx CHANGED
@@ -22,7 +22,7 @@ import {
22
22
 
23
23
  import { FieldComponentProps } from "./FieldComponentProps";
24
24
  import { Typography } from "./Typography";
25
- import type { AllowedProps } from "./AllowedProps";
25
+ import type { HtmlProps } from "./HtmlProps";
26
26
  import {
27
27
  ComponentControlledState,
28
28
  FocusHandle,
@@ -83,7 +83,7 @@ export type CheckboxProps = {
83
83
  onBlur?: MuiFormControlLabelProps["onBlur"];
84
84
  } & Pick<FieldComponentProps, "id" | "isDisabled" | "name"> &
85
85
  CheckedFieldProps<MuiCheckboxProps> &
86
- AllowedProps;
86
+ HtmlProps;
87
87
 
88
88
  const Checkbox = ({
89
89
  ariaLabel,
@@ -16,7 +16,7 @@ import { memo, ReactElement, useCallback } from "react";
16
16
  import { Checkbox } from "./Checkbox";
17
17
  import { Field } from "./Field";
18
18
  import { FieldComponentProps } from "./FieldComponentProps";
19
- import type { AllowedProps } from "./AllowedProps";
19
+ import type { HtmlProps } from "./HtmlProps";
20
20
 
21
21
  export type CheckboxGroupProps = {
22
22
  /**
@@ -43,7 +43,7 @@ export type CheckboxGroupProps = {
43
43
  | "id"
44
44
  | "isDisabled"
45
45
  > &
46
- AllowedProps;
46
+ HtmlProps;
47
47
 
48
48
  const CheckboxGroup = ({
49
49
  ariaDescribedBy,
@@ -13,7 +13,7 @@
13
13
  import { memo } from "react";
14
14
  import { CircularProgress as MuiCircularProgress } from "@mui/material";
15
15
 
16
- import type { AllowedProps } from "./AllowedProps";
16
+ import type { HtmlProps } from "./HtmlProps";
17
17
 
18
18
  export type CircularProgressProps = {
19
19
  /**
@@ -25,7 +25,7 @@ export type CircularProgressProps = {
25
25
  * If undefined, the spinner will spin perpetually.
26
26
  */
27
27
  value?: number;
28
- } & AllowedProps;
28
+ } & HtmlProps;
29
29
 
30
30
  const CircularProgress = ({
31
31
  ariaLabel,
package/src/Dialog.tsx CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  ReactElement,
30
30
  } from "react";
31
31
 
32
- import type { AllowedProps } from "./AllowedProps";
32
+ import type { HtmlProps } from "./HtmlProps";
33
33
 
34
34
  export type DialogProps = {
35
35
  /**
@@ -64,7 +64,7 @@ export type DialogProps = {
64
64
  * The title of the Dialog
65
65
  */
66
66
  title: string;
67
- } & AllowedProps;
67
+ } & HtmlProps;
68
68
 
69
69
  const Dialog = ({
70
70
  callToActionFirstComponent,
@@ -17,14 +17,14 @@ import { ScreenReaderText } from "./ScreenReaderText";
17
17
  import { ErrorMessageList } from "./ErrorMessageList";
18
18
  import { useTranslation } from "react-i18next";
19
19
 
20
- import type { AllowedProps } from "./AllowedProps";
20
+ import type { HtmlProps } from "./HtmlProps";
21
21
  import { Box } from "./Box";
22
22
 
23
23
  export type FieldErrorProps = {
24
24
  id?: string;
25
25
  message?: string;
26
26
  messageList?: string[];
27
- } & AllowedProps;
27
+ } & HtmlProps;
28
28
 
29
29
  const FieldError = ({
30
30
  id,
package/src/FieldHint.tsx CHANGED
@@ -15,13 +15,13 @@ import { memo } from "react";
15
15
  import { FormHelperText } from "@mui/material";
16
16
 
17
17
  import { FieldComponentProps } from "./FieldComponentProps";
18
- import type { AllowedProps } from "./AllowedProps";
18
+ import type { HtmlProps } from "./HtmlProps";
19
19
 
20
20
  export type FieldHintProps = {
21
21
  LinkComponent?: FieldComponentProps["HintLinkComponent"];
22
22
  id?: string;
23
23
  text: string;
24
- } & AllowedProps;
24
+ } & HtmlProps;
25
25
 
26
26
  const FieldHint = ({
27
27
  id,
@@ -16,7 +16,7 @@ import { memo, useMemo } from "react";
16
16
  import { useTranslation } from "react-i18next";
17
17
  import { ScreenReaderText } from "./ScreenReaderText";
18
18
  import { Subordinate } from "./Typography";
19
- import type { AllowedProps } from "./AllowedProps";
19
+ import type { HtmlProps } from "./HtmlProps";
20
20
 
21
21
  export type FieldLabelProps = {
22
22
  hasVisibleLabel: boolean;
@@ -24,7 +24,7 @@ export type FieldLabelProps = {
24
24
  inputId: string;
25
25
  isOptional: boolean;
26
26
  text: string;
27
- } & AllowedProps;
27
+ } & HtmlProps;
28
28
 
29
29
  const FieldLabel = ({
30
30
  hasVisibleLabel,
package/src/Fieldset.tsx CHANGED
@@ -18,7 +18,7 @@ import { FieldsetContext } from "./FieldsetContext";
18
18
  import { Legend, Support } from "./Typography";
19
19
  import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext";
20
20
  import { useUniqueId } from "./useUniqueId";
21
- import type { AllowedProps } from "./AllowedProps";
21
+ import type { HtmlProps } from "./HtmlProps";
22
22
 
23
23
  export type FieldsetProps = {
24
24
  /**
@@ -49,7 +49,7 @@ export type FieldsetProps = {
49
49
  * The name associated with the group.
50
50
  */
51
51
  name?: string;
52
- } & AllowedProps;
52
+ } & HtmlProps;
53
53
 
54
54
  const Fieldset = ({
55
55
  alert,
package/src/Form.tsx CHANGED
@@ -17,7 +17,7 @@ import { Button } from "./Button";
17
17
  import { Callout } from "./Callout";
18
18
  import { Heading4, Support } from "./Typography";
19
19
  import { useUniqueId } from "./useUniqueId";
20
- import type { AllowedProps } from "./AllowedProps";
20
+ import type { HtmlProps } from "./HtmlProps";
21
21
 
22
22
  export const formEncodingTypeValues = [
23
23
  "application/x-www-form-urlencoded",
@@ -85,7 +85,7 @@ export type FormProps = {
85
85
  * The title of the Form
86
86
  */
87
87
  title?: string;
88
- } & AllowedProps;
88
+ } & HtmlProps;
89
89
 
90
90
  const Form = ({
91
91
  alert,
@@ -10,7 +10,7 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- export type AllowedProps = {
13
+ export type HtmlProps = {
14
14
  /**
15
15
  * This prop puts a `data` attribute on an HTML element in this component with the value provided.
16
16
  *
package/src/Link.tsx CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { memo, ReactElement, useImperativeHandle, useRef } from "react";
14
14
  import { ExternalLinkIcon } from "./icons.generated";
15
- import type { AllowedProps } from "./AllowedProps";
15
+ import type { HtmlProps } from "./HtmlProps";
16
16
  import { FocusHandle } from "./inputUtils";
17
17
 
18
18
  import { Link as MuiLink, LinkProps as MuiLinkProps } from "@mui/material";
@@ -57,7 +57,7 @@ export type LinkProps = {
57
57
  * The visual presentation of the Link (default or monochrome)
58
58
  */
59
59
  variant?: (typeof linkVariantValues)[number];
60
- } & AllowedProps;
60
+ } & HtmlProps;
61
61
 
62
62
  const Link = ({
63
63
  children,
@@ -29,7 +29,7 @@ import { ChevronDownIcon, MoreIcon } from "./icons.generated";
29
29
  import { FieldComponentProps } from "./FieldComponentProps";
30
30
  import { MenuContext, MenuContextType } from "./MenuContext";
31
31
  import { NullElement } from "./NullElement";
32
- import type { AllowedProps } from "./AllowedProps";
32
+ import type { HtmlProps } from "./HtmlProps";
33
33
 
34
34
  export const menuAlignmentValues = ["left", "right"] as const;
35
35
 
@@ -111,7 +111,7 @@ export type MenuButtonProps = {
111
111
  }
112
112
  ) &
113
113
  Pick<FieldComponentProps, "isDisabled"> &
114
- AllowedProps;
114
+ HtmlProps;
115
115
 
116
116
  const MenuButton = ({
117
117
  ariaLabel,
package/src/MenuItem.tsx CHANGED
@@ -18,7 +18,7 @@ import { menuItemClasses } from "@mui/material/MenuItem";
18
18
  import { memo, useCallback, useContext, type ReactNode } from "react";
19
19
 
20
20
  import { MenuContext } from "./MenuContext";
21
- import type { AllowedProps } from "./AllowedProps";
21
+ import type { HtmlProps } from "./HtmlProps";
22
22
 
23
23
  export type MenuItemProps = {
24
24
  /**
@@ -51,7 +51,7 @@ export type MenuItemProps = {
51
51
  * - "destructive": A variant indicating a destructive action.
52
52
  */
53
53
  variant?: "default" | "destructive";
54
- } & AllowedProps;
54
+ } & HtmlProps;
55
55
 
56
56
  const MenuItem = ({
57
57
  children,
@@ -13,7 +13,6 @@
13
13
  import { createContext, useContext } from "react";
14
14
 
15
15
  export type MuiPropsContextType = Record<string, unknown>;
16
-
17
16
  export const MuiPropsContext = createContext<MuiPropsContextType>({});
18
17
 
19
18
  export const useMuiProps = () => useContext(MuiPropsContext);
@@ -26,7 +26,7 @@ import {
26
26
  } from "@mui/material";
27
27
  import { Field } from "./Field";
28
28
  import { FieldComponentProps } from "./FieldComponentProps";
29
- import type { AllowedProps } from "./AllowedProps";
29
+ import type { HtmlProps } from "./HtmlProps";
30
30
  import { FocusHandle, getControlState, useInputValues } from "./inputUtils";
31
31
  import { ForwardRefWithType } from "./@types/react-augment";
32
32
 
@@ -103,7 +103,7 @@ export type NativeSelectProps<
103
103
  | "isFullWidth"
104
104
  | "isOptional"
105
105
  > &
106
- AllowedProps;
106
+ HtmlProps;
107
107
 
108
108
  const NativeSelect: ForwardRefWithType = forwardRef(
109
109
  <
@@ -25,7 +25,7 @@ import {
25
25
  import { ShowIcon, HideIcon } from "./icons.generated";
26
26
  import { Field } from "./Field";
27
27
  import { FieldComponentProps } from "./FieldComponentProps";
28
- import type { AllowedProps } from "./AllowedProps";
28
+ import type { HtmlProps } from "./HtmlProps";
29
29
  import { useTranslation } from "react-i18next";
30
30
  import { FocusHandle, getControlState, useInputValues } from "./inputUtils";
31
31
 
@@ -77,7 +77,7 @@ export type PasswordFieldProps = {
77
77
  */
78
78
  value?: string;
79
79
  } & FieldComponentProps &
80
- AllowedProps;
80
+ HtmlProps;
81
81
 
82
82
  const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
83
83
  (
package/src/Radio.tsx CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  import { memo, useCallback, useRef, useImperativeHandle } from "react";
20
20
 
21
21
  import { FieldComponentProps } from "./FieldComponentProps";
22
- import type { AllowedProps } from "./AllowedProps";
22
+ import type { HtmlProps } from "./HtmlProps";
23
23
  import { FocusHandle } from "./inputUtils";
24
24
 
25
25
  export type RadioProps = {
@@ -52,7 +52,7 @@ export type RadioProps = {
52
52
  */
53
53
  onBlur?: MuiFormControlLabelProps["onBlur"];
54
54
  } & Pick<FieldComponentProps, "isDisabled" | "name"> &
55
- AllowedProps;
55
+ HtmlProps;
56
56
 
57
57
  const Radio = ({
58
58
  inputRef,
@@ -19,7 +19,7 @@ import { memo, ReactElement, useCallback, useRef } from "react";
19
19
  import { Radio, RadioProps } from "./Radio";
20
20
  import { Field } from "./Field";
21
21
  import { FieldComponentProps } from "./FieldComponentProps";
22
- import type { AllowedProps } from "./AllowedProps";
22
+ import type { HtmlProps } from "./HtmlProps";
23
23
  import { getControlState, useInputValues } from "./inputUtils";
24
24
 
25
25
  export type RadioGroupProps = {
@@ -54,7 +54,7 @@ export type RadioGroupProps = {
54
54
  | "isDisabled"
55
55
  | "name"
56
56
  > &
57
- AllowedProps;
57
+ HtmlProps;
58
58
 
59
59
  const RadioGroup = ({
60
60
  ariaDescribedBy,
@@ -13,14 +13,14 @@
13
13
  import { memo, ReactNode } from "react";
14
14
  import { Box } from "@mui/material";
15
15
  import { visuallyHidden } from "@mui/utils";
16
- import { AllowedProps } from "./AllowedProps";
16
+ import { HtmlProps } from "./HtmlProps";
17
17
 
18
18
  export type ScreenReaderTextProps = {
19
19
  /**
20
20
  * The visually-hidden text.
21
21
  */
22
22
  children: ReactNode;
23
- } & AllowedProps;
23
+ } & HtmlProps;
24
24
 
25
25
  /**
26
26
  * MUI sx expects you pass in a CSS object, not an object with CSS.
@@ -24,7 +24,7 @@ import {
24
24
  import { CloseCircleFilledIcon, SearchIcon } from "./icons.generated";
25
25
  import { Field } from "./Field";
26
26
  import { FieldComponentProps } from "./FieldComponentProps";
27
- import type { AllowedProps } from "./AllowedProps";
27
+ import type { HtmlProps } from "./HtmlProps";
28
28
  import { getControlState, useInputValues } from "./inputUtils";
29
29
 
30
30
  export type SearchFieldProps = {
@@ -82,7 +82,7 @@ export type SearchFieldProps = {
82
82
  FieldComponentProps,
83
83
  "ariaDescribedBy" | "id" | "isDisabled" | "name" | "isFullWidth"
84
84
  > &
85
- AllowedProps;
85
+ HtmlProps;
86
86
 
87
87
  const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
88
88
  (
package/src/Select.tsx CHANGED
@@ -33,7 +33,7 @@ import { SelectProps as MuiSelectProps } from "@mui/material";
33
33
  import { Field } from "./Field";
34
34
  import { FieldComponentProps } from "./FieldComponentProps";
35
35
  import { CheckIcon } from "./icons.generated";
36
- import type { AllowedProps } from "./AllowedProps";
36
+ import type { HtmlProps } from "./HtmlProps";
37
37
  import {
38
38
  ComponentControlledState,
39
39
  FocusHandle,
@@ -109,7 +109,7 @@ export type SelectProps<
109
109
  | "isOptional"
110
110
  | "name"
111
111
  > &
112
- AllowedProps;
112
+ HtmlProps;
113
113
 
114
114
  /**
115
115
  * Options in Odyssey <Select> are passed as an array, which can contain any combination
@@ -288,11 +288,13 @@ const Select = <
288
288
  />
289
289
  )}
290
290
  {option.text}
291
- {internalSelectedValues === option?.value && (
292
- <ListItemSecondaryAction>
293
- <CheckIcon />
294
- </ListItemSecondaryAction>
295
- )}
291
+ {!hasMultipleChoices &&
292
+ (internalSelectedValues?.includes(option.value) ||
293
+ internalSelectedValues === option.value) && (
294
+ <ListItemSecondaryAction>
295
+ <CheckIcon />
296
+ </ListItemSecondaryAction>
297
+ )}
296
298
  </MenuItem>
297
299
  );
298
300
  }),