@okta/odyssey-react-mui 0.14.6 → 0.15.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/Icon/Add.js.map +1 -1
  3. package/dist/components/Icon/AddCircle.js.map +1 -1
  4. package/dist/components/Icon/AlertCircle.js.map +1 -1
  5. package/dist/components/Icon/AlertCircleFilled.js.map +1 -1
  6. package/dist/components/Icon/AlertTriangleFilled.js.map +1 -1
  7. package/dist/components/Icon/Anchor.js.map +1 -1
  8. package/dist/components/Icon/ArrowDown.js.map +1 -1
  9. package/dist/components/Icon/ArrowLeft.js.map +1 -1
  10. package/dist/components/Icon/ArrowRight.js.map +1 -1
  11. package/dist/components/Icon/ArrowUp.js.map +1 -1
  12. package/dist/components/Icon/ArrowUpDown.d.ts +16 -0
  13. package/dist/components/Icon/ArrowUpDown.d.ts.map +1 -0
  14. package/dist/components/Icon/ArrowUpDown.js +34 -0
  15. package/dist/components/Icon/ArrowUpDown.js.map +1 -0
  16. package/dist/components/Icon/Calendar.js.map +1 -1
  17. package/dist/components/Icon/Check.js.map +1 -1
  18. package/dist/components/Icon/CheckCircleFilled.js.map +1 -1
  19. package/dist/components/Icon/ChevronDown.js.map +1 -1
  20. package/dist/components/Icon/ChevronUp.js.map +1 -1
  21. package/dist/components/Icon/Close.js.map +1 -1
  22. package/dist/components/Icon/CloseCircleFilled.js.map +1 -1
  23. package/dist/components/Icon/Copy.js.map +1 -1
  24. package/dist/components/Icon/Delete.js.map +1 -1
  25. package/dist/components/Icon/Download.js.map +1 -1
  26. package/dist/components/Icon/DragHandle.js.map +1 -1
  27. package/dist/components/Icon/Edit.js.map +1 -1
  28. package/dist/components/Icon/ExternalLink.js.map +1 -1
  29. package/dist/components/Icon/Eye.js.map +1 -1
  30. package/dist/components/Icon/EyeOff.js.map +1 -1
  31. package/dist/components/Icon/Filter.js.map +1 -1
  32. package/dist/components/Icon/Globe.js.map +1 -1
  33. package/dist/components/Icon/Home.js.map +1 -1
  34. package/dist/components/Icon/Icon.js +6 -5
  35. package/dist/components/Icon/Icon.js.map +1 -1
  36. package/dist/components/Icon/InformationCircle.js.map +1 -1
  37. package/dist/components/Icon/InformationCircleFilled.js.map +1 -1
  38. package/dist/components/Icon/Notification.js.map +1 -1
  39. package/dist/components/Icon/OverflowVertical.js.map +1 -1
  40. package/dist/components/Icon/QuestionCircle.js.map +1 -1
  41. package/dist/components/Icon/QuestionCircleFilled.js.map +1 -1
  42. package/dist/components/Icon/Search.js.map +1 -1
  43. package/dist/components/Icon/Settings.js.map +1 -1
  44. package/dist/components/Icon/Subtract.js.map +1 -1
  45. package/dist/components/Icon/SvgIcon.js.map +1 -1
  46. package/dist/components/Icon/User.js.map +1 -1
  47. package/dist/components/Icon/UserGroup.d.ts +16 -0
  48. package/dist/components/Icon/UserGroup.d.ts.map +1 -0
  49. package/dist/components/Icon/UserGroup.js +34 -0
  50. package/dist/components/Icon/UserGroup.js.map +1 -0
  51. package/dist/components/Icon/index.d.ts +4 -0
  52. package/dist/components/Icon/index.d.ts.map +1 -1
  53. package/dist/components/Icon/index.js +6 -0
  54. package/dist/components/Icon/index.js.map +1 -1
  55. package/dist/components/Icon/types.js.map +1 -1
  56. package/dist/components/Link/Link.js.map +1 -1
  57. package/dist/components/Link/index.js.map +1 -1
  58. package/dist/components/PasswordInput/PasswordInput.js +1 -3
  59. package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
  60. package/dist/components/PasswordInput/index.js.map +1 -1
  61. package/dist/components/index.js.map +1 -1
  62. package/dist/index.js.map +1 -1
  63. package/dist/themes/index.js.map +1 -1
  64. package/dist/themes/odyssey/components.d.ts.map +1 -1
  65. package/dist/themes/odyssey/components.js +987 -577
  66. package/dist/themes/odyssey/components.js.map +1 -1
  67. package/dist/themes/odyssey/components.types.d.ts +10 -1
  68. package/dist/themes/odyssey/components.types.d.ts.map +1 -1
  69. package/dist/themes/odyssey/components.types.js.map +1 -1
  70. package/dist/themes/odyssey/index.js.map +1 -1
  71. package/dist/themes/odyssey/mixins.js.map +1 -1
  72. package/dist/themes/odyssey/mixins.types.js.map +1 -1
  73. package/dist/themes/odyssey/palette.js.map +1 -1
  74. package/dist/themes/odyssey/palette.types.js.map +1 -1
  75. package/dist/themes/odyssey/shape.js.map +1 -1
  76. package/dist/themes/odyssey/spacing.js.map +1 -1
  77. package/dist/themes/odyssey/theme.js.map +1 -1
  78. package/dist/themes/odyssey/typography.d.ts.map +1 -1
  79. package/dist/themes/odyssey/typography.js +14 -9
  80. package/dist/themes/odyssey/typography.js.map +1 -1
  81. package/dist/themes/odyssey/typography.types.d.ts +9 -5
  82. package/dist/themes/odyssey/typography.types.d.ts.map +1 -1
  83. package/dist/themes/odyssey/typography.types.js +11 -0
  84. package/dist/themes/odyssey/typography.types.js.map +1 -1
  85. package/dist/utils/index.js.map +1 -1
  86. package/dist/utils/oid.d.ts +1 -1
  87. package/dist/utils/oid.d.ts.map +1 -1
  88. package/dist/utils/oid.js.map +1 -1
  89. package/jest.config.cjs +1 -0
  90. package/package.json +4 -4
  91. package/src/components/Icon/ArrowUpDown.tsx +44 -0
  92. package/src/components/Icon/UserGroup.tsx +44 -0
  93. package/src/components/Icon/index.tsx +8 -0
  94. package/src/themes/odyssey/{components.ts → components.tsx} +308 -17
  95. package/src/themes/odyssey/components.types.ts +11 -1
  96. package/src/themes/odyssey/typography.ts +13 -8
  97. package/src/themes/odyssey/typography.types.ts +12 -7
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts"],"names":["oid","useOid"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;SAESA,G,EAAKC,M","sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { oid, useOid } from \"./oid\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["oid","useOid"],"sources":["../../src/utils/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { oid, useOid } from \"./oid\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;SAESA,G,EAAKC,M"}
@@ -11,5 +11,5 @@
11
11
  */
