@kaizen/components 1.42.3 → 1.42.5
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/Menu/subcomponents/MenuDropdown/MenuDropdown.cjs +15 -13
- package/dist/cjs/{future.css → index.css} +136 -136
- package/dist/esm/Menu/subcomponents/MenuDropdown/MenuDropdown.mjs +15 -14
- package/dist/esm/{future.css → index.css} +136 -136
- package/dist/styles.css +1 -1
- package/package.json +2 -5
- package/src/Menu/subcomponents/MenuDropdown/MenuDropdown.tsx +24 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.5",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -83,11 +83,9 @@
|
|
|
83
83
|
"@cultureamp/frontend-apis": "^9.4.3",
|
|
84
84
|
"@cultureamp/i18n-react-intl": "^2.5.5",
|
|
85
85
|
"@rollup/plugin-alias": "^5.1.0",
|
|
86
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
86
87
|
"@rollup/plugin-babel": "^6.0.4",
|
|
87
88
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
88
|
-
"@rollup/plugin-image": "^3.0.3",
|
|
89
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
90
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
91
89
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
92
90
|
"@types/lodash.debounce": "^4.0.9",
|
|
93
91
|
"@types/react-dom": "^18.2.23",
|
|
@@ -100,7 +98,6 @@
|
|
|
100
98
|
"query-string": "^9.0.0",
|
|
101
99
|
"react-intl": "^6.6.4",
|
|
102
100
|
"rollup": "^4.13.2",
|
|
103
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
104
101
|
"rollup-plugin-ignore": "^1.0.10",
|
|
105
102
|
"rollup-plugin-node-externals": "^7.1.1",
|
|
106
103
|
"rollup-plugin-postcss": "^4.0.2",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
+
import { FocusOn } from "react-focus-on"
|
|
3
4
|
import { usePopper } from "react-popper"
|
|
4
5
|
import styles from "./MenuDropdown.module.scss"
|
|
5
6
|
|
|
@@ -106,22 +107,30 @@ export const MenuDropdown = ({
|
|
|
106
107
|
}, [autoHide, handleDocumentClickForAutoHide])
|
|
107
108
|
|
|
108
109
|
return (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{...attributes.popper}
|
|
116
|
-
style={popperStyles.popper}
|
|
117
|
-
className={classnames(
|
|
118
|
-
styles.menuContainer,
|
|
119
|
-
width == "default" && styles.defaultWidth
|
|
120
|
-
)}
|
|
121
|
-
onClick={handleRootClick}
|
|
110
|
+
<FocusOn
|
|
111
|
+
enabled={!!referenceElement}
|
|
112
|
+
scrollLock={false}
|
|
113
|
+
noIsolation
|
|
114
|
+
shards={referenceElement ? [referenceElement] : undefined}
|
|
115
|
+
onEscapeKey={hideMenuDropdown}
|
|
122
116
|
>
|
|
123
|
-
{
|
|
124
|
-
|
|
117
|
+
{/* eslint-disable-next-line
|
|
118
|
+
jsx-a11y/click-events-have-key-events,
|
|
119
|
+
jsx-a11y/no-static-element-interactions */}
|
|
120
|
+
<div
|
|
121
|
+
id={id}
|
|
122
|
+
ref={setPopperElement}
|
|
123
|
+
{...attributes.popper}
|
|
124
|
+
style={popperStyles.popper}
|
|
125
|
+
className={classnames(
|
|
126
|
+
styles.menuContainer,
|
|
127
|
+
width == "default" && styles.defaultWidth
|
|
128
|
+
)}
|
|
129
|
+
onClick={handleRootClick}
|
|
130
|
+
>
|
|
131
|
+
{children}
|
|
132
|
+
</div>
|
|
133
|
+
</FocusOn>
|
|
125
134
|
)
|
|
126
135
|
}
|
|
127
136
|
|