@okta/odyssey-react-mui 1.24.0 → 1.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -58,7 +58,7 @@
58
58
  "@mui/system": "^5.15.9",
59
59
  "@mui/utils": "^5.15.9",
60
60
  "@mui/x-date-pickers": "^7.2.0",
61
- "@okta/odyssey-design-tokens": "^1.24.0",
61
+ "@okta/odyssey-design-tokens": "^1.24.1",
62
62
  "@types/luxon": "^3.4.2",
63
63
  "date-fns": "^2.30.0",
64
64
  "dom-accessibility-api": "^0.7.0",
@@ -73,5 +73,5 @@
73
73
  "react": "^18.2.0",
74
74
  "react-dom": "^18.2.0"
75
75
  },
76
- "gitHead": "60a0ba720c9b7766c8f3599047f6c77b9470d33b"
76
+ "gitHead": "8706464f0aa2e07b37fb33c16d848758ea56dfdd"
77
77
  }
@@ -623,6 +623,29 @@ export const components = ({
623
623
  },
624
624
  },
625
625
 
626
+ ...(ownerState.size === "small" && {
627
+ height: odysseyTokens.Spacing6,
628
+ paddingBlock: odysseyTokens.Spacing2,
629
+ paddingInline: odysseyTokens.Spacing3,
630
+ fontSize: odysseyTokens.TypographySizeBody,
631
+ }),
632
+
633
+ ...(ownerState.size === "large" && {
634
+ height: odysseyTokens.Spacing8,
635
+ paddingBlock: odysseyTokens.Spacing4,
636
+ paddingInline: odysseyTokens.Spacing4,
637
+ }),
638
+
639
+ ...(ownerState.fullWidth === true && {
640
+ width: "100%",
641
+ marginBlock: "0",
642
+ marginInline: "0",
643
+
644
+ "&:not(:last-child)": {
645
+ marginBlockEnd: odysseyTokens.Spacing4,
646
+ },
647
+ }),
648
+
626
649
  ...(ownerState.variant === "primary" && {
627
650
  color: odysseyTokens.HueNeutralWhite,
628
651
  backgroundColor: odysseyTokens.PalettePrimaryMain,
@@ -733,28 +756,81 @@ export const components = ({
733
756
  color: odysseyTokens.TypographyColorDisabled,
734
757
  },
735
758
  }),
759
+
760
+ ...(ownerState.variant === "floatingAction" && {
761
+ backgroundColor: "transparent",
762
+ color: odysseyTokens.TypographyColorAction,
763
+
764
+ "&:hover": {
765
+ backgroundColor: odysseyTokens.HueNeutral100,
766
+ },
767
+
768
+ "&:active": {
769
+ backgroundColor: odysseyTokens.HueNeutral200,
770
+ },
771
+
772
+ "&:disabled": {
773
+ backgroundColor: "transparent",
774
+ color: odysseyTokens.TypographyColorDisabled,
775
+ },
776
+ }),
777
+
778
+ ...(ownerState.children === "" && {
779
+ minWidth: "auto",
780
+ padding: odysseyTokens.Spacing3,
781
+
782
+ [`.${buttonClasses.endIcon}, .${buttonClasses.startIcon}`]: {
783
+ margin: "0",
784
+ },
785
+
786
+ ...(ownerState.size === "large" && {
787
+ padding: odysseyTokens.Spacing4,
788
+ }),
789
+
790
+ ...(ownerState.size === "small" && {
791
+ padding: odysseyTokens.Spacing2,
792
+ }),
793
+
794
+ ...(ownerState.size === "large" && {
795
+ padding: odysseyTokens.Spacing4,
796
+ }),
797
+ }),
736
798
  };
737
799
  },
738
800
 
739
- endIcon: ({ ownerState }) => ({
740
- display: "inline-flex",
741
- margin: 0,
742
- marginInlineStart: odysseyTokens.Spacing2,
801
+ endIcon: ({ ownerState }) => {
802
+ const hasNoChildren =
803
+ ownerState.children === "" ||
804
+ ownerState.children === undefined ||
805
+ ownerState.children === null;
743
806
 
744
- ...(ownerState.children === undefined && {
745
- marginInlineStart: 0,
746
- }),
747
- }),
807
+ return {
808
+ display: "inline-flex",
809
+ margin: 0,
810
+ marginInlineStart: odysseyTokens.Spacing2,
748
811
 
749
- startIcon: ({ ownerState }) => ({
750
- display: "inline-flex",
751
- margin: 0,
752
- marginInlineEnd: odysseyTokens.Spacing2,
812
+ ...(hasNoChildren && {
813
+ marginInlineStart: 0,
814
+ }),
815
+ };
816
+ },
753
817
 
754
- ...(ownerState.children === undefined && {
755
- marginInlineEnd: 0,
756
- }),
757
- }),
818
+ startIcon: ({ ownerState }) => {
819
+ const hasNoChildren =
820
+ ownerState.children === "" ||
821
+ ownerState.children === undefined ||
822
+ ownerState.children === null;
823
+
824
+ return {
825
+ display: "inline-flex",
826
+ margin: 0,
827
+ marginInlineEnd: odysseyTokens.Spacing2,
828
+
829
+ ...(hasNoChildren && {
830
+ marginInlineEnd: 0,
831
+ }),
832
+ };
833
+ },
758
834
  },
759
835
  },
760
836
  MuiButtonBase: {