@wonderflow/react-components 10.9.0 → 10.9.1

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.
@@ -1,5 +1,5 @@
1
- import { ForwardRefExoticComponent, PropsWithChildren } from 'react';
2
- import { AccordionItem, AccordionItemProps } from '../..';
1
+ import { PropsWithChildren } from 'react';
2
+ import { AccordionItemProps } from '../..';
3
3
  export declare type AccordionProps = PropsWithChildren<PropsWithClass> & {
4
4
  /**
5
5
  * Set the item to open by default when the accordion is rendered.
@@ -10,9 +10,5 @@ export declare type AccordionProps = PropsWithChildren<PropsWithClass> & {
10
10
  */
11
11
  showSeparators?: boolean;
12
12
  };
13
- declare type AccordionComponent = ForwardRefExoticComponent<AccordionProps> & {
14
- Item: typeof AccordionItem;
15
- };
16
- export declare const Accordion: AccordionComponent;
17
- export {};
13
+ export declare const Accordion: import("react").ForwardRefExoticComponent<Pick<AccordionProps, string> & import("react").RefAttributes<HTMLDivElement>>;
18
14
  //# sourceMappingURL=accordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AACA,OAAO,EACO,yBAAyB,EAAE,iBAAiB,EACzD,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAS,MAAM,cAAc,CAAC;AAKxE,oBAAY,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IAC/D;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAA;AACD,aAAK,kBAAkB,GAAG,yBAAyB,CAAC,cAAc,CAAC,GAAG;IACpE,IAAI,EAAE,OAAO,aAAa,CAAC;CAC5B,CAAA;AAED,eAAO,MAAM,SAAS,oBAkBE,CAAC"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AACA,OAAO,EACO,iBAAiB,EAC9B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,kBAAkB,EAAS,MAAM,cAAc,CAAC;AAKzD,oBAAY,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IAC/D;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,SAAS,yHAkBpB,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef, } from 'react';
4
- import { AccordionItem, Stack } from '../..';
4
+ import { Stack } from '../..';
5
5
  import * as styles from './accordion.module.css';
6
6
  import { AccordionContextProvider } from './accordion-context';
7
7
  export const Accordion = forwardRef(({ className, defaultOpen, showSeparators = true, children, style, }, forwardedRef) => (_jsx(AccordionContextProvider, { defaultOpen: defaultOpen, children: _jsx(Stack, { rowGap: 8, ref: forwardedRef, "data-accordion-separators": showSeparators, className: clsx(styles.Accordion, className), style: style, children: children }) })));
8
- Accordion.Item = AccordionItem;
@@ -3,10 +3,6 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
3
3
  import { Accordion } from './accordion';
4
4
  declare const story: ComponentMeta<typeof Accordion>;
5
5
  export default story;
6
- export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<import("./accordion").AccordionProps> & {
7
- Item: FCChildrenClass<import("./accordion-item").AccordionItemProps>;
8
- }>;
9
- export declare const Nested: ComponentStory<import("react").ForwardRefExoticComponent<import("./accordion").AccordionProps> & {
10
- Item: FCChildrenClass<import("./accordion-item").AccordionItemProps>;
11
- }>;
6
+ export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<Pick<import("./accordion").AccordionProps, string> & import("react").RefAttributes<HTMLDivElement>>>;
7
+ export declare const Nested: ComponentStory<import("react").ForwardRefExoticComponent<Pick<import("./accordion").AccordionProps, string> & import("react").RefAttributes<HTMLDivElement>>>;
12
8
  //# sourceMappingURL=accordion.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.stories.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAG1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO;;EAAoB,CAAC;AA8BzC,eAAO,MAAM,MAAM;;EAA0B,CAAC"}
1
+ {"version":3,"file":"accordion.stories.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAG1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAyBrB,eAAO,MAAM,OAAO,+JAAoB,CAAC;AA8BzC,eAAO,MAAM,MAAM,+JAA0B,CAAC"}
@@ -1,16 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Accordion } from './accordion';
3
+ import { AccordionItem } from './accordion-item';
3
4
  const story = {
4
5
  title: 'Components/Actions/Accordion',
5
6
  component: Accordion,
6
7
  };
