@okta/odyssey-react-mui 1.12.7 → 1.12.8
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 +4 -0
- package/dist/MenuButton.js +4 -1
- package/dist/MenuButton.js.map +1 -1
- package/dist/src/MenuButton.d.ts +5 -4
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +8 -2
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/MenuButton.tsx +12 -8
- package/src/theme/components.tsx +8 -0
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.8",
|
|
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.8",
|
|
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": "032e8684c712c715728e8f406eb88054cfdbe55d"
|
|
67
67
|
}
|
package/src/MenuButton.tsx
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { memo, type ReactElement, useCallback, useMemo, useState } from "react";
|
|
14
|
+
import {
|
|
15
|
+
Divider,
|
|
16
|
+
ListSubheader,
|
|
17
|
+
Menu as MuiMenu,
|
|
18
|
+
PopoverOrigin,
|
|
19
|
+
} from "@mui/material";
|
|
20
|
+
|
|
13
21
|
import {
|
|
14
22
|
Button,
|
|
15
23
|
buttonSizeValues,
|
|
@@ -17,15 +25,8 @@ import {
|
|
|
17
25
|
MenuItem,
|
|
18
26
|
useUniqueId,
|
|
19
27
|
} from "./";
|
|
20
|
-
import {
|
|
21
|
-
Divider,
|
|
22
|
-
ListSubheader,
|
|
23
|
-
Menu as MuiMenu,
|
|
24
|
-
PopoverOrigin,
|
|
25
|
-
} from "@mui/material";
|
|
26
28
|
import { ChevronDownIcon, MoreIcon } from "./icons.generated";
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
+
import { FieldComponentProps } from "./FieldComponentProps";
|
|
29
30
|
import { MenuContext, MenuContextType } from "./MenuContext";
|
|
30
31
|
import { NullElement } from "./NullElement";
|
|
31
32
|
import type { AllowedProps } from "./AllowedProps";
|
|
@@ -109,6 +110,7 @@ export type MenuButtonProps = {
|
|
|
109
110
|
buttonLabel?: undefined | "";
|
|
110
111
|
}
|
|
111
112
|
) &
|
|
113
|
+
Pick<FieldComponentProps, "isDisabled"> &
|
|
112
114
|
AllowedProps;
|
|
113
115
|
|
|
114
116
|
const MenuButton = ({
|
|
@@ -121,6 +123,7 @@ const MenuButton = ({
|
|
|
121
123
|
shouldCloseOnSelect = true,
|
|
122
124
|
endIcon: endIconProp,
|
|
123
125
|
id: idOverride,
|
|
126
|
+
isDisabled,
|
|
124
127
|
isOverflow,
|
|
125
128
|
menuAlignment = "left",
|
|
126
129
|
size,
|
|
@@ -194,6 +197,7 @@ const MenuButton = ({
|
|
|
194
197
|
data-se={testId}
|
|
195
198
|
endIcon={endIcon}
|
|
196
199
|
id={`${uniqueId}-button`}
|
|
200
|
+
isDisabled={isDisabled}
|
|
197
201
|
label={buttonLabel}
|
|
198
202
|
onClick={openMenu}
|
|
199
203
|
size={size}
|
package/src/theme/components.tsx
CHANGED
|
@@ -1935,6 +1935,10 @@ export const components = ({
|
|
|
1935
1935
|
|
|
1936
1936
|
[`&.${menuItemClasses.root}-destructive`]: {
|
|
1937
1937
|
color: odysseyTokens.TypographyColorDanger,
|
|
1938
|
+
|
|
1939
|
+
[`.${typographyClasses.root}`]: {
|
|
1940
|
+
color: "inherit",
|
|
1941
|
+
},
|
|
1938
1942
|
},
|
|
1939
1943
|
|
|
1940
1944
|
[`&.${menuItemClasses.selected}`]: {
|
|
@@ -1961,6 +1965,10 @@ export const components = ({
|
|
|
1961
1965
|
[`&.${menuItemClasses.disabled}`]: {
|
|
1962
1966
|
opacity: 1,
|
|
1963
1967
|
color: odysseyTokens.TypographyColorDisabled,
|
|
1968
|
+
|
|
1969
|
+
[`.${typographyClasses.root}`]: {
|
|
1970
|
+
color: "inherit",
|
|
1971
|
+
},
|
|
1964
1972
|
},
|
|
1965
1973
|
|
|
1966
1974
|
[`& + .${dividerClasses.root}`]: {
|