@wonderflow/react-components 10.8.0 → 10.9.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/accordion/accordion-context.d.ts +12 -0
- package/dist/components/accordion/accordion-context.d.ts.map +1 -0
- package/dist/components/accordion/accordion-context.js +13 -0
- package/dist/components/accordion/accordion-item.d.ts +10 -0
- package/dist/components/accordion/accordion-item.d.ts.map +1 -0
- package/dist/components/accordion/accordion-item.js +9 -0
- package/dist/components/accordion/accordion.d.ts +18 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +8 -0
- package/dist/components/accordion/accordion.module.css +1 -0
- package/dist/components/accordion/accordion.stories.d.ts +12 -0
- package/dist/components/accordion/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion/accordion.stories.js +17 -0
- package/dist/components/accordion/index.d.ts +5 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts +6 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.js +12 -0
- package/dist/components/autocomplete/autocomplete.stories.d.ts +15 -0
- package/dist/components/autocomplete/autocomplete.stories.d.ts.map +1 -0
- package/dist/components/autocomplete/autocomplete.stories.js +19 -0
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.stories.d.ts +10 -0
- package/dist/components/avatar/avatar.stories.d.ts.map +1 -0
- package/dist/components/avatar/avatar.stories.js +19 -0
- package/dist/components/button/button.stories.d.ts +9 -0
- package/dist/components/button/button.stories.d.ts.map +1 -0
- package/dist/components/button/button.stories.js +55 -0
- package/dist/components/card/card.stories.d.ts +10 -0
- package/dist/components/card/card.stories.d.ts.map +1 -0
- package/dist/components/card/card.stories.js +47 -0
- package/dist/components/chip/chip.stories.d.ts +6 -0
- package/dist/components/chip/chip.stories.d.ts.map +1 -0
- package/dist/components/chip/chip.stories.js +30 -0
- package/dist/components/circular-progress/circular-progress.stories.d.ts +10 -0
- package/dist/components/circular-progress/circular-progress.stories.d.ts.map +1 -0
- package/dist/components/circular-progress/circular-progress.stories.js +30 -0
- package/dist/components/clamp-text/clamp-text.stories.d.ts +7 -0
- package/dist/components/clamp-text/clamp-text.stories.d.ts.map +1 -0
- package/dist/components/clamp-text/clamp-text.stories.js +25 -0
- package/dist/components/container/container.stories.d.ts +10 -0
- package/dist/components/container/container.stories.d.ts.map +1 -0
- package/dist/components/container/container.stories.js +48 -0
- package/dist/components/datetime/datetime.stories.d.ts +7 -0
- package/dist/components/datetime/datetime.stories.d.ts.map +1 -0
- package/dist/components/datetime/datetime.stories.js +22 -0
- package/dist/components/disclosure/disclosure.d.ts +1 -1
- package/dist/components/disclosure/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure/disclosure.js +8 -7
- package/dist/components/disclosure/disclosure.stories.d.ts +24 -0
- package/dist/components/disclosure/disclosure.stories.d.ts.map +1 -0
- package/dist/components/disclosure/disclosure.stories.js +32 -0
- package/dist/components/drawer/drawer.stories.d.ts +7 -0
- package/dist/components/drawer/drawer.stories.d.ts.map +1 -0
- package/dist/components/drawer/drawer.stories.js +36 -0
- package/dist/components/elevator/elevator.stories.d.ts +7 -0
- package/dist/components/elevator/elevator.stories.d.ts.map +1 -0
- package/dist/components/elevator/elevator.stories.js +17 -0
- package/dist/components/grid/grid.stories.d.ts +9 -0
- package/dist/components/grid/grid.stories.d.ts.map +1 -0
- package/dist/components/grid/grid.stories.js +11 -0
- package/dist/components/icon-button/icon-button.stories.d.ts +6 -0
- package/dist/components/icon-button/icon-button.stories.d.ts.map +1 -0
- package/dist/components/icon-button/icon-button.stories.js +33 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/info-state/info-state.stories.d.ts +71 -0
- package/dist/components/info-state/info-state.stories.d.ts.map +1 -0
- package/dist/components/info-state/info-state.stories.js +40 -0
- package/dist/components/input-group/input-group.stories.d.ts +10 -0
- package/dist/components/input-group/input-group.stories.d.ts.map +1 -0
- package/dist/components/input-group/input-group.stories.js +13 -0
- package/dist/components/linear-progress/linear-progress.d.ts +1 -1
- package/dist/components/linear-progress/linear-progress.stories.d.ts +18 -0
- package/dist/components/linear-progress/linear-progress.stories.d.ts.map +1 -0
- package/dist/components/linear-progress/linear-progress.stories.js +27 -0
- package/dist/components/list/list.stories.d.ts +15 -0
- package/dist/components/list/list.stories.d.ts.map +1 -0
- package/dist/components/list/list.stories.js +27 -0
- package/dist/components/masonry/masonry.stories.d.ts +7 -0
- package/dist/components/masonry/masonry.stories.d.ts.map +1 -0
- package/dist/components/masonry/masonry.stories.js +24 -0
- package/dist/components/menu/menu-item/menu-item.stories.d.ts +10 -0
- package/dist/components/menu/menu-item/menu-item.stories.d.ts.map +1 -0
- package/dist/components/menu/menu-item/menu-item.stories.js +33 -0
- package/dist/components/menu/menu.stories.d.ts +41 -0
- package/dist/components/menu/menu.stories.d.ts.map +1 -0
- package/dist/components/menu/menu.stories.js +24 -0
- package/dist/components/modal/modal.stories.d.ts +12 -0
- package/dist/components/modal/modal.stories.d.ts.map +1 -0
- package/dist/components/modal/modal.stories.js +23 -0
- package/dist/components/overlay-container/overlay-container.stories.d.ts +6 -0
- package/dist/components/overlay-container/overlay-container.stories.d.ts.map +1 -0
- package/dist/components/overlay-container/overlay-container.stories.js +17 -0
- package/dist/components/pagination/pagination.stories.d.ts +6 -0
- package/dist/components/pagination/pagination.stories.d.ts.map +1 -0
- package/dist/components/pagination/pagination.stories.js +421 -0
- package/dist/components/popover/popover.stories.d.ts +22 -0
- package/dist/components/popover/popover.stories.d.ts.map +1 -0
- package/dist/components/popover/popover.stories.js +45 -0
- package/dist/components/prose/prose.stories.d.ts +7 -0
- package/dist/components/prose/prose.stories.d.ts.map +1 -0
- package/dist/components/prose/prose.stories.js +12 -0
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.stories.d.ts +33 -0
- package/dist/components/select/select.stories.d.ts.map +1 -0
- package/dist/components/select/select.stories.js +47 -0
- package/dist/components/selection-controls/checkbox.stories.d.ts +30 -0
- package/dist/components/selection-controls/checkbox.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/checkbox.stories.js +34 -0
- package/dist/components/selection-controls/radio.stories.d.ts +21 -0
- package/dist/components/selection-controls/radio.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/radio.stories.js +30 -0
- package/dist/components/selection-controls/toggle.stories.d.ts +8 -0
- package/dist/components/selection-controls/toggle.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/toggle.stories.js +22 -0
- package/dist/components/separator/separator.stories.d.ts +6 -0
- package/dist/components/separator/separator.stories.d.ts.map +1 -0
- package/dist/components/separator/separator.stories.js +8 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +9 -0
- package/dist/components/skeleton/skeleton.stories.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.stories.js +38 -0
- package/dist/components/slider/slider.stories.d.ts +39 -0
- package/dist/components/slider/slider.stories.d.ts.map +1 -0
- package/dist/components/slider/slider.stories.js +33 -0
- package/dist/components/snackbar/snackbar.stories.d.ts +7 -0
- package/dist/components/snackbar/snackbar.stories.d.ts.map +1 -0
- package/dist/components/snackbar/snackbar.stories.js +22 -0
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/spinner/spinner.stories.d.ts +10 -0
- package/dist/components/spinner/spinner.stories.d.ts.map +1 -0
- package/dist/components/spinner/spinner.stories.js +19 -0
- package/dist/components/split-button/split-button.stories.d.ts +8 -0
- package/dist/components/split-button/split-button.stories.d.ts.map +1 -0
- package/dist/components/split-button/split-button.stories.js +36 -0
- package/dist/components/stack/stack.stories.d.ts +6 -0
- package/dist/components/stack/stack.stories.d.ts.map +1 -0
- package/dist/components/stack/stack.stories.js +40 -0
- package/dist/components/star-meter/star-meter.stories.d.ts +7 -0
- package/dist/components/star-meter/star-meter.stories.d.ts.map +1 -0
- package/dist/components/star-meter/star-meter.stories.js +24 -0
- package/dist/components/symbol/symbol.stories.d.ts +16 -0
- package/dist/components/symbol/symbol.stories.d.ts.map +1 -0
- package/dist/components/symbol/symbol.stories.js +30 -0
- package/dist/components/tab/tab.stories.d.ts +21 -0
- package/dist/components/tab/tab.stories.d.ts.map +1 -0
- package/dist/components/tab/tab.stories.js +46 -0
- package/dist/components/tab/tabs-panel.d.ts +1 -0
- package/dist/components/tab/tabs-panel.d.ts.map +1 -1
- package/dist/components/table/table.stories.d.ts +22 -0
- package/dist/components/table/table.stories.d.ts.map +1 -0
- package/dist/components/table/table.stories.js +1187 -0
- package/dist/components/text/text.stories.d.ts +7 -0
- package/dist/components/text/text.stories.d.ts.map +1 -0
- package/dist/components/text/text.stories.js +39 -0
- package/dist/components/textfield/textfield.d.ts +1 -1
- package/dist/components/textfield/textfield.stories.d.ts +62 -0
- package/dist/components/textfield/textfield.stories.d.ts.map +1 -0
- package/dist/components/textfield/textfield.stories.js +83 -0
- package/dist/components/title/title.stories.d.ts +7 -0
- package/dist/components/title/title.stories.d.ts.map +1 -0
- package/dist/components/title/title.stories.js +38 -0
- package/dist/components/toggle-button/toggle-button.stories.d.ts +16 -0
- package/dist/components/toggle-button/toggle-button.stories.d.ts.map +1 -0
- package/dist/components/toggle-button/toggle-button.stories.js +29 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.stories.js +22 -0
- package/package.json +6 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { Text } from './text';
|
|
3
|
+
declare const story: ComponentMeta<typeof Text>;
|
|
4
|
+
export default story;
|
|
5
|
+
export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"p", import("./text").TextProps>>;
|
|
6
|
+
export declare const Weight: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"p", import("./text").TextProps>>;
|
|
7
|
+
//# sourceMappingURL=text.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.stories.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,IAAI,CA4BrC,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,wGAAoB,CAAC;AACzC,eAAO,MAAM,MAAM,wGAAoB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Container } from '../..';
|
|
3
|
+
import { Text } from './text';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Typography/Text',
|
|
6
|
+
component: Text,
|
|
7
|
+
args: {
|
|
8
|
+
maxWidth: 'auto',
|
|
9
|
+
children: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!',
|
|
10
|
+
textAlign: 'start',
|
|
11
|
+
responsive: true,
|
|
12
|
+
lineHeight: 'small',
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
sentiment: {
|
|
16
|
+
options: ['positive', 'informative', 'danger', 'warning'],
|
|
17
|
+
control: { type: 'select' },
|
|
18
|
+
},
|
|
19
|
+
dimmed: {
|
|
20
|
+
options: [5, 6, 7],
|
|
21
|
+
control: { type: 'select' },
|
|
22
|
+
},
|
|
23
|
+
textAlign: {
|
|
24
|
+
options: ['start', 'center', 'end'],
|
|
25
|
+
control: { type: 'inline-radio' },
|
|
26
|
+
},
|
|
27
|
+
lineHeight: {
|
|
28
|
+
options: ['none', 'small', 'large'],
|
|
29
|
+
control: { type: 'inline-radio' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export default story;
|
|
34
|
+
const Template = args => _jsx(Container, { dimension: "medium", children: _jsx(Text, { ...args }) });
|
|
35
|
+
export const Default = Template.bind({});
|
|
36
|
+
export const Weight = Template.bind({});
|
|
37
|
+
Weight.args = {
|
|
38
|
+
weight: 'bold',
|
|
39
|
+
};
|
|
@@ -83,7 +83,7 @@ export declare const Textfield: import("react").ForwardRefExoticComponent<import
|
|
|
83
83
|
/**
|
|
84
84
|
* Set the size of the field
|
|
85
85
|
*/
|
|
86
|
-
dimension?: "
|
|
86
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
87
87
|
/**
|
|
88
88
|
* Set the field into a readonly state. When readonly, the field value
|
|
89
89
|
* cannot be edited but it can still be selected and copied.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Textfield } from './textfield';
|
|
4
|
+
declare const story: ComponentMeta<typeof Textfield>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Single: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
|
|
7
|
+
invalid?: boolean | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
10
|
+
iconPosition?: "left" | "right" | undefined;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
type?: string | undefined;
|
|
13
|
+
textarea?: boolean | undefined;
|
|
14
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
15
|
+
readOnly?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
|
|
18
|
+
fullWidth?: boolean | undefined;
|
|
19
|
+
} & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
|
|
20
|
+
export declare const Types: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
|
|
21
|
+
invalid?: boolean | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
24
|
+
iconPosition?: "left" | "right" | undefined;
|
|
25
|
+
label?: string | undefined;
|
|
26
|
+
type?: string | undefined;
|
|
27
|
+
textarea?: boolean | undefined;
|
|
28
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
29
|
+
readOnly?: boolean | undefined;
|
|
30
|
+
disabled?: boolean | undefined;
|
|
31
|
+
onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
|
|
32
|
+
fullWidth?: boolean | undefined;
|
|
33
|
+
} & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
|
|
34
|
+
export declare const Textarea: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
|
|
35
|
+
invalid?: boolean | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
38
|
+
iconPosition?: "left" | "right" | undefined;
|
|
39
|
+
label?: string | undefined;
|
|
40
|
+
type?: string | undefined;
|
|
41
|
+
textarea?: boolean | undefined;
|
|
42
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
43
|
+
readOnly?: boolean | undefined;
|
|
44
|
+
disabled?: boolean | undefined;
|
|
45
|
+
onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
|
|
46
|
+
fullWidth?: boolean | undefined;
|
|
47
|
+
} & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
|
|
48
|
+
export declare const WithIcon: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
|
|
49
|
+
invalid?: boolean | undefined;
|
|
50
|
+
} & {
|
|
51
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
52
|
+
iconPosition?: "left" | "right" | undefined;
|
|
53
|
+
label?: string | undefined;
|
|
54
|
+
type?: string | undefined;
|
|
55
|
+
textarea?: boolean | undefined;
|
|
56
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
57
|
+
readOnly?: boolean | undefined;
|
|
58
|
+
disabled?: boolean | undefined;
|
|
59
|
+
onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
|
|
60
|
+
fullWidth?: boolean | undefined;
|
|
61
|
+
} & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
|
|
62
|
+
//# sourceMappingURL=textfield.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textfield.stories.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAoC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AA4BrB,eAAO,MAAM,MAAM;;;;;;;;;;;;;oEAA0B,CAAC;AAY9C,eAAO,MAAM,KAAK;;;;;;;;;;;;;oEAA4B,CAAC;AAgB/C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;oEAA4B,CAAC;AAalD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;oEAA0B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from '../..';
|
|
3
|
+
import { Textfield } from './textfield';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Inputs/Textfield',
|
|
6
|
+
component: Textfield,
|
|
7
|
+
args: {
|
|
8
|
+
dimension: 'regular',
|
|
9
|
+
readOnly: false,
|
|
10
|
+
defaultValue: 'Sample value',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
onChange: {
|
|
14
|
+
action: 'changed',
|
|
15
|
+
table: {
|
|
16
|
+
disable: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
dimension: {
|
|
20
|
+
options: ['small', 'regular', 'big'],
|
|
21
|
+
control: { type: 'radio' },
|
|
22
|
+
},
|
|
23
|
+
readOnly: {
|
|
24
|
+
options: [true, false],
|
|
25
|
+
control: { type: 'inline-radio' },
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
options: [true, false],
|
|
29
|
+
control: { type: 'inline-radio' },
|
|
30
|
+
},
|
|
31
|
+
invalid: {
|
|
32
|
+
options: [true, false],
|
|
33
|
+
control: { type: 'inline-radio' },
|
|
34
|
+
},
|
|
35
|
+
iconPosition: {
|
|
36
|
+
options: ['left', 'right', undefined],
|
|
37
|
+
control: { type: 'inline-radio' },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export default story;
|
|
42
|
+
const SingleTemplate = args => (_jsxs(Stack, { rowGap: 24, children: [_jsx(Textfield, { ...args, size: 4, label: "Empty", placeholder: "Placeholder" }), _jsx(Textfield, { ...args, size: 4, label: "Empty", placeholder: "Placeholder" }), _jsx(Textfield, { ...args, size: 4, label: "Empty", placeholder: "Placeholder" }), _jsx(Textfield, { ...args, type: "password", label: "Password", defaultValue: "123123kl\u00F2asj", placeholder: "Placeholder" })] }));
|
|
43
|
+
const MultipleTemplate = args => (_jsxs(Stack, { rowGap: 24, children: [_jsx(Textfield, { ...args, label: "Filled", defaultValue: "Sample value" }), _jsx(Textfield, { ...args, label: "Filled read only", defaultValue: "Sample value", readOnly: true }), _jsx(Textfield, { ...args, label: "Empty disbled", placeholder: "Placeholder", disabled: true }), _jsx(Textfield, { ...args, label: "Filled disabled", defaultValue: "Sample value", disabled: true }), _jsx(Textfield, { ...args, type: "password", label: "Type password", defaultValue: "912435jh345" }), _jsx(Textfield, { ...args, type: "number", label: "Type number", defaultValue: 100 }), _jsx(Textfield, { ...args, type: "search", label: "Type search" }), _jsx(Textfield, { ...args, type: "date", label: "Type date" }), _jsx(Textfield, { ...args, type: "time", label: "Type time" }), _jsx(Textfield, { ...args, type: "month", label: "Type month" }), _jsx(Textfield, { ...args, type: "week", label: "Type week" }), _jsx(Textfield, { ...args, type: "datetime-local", label: "Type datetime-local" })] }));
|
|
44
|
+
export const Single = SingleTemplate.bind({});
|
|
45
|
+
Single.args = {
|
|
46
|
+
disabled: false,
|
|
47
|
+
};
|
|
48
|
+
Single.argTypes = {
|
|
49
|
+
textarea: {
|
|
50
|
+
table: {
|
|
51
|
+
disable: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export const Types = MultipleTemplate.bind({});
|
|
56
|
+
Types.args = {
|
|
57
|
+
disabled: false,
|
|
58
|
+
};
|
|
59
|
+
Types.argTypes = {
|
|
60
|
+
textarea: {
|
|
61
|
+
table: {
|
|
62
|
+
disable: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
const TextareaTemplate = args => (_jsx(Textfield, { ...args, defaultValue: "123123kl\u00F2asj", placeholder: "Placeholder" }));
|
|
67
|
+
export const Textarea = TextareaTemplate.bind({});
|
|
68
|
+
Textarea.args = {
|
|
69
|
+
disabled: false,
|
|
70
|
+
textarea: true,
|
|
71
|
+
};
|
|
72
|
+
Textarea.argTypes = {
|
|
73
|
+
textarea: {
|
|
74
|
+
table: {
|
|
75
|
+
disable: true,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export const WithIcon = SingleTemplate.bind({});
|
|
80
|
+
WithIcon.args = {
|
|
81
|
+
icon: 'calendar',
|
|
82
|
+
type: 'date',
|
|
83
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { Title } from './title';
|
|
3
|
+
declare const story: ComponentMeta<typeof Title>;
|
|
4
|
+
export default story;
|
|
5
|
+
export declare const Default: ComponentStory<typeof Title>;
|
|
6
|
+
export declare const Single: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"span", import("./title").TitleProps>>;
|
|
7
|
+
//# sourceMappingURL=title.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.stories.d.ts","sourceRoot":"","sources":["../../../src/components/title/title.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CAuBtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,OAAO,KAAK,CAUhD,CAAC;AAQF,eAAO,MAAM,MAAM,6GAAoB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Container } from '../..';
|
|
3
|
+
import { Title } from './title';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Typography/Title',
|
|
6
|
+
component: Title,
|
|
7
|
+
parameters: {
|
|
8
|
+
controls: { hideNoControlsWarning: true },
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
responsive: true,
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
level: {
|
|
15
|
+
options: ['display', '1', '2', '3', '4', '5', '6'],
|
|
16
|
+
control: { type: 'select' },
|
|
17
|
+
},
|
|
18
|
+
lineHeight: {
|
|
19
|
+
options: ['none', 'small', 'large'],
|
|
20
|
+
control: { type: 'inline-radio' },
|
|
21
|
+
},
|
|
22
|
+
textAlign: {
|
|
23
|
+
options: ['start', 'center', 'end'],
|
|
24
|
+
control: { type: 'inline-radio' },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export default story;
|
|
29
|
+
export const Default = ({ lineHeight }) => (_jsxs(Container, { children: [_jsx(Title, { lineHeight: lineHeight, as: "h1", level: "display", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h1", level: "1", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h2", level: "2", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h3", level: "3", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h4", level: "4", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h5", level: "5", children: "Sample title" }), _jsx(Title, { lineHeight: lineHeight, as: "h6", level: "6", children: "Sample title" })] }));
|
|
30
|
+
const Template = args => (_jsx(Container, { dimension: "medium", children: _jsx(Title, { ...args, children: "Sample title" }) }));
|
|
31
|
+
export const Single = Template.bind({});
|
|
32
|
+
Single.args = {
|
|
33
|
+
as: 'span',
|
|
34
|
+
lineHeight: 'small',
|
|
35
|
+
level: '1',
|
|
36
|
+
maxWidth: 'auto',
|
|
37
|
+
textAlign: 'center',
|
|
38
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ToggleButton } from './toggle-button';
|
|
4
|
+
declare const story: ComponentMeta<typeof ToggleButton>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("..").ButtonProps & import("..").IconButtonProps & import("type-fest").Except<import("..").IconButtonProps, "icon"> & {
|
|
7
|
+
restingIcon: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
8
|
+
pressedIcon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
9
|
+
pressed?: boolean | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
export declare const MultipleIcons: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("..").ButtonProps & import("..").IconButtonProps & import("type-fest").Except<import("..").IconButtonProps, "icon"> & {
|
|
12
|
+
restingIcon: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
13
|
+
pressedIcon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
14
|
+
pressed?: boolean | undefined;
|
|
15
|
+
}>>;
|
|
16
|
+
//# sourceMappingURL=toggle-button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,YAAY,CAmB7C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO;;;;GAAoB,CAAC;AAEzC,eAAO,MAAM,aAAa;;;;GAAoB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ToggleButton } from './toggle-button';
|
|
3
|
+
const story = {
|
|
4
|
+
title: 'Components/Actions/Toggle button',
|
|
5
|
+
component: ToggleButton,
|
|
6
|
+
args: {
|
|
7
|
+
dimension: 'regular',
|
|
8
|
+
kind: 'primary',
|
|
9
|
+
restingIcon: 'play',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
onClick: { action: 'clicked' },
|
|
13
|
+
dimension: {
|
|
14
|
+
options: ['small', 'regular', 'big'],
|
|
15
|
+
control: { type: 'radio' },
|
|
16
|
+
},
|
|
17
|
+
kind: {
|
|
18
|
+
options: ['primary', 'secondary', 'flat'],
|
|
19
|
+
control: { type: 'radio' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default story;
|
|
24
|
+
const Template = args => _jsx(ToggleButton, { ...args });
|
|
25
|
+
export const Default = Template.bind({});
|
|
26
|
+
export const MultipleIcons = Template.bind({});
|
|
27
|
+
MultipleIcons.args = {
|
|
28
|
+
pressedIcon: 'pause',
|
|
29
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { Tooltip } from './tooltip';
|
|
3
|
+
declare const story: ComponentMeta<typeof Tooltip>;
|
|
4
|
+
export default story;
|
|
5
|
+
export declare const Default: ComponentStory<FCChildrenClass<import("./tooltip").TooltipProps>>;
|
|
6
|
+
export declare const WithButtons: ComponentStory<FCChildrenClass<import("./tooltip").TooltipProps>>;
|
|
7
|
+
//# sourceMappingURL=tooltip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,OAAO,CAOxC,CAAC;AAEF,eAAe,KAAK,CAAC;AAmBrB,eAAO,MAAM,OAAO,mEAAoB,CAAC;AAKzC,eAAO,MAAM,WAAW,mEAAoB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from '../..';
|
|
3
|
+
import { Tooltip } from './tooltip';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Dialogs/Tooltip',
|
|
6
|
+
component: Tooltip,
|
|
7
|
+
args: {
|
|
8
|
+
trigger: _jsx(Text, { as: "span", children: "HTML" }),
|
|
9
|
+
interactive: true,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export default story;
|
|
13
|
+
const Template = args => (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { ...args, children: [_jsx("button", { type: "button", children: "test" }), "HTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup Language", _jsx("button", { type: "button", children: "test" })] }), _jsxs(Tooltip, { ...args, children: [_jsx("button", { type: "button", children: "test" }), "HTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup LanguageHTML stands for HyperText Markup Language", _jsx("button", { type: "button", children: "test" })] })] }));
|
|
14
|
+
export const Default = Template.bind({});
|
|
15
|
+
Default.args = {
|
|
16
|
+
interactive: true,
|
|
17
|
+
};
|
|
18
|
+
export const WithButtons = Template.bind({});
|
|
19
|
+
WithButtons.args = {
|
|
20
|
+
trigger: _jsx(Button, { children: "HTML" }),
|
|
21
|
+
interactive: true,
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.0",
|
|
4
4
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"npm": ">=8.x"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"start": "
|
|
22
|
+
"start": "run-p storybook watch:csstypes",
|
|
23
23
|
"prebuild": "run-s clean build:csstypes",
|
|
24
24
|
"build": "run-s build:ts build:css",
|
|
25
25
|
"postbuild": "rimraf dist/**/_mixins.css",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"postbuild:css": "mv dist/core.css ./core.css && mv dist/core ./core",
|
|
29
29
|
"lint": "run-s lint:styles",
|
|
30
30
|
"lint:styles": "stylelint ./src/**/*.css",
|
|
31
|
-
"storybook": "start-storybook -p 6006",
|
|
31
|
+
"storybook": "start-storybook --quiet -p 6006",
|
|
32
32
|
"build-storybook": "build-storybook",
|
|
33
33
|
"clean": "rimraf dist core core.css",
|
|
34
|
+
"watch:csstypes": "tcm -w -p '**/*.module.css' src",
|
|
34
35
|
"build:csstypes": "tcm -p '**/*.module.css' src"
|
|
35
36
|
},
|
|
36
37
|
"repository": {
|
|
@@ -72,8 +73,8 @@
|
|
|
72
73
|
"@types/react": "17.0.43",
|
|
73
74
|
"@types/react-dom": "17.0.14",
|
|
74
75
|
"@types/react-table": "7.7.12",
|
|
75
|
-
"@wonderflow/config": "10.
|
|
76
|
-
"@wonderflow/tokens": "10.
|
|
76
|
+
"@wonderflow/config": "10.9.0",
|
|
77
|
+
"@wonderflow/tokens": "10.9.0",
|
|
77
78
|
"babel-loader": "8.2.5",
|
|
78
79
|
"cpy-cli": "3.1.1",
|
|
79
80
|
"postcss": "8.4.16",
|