@okta/odyssey-react-mui 1.9.5 → 1.9.7
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/CHANGELOG.md +11 -0
- package/dist/Autocomplete.js +3 -1
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Breadcrumbs.js +4 -3
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/CheckboxGroup.js +2 -0
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/Field.js +2 -0
- package/dist/Field.js.map +1 -1
- package/dist/FieldComponentProps.js.map +1 -1
- package/dist/FieldHint.js +9 -2
- package/dist/FieldHint.js.map +1 -1
- package/dist/HintLink.js +23 -0
- package/dist/HintLink.js.map +1 -0
- package/dist/NativeSelect.js +2 -0
- package/dist/NativeSelect.js.map +1 -1
- package/dist/RadioGroup.js +2 -0
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +2 -0
- package/dist/Select.js.map +1 -1
- package/dist/TextField.js +2 -0
- package/dist/TextField.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/labs/DataTable.js +3 -1
- package/dist/labs/DataTable.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +2 -2
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +2 -2
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/Field.d.ts +2 -25
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FieldComponentProps.d.ts +6 -0
- package/dist/src/FieldComponentProps.d.ts.map +1 -1
- package/dist/src/FieldHint.d.ts +3 -1
- package/dist/src/FieldHint.d.ts.map +1 -1
- package/dist/src/HintLink.d.ts +16 -0
- package/dist/src/HintLink.d.ts.map +1 -0
- package/dist/src/NativeSelect.d.ts +1 -1
- package/dist/src/NativeSelect.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +2 -2
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/Select.d.ts +2 -2
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/DataTable.d.ts +7 -1
- package/dist/src/labs/DataTable.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +43 -19
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Autocomplete.tsx +10 -2
- package/src/Breadcrumbs.tsx +3 -3
- package/src/CheckboxGroup.tsx +6 -1
- package/src/Field.tsx +17 -26
- package/src/FieldComponentProps.ts +8 -0
- package/src/FieldHint.tsx +8 -1
- package/src/HintLink.tsx +28 -0
- package/src/NativeSelect.tsx +9 -1
- package/src/RadioGroup.tsx +3 -1
- package/src/Select.tsx +4 -1
- package/src/TextField.tsx +2 -0
- package/src/index.ts +1 -0
- package/src/labs/DataTable.tsx +16 -1
- package/src/theme/components.tsx +43 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okta/odyssey-react-mui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "React MUI components for Odyssey, Okta's design system",
|
|
5
5
|
"author": "Okta, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@mui/system": "^5.14.9",
|
|
52
52
|
"@mui/utils": "^5.11.2",
|
|
53
53
|
"@mui/x-date-pickers": "^5.0.15",
|
|
54
|
-
"@okta/odyssey-design-tokens": "1.9.
|
|
54
|
+
"@okta/odyssey-design-tokens": "1.9.7",
|
|
55
55
|
"date-fns": "^2.30.0",
|
|
56
56
|
"i18next": "^23.5.1",
|
|
57
57
|
"material-react-table": "^2.0.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": ">=17 <19",
|
|
64
64
|
"react-dom": ">=17 <19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "b27f35a95290d8e55eada55587b2b26804d1520e"
|
|
67
67
|
}
|
package/src/Autocomplete.tsx
CHANGED
|
@@ -161,7 +161,13 @@ export type AutocompleteProps<
|
|
|
161
161
|
getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;
|
|
162
162
|
} & Pick<
|
|
163
163
|
FieldComponentProps,
|
|
164
|
-
|
|
164
|
+
| "errorMessage"
|
|
165
|
+
| "hint"
|
|
166
|
+
| "HintLinkComponent"
|
|
167
|
+
| "id"
|
|
168
|
+
| "isFullWidth"
|
|
169
|
+
| "isOptional"
|
|
170
|
+
| "name"
|
|
165
171
|
> &
|
|
166
172
|
SeleniumProps;
|
|
167
173
|
|
|
@@ -182,6 +188,7 @@ const Autocomplete = <
|
|
|
182
188
|
isOptional = false,
|
|
183
189
|
isReadOnly,
|
|
184
190
|
hint,
|
|
191
|
+
HintLinkComponent,
|
|
185
192
|
label,
|
|
186
193
|
name: nameOverride,
|
|
187
194
|
onBlur,
|
|
@@ -240,6 +247,7 @@ const Autocomplete = <
|
|
|
240
247
|
hasVisibleLabel
|
|
241
248
|
id={InputLabelProps.htmlFor}
|
|
242
249
|
hint={hint}
|
|
250
|
+
HintLinkComponent={HintLinkComponent}
|
|
243
251
|
label={label}
|
|
244
252
|
isOptional={isOptional}
|
|
245
253
|
renderFieldComponent={({
|
|
@@ -264,7 +272,7 @@ const Autocomplete = <
|
|
|
264
272
|
)}
|
|
265
273
|
/>
|
|
266
274
|
),
|
|
267
|
-
[errorMessage, hint, isOptional, label, nameOverride]
|
|
275
|
+
[errorMessage, hint, HintLinkComponent, isOptional, label, nameOverride]
|
|
268
276
|
);
|
|
269
277
|
const onChange = useCallback<
|
|
270
278
|
NonNullable<
|
package/src/Breadcrumbs.tsx
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
useState,
|
|
28
28
|
} from "react";
|
|
29
29
|
import { GroupIcon, HomeIcon, UserIcon } from "./icons.generated";
|
|
30
|
-
import {
|
|
30
|
+
import { Subordinate } from "./Typography";
|
|
31
31
|
import { useTranslation } from "react-i18next";
|
|
32
32
|
|
|
33
33
|
export type BreadcrumbType = "listItem" | "menuItem" | "currentPage";
|
|
@@ -71,7 +71,7 @@ export const Breadcrumb = ({ children, href, iconName }: BreadcrumbProps) => {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
if (breadcrumbType === "currentPage") {
|
|
74
|
-
return <
|
|
74
|
+
return <Subordinate color="textPrimary">{breadcrumbContent}</Subordinate>;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// breadcrumbType === "listItem" is the default
|
|
@@ -152,7 +152,7 @@ const BreadcrumbList = ({
|
|
|
152
152
|
|
|
153
153
|
{breadcrumbSections.insideMenu && (
|
|
154
154
|
<>
|
|
155
|
-
<ButtonBase onClick={onMenuButtonClick}
|
|
155
|
+
<ButtonBase onClick={onMenuButtonClick}>...</ButtonBase>
|
|
156
156
|
<Menu
|
|
157
157
|
open={Boolean(anchorEl)}
|
|
158
158
|
onClose={onCloseMenu}
|
package/src/CheckboxGroup.tsx
CHANGED
|
@@ -33,13 +33,17 @@ export type CheckboxGroupProps = {
|
|
|
33
33
|
* The label text for the CheckboxGroup
|
|
34
34
|
*/
|
|
35
35
|
label: string;
|
|
36
|
-
} & Pick<
|
|
36
|
+
} & Pick<
|
|
37
|
+
FieldComponentProps,
|
|
38
|
+
"errorMessage" | "hint" | "HintLinkComponent" | "isDisabled"
|
|
39
|
+
> &
|
|
37
40
|
SeleniumProps;
|
|
38
41
|
|
|
39
42
|
const CheckboxGroup = ({
|
|
40
43
|
children,
|
|
41
44
|
errorMessage,
|
|
42
45
|
hint,
|
|
46
|
+
HintLinkComponent,
|
|
43
47
|
isDisabled,
|
|
44
48
|
isRequired = false,
|
|
45
49
|
label,
|
|
@@ -65,6 +69,7 @@ const CheckboxGroup = ({
|
|
|
65
69
|
fieldType="group"
|
|
66
70
|
hasVisibleLabel={true}
|
|
67
71
|
hint={hint}
|
|
72
|
+
HintLinkComponent={HintLinkComponent}
|
|
68
73
|
isDisabled={isDisabled}
|
|
69
74
|
isOptional={!isRequired}
|
|
70
75
|
label={label}
|
package/src/Field.tsx
CHANGED
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
FormControl as MuiFormControl,
|
|
17
17
|
FormLabel as MuiFormLabel,
|
|
18
18
|
} from "@mui/material";
|
|
19
|
+
|
|
20
|
+
import { FieldComponentProps } from "./FieldComponentProps";
|
|
19
21
|
import { FieldError } from "./FieldError";
|
|
20
22
|
import { FieldHint } from "./FieldHint";
|
|
21
23
|
import { FieldLabel } from "./FieldLabel";
|
|
@@ -27,10 +29,6 @@ import { useUniqueId } from "./useUniqueId";
|
|
|
27
29
|
export const fieldTypeValues = ["single", "group"] as const;
|
|
28
30
|
|
|
29
31
|
export type FieldProps = {
|
|
30
|
-
/**
|
|
31
|
-
* If `error` is not undefined, the `input` will indicate an error.
|
|
32
|
-
*/
|
|
33
|
-
errorMessage?: string;
|
|
34
32
|
/**
|
|
35
33
|
* The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).
|
|
36
34
|
*/
|
|
@@ -39,14 +37,6 @@ export type FieldProps = {
|
|
|
39
37
|
* If `true`, the Field label will be shown
|
|
40
38
|
*/
|
|
41
39
|
hasVisibleLabel: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* The helper text content.
|
|
44
|
-
*/
|
|
45
|
-
hint?: string;
|
|
46
|
-
/**
|
|
47
|
-
* The id of the `input` element.
|
|
48
|
-
*/
|
|
49
|
-
id?: string;
|
|
50
40
|
/**
|
|
51
41
|
* Important for narrowing down the `fieldset` role to "radiogroup".
|
|
52
42
|
*/
|
|
@@ -55,18 +45,6 @@ export type FieldProps = {
|
|
|
55
45
|
* Important for determining if children inherit error state
|
|
56
46
|
*/
|
|
57
47
|
isCheckboxGroup?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* If `true`, the component is disabled.
|
|
60
|
-
*/
|
|
61
|
-
isDisabled?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* If `true`, the component can stretch to fill the width of the container.
|
|
64
|
-
*/
|
|
65
|
-
isFullWidth?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* If `true`, the `input` element is not required.
|
|
68
|
-
*/
|
|
69
|
-
isOptional?: boolean;
|
|
70
48
|
/**
|
|
71
49
|
* The label for the `input` element.
|
|
72
50
|
*/
|
|
@@ -98,6 +76,7 @@ const Field = ({
|
|
|
98
76
|
fieldType,
|
|
99
77
|
hasVisibleLabel,
|
|
100
78
|
hint,
|
|
79
|
+
HintLinkComponent,
|
|
101
80
|
id: idOverride,
|
|
102
81
|
isDisabled: isDisabledProp = false,
|
|
103
82
|
isFullWidth = false,
|
|
@@ -105,7 +84,17 @@ const Field = ({
|
|
|
105
84
|
isOptional = false,
|
|
106
85
|
label,
|
|
107
86
|
renderFieldComponent,
|
|
108
|
-
}: FieldProps
|
|
87
|
+
}: FieldProps &
|
|
88
|
+
Pick<
|
|
89
|
+
FieldComponentProps,
|
|
90
|
+
| "errorMessage"
|
|
91
|
+
| "hint"
|
|
92
|
+
| "HintLinkComponent"
|
|
93
|
+
| "id"
|
|
94
|
+
| "isDisabled"
|
|
95
|
+
| "isFullWidth"
|
|
96
|
+
| "isOptional"
|
|
97
|
+
>) => {
|
|
109
98
|
const { t } = useTranslation();
|
|
110
99
|
|
|
111
100
|
const id = useUniqueId(idOverride);
|
|
@@ -152,7 +141,9 @@ const Field = ({
|
|
|
152
141
|
/>
|
|
153
142
|
)}
|
|
154
143
|
|
|
155
|
-
{hint &&
|
|
144
|
+
{hint && (
|
|
145
|
+
<FieldHint id={hintId} LinkComponent={HintLinkComponent} text={hint} />
|
|
146
|
+
)}
|
|
156
147
|
|
|
157
148
|
{renderFieldComponent({
|
|
158
149
|
ariaDescribedBy,
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { ReactElement } from "react";
|
|
14
|
+
|
|
15
|
+
import { HintLink } from "./HintLink";
|
|
16
|
+
|
|
13
17
|
export type FieldComponentProps = {
|
|
14
18
|
/**
|
|
15
19
|
* If `error` is not undefined, the `input` will indicate an error.
|
|
@@ -19,6 +23,10 @@ export type FieldComponentProps = {
|
|
|
19
23
|
* The helper text content.
|
|
20
24
|
*/
|
|
21
25
|
hint?: string;
|
|
26
|
+
/**
|
|
27
|
+
* A `Link` component to provide greater context that is rendered at the end of the `hint` text
|
|
28
|
+
*/
|
|
29
|
+
HintLinkComponent?: ReactElement<typeof HintLink>;
|
|
22
30
|
/**
|
|
23
31
|
* The id of the `input` element.
|
|
24
32
|
*/
|
package/src/FieldHint.tsx
CHANGED
|
@@ -14,17 +14,24 @@ import { memo } from "react";
|
|
|
14
14
|
|
|
15
15
|
import { FormHelperText } from "@mui/material";
|
|
16
16
|
|
|
17
|
+
import { FieldComponentProps } from "./FieldComponentProps";
|
|
17
18
|
import type { SeleniumProps } from "./SeleniumProps";
|
|
18
19
|
|
|
19
20
|
export type FieldHintProps = {
|
|
21
|
+
LinkComponent?: FieldComponentProps["HintLinkComponent"];
|
|
20
22
|
id?: string;
|
|
21
23
|
text: string;
|
|
22
24
|
} & SeleniumProps;
|
|
23
25
|
|
|
24
|
-
const FieldHint = ({ id, testId, text }: FieldHintProps) => {
|
|
26
|
+
const FieldHint = ({ id, LinkComponent, testId, text }: FieldHintProps) => {
|
|
25
27
|
return (
|
|
26
28
|
<FormHelperText data-se={testId} id={id}>
|
|
27
29
|
{text}
|
|
30
|
+
{LinkComponent && (
|
|
31
|
+
<>
|
|
32
|
+
<span> {LinkComponent}</span>
|
|
33
|
+
</>
|
|
34
|
+
)}
|
|
28
35
|
</FormHelperText>
|
|
29
36
|
);
|
|
30
37
|
};
|
package/src/HintLink.tsx
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { memo } from "react";
|
|
14
|
+
|
|
15
|
+
import { Link, LinkProps } from "./Link";
|
|
16
|
+
|
|
17
|
+
const HintLink = (
|
|
18
|
+
props: Pick<
|
|
19
|
+
LinkProps,
|
|
20
|
+
"children" | "href" | "onClick" | "rel" | "target" | "testId"
|
|
21
|
+
>
|
|
22
|
+
) => <Link {...props} variant="default" />;
|
|
23
|
+
|
|
24
|
+
const MemoizedHintLink = memo(HintLink);
|
|
25
|
+
|
|
26
|
+
MemoizedHintLink.displayName = "HintLink";
|
|
27
|
+
|
|
28
|
+
export { MemoizedHintLink as HintLink };
|
package/src/NativeSelect.tsx
CHANGED
|
@@ -81,7 +81,13 @@ export type NativeSelectProps<
|
|
|
81
81
|
value?: Value;
|
|
82
82
|
} & Pick<
|
|
83
83
|
FieldComponentProps,
|
|
84
|
-
|
|
84
|
+
| "errorMessage"
|
|
85
|
+
| "hint"
|
|
86
|
+
| "HintLinkComponent"
|
|
87
|
+
| "id"
|
|
88
|
+
| "isDisabled"
|
|
89
|
+
| "isFullWidth"
|
|
90
|
+
| "isOptional"
|
|
85
91
|
> &
|
|
86
92
|
SeleniumProps;
|
|
87
93
|
|
|
@@ -95,6 +101,7 @@ const NativeSelect: ForwardRefWithType = forwardRef(
|
|
|
95
101
|
errorMessage,
|
|
96
102
|
hasMultipleChoices: hasMultipleChoicesProp,
|
|
97
103
|
hint,
|
|
104
|
+
HintLinkComponent,
|
|
98
105
|
id: idOverride,
|
|
99
106
|
isDisabled = false,
|
|
100
107
|
isFullWidth = false,
|
|
@@ -178,6 +185,7 @@ const NativeSelect: ForwardRefWithType = forwardRef(
|
|
|
178
185
|
fieldType="single"
|
|
179
186
|
hasVisibleLabel
|
|
180
187
|
hint={hint}
|
|
188
|
+
HintLinkComponent={HintLinkComponent}
|
|
181
189
|
id={idOverride}
|
|
182
190
|
isDisabled={isDisabled}
|
|
183
191
|
isFullWidth={isFullWidth}
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -45,7 +45,7 @@ export type RadioGroupProps = {
|
|
|
45
45
|
value?: RadioProps["value"];
|
|
46
46
|
} & Pick<
|
|
47
47
|
FieldComponentProps,
|
|
48
|
-
"errorMessage" | "hint" | "id" | "isDisabled" | "name"
|
|
48
|
+
"errorMessage" | "hint" | "HintLinkComponent" | "id" | "isDisabled" | "name"
|
|
49
49
|
> &
|
|
50
50
|
SeleniumProps;
|
|
51
51
|
|
|
@@ -54,6 +54,7 @@ const RadioGroup = ({
|
|
|
54
54
|
defaultValue,
|
|
55
55
|
errorMessage,
|
|
56
56
|
hint,
|
|
57
|
+
HintLinkComponent,
|
|
57
58
|
id: idOverride,
|
|
58
59
|
isDisabled,
|
|
59
60
|
label,
|
|
@@ -101,6 +102,7 @@ const RadioGroup = ({
|
|
|
101
102
|
fieldType="group"
|
|
102
103
|
hasVisibleLabel={false}
|
|
103
104
|
hint={hint}
|
|
105
|
+
HintLinkComponent={HintLinkComponent}
|
|
104
106
|
id={idOverride}
|
|
105
107
|
isDisabled={isDisabled}
|
|
106
108
|
label={label}
|
package/src/Select.tsx
CHANGED
|
@@ -86,11 +86,12 @@ export type SelectProps<
|
|
|
86
86
|
FieldComponentProps,
|
|
87
87
|
| "errorMessage"
|
|
88
88
|
| "hint"
|
|
89
|
+
| "HintLinkComponent"
|
|
89
90
|
| "id"
|
|
90
91
|
| "isDisabled"
|
|
92
|
+
| "isFullWidth"
|
|
91
93
|
| "isOptional"
|
|
92
94
|
| "name"
|
|
93
|
-
| "isFullWidth"
|
|
94
95
|
> &
|
|
95
96
|
SeleniumProps;
|
|
96
97
|
|
|
@@ -118,6 +119,7 @@ const Select = <
|
|
|
118
119
|
errorMessage,
|
|
119
120
|
hasMultipleChoices: hasMultipleChoicesProp,
|
|
120
121
|
hint,
|
|
122
|
+
HintLinkComponent,
|
|
121
123
|
id: idOverride,
|
|
122
124
|
isDisabled = false,
|
|
123
125
|
isFullWidth = false,
|
|
@@ -287,6 +289,7 @@ const Select = <
|
|
|
287
289
|
fieldType="single"
|
|
288
290
|
hasVisibleLabel
|
|
289
291
|
hint={hint}
|
|
292
|
+
HintLinkComponent={HintLinkComponent}
|
|
290
293
|
id={idOverride}
|
|
291
294
|
isDisabled={isDisabled}
|
|
292
295
|
isFullWidth={isFullWidth}
|
package/src/TextField.tsx
CHANGED
|
@@ -102,6 +102,7 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
102
102
|
endAdornment,
|
|
103
103
|
errorMessage,
|
|
104
104
|
hint,
|
|
105
|
+
HintLinkComponent,
|
|
105
106
|
id: idOverride,
|
|
106
107
|
isDisabled = false,
|
|
107
108
|
isFullWidth = false,
|
|
@@ -204,6 +205,7 @@ const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
204
205
|
fieldType="single"
|
|
205
206
|
hasVisibleLabel
|
|
206
207
|
hint={hint}
|
|
208
|
+
HintLinkComponent={HintLinkComponent}
|
|
207
209
|
id={idOverride}
|
|
208
210
|
isDisabled={isDisabled}
|
|
209
211
|
isFullWidth={isFullWidth}
|
package/src/index.ts
CHANGED
package/src/labs/DataTable.tsx
CHANGED
|
@@ -189,6 +189,12 @@ export type DataTableProps = {
|
|
|
189
189
|
* firing on input change.
|
|
190
190
|
*/
|
|
191
191
|
hasSearchSubmitButton?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* The debounce time, in milliseconds, for the search input firing
|
|
194
|
+
* `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,
|
|
195
|
+
* this doesn't do anything.
|
|
196
|
+
*/
|
|
197
|
+
searchDelayTime?: number;
|
|
192
198
|
/**
|
|
193
199
|
* Callback that fires when a row (or rows) is selected or unselected.
|
|
194
200
|
*/
|
|
@@ -259,6 +265,7 @@ const DataTable = ({
|
|
|
259
265
|
reorderDataFn,
|
|
260
266
|
totalRows,
|
|
261
267
|
hasSearchSubmitButton,
|
|
268
|
+
searchDelayTime,
|
|
262
269
|
paginationType = "paged",
|
|
263
270
|
onRowSelectionChange,
|
|
264
271
|
rowActionButtons,
|
|
@@ -628,7 +635,14 @@ const DataTable = ({
|
|
|
628
635
|
)}
|
|
629
636
|
</>
|
|
630
637
|
),
|
|
631
|
-
[
|
|
638
|
+
[
|
|
639
|
+
columnVisibility,
|
|
640
|
+
columns,
|
|
641
|
+
density,
|
|
642
|
+
hasChangeableDensity,
|
|
643
|
+
handleColumnVisibility,
|
|
644
|
+
hasColumnVisibility,
|
|
645
|
+
]
|
|
632
646
|
);
|
|
633
647
|
|
|
634
648
|
return (
|
|
@@ -637,6 +651,7 @@ const DataTable = ({
|
|
|
637
651
|
onChangeSearch={hasSearch ? handleSearch : undefined}
|
|
638
652
|
onChangeFilters={handleFilters}
|
|
639
653
|
hasSearchSubmitButton={hasSearchSubmitButton}
|
|
654
|
+
searchDelayTime={searchDelayTime}
|
|
640
655
|
additionalActions={tableSettings}
|
|
641
656
|
filters={
|
|
642
657
|
hasFilters
|
package/src/theme/components.tsx
CHANGED
|
@@ -20,6 +20,7 @@ import { chipClasses } from "@mui/material/Chip";
|
|
|
20
20
|
import { dividerClasses } from "@mui/material/Divider";
|
|
21
21
|
import { formControlLabelClasses } from "@mui/material/FormControlLabel";
|
|
22
22
|
import { formLabelClasses } from "@mui/material/FormLabel";
|
|
23
|
+
import { formGroupClasses } from "@mui/material/FormGroup";
|
|
23
24
|
import { inputAdornmentClasses } from "@mui/material/InputAdornment";
|
|
24
25
|
import { inputBaseClasses } from "@mui/material/InputBase";
|
|
25
26
|
import { listItemIconClasses } from "@mui/material/ListItemIcon";
|
|
@@ -453,34 +454,46 @@ export const components = ({
|
|
|
453
454
|
MuiBreadcrumbs: {
|
|
454
455
|
styleOverrides: {
|
|
455
456
|
li: {
|
|
456
|
-
fontSize: odysseyTokens.
|
|
457
|
-
|
|
457
|
+
fontSize: odysseyTokens.TypographySizeSubordinate,
|
|
458
|
+
|
|
459
|
+
"& svg": {
|
|
460
|
+
width: odysseyTokens.Spacing3,
|
|
461
|
+
},
|
|
462
|
+
|
|
463
|
+
"& > p": {
|
|
464
|
+
paddingInline: odysseyTokens.Spacing1,
|
|
465
|
+
},
|
|
458
466
|
|
|
459
467
|
"& > a, & > button": {
|
|
460
468
|
borderRadius: odysseyTokens.BorderRadiusTight,
|
|
461
469
|
color: odysseyTokens.TypographyColorSubordinate,
|
|
462
470
|
display: "flex",
|
|
463
471
|
gap: odysseyTokens.Spacing1,
|
|
464
|
-
|
|
472
|
+
paddingInline: odysseyTokens.Spacing1,
|
|
473
|
+
paddingBlock: 2,
|
|
465
474
|
transitionProperty: "color, background-color",
|
|
466
475
|
transitionDuration: "100ms",
|
|
467
476
|
transitionTimingFunction: "linear",
|
|
468
477
|
|
|
469
478
|
"&:hover": {
|
|
470
|
-
backgroundColor: odysseyTokens.
|
|
479
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
471
480
|
color: odysseyTokens.TypographyColorBody,
|
|
472
481
|
},
|
|
473
482
|
|
|
474
483
|
"&:focus-visible": {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
484
|
+
outlineWidth: 2,
|
|
485
|
+
outlineStyle: "solid",
|
|
486
|
+
outlineColor: odysseyTokens.PalettePrimaryMain,
|
|
487
|
+
outlineOffset: -2,
|
|
478
488
|
},
|
|
479
489
|
},
|
|
480
490
|
},
|
|
481
491
|
separator: {
|
|
482
492
|
color: odysseyTokens.BorderColorDisplay,
|
|
483
|
-
|
|
493
|
+
fontSize: odysseyTokens.TypographySizeSubordinate,
|
|
494
|
+
fontWeight: odysseyTokens.TypographyWeightBodyBold,
|
|
495
|
+
marginInlineStart: 6,
|
|
496
|
+
marginInlineEnd: 4,
|
|
484
497
|
},
|
|
485
498
|
},
|
|
486
499
|
},
|
|
@@ -770,7 +783,7 @@ export const components = ({
|
|
|
770
783
|
},
|
|
771
784
|
|
|
772
785
|
[`.${svgIconClasses.root}`]: {
|
|
773
|
-
color: odysseyTokens.
|
|
786
|
+
color: odysseyTokens.HueNeutral300,
|
|
774
787
|
},
|
|
775
788
|
},
|
|
776
789
|
}),
|
|
@@ -948,8 +961,8 @@ export const components = ({
|
|
|
948
961
|
},
|
|
949
962
|
MuiCircularProgress: {
|
|
950
963
|
defaultProps: {
|
|
951
|
-
size: odysseyTokens.
|
|
952
|
-
thickness:
|
|
964
|
+
size: odysseyTokens.Spacing5,
|
|
965
|
+
thickness: 10,
|
|
953
966
|
color: "primary",
|
|
954
967
|
disableShrink: false,
|
|
955
968
|
variant: "indeterminate",
|
|
@@ -957,7 +970,7 @@ export const components = ({
|
|
|
957
970
|
styleOverrides: {
|
|
958
971
|
root: ({ ownerState }) => ({
|
|
959
972
|
...(ownerState.color !== "inherit" && {
|
|
960
|
-
color: odysseyTokens.
|
|
973
|
+
color: odysseyTokens.PalettePrimaryMain,
|
|
961
974
|
}),
|
|
962
975
|
}),
|
|
963
976
|
circle: ({ ownerState }) => ({
|
|
@@ -1449,6 +1462,9 @@ export const components = ({
|
|
|
1449
1462
|
...(ownerState.fullWidth && {
|
|
1450
1463
|
maxWidth: "100%",
|
|
1451
1464
|
}),
|
|
1465
|
+
[`& .${formGroupClasses.root}`]: {
|
|
1466
|
+
marginBlockStart: odysseyTokens.Spacing1,
|
|
1467
|
+
},
|
|
1452
1468
|
}),
|
|
1453
1469
|
},
|
|
1454
1470
|
},
|
|
@@ -1474,6 +1490,9 @@ export const components = ({
|
|
|
1474
1490
|
"&.Mui-disabled": {
|
|
1475
1491
|
pointerEvents: "none",
|
|
1476
1492
|
},
|
|
1493
|
+
[`& .${checkboxClasses.root}`]: {
|
|
1494
|
+
marginBlockStart: 0,
|
|
1495
|
+
},
|
|
1477
1496
|
[`&:hover .${radioClasses.root}, &:hover .${checkboxClasses.root}`]: {
|
|
1478
1497
|
color: odysseyTokens.TypographyColorBody,
|
|
1479
1498
|
},
|
|
@@ -1492,6 +1511,7 @@ export const components = ({
|
|
|
1492
1511
|
}),
|
|
1493
1512
|
label: {
|
|
1494
1513
|
gap: odysseyTokens.Spacing1,
|
|
1514
|
+
lineHeight: odysseyTokens.TypographyLineHeightUi,
|
|
1495
1515
|
},
|
|
1496
1516
|
asterisk: () => ({
|
|
1497
1517
|
display: "none",
|
|
@@ -1504,6 +1524,9 @@ export const components = ({
|
|
|
1504
1524
|
},
|
|
1505
1525
|
styleOverrides: {
|
|
1506
1526
|
root: {
|
|
1527
|
+
display: "flex",
|
|
1528
|
+
justifyContent: "flex-start",
|
|
1529
|
+
alignItems: "center",
|
|
1507
1530
|
fontSize: odysseyTokens.TypographySizeSubordinate,
|
|
1508
1531
|
lineHeight: odysseyTokens.TypographyLineHeightBody,
|
|
1509
1532
|
marginBlockStart: odysseyTokens.Spacing2,
|
|
@@ -1516,6 +1539,10 @@ export const components = ({
|
|
|
1516
1539
|
marginBlockEnd: 0,
|
|
1517
1540
|
},
|
|
1518
1541
|
textAlign: "start",
|
|
1542
|
+
|
|
1543
|
+
".field-hint-link-component": {
|
|
1544
|
+
marginInlineStart: odysseyTokens.Spacing1,
|
|
1545
|
+
},
|
|
1519
1546
|
},
|
|
1520
1547
|
},
|
|
1521
1548
|
},
|
|
@@ -1987,8 +2014,8 @@ export const components = ({
|
|
|
1987
2014
|
"&::before": {
|
|
1988
2015
|
content: "''",
|
|
1989
2016
|
position: "absolute",
|
|
1990
|
-
width:
|
|
1991
|
-
height:
|
|
2017
|
+
width: odysseyTokens.Spacing2,
|
|
2018
|
+
height: odysseyTokens.Spacing2,
|
|
1992
2019
|
borderRadius: "50%",
|
|
1993
2020
|
backgroundColor: "transparent",
|
|
1994
2021
|
transition: theme.transitions.create(["background-color"], {
|
|
@@ -2032,10 +2059,10 @@ export const components = ({
|
|
|
2032
2059
|
},
|
|
2033
2060
|
"&.Mui-disabled": {
|
|
2034
2061
|
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2035
|
-
borderColor: odysseyTokens.
|
|
2062
|
+
borderColor: odysseyTokens.BorderColorDisabled,
|
|
2036
2063
|
|
|
2037
2064
|
"&.Mui-checked::before": {
|
|
2038
|
-
backgroundColor: odysseyTokens.
|
|
2065
|
+
backgroundColor: odysseyTokens.BorderColorDisabled,
|
|
2039
2066
|
},
|
|
2040
2067
|
},
|
|
2041
2068
|
}),
|