@okta/odyssey-react-mui 1.23.0 → 1.24.0

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 (73) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/Autocomplete.js +2 -0
  3. package/dist/Autocomplete.js.map +1 -1
  4. package/dist/Banner.js +6 -2
  5. package/dist/Banner.js.map +1 -1
  6. package/dist/Callout.js +6 -2
  7. package/dist/Callout.js.map +1 -1
  8. package/dist/ContrastModeProvider.js +86 -0
  9. package/dist/ContrastModeProvider.js.map +1 -0
  10. package/dist/FieldHint.js +20 -6
  11. package/dist/FieldHint.js.map +1 -1
  12. package/dist/Link.js.map +1 -1
  13. package/dist/OdysseyProvider.js +40 -20
  14. package/dist/OdysseyProvider.js.map +1 -1
  15. package/dist/Stack.js +32 -0
  16. package/dist/Stack.js.map +1 -0
  17. package/dist/Tag.js +64 -22
  18. package/dist/Tag.js.map +1 -1
  19. package/dist/Typography.js +27 -6
  20. package/dist/Typography.js.map +1 -1
  21. package/dist/index.js +2 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.scss +8 -4
  24. package/dist/labs/datePickerTheme.js +3 -6
  25. package/dist/labs/datePickerTheme.js.map +1 -1
  26. package/dist/src/Autocomplete.d.ts +7 -1
  27. package/dist/src/Autocomplete.d.ts.map +1 -1
  28. package/dist/src/Banner.d.ts +16 -12
  29. package/dist/src/Banner.d.ts.map +1 -1
  30. package/dist/src/Callout.d.ts +9 -9
  31. package/dist/src/Callout.d.ts.map +1 -1
  32. package/dist/src/ContrastModeProvider.d.ts +34 -0
  33. package/dist/src/ContrastModeProvider.d.ts.map +1 -0
  34. package/dist/src/FieldHint.d.ts.map +1 -1
  35. package/dist/src/Link.d.ts +3 -1
  36. package/dist/src/Link.d.ts.map +1 -1
  37. package/dist/src/OdysseyProvider.d.ts +5 -3
  38. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  39. package/dist/src/Stack.d.ts +33 -0
  40. package/dist/src/Stack.d.ts.map +1 -0
  41. package/dist/src/Tag.d.ts.map +1 -1
  42. package/dist/src/Typography.d.ts +3 -2
  43. package/dist/src/Typography.d.ts.map +1 -1
  44. package/dist/src/index.d.ts +6 -2
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
  47. package/dist/src/theme/components.d.ts.map +1 -1
  48. package/dist/src/theme/palette.d.ts.map +1 -1
  49. package/dist/src/theme/palette.types.d.ts +2 -0
  50. package/dist/src/theme/palette.types.d.ts.map +1 -1
  51. package/dist/theme/components.js +276 -273
  52. package/dist/theme/components.js.map +1 -1
  53. package/dist/theme/palette.js +2 -1
  54. package/dist/theme/palette.js.map +1 -1
  55. package/dist/theme/palette.types.js.map +1 -1
  56. package/dist/tsconfig.production.tsbuildinfo +1 -1
  57. package/package.json +3 -3
  58. package/src/Autocomplete.tsx +13 -0
  59. package/src/Banner.tsx +29 -14
  60. package/src/Callout.tsx +18 -11
  61. package/src/ContrastModeProvider.tsx +131 -0
  62. package/src/FieldHint.tsx +28 -4
  63. package/src/Link.tsx +3 -1
  64. package/src/OdysseyProvider.tsx +54 -27
  65. package/src/Stack.tsx +56 -0
  66. package/src/Tag.tsx +65 -21
  67. package/src/Typography.test.tsx +26 -0
  68. package/src/Typography.tsx +38 -6
  69. package/src/index.ts +4 -0
  70. package/src/labs/datePickerTheme.tsx +2 -6
  71. package/src/theme/components.tsx +285 -283
  72. package/src/theme/palette.ts +2 -1
  73. package/src/theme/palette.types.ts +2 -0
