@wonderflow/react-components 2.38.0-next.1 → 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/button/button.module.css +16 -10
- package/card/card.d.ts +2 -0
- package/card/card.js +3 -3
- package/card/card.module.css +18 -1
- package/core/vibrancy.css +27 -0
- package/grid/grid.d.ts +22 -1
- package/grid/grid.js +1 -1
- package/grid/index.d.ts +1 -2
- package/grid/index.js +1 -2
- package/icons/all.svg +8 -0
- package/icons/structure.json +2 -0
- package/icons/types.d.ts +4 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +6 -7
- package/select/select.module.css +10 -10
- package/selection-controls/selection-controls.module.css +8 -5
- package/table/index.d.ts +2 -0
- package/table/index.js +1 -0
- package/table/table.d.ts +12 -0
- package/{data-table/data-table.js → table/table.js} +4 -4
- package/{data-table/data-table.module.css → table/table.module.css} +0 -13
- package/{data-table → table}/theme.d.ts +0 -0
- package/{data-table → table}/theme.js +12 -9
- 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/data-table/data-table.d.ts +0 -12
- package/data-table/index.d.ts +0 -2
- package/data-table/index.js +0 -1
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,14 @@
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
&[data-button-kind='secondary'] {
|
|
64
|
+
|
|
65
|
+
@mixin vibrancy;
|
|
66
|
+
|
|
62
67
|
color: var(--global-vibrancy-foreground);
|
|
63
|
-
backdrop-filter: blur(32px);
|
|
64
|
-
background-color: var(--global-vibrancy-background);
|
|
65
68
|
|
|
66
69
|
&:is(:active) {
|
|
67
|
-
|
|
70
|
+
|
|
71
|
+
@mixin vibrancy-hover;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
&[aria-pressed='true'],
|
|
@@ -78,13 +82,15 @@
|
|
|
78
82
|
color: var(--global-foreground);
|
|
79
83
|
|
|
80
84
|
&:is(:active) {
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
|
|
86
|
+
@mixin vibrancy-hover;
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
&:is(:hover, :focus):not(:active) {
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
|
|
91
|
+
@mixin vibrancy;
|
|
92
|
+
|
|
93
|
+
color: var(--global-vibrancy-foreground);
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
&[aria-pressed='true'],
|
|
@@ -105,9 +111,9 @@
|
|
|
105
111
|
|
|
106
112
|
&[data-button-disabled='true'],
|
|
107
113
|
&[data-button-disabled='true']:is(:hover, :focus) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
@mixin vibrancy-disabled;
|
|
116
|
+
|
|
111
117
|
cursor: not-allowed;
|
|
112
118
|
}
|
|
113
119
|
|
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
|
+
highlightOnHover?: 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,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', 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, 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, ...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-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
|
@@ -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);
|
|
@@ -9,16 +11,31 @@
|
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
&[data-card-dimmed='2'] {
|
|
12
|
-
background: var(--dimmed-
|
|
14
|
+
background: var(--dimmed-1);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
&[data-card-dimmed='3'] {
|
|
16
18
|
background: var(--dimmed-2);
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
&[data-card-vibrant='true'] {
|
|
22
|
+
|
|
23
|
+
@mixin vibrancy;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-card-highlight-hover='true'][data-card-vibrant='true']:hover,
|
|
27
|
+
&[data-card-highlight-hover='true'][data-card-vibrant='true']:focus-visible {
|
|
28
|
+
|
|
29
|
+
@mixin vibrancy-hover;
|
|
30
|
+
}
|
|
31
|
+
|
|
19
32
|
&[data-card-bordered='true'] {
|
|
20
33
|
border: solid 1px var(--dimmed-1);
|
|
21
34
|
}
|
|
35
|
+
|
|
36
|
+
&[data-card-vibrant='true'][data-card-bordered='true'] {
|
|
37
|
+
border: solid 1px var(--dimmed-2);
|
|
38
|
+
}
|
|
22
39
|
}
|
|
23
40
|
|
|
24
41
|
.Left {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@define-mixin vibrancy {
|
|
2
|
+
backdrop-filter: saturate(180%) blur(62px);
|
|
3
|
+
background:
|
|
4
|
+
linear-gradient(
|
|
5
|
+
to bottom,
|
|
6
|
+
var(--global-vibrancy-background),
|
|
7
|
+
var(--global-vibrancy-background)
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
@define-mixin vibrancy-hover {
|
|
11
|
+
background:
|
|
12
|
+
linear-gradient(
|
|
13
|
+
to bottom,
|
|
14
|
+
var(--global-vibrancy-background-hover),
|
|
15
|
+
var(--global-vibrancy-background-hover)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
@define-mixin vibrancy-disabled {
|
|
19
|
+
color: var(--global-disabled-foreground);
|
|
20
|
+
backdrop-filter: saturate(180%) blur(62px);
|
|
21
|
+
background:
|
|
22
|
+
linear-gradient(
|
|
23
|
+
to bottom,
|
|
24
|
+
var(--global-disabled-background),
|
|
25
|
+
var(--global-disabled-background)
|
|
26
|
+
);
|
|
27
|
+
}
|
package/grid/grid.d.ts
CHANGED
|
@@ -10,4 +10,25 @@ export declare type GridProps = PropsWithClass & {
|
|
|
10
10
|
colMinWidth?: string;
|
|
11
11
|
rowMinHeight?: string;
|
|
12
12
|
};
|
|
13
|
-
export declare const Grid: React.
|
|
13
|
+
export declare const Grid: React.ForwardRefExoticComponent<PropsWithClass & {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
columns?: number | undefined;
|
|
16
|
+
rows?: number | undefined;
|
|
17
|
+
rowGap?: 0 | 24 | 16 | 32 | 40 | 48 | 56 | 2 | 4 | 8 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | undefined;
|
|
18
|
+
columnGap?: 0 | 24 | 16 | 32 | 40 | 48 | 56 | 2 | 4 | 8 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | undefined;
|
|
19
|
+
filling?: false | "fill" | "fit" | undefined;
|
|
20
|
+
colMinWidth?: string | undefined;
|
|
21
|
+
rowMinHeight?: string | undefined;
|
|
22
|
+
} & React.RefAttributes<HTMLUListElement>>;
|
|
23
|
+
export declare const GridRoot: React.ForwardRefExoticComponent<PropsWithClass & {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
columns?: number | undefined;
|
|
26
|
+
rows?: number | undefined;
|
|
27
|
+
rowGap?: 0 | 24 | 16 | 32 | 40 | 48 | 56 | 2 | 4 | 8 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | undefined;
|
|
28
|
+
columnGap?: 0 | 24 | 16 | 32 | 40 | 48 | 56 | 2 | 4 | 8 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | undefined;
|
|
29
|
+
filling?: false | "fill" | "fit" | undefined;
|
|
30
|
+
colMinWidth?: string | undefined;
|
|
31
|
+
rowMinHeight?: string | undefined;
|
|
32
|
+
} & React.RefAttributes<HTMLUListElement>> & {
|
|
33
|
+
Item: React.FC<import("./grid-item").GridItemProps>;
|
|
34
|
+
};
|
package/grid/grid.js
CHANGED
|
@@ -15,4 +15,4 @@ export const Grid = forwardRef(({ className, children, columns, rows, rowGap = 8
|
|
|
15
15
|
return (React.createElement("ul", { className: clsx(GridClass, className), style: { ...computedStyle, ...style }, "data-grid-filling-type": filling, ref: forwardedRef, ...props }, children));
|
|
16
16
|
});
|
|
17
17
|
Grid.displayName = 'Grid';
|
|
18
|
-
Grid
|
|
18
|
+
export const GridRoot = Object.assign(Grid, { Item: GridItem });
|
package/grid/index.d.ts
CHANGED
package/grid/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { Grid } from './grid';
|
|
2
|
-
export { GridItem } from './grid-item';
|
|
1
|
+
export { GridRoot as Grid } from './grid';
|
package/icons/all.svg
CHANGED
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
<path d="M3 4v7a1 1 0 1 0 2 0V6.416l6.294 6.293a.998.998 0 0 0 1.413-.002 1 1 0 0 0 0-1.414L6.413 5H11a1 1 0 1 0 0-2H4a1 1 0 0 0-1 1Z"/>
|
|
51
51
|
</symbol><symbol id="16/arrow-up-right" viewBox="0 0 16 16">
|
|
52
52
|
<path d="M13 4v7a1 1 0 1 1-2 0V6.416l-6.294 6.293a.998.998 0 0 1-1.413-.002 1 1 0 0 1 0-1.414L9.587 5H5a1 1 0 1 1 0-2h7a1 1 0 0 1 1 1Z"/>
|
|
53
|
+
</symbol><symbol id="16/backward-step" viewBox="0 0 16 16">
|
|
54
|
+
<path d="M3.972 2.002c-.552 0-.972.447-.972 1V13a1 1 0 0 0 1 1c.552-.026 1-.448 1-1.026V3.002c0-.553-.448-1-1.028-1Zm7.389.23L5.36 7.205C5.12 7.433 5 7.717 5 8c0 .285.12.569.358.77l6 4.972c.646.535 1.642.086 1.642-.77V2.977c-.027-.83-.995-1.28-1.64-.744Z"/>
|
|
53
55
|
</symbol><symbol id="16/ban" viewBox="0 0 16 16">
|
|
54
56
|
<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7ZM2.75 8c0-1.132.364-2.179.976-3.038l7.311 7.312A5.21 5.21 0 0 1 8 13.25 5.255 5.255 0 0 1 2.75 8Zm9.524 3.038L4.962 3.726A5.217 5.217 0 0 1 8 2.75 5.255 5.255 0 0 1 13.25 8c0 1.132-.364 2.18-.976 3.038Z"/>
|
|
55
57
|
</symbol><symbol id="16/bars" viewBox="0 0 16 16">
|
|
@@ -125,6 +127,8 @@
|
|
|
125
127
|
<path d="M9.667 1v3.25H13L9.667 1Zm-.834 3.25V1H4.25C3.56 1 3 1.546 3 2.219V12.78c0 .674.56 1.22 1.25 1.22h7.5c.69 0 1.25-.546 1.25-1.219V5.062H9.69c-.484 0-.857-.363-.857-.812Zm1.253 3.659L8.883 9.125l1.225 1.194a.599.599 0 0 1 0 .862.636.636 0 0 1-.884 0L8 9.986 6.775 11.18a.636.636 0 0 1-.884 0 .599.599 0 0 1 0-.862l1.226-1.193-1.226-1.216a.599.599 0 0 1 0-.862.636.636 0 0 1 .883 0L8 8.264 9.225 7.07a.636.636 0 0 1 .884 0c.244.238.243.623-.023.839Z"/>
|
|
126
128
|
</symbol><symbol id="16/filter" viewBox="0 0 16 16">
|
|
127
129
|
<path d="m13.835 4.165-4.33 4.969v3.33c0 .436-.515.685-.885.439l-1.876-1.25a.528.528 0 0 1-.24-.439v-2.08l-4.331-4.97C1.766 3.699 2.123 3 2.767 3h10.475c.645 0 .98.698.593 1.165Z"/>
|
|
130
|
+
</symbol><symbol id="16/forward-step" viewBox="0 0 16 16">
|
|
131
|
+
<path d="M12.023 13.972c.555 0 .977-.447.977-1V3c0-.552-.45-1-1.006-1a.973.973 0 0 0-.977.972v9.998c0 .58.478 1.002 1.006 1.002ZM4.65 13.77l6.034-4.972a1 1 0 0 0 .36-.77 1 1 0 0 0-.36-.77L4.65 2.286A.978.978 0 0 0 3 3v9.998c0 .856 1.002 1.306 1.65.771Z"/>
|
|
128
132
|
</symbol><symbol id="16/frown" viewBox="0 0 16 16">
|
|
129
133
|
<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7Zm2.188 4.813a.874.874 0 1 1 0 1.75.875.875 0 1 1 0-1.75Zm-4.4 0a.875.875 0 1 1-.875.875.89.89 0 0 1 .875-.875Zm4.678 5.966a3.221 3.221 0 0 0-2.49-1.154 3.17 3.17 0 0 0-2.467 1.155c-.37.445-1.041-.115-.672-.561A4.169 4.169 0 0 1 8 9.75a4.06 4.06 0 0 1 3.134 1.47c.374.42-.299 1.005-.668.559Z"/>
|
|
130
134
|
</symbol><symbol id="16/github" viewBox="0 0 16 16">
|
|
@@ -261,6 +265,8 @@
|
|
|
261
265
|
<path d="M4 5.2v12a1.2 1.2 0 0 0 2.4 0V8.095l11.55 11.55a1.196 1.196 0 0 0 1.698.003 1.2 1.2 0 0 0 0-1.697L8.095 6.4H17.2a1.199 1.199 0 1 0 0-2.4h-12A1.2 1.2 0 0 0 4 5.2Z"/>
|
|
262
266
|
</symbol><symbol id="24/arrow-up-right" viewBox="0 0 24 24">
|
|
263
267
|
<path d="M20 5.2v12a1.2 1.2 0 0 1-2.4 0V8.095L6.05 19.645a1.196 1.196 0 0 1-1.698.003 1.2 1.2 0 0 1 0-1.697L15.905 6.4H6.8a1.199 1.199 0 1 1 0-2.4h12c.665 0 1.2.54 1.2 1.2Z"/>
|
|
268
|
+
</symbol><symbol id="24/backward-step" viewBox="0 0 24 24">
|
|
269
|
+
<path d="M16.566 3c-.317 0-.629.11-.887.322L7.5 10.041V3.75a.75.75 0 1 0-1.5 0v16.5a.751.751 0 0 0 1.5 0v-6.29l8.18 6.717c.215.215.567.323.886.323.482 0 1.434-.38 1.434-1.542V4.5c0-1.119-.952-1.5-1.434-1.5ZM16.5 19.519 7.524 12 16.5 4.48v15.04Z"/>
|
|
264
270
|
</symbol><symbol id="24/ban" viewBox="0 0 24 24">
|
|
265
271
|
<path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2ZM3.875 12c0-1.903.662-3.651 1.762-5.004L17.04 18.398A8.287 8.287 0 0 1 12 20.125c-4.48 0-8.125-3.645-8.125-8.125Zm14.488 5.004L6.961 5.637A8.084 8.084 0 0 1 12 3.875c4.48 0 8.125 3.645 8.125 8.125a7.926 7.926 0 0 1-1.762 5.004Z"/>
|
|
266
272
|
</symbol><symbol id="24/bars" viewBox="0 0 24 24">
|
|
@@ -333,6 +339,8 @@
|
|
|
333
339
|
<path d="m19.22 5.465-3.109-2.77A2.855 2.855 0 0 0 14.225 2H6.667C5.194 2 4 3.063 4 4.375v14.25C4 19.936 5.194 21 6.667 21h10.666C18.8 21 20 19.931 20 18.625V7.143c0-.627-.28-1.232-.78-1.678ZM18 18.625c0 .328-.299.594-.667.594H6.668c-.369 0-.667-.266-.667-.594L6 4.38c0-.328.298-.594.667-.594h6.666V6.75c0 .656.597 1.188 1.334 1.188H18v10.687Zm-4.042-7.756L12 12.617l-1.996-1.748a1.089 1.089 0 0 0-1.414 0 .823.823 0 0 0 0 1.26l1.998 1.746-1.96 1.745a.823.823 0 0 0 0 1.26c.39.348 1.023.348 1.414 0L12 15.133l1.96 1.745c.39.348 1.022.348 1.414 0a.823.823 0 0 0 0-1.26l-1.962-1.743 1.96-1.745a.823.823 0 0 0 0-1.26 1.091 1.091 0 0 0-1.414 0Z"/>
|
|
334
340
|
</symbol><symbol id="24/filter" viewBox="0 0 24 24">
|
|
335
341
|
<path d="M20.849 5.064c-.27-.58-.84-.939-1.49-.939H4.64c-.648 0-1.22.36-1.49.939a1.575 1.575 0 0 0 .224 1.69l5.815 7.14v2.381c0 .442.217.855.58 1.106l2.895 2.234c.218.176.517.26.791.26.749 0 1.357-.604 1.357-1.348v-4.632l5.819-7.147c.397-.473.482-1.12.218-1.684Zm-7.47 7.889a1.127 1.127 0 0 0-.254.71v4.177l-2.25-1.737v-2.409c0-.259-.089-.51-.252-.71l-5.838-7.17h14.428l-5.835 7.139Z"/>
|
|
342
|
+
</symbol><symbol id="24/forward-step" viewBox="0 0 24 24">
|
|
343
|
+
<path d="M17.25 3a.751.751 0 0 0-.75.75v6.29L8.322 3.324A1.388 1.388 0 0 0 7.436 3C6.95 3 6 3.381 6 4.501v14.996C6 20.62 6.95 21 7.436 21c.316 0 .628-.11.886-.322l8.178-6.719v6.291a.75.75 0 1 0 1.5 0V3.75a.751.751 0 0 0-.75-.75ZM7.5 19.519V4.48L16.477 12 7.5 19.519Z"/>
|
|
336
344
|
</symbol><symbol id="24/frown" viewBox="0 0 24 24">
|
|
337
345
|
<path d="M12 13.875c-1.57 0-3.046.693-4.055 1.9a.936.936 0 0 0 .119 1.318.944.944 0 0 0 1.324-.122 3.376 3.376 0 0 1 2.577-1.221c.976 0 1.964.44 2.612 1.22a.936.936 0 1 0 1.443-1.196c-1.008-1.204-2.45-1.899-4.02-1.899Zm-3.16-2.5c.695 0 1.25-.557 1.25-1.25s-.555-1.25-1.25-1.25c-.69 0-1.25.557-1.25 1.25s.594 1.25 1.25 1.25ZM12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18.125c-4.48 0-8.125-3.645-8.125-8.125S7.52 3.875 12 3.875 20.125 7.52 20.125 12 16.48 20.125 12 20.125Zm3.125-11.25c-.695 0-1.25.557-1.25 1.25s.555 1.25 1.25 1.25c.69 0 1.25-.557 1.25-1.25s-.559-1.25-1.25-1.25Z"/>
|
|
338
346
|
</symbol><symbol id="24/github" viewBox="0 0 24 24">
|
package/icons/structure.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"arrow-up",
|
|
12
12
|
"arrow-up-left",
|
|
13
13
|
"arrow-up-right",
|
|
14
|
+
"backward-step",
|
|
14
15
|
"ban",
|
|
15
16
|
"bars",
|
|
16
17
|
"bars-sort-down",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"file-pdf",
|
|
48
49
|
"file-xmark",
|
|
49
50
|
"filter",
|
|
51
|
+
"forward-step",
|
|
50
52
|
"frown",
|
|
51
53
|
"github",
|
|
52
54
|
"graduation-cap",
|
package/icons/types.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type IconNames = 'arrow-down' |
|
|
|
11
11
|
'arrow-up' |
|
|
12
12
|
'arrow-up-left' |
|
|
13
13
|
'arrow-up-right' |
|
|
14
|
+
'backward-step' |
|
|
14
15
|
'ban' |
|
|
15
16
|
'bars' |
|
|
16
17
|
'bars-sort-down' |
|
|
@@ -47,6 +48,7 @@ export type IconNames = 'arrow-down' |
|
|
|
47
48
|
'file-pdf' |
|
|
48
49
|
'file-xmark' |
|
|
49
50
|
'filter' |
|
|
51
|
+
'forward-step' |
|
|
50
52
|
'frown' |
|
|
51
53
|
'github' |
|
|
52
54
|
'graduation-cap' |
|
|
@@ -106,6 +108,7 @@ export type IconNames = 'arrow-down' |
|
|
|
106
108
|
'arrow-up' |
|
|
107
109
|
'arrow-up-left' |
|
|
108
110
|
'arrow-up-right' |
|
|
111
|
+
'backward-step' |
|
|
109
112
|
'ban' |
|
|
110
113
|
'bars' |
|
|
111
114
|
'bars-sort-down' |
|
|
@@ -142,6 +145,7 @@ export type IconNames = 'arrow-down' |
|
|
|
142
145
|
'file-pdf' |
|
|
143
146
|
'file-xmark' |
|
|
144
147
|
'filter' |
|
|
148
|
+
'forward-step' |
|
|
145
149
|
'frown' |
|
|
146
150
|
'github' |
|
|
147
151
|
'graduation-cap' |
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { Chip, ChipProps } from './chip';
|
|
|
9
9
|
export { CircularProgress, CircularProgressProps } from './circular-progress';
|
|
10
10
|
export { ClampText, ClampTextProps } from './clamp-text';
|
|
11
11
|
export { Container, ContainerProps } from './container';
|
|
12
|
-
export {
|
|
12
|
+
export { Table, TableProps } from './table';
|
|
13
13
|
export { Disclosure, DisclosureProps } from './disclosure';
|
|
14
14
|
export { Dropdown, DropdownProps } from './dropdown';
|
|
15
15
|
export { Elevator, ElevatorProps } from './elevator';
|
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { Chip } from './chip';
|
|
|
9
9
|
export { CircularProgress } from './circular-progress';
|
|
10
10
|
export { ClampText } from './clamp-text';
|
|
11
11
|
export { Container } from './container';
|
|
12
|
-
export {
|
|
12
|
+
export { Table } from './table';
|
|
13
13
|
export { Disclosure } from './disclosure';
|
|
14
14
|
export { Dropdown } from './dropdown';
|
|
15
15
|
export { Elevator } from './elevator';
|
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.13",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
@@ -56,21 +56,21 @@
|
|
|
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",
|
|
70
70
|
"react-focus-on": "3.5.4",
|
|
71
71
|
"react-loading-skeleton": "3.0.1",
|
|
72
72
|
"react-masonry-css": "1.0.16",
|
|
73
|
-
"react-paginate": "
|
|
73
|
+
"react-paginate": "github:AdeleD/react-paginate",
|
|
74
74
|
"react-popper-tooltip": "4.3.1",
|
|
75
75
|
"react-roving-tabindex": "3.1.1",
|
|
76
76
|
"react-uid": "2.3.1",
|
|
@@ -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",
|
|
@@ -100,10 +100,9 @@
|
|
|
100
100
|
"@storybook/theming": "6.3.12",
|
|
101
101
|
"@types/flat": "5.0.2",
|
|
102
102
|
"@types/react-dom": "17.0.11",
|
|
103
|
-
"@types/react-paginate": "7.1.1",
|
|
104
103
|
"@typescript-eslint/eslint-plugin": "5.4.0",
|
|
105
104
|
"@typescript-eslint/parser": "5.4.0",
|
|
106
|
-
"@wonderflow/config": "1.5.
|
|
105
|
+
"@wonderflow/config": "1.5.5",
|
|
107
106
|
"babel-loader": "8.2.3",
|
|
108
107
|
"commit-analyzer-fail-on-no-release": "1.0.0",
|
|
109
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
|
|
package/table/index.d.ts
ADDED
package/table/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from './table';
|
package/table/table.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableProps as ReactTableProps } from 'react-data-table-component';
|
|
3
|
+
import { IconNames } from '../icons/types';
|
|
4
|
+
export declare type TableProps<T> = ReactTableProps<T> & {
|
|
5
|
+
ExpandableRowsComponent?: React.FC<{
|
|
6
|
+
data: T;
|
|
7
|
+
}>;
|
|
8
|
+
collapsedRowIcon?: IconNames;
|
|
9
|
+
expandedRowIcon?: IconNames;
|
|
10
|
+
minRowHeight?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Table: <T>({ className, ExpandableRowsComponent, progressComponent, customStyles, pagination, responsive, fixedHeader, noHeader, paginationPerPage, striped, theme, collapsedRowIcon, expandedRowIcon, minRowHeight, ...props }: TableProps<T>) => JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import ReactDataTable from 'react-data-table-component';
|
|
3
|
-
import { Icon, SkeletonBlock, Checkbox } from '
|
|
3
|
+
import { Icon, SkeletonBlock, Checkbox } from '..';
|
|
4
4
|
import { customStyle } from './theme';
|
|
5
|
-
import { TableWrapper, SortIcon, ExpandWrapper, ExpandContent } from './
|
|
5
|
+
import { TableWrapper, SortIcon, ExpandWrapper, ExpandContent } from './table.module.css';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
export const
|
|
7
|
+
export const Table = ({ className, ExpandableRowsComponent, progressComponent, customStyles, pagination = false, responsive = true, fixedHeader = false, noHeader = true, paginationPerPage = 8, striped = false, theme = 'default', collapsedRowIcon = 'chevron-right', expandedRowIcon = 'chevron-down', minRowHeight = '48px', ...props }) => {
|
|
8
8
|
const selectProps = {
|
|
9
9
|
indeterminate: (isIndeterminate) => isIndeterminate,
|
|
10
10
|
dimension: 'small'
|
|
@@ -16,6 +16,6 @@ export const DataTable = ({ className, ExpandableRowsComponent, progressComponen
|
|
|
16
16
|
React.createElement(SkeletonBlock, { height: 40, count: 8 })), striped: striped, customStyles: customStyles || customStyle(minRowHeight), selectableRowsComponent: Checkbox, selectableRowsComponentProps: selectProps, expandableIcon: {
|
|
17
17
|
collapsed: React.createElement(Icon, { name: collapsedRowIcon, fill: "var(--global-foreground)", dimension: 16 }),
|
|
18
18
|
expanded: React.createElement(Icon, { name: expandedRowIcon, fill: "var(--global-foreground)", dimension: 16 })
|
|
19
|
-
}, sortIcon: (React.createElement("span", { className: SortIcon },
|
|
19
|
+
}, paginationIconFirstPage: React.createElement(Icon, { name: "backward-step", dimension: 24 }), paginationIconPrevious: React.createElement(Icon, { name: "chevron-left", dimension: 24 }), paginationIconNext: React.createElement(Icon, { name: "chevron-right", dimension: 24 }), paginationIconLastPage: React.createElement(Icon, { name: "forward-step", dimension: 24 }), sortIcon: (React.createElement("span", { className: SortIcon },
|
|
20
20
|
React.createElement(Icon, { name: "arrow-up", dimension: 16 }))), ...props })));
|
|
21
21
|
};
|
|
@@ -8,19 +8,6 @@
|
|
|
8
8
|
display: block;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/* .ExpandIcon {
|
|
12
|
-
display: flex;
|
|
13
|
-
color: var(--highlight-gray-foreground);
|
|
14
|
-
width: 24px;
|
|
15
|
-
height: 24px;
|
|
16
|
-
border-radius: env(--radius-4);
|
|
17
|
-
margin: 0 auto;
|
|
18
|
-
|
|
19
|
-
&[data-expanded] {
|
|
20
|
-
color: var(--global-foreground);
|
|
21
|
-
}
|
|
22
|
-
} */
|
|
23
|
-
|
|
24
11
|
.ExpandWrapper {
|
|
25
12
|
overflow: hidden;
|
|
26
13
|
}
|
|
File without changes
|
|
@@ -7,11 +7,11 @@ createTheme('default', {
|
|
|
7
7
|
disabled: 'var(--global-disabled-foreground)'
|
|
8
8
|
},
|
|
9
9
|
background: {
|
|
10
|
-
default: '
|
|
10
|
+
default: 'transparent'
|
|
11
11
|
},
|
|
12
12
|
context: {
|
|
13
|
-
background: '
|
|
14
|
-
text: 'var(--foreground
|
|
13
|
+
background: 'var(--global-vibrancy-background)',
|
|
14
|
+
text: 'var(--global-vibrancy-foreground)'
|
|
15
15
|
},
|
|
16
16
|
divider: {
|
|
17
17
|
default: 'transparent'
|
|
@@ -36,12 +36,6 @@ createTheme('default', {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export const customStyle = (rowHeight) => ({
|
|
39
|
-
subHeader: {
|
|
40
|
-
style: {
|
|
41
|
-
padding: 0,
|
|
42
|
-
marginBottom: tkns.space[24]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
39
|
rows: {
|
|
46
40
|
style: {
|
|
47
41
|
minHeight: rowHeight
|
|
@@ -69,6 +63,15 @@ export const customStyle = (rowHeight) => ({
|
|
|
69
63
|
pagination: {
|
|
70
64
|
style: {
|
|
71
65
|
fontSize: tkns.font.size[16]
|
|
66
|
+
},
|
|
67
|
+
pageButtonsStyle: {
|
|
68
|
+
color: 'var(--global-foreground)'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
contextMenu: {
|
|
72
|
+
style: {
|
|
73
|
+
backdropFilter: 'blur(32px)',
|
|
74
|
+
borderRadius: '4px'
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
});
|
|
@@ -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
|
|
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
|
|
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
|
|
102
|
+
* Generated on Fri, 26 Nov 2021 16:44:05 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TableProps } from 'react-data-table-component';
|
|
3
|
-
import { IconNames } from '../icons/types';
|
|
4
|
-
export declare type DataTableProps<T> = TableProps<T> & {
|
|
5
|
-
ExpandableRowsComponent?: React.FC<{
|
|
6
|
-
data: T;
|
|
7
|
-
}>;
|
|
8
|
-
collapsedRowIcon?: IconNames;
|
|
9
|
-
expandedRowIcon?: IconNames;
|
|
10
|
-
minRowHeight?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const DataTable: <T>({ className, ExpandableRowsComponent, progressComponent, customStyles, pagination, responsive, fixedHeader, noHeader, paginationPerPage, striped, theme, collapsedRowIcon, expandedRowIcon, minRowHeight, ...props }: DataTableProps<T>) => JSX.Element;
|
package/data-table/index.d.ts
DELETED
package/data-table/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DataTable } from './data-table';
|