@okta/odyssey-react-mui 1.9.17 → 1.9.19
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 +8 -0
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Status.js +2 -4
- package/dist/Status.js.map +1 -1
- package/dist/Tabs.js +2 -0
- package/dist/Tabs.js.map +1 -1
- package/dist/src/Badge.d.ts +2 -1
- package/dist/src/Badge.d.ts.map +1 -1
- package/dist/src/Status.d.ts +1 -6
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/theme/components.js +41 -43
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Badge.tsx +4 -2
- package/src/Status.tsx +2 -13
- package/src/Tabs.tsx +6 -1
- package/src/theme/components.tsx +46 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okta/odyssey-react-mui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.19",
|
|
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.9.
|
|
54
|
+
"@okta/odyssey-design-tokens": "1.9.19",
|
|
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": "5ec32fa2c3affc33a0597293329a16f0edf82261"
|
|
67
67
|
}
|
package/src/Badge.tsx
CHANGED
|
@@ -19,11 +19,13 @@ import {
|
|
|
19
19
|
import { Box } from "./Box";
|
|
20
20
|
import type { AllowedProps } from "./AllowedProps";
|
|
21
21
|
|
|
22
|
+
export type BadgeContentMax = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100;
|
|
23
|
+
|
|
22
24
|
export const badgeTypeValues = ["default", "attention", "danger"] as const;
|
|
23
25
|
|
|
24
26
|
export type BadgeProps = {
|
|
25
27
|
badgeContent: number;
|
|
26
|
-
badgeContentMax?:
|
|
28
|
+
badgeContentMax?: BadgeContentMax;
|
|
27
29
|
type?: (typeof badgeTypeValues)[number];
|
|
28
30
|
} & AllowedProps;
|
|
29
31
|
|
|
@@ -44,7 +46,7 @@ const badgeTypeColors = (odysseyTokens: DesignTokens) => ({
|
|
|
44
46
|
|
|
45
47
|
const Badge = ({
|
|
46
48
|
badgeContent,
|
|
47
|
-
badgeContentMax =
|
|
49
|
+
badgeContentMax = 100,
|
|
48
50
|
testId,
|
|
49
51
|
translate,
|
|
50
52
|
type = "default",
|
package/src/Status.tsx
CHANGED
|
@@ -21,7 +21,6 @@ export const statusSeverityValues = [
|
|
|
21
21
|
"success",
|
|
22
22
|
"warning",
|
|
23
23
|
] as const;
|
|
24
|
-
export const statusVariantValues = ["lamp", "pill"] as const;
|
|
25
24
|
|
|
26
25
|
export type StatusProps = {
|
|
27
26
|
/**
|
|
@@ -32,19 +31,9 @@ export type StatusProps = {
|
|
|
32
31
|
* Determine the color and icon of the Status
|
|
33
32
|
*/
|
|
34
33
|
severity: (typeof statusSeverityValues)[number];
|
|
35
|
-
/**
|
|
36
|
-
* The style of the Status indicator
|
|
37
|
-
*/
|
|
38
|
-
variant?: (typeof statusVariantValues)[number];
|
|
39
34
|
} & AllowedProps;
|
|
40
35
|
|
|
41
|
-
export const Status = ({
|
|
42
|
-
label,
|
|
43
|
-
severity,
|
|
44
|
-
testId,
|
|
45
|
-
translate,
|
|
46
|
-
variant = "lamp",
|
|
47
|
-
}: StatusProps) => {
|
|
36
|
+
export const Status = ({ label, severity, testId, translate }: StatusProps) => {
|
|
48
37
|
const muiProps = useMuiProps();
|
|
49
38
|
|
|
50
39
|
return (
|
|
@@ -54,7 +43,7 @@ export const Status = ({
|
|
|
54
43
|
data-se={testId}
|
|
55
44
|
label={label}
|
|
56
45
|
translate={translate}
|
|
57
|
-
variant=
|
|
46
|
+
variant="pill"
|
|
58
47
|
/>
|
|
59
48
|
);
|
|
60
49
|
};
|
package/src/Tabs.tsx
CHANGED
|
@@ -157,6 +157,7 @@ const Tabs = ({
|
|
|
157
157
|
data-se={testId}
|
|
158
158
|
disabled={isDisabled}
|
|
159
159
|
icon={startIcon}
|
|
160
|
+
tabIndex={0}
|
|
160
161
|
label={
|
|
161
162
|
<TabLabel
|
|
162
163
|
label={label}
|
|
@@ -176,7 +177,11 @@ const Tabs = ({
|
|
|
176
177
|
|
|
177
178
|
return (
|
|
178
179
|
<MuiTabContext value={tabState}>
|
|
179
|
-
<MuiTabList
|
|
180
|
+
<MuiTabList
|
|
181
|
+
onChange={onChange}
|
|
182
|
+
aria-label={ariaLabel}
|
|
183
|
+
variant="scrollable"
|
|
184
|
+
>
|
|
180
185
|
{tabs.map((tab, index) => renderTab(tab, index))}
|
|
181
186
|
</MuiTabList>
|
|
182
187
|
{tabs.map((tab, index) => (
|
package/src/theme/components.tsx
CHANGED
|
@@ -846,8 +846,12 @@ export const components = ({
|
|
|
846
846
|
[`&.${chipClasses.disabled}`]: {
|
|
847
847
|
opacity: 1,
|
|
848
848
|
pointerEvents: "none",
|
|
849
|
-
|
|
849
|
+
borderColor: odysseyTokens.BorderColorDisabled,
|
|
850
850
|
color: odysseyTokens.TypographyColorDisabled,
|
|
851
|
+
|
|
852
|
+
[`& .${chipClasses.deleteIcon}`]: {
|
|
853
|
+
color: odysseyTokens.HueNeutral300,
|
|
854
|
+
},
|
|
851
855
|
},
|
|
852
856
|
|
|
853
857
|
...(ownerState.clickable && {
|
|
@@ -872,45 +876,6 @@ export const components = ({
|
|
|
872
876
|
marginInlineEnd: odysseyTokens.Spacing1,
|
|
873
877
|
},
|
|
874
878
|
|
|
875
|
-
...(ownerState.variant === "lamp" && {
|
|
876
|
-
paddingBlock: 0,
|
|
877
|
-
paddingInline: 0,
|
|
878
|
-
borderRadius: 0,
|
|
879
|
-
border: 0,
|
|
880
|
-
backgroundColor: "transparent",
|
|
881
|
-
color: odysseyTokens.TypographyColorBody,
|
|
882
|
-
|
|
883
|
-
"&::before": {
|
|
884
|
-
content: "''",
|
|
885
|
-
width: ".64em",
|
|
886
|
-
height: ".64em",
|
|
887
|
-
marginInlineEnd: odysseyTokens.Spacing2,
|
|
888
|
-
borderRadius: "100%",
|
|
889
|
-
backgroundColor: odysseyTokens.HueNeutral600,
|
|
890
|
-
},
|
|
891
|
-
|
|
892
|
-
[`&.${chipClasses.colorError}`]: {
|
|
893
|
-
"&::before": {
|
|
894
|
-
border: 0,
|
|
895
|
-
backgroundColor: odysseyTokens.PaletteDangerMain,
|
|
896
|
-
},
|
|
897
|
-
},
|
|
898
|
-
|
|
899
|
-
[`&.${chipClasses.colorSuccess}`]: {
|
|
900
|
-
"&::before": {
|
|
901
|
-
border: 0,
|
|
902
|
-
backgroundColor: odysseyTokens.PaletteSuccessMain,
|
|
903
|
-
},
|
|
904
|
-
},
|
|
905
|
-
|
|
906
|
-
[`&.${chipClasses.colorWarning}`]: {
|
|
907
|
-
"&::before": {
|
|
908
|
-
border: 0,
|
|
909
|
-
backgroundColor: odysseyTokens.HueYellow200,
|
|
910
|
-
},
|
|
911
|
-
},
|
|
912
|
-
}),
|
|
913
|
-
|
|
914
879
|
...(ownerState.variant === "pill" && {
|
|
915
880
|
paddingBlock: odysseyTokens.Spacing1,
|
|
916
881
|
paddingInline: odysseyTokens.Spacing2,
|
|
@@ -920,15 +885,16 @@ export const components = ({
|
|
|
920
885
|
lineHeight: odysseyTokens.TypographyLineHeightOverline,
|
|
921
886
|
backgroundColor: odysseyTokens.HueNeutral50,
|
|
922
887
|
color: odysseyTokens.TypographyColorSubordinate,
|
|
923
|
-
fontSize:
|
|
888
|
+
fontSize: "0.71428571rem",
|
|
889
|
+
textTransform: "uppercase",
|
|
924
890
|
|
|
925
891
|
"&::before": {
|
|
926
892
|
content: "''",
|
|
927
|
-
width: ".
|
|
928
|
-
height: ".
|
|
929
|
-
marginInlineEnd: odysseyTokens.
|
|
893
|
+
width: "0.42857143rem",
|
|
894
|
+
height: "0.42857143rem",
|
|
895
|
+
marginInlineEnd: odysseyTokens.Spacing2,
|
|
930
896
|
borderRadius: "100%",
|
|
931
|
-
backgroundColor: odysseyTokens.
|
|
897
|
+
backgroundColor: odysseyTokens.HueNeutral400,
|
|
932
898
|
},
|
|
933
899
|
|
|
934
900
|
[`&.${chipClasses.colorError}`]: {
|
|
@@ -2305,9 +2271,43 @@ export const components = ({
|
|
|
2305
2271
|
marginBottom: odysseyTokens.Spacing5,
|
|
2306
2272
|
},
|
|
2307
2273
|
|
|
2274
|
+
scroller: {
|
|
2275
|
+
borderBottom: `${odysseyTokens.BorderWidthMain} ${odysseyTokens.BorderStyleMain} ${odysseyTokens.BorderColorDisplay}`,
|
|
2276
|
+
},
|
|
2277
|
+
|
|
2308
2278
|
flexContainer: {
|
|
2309
2279
|
gap: odysseyTokens.Spacing5,
|
|
2310
|
-
|
|
2280
|
+
},
|
|
2281
|
+
|
|
2282
|
+
scrollButtons: {
|
|
2283
|
+
zIndex: 1,
|
|
2284
|
+
transitionProperty: "opacity",
|
|
2285
|
+
transitionDuration: odysseyTokens.TransitionDurationMain,
|
|
2286
|
+
transitionTimingFunction: odysseyTokens.TransitionTimingMain,
|
|
2287
|
+
|
|
2288
|
+
"& svg": {
|
|
2289
|
+
width: odysseyTokens.Spacing4,
|
|
2290
|
+
height: odysseyTokens.Spacing4,
|
|
2291
|
+
color: odysseyTokens.PaletteNeutralDark,
|
|
2292
|
+
},
|
|
2293
|
+
|
|
2294
|
+
"&::after": {
|
|
2295
|
+
content: '""',
|
|
2296
|
+
position: "absolute",
|
|
2297
|
+
top: 0,
|
|
2298
|
+
bottom: 0,
|
|
2299
|
+
width: odysseyTokens.Spacing3,
|
|
2300
|
+
},
|
|
2301
|
+
"&:first-of-type::after": {
|
|
2302
|
+
right: `-${odysseyTokens.Spacing3}`,
|
|
2303
|
+
background:
|
|
2304
|
+
"linear-gradient(90deg, #FFF 0%, #FFF 72.49%, rgba(255, 255, 255, 0.70) 86.5%, rgba(255, 255, 255, 0.00) 100%)",
|
|
2305
|
+
},
|
|
2306
|
+
"&:last-of-type::after": {
|
|
2307
|
+
left: `-${odysseyTokens.Spacing3}`,
|
|
2308
|
+
background:
|
|
2309
|
+
"linear-gradient(-90deg, #FFF 0%, #FFF 72.49%, rgba(255, 255, 255, 0.70) 86.5%, rgba(255, 255, 255, 0.00) 100%)",
|
|
2310
|
+
},
|
|
2311
2311
|
},
|
|
2312
2312
|
},
|
|
2313
2313
|
},
|