@wonderflow/react-components 10.1.0 → 10.4.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/core/utils/elevation.css +35 -0
- package/dist/components/button/button.module.css +1 -1
- package/dist/components/card/card.module.css +1 -1
- package/dist/components/info-state/info-state.js +1 -1
- package/dist/components/popover/popover.d.ts +1 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +2 -3
- package/dist/components/table/table.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@define-mixin elevation-1 $color: 0deg 0% 0% {
|
|
2
|
+
box-shadow:
|
|
3
|
+
0 3px 13px hsl($color / 6%),
|
|
4
|
+
0 2.5px 4.59px hsl($color / 4.06%),
|
|
5
|
+
0 1.34px 2.45px hsl($color / 2.35%),
|
|
6
|
+
0 0.75px 1.37px hsl($color / 4%),
|
|
7
|
+
0 0.39px 0.73px hsl($color / 1.65%),
|
|
8
|
+
0 0.16px 0.3px hsl($color / 0.94%);
|
|
9
|
+
}
|
|
10
|
+
@define-mixin elevation-2 $color: 0deg 0% 0% {
|
|
11
|
+
box-shadow:
|
|
12
|
+
0 9px 25px hsl($color / 8%),
|
|
13
|
+
0 3.75px 10.44px hsl($color / 6.35%),
|
|
14
|
+
0 2.01px 5.58px hsl($color / 4.75%),
|
|
15
|
+
0 1.12px 3.13px hsl($color / 4.5%),
|
|
16
|
+
0 0.6px 1.66px hsl($color / 4.25%),
|
|
17
|
+
0 0.25px 0.69px hsl($color / 3.65%);
|
|
18
|
+
}
|
|
19
|
+
@define-mixin elevation-3 $color: 0deg 0% 0% {
|
|
20
|
+
box-shadow:
|
|
21
|
+
0 18px 40px hsl($color / 9%),
|
|
22
|
+
0 7.51px 16.71px hsl($color / 5.63%),
|
|
23
|
+
0 4.02px 8.93px hsl($color / 4.15%),
|
|
24
|
+
0 2.25px 5px hsl($color / 4%),
|
|
25
|
+
0 1.19px 2.66px hsl($color / 3.85%),
|
|
26
|
+
0 0.49px 1.1px hsl($color / 3.37%);
|
|
27
|
+
}
|
|
28
|
+
@define-mixin elevation-4 $color: 0deg 0% 0% {
|
|
29
|
+
box-shadow:
|
|
30
|
+
0 33px 78px hsl($color / 11%),
|
|
31
|
+
0 12.04px 28.47px hsl($color / 7.59%),
|
|
32
|
+
0 5.84px 13.82px hsl($color / 6.12%),
|
|
33
|
+
0 2.86px 6.77px hsl($color / 4.88%),
|
|
34
|
+
0 1.13px 2.67px hsl($color / 5.41%);
|
|
35
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(.Button){-webkit-touch-callout:none;grid-gap:.5rem;align-items:center;appearance:none;background:none;border:0;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;transition:all .1s cubic-bezier(.3,.07,.34,1);-webkit-user-select:none;user-select:none;white-space:nowrap}:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}[data-button-dimension=big]:where(.Button){block-size:3rem;font-size:1.13rem;padding:.55rem 1.5rem .66rem}[data-button-dimension=regular]:where(.Button){block-size:2.5rem;font-size:1rem;padding:.33rem 1rem .5rem}[data-button-dimension=small]:where(.Button){grid-gap:.25rem;block-size:1.5rem;font-size:.88rem;padding:0 .5rem .11rem}[data-button-kind=primary]:where(.Button){background:var(--cta-default);color:var(--cta-foreground)}[data-button-kind=primary]:where(.Button):
|
|
1
|
+
:where(.Button){-webkit-touch-callout:none;grid-gap:.5rem;align-items:center;appearance:none;background:none;border:0;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;transition:all .1s cubic-bezier(.3,.07,.34,1);-webkit-user-select:none;user-select:none;white-space:nowrap}:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}[data-button-dimension=big]:where(.Button){block-size:3rem;font-size:1.13rem;padding:.55rem 1.5rem .66rem}[data-button-dimension=regular]:where(.Button){block-size:2.5rem;font-size:1rem;padding:.33rem 1rem .5rem}[data-button-dimension=small]:where(.Button){grid-gap:.25rem;block-size:1.5rem;font-size:.88rem;padding:0 .5rem .11rem}[data-button-kind=primary]:where(.Button){background:var(--cta-default);color:var(--cta-foreground)}[data-button-kind=primary]:where(.Button):where([aria-pressed=true]),[data-button-kind=primary]:where(.Button):where([aria-pressed=true]:hover){background:#9e0018;color:#fff}[data-button-kind=primary]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background:var(--cta-dark)}[data-button-kind=secondary]:where(.Button){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}[data-button-kind=secondary]:where(.Button):where([aria-pressed=true]),[data-button-kind=secondary]:where(.Button):where([aria-pressed=true]:hover){background:var(--dimmed-7);color:var(--dimmed-0)}[data-button-kind=secondary]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}[data-button-kind=flat]:where(.Button){color:var(--global-vibrancy-foreground)}[data-button-kind=flat]:where(.Button):where([aria-pressed=true]),[data-button-kind=flat]:where(.Button):where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}[data-button-kind=flat]:where(.Button):is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}[data-button-kind=flat]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background)}[data-button-fullwidth=true]:where(.Button){inline-size:100%}[data-button-icon-position=right]:where(.Button){flex-direction:row-reverse}[aria-disabled=true]:where(.Button),[aria-disabled=true]:where(.Button):is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed;pointer-events:none}[aria-busy=true]:where(.Button){pointer-events:none}[aria-busy=true]:where(.Button)>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>*+*{box-shadow:inset 1px 0 0 hsla(0,0%,40%,.2)}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(.Card){background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}[data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-0)}[data-card-dimmed="0"]:where(.Card){background-color:var(--dimmed-0)}[data-card-dimmed="0"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-background)}[data-card-dimmed="1"]:where(.Card){background-color:var(--dimmed-1)}[data-card-dimmed="1"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-0)}[data-card-dimmed="2"]:where(.Card){background-color:var(--dimmed-2)}[data-card-dimmed="2"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-1)}[data-card-vibrant=true]:where(.Card){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}[data-card-vibrant=true][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="0"]:where(.Card){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-background)}[data-card-vibrant=true][data-card-dimmed="1"]:where(.Card){background-color:var(--global-vibrancy-background)}[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="2"]:where(.Card){background-color:var(--global-vibrancy-background-hard)}[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}
|
|
1
|
+
:where(.Card){background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}[data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-0)}[data-card-dimmed="0"]:where(.Card){background-color:var(--dimmed-0)}[data-card-dimmed="0"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-background)}[data-card-dimmed="0"][data-card-bordered=true]:where(.Card){border:1px solid var(--dimmed-1)}[data-card-dimmed="1"]:where(.Card){background-color:var(--dimmed-1)}[data-card-dimmed="1"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-0)}[data-card-dimmed="1"][data-card-bordered=true]:where(.Card){border:1px solid var(--dimmed-2)}[data-card-dimmed="2"]:where(.Card){background-color:var(--dimmed-2)}[data-card-dimmed="2"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--dimmed-1)}[data-card-dimmed="2"][data-card-bordered=true]:where(.Card){border:1px solid var(--dimmed-3)}[data-card-vibrant=true]:where(.Card){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}[data-card-vibrant=true][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="0"]:where(.Card){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-background)}[data-card-vibrant=true][data-card-dimmed="1"]:where(.Card){background-color:var(--global-vibrancy-background)}[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}[data-card-vibrant=true][data-card-dimmed="2"]:where(.Card){background-color:var(--global-vibrancy-background-hard)}[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:where(.Card):is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}.Left{flex-shrink:0}.Content{flex-grow:1}.Right{flex-shrink:0}
|
|
@@ -13,6 +13,6 @@ export const InfoState = forwardRef(({ className, children, title, icon, image,
|
|
|
13
13
|
repeatDelay: 5.2,
|
|
14
14
|
repeatType: 'reverse',
|
|
15
15
|
type: 'spring',
|
|
16
|
-
}, children: _jsx(Symbol, { source: icon, dimension: 48 }) })), (image && !icon) && _jsx("img", { className: styles.Image, alt: "", width: "400", src: image, loading: "lazy", decoding: "async" }), _jsxs(Stack, { rowGap: 16, hAlign: isHorizontal ? 'start' : 'center', vAlign: "center", fill: false, children: [_jsx(Title, { maxWidth: "20ch", textAlign: isHorizontal ? 'start' : 'center', level: "4", children: title }), _jsx(Text, { maxWidth: "60ch", dimmed: 6, textAlign: isHorizontal ? 'start' : 'center', children: children }), actions && (_jsx(Stack, { vPadding: 16, inline: true, direction: "row", columnGap: 16, rowGap: 16, wrap: true, children: actions }))] })] }) }));
|
|
16
|
+
}, children: _jsx(Symbol, { source: icon, dimension: 48 }) })), (image && !icon) && _jsx("img", { className: styles.Image, alt: "", width: "400", src: image, loading: "lazy", decoding: "async" }), _jsxs(Stack, { rowGap: 16, hAlign: isHorizontal ? 'start' : 'center', vAlign: "center", fill: false, children: [_jsx(Title, { maxWidth: "20ch", textAlign: isHorizontal ? 'start' : 'center', level: "4", children: title }), _jsx(Text, { as: "div", maxWidth: "60ch", dimmed: 6, textAlign: isHorizontal ? 'start' : 'center', children: children }), actions && (_jsx(Stack, { vPadding: 16, inline: true, direction: "row", columnGap: 16, rowGap: 16, wrap: true, children: actions }))] })] }) }));
|
|
17
17
|
});
|
|
18
18
|
InfoState.displayName = 'InfoState';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,aAAa,EAAY,kBAAkB,EAC3D,MAAM,gBAAgB,CAAC;AAOxB,OAAO,
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,aAAa,EAAY,kBAAkB,EAC3D,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAML,SAAS,EAKV,MAAM,OAAO,CAAC;AAOf,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAA;AA0BD,eAAO,MAAM,OAAO;;;iEA6HlB,CAAC"}
|
|
@@ -64,7 +64,6 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
64
64
|
},
|
|
65
65
|
}, {
|
|
66
66
|
placement,
|
|
67
|
-
strategy: 'fixed',
|
|
68
67
|
modifiers: [
|
|
69
68
|
sameWidth,
|
|
70
69
|
{
|
|
@@ -87,7 +86,7 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
87
86
|
if (open !== undefined)
|
|
88
87
|
setIsOpen(open);
|
|
89
88
|
}, [open]);
|
|
90
|
-
return (_jsxs("div", { ref: mergeRefs([popoverContainerRef, forwardedRef]), className: clsx(styles.Popover, className), "data-popover-has-focus": isFocusWithin, children: [
|
|
89
|
+
return (_jsxs("div", { ref: mergeRefs([popoverContainerRef, forwardedRef]), className: clsx(styles.Popover, className), "data-popover-has-focus": isFocusWithin, children: [isValidElement(trigger) && cloneElement(trigger, {
|
|
91
90
|
ref: setTriggerRef,
|
|
92
91
|
id: seedID('popover-trigger'),
|
|
93
92
|
key: seedID('popover-trigger'),
|
|
@@ -95,7 +94,7 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
95
94
|
'aria-controls': seedID('popover-dialog'),
|
|
96
95
|
'aria-expanded': isOpen,
|
|
97
96
|
...otherProps,
|
|
98
|
-
})
|
|
97
|
+
}), _jsx(AnimatePresence, { children: visible && (_jsx("div", { ref: setTooltipRef, role: "tooltip", id: seedID('tooltip-content'), ...getTooltipProps({ className: styles.PopUp }), children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { variants: PopoverAnimation, initial: "hidden", animate: "visible", exit: "hidden", children: Children.map(children, child => isValidElement(child) && cloneElement(child, {
|
|
99
98
|
id: seedID('popover-dialog'),
|
|
100
99
|
'aria-labelledby': seedID('popover-trigger'),
|
|
101
100
|
})) }) }) }, seedID('tooltip-content'))) })] }));
|
|
@@ -61,7 +61,7 @@ export const Table = ({ className, style, columns, data = [], selectableRows, se
|
|
|
61
61
|
id: 'selection',
|
|
62
62
|
isCollapsed: true,
|
|
63
63
|
isToggable: true,
|
|
64
|
-
Header: ({ getToggleAllPageRowsSelectedProps }) => (
|
|
64
|
+
Header: ({ getToggleAllPageRowsSelectedProps }) => (_jsx(TableCheckbox, { ...getToggleAllPageRowsSelectedProps() })),
|
|
65
65
|
Cell: ({ row }) => _jsx(TableCheckbox, { ...row.getToggleRowSelectedProps() }),
|
|
66
66
|
}];
|
|
67
67
|
const expanderColumn = [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.0",
|
|
4
4
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-dom": ">=17.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "7.18.
|
|
59
|
+
"@babel/core": "7.18.9",
|
|
60
60
|
"@babel/preset-typescript": "7.18.6",
|
|
61
61
|
"@storybook/addon-actions": "6.5.9",
|
|
62
62
|
"@storybook/addon-essentials": "6.5.9",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"@types/react": "17.0.43",
|
|
71
71
|
"@types/react-dom": "17.0.14",
|
|
72
72
|
"@types/react-table": "7.7.12",
|
|
73
|
-
"@wonderflow/config": "10.
|
|
74
|
-
"@wonderflow/tokens": "10.
|
|
73
|
+
"@wonderflow/config": "10.4.0",
|
|
74
|
+
"@wonderflow/tokens": "10.4.0",
|
|
75
75
|
"babel-loader": "8.2.5",
|
|
76
76
|
"cpy-cli": "3.1.1",
|
|
77
77
|
"postcss": "8.4.14",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"typescript-plugin-css-modules": "3.4.0"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@radix-ui/react-tabs": "0.
|
|
88
|
+
"@radix-ui/react-tabs": "1.0.0",
|
|
89
89
|
"ahooks": "3.5.0",
|
|
90
90
|
"clsx": "1.2.1",
|
|
91
|
-
"framer-motion": "6.
|
|
91
|
+
"framer-motion": "6.5.1",
|
|
92
92
|
"react-focus-on": "3.6.0",
|
|
93
93
|
"react-masonry-css": "1.0.16",
|
|
94
94
|
"react-merge-refs": "2.0.1",
|
|
@@ -98,6 +98,6 @@
|
|
|
98
98
|
"react-table": "7.8.0",
|
|
99
99
|
"react-uid": "2.3.2",
|
|
100
100
|
"slugify": "1.6.5",
|
|
101
|
-
"type-fest": "2.
|
|
101
|
+
"type-fest": "2.17.0"
|
|
102
102
|
}
|
|
103
103
|
}
|