@wonderflow/react-components 10.3.0 → 10.6.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/dist/components/button/button.js +1 -1
- package/dist/components/button/button.module.css +1 -1
- package/dist/components/card/card.module.css +1 -1
- package/dist/components/drawer/drawer.module.css +1 -1
- package/dist/components/list/list-item.js +5 -5
- package/dist/components/list/list.module.css +1 -1
- package/package.json +14 -14
|
@@ -15,7 +15,7 @@ export const Button = forwardRef(({ kind = 'primary', dimension = 'regular', cla
|
|
|
15
15
|
regular: 16,
|
|
16
16
|
small: 12,
|
|
17
17
|
};
|
|
18
|
-
return (_jsxs(Wrapper, { ref: forwardedRef, type: Wrapper === 'button' ? type : undefined, className: clsx(styles.Button, className), "data-button-icon-position": iconPosition, "data-button-dimension": dimension, "data-button-kind": kind, "data-button-fullwidth": fullWidth, "aria-disabled": disabled, "aria-busy": busy, "aria-pressed":
|
|
18
|
+
return (_jsxs(Wrapper, { ref: forwardedRef, type: Wrapper === 'button' ? type : undefined, className: clsx(styles.Button, className), "data-button-icon-position": iconPosition, "data-button-dimension": dimension, "data-button-kind": kind, "data-button-fullwidth": fullWidth, "aria-disabled": disabled, "aria-busy": busy, "aria-pressed": pressed, "aria-live": busy ? 'polite' : undefined, onClick: handleClick(), ...otherProps, children: [icon && (_jsx(Symbol, { source: icon, fill: iconColor, weight: "solid", dimension: iconSize[dimension] })), (children && busy) ? _jsx("span", { children: children }) : children, busy && (_jsx("span", { className: styles.SpinnerIndicator, children: _jsx(Spinner, { dimension: dimension }) }))] }));
|
|
19
19
|
});
|
|
20
20
|
export const ButtonsGroup = ({ children, className, kind, dimension = 'regular', }) => (_jsx("div", { className: clsx(styles.ButtonsGroup, className), children: Children.map(children, child => isValidElement(child) && cloneElement(child, {
|
|
21
21
|
kind,
|
|
@@ -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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Drawer{display:contents}.Container{align-items:stretch;bottom:0;display:grid;left:0;pointer-events:none;position:absolute;right:0;top:0}.Container[data-drawer-side=right]{justify-content:flex-end}.Container[data-drawer-side=left]{justify-content:flex-start}
|
|
1
|
+
.Drawer{display:contents}.Container{align-items:stretch;bottom:0;display:grid;left:0;pointer-events:none;position:absolute;right:0;top:0}.Container[data-drawer-side=right]{justify-content:flex-end}.Container[data-drawer-side=left]{justify-content:flex-start}.Container>*{pointer-events:auto}.Content{-webkit-overflow-scrolling:touch;background-color:var(--global-background);inline-size:100vw;max-inline-size:var(--max-w);overflow:auto;overscroll-behavior:contain}.Header{background-color:inherit;border-bottom:1px solid var(--dimmed-1);padding:1rem 1rem 1.5rem 1.5rem;position:sticky;top:0;z-index:1}.CloseButton.CloseButton{flex-grow:0}
|
|
@@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Stack, Symbol, Text, } from '../..';
|
|
5
5
|
import styles from './list.module.css';
|
|
6
|
-
export const ListItem = forwardRef(({ className, hideMarker, marker = '
|
|
6
|
+
export const ListItem = forwardRef(({ className, hideMarker, marker = 'bullet', markerColor, children, dimension = 'regular', ...otherProps }, forwardedRef) => {
|
|
7
7
|
const sizes = {
|
|
8
8
|
small: {
|
|
9
9
|
text: 16,
|
|
@@ -16,16 +16,16 @@ export const ListItem = forwardRef(({ className, hideMarker, marker = 'circle',
|
|
|
16
16
|
text: 18,
|
|
17
17
|
icon: {
|
|
18
18
|
size: 16,
|
|
19
|
-
weight: '
|
|
19
|
+
weight: 'solid',
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
big: {
|
|
23
23
|
text: 22,
|
|
24
24
|
icon: {
|
|
25
|
-
size:
|
|
26
|
-
weight: '
|
|
25
|
+
size: 18,
|
|
26
|
+
weight: 'solid',
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
-
return (_jsxs(Stack, { className: clsx(styles.ListItem, className), as: "li", direction: "row", hAlign: "start", vAlign: "start", fill: false, ref: forwardedRef, ...otherProps, children: [!hideMarker && (_jsx(Symbol, { source: marker, className: styles.Marker, fill: markerColor, "data-list-default-marker": marker === '
|
|
30
|
+
return (_jsxs(Stack, { className: clsx(styles.ListItem, className), as: "li", direction: "row", hAlign: "start", vAlign: "start", fill: false, ref: forwardedRef, ...otherProps, children: [!hideMarker && (_jsx(Symbol, { source: marker, className: styles.Marker, fill: markerColor, "data-list-default-marker": marker === 'bullet', weight: marker === 'bullet' ? 'solid' : sizes[dimension].icon.weight, dimension: marker !== 'bullet' ? sizes[dimension].icon.size : 16 })), _jsx(Text, { as: "span", size: sizes[dimension].text, children: children })] }));
|
|
31
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.List{--marker-size:1.00rem;--marker-gap:0.50rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.
|
|
1
|
+
.List{--marker-size:1.00rem;--marker-gap:0.50rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.75rem;--marker-gap:0.50rem}.List[data-list-size=big]{--marker-size:1.13rem;--marker-gap:1.00rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.ListItem.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem.ListItem{display:list-item}:is([data-list-ordered=true] .ListItem.ListItem)::marker{color:var(--dimmed-5)}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.List[data-list-size=big] .Marker{margin-block-start:calc(var(--marker-size)/2.8)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
4
4
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,25 +56,25 @@
|
|
|
56
56
|
"react-dom": ">=17.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "7.18.
|
|
59
|
+
"@babel/core": "7.18.10",
|
|
60
60
|
"@babel/preset-typescript": "7.18.6",
|
|
61
|
-
"@storybook/addon-actions": "6.5.
|
|
62
|
-
"@storybook/addon-essentials": "6.5.
|
|
63
|
-
"@storybook/addon-links": "6.5.
|
|
61
|
+
"@storybook/addon-actions": "6.5.10",
|
|
62
|
+
"@storybook/addon-essentials": "6.5.10",
|
|
63
|
+
"@storybook/addon-links": "6.5.10",
|
|
64
64
|
"@storybook/addon-postcss": "2.0.0",
|
|
65
|
-
"@storybook/addons": "6.5.
|
|
66
|
-
"@storybook/builder-webpack5": "6.5.
|
|
67
|
-
"@storybook/manager-webpack5": "6.5.
|
|
68
|
-
"@storybook/react": "6.5.
|
|
69
|
-
"@storybook/theming": "6.5.
|
|
65
|
+
"@storybook/addons": "6.5.10",
|
|
66
|
+
"@storybook/builder-webpack5": "6.5.10",
|
|
67
|
+
"@storybook/manager-webpack5": "6.5.10",
|
|
68
|
+
"@storybook/react": "6.5.10",
|
|
69
|
+
"@storybook/theming": "6.5.10",
|
|
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.6.0",
|
|
74
|
+
"@wonderflow/tokens": "10.6.0",
|
|
75
75
|
"babel-loader": "8.2.5",
|
|
76
76
|
"cpy-cli": "3.1.1",
|
|
77
|
-
"postcss": "8.4.
|
|
77
|
+
"postcss": "8.4.16",
|
|
78
78
|
"postcss-cli": "10.0.0",
|
|
79
79
|
"react": "17.0.2",
|
|
80
80
|
"react-dom": "17.0.2",
|
|
@@ -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.18.0"
|
|
102
102
|
}
|
|
103
103
|
}
|