@okta/odyssey-react-mui 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/@types/i18next.d.js.map +1 -1
- package/dist/Autocomplete.js +32 -0
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Banner.js +6 -2
- package/dist/Banner.js.map +1 -1
- package/dist/Callout.js +18 -26
- package/dist/Callout.js.map +1 -1
- package/dist/ContrastModeProvider.js +86 -0
- package/dist/ContrastModeProvider.js.map +1 -0
- package/dist/DataTable/useScrollIndication.js +7 -3
- package/dist/DataTable/useScrollIndication.js.map +1 -1
- package/dist/FieldHint.js +20 -6
- package/dist/FieldHint.js.map +1 -1
- package/dist/FileUploader/FileUploadIllustration.js.map +1 -0
- package/dist/FileUploader/FileUploadPreview.js.map +1 -0
- package/dist/{labs/FileUpload.js → FileUploader/FileUploader.js} +6 -5
- package/dist/FileUploader/FileUploader.js.map +1 -0
- package/dist/FileUploader/index.js +13 -0
- package/dist/FileUploader/index.js.map +1 -0
- package/dist/Link.js.map +1 -1
- package/dist/OdysseyProvider.js +43 -19
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/Radio.js +2 -2
- package/dist/Radio.js.map +1 -1
- package/dist/Select.js +36 -0
- package/dist/Select.js.map +1 -1
- package/dist/Stack.js +32 -0
- package/dist/Stack.js.map +1 -0
- package/dist/{labs/Switch.js → Switch.js} +7 -7
- package/dist/Switch.js.map +1 -0
- package/dist/Tabs.js +7 -9
- package/dist/Tabs.js.map +1 -1
- package/dist/Tag.js +144 -4
- package/dist/Tag.js.map +1 -1
- package/dist/TextField.js +16 -39
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +2 -2
- package/dist/Toast.js.map +1 -1
- package/dist/Typography.js +27 -6
- package/dist/Typography.js.map +1 -1
- package/dist/createShadowDomElements.js +1 -0
- package/dist/createShadowDomElements.js.map +1 -1
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.scss +96 -4
- package/dist/labs/DataView/DataView.js +64 -25
- package/dist/labs/DataView/DataView.js.map +1 -1
- package/dist/labs/DataView/TableLayoutContent.js +17 -3
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/labs/DataView/componentTypes.js.map +1 -1
- package/dist/labs/DateField.js +2 -0
- package/dist/labs/DateField.js.map +1 -1
- package/dist/labs/DatePicker.js +5 -1
- package/dist/labs/DatePicker.js.map +1 -1
- package/dist/labs/SideNav/OktaLogo.js +36 -0
- package/dist/labs/SideNav/OktaLogo.js.map +1 -0
- package/dist/labs/SideNav/SideNav.js +125 -36
- package/dist/labs/SideNav/SideNav.js.map +1 -1
- package/dist/labs/SideNav/SideNavHeader.js +33 -10
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
- package/dist/labs/SideNav/types.js.map +1 -1
- package/dist/labs/TopNav.js +2 -1
- package/dist/labs/TopNav.js.map +1 -1
- package/dist/labs/datePickerTheme.js +3 -6
- package/dist/labs/datePickerTheme.js.map +1 -1
- package/dist/labs/index.js +0 -2
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/useDateFieldsTranslations.js +1 -1
- package/dist/labs/useDateFieldsTranslations.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +3 -1
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +37 -1
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Banner.d.ts +16 -12
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/Callout.d.ts +20 -32
- package/dist/src/Callout.d.ts.map +1 -1
- package/dist/src/ContrastModeProvider.d.ts +34 -0
- package/dist/src/ContrastModeProvider.d.ts.map +1 -0
- package/dist/src/DataTable/useScrollIndication.d.ts.map +1 -1
- package/dist/src/FieldHint.d.ts.map +1 -1
- package/dist/src/FileUploader/FileUploadIllustration.d.ts.map +1 -0
- package/dist/src/{labs → FileUploader}/FileUploadPreview.d.ts +2 -2
- package/dist/src/FileUploader/FileUploadPreview.d.ts.map +1 -0
- package/dist/src/{labs/FileUpload.d.ts → FileUploader/FileUploader.d.ts} +5 -4
- package/dist/src/FileUploader/FileUploader.d.ts.map +1 -0
- package/dist/src/FileUploader/index.d.ts +13 -0
- package/dist/src/FileUploader/index.d.ts.map +1 -0
- package/dist/src/Link.d.ts +3 -1
- package/dist/src/Link.d.ts.map +1 -1
- package/dist/src/NativeSelect.d.ts +1 -1
- package/dist/src/OdysseyProvider.d.ts +5 -3
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +1 -1
- package/dist/src/SearchField.d.ts +1 -1
- package/dist/src/Select.d.ts +36 -0
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Stack.d.ts +33 -0
- package/dist/src/Stack.d.ts.map +1 -0
- package/dist/src/{labs/Switch.d.ts → Switch.d.ts} +3 -3
- package/dist/src/Switch.d.ts.map +1 -0
- package/dist/src/Tabs.d.ts +6 -8
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +7 -1
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +17 -40
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Typography.d.ts +3 -2
- package/dist/src/Typography.d.ts.map +1 -1
- package/dist/src/createShadowDomElements.d.ts.map +1 -1
- package/dist/src/i18n.d.ts +2 -2
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataView.d.ts +1 -1
- package/dist/src/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/src/labs/DataView/TableLayoutContent.d.ts +2 -1
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts +10 -0
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DateField.d.ts +2 -2
- package/dist/src/labs/DateField.d.ts.map +1 -1
- package/dist/src/labs/DatePicker.d.ts +2 -2
- package/dist/src/labs/DatePicker.d.ts.map +1 -1
- package/dist/{test-selectors/odysseyTestSelectors.js → src/labs/SideNav/OktaLogo.d.ts} +3 -9
- package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNav.d.ts +2 -1
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavHeader.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/src/labs/SideNav/types.d.ts +28 -5
- package/dist/src/labs/SideNav/types.d.ts.map +1 -1
- package/dist/src/labs/TopNav.d.ts +1 -0
- package/dist/src/labs/TopNav.d.ts.map +1 -1
- package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +0 -2
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/test-selectors/getByQuerySelector.d.ts +148 -0
- package/dist/src/test-selectors/getByQuerySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts +14 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts.map +1 -0
- package/dist/src/test-selectors/{featureTestSelector.d.ts → getComputedAccessibleText.d.ts} +11 -19
- package/dist/src/test-selectors/getComputedAccessibleText.d.ts.map +1 -0
- package/dist/src/test-selectors/index.d.ts +2 -2
- package/dist/src/test-selectors/index.d.ts.map +1 -1
- package/dist/src/test-selectors/interpolateString.d.ts +15 -0
- package/dist/src/test-selectors/interpolateString.d.ts.map +1 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts +24 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts.map +1 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts +5755 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/querySelector.d.ts +59 -3613
- package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
- package/dist/src/test-selectors/sanityChecks.d.ts +18 -0
- package/dist/src/test-selectors/sanityChecks.d.ts.map +1 -0
- package/dist/src/test-selectors/testSelector.d.ts +46 -0
- package/dist/src/test-selectors/testSelector.d.ts.map +1 -0
- package/dist/src/theme/palette.d.ts.map +1 -1
- package/dist/src/theme/palette.types.d.ts +2 -0
- package/dist/src/theme/palette.types.d.ts.map +1 -1
- package/dist/test-selectors/getByQuerySelector.js +64 -0
- package/dist/test-selectors/getByQuerySelector.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js +25 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleText.js +24 -0
- package/dist/test-selectors/getComputedAccessibleText.js.map +1 -0
- package/dist/test-selectors/index.js +2 -2
- package/dist/test-selectors/index.js.map +1 -1
- package/{src/test-selectors/featureTestSelector.ts → dist/test-selectors/interpolateString.js} +11 -27
- package/dist/test-selectors/interpolateString.js.map +1 -0
- package/dist/test-selectors/linkedHtmlSelectors.js +34 -0
- package/dist/test-selectors/linkedHtmlSelectors.js.map +1 -0
- package/dist/test-selectors/queryOdysseySelector.js +26 -0
- package/dist/test-selectors/queryOdysseySelector.js.map +1 -0
- package/dist/test-selectors/querySelector.js +82 -58
- package/dist/test-selectors/querySelector.js.map +1 -1
- package/dist/test-selectors/sanityChecks.js +33 -0
- package/dist/test-selectors/sanityChecks.js.map +1 -0
- package/dist/test-selectors/testSelector.js +2 -0
- package/dist/test-selectors/testSelector.js.map +1 -0
- package/dist/test-selectors/testSelectors.json +1 -1
- package/dist/theme/components.js +276 -274
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/palette.js +2 -1
- package/dist/theme/palette.js.map +1 -1
- package/dist/theme/palette.types.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.setup.js +3 -0
- package/package.json +5 -4
- package/scripts/generateTestSelectorsJson.ts +1 -1
- package/src/@types/i18next.d.ts +1 -1
- package/src/Autocomplete.tsx +45 -0
- package/src/Banner.tsx +29 -14
- package/src/Callout.tsx +31 -36
- package/src/ContrastModeProvider.tsx +131 -0
- package/src/DataTable/useScrollIndication.tsx +9 -2
- package/src/FieldHint.tsx +28 -4
- package/src/{labs → FileUploader}/FileUploadPreview.tsx +3 -3
- package/src/{labs/FileUpload.tsx → FileUploader/FileUploader.tsx} +7 -6
- package/src/FileUploader/index.ts +13 -0
- package/src/Link.tsx +3 -1
- package/src/OdysseyCacheProvider.test.tsx +1 -0
- package/src/OdysseyProvider.tsx +58 -26
- package/src/Radio.tsx +2 -2
- package/src/Select.tsx +38 -0
- package/src/Stack.tsx +56 -0
- package/src/{labs/Switch.tsx → Switch.tsx} +10 -10
- package/src/Tabs.tsx +8 -10
- package/src/Tag.tsx +178 -3
- package/src/TextField.tsx +18 -41
- package/src/Toast.tsx +1 -1
- package/src/{test-selectors/odysseyTestSelectors.ts → Typography.test.tsx} +13 -9
- package/src/Typography.tsx +38 -6
- package/src/createShadowDomElements.ts +3 -0
- package/src/i18n.ts +3 -3
- package/src/index.ts +10 -1
- package/src/labs/DataView/DataView.test.tsx +158 -0
- package/src/labs/DataView/DataView.tsx +98 -50
- package/src/labs/DataView/TableLayoutContent.tsx +28 -1
- package/src/labs/DataView/componentTypes.ts +13 -0
- package/src/labs/DateField.tsx +3 -0
- package/src/labs/DatePicker.tsx +12 -1
- package/src/labs/SideNav/OktaLogo.tsx +39 -0
- package/src/labs/SideNav/SideNav.tsx +187 -51
- package/src/labs/SideNav/SideNavHeader.tsx +30 -7
- package/src/labs/SideNav/types.ts +32 -5
- package/src/labs/TopNav.tsx +3 -1
- package/src/labs/datePickerTheme.tsx +2 -6
- package/src/labs/index.ts +0 -3
- package/src/labs/useDateFieldsTranslations.ts +1 -1
- package/src/properties/odyssey-react-mui.properties +2 -1
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/test-selectors/getByQuerySelector.ts +176 -0
- package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +52 -0
- package/src/test-selectors/getComputedAccessibleText.ts +36 -0
- package/src/test-selectors/index.ts +2 -2
- package/src/test-selectors/interpolateString.ts +41 -0
- package/src/test-selectors/linkedHtmlSelectors.ts +73 -0
- package/src/test-selectors/queryOdysseySelector.ts +36 -0
- package/src/test-selectors/querySelector.ts +221 -170
- package/src/test-selectors/sanityChecks.ts +53 -0
- package/src/test-selectors/testSelector.ts +143 -0
- package/src/theme/components.tsx +284 -284
- package/src/theme/palette.ts +2 -1
- package/src/theme/palette.types.ts +2 -0
- package/dist/labs/FileUpload.js.map +0 -1
- package/dist/labs/FileUploadIllustration.js.map +0 -1
- package/dist/labs/FileUploadPreview.js.map +0 -1
- package/dist/labs/Switch.js.map +0 -1
- package/dist/src/labs/FileUpload.d.ts.map +0 -1
- package/dist/src/labs/FileUploadIllustration.d.ts.map +0 -1
- package/dist/src/labs/FileUploadPreview.d.ts.map +0 -1
- package/dist/src/labs/Switch.d.ts.map +0 -1
- package/dist/src/test-selectors/featureTestSelector.d.ts.map +0 -1
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts +0 -120
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +0 -1
- package/dist/test-selectors/featureTestSelector.js +0 -2
- package/dist/test-selectors/featureTestSelector.js.map +0 -1
- package/dist/test-selectors/odysseyTestSelectors.js.map +0 -1
- /package/dist/{labs → FileUploader}/FileUploadIllustration.js +0 -0
- /package/dist/{labs → FileUploader}/FileUploadPreview.js +0 -0
- /package/dist/src/{labs → FileUploader}/FileUploadIllustration.d.ts +0 -0
- /package/src/{labs → FileUploader}/FileUploadIllustration.tsx +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-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 React, {
|
|
14
|
+
createContext,
|
|
15
|
+
useContext,
|
|
16
|
+
useRef,
|
|
17
|
+
useLayoutEffect,
|
|
18
|
+
useState,
|
|
19
|
+
useMemo,
|
|
20
|
+
ReactNode,
|
|
21
|
+
} from "react";
|
|
22
|
+
import { createTheme, ThemeProvider, useTheme } from "@mui/material/styles";
|
|
23
|
+
import * as Tokens from "@okta/odyssey-design-tokens";
|
|
24
|
+
|
|
25
|
+
declare module "@mui/material/styles" {
|
|
26
|
+
interface Theme {
|
|
27
|
+
odysseyContrastMode: ContrastMode;
|
|
28
|
+
}
|
|
29
|
+
interface ThemeOptions {
|
|
30
|
+
odysseyContrastMode?: ContrastMode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ContrastMode = "lowContrast" | "highContrast";
|
|
35
|
+
|
|
36
|
+
export type ContrastModeContextType = {
|
|
37
|
+
contrastMode: ContrastMode;
|
|
38
|
+
parentBackgroundColor: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const ContrastModeContext = createContext<ContrastModeContextType>({
|
|
42
|
+
contrastMode: "highContrast",
|
|
43
|
+
parentBackgroundColor: "",
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const useContrastContext = () => useContext(ContrastModeContext);
|
|
47
|
+
|
|
48
|
+
const hexToRgb = (hex: string): string => {
|
|
49
|
+
const bigint = parseInt(hex.slice(1), 16);
|
|
50
|
+
const r = (bigint >> 16) & 255;
|
|
51
|
+
const g = (bigint >> 8) & 255;
|
|
52
|
+
const b = bigint & 255;
|
|
53
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const useParentBackgroundColor = (ref: React.RefObject<HTMLElement>) => {
|
|
57
|
+
const [backgroundColor, setBackgroundColor] = useState("");
|
|
58
|
+
|
|
59
|
+
const hueNeutral50Rgb = useMemo(() => hexToRgb(Tokens.HueNeutral50), []);
|
|
60
|
+
|
|
61
|
+
useLayoutEffect(() => {
|
|
62
|
+
if (ref.current) {
|
|
63
|
+
let element: HTMLElement | null = ref.current;
|
|
64
|
+
while (element) {
|
|
65
|
+
const bgColor = window.getComputedStyle(element).backgroundColor;
|
|
66
|
+
|
|
67
|
+
if (bgColor !== "rgba(0, 0, 0, 0)" && bgColor !== "transparent") {
|
|
68
|
+
if (bgColor === hueNeutral50Rgb) {
|
|
69
|
+
setBackgroundColor(Tokens.HueNeutral50);
|
|
70
|
+
} else {
|
|
71
|
+
setBackgroundColor(bgColor);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
element = element.parentElement;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [ref, hueNeutral50Rgb]);
|
|
79
|
+
|
|
80
|
+
return backgroundColor;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type ContrastModeProviderProps = {
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
contrastMode?: ContrastMode;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const ContrastModeProvider = ({
|
|
89
|
+
children,
|
|
90
|
+
contrastMode: explicitContrastMode,
|
|
91
|
+
}: ContrastModeProviderProps) => {
|
|
92
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
93
|
+
const parentBackgroundColor = useParentBackgroundColor(ref);
|
|
94
|
+
const [contrastMode, setContrastMode] =
|
|
95
|
+
useState<ContrastMode>("highContrast");
|
|
96
|
+
|
|
97
|
+
useLayoutEffect(() => {
|
|
98
|
+
if (explicitContrastMode) {
|
|
99
|
+
setContrastMode(explicitContrastMode);
|
|
100
|
+
} else {
|
|
101
|
+
const isLowContrast = parentBackgroundColor === Tokens.HueNeutral50;
|
|
102
|
+
setContrastMode(isLowContrast ? "lowContrast" : "highContrast");
|
|
103
|
+
}
|
|
104
|
+
}, [parentBackgroundColor, explicitContrastMode]);
|
|
105
|
+
|
|
106
|
+
const contextValue = useMemo<ContrastModeContextType>(
|
|
107
|
+
() => ({
|
|
108
|
+
contrastMode,
|
|
109
|
+
parentBackgroundColor,
|
|
110
|
+
}),
|
|
111
|
+
[contrastMode, parentBackgroundColor],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const existingTheme = useTheme();
|
|
115
|
+
const theme = useMemo(
|
|
116
|
+
() =>
|
|
117
|
+
createTheme({
|
|
118
|
+
...existingTheme,
|
|
119
|
+
odysseyContrastMode: contrastMode,
|
|
120
|
+
}),
|
|
121
|
+
[existingTheme, contrastMode],
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<div ref={ref}>
|
|
126
|
+
<ContrastModeContext.Provider value={contextValue}>
|
|
127
|
+
<ThemeProvider theme={theme}>{children}</ThemeProvider>
|
|
128
|
+
</ContrastModeContext.Provider>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
useEffect,
|
|
18
18
|
useRef,
|
|
19
19
|
} from "react";
|
|
20
|
+
import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext";
|
|
20
21
|
|
|
21
22
|
type UseScrollIndicationProps = {
|
|
22
23
|
tableOuterContainer: HTMLDivElement | null;
|
|
@@ -36,6 +37,8 @@ export const useScrollIndication = ({
|
|
|
36
37
|
|
|
37
38
|
const resizeObserverRef = useRef<ResizeObserver | null>(null);
|
|
38
39
|
|
|
40
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
41
|
+
|
|
39
42
|
const checkScrollIndicators = useCallback(() => {
|
|
40
43
|
if (!tableOuterContainer || !tableInnerContainer) return;
|
|
41
44
|
|
|
@@ -57,7 +60,10 @@ export const useScrollIndication = ({
|
|
|
57
60
|
]);
|
|
58
61
|
|
|
59
62
|
useEffect(() => {
|
|
60
|
-
|
|
63
|
+
// Avoid creating multiple observers or if ResizeObserver is unsupported
|
|
64
|
+
if (typeof ResizeObserver === "undefined" || resizeObserverRef.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
61
67
|
|
|
62
68
|
let debounceTimer: ReturnType<typeof setTimeout>;
|
|
63
69
|
|
|
@@ -73,7 +79,7 @@ export const useScrollIndication = ({
|
|
|
73
79
|
|
|
74
80
|
setTableInnerContainerWidth(
|
|
75
81
|
tableInnerContainer?.clientWidth
|
|
76
|
-
? `${tableInnerContainer.clientWidth}px`
|
|
82
|
+
? `${tableInnerContainer.clientWidth - Number(odysseyDesignTokens.BorderWidthMain) * 2}px` // Account for the border on the outer container
|
|
77
83
|
: "100%",
|
|
78
84
|
);
|
|
79
85
|
}, 100); // debounce delay
|
|
@@ -101,6 +107,7 @@ export const useScrollIndication = ({
|
|
|
101
107
|
tableInnerContainer,
|
|
102
108
|
setIsTableContainerScrolledToStart,
|
|
103
109
|
setIsTableContainerScrolledToEnd,
|
|
110
|
+
odysseyDesignTokens.BorderWidthMain,
|
|
104
111
|
]);
|
|
105
112
|
|
|
106
113
|
useEffect(() => {
|
package/src/FieldHint.tsx
CHANGED
|
@@ -11,11 +11,32 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { memo } from "react";
|
|
14
|
-
|
|
14
|
+
import styled from "@emotion/styled";
|
|
15
15
|
import { FormHelperText } from "@mui/material";
|
|
16
16
|
|
|
17
17
|
import { FieldComponentProps } from "./FieldComponentProps";
|
|
18
18
|
import type { HtmlProps } from "./HtmlProps";
|
|
19
|
+
import {
|
|
20
|
+
useOdysseyDesignTokens,
|
|
21
|
+
DesignTokens,
|
|
22
|
+
} from "./OdysseyDesignTokensContext";
|
|
23
|
+
|
|
24
|
+
const HintLinkContainer = styled.span<{ odysseyDesignTokens: DesignTokens }>(
|
|
25
|
+
({ odysseyDesignTokens }) => ({
|
|
26
|
+
a: {
|
|
27
|
+
color: odysseyDesignTokens.TypographyColorBody,
|
|
28
|
+
textDecoration: "underline",
|
|
29
|
+
|
|
30
|
+
"&:visited": {
|
|
31
|
+
color: odysseyDesignTokens.TypographyColorBody,
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"&:hover": {
|
|
35
|
+
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
19
40
|
|
|
20
41
|
export type FieldHintProps = {
|
|
21
42
|
LinkComponent?: FieldComponentProps["HintLinkComponent"];
|
|
@@ -30,13 +51,16 @@ const FieldHint = ({
|
|
|
30
51
|
text,
|
|
31
52
|
translate,
|
|
32
53
|
}: FieldHintProps) => {
|
|
54
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
55
|
+
|
|
33
56
|
return (
|
|
34
57
|
<FormHelperText data-se={testId} id={id} translate={translate}>
|
|
35
58
|
{text}
|
|
36
59
|
{LinkComponent && (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
<HintLinkContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
61
|
+
{" "}
|
|
62
|
+
{LinkComponent}
|
|
63
|
+
</HintLinkContainer>
|
|
40
64
|
)}
|
|
41
65
|
</FormHelperText>
|
|
42
66
|
);
|
|
@@ -15,7 +15,7 @@ import styled from "@emotion/styled";
|
|
|
15
15
|
import { IconButton } from "@mui/material";
|
|
16
16
|
import { useTranslation } from "react-i18next";
|
|
17
17
|
|
|
18
|
-
import {
|
|
18
|
+
import { FileUploaderProps } from "./FileUploader";
|
|
19
19
|
import {
|
|
20
20
|
useOdysseyDesignTokens,
|
|
21
21
|
DesignTokens,
|
|
@@ -25,7 +25,7 @@ import { MuiPropsContext, MuiPropsContextType } from "../MuiPropsContext";
|
|
|
25
25
|
import { Tooltip } from "../Tooltip";
|
|
26
26
|
|
|
27
27
|
const PreviewContainer = styled.div<{
|
|
28
|
-
isDisabled:
|
|
28
|
+
isDisabled: FileUploaderProps["isDisabled"];
|
|
29
29
|
odysseyDesignTokens: DesignTokens;
|
|
30
30
|
}>(({ isDisabled, odysseyDesignTokens }) => ({
|
|
31
31
|
color: isDisabled ? odysseyDesignTokens.TypographyColorDisabled : "inherit",
|
|
@@ -117,7 +117,7 @@ const UploadedFile = ({ name, onFileRemove }: UploadedFileProps) => {
|
|
|
117
117
|
|
|
118
118
|
type FileUploadPreviewProps = {
|
|
119
119
|
fileNames: string[];
|
|
120
|
-
isDisabled:
|
|
120
|
+
isDisabled: FileUploaderProps["isDisabled"];
|
|
121
121
|
onFileRemove?: (name: string) => void;
|
|
122
122
|
};
|
|
123
123
|
|
|
@@ -108,7 +108,7 @@ const CenterAlignedSupportText = styled.div({
|
|
|
108
108
|
textAlign: "center",
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
export type
|
|
111
|
+
export type FileUploaderProps = {
|
|
112
112
|
/**
|
|
113
113
|
* an array of file types the user is able to upload. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept#unique_file_type_specifiers for examples
|
|
114
114
|
*/
|
|
@@ -140,7 +140,7 @@ export type FileUploadProps = {
|
|
|
140
140
|
| "isOptional"
|
|
141
141
|
>;
|
|
142
142
|
|
|
143
|
-
const
|
|
143
|
+
const FileUploader = ({
|
|
144
144
|
acceptedFileTypes,
|
|
145
145
|
errorMessage,
|
|
146
146
|
id,
|
|
@@ -153,7 +153,7 @@ const FileUpload = ({
|
|
|
153
153
|
onChange,
|
|
154
154
|
type,
|
|
155
155
|
variant,
|
|
156
|
-
}:
|
|
156
|
+
}: FileUploaderProps) => {
|
|
157
157
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
158
158
|
const { t } = useTranslation();
|
|
159
159
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
@@ -304,7 +304,8 @@ const FileUpload = ({
|
|
|
304
304
|
);
|
|
305
305
|
};
|
|
306
306
|
|
|
307
|
-
const
|
|
308
|
-
|
|
307
|
+
const MemoizedFileUploader = memo(FileUploader);
|
|
308
|
+
MemoizedFileUploader.displayName = "FileUploader";
|
|
309
309
|
|
|
310
|
-
export {
|
|
310
|
+
export { MemoizedFileUploader as FileUpload };
|
|
311
|
+
export { MemoizedFileUploader as FileUploader };
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export * from "./FileUploader";
|
package/src/Link.tsx
CHANGED
|
@@ -41,7 +41,9 @@ export type LinkProps = {
|
|
|
41
41
|
*/
|
|
42
42
|
onClick?: MuiLinkProps["onClick"];
|
|
43
43
|
/**
|
|
44
|
-
* The
|
|
44
|
+
* The rel attribute defines the relationship between a linked resource and the current document
|
|
45
|
+
*
|
|
46
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
|
|
45
47
|
*/
|
|
46
48
|
rel?: string;
|
|
47
49
|
/**
|
package/src/OdysseyProvider.tsx
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { memo, ReactNode } from "react";
|
|
13
|
+
import { memo, ReactNode, useMemo } from "react";
|
|
14
14
|
import { ScopedCssBaseline } from "@mui/material";
|
|
15
15
|
|
|
16
16
|
import {
|
|
@@ -26,6 +26,15 @@ import {
|
|
|
26
26
|
OdysseyTranslationProviderProps,
|
|
27
27
|
} from "./OdysseyTranslationProvider";
|
|
28
28
|
import { DefaultSupportedLanguages } from "./OdysseyTranslationProvider.types";
|
|
29
|
+
import {
|
|
30
|
+
ContrastMode,
|
|
31
|
+
ContrastModeProvider,
|
|
32
|
+
useContrastContext,
|
|
33
|
+
} from "./ContrastModeProvider";
|
|
34
|
+
|
|
35
|
+
const scopedCssBaselineStyles = {
|
|
36
|
+
height: "inherit",
|
|
37
|
+
};
|
|
29
38
|
|
|
30
39
|
export type OdysseyProviderProps<
|
|
31
40
|
SupportedLanguages extends string = DefaultSupportedLanguages,
|
|
@@ -33,9 +42,10 @@ export type OdysseyProviderProps<
|
|
|
33
42
|
OdysseyThemeProviderProps &
|
|
34
43
|
OdysseyTranslationProviderProps<SupportedLanguages> & {
|
|
35
44
|
children: ReactNode;
|
|
45
|
+
contrastMode?: ContrastMode;
|
|
36
46
|
};
|
|
37
47
|
|
|
38
|
-
const
|
|
48
|
+
const OdysseyProviderInner = <SupportedLanguages extends string>({
|
|
39
49
|
children,
|
|
40
50
|
designTokensOverride,
|
|
41
51
|
emotionRoot,
|
|
@@ -47,31 +57,53 @@ const OdysseyProvider = <SupportedLanguages extends string>({
|
|
|
47
57
|
stylisPlugins,
|
|
48
58
|
themeOverride,
|
|
49
59
|
translationOverrides,
|
|
50
|
-
}: OdysseyProviderProps<SupportedLanguages>) =>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
}: OdysseyProviderProps<SupportedLanguages>) => {
|
|
61
|
+
const { contrastMode } = useContrastContext();
|
|
62
|
+
|
|
63
|
+
const memoizedThemeProps = useMemo(
|
|
64
|
+
() => ({
|
|
65
|
+
...themeOverride,
|
|
66
|
+
odysseyContrastMode: contrastMode,
|
|
67
|
+
}),
|
|
68
|
+
[themeOverride, contrastMode],
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<OdysseyCacheProvider
|
|
73
|
+
emotionRoot={emotionRoot}
|
|
74
|
+
emotionRootElement={emotionRootElement}
|
|
75
|
+
hasShadowDom={Boolean(shadowRootElement || shadowDomElement)}
|
|
76
|
+
nonce={nonce}
|
|
77
|
+
stylisPlugins={stylisPlugins}
|
|
62
78
|
>
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
<OdysseyThemeProvider
|
|
80
|
+
designTokensOverride={designTokensOverride}
|
|
81
|
+
shadowDomElement={shadowDomElement}
|
|
82
|
+
shadowRootElement={shadowRootElement}
|
|
83
|
+
themeOverride={memoizedThemeProps}
|
|
84
|
+
>
|
|
85
|
+
<ScopedCssBaseline sx={scopedCssBaselineStyles}>
|
|
86
|
+
<OdysseyTranslationProvider<SupportedLanguages>
|
|
87
|
+
languageCode={languageCode}
|
|
88
|
+
translationOverrides={translationOverrides}
|
|
89
|
+
>
|
|
90
|
+
{children}
|
|
91
|
+
</OdysseyTranslationProvider>
|
|
92
|
+
</ScopedCssBaseline>
|
|
93
|
+
</OdysseyThemeProvider>
|
|
94
|
+
</OdysseyCacheProvider>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const OdysseyProvider = <SupportedLanguages extends string>({
|
|
99
|
+
contrastMode,
|
|
100
|
+
...providerProps
|
|
101
|
+
}: OdysseyProviderProps<SupportedLanguages>) => (
|
|
102
|
+
<ContrastModeProvider contrastMode={contrastMode}>
|
|
103
|
+
<OdysseyProviderInner {...providerProps} />
|
|
104
|
+
</ContrastModeProvider>
|
|
73
105
|
);
|
|
74
106
|
|
|
75
|
-
const
|
|
107
|
+
const MemoizedOdysseyProvider = memo(OdysseyProvider) as typeof OdysseyProvider;
|
|
76
108
|
|
|
77
|
-
export {
|
|
109
|
+
export { MemoizedOdysseyProvider as OdysseyProvider };
|
package/src/Radio.tsx
CHANGED
|
@@ -60,14 +60,14 @@ const Radio = ({
|
|
|
60
60
|
hint,
|
|
61
61
|
inputRef,
|
|
62
62
|
isChecked,
|
|
63
|
-
isDisabled
|
|
63
|
+
isDisabled,
|
|
64
64
|
isInvalid,
|
|
65
65
|
label: labelProp,
|
|
66
66
|
name,
|
|
67
67
|
testId,
|
|
68
68
|
translate,
|
|
69
69
|
value,
|
|
70
|
-
isReadOnly
|
|
70
|
+
isReadOnly,
|
|
71
71
|
onChange: onChangeProp,
|
|
72
72
|
onBlur: onBlurProp,
|
|
73
73
|
onClick,
|
package/src/Select.tsx
CHANGED
|
@@ -49,6 +49,44 @@ import {
|
|
|
49
49
|
useOdysseyDesignTokens,
|
|
50
50
|
DesignTokens,
|
|
51
51
|
} from "./OdysseyDesignTokensContext";
|
|
52
|
+
import { TestSelector } from "./test-selectors";
|
|
53
|
+
|
|
54
|
+
export const SelectTestSelector = {
|
|
55
|
+
accessibleText: {
|
|
56
|
+
errorMessage: "errorMessage",
|
|
57
|
+
hint: "description",
|
|
58
|
+
label: "label",
|
|
59
|
+
},
|
|
60
|
+
children: {
|
|
61
|
+
list: {
|
|
62
|
+
accessibleText: {
|
|
63
|
+
label: "label",
|
|
64
|
+
},
|
|
65
|
+
children: {
|
|
66
|
+
listItem: {
|
|
67
|
+
accessibleText: {
|
|
68
|
+
label: "label",
|
|
69
|
+
},
|
|
70
|
+
elementSelector: {
|
|
71
|
+
method: "ByRole",
|
|
72
|
+
options: {
|
|
73
|
+
label: "name",
|
|
74
|
+
},
|
|
75
|
+
role: "option",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
isControlledElement: true,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
elementSelector: {
|
|
83
|
+
method: "ByRole",
|
|
84
|
+
options: {
|
|
85
|
+
label: "name",
|
|
86
|
+
},
|
|
87
|
+
role: "combobox",
|
|
88
|
+
},
|
|
89
|
+
} as const satisfies TestSelector;
|
|
52
90
|
|
|
53
91
|
export type SelectOption = {
|
|
54
92
|
text: string;
|
package/src/Stack.tsx
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-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
|
+
import { Stack as MuiStack, StackProps as MuiStackProps } from "@mui/material";
|
|
15
|
+
|
|
16
|
+
export const stackSpacingValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const;
|
|
17
|
+
export const stackDirectionValues = [
|
|
18
|
+
"row",
|
|
19
|
+
"row-reverse",
|
|
20
|
+
"column",
|
|
21
|
+
"column-reverse",
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
export type OdysseyStackProps = {
|
|
25
|
+
children?: MuiStackProps["children"];
|
|
26
|
+
/**
|
|
27
|
+
* The component used for the root node. Either a string to use a HTML element or a component.
|
|
28
|
+
*/
|
|
29
|
+
component?: MuiStackProps["component"];
|
|
30
|
+
/**
|
|
31
|
+
* Defines the flex-direction style property. It is applied for all screen sizes.
|
|
32
|
+
*/
|
|
33
|
+
direction?: (typeof stackDirectionValues)[number];
|
|
34
|
+
/**
|
|
35
|
+
* Defines the space between immediate children.
|
|
36
|
+
*/
|
|
37
|
+
spacing?: (typeof stackSpacingValues)[number];
|
|
38
|
+
sx?: MuiStackProps["sx"];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const Stack = ({
|
|
42
|
+
children,
|
|
43
|
+
direction = "column",
|
|
44
|
+
spacing = 2,
|
|
45
|
+
}: OdysseyStackProps) => {
|
|
46
|
+
return (
|
|
47
|
+
<MuiStack direction={direction} spacing={spacing}>
|
|
48
|
+
{children}
|
|
49
|
+
</MuiStack>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const MemoizedStack = memo(Stack);
|
|
54
|
+
MemoizedStack.displayName = "Stack";
|
|
55
|
+
|
|
56
|
+
export { MemoizedStack as Stack };
|
|
@@ -23,19 +23,19 @@ import { SwitchProps as MuiSwitchProps, FormLabel } from "@mui/material";
|
|
|
23
23
|
import { useTranslation } from "react-i18next";
|
|
24
24
|
import styled from "@emotion/styled";
|
|
25
25
|
|
|
26
|
-
import { Box } from "
|
|
27
|
-
import { FieldComponentProps } from "
|
|
28
|
-
import { FieldHint } from "
|
|
29
|
-
import { CheckedFieldProps } from "
|
|
30
|
-
import type { HtmlProps } from "
|
|
31
|
-
import { CheckIcon } from "
|
|
32
|
-
import { ComponentControlledState, getControlState } from "
|
|
26
|
+
import { Box } from "./Box";
|
|
27
|
+
import { FieldComponentProps } from "./FieldComponentProps";
|
|
28
|
+
import { FieldHint } from "./FieldHint";
|
|
29
|
+
import { CheckedFieldProps } from "./FormCheckedProps";
|
|
30
|
+
import type { HtmlProps } from "./HtmlProps";
|
|
31
|
+
import { CheckIcon } from "./icons.generated";
|
|
32
|
+
import { ComponentControlledState, getControlState } from "./inputUtils";
|
|
33
33
|
import {
|
|
34
34
|
DesignTokens,
|
|
35
35
|
useOdysseyDesignTokens,
|
|
36
|
-
} from "
|
|
37
|
-
import { stripRem, toRem } from "
|
|
38
|
-
import { useUniqueId } from "
|
|
36
|
+
} from "./OdysseyDesignTokensContext";
|
|
37
|
+
import { stripRem, toRem } from "./remUtils";
|
|
38
|
+
import { useUniqueId } from "./useUniqueId";
|
|
39
39
|
|
|
40
40
|
const { CONTROLLED } = ComponentControlledState;
|
|
41
41
|
|
package/src/Tabs.tsx
CHANGED
|
@@ -30,30 +30,28 @@ import { Badge, BadgeProps } from "./Badge";
|
|
|
30
30
|
import { Box } from "./Box";
|
|
31
31
|
import { HtmlProps } from "./HtmlProps";
|
|
32
32
|
import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext";
|
|
33
|
-
import { type
|
|
33
|
+
import { type TestSelector } from "./test-selectors";
|
|
34
34
|
|
|
35
|
-
export const
|
|
36
|
-
|
|
35
|
+
export const TabsTestSelector = {
|
|
36
|
+
children: {
|
|
37
37
|
tabItem: {
|
|
38
|
-
|
|
38
|
+
elementSelector: {
|
|
39
39
|
method: "ByRole",
|
|
40
40
|
options: {
|
|
41
|
-
|
|
41
|
+
label: "name",
|
|
42
42
|
},
|
|
43
|
-
templateVariableNames: ["label"],
|
|
44
43
|
role: "tab",
|
|
45
44
|
},
|
|
46
45
|
},
|
|
47
46
|
},
|
|
48
|
-
|
|
47
|
+
elementSelector: {
|
|
49
48
|
method: "ByRole",
|
|
50
49
|
options: {
|
|
51
|
-
|
|
50
|
+
label: "name",
|
|
52
51
|
},
|
|
53
52
|
role: "tablist",
|
|
54
|
-
templateVariableNames: ["ariaLabel"],
|
|
55
53
|
},
|
|
56
|
-
} as const satisfies
|
|
54
|
+
} as const satisfies TestSelector;
|
|
57
55
|
|
|
58
56
|
export type TabItemProps = {
|
|
59
57
|
/**
|