@okta/odyssey-react-mui 0.14.2 → 0.14.5
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/.svgrrc.cjs +13 -0
- package/CHANGELOG.md +37 -0
- package/README.md +29 -0
- package/dist/components/Icon/Add.d.ts +16 -0
- package/dist/components/Icon/Add.d.ts.map +1 -0
- package/dist/components/Icon/Add.js +34 -0
- package/dist/components/Icon/Add.js.map +1 -0
- package/dist/components/Icon/AddCircle.d.ts +16 -0
- package/dist/components/Icon/AddCircle.d.ts.map +1 -0
- package/dist/components/Icon/AddCircle.js +34 -0
- package/dist/components/Icon/AddCircle.js.map +1 -0
- package/dist/components/Icon/AlertCircle.d.ts +16 -0
- package/dist/components/Icon/AlertCircle.d.ts.map +1 -0
- package/dist/components/Icon/AlertCircle.js +34 -0
- package/dist/components/Icon/AlertCircle.js.map +1 -0
- package/dist/components/Icon/AlertCircleFilled.d.ts +16 -0
- package/dist/components/Icon/AlertCircleFilled.d.ts.map +1 -0
- package/dist/components/Icon/AlertCircleFilled.js +34 -0
- package/dist/components/Icon/AlertCircleFilled.js.map +1 -0
- package/dist/components/Icon/AlertTriangleFilled.d.ts +16 -0
- package/dist/components/Icon/AlertTriangleFilled.d.ts.map +1 -0
- package/dist/components/Icon/AlertTriangleFilled.js +34 -0
- package/dist/components/Icon/AlertTriangleFilled.js.map +1 -0
- package/dist/components/Icon/Anchor.d.ts +16 -0
- package/dist/components/Icon/Anchor.d.ts.map +1 -0
- package/dist/components/Icon/Anchor.js +36 -0
- package/dist/components/Icon/Anchor.js.map +1 -0
- package/dist/components/Icon/ArrowDown.d.ts +16 -0
- package/dist/components/Icon/ArrowDown.d.ts.map +1 -0
- package/dist/components/Icon/ArrowDown.js +34 -0
- package/dist/components/Icon/ArrowDown.js.map +1 -0
- package/dist/components/Icon/ArrowLeft.d.ts +16 -0
- package/dist/components/Icon/ArrowLeft.d.ts.map +1 -0
- package/dist/components/Icon/ArrowLeft.js +34 -0
- package/dist/components/Icon/ArrowLeft.js.map +1 -0
- package/dist/components/Icon/ArrowRight.d.ts +16 -0
- package/dist/components/Icon/ArrowRight.d.ts.map +1 -0
- package/dist/components/Icon/ArrowRight.js +34 -0
- package/dist/components/Icon/ArrowRight.js.map +1 -0
- package/dist/components/Icon/ArrowUp.d.ts +16 -0
- package/dist/components/Icon/ArrowUp.d.ts.map +1 -0
- package/dist/components/Icon/ArrowUp.js +34 -0
- package/dist/components/Icon/ArrowUp.js.map +1 -0
- package/dist/components/Icon/Calendar.d.ts +16 -0
- package/dist/components/Icon/Calendar.d.ts.map +1 -0
- package/dist/components/Icon/Calendar.js +34 -0
- package/dist/components/Icon/Calendar.js.map +1 -0
- package/dist/components/Icon/Check.d.ts +16 -0
- package/dist/components/Icon/Check.d.ts.map +1 -0
- package/dist/components/Icon/Check.js +34 -0
- package/dist/components/Icon/Check.js.map +1 -0
- package/dist/components/Icon/CheckCircleFilled.d.ts +16 -0
- package/dist/components/Icon/CheckCircleFilled.d.ts.map +1 -0
- package/dist/components/Icon/CheckCircleFilled.js +34 -0
- package/dist/components/Icon/CheckCircleFilled.js.map +1 -0
- package/dist/components/Icon/ChevronDown.d.ts +16 -0
- package/dist/components/Icon/ChevronDown.d.ts.map +1 -0
- package/dist/components/Icon/ChevronDown.js +34 -0
- package/dist/components/Icon/ChevronDown.js.map +1 -0
- package/dist/components/Icon/ChevronUp.d.ts +16 -0
- package/dist/components/Icon/ChevronUp.d.ts.map +1 -0
- package/dist/components/Icon/ChevronUp.js +34 -0
- package/dist/components/Icon/ChevronUp.js.map +1 -0
- package/dist/components/Icon/Close.d.ts +16 -0
- package/dist/components/Icon/Close.d.ts.map +1 -0
- package/dist/components/Icon/Close.js +34 -0
- package/dist/components/Icon/Close.js.map +1 -0
- package/dist/components/Icon/CloseCircleFilled.d.ts +16 -0
- package/dist/components/Icon/CloseCircleFilled.d.ts.map +1 -0
- package/dist/components/Icon/CloseCircleFilled.js +34 -0
- package/dist/components/Icon/CloseCircleFilled.js.map +1 -0
- package/dist/components/Icon/Copy.d.ts +16 -0
- package/dist/components/Icon/Copy.d.ts.map +1 -0
- package/dist/components/Icon/Copy.js +34 -0
- package/dist/components/Icon/Copy.js.map +1 -0
- package/dist/components/Icon/Delete.d.ts +16 -0
- package/dist/components/Icon/Delete.d.ts.map +1 -0
- package/dist/components/Icon/Delete.js +34 -0
- package/dist/components/Icon/Delete.js.map +1 -0
- package/dist/components/Icon/Download.d.ts +16 -0
- package/dist/components/Icon/Download.d.ts.map +1 -0
- package/dist/components/Icon/Download.js +34 -0
- package/dist/components/Icon/Download.js.map +1 -0
- package/dist/components/Icon/DragHandle.d.ts +16 -0
- package/dist/components/Icon/DragHandle.d.ts.map +1 -0
- package/dist/components/Icon/DragHandle.js +34 -0
- package/dist/components/Icon/DragHandle.js.map +1 -0
- package/dist/components/Icon/Edit.d.ts +16 -0
- package/dist/components/Icon/Edit.d.ts.map +1 -0
- package/dist/components/Icon/Edit.js +34 -0
- package/dist/components/Icon/Edit.js.map +1 -0
- package/dist/components/Icon/ExternalLink.d.ts +16 -0
- package/dist/components/Icon/ExternalLink.d.ts.map +1 -0
- package/dist/components/Icon/ExternalLink.js +34 -0
- package/dist/components/Icon/ExternalLink.js.map +1 -0
- package/dist/components/Icon/Eye.d.ts +16 -0
- package/dist/components/Icon/Eye.d.ts.map +1 -0
- package/dist/components/Icon/Eye.js +34 -0
- package/dist/components/Icon/Eye.js.map +1 -0
- package/dist/components/Icon/EyeOff.d.ts +16 -0
- package/dist/components/Icon/EyeOff.d.ts.map +1 -0
- package/dist/components/Icon/EyeOff.js +34 -0
- package/dist/components/Icon/EyeOff.js.map +1 -0
- package/dist/components/Icon/Filter.d.ts +16 -0
- package/dist/components/Icon/Filter.d.ts.map +1 -0
- package/dist/components/Icon/Filter.js +34 -0
- package/dist/components/Icon/Filter.js.map +1 -0
- package/dist/components/Icon/Globe.d.ts +16 -0
- package/dist/components/Icon/Globe.d.ts.map +1 -0
- package/dist/components/Icon/Globe.js +34 -0
- package/dist/components/Icon/Globe.js.map +1 -0
- package/dist/components/Icon/Home.d.ts +16 -0
- package/dist/components/Icon/Home.d.ts.map +1 -0
- package/dist/components/Icon/Home.js +34 -0
- package/dist/components/Icon/Home.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +28 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +29 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/InformationCircle.d.ts +16 -0
- package/dist/components/Icon/InformationCircle.d.ts.map +1 -0
- package/dist/components/Icon/InformationCircle.js +34 -0
- package/dist/components/Icon/InformationCircle.js.map +1 -0
- package/dist/components/Icon/InformationCircleFilled.d.ts +16 -0
- package/dist/components/Icon/InformationCircleFilled.d.ts.map +1 -0
- package/dist/components/Icon/InformationCircleFilled.js +34 -0
- package/dist/components/Icon/InformationCircleFilled.js.map +1 -0
- package/dist/components/Icon/Notification.d.ts +16 -0
- package/dist/components/Icon/Notification.d.ts.map +1 -0
- package/dist/components/Icon/Notification.js +34 -0
- package/dist/components/Icon/Notification.js.map +1 -0
- package/dist/components/Icon/OverflowVertical.d.ts +16 -0
- package/dist/components/Icon/OverflowVertical.d.ts.map +1 -0
- package/dist/components/Icon/OverflowVertical.js +34 -0
- package/dist/components/Icon/OverflowVertical.js.map +1 -0
- package/dist/components/Icon/QuestionCircle.d.ts +16 -0
- package/dist/components/Icon/QuestionCircle.d.ts.map +1 -0
- package/dist/components/Icon/QuestionCircle.js +34 -0
- package/dist/components/Icon/QuestionCircle.js.map +1 -0
- package/dist/components/Icon/QuestionCircleFilled.d.ts +16 -0
- package/dist/components/Icon/QuestionCircleFilled.d.ts.map +1 -0
- package/dist/components/Icon/QuestionCircleFilled.js +34 -0
- package/dist/components/Icon/QuestionCircleFilled.js.map +1 -0
- package/dist/components/Icon/Search.d.ts +16 -0
- package/dist/components/Icon/Search.d.ts.map +1 -0
- package/dist/components/Icon/Search.js +34 -0
- package/dist/components/Icon/Search.js.map +1 -0
- package/dist/components/Icon/Settings.d.ts +16 -0
- package/dist/components/Icon/Settings.d.ts.map +1 -0
- package/dist/components/Icon/Settings.js +32 -0
- package/dist/components/Icon/Settings.js.map +1 -0
- package/dist/components/Icon/Subtract.d.ts +16 -0
- package/dist/components/Icon/Subtract.d.ts.map +1 -0
- package/dist/components/Icon/Subtract.js +34 -0
- package/dist/components/Icon/Subtract.js.map +1 -0
- package/dist/components/Icon/SvgIcon.d.ts +14 -0
- package/dist/components/Icon/SvgIcon.d.ts.map +1 -0
- package/dist/components/Icon/SvgIcon.js +14 -0
- package/dist/components/Icon/SvgIcon.js.map +1 -0
- package/dist/components/Icon/User.d.ts +16 -0
- package/dist/components/Icon/User.d.ts.map +1 -0
- package/dist/components/Icon/User.js +34 -0
- package/dist/components/Icon/User.js.map +1 -0
- package/dist/components/Icon/index.d.ts +91 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +129 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Icon/types.d.ts +19 -0
- package/dist/components/Icon/types.d.ts.map +1 -0
- package/dist/components/Icon/types.js +2 -0
- package/dist/components/Icon/types.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/themes/odyssey/components.d.ts.map +1 -1
- package/dist/themes/odyssey/components.js +310 -102
- package/dist/themes/odyssey/components.js.map +1 -1
- package/dist/themes/odyssey/components.types.d.ts +1 -0
- package/dist/themes/odyssey/components.types.d.ts.map +1 -1
- package/dist/themes/odyssey/components.types.js.map +1 -1
- package/dist/themes/odyssey/mixins.d.ts +14 -0
- package/dist/themes/odyssey/mixins.d.ts.map +1 -0
- package/dist/themes/odyssey/mixins.js +17 -0
- package/dist/themes/odyssey/mixins.js.map +1 -0
- package/dist/themes/odyssey/mixins.types.d.ts +23 -0
- package/dist/themes/odyssey/mixins.types.d.ts.map +1 -0
- package/dist/themes/odyssey/mixins.types.js +13 -0
- package/dist/themes/odyssey/mixins.types.js.map +1 -0
- package/dist/themes/odyssey/palette.js +9 -9
- package/dist/themes/odyssey/palette.js.map +1 -1
- package/dist/themes/odyssey/theme.d.ts +1 -0
- package/dist/themes/odyssey/theme.d.ts.map +1 -1
- package/dist/themes/odyssey/theme.js +3 -0
- package/dist/themes/odyssey/theme.js.map +1 -1
- package/package.json +5 -4
- package/scripts/resolveIconSrcPath.cjs +20 -0
- package/src/components/Icon/Add.tsx +42 -0
- package/src/components/Icon/AddCircle.tsx +44 -0
- package/src/components/Icon/AlertCircle.tsx +44 -0
- package/src/components/Icon/AlertCircleFilled.tsx +45 -0
- package/src/components/Icon/AlertTriangleFilled.tsx +45 -0
- package/src/components/Icon/Anchor.tsx +46 -0
- package/src/components/Icon/ArrowDown.tsx +44 -0
- package/src/components/Icon/ArrowLeft.tsx +44 -0
- package/src/components/Icon/ArrowRight.tsx +44 -0
- package/src/components/Icon/ArrowUp.tsx +44 -0
- package/src/components/Icon/Calendar.tsx +44 -0
- package/src/components/Icon/Check.tsx +44 -0
- package/src/components/Icon/CheckCircleFilled.tsx +45 -0
- package/src/components/Icon/ChevronDown.tsx +44 -0
- package/src/components/Icon/ChevronUp.tsx +44 -0
- package/src/components/Icon/Close.tsx +44 -0
- package/src/components/Icon/CloseCircleFilled.tsx +45 -0
- package/src/components/Icon/Copy.tsx +44 -0
- package/src/components/Icon/Delete.tsx +44 -0
- package/src/components/Icon/Download.tsx +44 -0
- package/src/components/Icon/DragHandle.tsx +44 -0
- package/src/components/Icon/Edit.tsx +44 -0
- package/src/components/Icon/ExternalLink.tsx +45 -0
- package/src/components/Icon/Eye.tsx +42 -0
- package/src/components/Icon/EyeOff.tsx +44 -0
- package/src/components/Icon/Filter.tsx +44 -0
- package/src/components/Icon/Globe.tsx +44 -0
- package/src/components/Icon/Home.tsx +44 -0
- package/src/components/Icon/Icon.test.tsx +51 -0
- package/src/components/Icon/Icon.tsx +40 -0
- package/src/components/Icon/InformationCircle.tsx +45 -0
- package/src/components/Icon/InformationCircleFilled.tsx +45 -0
- package/src/components/Icon/Notification.tsx +45 -0
- package/src/components/Icon/OverflowVertical.tsx +45 -0
- package/src/components/Icon/QuestionCircle.tsx +45 -0
- package/src/components/Icon/QuestionCircleFilled.tsx +45 -0
- package/src/components/Icon/Search.tsx +44 -0
- package/src/components/Icon/Settings.tsx +42 -0
- package/src/components/Icon/Subtract.tsx +44 -0
- package/src/components/Icon/SvgIcon.ts +14 -0
- package/src/components/Icon/User.tsx +44 -0
- package/src/components/Icon/index.tsx +170 -0
- package/src/components/Icon/types.ts +20 -0
- package/src/components/index.ts +1 -0
- package/src/themes/odyssey/components.ts +270 -105
- package/src/themes/odyssey/components.types.ts +1 -0
- package/src/themes/odyssey/mixins.ts +19 -0
- package/src/themes/odyssey/mixins.types.ts +25 -0
- package/src/themes/odyssey/palette.ts +9 -9
- package/src/themes/odyssey/theme.ts +3 -0
|
@@ -18,11 +18,18 @@ export const components: ThemeOptions["components"] = {
|
|
|
18
18
|
styleOverrides: {
|
|
19
19
|
root: ({ ownerState, theme }) => ({
|
|
20
20
|
padding: theme.spacing(4),
|
|
21
|
+
gap: theme.spacing(4),
|
|
21
22
|
color: theme.palette.text.primary,
|
|
22
23
|
...(ownerState.severity && {
|
|
23
24
|
backgroundColor: theme.palette[ownerState.severity].lighter,
|
|
24
25
|
borderColor: theme.palette[ownerState.severity].light,
|
|
25
26
|
}),
|
|
27
|
+
...(ownerState.variant === "banner" && {
|
|
28
|
+
position: "relative",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
borderWidth: 0,
|
|
32
|
+
}),
|
|
26
33
|
...(ownerState.variant === "infobox" && {
|
|
27
34
|
borderStyle: "solid",
|
|
28
35
|
borderWidth: 1,
|
|
@@ -30,12 +37,38 @@ export const components: ThemeOptions["components"] = {
|
|
|
30
37
|
marginBottom: theme.spacing(4),
|
|
31
38
|
},
|
|
32
39
|
}),
|
|
40
|
+
...(ownerState.variant === "toast" && {
|
|
41
|
+
maxWidth: theme.mixins.maxWidth,
|
|
42
|
+
borderStyle: "solid",
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
position: "relative",
|
|
45
|
+
alignItems: "start",
|
|
46
|
+
}),
|
|
47
|
+
}),
|
|
48
|
+
action: ({ ownerState, theme }) => ({
|
|
33
49
|
...(ownerState.variant === "banner" && {
|
|
34
|
-
|
|
50
|
+
padding: 0,
|
|
51
|
+
marginRight: 0,
|
|
52
|
+
top: "50%",
|
|
53
|
+
right: theme.spacing(4),
|
|
54
|
+
position: "absolute",
|
|
55
|
+
transform: "translateY(-50%)",
|
|
56
|
+
}),
|
|
57
|
+
...(ownerState.variant === "toast" && {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
top: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
|
|
60
|
+
theme.mixins.borderWidth
|
|
61
|
+
})`,
|
|
62
|
+
right: `calc(${theme.spacing(4)} - ${theme.spacing(1)} + ${
|
|
63
|
+
theme.mixins.borderWidth
|
|
64
|
+
})`,
|
|
65
|
+
padding: 0,
|
|
66
|
+
marginLeft: 0,
|
|
67
|
+
marginRight: 0,
|
|
35
68
|
}),
|
|
36
69
|
}),
|
|
37
70
|
icon: ({ ownerState, theme }) => ({
|
|
38
|
-
marginRight:
|
|
71
|
+
marginRight: 0,
|
|
39
72
|
padding: 0,
|
|
40
73
|
fontSize: "1.429rem",
|
|
41
74
|
opacity: 1,
|
|
@@ -46,9 +79,20 @@ export const components: ThemeOptions["components"] = {
|
|
|
46
79
|
color: theme.palette[ownerState.severity].dark,
|
|
47
80
|
}),
|
|
48
81
|
}),
|
|
49
|
-
message: ({ theme }) => ({
|
|
82
|
+
message: ({ ownerState, theme }) => ({
|
|
50
83
|
padding: 0,
|
|
51
84
|
lineHeight: theme.typography.body.lineHeight,
|
|
85
|
+
...(ownerState.variant === "banner" && {
|
|
86
|
+
display: "flex",
|
|
87
|
+
justifyContent: "space-between",
|
|
88
|
+
gap: theme.spacing(4),
|
|
89
|
+
}),
|
|
90
|
+
...(ownerState.variant === "toast" && {
|
|
91
|
+
flexGrow: 1,
|
|
92
|
+
paddingRight: `calc((${theme.spacing(1)} * 2) + ${
|
|
93
|
+
theme.typography.body.fontSize
|
|
94
|
+
} + ${theme.spacing(4)})`,
|
|
95
|
+
}),
|
|
52
96
|
}),
|
|
53
97
|
},
|
|
54
98
|
},
|
|
@@ -70,129 +114,135 @@ export const components: ThemeOptions["components"] = {
|
|
|
70
114
|
variants: [
|
|
71
115
|
{
|
|
72
116
|
props: { variant: "primary" },
|
|
73
|
-
style: {
|
|
117
|
+
style: ({ theme }) => ({
|
|
74
118
|
fontWeight: 600,
|
|
75
|
-
color:
|
|
119
|
+
color: theme.palette.common.white,
|
|
76
120
|
borderColor: "transparent",
|
|
77
|
-
backgroundColor:
|
|
121
|
+
backgroundColor: theme.palette.primary.main,
|
|
78
122
|
|
|
79
123
|
"&:hover, &:focus-visible": {
|
|
80
|
-
backgroundColor:
|
|
124
|
+
backgroundColor: theme.palette.primary.dark,
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
"&:focus-visible": {
|
|
128
|
+
outlineColor: theme.palette.primary.main,
|
|
81
129
|
},
|
|
82
130
|
|
|
83
131
|
"&:active": {
|
|
84
|
-
backgroundColor:
|
|
132
|
+
backgroundColor: theme.palette.primary.main,
|
|
85
133
|
},
|
|
86
134
|
|
|
87
135
|
"&:disabled": {
|
|
88
|
-
color:
|
|
89
|
-
backgroundColor:
|
|
136
|
+
color: theme.palette.common.white,
|
|
137
|
+
backgroundColor: theme.palette.primary.light,
|
|
90
138
|
},
|
|
91
|
-
},
|
|
139
|
+
}),
|
|
92
140
|
},
|
|
93
141
|
{
|
|
94
142
|
props: { variant: "secondary" },
|
|
95
|
-
style: {
|
|
96
|
-
backgroundColor:
|
|
97
|
-
borderColor:
|
|
98
|
-
color:
|
|
99
|
-
"&:hover": {
|
|
100
|
-
|
|
101
|
-
borderColor:
|
|
102
|
-
color:
|
|
143
|
+
style: ({ theme }) => ({
|
|
144
|
+
backgroundColor: theme.palette.grey[50],
|
|
145
|
+
borderColor: theme.palette.grey[200],
|
|
146
|
+
color: theme.palette.text.primary,
|
|
147
|
+
"&:hover, &:focus-visible": {
|
|
148
|
+
backgroundColor: theme.palette.primary.lighter,
|
|
149
|
+
borderColor: theme.palette.primary.light,
|
|
150
|
+
color: theme.palette.primary.main,
|
|
103
151
|
},
|
|
104
152
|
|
|
105
153
|
"&:focus-visible": {
|
|
106
|
-
|
|
107
|
-
color: "#1662dd",
|
|
154
|
+
outlineColor: theme.palette.primary.main,
|
|
108
155
|
},
|
|
109
156
|
|
|
110
157
|
"&:active": {
|
|
111
|
-
borderColor:
|
|
158
|
+
borderColor: theme.palette.primary.main,
|
|
112
159
|
},
|
|
113
160
|
|
|
114
161
|
"&:disabled": {
|
|
115
|
-
borderColor:
|
|
116
|
-
backgroundColor:
|
|
117
|
-
color:
|
|
162
|
+
borderColor: theme.palette.grey[100],
|
|
163
|
+
backgroundColor: theme.palette.grey[100],
|
|
164
|
+
color: theme.palette.grey[500],
|
|
118
165
|
},
|
|
119
|
-
},
|
|
166
|
+
}),
|
|
120
167
|
},
|
|
121
168
|
{
|
|
122
169
|
props: { variant: "danger" },
|
|
123
|
-
style: {
|
|
124
|
-
backgroundColor:
|
|
125
|
-
color:
|
|
170
|
+
style: ({ theme }) => ({
|
|
171
|
+
backgroundColor: theme.palette.error.main,
|
|
172
|
+
color: theme.palette.common.white,
|
|
126
173
|
borderColor: "transparent",
|
|
127
174
|
|
|
128
175
|
"&:hover": {
|
|
129
|
-
backgroundColor:
|
|
176
|
+
backgroundColor: theme.palette.error.dark,
|
|
130
177
|
},
|
|
131
178
|
|
|
132
179
|
"&:focus-visible": {
|
|
133
|
-
outlineColor:
|
|
134
|
-
backgroundColor:
|
|
180
|
+
outlineColor: theme.palette.error.main,
|
|
181
|
+
backgroundColor: theme.palette.error.dark,
|
|
135
182
|
},
|
|
136
183
|
|
|
137
184
|
"&:active": {
|
|
138
|
-
backgroundColor:
|
|
185
|
+
backgroundColor: theme.palette.error.main,
|
|
139
186
|
},
|
|
140
187
|
|
|
141
188
|
"&:disabled": {
|
|
142
|
-
color:
|
|
143
|
-
backgroundColor:
|
|
189
|
+
color: theme.palette.common.white,
|
|
190
|
+
backgroundColor: theme.palette.error.light,
|
|
144
191
|
},
|
|
145
|
-
},
|
|
192
|
+
}),
|
|
146
193
|
},
|
|
147
194
|
{
|
|
148
195
|
props: { variant: "floating" },
|
|
149
|
-
style: {
|
|
150
|
-
backgroundColor:
|
|
151
|
-
color:
|
|
196
|
+
style: ({ theme }) => ({
|
|
197
|
+
backgroundColor: theme.palette.common.white,
|
|
198
|
+
color: theme.palette.text.primary,
|
|
152
199
|
borderColor: "transparent",
|
|
153
200
|
|
|
154
201
|
"&:hover, &:focus-visible": {
|
|
155
202
|
backgroundColor: "rgba(29, 29, 33, 0.1)",
|
|
156
203
|
borderColor: "transparent",
|
|
157
204
|
},
|
|
205
|
+
"&:focus-visible": {
|
|
206
|
+
outlineColor: theme.palette.primary.main,
|
|
207
|
+
},
|
|
158
208
|
"&:active": {
|
|
159
209
|
backgroundColor: "rgba(29, 29, 33, 0.2)",
|
|
160
210
|
borderColor: "transparent",
|
|
161
211
|
},
|
|
162
212
|
"&:disabled": {
|
|
163
213
|
backgroundColor: "rgba(235, 235, 237, 0.6)",
|
|
164
|
-
color:
|
|
214
|
+
color: theme.palette.text.secondary,
|
|
165
215
|
borderColor: "transparent",
|
|
166
216
|
},
|
|
167
|
-
},
|
|
217
|
+
}),
|
|
168
218
|
},
|
|
169
219
|
{
|
|
170
220
|
props: { size: "s" },
|
|
171
|
-
style: {
|
|
172
|
-
paddingBlock:
|
|
173
|
-
paddingInline:
|
|
221
|
+
style: ({ theme }) => ({
|
|
222
|
+
paddingBlock: `calc(${theme.spacing(2)} - 1px)`,
|
|
223
|
+
paddingInline: `calc(${theme.spacing(3)} - 1px)`,
|
|
174
224
|
fontSize: "1rem",
|
|
175
|
-
},
|
|
225
|
+
}),
|
|
176
226
|
},
|
|
177
227
|
{
|
|
178
228
|
props: { size: "l" },
|
|
179
|
-
style: {
|
|
180
|
-
paddingBlock:
|
|
181
|
-
paddingInline:
|
|
182
|
-
},
|
|
229
|
+
style: ({ theme }) => ({
|
|
230
|
+
paddingBlock: `calc(${theme.spacing(4)} - 1px)`,
|
|
231
|
+
paddingInline: `calc(${theme.spacing(4)} - 1px)`,
|
|
232
|
+
}),
|
|
183
233
|
},
|
|
184
234
|
{
|
|
185
235
|
props: { fullWidth: true },
|
|
186
|
-
style: {
|
|
236
|
+
style: ({ theme }) => ({
|
|
187
237
|
display: "block",
|
|
188
238
|
width: "100%",
|
|
189
239
|
marginBlock: "0",
|
|
190
240
|
marginInline: "0",
|
|
191
241
|
|
|
192
242
|
"&:not(:last-child)": {
|
|
193
|
-
marginBlockEnd:
|
|
243
|
+
marginBlockEnd: theme.spacing(4),
|
|
194
244
|
},
|
|
195
|
-
},
|
|
245
|
+
}),
|
|
196
246
|
},
|
|
197
247
|
{
|
|
198
248
|
// icon only
|
|
@@ -207,10 +257,9 @@ export const components: ThemeOptions["components"] = {
|
|
|
207
257
|
},
|
|
208
258
|
],
|
|
209
259
|
styleOverrides: {
|
|
210
|
-
root: () => ({
|
|
260
|
+
root: ({ theme }) => ({
|
|
211
261
|
fontWeight: 600,
|
|
212
|
-
|
|
213
|
-
paddingInline: "0.85714286rem",
|
|
262
|
+
padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
|
|
214
263
|
display: "inline-block",
|
|
215
264
|
position: "relative",
|
|
216
265
|
marginBlock: "0",
|
|
@@ -228,7 +277,7 @@ export const components: ThemeOptions["components"] = {
|
|
|
228
277
|
whiteSpace: "nowrap",
|
|
229
278
|
|
|
230
279
|
"& + &": {
|
|
231
|
-
marginInlineStart:
|
|
280
|
+
marginInlineStart: theme.spacing(2),
|
|
232
281
|
},
|
|
233
282
|
|
|
234
283
|
"&:focus-visible": {
|
|
@@ -239,7 +288,7 @@ export const components: ThemeOptions["components"] = {
|
|
|
239
288
|
|
|
240
289
|
"&:disabled": {
|
|
241
290
|
cursor: "not-allowed",
|
|
242
|
-
pointerEvents: "inherit", // in order to have cursor: not-allowed, must change pointer-events from
|
|
291
|
+
pointerEvents: "inherit", // in order to have cursor: not-allowed, must change pointer-events from "none"
|
|
243
292
|
},
|
|
244
293
|
|
|
245
294
|
".MuiButton-startIcon > *:nth-of-type(1)": {
|
|
@@ -265,34 +314,35 @@ export const components: ThemeOptions["components"] = {
|
|
|
265
314
|
size: "small",
|
|
266
315
|
},
|
|
267
316
|
styleOverrides: {
|
|
268
|
-
root: {
|
|
317
|
+
root: ({ theme }) => ({
|
|
269
318
|
borderRadius: "4px",
|
|
270
319
|
"&:hover": {
|
|
271
320
|
backgroundColor: "transparent",
|
|
272
321
|
},
|
|
273
322
|
padding: 0,
|
|
274
323
|
".Mui-error > &": {
|
|
275
|
-
color:
|
|
324
|
+
color: theme.palette.error.main,
|
|
276
325
|
"&:hover": {
|
|
277
|
-
color:
|
|
326
|
+
color: theme.palette.error.dark,
|
|
278
327
|
},
|
|
279
328
|
},
|
|
280
329
|
".Mui-error > &.Mui-checked": {
|
|
281
330
|
"&:hover": {
|
|
282
|
-
color:
|
|
331
|
+
color: theme.palette.error.dark,
|
|
283
332
|
},
|
|
284
333
|
},
|
|
285
334
|
"&.Mui-focusVisible": {
|
|
286
|
-
outlineColor:
|
|
335
|
+
outlineColor: theme.palette.primary.main,
|
|
287
336
|
outlineOffset: 0,
|
|
288
337
|
outlineStyle: "solid",
|
|
289
338
|
outlineWidth: "2px",
|
|
290
339
|
},
|
|
291
|
-
},
|
|
340
|
+
}),
|
|
292
341
|
},
|
|
293
342
|
},
|
|
294
343
|
MuiCircularProgress: {
|
|
295
344
|
defaultProps: {
|
|
345
|
+
// TODO: defaultProps cannot take a theme object; needs workaround
|
|
296
346
|
size: "1.14285714rem",
|
|
297
347
|
thickness: 8,
|
|
298
348
|
color: "primary",
|
|
@@ -300,9 +350,9 @@ export const components: ThemeOptions["components"] = {
|
|
|
300
350
|
variant: "indeterminate",
|
|
301
351
|
},
|
|
302
352
|
styleOverrides: {
|
|
303
|
-
root: ({ ownerState }) => ({
|
|
353
|
+
root: ({ theme, ownerState }) => ({
|
|
304
354
|
...(ownerState.color !== "inherit" && {
|
|
305
|
-
color:
|
|
355
|
+
color: theme.palette.primary.dark,
|
|
306
356
|
}),
|
|
307
357
|
}),
|
|
308
358
|
circle: ({ ownerState }) => ({
|
|
@@ -312,10 +362,29 @@ export const components: ThemeOptions["components"] = {
|
|
|
312
362
|
}),
|
|
313
363
|
},
|
|
314
364
|
},
|
|
365
|
+
MuiFormControl: {
|
|
366
|
+
styleOverrides: {
|
|
367
|
+
root: ({ ownerState, theme }) => ({
|
|
368
|
+
width: "100%",
|
|
369
|
+
maxWidth: "32rem",
|
|
370
|
+
...(ownerState.margin === "normal" && {
|
|
371
|
+
marginTop: 0,
|
|
372
|
+
marginBottom: theme.spacing(4),
|
|
373
|
+
}),
|
|
374
|
+
...(ownerState.margin === "dense" && {
|
|
375
|
+
marginTop: 0,
|
|
376
|
+
marginBottom: theme.spacing(4),
|
|
377
|
+
}),
|
|
378
|
+
...(ownerState.fullWidth && {
|
|
379
|
+
maxWidth: "100%",
|
|
380
|
+
}),
|
|
381
|
+
}),
|
|
382
|
+
},
|
|
383
|
+
},
|
|
315
384
|
MuiFormControlLabel: {
|
|
316
385
|
styleOverrides: {
|
|
317
|
-
root: ({ ownerState }) => ({
|
|
318
|
-
gap:
|
|
386
|
+
root: ({ theme, ownerState }) => ({
|
|
387
|
+
gap: theme.spacing(2),
|
|
319
388
|
marginLeft: 0,
|
|
320
389
|
marginRight: 0, // used for row presentation of radio/checkbox
|
|
321
390
|
...(ownerState.labelPlacement === "start" && {
|
|
@@ -329,28 +398,28 @@ export const components: ThemeOptions["components"] = {
|
|
|
329
398
|
marginLeft: 0,
|
|
330
399
|
}),
|
|
331
400
|
"&:not(:last-child)": {
|
|
332
|
-
marginBottom:
|
|
401
|
+
marginBottom: theme.spacing(2),
|
|
333
402
|
},
|
|
334
403
|
"&.Mui-disabled": {
|
|
335
404
|
pointerEvents: "none",
|
|
336
405
|
},
|
|
337
406
|
//[`&:hover ${radioClasses.root}:not(${radioClasses.checked})`]: {
|
|
338
|
-
//color:
|
|
407
|
+
//color: theme.palette.text.primary,
|
|
339
408
|
//},
|
|
340
409
|
"&:hover .MuiRadio-root, &:hover .MuiCheckbox-root": {
|
|
341
|
-
color:
|
|
410
|
+
color: theme.palette.text.primary,
|
|
342
411
|
},
|
|
343
412
|
"&:hover .MuiRadio-root.Mui-checked, &:hover .MuiCheckbox-root.Mui-checked":
|
|
344
413
|
{
|
|
345
|
-
color:
|
|
414
|
+
color: theme.palette.primary.dark,
|
|
346
415
|
},
|
|
347
416
|
"&.Mui-error:hover .MuiRadio-root, &.Mui-error:hover .MuiCheckbox-root":
|
|
348
417
|
{
|
|
349
|
-
color:
|
|
418
|
+
color: theme.palette.error.dark,
|
|
350
419
|
},
|
|
351
420
|
"&.Mui-error:hover .MuiRadio-root.Mui-checked, &.Mui-error:hover .MuiCheckbox-root.Mui-checked":
|
|
352
421
|
{
|
|
353
|
-
color:
|
|
422
|
+
color: theme.palette.error.dark,
|
|
354
423
|
},
|
|
355
424
|
}),
|
|
356
425
|
},
|
|
@@ -360,32 +429,56 @@ export const components: ThemeOptions["components"] = {
|
|
|
360
429
|
variant: "standard",
|
|
361
430
|
},
|
|
362
431
|
styleOverrides: {
|
|
363
|
-
root: {
|
|
432
|
+
root: ({ theme }) => ({
|
|
364
433
|
lineHeight: "1.33333333",
|
|
365
|
-
marginTop:
|
|
434
|
+
marginTop: theme.spacing(2),
|
|
366
435
|
".MuiFormLabel-root + &": {
|
|
367
|
-
marginTop:
|
|
368
|
-
color:
|
|
436
|
+
marginTop: `-${theme.spacing(1)}`,
|
|
437
|
+
color: theme.palette.text.secondary,
|
|
369
438
|
},
|
|
370
|
-
marginBottom:
|
|
439
|
+
marginBottom: theme.spacing(2),
|
|
371
440
|
"&:last-child": {
|
|
372
441
|
marginBottom: 0,
|
|
373
442
|
},
|
|
374
|
-
},
|
|
443
|
+
}),
|
|
375
444
|
},
|
|
376
445
|
},
|
|
377
446
|
MuiFormLabel: {
|
|
378
447
|
styleOverrides: {
|
|
379
|
-
root: {
|
|
380
|
-
color:
|
|
448
|
+
root: ({ theme }) => ({
|
|
449
|
+
color: theme.palette.text.primary,
|
|
381
450
|
lineHeight: "1.14285714",
|
|
382
451
|
fontSize: "1rem",
|
|
383
452
|
fontWeight: 600,
|
|
384
|
-
marginBottom:
|
|
453
|
+
marginBottom: theme.spacing(2),
|
|
385
454
|
"&.Mui-focused, &.Mui-error, &.Mui-disabled": {
|
|
386
|
-
color:
|
|
455
|
+
color: theme.palette.text.primary,
|
|
387
456
|
},
|
|
388
|
-
},
|
|
457
|
+
}),
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
MuiIconButton: {
|
|
461
|
+
styleOverrides: {
|
|
462
|
+
root: ({ theme }) => ({
|
|
463
|
+
padding: theme.spacing(1),
|
|
464
|
+
fontSize: theme.typography.body.fontSize,
|
|
465
|
+
}),
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
MuiInputAdornment: {
|
|
469
|
+
defaultProps: {
|
|
470
|
+
variant: "outlined",
|
|
471
|
+
},
|
|
472
|
+
styleOverrides: {
|
|
473
|
+
root: ({ ownerState }) => ({
|
|
474
|
+
display: "flex",
|
|
475
|
+
...(ownerState.position === "start" && {
|
|
476
|
+
marginRight: 0,
|
|
477
|
+
}),
|
|
478
|
+
...(ownerState.position === "end" && {
|
|
479
|
+
marginLeft: 0,
|
|
480
|
+
}),
|
|
481
|
+
}),
|
|
389
482
|
},
|
|
390
483
|
},
|
|
391
484
|
MuiInputBase: {
|
|
@@ -399,26 +492,49 @@ export const components: ThemeOptions["components"] = {
|
|
|
399
492
|
},
|
|
400
493
|
},
|
|
401
494
|
},
|
|
495
|
+
MuiInputLabel: {
|
|
496
|
+
defaultProps: {
|
|
497
|
+
disableAnimation: true,
|
|
498
|
+
shrink: false,
|
|
499
|
+
},
|
|
500
|
+
styleOverrides: {
|
|
501
|
+
root: ({ ownerState }) => ({
|
|
502
|
+
// @ts-expect-error: Incorrect typing in MUI
|
|
503
|
+
...(ownerState.formControl && {
|
|
504
|
+
position: "initial",
|
|
505
|
+
transform: "none",
|
|
506
|
+
}),
|
|
507
|
+
...(ownerState.variant === "outlined" && {
|
|
508
|
+
pointerEvents: "initial",
|
|
509
|
+
transform: "none",
|
|
510
|
+
maxWidth: "100%",
|
|
511
|
+
...(ownerState.size === "small" && {
|
|
512
|
+
transform: "none",
|
|
513
|
+
}),
|
|
514
|
+
}),
|
|
515
|
+
}),
|
|
516
|
+
},
|
|
517
|
+
},
|
|
402
518
|
MuiLink: {
|
|
403
519
|
styleOverrides: {
|
|
404
|
-
root: {
|
|
405
|
-
color:
|
|
520
|
+
root: ({ theme }) => ({
|
|
521
|
+
color: theme.palette.primary.main,
|
|
406
522
|
textDecoration: "none",
|
|
407
523
|
|
|
408
524
|
"&:hover": {
|
|
409
|
-
color:
|
|
525
|
+
color: theme.palette.primary.main,
|
|
410
526
|
textDecoration: "underline",
|
|
411
527
|
},
|
|
412
528
|
|
|
413
529
|
"&:focus-visible": {
|
|
414
|
-
outlineColor:
|
|
530
|
+
outlineColor: theme.palette.primary.main,
|
|
415
531
|
outlineOffset: "2px",
|
|
416
532
|
outlineStyle: "solid",
|
|
417
533
|
outlineWidth: "1px",
|
|
418
534
|
},
|
|
419
535
|
|
|
420
536
|
"&:visited": {
|
|
421
|
-
color:
|
|
537
|
+
color: theme.palette.primary.main,
|
|
422
538
|
},
|
|
423
539
|
|
|
424
540
|
".Link-indicator, .Link-icon": {
|
|
@@ -428,11 +544,11 @@ export const components: ThemeOptions["components"] = {
|
|
|
428
544
|
},
|
|
429
545
|
|
|
430
546
|
".Link-indicator": {
|
|
431
|
-
marginInlineStart:
|
|
547
|
+
marginInlineStart: theme.spacing(2),
|
|
432
548
|
},
|
|
433
549
|
|
|
434
550
|
".Link-icon": {
|
|
435
|
-
marginInlineEnd:
|
|
551
|
+
marginInlineEnd: theme.spacing(2),
|
|
436
552
|
},
|
|
437
553
|
svg: {
|
|
438
554
|
fontSize: "1rem",
|
|
@@ -442,55 +558,104 @@ export const components: ThemeOptions["components"] = {
|
|
|
442
558
|
verticalAlign: "middle",
|
|
443
559
|
width: "1em",
|
|
444
560
|
},
|
|
445
|
-
},
|
|
561
|
+
}),
|
|
446
562
|
},
|
|
447
563
|
variants: [
|
|
448
564
|
{
|
|
449
565
|
props: { variant: "monochrome" },
|
|
450
|
-
style: {
|
|
451
|
-
color:
|
|
566
|
+
style: ({ theme }) => ({
|
|
567
|
+
color: theme.palette.text.primary,
|
|
452
568
|
textDecoration: "underline",
|
|
453
569
|
|
|
454
570
|
"&:hover": {
|
|
455
|
-
color:
|
|
571
|
+
color: theme.palette.text.secondary,
|
|
456
572
|
},
|
|
457
573
|
|
|
458
574
|
"&:focus-visible": {
|
|
459
|
-
outlineColor:
|
|
575
|
+
outlineColor: theme.palette.primary.main,
|
|
460
576
|
outlineOffset: "2px",
|
|
461
577
|
outlineStyle: "solid",
|
|
462
578
|
outlineWidth: "1px",
|
|
463
579
|
},
|
|
464
580
|
|
|
465
581
|
"&:visited": {
|
|
466
|
-
color:
|
|
582
|
+
color: theme.palette.text.primary,
|
|
467
583
|
},
|
|
468
|
-
},
|
|
584
|
+
}),
|
|
469
585
|
},
|
|
470
586
|
],
|
|
471
587
|
},
|
|
588
|
+
MuiNativeSelect: {
|
|
589
|
+
defaultProps: {
|
|
590
|
+
variant: "outlined",
|
|
591
|
+
},
|
|
592
|
+
styleOverrides: {
|
|
593
|
+
icon: ({ theme }) => ({
|
|
594
|
+
color: theme.palette.text.primary,
|
|
595
|
+
}),
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
MuiOutlinedInput: {
|
|
599
|
+
defaultProps: {
|
|
600
|
+
notched: false,
|
|
601
|
+
},
|
|
602
|
+
styleOverrides: {
|
|
603
|
+
root: ({ ownerState, theme }) => ({
|
|
604
|
+
"&.Mui-disabled": {
|
|
605
|
+
pointerEvents: "none",
|
|
606
|
+
},
|
|
607
|
+
...(ownerState.startAdornment && {
|
|
608
|
+
paddingLeft: theme.spacing(3),
|
|
609
|
+
}),
|
|
610
|
+
...(ownerState.endAdornment && {
|
|
611
|
+
paddingRight: theme.spacing(3),
|
|
612
|
+
}),
|
|
613
|
+
}),
|
|
614
|
+
input: ({ theme }) => ({
|
|
615
|
+
padding: `calc(${theme.spacing(3)} - 1px) ${theme.spacing(3)}`,
|
|
616
|
+
border: "1px solid transparent",
|
|
617
|
+
}),
|
|
618
|
+
notchedOutline: ({ theme }) => ({
|
|
619
|
+
borderColor: theme.palette.grey[500],
|
|
620
|
+
".MuiOutlinedInput-root:hover &": {
|
|
621
|
+
borderColor: theme.palette.primary.main,
|
|
622
|
+
},
|
|
623
|
+
".MuiOutlinedInput-root.Mui-error:hover &": {
|
|
624
|
+
borderColor: theme.palette.error.dark,
|
|
625
|
+
},
|
|
626
|
+
}),
|
|
627
|
+
},
|
|
628
|
+
},
|
|
472
629
|
MuiRadio: {
|
|
473
630
|
defaultProps: {
|
|
474
631
|
size: "small",
|
|
475
632
|
},
|
|
476
633
|
styleOverrides: {
|
|
477
|
-
root: {
|
|
634
|
+
root: ({ theme }) => ({
|
|
478
635
|
"&:hover": {
|
|
479
636
|
backgroundColor: "transparent",
|
|
480
637
|
},
|
|
481
638
|
padding: 0,
|
|
482
639
|
".Mui-error > &": {
|
|
483
|
-
color:
|
|
640
|
+
color: theme.palette.error.main,
|
|
484
641
|
"&:hover": {
|
|
485
|
-
color:
|
|
642
|
+
color: theme.palette.error.dark,
|
|
486
643
|
},
|
|
487
644
|
},
|
|
488
645
|
"&.Mui-focusVisible": {
|
|
489
|
-
outlineColor:
|
|
646
|
+
outlineColor: theme.palette.primary.main,
|
|
490
647
|
outlineOffset: 0,
|
|
491
648
|
outlineStyle: "solid",
|
|
492
649
|
outlineWidth: "2px",
|
|
493
650
|
},
|
|
651
|
+
}),
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
MuiSnackbar: {
|
|
655
|
+
defaultProps: {
|
|
656
|
+
anchorOrigin: {
|
|
657
|
+
vertical: "bottom",
|
|
658
|
+
horizontal: "right",
|
|
494
659
|
},
|
|
495
660
|
},
|
|
496
661
|
},
|
|
@@ -500,9 +665,9 @@ export const components: ThemeOptions["components"] = {
|
|
|
500
665
|
"'Public Sans', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Noto Sans Arabic', sans-serif",
|
|
501
666
|
},
|
|
502
667
|
styleOverrides: {
|
|
503
|
-
paragraph: {
|
|
504
|
-
marginBottom:
|
|
505
|
-
},
|
|
668
|
+
paragraph: ({ theme }) => ({
|
|
669
|
+
marginBottom: theme.spacing(4),
|
|
670
|
+
}),
|
|
506
671
|
},
|
|
507
672
|
},
|
|
508
673
|
};
|