@wonderflow/react-components 2.38.0-next.12 → 2.38.0-next.13
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/card/card.d.ts +1 -1
- package/card/card.js +2 -2
- package/card/card.module.css +2 -2
- package/package.json +1 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
package/card/card.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare type CardProps = PropsWithClass & Pick<StackProps, 'wrap' | 'colu
|
|
|
9
9
|
radius?: false | TokensTypes['radius'];
|
|
10
10
|
dimmed?: 1 | 2 | 3;
|
|
11
11
|
vibrant?: boolean;
|
|
12
|
-
|
|
12
|
+
highlightOnHover?: boolean;
|
|
13
13
|
};
|
|
14
14
|
declare type PolymorphicCard = Polymorphic.ForwardRefComponent<'div', CardProps>;
|
|
15
15
|
export declare const Card: PolymorphicCard;
|
package/card/card.js
CHANGED
|
@@ -3,12 +3,12 @@ import tkns from '@wonderflow/tokens/platforms/web/tokens.json';
|
|
|
3
3
|
import { Stack } from '../';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Card as CardClass, Left, Content, Right } from './card.module.css';
|
|
6
|
-
export const Card = forwardRef(({ as: Wrapper = 'div', children, className, padding = 24, radius = 8, left, right, dimmed, bordered, columnGap = 24, rowGap = 24, verticalAlign = 'start', horizontalAlign = 'space-between', vibrant = false,
|
|
6
|
+
export const Card = forwardRef(({ as: Wrapper = 'div', children, className, padding = 24, radius = 8, left, right, dimmed, bordered, columnGap = 24, rowGap = 24, verticalAlign = 'start', horizontalAlign = 'space-between', vibrant = false, highlightOnHover = false, wrap, style, ...props }, forwardedRef) => {
|
|
7
7
|
const dynamicStyle = {
|
|
8
8
|
'--padding': padding && tkns.space[padding],
|
|
9
9
|
'--radius': radius && tkns.radius[radius]
|
|
10
10
|
};
|
|
11
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, className: clsx(CardClass, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-
|
|
11
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, className: clsx(CardClass, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...props },
|
|
12
12
|
React.createElement(Stack, { direction: "row", fill: false, verticalAlign: verticalAlign, horizontalAlign: horizontalAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap },
|
|
13
13
|
left && React.createElement("div", { className: Left }, left),
|
|
14
14
|
children && (React.createElement("div", { className: Content }, children)),
|
package/card/card.module.css
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
@mixin vibrancy;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&[data-card-
|
|
27
|
-
&[data-card-
|
|
26
|
+
&[data-card-highlight-hover='true'][data-card-vibrant='true']:hover,
|
|
27
|
+
&[data-card-highlight-hover='true'][data-card-vibrant='true']:focus-visible {
|
|
28
28
|
|
|
29
29
|
@mixin vibrancy-hover;
|
|
30
30
|
}
|
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 Fri, 26 Nov 2021 16:
|
|
7
|
+
* Generated on Fri, 26 Nov 2021 16:44:05 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 Fri, 26 Nov 2021 16:
|
|
54
|
+
* Generated on Fri, 26 Nov 2021 16:44:05 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 Fri, 26 Nov 2021 16:
|
|
102
|
+
* Generated on Fri, 26 Nov 2021 16:44:05 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|