@@ -208,6 +208,8 @@ export const components = ({
208
208
  justifyContent: "center",
209
209
  alignItems: "center",
210
210
  borderRadius: 0,
211
+ borderWidth: 0,
212
+ borderBottomWidth: "1px",
211
213
  ...(ownerState.onClose !== undefined && {
212
214
  paddingInline: odysseyTokens.Spacing6
213
215
  })
@@ -518,176 +520,138 @@ export const components = ({
518
520
  },
519
521
  styleOverrides: {
520
522
  root: ({
521
- ownerState
522
- }) => ({
523
- minWidth: "unset",
524
- paddingBlock: odysseyTokens.Spacing3,
525
- paddingInline: odysseyTokens.Spacing4,
526
- display: "inline-flex",
527
- height: odysseyTokens.Spacing7,
528
- position: "relative",
529
- marginBlock: "0",
530
- marginInline: "0",
531
- transitionProperty: "color, background-color, border-color, box-shadow",
532
- transitionDuration: "100ms",
533
- transitionTimingFunction: "linear",
534
- borderWidth: odysseyTokens.BorderWidthMain,
535
- borderStyle: odysseyTokens.BorderStyleMain,
536
- borderRadius: odysseyTokens.BorderRadiusMain,
537
- borderColor: "transparent",
538
- fontSize: odysseyTokens.TypographySizeBody,
539
- fontWeight: odysseyTokens.TypographyWeightHeading,
540
- fontFamily: odysseyTokens.TypographyFamilyButton,
541
- lineHeight: odysseyTokens.TypographyLineHeightUi,
542
- whiteSpace: "nowrap",
543
- [`.${buttonClasses.root} + &`]: {
544
- marginInlineStart: odysseyTokens.Spacing2
545
- },
546
- "&:focus-visible": {
547
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
548
- outline: "2px solid transparent",
549
- outlineOffset: "1px"
550
- },
551
- "&:disabled": {
552
- pointerEvents: "none"
553
- },
554
- [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
555
- "& > *:nth-of-type(1)": {
556
- fontSize: `${odysseyTokens.TypographyLineHeightUi}em`
557
- }
558
- },
559
- ...(ownerState.variant === "primary" && {
560
- color: odysseyTokens.HueNeutralWhite,
561
- backgroundColor: odysseyTokens.PalettePrimaryMain,
562
- "&:hover": {
563
- backgroundColor: odysseyTokens.PalettePrimaryDark
564
- },
565
- "&:active": {
566
- backgroundColor: odysseyTokens.PalettePrimaryDarker
567
- },
568
- "&:disabled": {
569
- color: odysseyTokens.PalettePrimaryLight,
570
- backgroundColor: odysseyTokens.HueBlue100
571
- }
572
- }),
573
- ...(ownerState.variant === "secondary" && {
574
- backgroundColor: "transparent",
575
- borderColor: odysseyTokens.HueNeutral300,
576
- color: odysseyTokens.TypographyColorBody,
577
- "&:hover": {
578
- backgroundColor: odysseyTokens.HueNeutral100
579
- },
580
- "&:active": {
581
- backgroundColor: "transparent",
582
- borderColor: odysseyTokens.BorderColorPrimaryControl,
583
- color: odysseyTokens.TypographyColorAction
584
- },
585
- "&:disabled": {
586
- backgroundColor: odysseyTokens.HueNeutral100,
587
- borderColor: "transparent",
588
- color: odysseyTokens.TypographyColorDisabled
589
- }
590
- }),
591
- ...(ownerState.variant === "danger" && {
592
- backgroundColor: odysseyTokens.PaletteDangerMain,
593
- color: odysseyTokens.HueNeutralWhite,
594
- "&:hover": {
595
- backgroundColor: odysseyTokens.PaletteDangerDark
523
+ ownerState,
524
+ theme
525
+ }) => {
526
+ const contrastMode = theme.odysseyContrastMode;
527
+ return {
528
+ minWidth: "unset",
529
+ paddingBlock: odysseyTokens.Spacing3,
530
+ paddingInline: odysseyTokens.Spacing4,
531
+ display: "inline-flex",
532
+ height: odysseyTokens.Spacing7,
533
+ position: "relative",
534
+ marginBlock: "0",
535
+ marginInline: "0",
536
+ transitionProperty: "color, background-color, border-color, box-shadow",
537
+ transitionDuration: "100ms",
538
+ transitionTimingFunction: "linear",
539
+ borderWidth: odysseyTokens.BorderWidthMain,
540
+ borderStyle: odysseyTokens.BorderStyleMain,
541
+ borderRadius: odysseyTokens.BorderRadiusMain,
542
+ borderColor: "transparent",
543
+ fontSize: odysseyTokens.TypographySizeBody,
544
+ fontWeight: odysseyTokens.TypographyWeightHeading,
545
+ fontFamily: odysseyTokens.TypographyFamilyButton,
546
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
547
+ whiteSpace: "nowrap",
548
+ [`.${buttonClasses.root} + &`]: {
549
+ marginInlineStart: odysseyTokens.Spacing2
596
550
  },
597
551
  "&:focus-visible": {
598
- boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`
599
- },
600
- "&:active": {
601
- backgroundColor: odysseyTokens.PaletteDangerDarker
602
- },
603
- "&:disabled": {
604
- color: odysseyTokens.PaletteDangerLight,
605
- backgroundColor: odysseyTokens.HueRed100
606
- }
607
- }),
608
- ...(ownerState.variant === "dangerSecondary" && {
609
- backgroundColor: "transparent",
610
- borderColor: odysseyTokens.HueNeutral300,
611
- color: odysseyTokens.PaletteDangerMain,
612
- "&:hover": {
613
- backgroundColor: odysseyTokens.HueNeutral100,
614
- color: odysseyTokens.PaletteDangerMain
615
- },
616
- "&:active": {
617
- backgroundColor: "transparent",
618
- borderColor: odysseyTokens.PaletteDangerMain,
619
- color: odysseyTokens.PaletteDangerMain
620
- },
621
- "&:disabled": {
622
- backgroundColor: "transparent",
623
- borderColor: odysseyTokens.PaletteDangerLight,
624
- color: odysseyTokens.PaletteDangerLight
625
- }
626
- }),
627
- ...(ownerState.variant === "floating" && {
628
- backgroundColor: "transparent",
629
- color: odysseyTokens.TypographyColorBody,
630
- "&:hover": {
631
- backgroundColor: odysseyTokens.HueNeutral100
632
- },
633
- "&:active": {
634
- backgroundColor: odysseyTokens.HueNeutral200
552
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
553
+ outline: "2px solid transparent",
554
+ outlineOffset: "1px"
635
555
  },
636
556
  "&:disabled": {
637
- backgroundColor: "transparent",
638
- color: odysseyTokens.TypographyColorDisabled
639
- }
640
- }),
641
- ...(ownerState.variant === "floatingAction" && {
642
- backgroundColor: "transparent",
643
- color: odysseyTokens.TypographyColorAction,
644
- "&:hover": {
645
- backgroundColor: odysseyTokens.HueNeutral100
557
+ pointerEvents: "none"
646
558
  },
647
- "&:active": {
648
- backgroundColor: odysseyTokens.HueNeutral200
559
+ [`.${buttonClasses.startIcon}, .${buttonClasses.endIcon}`]: {
560
+ "& > *:nth-of-type(1)": {
561
+ fontSize: `${odysseyTokens.TypographyLineHeightUi}em`
562
+ }
649
563
  },
650
- "&:disabled": {
564
+ ...(ownerState.variant === "primary" && {
565
+ color: odysseyTokens.HueNeutralWhite,
566
+ backgroundColor: odysseyTokens.PalettePrimaryMain,
567
+ "&:hover": {
568
+ backgroundColor: odysseyTokens.PalettePrimaryDark
569
+ },
570
+ "&:active": {
571
+ backgroundColor: odysseyTokens.PalettePrimaryDarker
572
+ },
573
+ "&:disabled": {
574
+ color: odysseyTokens.PalettePrimaryLight,
575
+ backgroundColor: odysseyTokens.HueBlue100
576
+ }
577
+ }),
578
+ ...(ownerState.variant === "secondary" && {
651
579
  backgroundColor: "transparent",
652
- color: odysseyTokens.TypographyColorDisabled
653
- }
654
- }),
655
- ...(ownerState.size === "small" && {
656
- height: odysseyTokens.Spacing6,
657
- paddingBlock: odysseyTokens.Spacing2,
658
- paddingInline: odysseyTokens.Spacing3,
659
- fontSize: odysseyTokens.TypographySizeBody
660
- }),
661
- ...(ownerState.size === "large" && {
662
- height: odysseyTokens.Spacing8,
663
- paddingBlock: odysseyTokens.Spacing4,
664
- paddingInline: odysseyTokens.Spacing4
665
- }),
666
- ...(ownerState.fullWidth === true && {
667
- width: "100%",
668
- marginBlock: "0",
669
- marginInline: "0",
670
- "&:not(:last-child)": {
671
- marginBlockEnd: odysseyTokens.Spacing4
672
- }
673
- }),
674
- ...(ownerState.children === "" && {
675
- minWidth: "auto",
676
- padding: odysseyTokens.Spacing3,
677
- [`.${buttonClasses.endIcon}, .${buttonClasses.startIcon}`]: {
678
- margin: "0"
679
- },
680
- ...(ownerState.size === "large" && {
681
- padding: odysseyTokens.Spacing4
580
+ borderColor: odysseyTokens.HueNeutral300,
581
+ color: odysseyTokens.TypographyColorBody,
582
+ "&:hover": {
583
+ backgroundColor: odysseyTokens.HueNeutral100
584
+ },
585
+ "&:active": {
586
+ backgroundColor: "transparent",
587
+ borderColor: odysseyTokens.BorderColorPrimaryControl,
588
+ color: odysseyTokens.TypographyColorAction
589
+ },
590
+ "&:disabled": {
591
+ ...(contrastMode === "lowContrast" && {
592
+ backgroundColor: odysseyTokens.HueNeutral200,
593
+ borderColor: "transparent",
594
+ color: odysseyTokens.TypographyColorDisabled
595
+ }),
596
+ ...(contrastMode === "highContrast" && {
597
+ backgroundColor: odysseyTokens.HueNeutral100,
598
+ borderColor: "transparent",
599
+ color: odysseyTokens.TypographyColorDisabled
600
+ })
601
+ }
682
602
  }),
683
- ...(ownerState.size === "small" && {
684
- padding: odysseyTokens.Spacing2
603
+ ...(ownerState.variant === "danger" && {
604
+ backgroundColor: odysseyTokens.PaletteDangerMain,
605
+ color: odysseyTokens.HueNeutralWhite,
606
+ "&:hover": {
607
+ backgroundColor: odysseyTokens.PaletteDangerDark
608
+ },
609
+ "&:focus-visible": {
610
+ boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`
611
+ },
612
+ "&:active": {
613
+ backgroundColor: odysseyTokens.PaletteDangerDarker
614
+ },
615
+ "&:disabled": {
616
+ color: odysseyTokens.PaletteDangerLight,
617
+ backgroundColor: odysseyTokens.HueRed100
618
+ }
685
619
  }),
686
- ...(ownerState.size === "large" && {
687
- padding: odysseyTokens.Spacing4
620
+ ...(ownerState.variant === "dangerSecondary" && {
621
+ backgroundColor: "transparent",
622
+ borderColor: odysseyTokens.HueNeutral300,
623
+ color: odysseyTokens.PaletteDangerMain,
624
+ "&:hover": {
625
+ backgroundColor: odysseyTokens.HueNeutral100,
626
+ color: odysseyTokens.PaletteDangerMain
627
+ },
628
+ "&:active": {
629
+ backgroundColor: "transparent",
630
+ borderColor: odysseyTokens.PaletteDangerMain,
631
+ color: odysseyTokens.PaletteDangerMain
632
+ },
633
+ "&:disabled": {
634
+ backgroundColor: "transparent",
635
+ borderColor: odysseyTokens.PaletteDangerLight,
636
+ color: odysseyTokens.PaletteDangerLight
637
+ }
638
+ }),
639
+ ...(ownerState.variant === "floating" && {
640
+ backgroundColor: "transparent",
641
+ color: odysseyTokens.TypographyColorBody,
642
+ "&:hover": {
643
+ backgroundColor: odysseyTokens.HueNeutral100
644
+ },
645
+ "&:active": {
646
+ backgroundColor: odysseyTokens.HueNeutral200
647
+ },
648
+ "&:disabled": {
649
+ backgroundColor: "transparent",
650
+ color: odysseyTokens.TypographyColorDisabled
651
+ }
688
652
  })
689
- })
690
- }),
653
+ };
654
+ },
691
655
  endIcon: ({
692
656
  ownerState
693
657
  }) => ({
@@ -882,117 +846,151 @@ export const components = ({
882
846
  },
883
847
  styleOverrides: {
884
848
  root: ({
885
- ownerState
886
- }) => ({
887
- height: "auto",
888
- paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
889
- paddingInline: odysseyTokens.Spacing3,
890
- fontSize: odysseyTokens.TypographySizeBody,
891
- lineHeight: odysseyTokens.TypographyLineHeightUi,
892
- borderRadius: odysseyTokens.BorderRadiusRound,
893
- backgroundColor: odysseyTokens.HueNeutral100,
894
- borderWidth: odysseyTokens.BorderWidthMain,
895
- borderColor: odysseyTokens.HueNeutral200,
896
- borderStyle: odysseyTokens.BorderStyleMain,
897
- color: odysseyTokens.HueNeutral700,
898
- ...(ownerState.onDelete && {
899
- paddingInlineEnd: odysseyTokens.Spacing2
900
- }),
901
- [`&.${chipClasses.disabled}`]: {
902
- opacity: 1,
903
- pointerEvents: "none",
904
- borderColor: odysseyTokens.BorderColorDisabled,
905
- color: odysseyTokens.TypographyColorDisabled,
906
- [`& .${chipClasses.deleteIcon}`]: {
907
- color: odysseyTokens.HueNeutral300
908
- }
909
- },
910
- ...(ownerState.clickable && {
911
- "&:hover": {
912
- backgroundColor: odysseyTokens.HueNeutral200
913
- },
914
- [`&.${chipClasses.focusVisible}`]: {
915
- backgroundColor: odysseyTokens.HueNeutral200,
916
- outlineColor: odysseyTokens.FocusOutlineColorPrimary,
917
- outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
918
- outlineStyle: odysseyTokens.FocusOutlineStyle,
919
- outlineWidth: odysseyTokens.FocusOutlineWidthMain
920
- },
921
- "&:active": {
922
- boxShadow: "none",
923
- backgroundColor: odysseyTokens.HueNeutral300
924
- }
925
- }),
926
- [`& .${chipClasses.icon}`]: {
927
- margin: 0,
928
- marginInlineEnd: odysseyTokens.Spacing1
929
- },
930
- ...(ownerState.variant === "lamp" && {
931
- paddingBlock: 0,
932
- paddingInline: 0,
933
- borderRadius: 0,
934
- border: 0,
935
- backgroundColor: "transparent",
936
- color: odysseyTokens.TypographyColorBody,
937
- "&::before": {
938
- content: "''",
939
- width: odysseyTokens.Spacing2,
940
- height: odysseyTokens.Spacing2,
941
- marginInlineEnd: odysseyTokens.Spacing2,
942
- borderRadius: "100%",
943
- backgroundColor: odysseyTokens.HueNeutral600
944
- },
945
- [`&.${chipClasses.colorError}`]: {
946
- "&::before": {
947
- border: 0,
948
- backgroundColor: odysseyTokens.PaletteDangerMain
849
+ ownerState,
850
+ theme
851
+ }) => {
852
+ const contrastMode = theme.odysseyContrastMode;
853
+ return {
854
+ height: "auto",
855
+ paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
856
+ paddingInline: odysseyTokens.Spacing3,
857
+ fontSize: odysseyTokens.TypographySizeBody,
858
+ lineHeight: odysseyTokens.TypographyLineHeightUi,
859
+ borderRadius: odysseyTokens.BorderRadiusRound,
860
+ backgroundColor: odysseyTokens.HueNeutral100,
861
+ borderWidth: odysseyTokens.BorderWidthMain,
862
+ borderColor: odysseyTokens.HueNeutral200,
863
+ borderStyle: odysseyTokens.BorderStyleMain,
864
+ color: odysseyTokens.HueNeutral700,
865
+ ...(ownerState.onDelete && {
866
+ paddingInlineEnd: odysseyTokens.Spacing2
867
+ }),
868
+ [`&.${chipClasses.disabled}`]: {
869
+ opacity: 1,
870
+ pointerEvents: "none",
871
+ borderColor: odysseyTokens.BorderColorDisabled,
872
+ color: odysseyTokens.TypographyColorDisabled,
873
+ [`& .${chipClasses.deleteIcon}`]: {
874
+ color: odysseyTokens.HueNeutral300
949
875
  }
950
876
  },
951
- [`&.${chipClasses.colorSuccess}`]: {
952
- "&::before": {
953
- border: 0,
954
- backgroundColor: odysseyTokens.PaletteSuccessMain
877
+ ...(ownerState.clickable && {
878
+ "&:hover": {
879
+ backgroundColor: odysseyTokens.HueNeutral200
880
+ },
881
+ [`&.${chipClasses.focusVisible}`]: {
882
+ backgroundColor: odysseyTokens.HueNeutral200,
883
+ outlineColor: odysseyTokens.FocusOutlineColorPrimary,
884
+ outlineOffset: odysseyTokens.FocusOutlineOffsetTight,
885
+ outlineStyle: odysseyTokens.FocusOutlineStyle,
886
+ outlineWidth: odysseyTokens.FocusOutlineWidthMain
887
+ },
888
+ "&:active": {
889
+ boxShadow: "none",
890
+ backgroundColor: odysseyTokens.HueNeutral300
955
891
  }
892
+ }),
893
+ [`& .${chipClasses.icon}`]: {
894
+ margin: 0,
895
+ marginInlineEnd: odysseyTokens.Spacing1
956
896
  },
957
- [`&.${chipClasses.colorWarning}`]: {
897
+ ...(ownerState.variant === "lamp" && {
898
+ paddingBlock: 0,
899
+ paddingInline: 0,
900
+ borderRadius: 0,
901
+ border: 0,
902
+ backgroundColor: "transparent",
903
+ color: odysseyTokens.TypographyColorBody,
958
904
  "&::before": {
959
- border: 0,
960
- backgroundColor: odysseyTokens.HueYellow200
905
+ content: "''",
906
+ width: odysseyTokens.Spacing2,
907
+ height: odysseyTokens.Spacing2,
908
+ marginInlineEnd: odysseyTokens.Spacing2,
909
+ borderRadius: "100%",
910
+ backgroundColor: odysseyTokens.HueNeutral600
911
+ },
912
+ [`&.${chipClasses.colorError}`]: {
913
+ "&::before": {
914
+ border: 0,
915
+ backgroundColor: odysseyTokens.PaletteDangerMain
916
+ }
917
+ },
918
+ [`&.${chipClasses.colorSuccess}`]: {
919
+ "&::before": {
920
+ border: 0,
921
+ backgroundColor: odysseyTokens.PaletteSuccessMain
922
+ }
923
+ },
924
+ [`&.${chipClasses.colorWarning}`]: {
925
+ "&::before": {
926
+ border: 0,
927
+ backgroundColor: odysseyTokens.HueYellow200
928
+ }
961
929
  }
930
+ }),
931
+ ...(ownerState.variant === "pill" && {
932
+ paddingBlock: odysseyTokens.Spacing1,
933
+ paddingInline: odysseyTokens.Spacing2,
934
+ borderRadius: odysseyTokens.BorderRadiusMain,
935
+ border: 0,
936
+ fontWeight: odysseyTokens.TypographyWeightHeadingBold,
937
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
938
+ fontSize: "0.71428571rem",
939
+ textTransform: "uppercase",
940
+ ...(contrastMode === "lowContrast" && {
941
+ backgroundColor: odysseyTokens.HueNeutral200,
942
+ color: odysseyTokens.HueNeutral700
943
+ }),
944
+ ...(contrastMode === "highContrast" && {
945
+ backgroundColor: odysseyTokens.HueNeutral50,
946
+ color: odysseyTokens.TypographyColorSubordinate
947
+ }),
948
+ [`&.${chipClasses.colorError}`]: {
949
+ ...(contrastMode === "lowContrast" && {
950
+ backgroundColor: odysseyTokens.HueRed100,
951
+ color: odysseyTokens.HueRed700
952
+ }),
953
+ ...(contrastMode === "highContrast" && {
954
+ backgroundColor: odysseyTokens.PaletteDangerLighter,
955
+ color: odysseyTokens.TypographyColorDanger
956
+ })
957
+ },
958
+ [`&.${chipClasses.colorInfo}`]: {
959
+ ...(contrastMode === "lowContrast" && {
960
+ backgroundColor: odysseyTokens.HueBlue100,
961
+ color: odysseyTokens.HueBlue700
962
+ }),
963
+ ...(contrastMode === "highContrast" && {
964
+ backgroundColor: odysseyTokens.PalettePrimaryLighter,
965
+ color: odysseyTokens.PalettePrimaryText
966
+ })
967
+ },
968
+ [`&.${chipClasses.colorSuccess}`]: {
969
+ ...(contrastMode === "lowContrast" && {
970
+ backgroundColor: odysseyTokens.HueGreen200,
971
+ color: odysseyTokens.HueGreen700
972
+ }),
973
+ ...(contrastMode === "highContrast" && {
974
+ backgroundColor: odysseyTokens.PaletteSuccessLighter,
975
+ color: odysseyTokens.TypographyColorSuccess
976
+ })
977
+ },
978
+ [`&.${chipClasses.colorWarning}`]: {
979
+ ...(contrastMode === "lowContrast" && {
980
+ backgroundColor: odysseyTokens.HueYellow100,
981
+ color: odysseyTokens.HueYellow700
982
+ }),
983
+ ...(contrastMode === "highContrast" && {
984
+ backgroundColor: odysseyTokens.PaletteWarningLighter,
985
+ color: odysseyTokens.TypographyColorWarning
986
+ })
987
+ }
988
+ }),
989
+ [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
990
+ backgroundColor: odysseyTokens.HueNeutral200
962
991
  }
963
- }),
964
- ...(ownerState.variant === "pill" && {
965
- paddingBlock: odysseyTokens.Spacing1,
966
- paddingInline: odysseyTokens.Spacing2,
967
- borderRadius: odysseyTokens.BorderRadiusMain,
968
- border: 0,
969
- fontWeight: odysseyTokens.TypographyWeightHeadingBold,
970
- lineHeight: odysseyTokens.TypographyLineHeightOverline,
971
- backgroundColor: odysseyTokens.HueNeutral50,
972
- color: odysseyTokens.TypographyColorSubordinate,
973
- fontSize: "0.71428571rem",
974
- textTransform: "uppercase",
975
- [`&.${chipClasses.colorError}`]: {
976
- backgroundColor: odysseyTokens.PaletteDangerLighter,
977
- color: odysseyTokens.TypographyColorDanger
978
- },
979
- [`&.${chipClasses.colorInfo}`]: {
980
- backgroundColor: odysseyTokens.PalettePrimaryLighter,
981
- color: odysseyTokens.PalettePrimaryText
982
- },
983
- [`&.${chipClasses.colorSuccess}`]: {
984
- backgroundColor: odysseyTokens.PaletteSuccessLighter,
985
- color: odysseyTokens.TypographyColorSuccess
986
- },
987
- [`&.${chipClasses.colorWarning}`]: {
988
- backgroundColor: odysseyTokens.PaletteWarningLighter,
989
- color: odysseyTokens.TypographyColorWarning
990
- }
991
- }),
992
- [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
993
- backgroundColor: odysseyTokens.HueNeutral200
994
- }
995
- }),
992
+ };
993
+ },
996
994
  label: {
997
995
  padding: 0,
998
996
  [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
@@ -1558,24 +1556,18 @@ export const components = ({
1558
1556
  },
1559
1557
  styleOverrides: {
1560
1558
  root: {
1561
- display: "flex",
1562
- justifyContent: "flex-start",
1563
- alignItems: "center",
1564
1559
  fontSize: odysseyTokens.TypographySizeSubordinate,
1565
1560
  lineHeight: odysseyTokens.TypographyLineHeightBody,
1561
+ marginBlockEnd: odysseyTokens.Spacing2,
1566
1562
  marginBlockStart: odysseyTokens.Spacing1,
1563
+ textAlign: "start",
1567
1564
  [`.${formLabelClasses.root} + &`]: {
1568
1565
  marginBlockStart: `-${odysseyTokens.Spacing1}`,
1569
1566
  color: odysseyTokens.TypographyColorSubordinate
1570
1567
  },
1571
- marginBlockEnd: odysseyTokens.Spacing2,
1572
1568
  "&:last-child": {
1573
1569
  marginBlockEnd: 0
1574
1570
  },
1575
- textAlign: "start",
1576
- ".field-hint-link-component": {
1577
- marginInlineStart: odysseyTokens.Spacing1
1578
- },
1579
1571
  ".Mui-disabled &": {
1580
1572
  color: odysseyTokens.TypographyColorDisabled,
1581
1573
  a: {
@@ -2777,7 +2769,8 @@ export const components = ({
2777
2769
  subtitle1: "p",
2778
2770
  body1: "p",
2779
2771
  inherit: "p",
2780
- legend: "legend"
2772
+ legend: "legend",
2773
+ overline: "p"
2781
2774
  }
2782
2775
  },
2783
2776
  styleOverrides: {
@@ -2786,6 +2779,16 @@ export const components = ({
2786
2779
  [`&:last-child`]: {
2787
2780
  marginBlockEnd: 0
2788
2781
  }
2782
+ },
2783
+ overline: {
2784
+ fontSize: odysseyTokens.TypographySizeOverline,
2785
+ fontWeight: odysseyTokens.TypographyWeightBodyBold,
2786
+ lineHeight: odysseyTokens.TypographyLineHeightOverline,
2787
+ letterSpacing: odysseyTokens.TypographyLetterSpacingOverline,
2788
+ textTransform: "none",
2789
+ ":is(:lang(en-*), :lang(en))": {
2790
+ textTransform: "uppercase"
2791
+ }
2789
2792
  }
2790
2793
  }
2791
2794
  }