@wonderflow/react-components 2.38.0-next.8 → 2.38.0-next.9
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 +13 -11
- package/card/card.d.ts +2 -0
- package/card/card.js +2 -2
- package/card/card.module.css +12 -0
- package/core/vibrancy.css +28 -0
- package/package.json +5 -5
- package/select/select.module.css +10 -10
- package/selection-controls/selection-controls.module.css +8 -5
- package/textfield/base-field/base-field.module.css +5 -3
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
package/button/button.module.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../core/vibrancy.css';
|
|
2
|
+
|
|
1
3
|
.Button {
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
user-select: none;
|
|
@@ -59,12 +61,12 @@
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
&[data-button-kind='secondary'] {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
background-color: var(--global-vibrancy-background);
|
|
64
|
+
|
|
65
|
+
@mixin vibrancy;
|
|
65
66
|
|
|
66
67
|
&:is(:active) {
|
|
67
|
-
|
|
68
|
+
|
|
69
|
+
@mixin vibrancy-hover;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
&[aria-pressed='true'],
|
|
@@ -78,13 +80,13 @@
|
|
|
78
80
|
color: var(--global-foreground);
|
|
79
81
|
|
|
80
82
|
&:is(:active) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
|
|
84
|
+
@mixin vibrancy-hover;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
&:is(:hover, :focus):not(:active) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
|
|
89
|
+
@mixin vibrancy;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
&[aria-pressed='true'],
|
|
@@ -105,9 +107,9 @@
|
|
|
105
107
|
|
|
106
108
|
&[data-button-disabled='true'],
|
|
107
109
|
&[data-button-disabled='true']:is(:hover, :focus) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
|
|
111
|
+
@mixin vibrancy-disabled;
|
|
112
|
+
|
|
111
113
|
cursor: not-allowed;
|
|
112
114
|
}
|
|
113
115
|
|
package/card/card.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare type CardProps = PropsWithClass & Pick<StackProps, 'wrap' | 'colu
|
|
|
8
8
|
bordered?: boolean;
|
|
9
9
|
radius?: false | TokensTypes['radius'];
|
|
10
10
|
dimmed?: 1 | 2 | 3;
|
|
11
|
+
vibrant?: boolean;
|
|
12
|
+
hoverable?: boolean;
|
|
11
13
|
};
|
|
12
14
|
declare type PolymorphicCard = Polymorphic.ForwardRefComponent<'div', CardProps>;
|
|
13
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', wrap, style, ...props }, forwardedRef) => {
|
|
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, hoverable = 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, ...props },
|
|
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-hoverable": hoverable, ...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(Stack, { className: Content }, children)),
|
package/card/card.module.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../core/vibrancy.css';
|
|
2
|
+
|
|
1
3
|
:where(.Card) {
|
|
2
4
|
background: var(--global-background);
|
|
3
5
|
padding: var(--padding);
|
|
@@ -16,6 +18,16 @@
|
|
|
16
18
|
background: var(--dimmed-2);
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
&[data-card-vibrant='true'] {
|
|
22
|
+
|
|
23
|
+
@mixin vibrancy;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-card-hoverable='true']:hover {
|
|
27
|
+
|
|
28
|
+
@mixin vibrancy-hover;
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
&[data-card-bordered='true'] {
|
|
20
32
|
border: solid 1px var(--dimmed-1);
|
|
21
33
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@define-mixin vibrancy {
|
|
2
|
+
color: var(--global-vibrancy-foreground);
|
|
3
|
+
backdrop-filter: saturate(180%) blur(62);
|
|
4
|
+
background:
|
|
5
|
+
linear-gradient(
|
|
6
|
+
to bottom,
|
|
7
|
+
var(--global-vibrancy-background),
|
|
8
|
+
var(--global-vibrancy-background)
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
@define-mixin vibrancy-hover {
|
|
12
|
+
background:
|
|
13
|
+
linear-gradient(
|
|
14
|
+
to bottom,
|
|
15
|
+
var(--global-vibrancy-background-hover),
|
|
16
|
+
var(--global-vibrancy-background-hover)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
@define-mixin vibrancy-disabled {
|
|
20
|
+
color: var(--global-disabled-foreground);
|
|
21
|
+
backdrop-filter: saturate(180%) blur(62);
|
|
22
|
+
background:
|
|
23
|
+
linear-gradient(
|
|
24
|
+
to bottom,
|
|
25
|
+
var(--global-disabled-background),
|
|
26
|
+
var(--global-disabled-background)
|
|
27
|
+
);
|
|
28
|
+
}
|
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.38.0-next.
|
|
4
|
+
"version": "2.38.0-next.9",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"postbuild": "copyfiles package.json dist"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@react-aria/interactions": "3.
|
|
59
|
+
"@react-aria/interactions": "3.7.0",
|
|
60
60
|
"@wonderflow/eslint-config": "1.1.5",
|
|
61
61
|
"@wonderflow/stylelint-config": "1.0.3",
|
|
62
62
|
"@wonderflow/tokens": "1.3.6",
|
|
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.1",
|
|
67
67
|
"react": ">=17.0.2",
|
|
68
68
|
"react-data-table-component": "7.4.5",
|
|
69
69
|
"react-dom": ">=17.0.2",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@semantic-release/git": "10.0.1",
|
|
91
91
|
"@semantic-release/github": "8.0.2",
|
|
92
92
|
"@semantic-release/npm": "8.0.3",
|
|
93
|
-
"@semantic-release/release-notes-generator": "10.0.
|
|
93
|
+
"@semantic-release/release-notes-generator": "10.0.3",
|
|
94
94
|
"@storybook/addon-actions": "6.3.12",
|
|
95
95
|
"@storybook/addon-essentials": "6.3.12",
|
|
96
96
|
"@storybook/addon-links": "6.3.12",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/react-dom": "17.0.11",
|
|
103
103
|
"@typescript-eslint/eslint-plugin": "5.4.0",
|
|
104
104
|
"@typescript-eslint/parser": "5.4.0",
|
|
105
|
-
"@wonderflow/config": "1.5.
|
|
105
|
+
"@wonderflow/config": "1.5.5",
|
|
106
106
|
"babel-loader": "8.2.3",
|
|
107
107
|
"commit-analyzer-fail-on-no-release": "1.0.0",
|
|
108
108
|
"commitizen": "4.2.4",
|
package/select/select.module.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../core/vibrancy.css';
|
|
2
|
+
|
|
1
3
|
.Select {
|
|
2
4
|
appearance: none;
|
|
3
5
|
position: relative;
|
|
@@ -33,6 +35,9 @@
|
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.Field {
|
|
38
|
+
|
|
39
|
+
@mixin vibrancy;
|
|
40
|
+
|
|
36
41
|
margin: 0;
|
|
37
42
|
border: 0;
|
|
38
43
|
text-overflow: ellipsis;
|
|
@@ -45,14 +50,7 @@
|
|
|
45
50
|
inline-size: 100%;
|
|
46
51
|
box-sizing: border-box;
|
|
47
52
|
overflow: hidden;
|
|
48
|
-
backdrop-filter: blur(32px);
|
|
49
53
|
color: inherit;
|
|
50
|
-
background:
|
|
51
|
-
linear-gradient(
|
|
52
|
-
to bottom,
|
|
53
|
-
var(--global-vibrancy-background),
|
|
54
|
-
var(--global-vibrancy-background)
|
|
55
|
-
);
|
|
56
54
|
block-size: var(--field-height);
|
|
57
55
|
padding:
|
|
58
56
|
0
|
|
@@ -61,9 +59,9 @@
|
|
|
61
59
|
var(--field-padding);
|
|
62
60
|
|
|
63
61
|
&:disabled {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
|
|
63
|
+
@mixin vibrancy-disabled;
|
|
64
|
+
|
|
67
65
|
cursor: not-allowed;
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -81,6 +79,7 @@
|
|
|
81
79
|
overflow: auto;
|
|
82
80
|
|
|
83
81
|
& option {
|
|
82
|
+
color: currentColor;
|
|
84
83
|
padding: calc(var(--field-padding) / 2) var(--field-padding);
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -91,6 +90,7 @@
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
& optgroup {
|
|
93
|
+
color: currentColor;
|
|
94
94
|
margin: 0 0 1rem;
|
|
95
95
|
font-family: inherit;
|
|
96
96
|
font-size: inherit;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
@import '../core/vibrancy.css';
|
|
2
|
+
|
|
1
3
|
.Checkbox {
|
|
2
4
|
--w: 24px;
|
|
3
5
|
--h: 24px;
|
|
4
6
|
|
|
7
|
+
@mixin vibrancy;
|
|
8
|
+
|
|
5
9
|
appearance: none;
|
|
6
10
|
inline-size: var(--w);
|
|
7
11
|
block-size: var(--h);
|
|
8
12
|
max-inline-size: var(--w);
|
|
9
13
|
max-block-size: var(--h);
|
|
10
|
-
backdrop-filter: blur(32px);
|
|
11
|
-
background-color: var(--global-vibrancy-background);
|
|
12
14
|
color: var(--global-background);
|
|
13
15
|
border-radius: env(--radius-4);
|
|
14
16
|
position: relative;
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
|
|
33
35
|
&:checked,
|
|
34
36
|
&[data-control-indeterminate='true'] {
|
|
35
|
-
background
|
|
37
|
+
background: var(--dimmed-7);
|
|
36
38
|
|
|
37
39
|
&::after {
|
|
38
40
|
display: block;
|
|
@@ -40,8 +42,9 @@
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
&:disabled {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
|
|
46
|
+
@mixin vibrancy-disabled;
|
|
47
|
+
|
|
45
48
|
cursor: not-allowed;
|
|
46
49
|
}
|
|
47
50
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../../core/vibrancy.css';
|
|
2
|
+
|
|
1
3
|
.BaseField {
|
|
2
4
|
margin: 0;
|
|
3
5
|
text-overflow: ellipsis;
|
|
@@ -37,9 +39,9 @@
|
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
&:disabled {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
@mixin vibrancy-disabled;
|
|
44
|
+
|
|
43
45
|
cursor: not-allowed;
|
|
44
46
|
border-color: transparent;
|
|
45
47
|
|
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
|
|
7
|
+
* Generated on Fri, 26 Nov 2021 15:22:18 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
|
|
54
|
+
* Generated on Fri, 26 Nov 2021 15:22:18 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
|
|
102
|
+
* Generated on Fri, 26 Nov 2021 15:22:18 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|