7
8
  export default story;
8
- const Template = args => (_jsxs(Accordion, { defaultOpen: "3", ...args, children: [_jsx(Accordion.Item, { value: "1", summary: "Item 1", children: "Item 1" }), _jsx(Accordion.Item, { value: "2", summary: "Item 2", children: "Item 2" }), _jsx(Accordion.Item, { value: "3", summary: "Item 3", children: "Item 3" })] }));
9
+ const Template = args => (_jsxs(Accordion, { defaultOpen: "3", ...args, children: [_jsx(AccordionItem, { value: "1", summary: "Item 1", children: "Yes, they are. Wonderflow extracts insights from your competitors public data too. If a competitor public feedback is not currently in our Feedback data lake you can request it and it will be added." }), _jsx(AccordionItem, { value: "2", summary: "Item 2", children: "Well, it is our specialty. We have the most granular and performing ontologies for your industry, ready to be used, without any manual configuration needed on your side.On average, our VoC analysis covers 100 to 150 topics for each product category (3X more granular than any other platform) organized in a multilevel hierarchy, so that you can explore them from most generic ones to more specifics. For each topic, our artificial intelligence can determine its sentiment on a 3-level scale: positive, negative, neutral (used when a topic appears in a question, say coming from a customer support ticket)." }), _jsx(AccordionItem, { value: "3", summary: "Item 3", children: "By design, Wonderflow can integrate all pre-existing feedback solutions (like Medallia, Sprinklr, Salesforce, Bazaarvoice, etc.) that your company uses to manage customer feedback. Wonderflow can eventually setup custom integration (both in and out) using API." })] }));
9
10
  export const Default = Template.bind({});
10
11
  Default.args = {
11
12
  showSeparators: true,
12
13
  };
13
- const NestedTemplate = args => (_jsxs(Accordion, { defaultOpen: "1", ...args, children: [_jsxs(Accordion.Item, { value: "1", summary: "Item 1", children: ["Item 1", _jsxs(Accordion, { defaultOpen: "3", ...args, children: [_jsx(Accordion.Item, { value: "1", summary: "Item 1", children: "Item 1" }), _jsx(Accordion.Item, { value: "2", summary: "Item 2", children: "Item 2" }), _jsx(Accordion.Item, { value: "3", summary: "Item 3", children: "Item 3" })] })] }), _jsx(Accordion.Item, { value: "2", summary: "Item 2", children: "Item 2" }), _jsx(Accordion.Item, { value: "3", summary: "Item 3", children: "Item 3" })] }));
14
+ const NestedTemplate = args => (_jsxs(Accordion, { defaultOpen: "1", ...args, children: [_jsxs(AccordionItem, { value: "1", summary: "Item 1", children: ["Item 1", _jsxs(Accordion, { defaultOpen: "3", ...args, children: [_jsx(AccordionItem, { value: "1", summary: "Item 1", children: "Item 1" }), _jsx(AccordionItem, { value: "2", summary: "Item 2", children: "Item 2" }), _jsx(AccordionItem, { value: "3", summary: "Item 3", children: "Item 3" })] })] }), _jsx(AccordionItem, { value: "2", summary: "Item 2", children: "Item 2" }), _jsx(AccordionItem, { value: "3", summary: "Item 3", children: "Item 3" })] }));
14
15
  export const Nested = NestedTemplate.bind({});
