@okta/odyssey-react-mui 0.15.3 → 0.16.1
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +154 -117
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/typography.d.ts.map +1 -1
- package/dist/theme/typography.js +1 -0
- package/dist/theme/typography.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +4 -2
- package/src/theme/components.tsx +114 -67
- package/src/theme/typography.ts +1 -0
package/src/theme/components.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import type { ThemeOptions } from "@mui/material";
|
|
|
14
14
|
import type {} from "@mui/lab/themeAugmentation";
|
|
15
15
|
//import radioClasses from "@mui/material";
|
|
16
16
|
import { dialogActionsClasses } from "@mui/material/DialogActions";
|
|
17
|
-
import {
|
|
17
|
+
import { inputBaseClasses } from "@mui/material/InputBase";
|
|
18
18
|
import { tableBodyClasses } from "@mui/material/TableBody";
|
|
19
19
|
import { tableCellClasses } from "@mui/material/TableCell";
|
|
20
20
|
import { tableHeadClasses } from "@mui/material/TableHead";
|
|
@@ -542,6 +542,7 @@ export const components: ThemeOptions["components"] = {
|
|
|
542
542
|
},
|
|
543
543
|
styleOverrides: {
|
|
544
544
|
root: ({ theme }) => ({
|
|
545
|
+
fontSize: theme.typography.subtitle1.fontSize,
|
|
545
546
|
lineHeight: "1.33333333",
|
|
546
547
|
marginTop: theme.spacing(2),
|
|
547
548
|
".MuiFormLabel-root + &": {
|
|
@@ -598,35 +599,129 @@ export const components: ThemeOptions["components"] = {
|
|
|
598
599
|
}),
|
|
599
600
|
},
|
|
600
601
|
},
|
|
602
|
+
MuiInput: {
|
|
603
|
+
defaultProps: {
|
|
604
|
+
disableUnderline: true,
|
|
605
|
+
},
|
|
606
|
+
styleOverrides: {
|
|
607
|
+
root: {
|
|
608
|
+
"label + &": {
|
|
609
|
+
marginTop: 0,
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
},
|
|
601
614
|
MuiInputAdornment: {
|
|
602
615
|
defaultProps: {
|
|
603
616
|
variant: "outlined",
|
|
604
617
|
},
|
|
605
618
|
styleOverrides: {
|
|
606
|
-
root: ({ ownerState }) => ({
|
|
619
|
+
root: ({ theme, ownerState }) => ({
|
|
607
620
|
display: "flex",
|
|
621
|
+
minWidth: "1em",
|
|
622
|
+
maxHeight: "unset",
|
|
623
|
+
alignItems: "center",
|
|
624
|
+
whiteSpace: "nowrap",
|
|
625
|
+
color: theme.palette.action.active,
|
|
608
626
|
...(ownerState.position === "start" && {
|
|
609
|
-
|
|
627
|
+
marginInlineEnd: theme.spacing(2),
|
|
610
628
|
}),
|
|
611
629
|
...(ownerState.position === "end" && {
|
|
612
|
-
|
|
630
|
+
marginInlineStart: theme.spacing(2),
|
|
631
|
+
}),
|
|
632
|
+
...(ownerState.disablePointerEvents === true && {
|
|
633
|
+
pointerEvents: "none",
|
|
613
634
|
}),
|
|
614
635
|
}),
|
|
615
636
|
},
|
|
616
637
|
},
|
|
617
638
|
MuiInputBase: {
|
|
639
|
+
defaultProps: {
|
|
640
|
+
minRows: 3,
|
|
641
|
+
required: true,
|
|
642
|
+
},
|
|
618
643
|
styleOverrides: {
|
|
619
644
|
root: ({ ownerState, theme }) => ({
|
|
645
|
+
...theme.typography.body1,
|
|
646
|
+
flex: "1",
|
|
647
|
+
width: "auto",
|
|
648
|
+
color: theme.palette.text.primary,
|
|
620
649
|
lineHeight: "1.14285714",
|
|
650
|
+
borderWidth: theme.mixins.borderWidth,
|
|
651
|
+
borderStyle: theme.mixins.borderStyle,
|
|
652
|
+
borderRadius: theme.mixins.borderRadius,
|
|
653
|
+
borderColor: theme.palette.grey[500],
|
|
654
|
+
paddingBlock: `calc(${theme.spacing(3)} - ${theme.mixins.borderWidth})`,
|
|
655
|
+
paddingInline: theme.spacing(3),
|
|
656
|
+
|
|
657
|
+
...(ownerState.multiline && {
|
|
658
|
+
paddingBlock: theme.spacing(3),
|
|
659
|
+
paddingInline: theme.spacing(3),
|
|
660
|
+
...(ownerState.size === "small" && {
|
|
661
|
+
paddingBlock: theme.spacing(3),
|
|
662
|
+
paddingInline: theme.spacing(3),
|
|
663
|
+
}),
|
|
664
|
+
}),
|
|
665
|
+
|
|
666
|
+
...(ownerState.fullWidth && {
|
|
667
|
+
width: "100%",
|
|
668
|
+
}),
|
|
621
669
|
|
|
622
670
|
...(ownerState.readOnly === true && {
|
|
623
671
|
backgroundColor: theme.palette.grey[50],
|
|
624
672
|
}),
|
|
673
|
+
|
|
674
|
+
[`&:hover`]: {
|
|
675
|
+
borderColor: theme.palette.grey[900],
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
[`&.${inputBaseClasses.focused}`]: {
|
|
679
|
+
borderColor: theme.palette.primary.main,
|
|
680
|
+
outlineColor: theme.palette.primary.main,
|
|
681
|
+
outlineOffset: 0,
|
|
682
|
+
outlineStyle: "solid",
|
|
683
|
+
outlineWidth: "1px",
|
|
684
|
+
},
|
|
685
|
+
|
|
686
|
+
[`&.${inputBaseClasses.error}`]: {
|
|
687
|
+
borderColor: theme.palette.error.main,
|
|
688
|
+
},
|
|
689
|
+
|
|
690
|
+
[`&.${inputBaseClasses.error}:hover`]: {
|
|
691
|
+
borderColor: theme.palette.error.dark,
|
|
692
|
+
},
|
|
693
|
+
|
|
694
|
+
[`&.${inputBaseClasses.error}.${inputBaseClasses.focused}`]: {
|
|
695
|
+
borderColor: theme.palette.error.main,
|
|
696
|
+
outlineColor: theme.palette.error.main,
|
|
697
|
+
},
|
|
698
|
+
|
|
699
|
+
[`&.${inputBaseClasses.disabled}`]: {
|
|
700
|
+
color: theme.palette.text.disabled,
|
|
701
|
+
borderColor: theme.palette.action.disabled,
|
|
702
|
+
pointerEvents: "auto",
|
|
703
|
+
backgroundColor: theme.palette.grey[50],
|
|
704
|
+
cursor: "not-allowed",
|
|
705
|
+
},
|
|
625
706
|
}),
|
|
626
|
-
input: {
|
|
707
|
+
input: ({ theme }) => ({
|
|
627
708
|
boxSizing: "border-box",
|
|
628
709
|
height: "auto",
|
|
629
|
-
|
|
710
|
+
paddingBlock: 0,
|
|
711
|
+
paddingInline: 0,
|
|
712
|
+
|
|
713
|
+
[`.${inputBaseClasses.disabled} &`]: {
|
|
714
|
+
pointerEvents: "auto",
|
|
715
|
+
cursor: "not-allowed",
|
|
716
|
+
},
|
|
717
|
+
|
|
718
|
+
[`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {
|
|
719
|
+
"&::placeholder": {
|
|
720
|
+
color: theme.palette.text.secondary,
|
|
721
|
+
opacity: "1 !important",
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
}),
|
|
630
725
|
},
|
|
631
726
|
},
|
|
632
727
|
MuiInputLabel: {
|
|
@@ -636,6 +731,8 @@ export const components: ThemeOptions["components"] = {
|
|
|
636
731
|
},
|
|
637
732
|
styleOverrides: {
|
|
638
733
|
root: ({ ownerState }) => ({
|
|
734
|
+
display: "flex",
|
|
735
|
+
justifyContent: "space-between",
|
|
639
736
|
// @ts-expect-error: Incorrect typing in MUI
|
|
640
737
|
...(ownerState.formControl && {
|
|
641
738
|
position: "initial",
|
|
@@ -724,7 +821,7 @@ export const components: ThemeOptions["components"] = {
|
|
|
724
821
|
},
|
|
725
822
|
MuiNativeSelect: {
|
|
726
823
|
defaultProps: {
|
|
727
|
-
variant: "
|
|
824
|
+
variant: "standard",
|
|
728
825
|
},
|
|
729
826
|
styleOverrides: {
|
|
730
827
|
icon: ({ theme }) => ({
|
|
@@ -732,66 +829,6 @@ export const components: ThemeOptions["components"] = {
|
|
|
732
829
|
}),
|
|
733
830
|
},
|
|
734
831
|
},
|
|
735
|
-
MuiOutlinedInput: {
|
|
736
|
-
defaultProps: {
|
|
737
|
-
notched: false,
|
|
738
|
-
minRows: 3,
|
|
739
|
-
},
|
|
740
|
-
styleOverrides: {
|
|
741
|
-
root: ({ ownerState, theme }) => ({
|
|
742
|
-
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
|
|
743
|
-
borderColor: theme.palette.text.primary,
|
|
744
|
-
},
|
|
745
|
-
[`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]:
|
|
746
|
-
{
|
|
747
|
-
borderColor: theme.palette.primary.main,
|
|
748
|
-
borderWidth: 2,
|
|
749
|
-
},
|
|
750
|
-
[`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]:
|
|
751
|
-
{
|
|
752
|
-
borderColor: theme.palette.error.main,
|
|
753
|
-
},
|
|
754
|
-
[`&.${outlinedInputClasses.error}:hover .${outlinedInputClasses.notchedOutline}`]:
|
|
755
|
-
{
|
|
756
|
-
borderColor: theme.palette.error.dark,
|
|
757
|
-
},
|
|
758
|
-
[`&.${outlinedInputClasses.error}.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]:
|
|
759
|
-
{
|
|
760
|
-
borderColor: theme.palette.error.main,
|
|
761
|
-
},
|
|
762
|
-
[`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]:
|
|
763
|
-
{
|
|
764
|
-
borderColor: theme.palette.action.disabled,
|
|
765
|
-
pointerEvents: "auto",
|
|
766
|
-
},
|
|
767
|
-
[`&.${outlinedInputClasses.disabled}`]: {
|
|
768
|
-
backgroundColor: theme.palette.grey[50],
|
|
769
|
-
cursor: "not-allowed",
|
|
770
|
-
},
|
|
771
|
-
...(ownerState.startAdornment && {
|
|
772
|
-
paddingLeft: theme.spacing(3),
|
|
773
|
-
}),
|
|
774
|
-
...(ownerState.endAdornment && {
|
|
775
|
-
paddingRight: theme.spacing(3),
|
|
776
|
-
}),
|
|
777
|
-
...(ownerState.multiline && {
|
|
778
|
-
padding: "0",
|
|
779
|
-
...(ownerState.size === "small" && {
|
|
780
|
-
padding: "0",
|
|
781
|
-
}),
|
|
782
|
-
}),
|
|
783
|
-
}),
|
|
784
|
-
input: ({ theme }) => ({
|
|
785
|
-
padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
|
|
786
|
-
borderWidth: theme.mixins.borderWidth,
|
|
787
|
-
borderStyle: theme.mixins.borderStyle,
|
|
788
|
-
borderColor: "transparent",
|
|
789
|
-
}),
|
|
790
|
-
notchedOutline: ({ theme }) => ({
|
|
791
|
-
borderColor: theme.palette.grey[500],
|
|
792
|
-
}),
|
|
793
|
-
},
|
|
794
|
-
},
|
|
795
832
|
MuiRadio: {
|
|
796
833
|
defaultProps: {
|
|
797
834
|
size: "small",
|
|
@@ -825,6 +862,16 @@ export const components: ThemeOptions["components"] = {
|
|
|
825
862
|
},
|
|
826
863
|
},
|
|
827
864
|
},
|
|
865
|
+
MuiSelect: {
|
|
866
|
+
defaultProps: {
|
|
867
|
+
variant: "standard",
|
|
868
|
+
},
|
|
869
|
+
styleOverrides: {
|
|
870
|
+
icon: ({ theme }) => ({
|
|
871
|
+
color: theme.palette.text.primary,
|
|
872
|
+
}),
|
|
873
|
+
},
|
|
874
|
+
},
|
|
828
875
|
MuiSvgIcon: {
|
|
829
876
|
defaultProps: {
|
|
830
877
|
fontSize: "inherit",
|
package/src/theme/typography.ts
CHANGED
|
@@ -64,6 +64,7 @@ export const typography: ThemeOptions["typography"] = {
|
|
|
64
64
|
marginBottom: Tokens.SpaceScale1,
|
|
65
65
|
},
|
|
66
66
|
subtitle1: {
|
|
67
|
+
color: Tokens.ColorPaletteNeutral600,
|
|
67
68
|
fontWeight: Tokens.FontWeightNormal,
|
|
68
69
|
fontSize: Tokens.FontScale0,
|
|
69
70
|
lineHeight: Tokens.FontLineHeightBody,
|