@kaizen/components 0.0.0-canary-hiding-toast-provider-20240307224924 → 0.0.0-canary-toast-removal-20240307233136
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/cjs/KaizenProvider/KaizenProvider.cjs +11 -20
- package/dist/cjs/KaizenProvider/KaizenProvider.cjs.map +1 -1
- package/dist/cjs/index.css +6 -6
- package/dist/esm/KaizenProvider/KaizenProvider.mjs +12 -21
- package/dist/esm/KaizenProvider/KaizenProvider.mjs.map +1 -1
- package/dist/esm/index.css +4 -4
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/KaizenProvider/KaizenProvider.tsx +17 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-toast-removal-20240307233136",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"ts-jest": "^29.1.2",
|
|
111
111
|
"ts-patch": "^3.1.2",
|
|
112
112
|
"typescript-transform-paths": "^3.4.7",
|
|
113
|
-
"@kaizen/
|
|
114
|
-
"@kaizen/
|
|
113
|
+
"@kaizen/design-tokens": "10.3.18",
|
|
114
|
+
"@kaizen/tailwind": "1.2.4"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"@cultureamp/i18n-react-intl": "^2.5.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ToastNotificationsList } from "~components/Notification"
|
|
3
|
-
import { ToastNotificationProvider } from "~components/Notification/ToastNotification/context/ToastNotificationContext"
|
|
1
|
+
import React from "react"
|
|
2
|
+
// import { ToastNotificationsList } from "~components/Notification"
|
|
3
|
+
// import { ToastNotificationProvider } from "~components/Notification/ToastNotification/context/ToastNotificationContext"
|
|
4
4
|
import { FontDefinitions } from "./subcomponents/FontDefinitions"
|
|
5
5
|
import { OptionalIntlProvider } from "./subcomponents/OptionalIntlProvider"
|
|
6
6
|
|
|
@@ -12,30 +12,30 @@ export type KaizenProviderProps = {
|
|
|
12
12
|
export const KaizenProvider = ({
|
|
13
13
|
children,
|
|
14
14
|
locale = "en",
|
|
15
|
-
}: KaizenProviderProps): JSX.Element =>
|
|
16
|
-
const [documentIsAvailable, setDocumentIsAvailable] = useState<boolean>(false)
|
|
17
|
-
const [notificationsList, setNotificationsList] = useState<JSX.Element>()
|
|
15
|
+
}: KaizenProviderProps): JSX.Element =>
|
|
16
|
+
// const [documentIsAvailable, setDocumentIsAvailable] = useState<boolean>(false)
|
|
17
|
+
// const [notificationsList, setNotificationsList] = useState<JSX.Element>()
|
|
18
18
|
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, [documentIsAvailable])
|
|
19
|
+
// useEffect(() => {
|
|
20
|
+
// // SSR does not have a document, which is required for ToastNotificationsList.
|
|
21
|
+
// // Await document render before rendering the component.
|
|
22
|
+
// if (document !== undefined) {
|
|
23
|
+
// setNotificationsList(<ToastNotificationsList />)
|
|
24
|
+
// setDocumentIsAvailable(true)
|
|
25
|
+
// }
|
|
26
|
+
// }, [documentIsAvailable])
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
(
|
|
29
29
|
<OptionalIntlProvider locale={locale}>
|
|
30
30
|
<>
|
|
31
31
|
{/* <ToastNotificationProvider> */}
|
|
32
|
-
{notificationsList}
|
|
32
|
+
{/* {notificationsList} */}
|
|
33
33
|
{children}
|
|
34
34
|
{/* </ToastNotificationProvider> */}
|
|
35
35
|
<FontDefinitions />
|
|
36
36
|
</>
|
|
37
37
|
</OptionalIntlProvider>
|
|
38
38
|
)
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
|
|
41
41
|
KaizenProvider.displayName = "KaizenProvider"
|