15
16
  Nested.args = {
16
17
  showSeparators: true,
@@ -1 +1 @@
1
- {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../../src/components/disclosure/disclosure.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAC;AASf,oBAAY,eAAe,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,GAAG;IACxE;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,UAAU;IAnCrB;;OAEG;;IAEH;;;OAGG;aACM,SAAS;IAClB;;;;OAIG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;sDAoGH,CAAC"}
1
+ {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../../src/components/disclosure/disclosure.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAC;AASf,oBAAY,eAAe,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,GAAG;IACxE;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,UAAU;IAnCrB;;OAEG;;IAEH;;;OAGG;aACM,SAAS;IAClB;;;;OAIG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;sDAsGH,CAAC"}
@@ -37,6 +37,8 @@ export const Disclosure = forwardRef(({ children, open = false, padding = true,
37
37
  icon: 24,
38
38
  },
39
39
  };
40
- return (_jsxs("details", { style: { ...dynamicStyle, ...style }, className: clsx(styles.Disclosure, className), "data-disclosure-icon-position": iconPosition, "data-disclosure-dimension": dimension, "data-disclosure-expandable": expandable, onToggle: handleOpen(), ref: ref, open: isOpen, ...otherProps, children: [_jsxs(Text, { as: "summary", responsive: false, className: styles.Summary, id: seedID('disclosure'), size: dimension ? sizes[dimension].summary : undefined, weight: "bold", children: [summary, expandable && (_jsx(Symbol, { className: styles.ExpandIcon, source: "chevron-right", dimension: sizes[dimension].icon }))] }), _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { className: styles.Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 5, opacity: 1, height: 'auto' } : { y: 0, opacity: 0, height: 0 }, transition: { ease: 'easeOut', duration: 0.2, delay: 0 }, initial: false, role: "region", "aria-labelledby": seedID('disclosure'), children: children }) })] }));
40
+ return (_jsxs("details", { style: { ...dynamicStyle, ...style }, className: clsx(styles.Disclosure, className), "data-disclosure-icon-position": iconPosition, "data-disclosure-dimension": dimension, "data-disclosure-expandable": expandable, onToggle: handleOpen(), ref: ref, open: isOpen, ...otherProps, children: [_jsxs(Text, { as: "summary", responsive: false, className: styles.Summary, id: seedID('disclosure'), size: dimension ? sizes[dimension].summary : undefined, weight: "bold", children: [summary, expandable && (_jsx(Symbol, { className: styles.ExpandIcon, source: "chevron-right", dimension: sizes[dimension].icon }))] }), _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { className: styles.Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 5, opacity: 1, height: 'auto' } : {
41
+ y: 0, opacity: 0, height: 0, overflow: 'hidden',
42
+ }, transition: { ease: 'easeOut', duration: 0.2, delay: 0 }, initial: false, role: "region", "aria-labelledby": seedID('disclosure'), children: children }) })] }));
41
43
  });
42
44
  Disclosure.displayName = 'Disclosure';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "10.9.0",
3
+ "version": "10.9.1",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
@@ -61,20 +61,20 @@
61
61
  "devDependencies": {
62
62
  "@babel/core": "7.19.0",
63
63
  "@babel/preset-typescript": "7.18.6",
64
- "@storybook/addon-actions": "6.5.10",
65
- "@storybook/addon-essentials": "6.5.10",
66
- "@storybook/addon-links": "6.5.10",
64
+ "@storybook/addon-actions": "6.5.12",
65
+ "@storybook/addon-essentials": "6.5.12",
66
+ "@storybook/addon-links": "6.5.12",
67
67
  "@storybook/addon-postcss": "2.0.0",
68
- "@storybook/addons": "6.5.10",
69
- "@storybook/builder-webpack5": "6.5.10",
70
- "@storybook/manager-webpack5": "6.5.10",
71
- "@storybook/react": "6.5.10",
72
- "@storybook/theming": "6.5.10",
68
+ "@storybook/addons": "6.5.12",
69
+ "@storybook/builder-webpack5": "6.5.12",
70
+ "@storybook/manager-webpack5": "6.5.12",
71
+ "@storybook/react": "6.5.12",
72
+ "@storybook/theming": "6.5.12",
73
73
  "@types/react": "17.0.43",
74
74
  "@types/react-dom": "17.0.14",
75
75
  "@types/react-table": "7.7.12",
76
- "@wonderflow/config": "10.9.0",
77
- "@wonderflow/tokens": "10.9.0",
76
+ "@wonderflow/config": "10.9.1",
77
+ "@wonderflow/tokens": "10.9.1",
78
78
  "babel-loader": "8.2.5",
79
79
  "cpy-cli": "3.1.1",
80
80
  "postcss": "8.4.16",