@wonderflow/react-components 2.39.1 → 2.39.2
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 +8 -4
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/separator/index.d.ts +1 -1
- package/separator/index.js +1 -1
- package/separator/separator.d.ts +1 -0
- package/separator/separator.js +2 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
- package/title/title.module.css +1 -1
|
@@ -3,9 +3,13 @@ import { RovingTabIndexProvider } from 'react-roving-tabindex';
|
|
|
3
3
|
import { Stack, Elevator } from '../';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { DropdownMenu as DropdownMenuClass } from './dropdown-menu.module.css';
|
|
6
|
+
import { NAME } from '../separator';
|
|
6
7
|
export const DropdownMenu = forwardRef(({ className, children, ...props }, forwardedRef) => (React.createElement(Elevator, { resting: 2 },
|
|
7
|
-
React.createElement(Stack, { as: "ul", ref: forwardedRef,
|
|
8
|
-
React.createElement(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true } }, Children.map(children, (child, index) =>
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
React.createElement(Stack, { as: "ul", ref: forwardedRef, className: clsx(DropdownMenuClass, className), role: "menu", ...props },
|
|
9
|
+
React.createElement(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true } }, Children.map(children, (child, index) => {
|
|
10
|
+
var _a;
|
|
11
|
+
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, {
|
|
12
|
+
autoFocus: index === 0 && true
|
|
13
|
+
})));
|
|
14
|
+
}))))));
|
|
11
15
|
DropdownMenu.displayName = 'Dropdown.Menu';
|
package/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { LinearProgress, LinearProgressProps } from './linear-progress';
|
|
|
24
24
|
export { Prose, ProseProps } from './prose';
|
|
25
25
|
export { Pagination, PaginationProps } from './pagination';
|
|
26
26
|
export { Select, SelectProps } from './select';
|
|
27
|
-
export { Separator } from './separator';
|
|
27
|
+
export { Separator, NAME } from './separator';
|
|
28
28
|
export { SkeletonBlock, SkeletonBlockProps } from './skeleton-block';
|
|
29
29
|
export { Slider, SliderProps } from './slider';
|
|
30
30
|
export { Snackbar, SnackbarProps } from './snackbar';
|
package/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export { LinearProgress } from './linear-progress';
|
|
|
24
24
|
export { Prose } from './prose';
|
|
25
25
|
export { Pagination } from './pagination';
|
|
26
26
|
export { Select } from './select';
|
|
27
|
-
export { Separator } from './separator';
|
|
27
|
+
export { Separator, NAME } from './separator';
|
|
28
28
|
export { SkeletonBlock } from './skeleton-block';
|
|
29
29
|
export { Slider } from './slider';
|
|
30
30
|
export { Snackbar } from './snackbar';
|
package/package.json
CHANGED
package/separator/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Separator } from './separator';
|
|
1
|
+
export { Separator, NAME } from './separator';
|
package/separator/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Separator } from './separator';
|
|
1
|
+
export { Separator, NAME } from './separator';
|
package/separator/separator.d.ts
CHANGED
package/separator/separator.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { Separator as SeparatorClass } from './separator.module.css';
|
|
4
|
+
export const NAME = 'Separator';
|
|
4
5
|
export const Separator = forwardRef(({ className, ...props }, forwardedRef) => {
|
|
5
6
|
return (React.createElement("hr", { ref: forwardedRef, className: clsx(SeparatorClass, className), ...props }));
|
|
6
7
|
});
|
|
7
|
-
Separator.displayName =
|
|
8
|
+
Separator.displayName = NAME;
|
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
|
|
7
|
+
* Generated on Tue, 07 Dec 2021 15:52: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
|
|
54
|
+
* Generated on Tue, 07 Dec 2021 15:52: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
|
|
102
|
+
* Generated on Tue, 07 Dec 2021 15:52:44 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|