@wonderflow/react-components 2.39.2 → 2.39.3
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/dropdown/dropdown-menu.js +11 -8
- package/dropdown/dropdown.js +2 -1
- package/package.json +13 -13
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
|
@@ -4,12 +4,15 @@ import { Stack, Elevator } from '../';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { DropdownMenu as DropdownMenuClass } from './dropdown-menu.module.css';
|
|
6
6
|
import { NAME } from '../separator';
|
|
7
|
-
export const DropdownMenu = forwardRef(({ className, children, ...props }, forwardedRef) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export const DropdownMenu = forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
8
|
+
const renderedChildren = Children.toArray(children).filter(Boolean);
|
|
9
|
+
return (React.createElement(Elevator, { resting: 2 },
|
|
10
|
+
React.createElement(Stack, { as: "ul", ref: forwardedRef, className: clsx(DropdownMenuClass, className), role: "menu", ...props },
|
|
11
|
+
React.createElement(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true } }, Children.map(renderedChildren, (child, index) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return (React.createElement(Stack, { as: "li", role: "none", verticalPadding: ((_a = child.type) === null || _a === void 0 ? void 0 : _a.displayName) === NAME ? 8 : undefined }, cloneElement(child, {
|
|
14
|
+
autoFocus: index === 0 && true
|
|
15
|
+
})));
|
|
16
|
+
})))));
|
|
17
|
+
});
|
|
15
18
|
DropdownMenu.displayName = 'Dropdown.Menu';
|
package/dropdown/dropdown.js
CHANGED
|
@@ -9,6 +9,7 @@ import { DropdownItem, DropdownItemCheckbox } from './dropdown-item';
|
|
|
9
9
|
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
10
10
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
11
11
|
export const Dropdown = forwardRef(({ className, children, trigger, offset = 8, placement = 'auto-start' }, forwardedRef) => {
|
|
12
|
+
const renderedChildren = Children.toArray(children).filter(Boolean);
|
|
12
13
|
const seedID = useUIDSeed();
|
|
13
14
|
const popupRef = useRef(forwardedRef);
|
|
14
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -41,7 +42,7 @@ export const Dropdown = forwardRef(({ className, children, trigger, offset = 8,
|
|
|
41
42
|
'aria-expanded': isOpen
|
|
42
43
|
})),
|
|
43
44
|
React.createElement(AnimatePresence, null, visible && (React.createElement("div", { ref: setTooltipRef, role: "tooltip", id: seedID('tooltip-content'), className: PopUp, ...getTooltipProps({ className: PopUp }) },
|
|
44
|
-
React.createElement(motion.div, { animate: visible ? { y: 5, opacity: 1 } : { y: 0, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 } }, Children.map(
|
|
45
|
+
React.createElement(motion.div, { animate: visible ? { y: 5, opacity: 1 } : { y: 0, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 } }, Children.map(renderedChildren, (child) => cloneElement(child, {
|
|
45
46
|
id: seedID('dropdown-menu'),
|
|
46
47
|
'aria-labelledby': seedID('dropdown-trigger')
|
|
47
48
|
}))))))));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
3
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
4
|
-
"version": "2.39.
|
|
4
|
+
"version": "2.39.3",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"clsx": "1.1.1",
|
|
64
64
|
"flat": "5.0.2",
|
|
65
65
|
"framer-motion": "4.1.17",
|
|
66
|
-
"postcss": "8.4.
|
|
66
|
+
"postcss": "8.4.4",
|
|
67
67
|
"react": ">=17.0.2",
|
|
68
68
|
"react-data-table-component": "7.4.5",
|
|
69
69
|
"react-dom": ">=17.0.2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"react-uid": "2.3.1",
|
|
77
77
|
"react-use": "17.3.1",
|
|
78
78
|
"style-dictionary": "3.0.3",
|
|
79
|
-
"type-fest": "2.
|
|
79
|
+
"type-fest": "2.8.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"react": ">=17.0.2",
|
|
@@ -91,17 +91,17 @@
|
|
|
91
91
|
"@semantic-release/github": "8.0.2",
|
|
92
92
|
"@semantic-release/npm": "8.0.3",
|
|
93
93
|
"@semantic-release/release-notes-generator": "10.0.3",
|
|
94
|
-
"@storybook/addon-actions": "6.
|
|
95
|
-
"@storybook/addon-essentials": "6.
|
|
96
|
-
"@storybook/addon-links": "6.
|
|
94
|
+
"@storybook/addon-actions": "6.4.8",
|
|
95
|
+
"@storybook/addon-essentials": "6.4.8",
|
|
96
|
+
"@storybook/addon-links": "6.4.8",
|
|
97
97
|
"@storybook/addon-postcss": "2.0.0",
|
|
98
|
-
"@storybook/addons": "6.
|
|
99
|
-
"@storybook/react": "6.
|
|
100
|
-
"@storybook/theming": "6.
|
|
98
|
+
"@storybook/addons": "6.4.8",
|
|
99
|
+
"@storybook/react": "6.4.8",
|
|
100
|
+
"@storybook/theming": "6.4.8",
|
|
101
101
|
"@types/flat": "5.0.2",
|
|
102
102
|
"@types/react-dom": "17.0.11",
|
|
103
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
104
|
-
"@typescript-eslint/parser": "5.
|
|
103
|
+
"@typescript-eslint/eslint-plugin": "5.6.0",
|
|
104
|
+
"@typescript-eslint/parser": "5.6.0",
|
|
105
105
|
"@wonderflow/config": "1.5.5",
|
|
106
106
|
"babel-loader": "8.2.3",
|
|
107
107
|
"commit-analyzer-fail-on-no-release": "1.0.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"fs-extra": "10.0.0",
|
|
114
114
|
"husky": "7.0.4",
|
|
115
115
|
"is-ci": "3.0.1",
|
|
116
|
-
"nanospinner": "0.
|
|
116
|
+
"nanospinner": "0.5.0",
|
|
117
117
|
"npm-run-all": "4.1.5",
|
|
118
118
|
"picocolors": "1.0.0",
|
|
119
119
|
"postcss-mixins": "8.1.0",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"svgstore": "3.0.1",
|
|
127
127
|
"typescript": "4.5.2",
|
|
128
128
|
"typescript-plugin-css-modules": "3.4.0",
|
|
129
|
-
"yargs": "17.
|
|
129
|
+
"yargs": "17.3.0"
|
|
130
130
|
},
|
|
131
131
|
"resolutions": {
|
|
132
132
|
"rc": "1.2.8"
|
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: var(--global-foreground);
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on Tue, 07 Dec 2021
|
|
7
|
+
* Generated on Tue, 07 Dec 2021 16:00:44 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--global-foreground);
|
|
52
52
|
/**
|
|
53
53
|
* Do not edit directly
|
|
54
|
-
* Generated on Tue, 07 Dec 2021
|
|
54
|
+
* Generated on Tue, 07 Dec 2021 16:00:44 GMT
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: var(--global-foreground);
|
|
100
100
|
/**
|
|
101
101
|
* Do not edit directly
|
|
102
|
-
* Generated on Tue, 07 Dec 2021
|
|
102
|
+
* Generated on Tue, 07 Dec 2021 16:00:44 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|