@kaizen/components 0.0.0-canary-rollup-plugin-node-externals-v7-20240206233319 → 0.0.0-canary-unscrollable-20240221032028
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/Modal/GenericModal/GenericModal.cjs +10 -1
- package/dist/cjs/Modal/GenericModal/GenericModal.cjs.map +1 -1
- package/dist/cjs/index.css +2 -2
- package/dist/esm/Modal/GenericModal/GenericModal.mjs +11 -2
- package/dist/esm/Modal/GenericModal/GenericModal.mjs.map +1 -1
- package/dist/esm/index.css +2 -2
- package/dist/styles.css +1 -1
- package/package.json +27 -27
- package/src/Illustration/Scene/_docs/Scene.mdx +1 -0
- package/src/Modal/GenericModal/GenericModal.tsx +8 -2
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-unscrollable-20240221032028",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"styles.css"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@floating-ui/react-dom": "^2.0.
|
|
29
|
+
"@floating-ui/react-dom": "^2.0.8",
|
|
30
30
|
"@headlessui/react": "<=1.5.0",
|
|
31
31
|
"@internationalized/date": "^3.5.1",
|
|
32
32
|
"@popperjs/core": "^2.11.8",
|
|
33
33
|
"@reach/tabs": "^0.18.0",
|
|
34
|
-
"@react-aria/button": "^3.9.
|
|
35
|
-
"@react-aria/datepicker": "^3.9.
|
|
36
|
-
"@react-aria/focus": "^3.16.
|
|
37
|
-
"@react-aria/i18n": "^3.10.
|
|
38
|
-
"@react-aria/listbox": "^3.11.
|
|
39
|
-
"@react-aria/menu": "^3.
|
|
40
|
-
"@react-aria/overlays": "^3.
|
|
41
|
-
"@react-aria/select": "^3.14.
|
|
42
|
-
"@react-aria/utils": "^3.23.
|
|
34
|
+
"@react-aria/button": "^3.9.2",
|
|
35
|
+
"@react-aria/datepicker": "^3.9.2",
|
|
36
|
+
"@react-aria/focus": "^3.16.1",
|
|
37
|
+
"@react-aria/i18n": "^3.10.1",
|
|
38
|
+
"@react-aria/listbox": "^3.11.4",
|
|
39
|
+
"@react-aria/menu": "^3.13.0",
|
|
40
|
+
"@react-aria/overlays": "^3.21.0",
|
|
41
|
+
"@react-aria/select": "^3.14.2",
|
|
42
|
+
"@react-aria/utils": "^3.23.1",
|
|
43
43
|
"@react-stately/collections": "^3.10.4",
|
|
44
44
|
"@react-stately/datepicker": "^3.9.1",
|
|
45
45
|
"@react-stately/list": "^3.10.2",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@react-stately/select": "^3.6.1",
|
|
48
48
|
"@react-types/shared": "^3.22.0",
|
|
49
49
|
"classnames": "^2.5.1",
|
|
50
|
-
"date-fns": "^3.
|
|
50
|
+
"date-fns": "^3.3.1",
|
|
51
51
|
"lodash.debounce": "^4.0.8",
|
|
52
52
|
"nanobus": "^4.5.0",
|
|
53
53
|
"prosemirror-commands": "^1.5.2",
|
|
54
54
|
"prosemirror-history": "^1.3.2",
|
|
55
|
-
"prosemirror-inputrules": "^1.
|
|
55
|
+
"prosemirror-inputrules": "^1.4.0",
|
|
56
56
|
"prosemirror-keymap": "^1.2.2",
|
|
57
57
|
"prosemirror-model": "^1.19.4",
|
|
58
58
|
"prosemirror-schema-basic": "^1.2.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"prosemirror-view": "^1.32.7",
|
|
64
64
|
"react-animate-height": "^3.2.3",
|
|
65
65
|
"react-day-picker": "^8.10.0",
|
|
66
|
-
"react-focus-lock": "^2.9.
|
|
66
|
+
"react-focus-lock": "^2.9.7",
|
|
67
67
|
"react-focus-on": "^3.9.1",
|
|
68
68
|
"react-media": "^1.10.0",
|
|
69
69
|
"react-popper": "^2.3.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
83
|
-
"@cultureamp/frontend-apis": "^9.
|
|
84
|
-
"@cultureamp/i18n-react-intl": "^2.
|
|
83
|
+
"@cultureamp/frontend-apis": "^9.3.4",
|
|
84
|
+
"@cultureamp/i18n-react-intl": "^2.4.0",
|
|
85
85
|
"@rollup/plugin-alias": "^5.1.0",
|
|
86
86
|
"@rollup/plugin-babel": "^6.0.4",
|
|
87
87
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -92,31 +92,31 @@
|
|
|
92
92
|
"@types/lodash.debounce": "^4.0.9",
|
|
93
93
|
"@types/react-dom": "^18.2.18",
|
|
94
94
|
"@types/react-textfit": "^1.1.4",
|
|
95
|
-
"@types/uuid": "^9.0.
|
|
95
|
+
"@types/uuid": "^9.0.8",
|
|
96
96
|
"agadoo": "^3.0.0",
|
|
97
|
-
"autoprefixer": "^10.4.
|
|
97
|
+
"autoprefixer": "^10.4.17",
|
|
98
98
|
"babel-plugin-pure-static-props": "^0.2.0",
|
|
99
99
|
"concat-cli": "^4.0.0",
|
|
100
|
-
"query-string": "^8.
|
|
101
|
-
"react-intl": "^6.6.
|
|
102
|
-
"rollup": "^4.9.
|
|
100
|
+
"query-string": "^8.2.0",
|
|
101
|
+
"react-intl": "^6.6.2",
|
|
102
|
+
"rollup": "^4.9.6",
|
|
103
103
|
"rollup-plugin-dts": "^6.1.0",
|
|
104
104
|
"rollup-plugin-ignore": "^1.0.10",
|
|
105
105
|
"rollup-plugin-node-externals": "^7.0.1",
|
|
106
106
|
"rollup-plugin-postcss": "^4.0.2",
|
|
107
|
-
"sass": "^1.
|
|
107
|
+
"sass": "^1.70.0",
|
|
108
108
|
"serialize-query-params": "^2.0.2",
|
|
109
109
|
"svgo": "^3.2.0",
|
|
110
|
-
"ts-jest": "^29.1.
|
|
110
|
+
"ts-jest": "^29.1.2",
|
|
111
111
|
"ts-patch": "^3.1.2",
|
|
112
112
|
"typescript-transform-paths": "^3.4.6",
|
|
113
|
-
"@kaizen/
|
|
114
|
-
"@kaizen/
|
|
113
|
+
"@kaizen/tailwind": "1.2.4",
|
|
114
|
+
"@kaizen/design-tokens": "10.3.18"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
|
-
"@cultureamp/i18n-react-intl": "^2.
|
|
117
|
+
"@cultureamp/i18n-react-intl": "^2.4.0",
|
|
118
118
|
"react": "^18.2.0",
|
|
119
|
-
"react-intl": "^6.6.
|
|
119
|
+
"react-intl": "^6.6.2"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"build": "pnpm clean && pnpm prepublishOnly",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useId, useState } from "react"
|
|
1
|
+
import React, { useEffect, useId, useState } from "react"
|
|
2
2
|
import { createPortal } from "react-dom"
|
|
3
3
|
import { Transition } from "@headlessui/react"
|
|
4
4
|
import FocusLock from "react-focus-lock"
|
|
@@ -102,7 +102,7 @@ export const GenericModal = ({
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
const
|
|
105
|
+
const cleanUpAfterClose = (): void => {
|
|
106
106
|
document.documentElement.classList.remove(
|
|
107
107
|
styles.unscrollable,
|
|
108
108
|
styles.pseudoScrollbar
|
|
@@ -111,7 +111,13 @@ export const GenericModal = ({
|
|
|
111
111
|
if (onEscapeKeyup) {
|
|
112
112
|
document.removeEventListener("keyup", onEscapeKeyup)
|
|
113
113
|
}
|
|
114
|
+
}
|
|
114
115
|
|
|
116
|
+
/* Ensure sure add-on styles (e.g. unscrollable) and key event is cleaned up when the modal is unmounted*/
|
|
117
|
+
useEffect(() => () => cleanUpAfterClose(), [])
|
|
118
|
+
|
|
119
|
+
const onAfterLeaveHandler = (): void => {
|
|
120
|
+
cleanUpAfterClose()
|
|
115
121
|
propsOnAfterLeave?.()
|
|
116
122
|
}
|
|
117
123
|
|