@wonderflow/react-components 2.14.8 → 2.14.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/card/card.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import type * as Polymorphic from '@radix-ui/react-polymorphic';
3
3
  import { StackProps } from '../stack';
4
4
  import { TokensTypes } from '@wonderflow/tokens/platforms/web/types';
5
- export declare type CardProps = PropsWithClass & Pick<StackProps, 'wrap' | 'columnGap' | 'verticalAlign' | 'horizontalAlign'> & {
5
+ export declare type CardProps = PropsWithClass & Pick<StackProps, 'wrap' | 'columnGap' | 'rowGap' | 'verticalAlign' | 'horizontalAlign'> & {
6
6
  padding?: false | TokensTypes['space'];
7
7
  left?: ReactNode;
8
8
  right?: ReactNode;
package/card/card.js CHANGED
@@ -15,13 +15,13 @@ import { Stack } from '../stack';
15
15
  import clsx from 'clsx';
16
16
  import { Card as CardClass, Left, Content, Right } from './card.module.css';
17
17
  export const Card = forwardRef((_a, forwardedRef) => {
18
- var { as: Wrapper = 'div', children, className, padding = 24, radius = 8, left, right, dimmed, columnGap = 24, verticalAlign = 'start', horizontalAlign = 'space-between', wrap, style } = _a, props = __rest(_a, ["as", "children", "className", "padding", "radius", "left", "right", "dimmed", "columnGap", "verticalAlign", "horizontalAlign", "wrap", "style"]);
18
+ var { as: Wrapper = 'div', children, className, padding = 24, radius = 8, left, right, dimmed, columnGap = 24, rowGap = 24, verticalAlign = 'start', horizontalAlign = 'space-between', wrap, style } = _a, props = __rest(_a, ["as", "children", "className", "padding", "radius", "left", "right", "dimmed", "columnGap", "rowGap", "verticalAlign", "horizontalAlign", "wrap", "style"]);
19
19
  const dynamicStyle = {
20
20
  '--padding': padding ? tkns.space[padding] : '0',
21
21
  '--radius': radius ? tkns.radius[radius] : '0'
22
22
  };
23
23
  return (React.createElement(Wrapper, Object.assign({ ref: forwardedRef, className: clsx(CardClass, className), style: Object.assign(Object.assign({}, dynamicStyle), style), "data-card-dimmed": dimmed }, props),
24
- React.createElement(Stack, { direction: "row", fill: false, verticalAlign: verticalAlign, horizontalAlign: horizontalAlign, columnGap: columnGap, wrap: wrap },
24
+ React.createElement(Stack, { direction: "row", fill: false, verticalAlign: verticalAlign, horizontalAlign: horizontalAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap },
25
25
  left && React.createElement("div", { className: Left }, left),
26
26
  children && (React.createElement(Stack, { className: Content }, children)),
27
27
  right && (React.createElement(Stack, { className: Right }, right)))));
@@ -14,6 +14,7 @@ import clsx from 'clsx';
14
14
  import { Disclosure as DisclosureClass, Summary, ExpandIcon, Content } from './disclosure.module.css';
15
15
  import { Icon } from '../icon';
16
16
  import { Text } from '../text';
17
+ import { motion } from 'framer-motion';
17
18
  export const Disclosure = forwardRef((_a, forwardedRef) => {
18
19
  var { children, open = false, padding = true, className, summary, contentMaxHeight, dimension = 'regular', iconPosition = 'left', expandable = true, style } = _a, props = __rest(_a, ["children", "open", "padding", "className", "summary", "contentMaxHeight", "dimension", "iconPosition", "expandable", "style"]);
19
20
  const [isOpen, setIsOpen] = useState(open);
@@ -39,6 +40,6 @@ export const Disclosure = forwardRef((_a, forwardedRef) => {
39
40
  React.createElement(Text, { as: "summary", onClick: handleOpen(), className: Summary, fluid: false, "aria-expanded": isOpen, tabIndex: !expandable ? -1 : 0, size: dimension ? sizes[dimension].summary : undefined, weight: "bold", role: "button" },
40
41
  summary,
41
42
  expandable && (React.createElement(Icon, { className: ExpandIcon, name: "chevron-right", dimension: dimension !== 'big' ? 16 : 24 }))),
42
- React.createElement("div", { className: Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight) }, children)));
43
+ React.createElement(motion.div, { className: Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 0, opacity: 1 } : { y: 5, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 } }, children)));
43
44
  });
44
45
  Disclosure.displayName = 'Disclosure';
@@ -6,7 +6,6 @@
6
6
  color: var(--dimmed-6);
7
7
  line-height: 1.2;
8
8
  font-weight: 600;
9
- outline: none;
10
9
  cursor: pointer;
11
10
  inline-size: 100%;
12
11
  box-sizing: border-box;
@@ -26,6 +25,7 @@
26
25
 
27
26
  &:is(:hover, :focus-visible) {
28
27
  color: var(--cta-default);
28
+ outline: none;
29
29
 
30
30
  &::before {
31
31
  background-color: var(--dimmed-2);
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.14.8",
4
+ "version": "2.14.9",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
@@ -118,6 +118,7 @@
118
118
  "ora": "5.4.1",
119
119
  "rimraf": "3.0.2",
120
120
  "semantic-release": "17.4.7",
121
+ "storybook-addon-themes": "6.1.0",
121
122
  "storybook-css-modules-preset": "1.1.1",
122
123
  "stylelint": "13.13.1",
123
124
  "svgo": "2.5.0",
@@ -69,8 +69,6 @@
69
69
  }
70
70
 
71
71
  .TabPanel {
72
- --fadeFromY: 10px;
73
-
74
72
  animation: fadeIn env(--duration-200);
75
73
  animation-timing-function: env(--easing-entrance));
76
74
  }
package/themes/dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 15 Sep 2021 09:20:12 GMT
3
+ * Generated on Thu, 16 Sep 2021 15:33:19 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes/light.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 15 Sep 2021 09:20:12 GMT
3
+ * Generated on Thu, 16 Sep 2021 15:33:19 GMT
4
4
  */
5
5
 
6
6
  :root {
package/themes.css CHANGED
@@ -3,7 +3,7 @@
3
3
  [data-theme='light'] {
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Wed, 15 Sep 2021 09:20:12 GMT
6
+ * Generated on Thu, 16 Sep 2021 15:33:19 GMT
7
7
  */
8
8
 
9
9
 
@@ -48,7 +48,7 @@
48
48
  :root:not([data-theme='light']) {
49
49
  /**
50
50
  * Do not edit directly
51
- * Generated on Wed, 15 Sep 2021 09:20:12 GMT
51
+ * Generated on Thu, 16 Sep 2021 15:33:19 GMT
52
52
  */
53
53
 
54
54
 
@@ -94,7 +94,7 @@
94
94
  :root[data-theme='dark'] {
95
95
  /**
96
96
  * Do not edit directly
97
- * Generated on Wed, 15 Sep 2021 09:20:12 GMT
97
+ * Generated on Thu, 16 Sep 2021 15:33:19 GMT
98
98
  */
99
99
 
100
100