12
12
  export declare const length = 6;
13
13
  export declare const oid: () => string;
14
- export declare const useOid: (id?: string | undefined) => string;
14
+ export declare const useOid: (id?: string) => string;
15
15
  //# sourceMappingURL=oid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oid.d.ts","sourceRoot":"","sources":["../../src/utils/oid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,MAAM,IAAI,CAAC;AAExB,eAAO,MAAM,GAAG,QAAO,MAAmD,CAAC;AAE3E,eAAO,MAAM,MAAM,+BAAkB,MAGpC,CAAC"}
1
+ {"version":3,"file":"oid.d.ts","sourceRoot":"","sources":["../../src/utils/oid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,MAAM,IAAI,CAAC;AAExB,eAAO,MAAM,GAAG,QAAO,MAAmD,CAAC;AAE3E,eAAO,MAAM,MAAM,QAAS,MAAM,KAAG,MAGpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/oid.ts"],"names":["useMemo","length","oid","Math","random","toString","slice","useOid","id","_oid"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,OAAT,QAAwB,OAAxB;AAEA,OAAO,MAAMC,MAAM,GAAG,CAAf;AAEP,OAAO,MAAMC,GAAG,GAAG,MAAcC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,KAA3B,CAAiC,CAACL,MAAlC,CAA1B;AAEP,OAAO,MAAMM,MAAM,GAAIC,EAAD,IAAyB;AAC7C,QAAMC,IAAI,GAAGT,OAAO,CAACE,GAAD,EAAM,CAACA,GAAD,CAAN,CAApB;;AACA,SAAOM,EAAE,IAAIC,IAAb;AACD,CAHM","sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nexport const length = 6;\n\nexport const oid = (): string => Math.random().toString(36).slice(-length);\n\nexport const useOid = (id?: string): string => {\n const _oid = useMemo(oid, [oid]);\n return id || _oid;\n};\n"],"file":"oid.js"}
1
+ {"version":3,"file":"oid.js","names":["useMemo","length","oid","Math","random","toString","slice","useOid","id","_oid"],"sources":["../../src/utils/oid.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nexport const length = 6;\n\nexport const oid = (): string => Math.random().toString(36).slice(-length);\n\nexport const useOid = (id?: string): string => {\n const _oid = useMemo(oid, [oid]);\n return id || _oid;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,OAAT,QAAwB,OAAxB;AAEA,OAAO,MAAMC,MAAM,GAAG,CAAf;AAEP,OAAO,MAAMC,GAAG,GAAG,MAAcC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,KAA3B,CAAiC,CAACL,MAAlC,CAA1B;AAEP,OAAO,MAAMM,MAAM,GAAIC,EAAD,IAAyB;EAC7C,MAAMC,IAAI,GAAGT,OAAO,CAACE,GAAD,EAAM,CAACA,GAAD,CAAN,CAApB;;EACA,OAAOM,EAAE,IAAIC,IAAb;AACD,CAHM"}
package/jest.config.cjs CHANGED
@@ -12,4 +12,5 @@
12
12
 
13
13
  module.exports = {
14
14
  setupFilesAfterEnv: ["./jest.setup.js"],
15
+ testEnvironment: "jsdom",
15
16
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "0.14.6",
3
+ "version": "0.15.1",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
7
+ "sideEffects": false,
7
8
  "main": "dist/index.js",
8
9
  "module": "dist/index.js",
9
10
  "types": "dist/index.d.ts",
10
- "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
13
  "default": "./dist/index.js"
@@ -19,7 +19,7 @@
19
19
  "directory": "packages/odyssey-react-mui"
20
20
  },
21
21
  "dependencies": {
22
- "@okta/odyssey-design-tokens": "^0.14.6"
22
+ "@okta/odyssey-design-tokens": "^0.15.1"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@emotion/react": "^11",
@@ -29,5 +29,5 @@
29
29
  "react": ">=17 <19",
30
30
  "react-dom": ">=17 <19"
31
31
  },
32
- "gitHead": "bc451562d0c3345c720d93a7d65b1774a155a150"
32
+ "gitHead": "ae87e24beead8b4eaafb35d9fd0e3597c50104dc"
33
33
  }
@@ -0,0 +1,44 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Code automatically generated by svgr; DO NOT EDIT.
14
+
15
+ import { forwardRef } from "react";
16
+ import { SvgIcon } from "./SvgIcon";
17
+ import type { SvgIconNoChildrenProps } from "./types";
18
+
19
+ export type ArrowUpDownIconProps = SvgIconNoChildrenProps;
20
+
21
+ export const ArrowUpDownIcon = forwardRef<SVGSVGElement, ArrowUpDownIconProps>(
22
+ (props, ref) => {
23
+ return (
24
+ <SvgIcon
25
+ viewBox="0 0 16 16"
26
+ fill="none"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ ref={ref}
29
+ {...props}
30
+ >
31
+ <>
32
+ <path
33
+ fillRule="evenodd"
34
+ clipRule="evenodd"
35
+ d="M5.00001 12V3.70711L7.64645 6.35355L8.35356 5.64645L4.85356 2.14645C4.6583 1.95118 4.34172 1.95118 4.14646 2.14645L0.646454 5.64645L1.35356 6.35355L4.00001 3.70711L4.00001 12H5.00001ZM11 4L11 12.2929L8.35357 9.64644L7.64647 10.3536L11.1465 13.8536C11.3417 14.0488 11.6583 14.0488 11.8536 13.8536L15.3536 10.3536L14.6465 9.64644L12 12.2929L12 4L11 4Z"
36
+ fill="currentColor"
37
+ />
38
+ </>
39
+ </SvgIcon>
40
+ );
41
+ }
42
+ );
43
+
44
+ ArrowUpDownIcon.displayName = "ArrowUpDownIcon";
@@ -0,0 +1,44 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ // Code automatically generated by svgr; DO NOT EDIT.
14
+
15
+ import { forwardRef } from "react";
16
+ import { SvgIcon } from "./SvgIcon";
17
+ import type { SvgIconNoChildrenProps } from "./types";
18
+
19
+ export type UserGroupIconProps = SvgIconNoChildrenProps;
20
+
21
+ export const UserGroupIcon = forwardRef<SVGSVGElement, UserGroupIconProps>(
22
+ (props, ref) => {
23
+ return (
24
+ <SvgIcon
25
+ viewBox="0 0 16 16"
26
+ fill="none"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ ref={ref}
29
+ {...props}
30
+ >
31
+ <>
32
+ <path
33
+ fillRule="evenodd"
34
+ clipRule="evenodd"
35
+ d="M12 4V3C12 2.44772 11.5523 2 11 2C10.4477 2 10 2.44772 10 3V4C10 4.55228 10.4477 5 11 5C11.5523 5 12 4.55228 12 4ZM11 1C9.89543 1 9 1.89543 9 3V4C9 5.10457 9.89543 6 11 6C12.1046 6 13 5.10457 13 4V3C13 1.89543 12.1046 1 11 1ZM13.4507 9.70979C13.3461 9.25176 13.2788 8.96046 13.2112 8.74017C13.1473 8.53193 13.1019 8.45367 13.0716 8.41204L13.8805 7.82408C14.1212 8.15524 14.2227 8.59915 14.4256 9.48696L14.7714 11L15 12H13.9742H8.31292C8.34765 12.146 8.38455 12.3074 8.42559 12.487L8.77143 14L9 15H7.97421H2.02579H1L1.22857 14L1.57441 12.487C1.77734 11.5991 1.8788 11.1552 2.11952 10.8241C2.33185 10.532 2.61932 10.3028 2.95142 10.1609C3.32789 10 3.78325 10 4.69396 10H5.30604C6.21675 10 6.67211 10 7.04858 10.1609C7.16471 10.2105 7.27538 10.2708 7.37928 10.3407L7.57443 9.48696C7.77735 8.59915 7.87882 8.15524 8.11953 7.82408C8.33187 7.53195 8.61934 7.30278 8.95143 7.16087C9.32791 7 9.78326 7 10.694 7H11.3061C12.2168 7 12.6721 7 13.0486 7.16087C13.3807 7.30278 13.6682 7.53195 13.8805 7.82408L13.0716 8.41204C12.9654 8.26598 12.8217 8.15139 12.6557 8.08044C12.6083 8.06021 12.5219 8.03334 12.3047 8.01744C12.0748 8.00062 11.7759 8 11.3061 8H10.694C10.2241 8 9.92519 8.00062 9.69536 8.01744C9.47812 8.03334 9.3917 8.06021 9.34437 8.08044C9.17833 8.15139 9.03459 8.26598 8.92842 8.41204C8.89816 8.45367 8.85271 8.53193 8.7888 8.74017C8.72119 8.96047 8.65397 9.25177 8.54928 9.70979L8.25438 11H13.7457L13.4681 9.78588L13.4507 9.70979ZM6 7V6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6V7C4 7.55228 4.44772 8 5 8C5.55228 8 6 7.55228 6 7ZM5 4C3.89543 4 3 4.89543 3 6V7C3 8.10457 3.89543 9 5 9C6.10457 9 7 8.10457 7 7V6C7 4.89543 6.10457 4 5 4ZM5.30604 11H4.69396C4.22413 11 3.92517 11.0006 3.69534 11.0174C3.4781 11.0333 3.39168 11.0602 3.34436 11.0804C3.17831 11.1514 3.03457 11.266 2.92841 11.412C2.89815 11.4537 2.85269 11.5319 2.78879 11.7402C2.72118 11.9605 2.65396 12.2518 2.54927 12.7098L2.25436 14H7.74564L7.45073 12.7098C7.34604 12.2518 7.27882 11.9605 7.21122 11.7402C7.14731 11.5319 7.10185 11.4537 7.0716 11.412C6.96543 11.266 6.82169 11.1514 6.65565 11.0804C6.60832 11.0602 6.5219 11.0333 6.30466 11.0174C6.07483 11.0006 5.77587 11 5.30604 11Z"
36
+ fill="currentColor"
37
+ />
38
+ </>
39
+ </SvgIcon>
40
+ );
41
+ }
42
+ );
43
+
44
+ UserGroupIcon.displayName = "UserGroupIcon";
@@ -41,6 +41,9 @@ export * from "./ArrowLeft";
41
41
  import { ArrowRightIcon } from "./ArrowRight";
42
42
  export * from "./ArrowRight";
43
43
 
44
+ import { ArrowUpDownIcon } from "./ArrowUpDown";
45
+ export * from "./ArrowUpDown";
46
+
44
47
  import { ArrowUpIcon } from "./ArrowUp";
45
48
  export * from "./ArrowUp";
46
49
 
@@ -125,6 +128,9 @@ export * from "./Settings";
125
128
  import { SubtractIcon } from "./Subtract";
126
129
  export * from "./Subtract";
127
130
 
131
+ import { UserGroupIcon } from "./UserGroup";
132
+ export * from "./UserGroup";
133
+
128
134
  import { UserIcon } from "./User";
129
135
  export * from "./User";
130
136
 
@@ -138,6 +144,7 @@ export const iconDictionary = {
138
144
  "arrow-down": ArrowDownIcon,
139
145
  "arrow-left": ArrowLeftIcon,
140
146
  "arrow-right": ArrowRightIcon,
147
+ "arrow-up-down": ArrowUpDownIcon,
141
148
  "arrow-up": ArrowUpIcon,
142
149
  calendar: CalendarIcon,
143
150
  "check-circle-filled": CheckCircleFilledIcon,
@@ -166,5 +173,6 @@ export const iconDictionary = {
166
173
  search: SearchIcon,
167
174
  settings: SettingsIcon,
168
175
  subtract: SubtractIcon,
176
+ "user-group": UserGroupIcon,
169
177
  user: UserIcon,
170
178
  };
@@ -13,9 +13,28 @@
13
13
  import type { ThemeOptions } from "@mui/material";
14
14
  //import radioClasses from "@mui/material";
15
15
  import { outlinedInputClasses } from "@mui/material/OutlinedInput";
16
+ import { tableBodyClasses } from "@mui/material/TableBody";
17
+ import { tableCellClasses } from "@mui/material/TableCell";
18
+ import { tableHeadClasses } from "@mui/material/TableHead";
19
+ import { tableRowClasses } from "@mui/material/TableRow";
20
+ import { tableSortLabelClasses } from "@mui/material/TableSortLabel";
21
+ import {
22
+ AlertTriangleFilledIcon,
23
+ ArrowDownIcon,
24
+ CheckCircleFilledIcon,
25
+ InformationCircleFilledIcon,
26
+ } from "../../components/Icon";
16
27
 
17
28
  export const components: ThemeOptions["components"] = {
18
29
  MuiAlert: {
30
+ defaultProps: {
31
+ iconMapping: {
32
+ error: <AlertTriangleFilledIcon />,
33
+ info: <InformationCircleFilledIcon />,
34
+ success: <CheckCircleFilledIcon />,
35
+ warning: <AlertTriangleFilledIcon />,
36
+ },
37
+ },
19
38
  styleOverrides: {
20
39
  root: ({ ownerState, theme }) => ({
21
40
  padding: theme.spacing(4),
@@ -82,7 +101,8 @@ export const components: ThemeOptions["components"] = {
82
101
  }),
83
102
  message: ({ ownerState, theme }) => ({
84
103
  padding: 0,
85
- lineHeight: theme.typography.body.lineHeight,
104
+ lineHeight: theme.typography.body1.lineHeight,
105
+ overflow: "visible",
86
106
  ...(ownerState.variant === "banner" && {
87
107
  display: "flex",
88
108
  justifyContent: "space-between",
@@ -90,9 +110,6 @@ export const components: ThemeOptions["components"] = {
90
110
  }),
91
111
  ...(ownerState.variant === "toast" && {
92
112
  flexGrow: 1,
93
- paddingRight: `calc((${theme.spacing(1)} * 2) + ${
94
- theme.typography.body.fontSize
95
- } + ${theme.spacing(4)})`,
96
113
  }),
97
114
  }),
98
115
  },
@@ -260,6 +277,7 @@ export const components: ThemeOptions["components"] = {
260
277
  styleOverrides: {
261
278
  root: ({ theme }) => ({
262
279
  fontWeight: 600,
280
+ minWidth: "unset",
263
281
  padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
264
282
  display: "inline-block",
265
283
  position: "relative",
@@ -269,15 +287,15 @@ export const components: ThemeOptions["components"] = {
269
287
  "color, background-color, border-color, outline-offset, outline-color",
270
288
  transitionDuration: "100ms",
271
289
  transitionTimingFunction: "linear",
272
- borderWidth: "1px",
273
- borderStyle: "solid",
290
+ borderWidth: theme.mixins.borderWidth,
291
+ borderStyle: theme.mixins.borderStyle,
274
292
  outlineColor: "transparent",
275
293
  outlineOffset: "0",
276
- fontSize: "1rem",
294
+ fontSize: theme.typography.body1.fontSize,
277
295
  lineHeight: "1.14285714",
278
296
  whiteSpace: "nowrap",
279
297
 
280
- "& + &": {
298
+ ".MuiButton-root + &": {
281
299
  marginInlineStart: theme.spacing(2),
282
300
  },
283
301
 
@@ -364,17 +382,26 @@ export const components: ThemeOptions["components"] = {
364
382
  },
365
383
  },
366
384
  MuiFormControl: {
385
+ defaultProps: {
386
+ margin: "normal",
387
+ },
367
388
  styleOverrides: {
368
389
  root: ({ ownerState, theme }) => ({
369
390
  width: "100%",
370
391
  maxWidth: "32rem",
371
392
  ...(ownerState.margin === "normal" && {
372
393
  marginTop: 0,
373
- marginBottom: theme.spacing(4),
394
+ marginBottom: theme.spacing(5),
395
+ "&:last-child": {
396
+ marginBottom: 0,
397
+ },
374
398
  }),
375
399
  ...(ownerState.margin === "dense" && {
376
400
  marginTop: 0,
377
- marginBottom: theme.spacing(4),
401
+ marginBottom: theme.spacing(5),
402
+ "&:last-child": {
403
+ marginBottom: 0,
404
+ },
378
405
  }),
379
406
  ...(ownerState.fullWidth && {
380
407
  maxWidth: "100%",
@@ -462,7 +489,28 @@ export const components: ThemeOptions["components"] = {
462
489
  styleOverrides: {
463
490
  root: ({ theme }) => ({
464
491
  padding: theme.spacing(1),
465
- fontSize: theme.typography.body.fontSize,
492
+ fontSize: theme.typography.body1.fontSize,
493
+ backgroundColor: "transparent",
494
+ color: theme.palette.text.primary,
495
+ borderColor: "transparent",
496
+ borderRadius: theme.mixins.borderRadius,
497
+
498
+ "&:hover, &:focus-visible": {
499
+ backgroundColor: "rgba(29, 29, 33, 0.1)",
500
+ borderColor: "transparent",
501
+ },
502
+ "&:focus-visible": {
503
+ outlineColor: theme.palette.primary.main,
504
+ },
505
+ "&:active": {
506
+ backgroundColor: "rgba(29, 29, 33, 0.2)",
507
+ borderColor: "transparent",
508
+ },
509
+ "&:disabled": {
510
+ backgroundColor: "rgba(235, 235, 237, 0.6)",
511
+ color: theme.palette.text.secondary,
512
+ borderColor: "transparent",
513
+ },
466
514
  }),
467
515
  },
468
516
  },
@@ -484,9 +532,13 @@ export const components: ThemeOptions["components"] = {
484
532
  },
485
533
  MuiInputBase: {
486
534
  styleOverrides: {
487
- root: {
535
+ root: ({ ownerState, theme }) => ({
488
536
  lineHeight: "1.14285714",
489
- },
537
+
538
+ ...(ownerState.readOnly === true && {
539
+ backgroundColor: theme.palette.grey[50],
540
+ }),
541
+ }),
490
542
  input: {
491
543
  boxSizing: "border-box",
492
544
  height: "auto",
@@ -626,10 +678,11 @@ export const components: ThemeOptions["components"] = {
626
678
  [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]:
627
679
  {
628
680
  borderColor: theme.palette.action.disabled,
681
+ pointerEvents: "auto",
629
682
  },
630
683
  [`&.${outlinedInputClasses.disabled}`]: {
631
684
  backgroundColor: theme.palette.grey[50],
632
- pointerEvents: "none",
685
+ cursor: "not-allowed",
633
686
  },
634
687
  ...(ownerState.startAdornment && {
635
688
  paddingLeft: theme.spacing(3),
@@ -688,6 +741,12 @@ export const components: ThemeOptions["components"] = {
688
741
  },
689
742
  },
690
743
  },
744
+ MuiSvgIcon: {
745
+ defaultProps: {
746
+ fontSize: "inherit",
747
+ color: "inherit",
748
+ },
749
+ },
691
750
  MuiTab: {
692
751
  defaultProps: {
693
752
  iconPosition: "start",
@@ -698,7 +757,7 @@ export const components: ThemeOptions["components"] = {
698
757
  minWidth: "unset",
699
758
  minHeight: "unset",
700
759
  padding: `${theme.spacing(4)} 0`,
701
- lineHeight: theme.typography.body.lineHeight,
760
+ lineHeight: theme.typography.body1.lineHeight,
702
761
  overflow: "visible",
703
762
  ...(ownerState.selected == true && {
704
763
  color: theme.palette.text.primary,
@@ -708,8 +767,8 @@ export const components: ThemeOptions["components"] = {
708
767
  opacity: 1,
709
768
  }),
710
769
  ...(ownerState.wrapped && {
711
- fontSize: theme.typography.caption.fontSize,
712
- lineHeight: theme.typography.caption.lineHeight,
770
+ fontSize: theme.typography.subtitle1.fontSize,
771
+ lineHeight: theme.typography.subtitle1.lineHeight,
713
772
  }),
714
773
  "&:hover": {
715
774
  color: theme.palette.primary.main,
@@ -743,6 +802,209 @@ export const components: ThemeOptions["components"] = {
743
802
  }),
744
803
  },
745
804
  },
805
+ MuiTable: {
806
+ styleOverrides: {
807
+ root: ({ theme, ownerState }) => ({
808
+ display: "table",
809
+ width: "auto",
810
+ borderCollapse: "separate",
811
+ borderSpacing: 0,
812
+ border: `${theme.mixins.borderWidth} ${theme.mixins.borderStyle} ${theme.palette.grey[100]}`,
813
+ borderRadius: theme.mixins.borderRadius,
814
+ marginBlock: theme.spacing(0),
815
+ marginInline: theme.spacing(0),
816
+ lineHeight: "1.14285714",
817
+
818
+ "&:only-child": {
819
+ marginBlockEnd: 0,
820
+ },
821
+
822
+ ...(ownerState.stickyHeader && {
823
+ borderCollapse: "separate",
824
+ }),
825
+ }),
826
+ },
827
+ },
828
+ MuiTableCell: {
829
+ styleOverrides: {
830
+ root: ({ theme, ownerState }) => ({
831
+ ...theme.typography.body1,
832
+ maxWidth: theme.mixins.maxWidth,
833
+ borderBottom: `${theme.mixins.borderWidth} ${theme.mixins.borderStyle} ${theme.palette.grey[100]}`,
834
+ textAlign: "start",
835
+ verticalAlign: "baseline",
836
+ padding: "unset",
837
+ paddingBlock: theme.spacing(4),
838
+ paddingInline: theme.spacing(4),
839
+ overflowWrap: "break-word",
840
+
841
+ [`.${tableBodyClasses.root} .${tableRowClasses.root}:last-of-type &`]: {
842
+ borderBottom: 0,
843
+ },
844
+
845
+ [`.${tableRowClasses.selected} &`]: {
846
+ borderBottomColor: theme.palette.primary.light,
847
+ },
848
+
849
+ [`.${tableRowClasses.selected}:hover &`]: {
850
+ borderBottomColor: theme.palette.primary.main,
851
+ },
852
+
853
+ ...(ownerState.variant === "action" && {
854
+ paddingBlock: 0,
855
+ }),
856
+
857
+ ...(ownerState.variant === "body" && {
858
+ color: theme.palette.text.primary,
859
+ }),
860
+
861
+ ...(ownerState.variant === "date" && {
862
+ whiteSpace: "nowrap",
863
+ }),
864
+
865
+ ...(ownerState.variant === "footer" && {
866
+ color: theme.palette.text.secondary,
867
+ lineHeight: theme.typography.body1.lineHeight,
868
+ fontSize: theme.typography.body1.fontSize,
869
+ }),
870
+
871
+ [`.${tableHeadClasses.root} &`]: {
872
+ color: theme.palette.text.secondary,
873
+ lineHeight: theme.typography.body1.lineHeight,
874
+ fontWeight: theme.typography.fontWeightBold,
875
+ backgroundColor: theme.palette.grey[50],
876
+ },
877
+
878
+ ...(ownerState.variant === "head" && {
879
+ lineHeight: theme.typography.body1.lineHeight,
880
+ fontWeight: theme.typography.fontWeightBold,
881
+ }),
882
+
883
+ ...(ownerState.variant === "number" && {
884
+ textAlign: "right",
885
+ fontFeatureSettings: '"lnum", "tnum"',
886
+ }),
887
+
888
+ ...(ownerState.padding === "checkbox" && {
889
+ width: 48, // prevent the checkbox column from growing
890
+ padding: "0 0 0 4px",
891
+ }),
892
+
893
+ ...(ownerState.padding === "none" && {
894
+ padding: 0,
895
+ }),
896
+
897
+ ...(ownerState.align === "left" && {
898
+ textAlign: "left",
899
+ }),
900
+
901
+ ...(ownerState.align === "center" && {
902
+ textAlign: "center",
903
+ }),
904
+
905
+ ...(ownerState.align === "right" && {
906
+ textAlign: "right",
907
+ flexDirection: "row-reverse",
908
+ }),
909
+
910
+ ...(ownerState.align === "justify" && {
911
+ textAlign: "justify",
912
+ }),
913
+ }),
914
+ },
915
+ },
916
+ MuiTableContainer: {
917
+ styleOverrides: {
918
+ root: ({ theme }) => ({
919
+ width: "unset",
920
+ maxWidth: "100%",
921
+ marginBlockStart: theme.spacing(0),
922
+ marginBlockEnd: theme.spacing(4),
923
+ marginInline: 0,
924
+ overflowX: "auto",
925
+
926
+ "&:last-child": {
927
+ marginBlock: 0,
928
+ },
929
+ }),
930
+ },
931
+ },
932
+ MuiTableRow: {
933
+ styleOverrides: {
934
+ root: ({ theme }) => ({
935
+ verticalAlign: "unset",
936
+ [`&.${tableRowClasses.hover}:hover`]: {
937
+ backgroundColor: theme.palette.grey[50],
938
+ },
939
+ [`&.${tableRowClasses.selected}`]: {
940
+ backgroundColor: theme.palette.primary.lighter,
941
+ "&:hover": {
942
+ backgroundColor: theme.palette.primary.lighter,
943
+ },
944
+ },
945
+ }),
946
+ },
947
+ },
948
+ MuiTableSortLabel: {
949
+ defaultProps: {
950
+ IconComponent: ArrowDownIcon,
951
+ },
952
+ styleOverrides: {
953
+ root: ({ theme }) => ({
954
+ cursor: "pointer",
955
+ display: "inline-flex",
956
+ justifyContent: "flex-start",
957
+ flexDirection: "inherit",
958
+ alignItems: "center",
959
+ "&:focus-visible": {
960
+ color: theme.palette.text.primary,
961
+ outlineOffset: theme.spacing(4),
962
+ outlineStyle: "solid",
963
+ outlineWidth: "2px",
964
+ outlineColor: theme.palette.primary.main,
965
+ },
966
+ "&:hover": {
967
+ color: theme.palette.text.primary,
968
+ [`& .${tableSortLabelClasses.icon}`]: {
969
+ opacity: 1,
970
+ },
971
+ },
972
+ [`&.${tableSortLabelClasses.active}`]: {
973
+ color: theme.palette.text.secondary,
974
+ [`& .${tableSortLabelClasses.icon}`]: {
975
+ opacity: 1,
976
+ color: "inherit",
977
+ },
978
+ },
979
+ }),
980
+ icon: ({ theme, ownerState }) => ({
981
+ fontSize: "inherit",
982
+ marginRight: 0,
983
+ marginLeft: 0,
984
+ opacity: 0,
985
+ color: "inherit",
986
+ transition: theme.transitions.create(["opacity", "transform"], {
987
+ duration: theme.transitions.duration.shorter,
988
+ }),
989
+ userSelect: "none",
990
+
991
+ [`.${tableCellClasses.alignRight} &`]: {
992
+ marginInlineEnd: theme.spacing(2),
993
+ },
994
+
995
+ [`.${tableCellClasses.alignLeft} &`]: {
996
+ marginInlineStart: theme.spacing(2),
997
+ },
998
+
999
+ ...(ownerState.direction === "desc" && {
1000
+ transform: "rotate(0deg)",
1001
+ }),
1002
+ ...(ownerState.direction === "asc" && {
1003
+ transform: "rotate(180deg)",
1004
+ }),
1005
+ }),
1006
+ },
1007
+ },
746
1008
  MuiTabs: {
747
1009
  styleOverrides: {
748
1010
  root: ({ theme }) => ({
@@ -759,11 +1021,40 @@ export const components: ThemeOptions["components"] = {
759
1021
  defaultProps: {
760
1022
  fontFamily:
761
1023
  "'Public Sans', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Noto Sans Arabic', sans-serif",
1024
+ variantMapping: {
1025
+ h1: "h1",
1026
+ h2: "h2",
1027
+ h3: "h3",
1028
+ h4: "h4",
1029
+ h5: "h5",
1030
+ h6: "h6",
1031
+ subtitle1: "p",
1032
+ body1: "p",
1033
+ inherit: "p",
1034
+ kbd: "kbd",
1035
+ legend: "legend",
1036
+ },
762
1037
  },
763
1038
  styleOverrides: {
764
1039
  paragraph: ({ theme }) => ({
765
1040
  marginBottom: theme.spacing(4),
766
1041
  }),
1042
+ root: ({ theme, ownerState }) => ({
1043
+ ...(ownerState.variant === "kbd" && {
1044
+ display: "inline-block",
1045
+ minWidth: `calc(${theme.typography.subtitle1.fontSize} * ${theme.typography.h5.lineHeight})`,
1046
+ borderStyle: theme.mixins.borderStyle,
1047
+ borderWidth: theme.mixins.borderWidth,
1048
+ borderRadius: theme.mixins.borderRadius,
1049
+ borderColor: theme.palette.grey[200],
1050
+ backgroundColor: theme.palette.grey[50],
1051
+ padding: `calc(${theme.spacing(1)} / 2) ${theme.spacing(1)}`,
1052
+ fontSize: theme.typography.subtitle1.fontSize,
1053
+ fontWeight: theme.typography.fontWeightRegular,
1054
+ lineHeight: theme.typography.h5.lineHeight,
1055
+ boxShadow: `0 1px 1px 0 hsla(240, 6%, 12%, 0.05)`,
1056
+ }),
1057
+ }),
767
1058
  },
768
1059
  },
769
1060
  };
@@ -59,7 +59,6 @@ declare module "@mui/material/Link" {
59
59
  body1: false;
60
60
  body2: false;
61
61
  button: false;
62
- caption: false;
63
62
  h1: false;
64
63
  h2: false;
65
64
  h3: false;
@@ -89,4 +88,15 @@ declare module "@mui/material/Link" {
89
88
  }
90
89
  }
91
90
 
91
+ declare module "@mui/material/TableCell" {
92
+ interface TableCellPropsVariantOverrides {
93
+ action: true;
94
+ body: true;
95
+ date: true;
96
+ footer: true;
97
+ head: true;
98
+ number: true;
99
+ }
100
+ }
101
+
92
102
  export {};