@okta/odyssey-react-mui 1.6.0 → 1.6.2

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 (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/Autocomplete.js.map +1 -1
  3. package/dist/Checkbox.js +3 -2
  4. package/dist/Checkbox.js.map +1 -1
  5. package/dist/CheckboxGroup.js.map +1 -1
  6. package/dist/FieldComponentProps.js +2 -0
  7. package/dist/FieldComponentProps.js.map +1 -0
  8. package/dist/NativeSelect.js.map +1 -1
  9. package/dist/OdysseyCacheProvider.js +7 -1
  10. package/dist/OdysseyCacheProvider.js.map +1 -1
  11. package/dist/OdysseyProvider.js +3 -4
  12. package/dist/OdysseyProvider.js.map +1 -1
  13. package/dist/OdysseyThemeProvider.js +3 -3
  14. package/dist/OdysseyThemeProvider.js.map +1 -1
  15. package/dist/PasswordField.js.map +1 -1
  16. package/dist/Radio.js.map +1 -1
  17. package/dist/RadioGroup.js.map +1 -1
  18. package/dist/SearchField.js.map +1 -1
  19. package/dist/Select.js.map +1 -1
  20. package/dist/TextField.js +1 -0
  21. package/dist/TextField.js.map +1 -1
  22. package/dist/Tooltip.js +5 -1
  23. package/dist/Tooltip.js.map +1 -1
  24. package/dist/{createShadowDom.js → createShadowRootElement.js} +6 -11
  25. package/dist/createShadowRootElement.js.map +1 -0
  26. package/dist/index.js +2 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/src/Autocomplete.d.ts +2 -21
  29. package/dist/src/Autocomplete.d.ts.map +1 -1
  30. package/dist/src/Checkbox.d.ts +2 -13
  31. package/dist/src/Checkbox.d.ts.map +1 -1
  32. package/dist/src/CheckboxGroup.d.ts +2 -13
  33. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  34. package/dist/src/FieldComponentProps.d.ts +42 -0
  35. package/dist/src/FieldComponentProps.d.ts.map +1 -0
  36. package/dist/src/NativeSelect.d.ts +3 -42
  37. package/dist/src/NativeSelect.d.ts.map +1 -1
  38. package/dist/src/OdysseyCacheProvider.d.ts +2 -2
  39. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
  40. package/dist/src/OdysseyProvider.d.ts +1 -1
  41. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  42. package/dist/src/OdysseyThemeProvider.d.ts +2 -2
  43. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  44. package/dist/src/PasswordField.d.ts +3 -58
  45. package/dist/src/PasswordField.d.ts.map +1 -1
  46. package/dist/src/Radio.d.ts +2 -9
  47. package/dist/src/Radio.d.ts.map +1 -1
  48. package/dist/src/RadioGroup.d.ts +2 -21
  49. package/dist/src/RadioGroup.d.ts.map +1 -1
  50. package/dist/src/SearchField.d.ts +3 -26
  51. package/dist/src/SearchField.d.ts.map +1 -1
  52. package/dist/src/Select.d.ts +2 -25
  53. package/dist/src/Select.d.ts.map +1 -1
  54. package/dist/src/TextField.d.ts +3 -58
  55. package/dist/src/TextField.d.ts.map +1 -1
  56. package/dist/src/Tooltip.d.ts +2 -1
  57. package/dist/src/Tooltip.d.ts.map +1 -1
  58. package/dist/src/{createShadowDom.d.ts → createShadowRootElement.d.ts} +2 -5
  59. package/dist/src/createShadowRootElement.d.ts.map +1 -0
  60. package/dist/src/index.d.ts +2 -1
  61. package/dist/src/index.d.ts.map +1 -1
  62. package/dist/src/theme/components.d.ts +2 -2
  63. package/dist/src/theme/components.d.ts.map +1 -1
  64. package/dist/src/theme/createOdysseyMuiTheme.d.ts +2 -2
  65. package/dist/theme/components.js +90 -70
  66. package/dist/theme/components.js.map +1 -1
  67. package/dist/theme/createOdysseyMuiTheme.js +2 -2
  68. package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
  69. package/dist/tsconfig.production.tsbuildinfo +1 -1
  70. package/package.json +3 -3
  71. package/src/Autocomplete.tsx +6 -21
  72. package/src/Checkbox.tsx +6 -16
  73. package/src/CheckboxGroup.tsx +3 -13
  74. package/src/FieldComponentProps.ts +42 -0
  75. package/src/NativeSelect.tsx +6 -22
  76. package/src/OdysseyCacheProvider.tsx +12 -2
  77. package/src/OdysseyProvider.tsx +3 -4
  78. package/src/OdysseyThemeProvider.tsx +4 -4
  79. package/src/PasswordField.tsx +3 -29
  80. package/src/Radio.tsx +3 -9
  81. package/src/RadioGroup.tsx +6 -21
  82. package/src/SearchField.tsx +3 -13
  83. package/src/Select.tsx +8 -26
  84. package/src/TextField.tsx +4 -30
  85. package/src/Tooltip.tsx +7 -2
  86. package/src/createShadowRootElement.ts +21 -0
  87. package/src/index.ts +2 -1
  88. package/src/theme/components.tsx +34 -15
  89. package/src/theme/createOdysseyMuiTheme.ts +3 -3
  90. package/dist/createShadowDom.js.map +0 -1
  91. package/dist/src/createShadowDom.d.ts.map +0 -1
  92. package/src/createShadowDom.ts +0 -46
@@ -39,7 +39,7 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
39
39
  export const components = _ref => {
40
40
  let {
41
41
  odysseyTokens,
42
- shadowRootElement
42
+ shadowDomElement
43
43
  } = _ref;
44
44
  return {
45
45
  MuiAccordion: {
@@ -274,16 +274,33 @@ export const components = _ref => {
274
274
  },
275
275
  MuiAlertTitle: {
276
276
  styleOverrides: {
277
- root: {
278
- marginBlockStart: 0,
279
- marginBlockEnd: odysseyTokens.Spacing2,
280
- lineHeight: odysseyTokens.TypographyLineHeightHeading6,
281
- fontSize: odysseyTokens.TypographySizeHeading6,
282
- fontWeight: odysseyTokens.TypographyWeightHeading,
283
- fontFamily: odysseyTokens.TypographyFamilyHeading,
284
- [`&:last-child`]: {
285
- marginBlockEnd: 0
286
- }
277
+ root: _ref6 => {
278
+ let {
279
+ ownerState
280
+ } = _ref6;
281
+ return {
282
+ marginBlockStart: 0,
283
+ marginBlockEnd: odysseyTokens.Spacing2,
284
+ lineHeight: odysseyTokens.TypographyLineHeightHeading6,
285
+ fontSize: odysseyTokens.TypographySizeHeading6,
286
+ fontWeight: odysseyTokens.TypographyWeightHeading,
287
+ fontFamily: odysseyTokens.TypographyFamilyHeading,
288
+ ...(ownerState.severity === "info" && {
289
+ color: odysseyTokens.PalettePrimaryDark
290
+ }),
291
+ ...(ownerState.severity === "error" && {
292
+ color: odysseyTokens.PaletteDangerDarker
293
+ }),
294
+ ...(ownerState.severity === "success" && {
295
+ color: odysseyTokens.PaletteSuccessDarker
296
+ }),
297
+ ...(ownerState.severity === "warning" && {
298
+ color: odysseyTokens.PaletteWarningDarker
299
+ }),
300
+ [`&:last-child`]: {
301
+ marginBlockEnd: 0
302
+ }
303
+ };
287
304
  }
288
305
  }
289
306
  },
@@ -317,10 +334,10 @@ export const components = _ref => {
317
334
  marginRight: "unset",
318
335
  padding: odysseyTokens.Spacing1
319
336
  },
320
- endAdornment: _ref6 => {
337
+ endAdornment: _ref7 => {
321
338
  let {
322
339
  ownerState
323
- } = _ref6;
340
+ } = _ref7;
324
341
  return {
325
342
  display: "flex",
326
343
  gap: odysseyTokens.Spacing1,
@@ -382,10 +399,10 @@ export const components = _ref => {
382
399
  background: "transparent",
383
400
  paddingBlockStart: odysseyTokens.Spacing1
384
401
  },
385
- inputRoot: _ref7 => {
402
+ inputRoot: _ref8 => {
386
403
  let {
387
404
  ownerState
388
- } = _ref7;
405
+ } = _ref8;
389
406
  return {
390
407
  ...(ownerState.readOnly === true && {
391
408
  backgroundColor: odysseyTokens.HueNeutral50,
@@ -399,10 +416,10 @@ export const components = _ref => {
399
416
  },
400
417
  MuiBackdrop: {
401
418
  styleOverrides: {
402
- root: _ref8 => {
419
+ root: _ref9 => {
403
420
  let {
404
421
  ownerState
405
- } = _ref8;
422
+ } = _ref9;
406
423
  return {
407
424
  backgroundColor: "rgba(29,29,33,0.75)",
408
425
  ...(ownerState.invisible === true && {
@@ -449,10 +466,10 @@ export const components = _ref => {
449
466
  disableElevation: true
450
467
  },
451
468
  styleOverrides: {
452
- root: _ref9 => {
469
+ root: _ref10 => {
453
470
  let {
454
471
  ownerState
455
- } = _ref9;
472
+ } = _ref10;
456
473
  return {
457
474
  minWidth: "unset",
458
475
  paddingBlock: odysseyTokens.Spacing3,
@@ -598,10 +615,10 @@ export const components = _ref => {
598
615
  })
599
616
  };
600
617
  },
601
- endIcon: _ref10 => {
618
+ endIcon: _ref11 => {
602
619
  let {
603
620
  ownerState
604
- } = _ref10;
621
+ } = _ref11;
605
622
  return {
606
623
  display: "inline-flex",
607
624
  margin: 0,
@@ -611,10 +628,10 @@ export const components = _ref => {
611
628
  })
612
629
  };
613
630
  },
614
- startIcon: _ref11 => {
631
+ startIcon: _ref12 => {
615
632
  let {
616
633
  ownerState
617
- } = _ref11;
634
+ } = _ref12;
618
635
  return {
619
636
  display: "inline-flex",
620
637
  margin: 0,
@@ -639,10 +656,10 @@ export const components = _ref => {
639
656
  indeterminateIcon: _jsx(SubtractIcon, {})
640
657
  },
641
658
  styleOverrides: {
642
- root: _ref12 => {
659
+ root: _ref13 => {
643
660
  let {
644
661
  theme
645
- } = _ref12;
662
+ } = _ref13;
646
663
  return {
647
664
  width: `${odysseyTokens.TypographyLineHeightUi}em`,
648
665
  height: `${odysseyTokens.TypographyLineHeightUi}em`,
@@ -716,10 +733,10 @@ export const components = _ref => {
716
733
  deleteIcon: _jsx(CloseCircleFilledIcon, {})
717
734
  },
718
735
  styleOverrides: {
719
- root: _ref13 => {
736
+ root: _ref14 => {
720
737
  let {
721
738
  ownerState
722
- } = _ref13;
739
+ } = _ref14;
723
740
  return {
724
741
  height: "auto",
725
742
  paddingBlock: `calc(${odysseyTokens.Spacing2} - ${odysseyTokens.BorderWidthMain})`,
@@ -738,7 +755,7 @@ export const components = _ref => {
738
755
  [`&.${chipClasses.disabled}`]: {
739
756
  opacity: 1,
740
757
  pointerEvents: "none",
741
- backgroundColor: odysseyTokens.HueNeutral50,
758
+ backgroundColor: odysseyTokens.HueNeutral200,
742
759
  color: odysseyTokens.TypographyColorDisabled
743
760
  },
744
761
  ...(ownerState.clickable && {
@@ -841,7 +858,11 @@ export const components = _ref => {
841
858
  };
842
859
  },
843
860
  label: {
844
- padding: 0
861
+ padding: 0,
862
+ [`.${inputBaseClasses.root}.${inputBaseClasses.disabled} &`]: {
863
+ color: odysseyTokens.TypographyColorDisabled,
864
+ WebkitTextFillColor: odysseyTokens.TypographyColorDisabled
865
+ }
845
866
  },
846
867
  deleteIcon: {
847
868
  WebkitTapHighlightColor: "transparent",
@@ -868,20 +889,20 @@ export const components = _ref => {
868
889
  variant: "indeterminate"
869
890
  },
870
891
  styleOverrides: {
871
- root: _ref14 => {
892
+ root: _ref15 => {
872
893
  let {
873
894
  ownerState
874
- } = _ref14;
895
+ } = _ref15;
875
896
  return {
876
897
  ...(ownerState.color !== "inherit" && {
877
898
  color: odysseyTokens.PalettePrimaryDark
878
899
  })
879
900
  };
880
901
  },
881
- circle: _ref15 => {
902
+ circle: _ref16 => {
882
903
  let {
883
904
  ownerState
884
- } = _ref15;
905
+ } = _ref16;
885
906
  return {
886
907
  ...(ownerState.variant === "indeterminate" && {
887
908
  strokeDasharray: "160%, 360%"
@@ -1210,10 +1231,10 @@ export const components = _ref => {
1210
1231
  },
1211
1232
  MuiDialogContent: {
1212
1233
  styleOverrides: {
1213
- root: _ref16 => {
1234
+ root: _ref17 => {
1214
1235
  let {
1215
1236
  ownerState
1216
- } = _ref16;
1237
+ } = _ref17;
1217
1238
  return {
1218
1239
  paddingBlock: 0,
1219
1240
  paddingInline: odysseyTokens.Spacing6,
@@ -1266,10 +1287,10 @@ export const components = _ref => {
1266
1287
  margin: "normal"
1267
1288
  },
1268
1289
  styleOverrides: {
1269
- root: _ref17 => {
1290
+ root: _ref18 => {
1270
1291
  let {
1271
1292
  ownerState
1272
- } = _ref17;
1293
+ } = _ref18;
1273
1294
  return {
1274
1295
  width: "100%",
1275
1296
  maxWidth: odysseyTokens.TypographyLineLengthMax,
@@ -1296,10 +1317,10 @@ export const components = _ref => {
1296
1317
  },
1297
1318
  MuiFormControlLabel: {
1298
1319
  styleOverrides: {
1299
- root: _ref18 => {
1320
+ root: _ref19 => {
1300
1321
  let {
1301
1322
  ownerState
1302
- } = _ref18;
1323
+ } = _ref19;
1303
1324
  return {
1304
1325
  gap: odysseyTokens.Spacing2,
1305
1326
  marginInlineStart: 0,
@@ -1404,10 +1425,10 @@ export const components = _ref => {
1404
1425
  },
1405
1426
  MuiInputAdornment: {
1406
1427
  styleOverrides: {
1407
- root: _ref19 => {
1428
+ root: _ref20 => {
1408
1429
  let {
1409
1430
  ownerState
1410
- } = _ref19;
1431
+ } = _ref20;
1411
1432
  return {
1412
1433
  display: "flex",
1413
1434
  minWidth: "1.25em",
@@ -1434,11 +1455,11 @@ export const components = _ref => {
1434
1455
  minRows: 3
1435
1456
  },
1436
1457
  styleOverrides: {
1437
- root: _ref20 => {
1458
+ root: _ref21 => {
1438
1459
  let {
1439
1460
  ownerState,
1440
1461
  theme
1441
- } = _ref20;
1462
+ } = _ref21;
1442
1463
  return {
1443
1464
  ...theme.typography.body1,
1444
1465
  flex: "1",
@@ -1529,10 +1550,10 @@ export const components = _ref => {
1529
1550
  shrink: false
1530
1551
  },
1531
1552
  styleOverrides: {
1532
- root: _ref21 => {
1553
+ root: _ref22 => {
1533
1554
  let {
1534
1555
  ownerState
1535
- } = _ref21;
1556
+ } = _ref22;
1536
1557
  return {
1537
1558
  display: "flex",
1538
1559
  justifyContent: "space-between",
@@ -1654,10 +1675,10 @@ export const components = _ref => {
1654
1675
  },
1655
1676
  MuiMenuItem: {
1656
1677
  styleOverrides: {
1657
- root: _ref22 => {
1678
+ root: _ref23 => {
1658
1679
  let {
1659
1680
  ownerState
1660
- } = _ref22;
1681
+ } = _ref23;
1661
1682
  return {
1662
1683
  gap: odysseyTokens.Spacing2,
1663
1684
  minHeight: "unset",
@@ -1722,7 +1743,7 @@ export const components = _ref => {
1722
1743
  },
1723
1744
  MuiModal: {
1724
1745
  defaultProps: {
1725
- container: shadowRootElement
1746
+ container: shadowDomElement
1726
1747
  }
1727
1748
  },
1728
1749
  MuiNativeSelect: {
@@ -1757,7 +1778,7 @@ export const components = _ref => {
1757
1778
  },
1758
1779
  MuiPopover: {
1759
1780
  defaultProps: {
1760
- container: shadowRootElement
1781
+ container: shadowDomElement
1761
1782
  },
1762
1783
  styleOverrides: {
1763
1784
  paper: {
@@ -1770,7 +1791,7 @@ export const components = _ref => {
1770
1791
  },
1771
1792
  MuiPopper: {
1772
1793
  defaultProps: {
1773
- container: shadowRootElement
1794
+ container: shadowDomElement
1774
1795
  }
1775
1796
  },
1776
1797
  MuiRadio: {
@@ -1780,10 +1801,10 @@ export const components = _ref => {
1780
1801
  checkedIcon: _jsx(_Fragment, {})
1781
1802
  },
1782
1803
  styleOverrides: {
1783
- root: _ref23 => {
1804
+ root: _ref24 => {
1784
1805
  let {
1785
1806
  theme
1786
- } = _ref23;
1807
+ } = _ref24;
1787
1808
  return {
1788
1809
  width: `${odysseyTokens.TypographyLineHeightUi}em`,
1789
1810
  height: `${odysseyTokens.TypographyLineHeightUi}em`,
@@ -1906,10 +1927,10 @@ export const components = _ref => {
1906
1927
  color: "inherit"
1907
1928
  },
1908
1929
  styleOverrides: {
1909
- root: _ref24 => {
1930
+ root: _ref25 => {
1910
1931
  let {
1911
1932
  ownerState
1912
- } = _ref24;
1933
+ } = _ref25;
1913
1934
  return {
1914
1935
  fontSize: `${odysseyTokens.TypographyLineHeightUi}rem`,
1915
1936
  ...(ownerState.fontSize === "small" && {
@@ -1927,25 +1948,24 @@ export const components = _ref => {
1927
1948
  iconPosition: "start"
1928
1949
  },
1929
1950
  styleOverrides: {
1930
- root: _ref25 => {
1951
+ root: _ref26 => {
1931
1952
  let {
1932
1953
  ownerState
1933
- } = _ref25;
1954
+ } = _ref26;
1934
1955
  return {
1935
1956
  maxWidth: `calc(${odysseyTokens.TypographyLineLengthMax} / 2)`,
1936
1957
  minWidth: "unset",
1937
1958
  minHeight: "unset",
1938
- padding: `${odysseyTokens.Spacing4} 0`,
1959
+ padding: `${odysseyTokens.Spacing4} ${odysseyTokens.Spacing1}`,
1960
+ fontSize: odysseyTokens.TypographySizeHeading6,
1939
1961
  fontFamily: odysseyTokens.TypographyFamilyHeading,
1940
1962
  lineHeight: odysseyTokens.TypographyLineHeightUi,
1941
1963
  overflow: "visible",
1942
- ...(ownerState.textColor === "inherit" && {
1943
- color: "inherit",
1944
- opacity: 1
1945
- }),
1964
+ color: odysseyTokens.HueNeutral600,
1965
+ opacity: 1,
1946
1966
  ...(ownerState.selected == true && {
1947
1967
  color: odysseyTokens.TypographyColorAction,
1948
- fontWeight: odysseyTokens.TypographyWeightBodyBold
1968
+ fontWeight: odysseyTokens.TypographyWeightHeading
1949
1969
  }),
1950
1970
  ...(ownerState.disabled && {
1951
1971
  color: odysseyTokens.TypographyColorDisabled
@@ -1985,10 +2005,10 @@ export const components = _ref => {
1985
2005
  },
1986
2006
  MuiTable: {
1987
2007
  styleOverrides: {
1988
- root: _ref26 => {
2008
+ root: _ref27 => {
1989
2009
  let {
1990
2010
  ownerState
1991
- } = _ref26;
2011
+ } = _ref27;
1992
2012
  return {
1993
2013
  display: "table",
1994
2014
  width: "auto",
@@ -2020,11 +2040,11 @@ export const components = _ref => {
2020
2040
  },
2021
2041
  MuiTableCell: {
2022
2042
  styleOverrides: {
2023
- root: _ref27 => {
2043
+ root: _ref28 => {
2024
2044
  let {
2025
2045
  theme,
2026
2046
  ownerState
2027
- } = _ref27;
2047
+ } = _ref28;
2028
2048
  return {
2029
2049
  ...theme.typography.body1,
2030
2050
  maxWidth: odysseyTokens.TypographyLineLengthMax,
@@ -2165,11 +2185,11 @@ export const components = _ref => {
2165
2185
  }
2166
2186
  }
2167
2187
  },
2168
- icon: _ref28 => {
2188
+ icon: _ref29 => {
2169
2189
  let {
2170
2190
  theme,
2171
2191
  ownerState
2172
- } = _ref28;
2192
+ } = _ref29;
2173
2193
  return {
2174
2194
  fontSize: "inherit",
2175
2195
  marginInlineEnd: 0,
@@ -2219,10 +2239,10 @@ export const components = _ref => {
2219
2239
  placement: "top"
2220
2240
  },
2221
2241
  styleOverrides: {
2222
- tooltip: _ref29 => {
2242
+ tooltip: _ref30 => {
2223
2243
  let {
2224
2244
  ownerState
2225
- } = _ref29;
2245
+ } = _ref30;
2226
2246
  return {
2227
2247
  maxWidth: `calc(${odysseyTokens.TypographyLineLengthMax} / 2)`,
2228
2248
  paddingBlock: odysseyTokens.Spacing2,