@wonderflow/react-components 2.39.0-next.5 → 2.39.0-next.6
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/list/list.d.ts +1 -0
- package/list/list.js +2 -2
- package/list/list.module.css +7 -0
- package/package.json +1 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
package/list/list.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare type ListProps = PropsWithClass & {
|
|
|
4
4
|
dimension?: 'small' | 'regular' | 'big';
|
|
5
5
|
marker?: IconNames;
|
|
6
6
|
markerColor?: string;
|
|
7
|
+
hideMarker?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare type PolymorphicList = Polymorphic.ForwardRefComponent<'ul', ListProps>;
|
|
9
10
|
export declare const List: PolymorphicList;
|
package/list/list.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { Children, forwardRef, useMemo } from 'react';
|
|
|
2
2
|
import { List as ListClass, Marker } from './list.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { Text, Icon } from '../';
|
|
5
|
-
export const List = forwardRef(({ as: Wrapper = 'ul', children, marker = 'circle', dimension = 'regular', className, markerColor, ...props }, forwardedRef) => {
|
|
5
|
+
export const List = forwardRef(({ as: Wrapper = 'ul', children, marker = 'circle', dimension = 'regular', className, markerColor, hideMarker = false, ...props }, forwardedRef) => {
|
|
6
6
|
const sizes = {
|
|
7
7
|
small: {
|
|
8
8
|
text: 16,
|
|
@@ -18,7 +18,7 @@ export const List = forwardRef(({ as: Wrapper = 'ul', children, marker = 'circle
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
const isUnordered = useMemo(() => Wrapper === 'ul', [Wrapper]);
|
|
21
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, className: clsx(ListClass, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, ...props }, Children.map(children, (child) => (React.createElement(Text, { as: "li", size: sizes[dimension].text },
|
|
21
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, className: clsx(ListClass, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, "data-list-no-marker": hideMarker, ...props }, Children.map(children, (child) => (React.createElement(Text, { as: "li", size: sizes[dimension].text },
|
|
22
22
|
isUnordered && (React.createElement(Icon, { name: marker, className: Marker, fill: markerColor, dimension: marker !== 'circle' ? sizes[dimension].icon : 16 })),
|
|
23
23
|
child.props.children)))));
|
|
24
24
|
});
|
package/list/list.module.css
CHANGED
package/package.json
CHANGED
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, 30 Nov 2021 13:12:50 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, 30 Nov 2021 13:12:50 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, 30 Nov 2021 13:12:50 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|