@thecb/components 9.2.0-beta.10 → 9.2.0-beta.11
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/dist/index.cjs.js +634 -624
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +54 -0
- package/dist/index.esm.js +633 -624
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/popover/Popover.js +1 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -1
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +4 -4
- package/src/hooks/index.js +3 -0
- package/src/{util/hooks → hooks}/use-toast-notification/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -1
- package/src/util/index.js +2 -2
- package/src/util/hooks/index.js +0 -1
- /package/src/{util/useOutsideClick.js → hooks/use-outside-click/index.js} +0 -0
- /package/src/{util/useScrollTo.js → hooks/use-scroll-to/index.js} +0 -0
- /package/src/{util/hooks → hooks}/use-toast-notification/index.js +0 -0
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import Text from "../../atoms/text";
|
|
|
4
4
|
import Paragraph from "../../atoms/paragraph";
|
|
5
5
|
import { Box } from "../../atoms/layouts";
|
|
6
6
|
import ButtonWithAction from "../../atoms/button-with-action";
|
|
7
|
-
import { useOutsideClick } from "../../../
|
|
7
|
+
import { useOutsideClick } from "../../../hooks";
|
|
8
8
|
import { noop } from "../../../util/general";
|
|
9
9
|
import { fallbackValues } from "./Popover.theme";
|
|
10
10
|
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ERROR_COLOR
|
|
10
10
|
} from "../../../constants/colors";
|
|
11
11
|
import { generateShadows } from "../../../util/generateShadows";
|
|
12
|
-
import useScrollTo from "../../../
|
|
12
|
+
import { useScrollTo } from "../../../hooks";
|
|
13
13
|
|
|
14
14
|
const TermsAndConditionsControlV2 = ({
|
|
15
15
|
showCheckbox = true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import ToastNotification from "./ToastNotification";
|
|
3
3
|
import page from "../../../../.storybook/page";
|
|
4
|
-
import { useToastNotification } from "../../../
|
|
4
|
+
import { useToastNotification } from "../../../hooks";
|
|
5
5
|
import { ToastVariants } from "../../../types/common";
|
|
6
6
|
|
|
7
7
|
export const toastNotificationSuccess = () => {
|
|
@@ -38,13 +38,13 @@ export const toastNotificationError = () => {
|
|
|
38
38
|
toastVariant,
|
|
39
39
|
toastMessage,
|
|
40
40
|
showToast,
|
|
41
|
-
hideToast
|
|
41
|
+
hideToast
|
|
42
42
|
} = useToastNotification();
|
|
43
43
|
|
|
44
44
|
useEffect(() => {
|
|
45
45
|
showToast({
|
|
46
46
|
message: "An error occurred",
|
|
47
|
-
variant: ToastVariants.ERROR
|
|
47
|
+
variant: ToastVariants.ERROR
|
|
48
48
|
});
|
|
49
49
|
}, []);
|
|
50
50
|
|
|
@@ -61,7 +61,7 @@ toastNotificationError.storyName = "Error Toast";
|
|
|
61
61
|
|
|
62
62
|
const story = page({
|
|
63
63
|
title: "Components|Molecules/ToastNotification",
|
|
64
|
-
Component: ToastNotification
|
|
64
|
+
Component: ToastNotification
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
export default story;
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
package/src/util/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import * as formats from "./formats";
|
|
|
2
2
|
import * as general from "./general";
|
|
3
3
|
import * as theme from "./themeUtils";
|
|
4
4
|
import useFocusInvalidInput from "./focusFirstInvalidInputHook";
|
|
5
|
-
import useOutsideClick from "
|
|
6
|
-
import useToastNotification from "
|
|
5
|
+
import useOutsideClick from "../hooks/use-outside-click";
|
|
6
|
+
import useToastNotification from "../hooks/use-toast-notification";
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
9
|
formats,
|
package/src/util/hooks/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as useToastNotification } from "./use-toast-notification";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|