@wonderflow/react-components 2.38.0-next.9 → 2.38.0
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/button/button.module.css +4 -0
- package/card/card.d.ts +1 -1
- package/card/card.js +3 -3
- package/card/card.module.css +7 -2
- package/core/vibrancy.css +2 -3
- package/package.json +1 -1
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
package/button/button.module.css
CHANGED
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
|
|
65
65
|
@mixin vibrancy;
|
|
66
66
|
|
|
67
|
+
color: var(--global-vibrancy-foreground);
|
|
68
|
+
|
|
67
69
|
&:is(:active) {
|
|
68
70
|
|
|
69
71
|
@mixin vibrancy-hover;
|
|
@@ -87,6 +89,8 @@
|
|
|
87
89
|
&:is(:hover, :focus):not(:active) {
|
|
88
90
|
|
|
89
91
|
@mixin vibrancy;
|
|
92
|
+
|
|
93
|
+
color: var(--global-vibrancy-foreground);
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
&[aria-pressed='true'],
|
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,14 +3,14 @@ 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
|
-
children && (React.createElement(
|
|
14
|
+
children && (React.createElement("div", { className: Content }, children)),
|
|
15
15
|
right && (React.createElement(Stack, { className: Right }, right)))));
|
|
16
16
|
});
|
package/card/card.module.css
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&[data-card-dimmed='2'] {
|
|
14
|
-
background: var(--dimmed-
|
|
14
|
+
background: var(--dimmed-1);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&[data-card-dimmed='3'] {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
@mixin vibrancy;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&[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 {
|
|
27
28
|
|
|
28
29
|
@mixin vibrancy-hover;
|
|
29
30
|
}
|
|
@@ -31,6 +32,10 @@
|
|
|
31
32
|
&[data-card-bordered='true'] {
|
|
32
33
|
border: solid 1px var(--dimmed-1);
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
&[data-card-vibrant='true'][data-card-bordered='true'] {
|
|
37
|
+
border: solid 1px var(--dimmed-2);
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
.Left {
|
package/core/vibrancy.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@define-mixin vibrancy {
|
|
2
|
-
|
|
3
|
-
backdrop-filter: saturate(180%) blur(62);
|
|
2
|
+
backdrop-filter: saturate(180%) blur(62px);
|
|
4
3
|
background:
|
|
5
4
|
linear-gradient(
|
|
6
5
|
to bottom,
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
}
|
|
19
18
|
@define-mixin vibrancy-disabled {
|
|
20
19
|
color: var(--global-disabled-foreground);
|
|
21
|
-
backdrop-filter: saturate(180%) blur(
|
|
20
|
+
backdrop-filter: saturate(180%) blur(62px);
|
|
22
21
|
background:
|
|
23
22
|
linear-gradient(
|
|
24
23
|
to bottom,
|
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 Mon, 29 Nov 2021 08:43:32 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 Mon, 29 Nov 2021 08:43:32 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 Mon, 29 Nov 2021 08:43:32 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|